forked from xxhjsb/hbt-prevention-ui
feat:新增停用检修记录列表
parent
564ce831e2
commit
6cb7a20083
|
@ -46,13 +46,20 @@
|
|||
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="callback"
|
||||
btn-position="center">
|
||||
<span class="tips" v-if="currentId===-1 && isArea">*注:安全风险分析对象编码即危险化学品登记综合服务系统中的危险源编码</span>
|
||||
|
||||
|
||||
<div class="sub-title" v-if="!isArea && isReadonly">停用/检修记录</div>
|
||||
|
||||
<TableComponent v-if="!isArea && isReadonly" :tableData="repairTableData" :tableColumn="repairTableColumn"
|
||||
@actionCallback="callback($event)" :actions="subTableActions" actionPosition="flex-start"
|
||||
:showFooter="false" style="margin-bottom: 20px;">
|
||||
</TableComponent>
|
||||
</FormComponent>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="'查看二维码'" :visible.sync="showQrCode" >
|
||||
|
||||
<img :src="qrUrl" style="width: 100%;" alt="">
|
||||
</el-dialog>
|
||||
<el-dialog :close-on-click-modal="false" v-if="!isArea" width="500px" :title="'停用/恢复登记'" :visible.sync="showTurnOff" >
|
||||
|
|
|
@ -28,6 +28,10 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public isArea = false;
|
||||
|
||||
public repairTableData = {datas:[]};
|
||||
|
||||
public repairTableColumn = [] as any;
|
||||
|
||||
|
||||
public filters = [{
|
||||
text:"未绘制",
|
||||
|
@ -277,6 +281,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
name:"停用/检修状态",
|
||||
key:"status",
|
||||
width:"calc(50% - 20px)",
|
||||
format:"statusName",
|
||||
type:"select",
|
||||
require:true,
|
||||
datas:[{
|
||||
|
@ -351,6 +356,13 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
return "<span>已绘制</span>"
|
||||
}
|
||||
}});
|
||||
|
||||
this.repairTableColumn.push({name:"序号",key:"index"});
|
||||
this.repairTableColumn.push({name:"停用开始时间",key:"startTime"});
|
||||
this.repairTableColumn.push({name:"停用开始时间",key:"endTime"});
|
||||
this.repairTableColumn.push({name:"原因",key:"reason"});
|
||||
this.repairTableColumn.push({name:"登记人",key:"registerUserName"});
|
||||
this.repairTableColumn.push({name:"登记时间",key:"registerTime"});
|
||||
}
|
||||
|
||||
public getAreaList(){
|
||||
|
@ -458,7 +470,13 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
this.showUpdate = true
|
||||
}else{
|
||||
this.currentId = data.id;
|
||||
this.updateParams = Object.assign({bottomHeight:0,topHeight:0,status:1,geoJson:"[]",number:null},data);
|
||||
this.updateParams = Object.assign({bottomHeight:0,topHeight:0,status:1,geoJson:"[]",number:null,statusName:["停用","启用"][data.status]},data);
|
||||
if(isRead){
|
||||
this.repairTableData.datas = this.updateParams.repairs.map((item,i)=>{
|
||||
item.index = i;
|
||||
return item
|
||||
}) || []
|
||||
}
|
||||
this.isReadonly = !!isRead;
|
||||
this.buildFormOptions();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue