zhaozp %!s(int64=3) %!d(string=hai) anos
pai
achega
5a3d728596

+ 3 - 0
src/api/project.js

@@ -94,4 +94,7 @@ export const getPrinciple = (object) => { return request({ url: "/web/longdy/get
 export const getTour = (object) => { return request({ url: "/web/longdy/getTour", data: object }) }
 // 查看表头
 export const getHead = (object) => { return request({ url: "/web/longdy/getHead", data: object }) }
+// 设备操作人
+export const getOperator = (object) => { return request({ url: "/web/longdy/getOperator", data: object }) }
+
 

+ 49 - 60
src/views/goods/addFailSafePlan.vue

@@ -62,6 +62,8 @@
               v-model="spotData.principleOne"
               placeholder="请选择责任人"
               style="width: 100%"
+              @visible-change="getPrincipleInfo(1)"
+              @change="getPrincipleData"
             >
               <el-option
                 v-for="item in principleData"
@@ -79,6 +81,8 @@
               v-model="spotData.principleTwo"
               placeholder="请选择责任人"
               style="width: 100%"
+              @visible-change="getPrincipleInfo(0)"
+              @change="getPrincipleData"
             >
               <el-option
                 v-for="item in principleData"
@@ -128,6 +132,24 @@
             </el-date-picker>
           </el-col>
         </el-row>
+        <el-row class="info-full">
+          <el-col :span="spanSIX">
+            <div class="info-style">操作人</div>
+            <el-select
+              size="medium"
+              v-model="spotData.operator"
+              placeholder="请选择操作人"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="item in operatorData"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              ></el-option>
+            </el-select>
+          </el-col>
+        </el-row>
       </el-card>
       <el-card v-for="(item, index) in procedures" :key="index">
         <div slot="header" style="font-size: 20px; display: flex">
@@ -241,6 +263,7 @@ import {
   getPrinciple,
   getTour,
   updateProofing,
+  getOperator
 } from "@/api/project";
 import { getYyMmDdTimeStamp, getNowDay } from "@/utils/datetime";
 export default {
@@ -256,7 +279,10 @@ export default {
         tourId: "",
         nos: "",
         beginDate: "",
+        operator: ""
       },
+      // 设备操作人
+      operatorData: [],
       procedures: [
         {
           flow: "",
@@ -278,6 +304,7 @@ export default {
       spanTWELVE: 12,
       // 频次
       frequencys: [
+        { id: 6, value: "每班", show: true },
         { id: 1, value: "每日", show: true },
         { id: 2, value: "每周", show: true },
         { id: 3, value: "每月", show: true },
@@ -309,6 +336,7 @@ export default {
   created() {
     this.getPrincipleData();
     this.getTourData();
+    this.getOperatorData()
     if (this.$route.query.id) {
       this.versionId = this.$route.query.id;
       this.buttonStatus = 0;
@@ -349,6 +377,21 @@ export default {
         }
       });
     },
+    getPrincipleInfo(index) {
+        if(index){
+          if(this.spotData.principleTwo){
+            this.principleData = this.principleData.filter( item => item.id !== this.spotData.principleTwo)
+          } else {
+            this.getPrincipleData()
+          }
+        } else {
+          if(this.spotData.principleOne){
+             this.principleData = this.principleData.filter( item => item.id !== this.spotData.principleOne)
+          } else {
+            this.getPrincipleData()
+          }
+        }
+    },
     // 获取巡检人
     getTourData() {
       getTour().then((res) => {
@@ -357,6 +400,12 @@ export default {
         }
       });
     },
+    // 获取设备操作人
+    getOperatorData() {
+        getOperator().then(res=> {
+          this.operatorData = res.data;
+        })
+    },
     // 提交
     submit(index) {
       this.loading = true;
@@ -431,54 +480,6 @@ export default {
       // this.frequencys.find((item) => item.id === e).show = false;
       console.log(e);
     },
-    // 添加频次
-    addFrequency() {
-      this.proofingSubReqs.push({
-        frequency: "",
-        proofingSubOpReqs: [
-          {
-            checkContent: [""],
-            manual: 1,
-            op: "",
-          },
-        ],
-        reqStartTime: "",
-        responseDayNum: "",
-        responseEndTime: "",
-      });
-    },
-    // 删除频次
-    removeFrequency(index) {
-      // this.proofingSubReqs.pop();
-      this.proofingSubReqs.splice(index, 1);
-    },
-    // 增加op
-    addOP(index) {
-      this.proofingSubReqs[index].proofingSubOpReqs.push({
-        checkContent: [""],
-        manual: 1,
-        op: "",
-      });
-    },
-    // 删除OP
-    removeOP(index, indey) {
-      // this.proofingSubReqs[index].proofingSubOpReqs.pop();
-      this.proofingSubReqs[index].proofingSubOpReqs.splice(indey, 1);
-    },
-    // 增加校验工具 [indey].children().push({ num: 1 });
-    addCheckToolsInfo(index, indey) {
-      this.proofingSubReqs[index].proofingSubOpReqs[indey].checkContent.push(
-        ""
-      );
-    },
-    // 删除校验工具
-    removeCheckToolsInfo(index, indey, indez) {
-      // this.proofingSubReqs[index].proofingSubOpReqs[indey].checkContent.pop();
-      this.proofingSubReqs[index].proofingSubOpReqs[indey].checkContent.splice(
-        indez,
-        1
-      );
-    },
     // 上传图片前
     beforeAvatarUpload(file) {
       const isLt2M = file.size / 1024 / 1024 < 10;
@@ -535,18 +536,6 @@ export default {
         // }
       });
     },
-    // 执行添加
-    addVerifyPeople(val, index) {
-      if (index) {
-        this.twoChange = true;
-      } else {
-        this.oneChange = true;
-      }
-      this.verifyPeopleList[index].userId = val;
-      this.verifyPeopleList[index].userName = this.userList.find(
-        (item) => item.id === val
-      ).name;
-    },
     // 获取当前天的下一天
     getNextDay() {
       let date = getNowDay();

+ 5 - 1
src/views/goods/failSafePlan.vue

@@ -84,7 +84,11 @@
             <span v-else-if="scope.row.frequency === 3">月</span>
             <span v-else-if="scope.row.frequency === 4">季度</span>
             <!-- <span v-else-if="scope.row.checkStatus === 3">已响应</span> -->
-            <span v-else>半年</span>
+            <span v-else-if="scope.row.frequency === 5">半年</span>
+            <span v-else>
+              <span v-if="scope.row.abclass === 1">A班</span>
+              <span v-else>B班</span>
+            </span>
           </template>
         </el-table-column>
         <el-table-column

+ 2 - 1
src/views/goods/planList.vue

@@ -307,7 +307,8 @@ export default {
       planlist(this.searchData).then((res) => {
         if (res.status === "20000") {
           this.listData = res.data.row;
-          this.pageInfo.total, (this.total = parseInt(res.data.total));
+          this.pageInfo.total =  parseInt(res.data.total)
+          this.total = parseInt(res.data.total)
           let message = JSON.parse(res.message)
           this.dxy = message[0]
            this.clz = message[1]