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",
|
||||
type: "select",
|
||||
require: true,
|
||||
datas:this.areaList
|
||||
datas: this.areaList,
|
||||
showError:false,
|
||||
}, {
|
||||
name: "区域编号",
|
||||
key: "areaNo",
|
||||
type: "text",
|
||||
disable: true,
|
||||
width: "calc(50% - 20px)",
|
||||
showError:false,
|
||||
}, {
|
||||
name: "单元编号",
|
||||
key: "number",
|
||||
type: "text",
|
||||
disable: true,
|
||||
width: "calc(50% - 20px)",
|
||||
require:true
|
||||
require: true,
|
||||
showError:false,
|
||||
}, {
|
||||
name: "单元名称",
|
||||
key: "name",
|
||||
type: "text",
|
||||
width: "calc(50% - 20px)",
|
||||
require:true
|
||||
require: true,
|
||||
showError:false,
|
||||
}, {
|
||||
name: "责任部门",
|
||||
key: "chargeDeptId",
|
||||
|
|
@ -259,7 +263,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
datas:this.$store.state.userList
|
||||
datas: this.$store.state.userList,
|
||||
showError:false,
|
||||
}, {
|
||||
type: "btn",
|
||||
name: "单元绘制",
|
||||
|
|
@ -290,6 +295,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
type: "select",
|
||||
disable: this.currentId != -1,
|
||||
require: true,
|
||||
showError:false,
|
||||
datas: [{
|
||||
name: "启用",
|
||||
value: 1,
|
||||
|
|
@ -349,7 +355,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({ name: '风险分析单元', key: "name" });
|
||||
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
|
||||
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) {
|
||||
return row.geoJson && row.geoJson !== "[]"
|
||||
} else {
|
||||
|
|
@ -359,9 +366,10 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
if (data.geoJson === '[]' || !data.geoJson) {
|
||||
return "<span class='noDraw'>未绘制</span>"
|
||||
} else {
|
||||
return "<span>已绘制</span>"
|
||||
return "<span class='color_1'>已绘制</span>"
|
||||
}
|
||||
}});
|
||||
}
|
||||
});
|
||||
|
||||
this.repairTableColumn.push({ name: "序号", key: "index" });
|
||||
this.repairTableColumn.push({ name: "停用开始时间", key: "startTime" });
|
||||
|
|
@ -386,7 +394,6 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
|
||||
public doDraw() {
|
||||
console.log("openDraw")
|
||||
if (!this.updateParams.name) {
|
||||
this.$message.error("请先输入单元名称");
|
||||
return
|
||||
|
|
@ -482,17 +489,21 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
this.showUpdate = true
|
||||
} else {
|
||||
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.tableService.getUnitDetail({ unitId: data.id }).then((res: any) => {
|
||||
this.updateParams.repairs = res.data;
|
||||
if (isRead) {
|
||||
this.repairTableData.datas = this.updateParams.repairs.map((item, i) => {
|
||||
item.index = i + 1;
|
||||
return item
|
||||
}) || []
|
||||
}
|
||||
})
|
||||
this.isReadonly = !!isRead;
|
||||
this.buildFormOptions();
|
||||
}
|
||||
this.showUpdate = true
|
||||
this.showUpdate = true;
|
||||
this.buildFormOptions();
|
||||
}
|
||||
|
||||
public handleClose() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue