zxr 3 年之前
父节点
当前提交
7bdba48c75
共有 1 个文件被更改,包括 86 次插入63 次删除
  1. 86 63
      src/views/bdglregular/regularinfo/index.vue

+ 86 - 63
src/views/bdglregular/regularinfo/index.vue

@@ -180,7 +180,7 @@
           v-if="queryParams.caoZuoType == 0"
           style="background: #1d96ff"
           @click="handleAdd"
-           v-hasPermi="['bdglregular:regularinfo:jian']"
+          v-hasPermi="['bdglregular:regularinfo:jian']"
           >减分录入</el-button
         >
       </el-col>
@@ -189,7 +189,7 @@
           type="success"
           v-if="queryParams.caoZuoType == 1"
           style="background: #1d96ff"
-            v-hasPermi="['bdglregular:regularinfo:jia']"
+          v-hasPermi="['bdglregular:regularinfo:jia']"
           @click="handleAdd"
           >加分录入</el-button
         >
@@ -253,20 +253,26 @@
         </template>
       </el-table-column>
       <!-- <el-table-column label="单位检查_id" align="center" prop="unitCheckId" /> -->
-      <el-table-column label="检查单位" align="center" prop="unitCheck" width="150" />
+      <el-table-column
+        label="检查单位"
+        align="center"
+        prop="unitCheck"
+        width="150"
+      />
       <el-table-column
         label="检查时间"
         align="center"
         prop="inspectionTime"
         width="150px"
       />
-      <el-table-column width="250"  show-overflow-tooltip  label="检查地点" align="center" prop="inspectionSite" />
       <el-table-column
-        label="分值"
+        width="250"
+        show-overflow-tooltip
+        label="检查地点"
         align="center"
-       
-        prop="score"
-      >
+        prop="inspectionSite"
+      />
+      <el-table-column label="分值" align="center" prop="score">
         <template slot-scope="scope">
           <div style="color: rgb(255 106 0)" v-if="queryParams.caoZuoType == 0">
             {{ scope.row.score }}
@@ -280,7 +286,6 @@
         label="当前状态"
         align="center"
         prop="currentState"
-        
         v-if="queryParams.caoZuoType == 0"
       >
         <template slot-scope="scope">
@@ -317,7 +322,6 @@
         label="整改时间"
         align="center"
         prop="rectificationTime"
-        
         v-if="queryParams.caoZuoType == 0"
         width="150px"
       />
@@ -341,9 +345,9 @@
             type="text"
             v-if="
               scope.row.caoZuoType == '0' &&
-              scope.row.isCaoZuoDept == 0 &&
-              (scope.row.currentState == '未通过' ||
-                scope.row.currentState == '待处理')
+                scope.row.isCaoZuoDept == 0 &&
+                (scope.row.currentState == '未通过' ||
+                  scope.row.currentState == '待处理')
             "
             @click="handleUpdate(scope.row)"
             >整改</el-button
@@ -354,22 +358,25 @@
             @click="shenpifun(scope.row)"
             v-if="
               queryParams.caoZuoType == 0 &&
-              scope.row.isShenPi == 0 &&
-              scope.row.currentState == '待验收'
+                scope.row.isShenPi == 0 &&
+                scope.row.currentState == '待验收'
             "
             >审批</el-button
           >
           <!-- v-if="scope.row.unitCheckId==this.danWies" -->
           <!-- bdglregular:regularinfo:query -->
           <el-button
-            v-if="scope.row.currentState=='待处理'&&scope.row.isShenPi==0"
+            v-if="scope.row.currentState == '待处理' && scope.row.isShenPi == 0"
             size="btu"
             type="text"
             @click="handleAdds(scope.row)"
             >修改</el-button
           >
-          <el-button size="btd" type="text" @click="handleDelete(scope.row)"
-           v-if="scope.row.isShenPi==0"
+          <el-button
+            size="btd"
+            type="text"
+            @click="handleDelete(scope.row)"
+            v-if="scope.row.isShenPi == 0"
             >删除</el-button
           >
         </template>
@@ -609,9 +616,15 @@
         <el-button
           type="primary"
           @click="submitForm"
-          v-if="btnnum != 0 && btnnum != 1"
+          v-if="btnnum != 0 && btnnum != 1 && zg != 3"
           >确 定</el-button
         >
+        <el-button
+          type="primary"
+          @click="submitForm2"
+          v-if="btnnum != 0 && btnnum != 1 && zg == 3"
+          >确 定 2</el-button
+        >
         <el-button type="primary" @click="tongguofun" v-if="btnnum == 0"
           >通 过</el-button
         >
@@ -762,7 +775,7 @@ import {
   editissuccess,
   editisfalse,
   bumenlist,
-  listRegularinfos,
+  listRegularinfos
 } from "@/api/bdglregular/regularinfo";
 import { getUserProfile } from "@/api/system/user";
 export default {
@@ -812,38 +825,38 @@ export default {
         correctiveAction: null,
         pictureProof: null,
         documentProof: null,
-        caoZuoType: 0,
+        caoZuoType: 0
       },
       // 用户
-      user:{},
+      user: {},
       // danWies:0,
-      yongHu:"",
+      yongHu: "",
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         unitCheck: [
-          { required: true, message: "检查单位不能为空", trigger: "change" },
+          { required: true, message: "检查单位不能为空", trigger: "change" }
         ],
         inspectedUnit: [
-          { required: true, message: "受检单位不能为空", trigger: "change" },
+          { required: true, message: "受检单位不能为空", trigger: "change" }
         ],
         inspectionType: [
-          { required: true, message: "类型不能为空", trigger: "change" },
+          { required: true, message: "类型不能为空", trigger: "change" }
         ],
         inspectionTime: [
-          { required: true, message: "检查时间不能为空", trigger: "change" },
+          { required: true, message: "检查时间不能为空", trigger: "change" }
         ],
         inspectionSite: [
-          { required: true, message: "检查地点不能为空", trigger: "blur" },
+          { required: true, message: "检查地点不能为空", trigger: "blur" }
         ],
         score: [{ required: true, message: "分值不能为空", trigger: "blur" }],
         rectificationTime: [
-          { required: true, message: "整改时间不能为空", trigger: "change" },
+          { required: true, message: "整改时间不能为空", trigger: "change" }
         ],
         chargePeople: [
-          { required: true, message: "负责人不能为空", trigger: "change" },
-        ],
+          { required: true, message: "负责人不能为空", trigger: "change" }
+        ]
       },
       //单位
       unitId: [],
@@ -859,6 +872,7 @@ export default {
       curr: null,
       isdisabled: false,
       open1: false,
+      zg: null
     };
   },
   created() {
@@ -884,28 +898,28 @@ export default {
       correctiveAction: null,
       pictureProof: null,
       documentProof: null,
-      caoZuoType: 0,
+      caoZuoType: 0
     };
     // this.danWiess()
     //部门数据
-    getDept().then((res) => {
+    getDept().then(res => {
       if (res.code == 200) {
         this.unitId = res.data;
       }
     });
     //调动人员对象
-    listPeople().then((res) => {
+    listPeople().then(res => {
       if (res.code == 200) {
         this.peopleIds = res.rows;
       }
     });
     //检查类型
-    this.getDicts("inspectionType").then((response) => {
+    this.getDicts("inspectionType").then(response => {
       this.inspectionType = response.data;
     });
 
     if (this.$route.query.id) {
-      bumenlist(this.$route.query.id).then((res) => {
+      bumenlist(this.$route.query.id).then(res => {
         console.log(1);
         this.regularinfoList = res.rows;
         this.total = res.total;
@@ -938,10 +952,10 @@ export default {
         correctiveAction: null,
         pictureProof: null,
         documentProof: null,
-        caoZuoType: 0,
+        caoZuoType: 0
       };
       if (to.query.id) {
-        bumenlist(to.query.id).then((res) => {
+        bumenlist(to.query.id).then(res => {
           this.regularinfoList = res.rows;
           this.total = res.total;
           this.loading = false;
@@ -950,7 +964,7 @@ export default {
         this.queryParams.inspectedUnitId = to.query.obj.id + "";
         this.queryParams.currentState = to.query.obj.name + "";
 
-        listRegularinfos(this.queryParams).then((res) => {
+        listRegularinfos(this.queryParams).then(res => {
           console.log(res);
           this.regularinfoList = res.rows;
           this.total = res.total;
@@ -962,27 +976,27 @@ export default {
 
       // listRegularinfos
       // console.log(to.query.obj);
-    },
+    }
   },
   mounted() {
     console.log(0);
     // this.danWiess()
   },
   methods: {
-  danWiess(){
+    danWiess() {
       // 获取当前用户接口
-    getUserProfile().then((response) => {
-      this.user = response.data;
-      console.log(this.user)
-      // console.log(response.data.dept.deptId+"这是")
-      // if(response)
-      this.danWies = response.data.dept.deptId;
-    });
+      getUserProfile().then(response => {
+        this.user = response.data;
+        console.log(this.user);
+        // console.log(response.data.dept.deptId+"这是")
+        // if(response)
+        this.danWies = response.data.dept.deptId;
+      });
     },
     /** 查询经常性检查列表 */
     getList() {
       this.loading = true;
-      listRegularinfo(this.queryParams).then((response) => {
+      listRegularinfo(this.queryParams).then(response => {
         this.regularinfoList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -1018,7 +1032,7 @@ export default {
         correctiveAction: null,
         pictureProof: null,
         documentProof: null,
-        reasonReturn: null,
+        reasonReturn: null
       };
       this.resetForm("form");
     },
@@ -1034,7 +1048,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -1087,12 +1101,13 @@ export default {
       console.log(row);
       this.reset();
       const id = row.id || this.ids;
-      getRegularinfo(id).then((response) => {
+      getRegularinfo(id).then(response => {
         this.form = response.data;
         this.open = true;
         this.title = "修改经常性检查";
         this.jiannum = 1;
         this.btnnum = null;
+        this.zg = 3;
         if (this.form.currentState == "未通过") {
           this.currentState = 1;
           this.curr = true;
@@ -1104,7 +1119,7 @@ export default {
       this.isdisabled = true;
       this.reset();
       const id = row.id || this.ids;
-      getRegularinfo(id).then((response) => {
+      getRegularinfo(id).then(response => {
         this.form = response.data;
         this.open1 = true;
         this.title = "修改经常性检查";
@@ -1120,7 +1135,7 @@ export default {
     shenpifun(row) {
       this.reset();
       const id = row.id || this.ids;
-      getRegularinfo(id).then((response) => {
+      getRegularinfo(id).then(response => {
         this.disabled = true;
         this.form = response.data;
         this.open = true;
@@ -1131,7 +1146,7 @@ export default {
     },
     //通过
     tongguofun() {
-      editissuccess(this.form).then((res) => {
+      editissuccess(this.form).then(res => {
         if (res.code == 200) {
           this.$modal.msgSuccess("审批成功");
           this.open = false;
@@ -1155,16 +1170,24 @@ export default {
     },
     //未通过提交
     weitongguofun() {
-      editisfalse(this.form).then((res) => {
+      editisfalse(this.form).then(res => {
         this.$modal.msgSuccess("操作成功");
         this.open = false;
         this.getList();
       });
     },
+    submitForm2() {
+      editquestion(this.form).then(response => {
+        this.$modal.msgSuccess("整改成功");
+        this.open = false;
+        this.open1 = false;
+        this.getList();
+      });
+    },
     /** 提交按钮 */
     submitForm() {
       // console.log(this.form)
-      this.$refs["form"].validate((valid) => {
+      this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.documentProof) {
             this.form.documentProof = this.form.documentProof[0].url;
@@ -1172,7 +1195,7 @@ export default {
 
           if (this.form.id != null) {
             this.form.caoZuoType = this.queryParams.caoZuoType;
-            updateRegularinfo(this.form).then((response) => {
+            updateRegularinfo(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.open1 = false;
@@ -1180,7 +1203,7 @@ export default {
             });
           } else {
             this.form.caoZuoType = this.queryParams.caoZuoType;
-            addRegularinfo(this.form).then((response) => {
+            addRegularinfo(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.open1 = false;
@@ -1195,7 +1218,7 @@ export default {
       const ids = row.id || this.ids;
       this.$modal
         .confirm("是否确认删除经常性检查的数据项?")
-        .then(function () {
+        .then(function() {
           return delRegularinfo(ids);
         })
         .then(() => {
@@ -1213,7 +1236,7 @@ export default {
           this.exportLoading = true;
           return exportRegularinfo(queryParams);
         })
-        .then((response) => {
+        .then(response => {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
@@ -1242,8 +1265,8 @@ export default {
       if (this.form.score < 0) {
         this.form.score = null;
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style scoped>