From c64c8f43ec1a3d88feb1f915fd488040b6358e7d Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期二, 09 八月 2022 19:04:12 +0800
Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/gtqtOut

---
 src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue |  128 +++++++++++++++++++++++++-----------------
 1 files changed, 76 insertions(+), 52 deletions(-)

diff --git a/src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue b/src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue
index 482392a..767809d 100644
--- a/src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue
+++ b/src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="system-user-container">
     <el-card shadow="hover">
-      <div class="button_Line">
+      <div class="button_Line mb15">
         <div class="button_Left">
           <el-button size="default" type="primary"  @click="onOpenAdd">
             <el-icon>
@@ -15,21 +15,21 @@
           </el-button>
         </div>
         <div class="button_Right">
-          <el-button @click="upButton">
-            <el-icon>
-              <Upload />
-            </el-icon>
-          </el-button>
-          <el-button>
-            <el-icon>
-              <Download />
-            </el-icon>
-          </el-button>
-          <el-button>
-            <el-icon>
-              <Refresh />
-            </el-icon>
-          </el-button>
+<!--          <el-button @click="upButton">-->
+<!--            <el-icon>-->
+<!--              <Upload />-->
+<!--            </el-icon>-->
+<!--          </el-button>-->
+<!--          <el-button>-->
+<!--            <el-icon>-->
+<!--              <Download />-->
+<!--            </el-icon>-->
+<!--          </el-button>-->
+<!--          <el-button>-->
+<!--            <el-icon>-->
+<!--              <Refresh />-->
+<!--            </el-icon>-->
+<!--          </el-button>-->
         </div>
       </div>
       <el-table
@@ -42,13 +42,25 @@
             type="selection"
             width="55"
         />
-        <el-table-column prop="drillPlanId" label="演练名称" show-overflow-tooltip sortable></el-table-column>
+        <el-table-column prop="drillName" label="演练名称" show-overflow-tooltip sortable></el-table-column>
         <el-table-column prop="drillAddress" label="演练地点" show-overflow-tooltip sortable></el-table-column>
-        <el-table-column prop="drillWay" label="演练方式" show-overflow-tooltip sortable></el-table-column>
-        <el-table-column prop="drillLevel" label="演练级别" show-overflow-tooltip sortable></el-table-column>
+        <el-table-column prop="drillWay" label="演练方式" show-overflow-tooltip sortable>
+          <template #default="scope">
+            <div v-if="scope.row.drillWay=='0'">综合</div>
+            <div v-if="scope.row.drillWay=='1'">桌面</div>
+            <div v-if="scope.row.drillWay=='2'">专项</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="drillLevel" label="演练级别" show-overflow-tooltip sortable>
+          <template #default="scope">
+            <div v-if="scope.row.drillLevel=='1'">公司级</div>
+            <div v-if="scope.row.drillLevel=='2'">分厂级</div>
+            <div v-if="scope.row.drillLevel=='3'">车间级</div>
+          </template>
+        </el-table-column>
         <el-table-column prop="drillPlanDate" label="计划演练日期" show-overflow-tooltip sortable></el-table-column>
         <el-table-column prop="drillRecordDate" label="演练记录时间" show-overflow-tooltip sortable></el-table-column>
-        <el-table-column prop="planId" label="应急预案" show-overflow-tooltip sortable></el-table-column>
+        <el-table-column prop="emergencyPlanName" label="应急预案" show-overflow-tooltip sortable></el-table-column>
         <el-table-column label="操作" width="260" align="center" fixed="right">
           <template #default="scope">
             <el-button size="small" text type="primary" @click="onEdit('详情',scope.row.id)">
@@ -85,7 +97,7 @@
       </div>
     </el-card>
     <OpenAdd ref="addRef" @myAdd="onMyAdd"/>
-    <upData ref="upShow"></upData>
+<!--    <upData ref="upShow"></upData>-->
   </div>
 </template>
 
@@ -105,8 +117,8 @@
 import { Plus,
   // Edit,
   Delete,
-  Upload,
-  Download,
+  // Upload,
+  // Download,
   View,
   Refresh,
   VideoPause,
@@ -114,7 +126,7 @@
 } from '@element-plus/icons-vue'
 import OpenAdd from '/@/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/component/openAdd.vue';
 import UpData from '/@/views/contingencyManagement/panManagement/component/upData.vue';
-import {emergencyDrillExecuteApi} from "/@/api/emergencyDrillExecute";
+import {emergencyDrillExecuteApi} from "/@/api/contingencyManagement/emergencyDrillExecute";
 
 export default defineComponent({
   name: 'systemUser',
@@ -125,8 +137,8 @@
     // Edit,
     Delete,
     View,
-    Upload,
-    Download,
+    // Upload,
+    // Download,
     Refresh,
     VideoPause,
     UpData
@@ -159,10 +171,10 @@
     };
 
     // 上传
-    const upShow=ref()
-    const upButton=()=>{
-      upShow.value.openDialog()
-    }
+    // const upShow=ref()
+    // const upButton=()=>{
+    //   upShow.value.openDialog()
+    // }
     // 打开新增用户弹窗
     const addRef = ref();
     const onOpenAdd = () => {
@@ -185,14 +197,16 @@
       }
     };
     // 删除用户
-    const onRowDel = (data: any) => {
+    const onRowDel = (id: number) => {
+      let arr = [];
+      arr.push(id)
       ElMessageBox.confirm('确定删除所选项吗?', '提示',{
         confirmButtonText: '确认',
         cancelButtonText: '取消',
         type: 'warning',
       }).then(() => {
         emergencyDrillExecuteApi()
-            .deleteEmergencyDrillExecute(data)
+            .deleteEmergencyDrillExecute(arr)
             .then((res) => {
               if (res.data.code == 200) {
                 ElMessage({
@@ -212,6 +226,23 @@
             });
       })
           .catch(() => {});
+    };
+    const danger = ref(true);
+    const deletAll = ref();
+    const handleSelectionChange = (val: any) => {
+      let valId = JSON.parse(JSON.stringify(val));
+      let arr = [];
+      for (let i = 0; i < valId.length; i++) {
+        arr.push(valId[i].id);
+      }
+      deletAll.value = arr;
+      if (val.length == 1) {
+        danger.value = false;
+      }  else if (val.length == 0) {
+        danger.value = true;
+      } else {
+        danger.value = false;
+      }
     };
     // 多选删除
     const onDeleteAll = () => {
@@ -257,30 +288,13 @@
       listQuery.pageIndex = val;
       listApi();
     };
-    const danger = ref(true);
-    const deletAll = ref();
-    const handleSelectionChange = (val: any) => {
-      let valId = JSON.parse(JSON.stringify(val));
-      let arr = [];
-      for (let i = 0; i < valId.length; i++) {
-        arr.push(valId[i].id);
-      }
-      deletAll.value = arr.toString();
-      // console.log(deletAll.value);
-      if (val.length == 1) {
-        danger.value = false;
-      }  else if (val.length == 0) {
-        danger.value = true;
-      } else {
-        danger.value = false;
-      }
-    };
+
     onMounted(() => {
       listApi();
     });
     return {
-      upButton,
-      upShow,
+      // upButton,
+      // upShow,
       tableData,
       onOpenAdd,  //新增
       addRef,
@@ -295,6 +309,7 @@
       handleSelectionChange,
       danger,
       deletAll,
+      onEdit,
     };
   },
 });
@@ -313,6 +328,15 @@
   flex-direction: row;
   justify-content: space-between;
 }
+//表头
+::v-deep .el-table th.el-table__cell {
+  background-color: #f6f7fa;
+  font-weight: 400;
+  color: #909399;
+}
+.el-table .sort-caret.ascending{
+  border-bottom-color: #c0c4cc;
+}
 //分页开始
 .pages{
   display: flex;

--
Gitblit v1.9.2