Преглед изворни кода

Merge branch 'master' of http://47.114.101.16:7070/ssy/newcpms

 Conflicts:
	ui/src/views/intact/gj/index.vue
zhangding пре 3 година
родитељ
комит
0b2fa8d68e
1 измењених фајлова са 55 додато и 47 уклоњено
  1. 55 47
      ui/src/views/intact/gj/index.vue

+ 55 - 47
ui/src/views/intact/gj/index.vue

@@ -673,17 +673,35 @@
       <el-table-column label="泄空方式" align="center" prop="leakageMode" :show-overflow-tooltip="true"/>、
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-           <el-button
-              type="text"
-              size="mini"
-              @click="addAprrove(scope.row,devType)"
-            >{{ $t('提交变更申请') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['intact:gj:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['intact:gj:remove']"
+          >删除</el-button>
           <el-button
             v-if="scope.row.approveTime != null"
             type="text"
-            size="small"
-            @click="hisApprove(scope.row,devType)">
-            {{ $t('申请记录') }}</el-button>
+            size="mini"
+            @click="hisApprove(scope.row,devType)"
+          > {{ $t('维修记录') }}<br>
+          </el-button>
+          <el-button
+            type="text"
+            size="mini"
+            @click="addAprrove(scope.row,devType)"
+          >{{ $t('提交维修申请') }}
+          </el-button>
+          <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
+          <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
         </template>
       </el-table-column>
     </el-table>
@@ -997,10 +1015,6 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
-
-       <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
-    <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
-
   </div>
 </template>
 
@@ -1009,23 +1023,20 @@ import { listGj, getGj, delGj, addGj, updateGj, exportGj, importTemplate} from "
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
-import AddApprove from "../approve/tapprove-add"
-import HisApprove from "../approve/tapprove-his"
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import HisApprove from "../approve/tapprove-maintenance-his";
+import AddApprove from "../approve/tapprove-maintenance-add"
 
 export default {
   name: "Gj",
-  components: { Treeselect,AddApprove,HisApprove },
+  components: { Treeselect , AddApprove, HisApprove},
   data() {
     return {
-      devType: 2,
+      devType: 3,
       // 遮罩层
       loading: true,
-       addAprroveVisible: false,
-      hisAprroveVisible: false,
       // 选中数组
       ids: [],
-      dataListSelections: [],
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -1166,6 +1177,8 @@ export default {
       },
       // 表单参数
       form: {},
+      addAprroveVisible: false,
+      hisAprroveVisible: false,
       // 表单校验
       rules: {
       }
@@ -1201,6 +1214,29 @@ export default {
     });
   },
   methods: {
+    addAprrove(row, type) {
+      var rows = row ? [row] : this.recordList.map(item => {
+        return item
+      })
+      for (let i = 0; i < rows.length; i++) {
+        if (rows[i].approveStatus != 0) {
+          this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
+            type: 'warning'
+          })
+          return
+        }
+      }
+      this.addAprroveVisible = true
+      this.$nextTick(() => {
+        this.$refs.addApprove.init(rows, type)
+      })
+    },
+    hisApprove(row, type) {
+      this.hisAprroveVisible = true
+      this.$nextTick(() => {
+        this.$refs.hisApprove.init(row, type)
+      })
+    },
     /** 查询设备完整性管件台账列表 */
     getList() {
       this.loading = true;
@@ -1466,34 +1502,6 @@ export default {
       a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
       a.click()
     },
-
-    //提交申请方法
-     addAprrove (row, type) {
-      var rows = row ? [row] : this.dataListSelections.map(item => {
-        return item
-      })
-      for (let i = 0; i <rows.length ; i++) {
-        if (rows[i].approveStatus != 0) {
-          this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
-            type: 'warning'
-          })
-          return
-        }
-      }
-      this.addAprroveVisible = true
-      console.log(rows)
-      console.log(type)
-      this.$nextTick(() => {
-        this.$refs.addApprove.init(rows, type)
-      })
-    },
-    hisApprove (row, type) {
-      this.hisAprroveVisible = true
-      
-      this.$nextTick(() => {
-        this.$refs.hisApprove.init(row, type)
-      })
-    },
   }
 };
 </script>