forked from xxhjsb/hbt-prevention-ui
fit:修复bug
parent
9c140b1bd3
commit
aaa9fc1633
|
|
@ -222,26 +222,30 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
format: "areaName",
|
format: "areaName",
|
||||||
type: "select",
|
type: "select",
|
||||||
require: true,
|
require: true,
|
||||||
datas:this.areaList
|
datas: this.areaList,
|
||||||
|
showError:false,
|
||||||
}, {
|
}, {
|
||||||
name: "区域编号",
|
name: "区域编号",
|
||||||
key: "areaNo",
|
key: "areaNo",
|
||||||
type: "text",
|
type: "text",
|
||||||
disable: true,
|
disable: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
}, {
|
}, {
|
||||||
name: "单元编号",
|
name: "单元编号",
|
||||||
key: "number",
|
key: "number",
|
||||||
type: "text",
|
type: "text",
|
||||||
disable: true,
|
disable: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true
|
require: true,
|
||||||
|
showError:false,
|
||||||
}, {
|
}, {
|
||||||
name: "单元名称",
|
name: "单元名称",
|
||||||
key: "name",
|
key: "name",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true
|
require: true,
|
||||||
|
showError:false,
|
||||||
}, {
|
}, {
|
||||||
name: "责任部门",
|
name: "责任部门",
|
||||||
key: "chargeDeptId",
|
key: "chargeDeptId",
|
||||||
|
|
@ -259,7 +263,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "select",
|
type: "select",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
datas:this.$store.state.userList
|
datas: this.$store.state.userList,
|
||||||
|
showError:false,
|
||||||
}, {
|
}, {
|
||||||
type: "btn",
|
type: "btn",
|
||||||
name: "单元绘制",
|
name: "单元绘制",
|
||||||
|
|
@ -290,6 +295,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "select",
|
type: "select",
|
||||||
disable: this.currentId != -1,
|
disable: this.currentId != -1,
|
||||||
require: true,
|
require: true,
|
||||||
|
showError:false,
|
||||||
datas: [{
|
datas: [{
|
||||||
name: "启用",
|
name: "启用",
|
||||||
value: 1,
|
value: 1,
|
||||||
|
|
@ -349,7 +355,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.tableColumn.push({ name: '风险分析单元', key: "name" });
|
this.tableColumn.push({ name: '风险分析单元', key: "name" });
|
||||||
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
|
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
|
||||||
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
|
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
|
||||||
this.tableColumn.push({name:'绘制情况',filters:this.filters,filterMethod:(data,row)=>{
|
this.tableColumn.push({
|
||||||
|
name: '绘制情况', filters: this.filters, filterMethod: (data, row) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
return row.geoJson && row.geoJson !== "[]"
|
return row.geoJson && row.geoJson !== "[]"
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -359,9 +366,10 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (data.geoJson === '[]' || !data.geoJson) {
|
if (data.geoJson === '[]' || !data.geoJson) {
|
||||||
return "<span class='noDraw'>未绘制</span>"
|
return "<span class='noDraw'>未绘制</span>"
|
||||||
} else {
|
} else {
|
||||||
return "<span>已绘制</span>"
|
return "<span class='color_1'>已绘制</span>"
|
||||||
}
|
}
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.repairTableColumn.push({ name: "序号", key: "index" });
|
this.repairTableColumn.push({ name: "序号", key: "index" });
|
||||||
this.repairTableColumn.push({ name: "停用开始时间", key: "startTime" });
|
this.repairTableColumn.push({ name: "停用开始时间", key: "startTime" });
|
||||||
|
|
@ -386,7 +394,6 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public doDraw() {
|
public doDraw() {
|
||||||
console.log("openDraw")
|
|
||||||
if (!this.updateParams.name) {
|
if (!this.updateParams.name) {
|
||||||
this.$message.error("请先输入单元名称");
|
this.$message.error("请先输入单元名称");
|
||||||
return
|
return
|
||||||
|
|
@ -482,17 +489,21 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
} else {
|
} else {
|
||||||
this.currentId = data.id;
|
this.currentId = data.id;
|
||||||
|
|
||||||
this.updateParams = Object.assign({ areaName: this.areaList.find(item => item.value === data.areaId)?.name, bottomHeight: 0, topHeight: 0, status: 1, geoJson: "[]", number: null, statusName: ["停用", "启用"][data.status] }, data);
|
this.updateParams = Object.assign({ areaName: this.areaList.find(item => item.value === data.areaId)?.name, bottomHeight: 0, topHeight: 0, status: 1, geoJson: "[]", number: null, statusName: ["停用", "启用"][data.status] }, data);
|
||||||
|
this.tableService.getUnitDetail({ unitId: data.id }).then((res: any) => {
|
||||||
|
this.updateParams.repairs = res.data;
|
||||||
if (isRead) {
|
if (isRead) {
|
||||||
this.repairTableData.datas = this.updateParams.repairs.map((item, i) => {
|
this.repairTableData.datas = this.updateParams.repairs.map((item, i) => {
|
||||||
item.index = i + 1;
|
item.index = i + 1;
|
||||||
return item
|
return item
|
||||||
}) || []
|
}) || []
|
||||||
}
|
}
|
||||||
|
})
|
||||||
this.isReadonly = !!isRead;
|
this.isReadonly = !!isRead;
|
||||||
this.buildFormOptions();
|
|
||||||
}
|
}
|
||||||
this.showUpdate = true
|
this.showUpdate = true;
|
||||||
|
this.buildFormOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue