|
|
@@ -230,7 +230,13 @@
|
|
|
<el-table-column prop="itemName" label="检查项"> </el-table-column>
|
|
|
<el-table-column prop="pointName" label="检查内容"> </el-table-column>
|
|
|
<el-table-column prop="areaName" label="检查区域"> </el-table-column>
|
|
|
- <el-table-column prop="areaName" label="数据来源"> </el-table-column>
|
|
|
+ <el-table-column prop="businessType" label="数据来源">
|
|
|
+ <template slot-scope="r">
|
|
|
+ {{
|
|
|
+ getLabel(dict.type.point_data_source, `${r.row.businessType}`)
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="areaName" label="操作">
|
|
|
<template v-slot="{ row }">
|
|
|
<el-button type="text" @click="removeRow(row)">删除</el-button>
|
|
|
@@ -262,9 +268,10 @@ import korgTree from "@/components/k-orgTree";
|
|
|
import * as api from "@/api/safetycheck/plan";
|
|
|
import { statusOptions } from "@/views/commonOption";
|
|
|
import { findAllRole } from "@/api/system/role";
|
|
|
+import { getLabel } from "@/views/commonOption";
|
|
|
import DialogSelect from "@/views/safetycheck/ruleManager/dialog.select.point.vue";
|
|
|
export default {
|
|
|
- dicts: ["sys_org_type", "check_type", "check_cycle", "check_status"],
|
|
|
+ dicts: ["sys_org_type", "check_type", "check_cycle", "check_status","point_data_source"],
|
|
|
data() {
|
|
|
// const params = this.$route.params;
|
|
|
// let o1=options;
|
|
|
@@ -284,41 +291,6 @@ export default {
|
|
|
count: 0,
|
|
|
description: null,
|
|
|
propItem: "",
|
|
|
- propList: [
|
|
|
- {
|
|
|
- label: "是否扫描",
|
|
|
- prop: "pointScan",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "itemId",
|
|
|
- prop: "itemId",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "必须履职",
|
|
|
- prop: "required",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "履职内容库",
|
|
|
- prop: "pointName",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "履职项",
|
|
|
- prop: "itemName",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "履职内容",
|
|
|
- prop: "itemDesc",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "履职区域",
|
|
|
- prop: "areaName",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "操作",
|
|
|
- prop: "lc-component",
|
|
|
- component: "el-button",
|
|
|
- },
|
|
|
- ],
|
|
|
row: "",
|
|
|
tableData: [],
|
|
|
deptOptions: [],
|
|
|
@@ -351,6 +323,9 @@ export default {
|
|
|
...mapGetters(["orgId", "orgName"]),
|
|
|
},
|
|
|
methods: {
|
|
|
+ getLabel(options, value) {
|
|
|
+ return getLabel(options, value);
|
|
|
+ },
|
|
|
cleanExecOrgList() {
|
|
|
this.execOrgIds = null;
|
|
|
this.formData.execOrgList = [];
|
|
|
@@ -370,15 +345,13 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
handleCheckboxChange() {
|
|
|
- this.formData.buildTaskNow = !this.formData.buildTaskNow;
|
|
|
+ console.log(this.formData.buildTaskNow,"this.formData.buildTaskNow");
|
|
|
},
|
|
|
onexecOrgSelect(node) {
|
|
|
this.formData.execOrgIds = node.val;
|
|
|
- // console.log(node, "onexecOrgSelect");
|
|
|
},
|
|
|
oncheckOrgSelect(node) {
|
|
|
this.formData.checkOrg = node.id;
|
|
|
- // console.log(node, "oncheckOrgSelect");
|
|
|
},
|
|
|
reset() {
|
|
|
return {
|
|
|
@@ -411,22 +384,23 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
getRolesByOrg() {
|
|
|
- // console.log("开始获取角色")
|
|
|
let params = {
|
|
|
orgType: null,
|
|
|
};
|
|
|
findAllRole(params).then((res) => {
|
|
|
- // console.info(res);
|
|
|
this.planRoles = res.data;
|
|
|
});
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
- // console.log(value);
|
|
|
this.count = value;
|
|
|
},
|
|
|
async refresh(id, other) {
|
|
|
- this.formData = id ? (await api.get(id)).data : this.reset(other);
|
|
|
- if (this.formData.execOrgType) {
|
|
|
+ if(id!=null&&id!=undefined){
|
|
|
+ await api.get(id).then(res=>{
|
|
|
+ this.formData =res.data;
|
|
|
+ this.formData.buildTaskNow
|
|
|
+ this.tableData = res.data.rulePointList;
|
|
|
+ if (this.formData.execOrgType) {
|
|
|
this.formData.roleIds = this.formData.roleList.map((role) => role.id);
|
|
|
this.formData.execOrgIds = this.formData.execOrgList.map(
|
|
|
(org) => org.id
|
|
|
@@ -436,9 +410,38 @@ export default {
|
|
|
);
|
|
|
this.getRolesByOrg();
|
|
|
}
|
|
|
+ })
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.formData.planName= null;
|
|
|
+ this.formData.planType= null;
|
|
|
+ this.formData.planCycle= null;
|
|
|
+ this.formData.planStatus= null;
|
|
|
+ this.formData.execOrgType= null;
|
|
|
+ this.formData.roleNames= null;
|
|
|
+ this.formData.count= null;
|
|
|
+ this.formData.description= null;
|
|
|
+ this.formData.tableData= null;
|
|
|
+ this.formData.itemList= null;
|
|
|
+ this.formData.planExec= null;
|
|
|
+ this.formData.count= 0;
|
|
|
+ this.formData.note= null;
|
|
|
+ this.formData.planCreateOrgId= null;
|
|
|
+ this.formData.planCreateOrgName= null;
|
|
|
+ this.formData.roleList= null;
|
|
|
+ this.formData.roleIds= null;
|
|
|
+ this.formData.execOrg= null;
|
|
|
+ this.formData.checkOrg= null;
|
|
|
+ this.formData.buildTaskNow= false;
|
|
|
+ this.formData.checkOrgList= [];
|
|
|
+ this.formData.execOrgList= [];
|
|
|
+ this.formData.rulePointList= null;
|
|
|
+ this.formData.checkOrgIds= null;
|
|
|
+ this.formData.execOrgIds= null;
|
|
|
+ this.formData.rulePointIds= null;
|
|
|
+ }
|
|
|
},
|
|
|
onSelect(selectList) {
|
|
|
- console.log(selectList);
|
|
|
for (let i = 0; i < selectList.length; i++) {
|
|
|
let tem = {
|
|
|
pointScan: !selectList[i].pointScan,
|
|
|
@@ -449,6 +452,7 @@ export default {
|
|
|
areaName: selectList[i].areaName,
|
|
|
itemId: selectList[i].itemId,
|
|
|
id: selectList[i].id,
|
|
|
+ businessType:selectList[i].businessType,
|
|
|
};
|
|
|
if (this.tableData == null) {
|
|
|
this.tableData = [];
|
|
|
@@ -464,19 +468,11 @@ export default {
|
|
|
this.tableData = null;
|
|
|
this.formData.itemList = {};
|
|
|
await this.refresh(id, other);
|
|
|
- console.log(id);
|
|
|
- if (id !== undefined) {
|
|
|
- await api.get(id).then((res) => {
|
|
|
- // console.log(res);
|
|
|
- this.tableData = res.data.rulePointList;
|
|
|
- });
|
|
|
- }
|
|
|
this.getRolesByOrg();
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
removeRow(row) {
|
|
|
this.tableData = this.tableData.filter((item) => item !== row);
|
|
|
- // this.tableData.splice(index, 1);
|
|
|
},
|
|
|
// 事件
|
|
|
onHide() {
|
|
|
@@ -505,7 +501,7 @@ export default {
|
|
|
// console.log(this.selectedValues,"selectedValues");
|
|
|
this.formData.roleIds =
|
|
|
this.selectedValues.length == 0 ? null : this.selectedValues;
|
|
|
- this.formData.buildTaskNow = this.formData.buildTaskNow ? 1 : 0;
|
|
|
+ // this.formData.buildTaskNow = this.formData.buildTaskNow ? 1 : 0;
|
|
|
// if (this.id == undefined) {
|
|
|
await api.add(this.formData);
|
|
|
// } else {
|