Kaynağa Gözat

实验参数任务调整详细界面

liyangwenqi 5 ay önce
ebeveyn
işleme
4629306067
1 değiştirilmiş dosya ile 86 ekleme ve 4 silme
  1. 86 4
      src/views/command/taskEdit/index.vue

+ 86 - 4
src/views/command/taskEdit/index.vue

@@ -185,6 +185,63 @@
         <el-button type="primary" @click="handleConfirm">确定</el-button>
       </div>
     </DarkDrawer>
+    <!-- 方案详情抽屉 -->
+    <DarkDrawer
+      title="方案详情"
+      :visible.sync="detailVisible"
+      size="50%"
+      :show-footer="false"
+    >
+      <div class="drawer-main">
+        <!-- 头部:标题 + 密级Tag -->
+        <div class="section-group">
+          <div class="section-header" style="display:flex;align-items:center;gap:10px;">
+            <el-tag :style="{ background: secretBgColor(currentDetail.secretLevel), color:'#fff', border:'none' }">
+              {{ currentDetail.secretLevel || '—' }}
+            </el-tag>
+            <h3 class="section-title" style="margin:0;">{{ currentDetail.planName || currentDetail.taskName || '—' }}</h3>
+          </div>
+          <div class="section-divider"></div>
+        </div>
+
+        <!-- 基本信息 -->
+        <div class="section-group">
+          <div class="section-header"><h3 class="section-title">基本信息</h3><div class="section-divider"></div></div>
+          <el-row :gutter="16">
+            <el-col :span="12"><p><b>任务名称:</b>{{ currentDetail.taskName || currentDetail.simulationTaskName || '—' }}</p></el-col>
+            <el-col :span="12"><p><b>任务代号:</b>{{ currentDetail.taskCode || '—' }}</p></el-col>
+            <el-col :span="12"><p><b>开始时间:</b>{{ currentDetail.startTime || currentDetail.simulationStartTime || '—' }}</p></el-col>
+            <el-col :span="12"><p><b>结束时间:</b>{{ currentDetail.endTime || currentDetail.simulationEndTime || '—' }}</p></el-col>
+            <el-col :span="12"><p><b>状态:</b>
+              <el-tag :type="statusType(currentDetail.status)" size="small" effect="dark">
+                {{ currentDetail.status || '—' }}
+              </el-tag>
+            </p></el-col>
+            <el-col :span="12">
+              <p><b>干扰方案编制状态:</b>
+                <el-tag :type="compileStatusType(currentDetail.compileStatus)" size="small" effect="dark">
+                  {{ currentDetail.compileStatus || '—' }}
+                </el-tag>
+              </p>
+            </el-col>
+
+            <el-col :span="12">
+              <p><b>秘密年限:</b>{{ currentDetail.secretYears || '—' }}</p>
+            </el-col>
+
+          </el-row>
+        </div>
+
+        <!-- 其他可选信息:参与/编制状态等(存在才显示) -->
+        <div class="section-group" v-if="currentDetail.simulationParticipantTasks">
+          <div class="section-header"><h3 class="section-title">参与信息</h3><div class="section-divider"></div></div>
+          <p><b>参试任务:</b>{{ currentDetail.simulationParticipantTasks }}</p>
+        </div>
+
+
+      </div>
+    </DarkDrawer>
+
   </div>
 </template>
 
@@ -207,6 +264,8 @@ export default {
   },
   data() {
     return {
+      detailVisible: false,
+      currentDetail: {},
       role: 'ordinary',
       activeTab: 'interference',
       selectedInterference: null,
@@ -677,6 +736,24 @@ export default {
     this.measPagination.total = this.filteredMeas.length;
   },
   methods: {
+    compileStatusType(status) {
+      const map = {
+        '已编制': 'success',
+        '编制中': 'warning',
+        '未编制': 'danger',
+        '已审核': ''
+      }
+      return map[status] || 'info'
+    }
+,
+    secretBgColor(level) {
+      const map = { '绝密': '#c45656', '机密': '#b88230', '秘密': '#3475b5' }
+      return map[level] || '#6b7280'
+    },
+    statusType(status) {
+      const map = { '有效':'success', '待审核':'warning', '待执行':'warning', '草稿':'info', '已确认':'success', '未确认':'warning' }
+      return map[status] || 'info'
+    },
     // 处理标签页切换
     handleTabChange() {
       // 切换标签页时重置当前页为1
@@ -832,7 +909,9 @@ export default {
 
     handleSelectInt() {
     },
-    viewDetailsInt() {
+    viewDetailsInt(plan) {
+      this.currentDetail = { ...plan }
+      this.detailVisible = true
     },
     viewEditInt(val){
       val={
@@ -844,7 +923,9 @@ export default {
     },
     handleSelectB() {
     },
-    viewDetailsB() {
+    viewDetailsB(plan) {
+      this.currentDetail = { ...plan }
+      this.detailVisible = true
     },
     viewEditB(val) {
       val={
@@ -856,8 +937,9 @@ export default {
     },
     handleSelectC() {
     },
-    viewDetailsC(val) {
-      console.log("详情测量方案:",val)
+    viewDetailsC(plan) {
+      this.currentDetail = { ...plan }
+      this.detailVisible = true
     },
     viewEditC(val) {
       val={