feat:新增安全检查计划

kongyeqing
吴延福 2023-06-21 16:35:33 +08:00
parent 088c113af0
commit d76d951c2f
14 changed files with 335 additions and 249 deletions

View File

@ -7,7 +7,7 @@ VUE_APP_GATEWAY_URL="/dev-api"
# 服务地址 # 服务地址
VUE_APP_BASE_API_URL="http://192.168.2.187:8081" VUE_APP_BASE_API_URL="http://192.168.2.187:8081"
# 服务前-- 请严格遵守格式 不允许换行 # 服务前-- 请严格遵守格式 不允许换行
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-zy"}' VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-yx"}'
# 是否显示全部菜单 # 是否显示全部菜单
VUE_APP_ALL_MENU = false VUE_APP_ALL_MENU = false
# 微前端地址 # 微前端地址

View File

@ -1,5 +1,5 @@
{ {
"name": "test", "name": "prevention",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -37,8 +37,17 @@ export default class PlanService extends BaseService<any>{
} }
} }
public getRecordTabList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/danger/task/table';
return this.get(url,params,true)
}
public getRecordList(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public getRecordList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/danger/record/list'; const url = this.prefix.prevention+'/danger/task/inspect';
return this.get(url,params,true)
}
public getTroubleList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/danger/trouble/list';
return this.get(url,params,true) return this.get(url,params,true)
} }
} }

View File

@ -34,4 +34,18 @@ export default class TaskService extends BaseService<any>{
return this.put(url,params,{},showLoading) return this.put(url,params,{},showLoading)
} }
} }
}
public getRecordTabList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/danger/task/table';
return this.get(url,params,true)
}
public getRecordList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/danger/task/inspect';
return this.get(url,params,true)
}
public getTroubleList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/danger/trouble/list';
return this.get(url,params,true)
}
}

View File

@ -13,6 +13,7 @@ import NoteService from '@/service/note.service';
import UnitService from '@/service/unit.service'; import UnitService from '@/service/unit.service';
import MapComponent from "@/components/map.component.vue" import MapComponent from "@/components/map.component.vue"
import mapboxgl from "mapbox-gl"; import mapboxgl from "mapbox-gl";
import moment from 'moment';
@Component({ @Component({
template, template,
components:{ components:{
@ -44,7 +45,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
public tableActionWidth = "150px"; public tableActionWidth = "150px";
public isReadonly = false; public isReadonly = false;
public account = JSON.parse(localStorage.getItem("account") as string);
public showMap = false; public showMap = false;
public center = [118.751353,31.969568]; public center = [118.751353,31.969568];
public marker:any; public marker:any;
@ -268,8 +269,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
showError:false, showError:false,
unit:{ unit:{
type:"btn", type:"btn",
hide:this.isReadonly, name:this.isReadonly?"查看定位":"点击定位",
name:"点击定位",
value:"fixed", value:"fixed",
btnType:"primary" btnType:"primary"
} }
@ -369,7 +369,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
key:"violateNumber", key:"violateNumber",
type:"number", type:"number",
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
require:true,
showError:false, showError:false,
},{ },{
name:"专业分类", name:"专业分类",
@ -386,7 +385,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
format:"occurNodeName", format:"occurNodeName",
type:"select", type:"select",
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
require:true,
showError:false, showError:false,
datas:this.$store.state.prevention_occur_step, datas:this.$store.state.prevention_occur_step,
},{ },{
@ -394,14 +392,12 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
key:"violateTerm", key:"violateTerm",
type:"textarea", type:"textarea",
width:"100%", width:"100%",
require:true,
showError:false, showError:false,
},{ },{
name:"隐患整改要求", name:"隐患整改要求",
key:"reformDemand", key:"reformDemand",
type:"textarea", type:"textarea",
width:"100%", width:"100%",
require:true,
showError:false, showError:false,
}] }]
} }
@ -421,9 +417,10 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
} }
public addMarker(){ public addMarker(){
this.marker = new mapboxgl.Marker({draggable:true}) this.marker = new mapboxgl.Marker({draggable:!this.isReadonly})
.setLngLat(this.center) .setLngLat(this.center)
.addTo(this.map); .addTo(this.map);
this.map.flyTo({center:this.center})
} }
public change(data,item){ public change(data,item){
@ -485,7 +482,15 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
this.isReadonly = !!isRead; this.isReadonly = !!isRead;
this.fileList = []; this.fileList = [];
this.photoList = []; this.photoList = [];
this.updateParams = {type:"随手拍",locationName:"",number:null,photo:1} this.updateParams = {
type:"随手拍",
locationName:"",
inspectUserId:this.account.userId,
inspectUserName:this.account.nickName,
number:null,
photo:1,
inspectTime:moment().format("YYYY-MM-DD HH:mm")
}
if(!row){ if(!row){
this.tableService.getNumber().then(res=>{ this.tableService.getNumber().then(res=>{
@ -512,6 +517,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
},res.data) },res.data)
// //
this.center = [res.data.locationLng,res.data.locationLat]; this.center = [res.data.locationLng,res.data.locationLat];
this.buildUpdateForm()
// url // url
this.tableService.getFileUrls({ids:res.data.resourceId.split(",")}).then((photos:any)=>{ this.tableService.getFileUrls({ids:res.data.resourceId.split(",")}).then((photos:any)=>{
@ -545,7 +551,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
const lngLat = this.marker.getLngLat(); const lngLat = this.marker.getLngLat();
this.updateParams.locationLng = lngLat.lng; this.updateParams.locationLng = lngLat.lng;
this.updateParams.locationLat = lngLat.lat; this.updateParams.locationLat = lngLat.lat;
this.updateParams.locationName = lngLat.lng+","+lngLat.lat; this.center = [lngLat.lng,lngLat.lat]
// this.updateParams.locationName = lngLat.lng+","+lngLat.lat;
this.handleClose() this.handleClose()
} }

View File

@ -32,10 +32,10 @@
<el-button type="text" v-if="isBase" @click="showUpdateModel(scope.row)">修改</el-button> <el-button type="text" v-if="isBase" @click="showUpdateModel(scope.row)">修改</el-button>
<el-button type="text" v-if="isBase" @click="deleteData([scope.row.id])">删除</el-button> <el-button type="text" v-if="isBase" @click="deleteData([scope.row.id])">删除</el-button>
<el-button type="text" v-if="isPlan && !scope.row.status" @click="openSendModel(scope.row)">下发</el-button> <el-button type="text" v-if="isPlan && !scope.row.status" @click="openSendModel(scope.row)">下发</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType && !scope.row.state" @click="openSendModel(scope.row)">启用</el-button> <el-button type="text" v-if="isPlan && scope.row.planType===2 && !scope.row.state" @click="changeState(scope.row)">启用</el-button>
<el-button type="text" v-if="isPlan && scope.row.planType && scope.row.state" @click="openSendModel(scope.row)">停用</el-button> <el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state" @click="changeState(scope.row)">停用</el-button>
<el-button type="text" v-if="isPlan" @click="openRecordModel(scope.row)">检查情况</el-button> <el-button type="text" v-if="isPlan" @click="openRecordModel(scope.row)">检查情况</el-button>
<el-button type="text" v-if="isAction && scope.row.status!==2" @click="showUpdateModel(0)">检查</el-button> <el-button type="text" v-if="isAction && scope.row.status!==2" @click="openRecordModel(scope.row)">检查</el-button>
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">抄送</el-button> <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">抄送</el-button>
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">移交</el-button> <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">移交</el-button>
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">中断</el-button> <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">中断</el-button>
@ -59,14 +59,14 @@
<!-- 下发 --> <!-- 下发 -->
<el-dialog v-if="isPlan" :close-on-click-modal="false" title="下发" :visible.sync="showSend" width="980px" <el-dialog v-if="isPlan" :close-on-click-modal="false" title="下发" :visible.sync="showSend" width="980px"
:before-close="handleClose"> :before-close="handleClose">
<FormComponent :options="sendOptions" labelAlign="right" :data.sync="sendParams" @change="change" :fullBtn="true" btn-position="center" @actionCallback="sendCallback" :actions="updateActions"> <FormComponent :options="sendOptions" :data.sync="sendParams" @change="change" :fullBtn="true" btn-position="center" @actionCallback="sendCallback" :actions="updateActions">
<div class="full"> <div class="full" style="margin-bottom: 20px;">
<el-radio-group size="medium" v-model="currentTableId" @change="tabChange"> <el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
<el-radio-button :label="item.id" v-for="item in sendTables" :key="item.id">{{item.name}}</el-radio-button> <el-radio-button :label="item.id" v-for="item in tableTabs" :key="item.id">{{item.name}}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="full" style="margin-bottom: 20px;"> <div class="full" style="margin-bottom: 20px;">
<el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" width="100%" style="min-height:400px;"> <el-table :data="currentTable.tableItems" tooltip-effect="dark" border height="100%" width="100%" style="min-height:400px;">
<el-table-column label="序号" width="60"> <el-table-column label="序号" width="60">
<div slot-scope="scope">{{scope.$index+1}}</div> <div slot-scope="scope">{{scope.$index+1}}</div>
</el-table-column> </el-table-column>
@ -84,7 +84,7 @@
</el-table-column> </el-table-column>
<el-table-column label="选择执行人"> <el-table-column label="选择执行人">
<div slot-scope="scope"> <div slot-scope="scope">
<el-select v-model="scope.row.scopeId" filterable placeholder="请选择"> <el-select v-model="scope.row.userList" multiple filterable placeholder="请选择">
<el-option <el-option
v-for="item in $store.state.userList" v-for="item in $store.state.userList"
:key="item.value" :key="item.value"
@ -109,52 +109,54 @@
</el-dialog> </el-dialog>
<!-- 检查表记录 --> <!-- 检查表记录 -->
<el-dialog v-if="isPlan" :close-on-click-modal="false" title="检查表记录" :visible.sync="showRecord" width="980px" <el-dialog v-if="isPlan || isAction" :close-on-click-modal="false" :title="isPlan?'检查表记录':'检查表'" :visible.sync="showRecord" width="980px"
:before-close="handleClose"> :before-close="handleClose">
<div class="full"> <div class="full">
<el-radio-group size="medium" v-model="currentTableId" @change="tabChange"> <el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
<el-radio-button :label="item.id" v-for="item in sendTables" :key="item.id">{{item.name}}</el-radio-button> <el-radio-button :label="item.id" v-for="item in tableTabs" :key="item.id">{{item.name}}</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="full" style="margin-bottom: 20px;"> <div class="full" style="margin: 20px 0;">
<el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" width="100%" style="min-height:250px;"> <el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" border width="100%" style="min-height:250px;">
<el-table-column label="序号" width="60"> <el-table-column label="序号" width="60">
<div slot-scope="scope">{{scope.$index+1}}</div> <div slot-scope="scope">{{scope.$index+1}}</div>
</el-table-column> </el-table-column>
<el-table-column label="检查项目" :show-overflow-tooltip="true"> <el-table-column label="检查项目" :show-overflow-tooltip="true">
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.name}}</div> <div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.itemName}}</div>
<el-input type="text" v-else v-model="scope.row.name"></el-input> <el-input type="text" v-else v-model="scope.row.name"></el-input>
</el-table-column> </el-table-column>
<el-table-column label="检查内容" :show-overflow-tooltip="true"> <el-table-column label="检查内容" :show-overflow-tooltip="true">
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.content}}</div> <div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.itemContent}}</div>
<el-input type="textarea" v-else v-model="scope.row.content"></el-input> <el-input type="textarea" v-else v-model="scope.row.content"></el-input>
</el-table-column> </el-table-column>
<el-table-column label="检查依据" :show-overflow-tooltip="true"> <el-table-column label="检查依据" :show-overflow-tooltip="true">
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.reason}}</div> <div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.itemReason}}</div>
<el-input type="textarea" v-else v-model="scope.row.reason"></el-input> <el-input type="textarea" v-else v-model="scope.row.reason"></el-input>
</el-table-column> </el-table-column>
<el-table-column label="检查人"> <el-table-column label="检查人">
<div slot-scope="scope"></div> <div slot-scope="scope">{{scope.row.itemExecuteNames}}</div>
</el-table-column> </el-table-column>
<el-table-column label="检查结果"> <el-table-column label="检查结果" width="160px">
<div slot-scope="scope"></div> <div slot-scope="scope">
<el-radio-group v-model="scope.row.itemResult">
<el-radio :label="1">正常</el-radio>
<el-radio :label="0">异常</el-radio>
</el-radio-group>
</div>
</el-table-column> </el-table-column>
<el-table-column label="检查记录"> <el-table-column label="检查记录" width="280px">
<div slot-scope="scope"></div> <div slot-scope="scope">
<el-input type="textarea" v-model="scope.row.itemRecord"></el-input>
</div>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="full" style="text-align: right;">
<el-pagination
background
:current-page.sync="recordParams.pageNum"
@current-change="getRecordData"
layout="prev, pager, next"
:total="tableData.totalRecords">
</el-pagination>
</div>
<div class="sub-title">隐患登记情况</div> <div class="sub-title">隐患登记情况</div>
<div class="full" v-if="isAction">
<el-button type="success" plain icon="el-icon-plus">添加</el-button>
<el-button type="danger" plain icon="el-icon-delete">批量删除</el-button>
</div>
<div class="full" style="margin-bottom: 20px;"> <div class="full" style="margin-bottom: 20px;">
<el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" width="100%" style="min-height:250px;"> <el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" width="100%" style="min-height:250px;">
@ -186,17 +188,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="full" style="text-align: right;">
<el-pagination
background
:page-size.sync="tableData.pageSize"
:current-page.sync="tableData.pageNum"
@size-change="pageSizeChange"
@current-change="pageNumberChange"
layout="prev, pager, next"
:total="tableData.totalRecords">
</el-pagination>
</div>
</el-dialog> </el-dialog>
<el-dialog v-if="showMap" :close-on-click-modal="false" destroy-on-close title="地图定位" :visible.sync="showMap" width="980px" <el-dialog v-if="showMap" :close-on-click-modal="false" destroy-on-close title="地图定位" :visible.sync="showMap" width="980px"

View File

@ -53,7 +53,7 @@
<el-table ref="multipleTable" :data="updateParams.tableItems" tooltip-effect="dark" height="100%" border <el-table ref="multipleTable" :data="updateParams.tableItems" tooltip-effect="dark" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;"> @selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
<el-table-column type="selection" label="全选" width="60" v-if="!isReadonly"> <el-table-column type="selection" label="全选" width="40" v-if="!isReadonly">
</el-table-column> </el-table-column>
<template v-for="item in updateTableColumn"> <template v-for="item in updateTableColumn">
<el-table-column v-if="item.render" :filters="item.filters" <el-table-column v-if="item.render" :filters="item.filters"
@ -89,12 +89,13 @@
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="'批量添加'" :visible.sync="showSubMutilUpdate" <el-dialog v-if="isManager" :close-on-click-modal="false" :title="'批量添加'" :visible.sync="showSubMutilUpdate"
:before-close="handleClose"> :before-close="handleClose">
<FormComponent :options="mutilAddOptions" @change="loadRuleTable" :data.sync="ruleParams"></FormComponent>
<TableComponent :tableData="updateTableData" :tableColumn="updateTableColumn" @pageNumberChange="loadRuleTable($event,'pageNum')" @pageSizeChange="loadRuleTable($event,'pageSize')" <TableComponent :tableData="updateTableData" :tableColumn="updateTableColumn" @pageNumberChange="loadRuleTable($event,'pageNum')" @pageSizeChange="loadRuleTable($event,'pageSize')"
:showFooter="false"> :showFooter="true">
<el-table ref="multipleTable" :data="updateTableData.datas" tooltip-effect="dark" height="100%" border <el-table ref="multipleTable" :data="updateTableData.datas" tooltip-effect="dark" height="100%" border
@selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;"> @selection-change="handleSelectionChange" style="width: 100%;min-height: 200px;">
<el-table-column type="selection" label="全选" width="60" > <el-table-column type="selection" label="全选" width="40px" >
</el-table-column> </el-table-column>
<template v-for="item in updateTableColumn"> <template v-for="item in updateTableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key"> <el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name" :width="item.width" :key="item.key">
@ -104,10 +105,10 @@
</el-table-column> </el-table-column>
</template> </template>
</el-table> </el-table>
<div class="dis-flex" style="justify-content: center; margin-top: 20px;">
<el-button @click="cancelMutilAdd"> 取消</el-button>
<el-button type="primary" @click="doMutilAdd"> 确定</el-button>
</div>
</TableComponent> </TableComponent>
<div class="dis-flex" style="justify-content: center; margin-top: 20px;">
<el-button @click="cancelMutilAdd"> 取消</el-button>
<el-button type="primary" @click="doMutilAdd"> 确定</el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>

View File

@ -42,11 +42,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
value:"search", value:"search",
icon:"el-icon-search", icon:"el-icon-search",
type:"primary" type:"primary"
},{
name:"清空",
icon:"el-icon-tickets",
value:"reset"
}]; }];
public tableActions = [{ public tableActions = [{
name:"添加", name:"添加",
value:"add", value:"add",
@ -87,9 +84,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
}]; }];
public formOptions:FormOption<BtnOption>[] = [{ public formOptions:FormOption<BtnOption>[] = [{
name:"检查表名称", name:"检查表名称",
key:"areaId", key:"name",
type:"text" type:"text"
}]; }];
public mutilAddOptions:FormOption<BtnOption>[] = [];
public showUpdate = false; public showUpdate = false;
public currentId = -1; public currentId = -1;
@ -176,6 +174,18 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
} }
public buildUpdateForm(){ public buildUpdateForm(){
this.mutilAddOptions = [{
name:"检查项目",
key:"name",
type:"text"
},{
name:"类型",
key:"type",
clearable:true,
type:"select",
datas:this.$store.state.prevention_dangrous_type
}]
this.updateOptions = [{ this.updateOptions = [{
name:"检查表编号", name:"检查表编号",
key:"number", key:"number",
@ -253,8 +263,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
value:item.id value:item.id
} }
}); });
this.buildUpdateForm(); this.loadUnitData()
this.buildTable()
}) })
} }
// //
@ -284,21 +293,26 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.tableColumn.push({name:'对象名称',key:"targets"}); this.tableColumn.push({name:'对象名称',key:"targets"});
this.tableColumn.push({name:'适用部门',key:"depts"}); this.tableColumn.push({name:'适用部门',key:"depts"});
this.tableColumn.push({name:'适用类型',key:"types",filters:this.$store.state.prevention_dangrous_type.map(item=>{ this.tableColumn.push({name:'适用类型',key:"types",filters:this.$store.state.prevention_dangrous_type.map(item=>{
item.text = item.name; return {
item.value = item.name; text:item.name,
delete item.name; value:item.name,
return item }
}),filterMethod:(data,row)=>{ }),filterMethod:(data,row)=>{
return row.types.indexOf(data)>=0; return row.types.indexOf(data)>=0;
}}); }});
this.tableColumn.push({name:'编制人',key:"createBy"}); this.tableColumn.push({name:'编制人',key:"createBy"});
this.tableColumn.push({name:'编制时间',key:"createTime"}); this.tableColumn.push({name:'编制时间',key:"createTime"});
this.updateTableColumn = [];
this.updateTableColumn.push({name:'序号',key:"index",width:"60px"});
this.updateTableColumn.push({name:'序号',key:"index"});
this.updateTableColumn.push({name:'检查项目',key:"name",showTip:true}); this.updateTableColumn.push({name:'检查项目',key:"name",showTip:true});
this.updateTableColumn.push({name:'检查内容',key:"content",showTip:true}); this.updateTableColumn.push({name:'检查内容',key:"content",showTip:true});
this.updateTableColumn.push({name:'检查依据',key:"reason",showTip:true}); this.updateTableColumn.push({name:'检查依据',key:"reason",showTip:true});
if(this.showSubMutilUpdate){
this.updateTableColumn.push({name:'检查类型',key:"reason",render:(data)=>{
return this.$store.getters.prevention_dangrous_type_map[data.type]
}});
}
} }
public change(data,item){ public change(data,item){
@ -336,6 +350,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.deleteData(this.selectData.map((item:any)=>item.id)) this.deleteData(this.selectData.map((item:any)=>item.id))
}else if(data && data.value.indexOf("save")>=0){ }else if(data && data.value.indexOf("save")>=0){
this.doSave(data.value!=="save") this.doSave(data.value!=="save")
}else if(data && data.value === "cancel"){
this.handleClose()
} }
} }
@ -354,6 +370,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.doSubDelete(this.selectData.map((item:any)=>item.index -1)) this.doSubDelete(this.selectData.map((item:any)=>item.index -1))
}else if(data && data.value==="subMutilAdd"){ }else if(data && data.value==="subMutilAdd"){
this.showSubMutilUpdate = true; this.showSubMutilUpdate = true;
this.buildTable()
this.clearSelect() this.clearSelect()
} }
} }
@ -369,12 +386,18 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
item.index = i+1 item.index = i+1
}) })
this.clearSelect() this.clearSelect()
this.showSubMutilUpdate=false this.showSubMutilUpdate=false;
this.buildTable();
} }
public cancelMutilAdd(){ public cancelMutilAdd(){
this.clearSelect() this.clearSelect();
this.ruleParams = {
pageNum:1,
pageSize:10,
}
this.showSubMutilUpdate=false; this.showSubMutilUpdate=false;
this.buildTable();
} }
@ -389,6 +412,11 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
pageNum:1, pageNum:1,
pageSize:20, pageSize:20,
} as any; } as any;
this.ruleParams = {
pageNum:1,
pageSize:10,
}
} }
public showSubUpdateModel(row?,isRead?){ public showSubUpdateModel(row?,isRead?){
@ -406,6 +434,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
this.updateParams = {number:null,tableItems:[]} as any; this.updateParams = {number:null,tableItems:[]} as any;
this.isReadonly = !!isRead; this.isReadonly = !!isRead;
this.clearSelect() this.clearSelect()
this.buildUpdateForm();
if(!row){ if(!row){
this.currentId = -1; this.currentId = -1;
this.getNumber(); this.getNumber();
@ -480,6 +510,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
public handleClose(){ public handleClose(){
if(this.showSubMutilUpdate){ if(this.showSubMutilUpdate){
this.showSubMutilUpdate = false; this.showSubMutilUpdate = false;
this.buildTable();
return return
} }
if(this.showSubUpdate){ if(this.showSubUpdate){

View File

@ -46,107 +46,22 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
public footerActions = []; public footerActions = [];
public formOptions:FormOption<BtnOption>[] = []; public formOptions:FormOption<BtnOption>[] = [];
public showUpdate = false; public updateOptions:FormOption<BtnOption>[] = [];
public currentId = -1; public updateParams = {} as any
public updateParams = {} as any;
public updateOptions:FormOption<BtnOption>[] = [{
name:"区域编号",
key:"no",
type:"text",
width:"calc(50% - 20px)",
require:true
},{
name:"区域名称",
key:"areaName",
type:"text",
width:"calc(50% - 20px)",
require:true
},{
name:"责任部门",
key:"deptId",
type:"select",
width:"calc(50% - 20px)",
require:true,
datas:[{
name:"部门1",
value:0
},{
name:"部门2",
value:1
}]
},{
name:"责任人",
key:"person",
type:"select",
width:"calc(50% - 20px)",
require:true,
datas:[{
name:"人员1",
value:0
},{
name:"人员2",
value:1
}]
},{
name:"属于重大危险源",
key:"isDangrous",
type:"radio",
width:"calc(50% - 20px)",
require:true,
datas:[{
name:"是",
value:0
},{
name:"否",
value:1
}]
},{
name:"重大危险源名称",
key:"dangrousName",
type:"text",
width:"calc(50% - 20px)",
require:true,
},{
name:"重大危险源等级",
key:"level",
type:"select",
width:"calc(50% - 20px)",
require:true,
datas:[{
name:"一级",
value:0
},{
name:"二级",
value:1
}]
},{
type:"btn",
name:"区域绘制",
width:"calc(50% - 20px)",
btn:[{
name:"开始绘制",
value:"draw",
type:"primary"
}]
}];
public showRecord = false;
public recordParams = {
taskId:null,
tableId:null,
} as any;
public tableTabs = [] as any;
public updateActions = [{ public currentTable = {} as any;
name:"取消",
value:"cancel"
},{
name:"保存并继续添加",
value:"saveAndContinue",
type:"primary"
},{
name:"保存",
value:"save",
type:"primary"
}];
public selectData = []; public currentTableId:any = null;
public troubleTableData = {} as any;
created(){ created(){
@ -184,6 +99,41 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
key:"inspectType", key:"inspectType",
type:"select", type:"select",
datas:this.$store.state.prevention_danger_check_type datas:this.$store.state.prevention_danger_check_type
}];
this.updateOptions = [{
name:"隐患编号",
key:"number",
disable:true,
require:true,
showError:false,
type:"text"
},{
name:"隐患标题",
key:"name",
require:true,
showError:false,
type:"text"
},{
name:"隐患描述",
key:"description",
require:true,
showError:false,
type:"text"
},{
name:"隐患级别",
key:"level",
format:"levelName",
type:"select",
width:"calc(50% - 20px)",
require:true,
showError:false,
datas:[{
name:"一般隐患",
value:1
},{
name:"重大隐患",
value:2
}]
}] }]
} }
@ -194,16 +144,6 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
// //
}else if(data.value === "reset"){ }else if(data.value === "reset"){
this.reset() this.reset()
//
}else if(data.value === "reverse"){
this.toggleAll()
//
}else if(data.value === "selectAll"){
this.selectAll()
}else if(data.value === "add"){
this.showUpdateModel(-1)
}else if(data.value === "delete"){
this.deleteData(this.selectData.map((item:any)=>item.id))
} }
} }
// //
@ -214,39 +154,58 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
} as any; } as any;
} }
public showUpdateModel(id){
if(id!==-1){
}
this.currentId = id;
this.showUpdate = true
}
public handleClose(){ public handleClose(){
this.showUpdate = false; if(this.showRecord){
this.showRecord = false;
this.recordParams = {
taskId:null,
tableId:null,
}
return
}
} }
public toggleAll() { public openRecordModel(row){
(this.$refs.multipleTable as any).toggleAllSelection(); this.showRecord = true;
this.recordParams.taskId = row.id;
this.getTabsData()
this.getTroubleList();
} }
public selectAll(){ public getTabsData(){
if(!this.selectData.length){ this.tableService.getRecordTabList(this.recordParams).then((res:any)=>{
this.toggleAll() this.tableTabs = res.data.map(item=>{
}else{ return {
this.tableData.datas.forEach((item,index)=>{ name:item.tableName,
const find = this.selectData.find((data:any)=>data.userId === item.userId); id:item.tableId,
if(!find){ tableItems:[]
(this.$refs.multipleTable as any).toggleRowSelection(item);
} }
}) })
} this.tableTabs.forEach(async item=>{
this.recordParams.tableId = item.id;
const datas = (await this.tableService.getRecordList(this.recordParams)).data as any;
item.tableItems = datas.map(item=>{
item.itemResult = 1;
return item
})
})
this.currentTableId = this.tableTabs[0].id;
this.currentTable = this.tableTabs[0]
})
} }
public handleSelectionChange(data){ public getTroubleList(){
this.selectData = data; this.tableService.getTroubleList(this.recordParams).then(res=>{
console.log(res)
})
} }
public sendTabChange(data){
this.currentTable = this.tableTabs.find(item=>item.id===data)
}
} }
</script> </script>
<style lang="scss" scoped src="../../common.component.scss"></style> <style lang="scss" scoped src="../../common.component.scss"></style>

View File

@ -114,14 +114,14 @@ export default class PlanComponent extends BaseRecordComponent<any> {
public planType = [{ public planType = [{
name:"单次计划", name:"单次计划",
value:0, value:1,
},{ },{
name:"长期计划", name:"长期计划",
value:1, value:2,
}]; }];
public planTypeMap = { public planTypeMap = {
0:"单次计划", 1:"单次计划",
1:"长期计划" 2:"长期计划"
} }
public stateMap = ["停用","启用"]; public stateMap = ["停用","启用"];
@ -131,12 +131,14 @@ export default class PlanComponent extends BaseRecordComponent<any> {
} as any; } as any;
public recordParams = { public recordParams = {
taskId:null,
tableId:null,
pageNum:1, pageNum:1,
pageSize:5 pageSize:5
} as any; } as any;
public recordData = {} as any; public recordData = {} as any;
public sendTables = [] as any; public tableTabs = [] as any;
public currentTable = {} as any; public currentTable = {} as any;
public currentTableId:any = null; public currentTableId:any = null;
@ -162,6 +164,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
width:"100%", width:"100%",
format:"planTypeName", format:"planTypeName",
require:true, require:true,
disable:this.updateParams.id,
showError:false, showError:false,
datas:this.planType datas:this.planType
},{ },{
@ -184,7 +187,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
name:"巡检周期", name:"巡检周期",
key:"inspectCycleValue", key:"inspectCycleValue",
type:"number", type:"number",
hide:this.updateParams.planType===0, hide:this.updateParams.planType===1,
controls:false, controls:false,
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
require:true, require:true,
@ -194,7 +197,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
key:"inspectCycleUnit", key:"inspectCycleUnit",
format:"inspectCycleUnitName", format:"inspectCycleUnitName",
type:"select", type:"select",
hide:this.updateParams.planType===0, hide:this.updateParams.planType===1,
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
require:true, require:true,
showError:false, showError:false,
@ -240,7 +243,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
key:"startTime", key:"startTime",
type:"date", type:"date",
subType:"datetime", subType:"datetime",
hide:this.updateParams.planType===0, hide:this.updateParams.planType===1,
format:"yyyy-MM-dd HH:mm", format:"yyyy-MM-dd HH:mm",
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
require:true, require:true,
@ -249,7 +252,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
name:"检查时间", name:"检查时间",
key:"time", key:"time",
type:"date", type:"date",
hide:this.updateParams.planType===1, hide:this.updateParams.planType===2,
subType:"datetimerange", subType:"datetimerange",
format:"yyyy-MM-dd HH:mm", format:"yyyy-MM-dd HH:mm",
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
@ -335,28 +338,35 @@ export default class PlanComponent extends BaseRecordComponent<any> {
public buildTable(){ public buildTable(){
this.tableColumn.push({name:'检查标题',key:"name"}); this.tableColumn.push({name:'检查标题',key:"name",width:"100px"});
this.tableColumn.push({name:'检查类型',width:"270px",render:(data)=>{ this.tableColumn.push({name:'检查类型',width:"100px",render:(data)=>{
return this.$store.getters.prevention_danger_check_type_map[data.inspectType] return this.$store.getters.prevention_danger_check_type_map[data.inspectType]
}}); }});
this.tableColumn.push({name:'检查时间',width:"100px",render:(data)=>{ this.tableColumn.push({name:'检查时间',width:"270px",render:(data)=>{
return data.startTime + (data.endTime?'~'+data.endTime:"") return data.startTime + (data.endTime?'~'+data.endTime:"")
}}); }});
this.tableColumn.push({name:'检查负责人',key:"chargeUserName"}); this.tableColumn.push({name:'检查负责人',key:"chargeUserName",width:"100px"});
this.tableColumn.push({name:'检查范围',width:"270px",key:"scope"}); this.tableColumn.push({name:'检查范围',width:"270px",key:"scope"});
this.tableColumn.push({name:'发现隐患数量',key:"dangerCount"}); this.tableColumn.push({name:'发现隐患数量',key:"dangerCount",width:"120px"});
this.tableColumn.push({name:'检查类型',render:(data)=>{ this.tableColumn.push({name:'检查类型',render:(data)=>{
return this.planTypeMap[data.planType] return this.planTypeMap[data.planType]
}}); }});
this.tableColumn.push({name:'状态',render:(data)=>{ this.tableColumn.push({name:'状态',render:(data)=>{
return data.state==undefined?"--":`<span class="color_${data.state}">${this.stateMap[data.state]}</span>` return data.planType==1?"--":`<span class="color_${data.state}">${this.stateMap[data.state]}</span>`
}}); }});
} }
// //
public buildSendTable(datas){ public buildSendTable(datas){
datas.forEach(async (item)=>{ //
if(this.sendTables.find(items=>items.id === item)){ if(!datas.length){
return this.tableTabs = [];
this.currentTableId=null;
this.currentTable = {tableItems:[]} as any
}
datas.forEach(async (item)=>{
if(this.tableTabs.find(items=>items.id === item)){
return false
} }
const data = (await this.checkTableService.selectById(item)).data as any; const data = (await this.checkTableService.selectById(item)).data as any;
data.tableItems = data.tableItems.map(itm=>{ data.tableItems = data.tableItems.map(itm=>{
@ -365,7 +375,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
tableId:data.id, tableId:data.id,
tableItemId:itm.id, tableItemId:itm.id,
tableName:data.name, tableName:data.name,
scopeId:this.currentPlan.chargeUserId, userList:[this.currentPlan.chargeUserId],
},itm) },itm)
}) })
@ -373,13 +383,20 @@ export default class PlanComponent extends BaseRecordComponent<any> {
this.currentTableId = data.id; this.currentTableId = data.id;
this.currentTable = data; this.currentTable = data;
} }
this.sendTables.push(data) this.tableTabs.push(data)
}); });
for(let i = this.tableTabs.length-1;i>=0;i--){
const item = this.tableTabs[i];
if(!datas.includes(item.id)){
this.tableTabs.splice(i,1)
}
}
console.log(this.tableTabs)
} }
public tabChange(data){ public sendTabChange(data){
this.currentTable = this.sendTables.find(item=>item.id===data) this.currentTable = this.tableTabs.find(item=>item.id===data)
} }
public change(data,item){ public change(data,item){
@ -446,13 +463,21 @@ export default class PlanComponent extends BaseRecordComponent<any> {
public sendCallback(data){ public sendCallback(data){
if(data && data.value === "save"){ if(data && data.value === "save"){
this.tableService.deliver({ this.tableService.deliver({
deliverContents:this.sendTables.map(item=>item.tableItems).flat(1), deliverContents:this.tableTabs.map(item=>item.tableItems).flat(1).map(item=>{
item.executor = item.userList.map(userId=>{
return{
id:userId,
name:this.$store.getters.user_map[userId]
}
})
return item
}),
planReq:this.currentPlan, planReq:this.currentPlan,
}).then(()=>{ }).then(()=>{
this.$message.success("下发成功!") this.$message.success("下发成功!")
this.currentPlan=null; this.currentPlan=null;
this.showSend = false; this.showSend = false;
this.sendTables = []; this.tableTabs = [];
this.sendParams.tables = []; this.sendParams.tables = [];
this.getTableData() this.getTableData()
}) })
@ -478,51 +503,79 @@ export default class PlanComponent extends BaseRecordComponent<any> {
this.updateParams = Object.assign({ this.updateParams = Object.assign({
analControls:row.analControlIds, analControls:row.analControlIds,
planTypeName:this.planTypeMap[row.planType], planTypeName:this.planTypeMap[row.planType],
time:row.startTime+"~"+row.endTime, time:isRead?row.startTime+"~"+row.endTime :[row.startTime,row.endTime],
areaNames:row.areaIds.map(item=>this.areaMap[item]).join(";"), areaNames:row.areaIds.map(item=>this.areaMap[item]).join(";"),
unitNames:row.unitIds.map(item=>this.unitMap[item]).join(";"), unitNames:row.unitIds.map(item=>this.unitMap[item]).join(";"),
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType], inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
inspectCycleUnitName:this.$store.getters.prevention_cycle_unit_map[row.inspectCycleUnit] inspectCycleUnitName:this.$store.getters.prevention_cycle_unit_map[row.inspectCycleUnit]
},row); },row);
}else{ }else{
this.updateParams = {planType:0} as any; this.updateParams = {planType:1} as any;
} }
this.buildUpdateForm(); this.buildUpdateForm();
this.showUpdate = true this.showUpdate = true
} }
// //
public openSendModel(row){ public openSendModel(row){
this.currentPlan = row; this.currentPlan = row;
this.showSend = true this.showSend = true;
this.tableTabs = [];
} }
public openRecordModel(row){ public openRecordModel(row){
this.showRecord = true; this.showRecord = true;
this.recordParams.planTableId = row.id; this.recordParams.taskId = row.latestExecuteId;
this.getRecordData() this.getTabsData()
} }
public getRecordData(data?){ public getTabsData(){
this.tableService.getRecordTabList(this.recordParams).then((res:any)=>{
this.tableTabs = res.data.map(item=>{
return {
name:item.tableName,
id:item.tableId,
}
})
if(!this.recordParams.tableId){
this.recordParams.tableId = this.tableTabs[0].id;
this.getRecordTableData()
}
})
}
public getRecordTableData(data?){
if(data){ if(data){
this.recordParams.pageNum = data this.recordParams.pageNum = data
} }
this.tableService.getRecordList(this.recordParams).then(res=>{ this.tableService.getRecordList(this.recordParams).then((res:any)=>{
this.recordData = res.data this.currentTable = res.data
}) })
} }
public handleClose(){ public handleClose(){
if(this.showSend){ if(this.showSend){
this.sendParams.tables = []; this.sendParams.tables = [];
this.currentTable = {} as any; this.currentTable = {tableItems:[]} as any;
this.sendTables = []; this.tableTabs = [];
this.currentPlan = null; this.currentPlan = null;
this.currentTableId = null; this.currentTableId = null;
this.showSend = false; this.showSend = false;
return return
} }
if(this.showRecord){ if(this.showRecord){
this.showRecord = false; this.showRecord = false;
this.recordParams = {
taskId:null,
tableId:null,
pageNum:1,
pageSize:5
}
return return
} }
this.showUpdate = false; this.showUpdate = false;
@ -536,6 +589,17 @@ export default class PlanComponent extends BaseRecordComponent<any> {
}) })
} }
public changeState(row){
this.tableService.addOrUpdate({
id:row.id,
state:+!row.state,
oldState:row.state
},false).then(res=>{
this.$message.success(row.state?"停用成功":"启用成功!")
this.getTableData();
})
}
public toggleAll() { public toggleAll() {
(this.$refs.multipleTable as any).toggleAllSelection(); (this.$refs.multipleTable as any).toggleAllSelection();

View File

@ -50,7 +50,7 @@
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right" <FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
:data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true" :data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true"
@change="change" btn-position="center"> @change="change" btn-position="center">
<span class="tips" v-if="currentId===-1 && isArea">*注:安全风险分析对象编码即危险化学品登记综合服务系统中的危险源编码</span> <span class="tips" v-if="isArea">*注:安全风险分析对象编码即危险化学品登记综合服务系统中的危险源编码</span>
<div class="sub-title" v-if="!isArea && isReadonly">停用/检修记录</div> <div class="sub-title" v-if="!isArea && isReadonly">停用/检修记录</div>

View File

@ -64,7 +64,8 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
name:"取消", name:"取消",
value:"cancel", value:"cancel",
type:"" type:""
}] }];
public numberForMat = ["","(Ⅳ)","(Ⅲ)","(Ⅱ)","()"]
created(){ created(){
@ -90,7 +91,7 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
}}); }});
this.tableColumn.push({name:'区域固有风险',render:(data)=>{ this.tableColumn.push({name:'区域固有风险',render:(data)=>{
return "<span class='color_"+data.analRiskLevel+"'>"+(this.$store.getters.prevention_risk_level_map[data.analRiskLevel] || '')+"</span>" return "<span class='color_"+data.analRiskLevel+"'>"+(data.analRiskLevel?(this.$store.getters.prevention_risk_level_map[data.analRiskLevel]+this.numberForMat[data.analRiskLevel]):'')+"</span>"
}}); }});
this.tableColumn.push({name:'评估完成情况',key:"status",render:(data)=>{ this.tableColumn.push({name:'评估完成情况',key:"status",render:(data)=>{
if(data.edit){ if(data.edit){

View File

@ -197,6 +197,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
key:"safetyFactor", key:"safetyFactor",
format:"safetyFactorName", format:"safetyFactorName",
type:"select", type:"select",
multiple:true,
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
require:true, require:true,
showError:false, showError:false,
@ -447,12 +448,14 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
return return
} }
// //
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(",");
this.updateParams.stepNum = this.updateParams.steps.length; this.updateParams.stepNum = this.updateParams.steps.length;
this.updateParams.postCode = this.updateParams.postCode.join(";") this.updateParams.postCode = this.updateParams.postCode.join(";")
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res)=>{ this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res)=>{
this.$message.success(this.currentId===-1?"新增成功!":"编辑成功!"); this.$message.success(this.currentId===-1?"新增成功!":"编辑成功!");
this.updateParams = { this.updateParams = {
postCode:[] postCode:[],
safetyFactor:[]
} as any } as any
this.showUpdate = !!goOn; this.showUpdate = !!goOn;
this.getTableData(); this.getTableData();
@ -489,8 +492,10 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
this.currentStepTableData.datas = this.updateParams.steps; this.currentStepTableData.datas = this.updateParams.steps;
if(!isRead){ if(!isRead){
this.updateParams.postCode = this.updateParams.postCode.split(";").map(item=>+item); this.updateParams.postCode = this.updateParams.postCode.split(";").map(item=>+item);
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item=>+item);
}else{ }else{
this.updateParams.safetyFactorName = this.$store.getters.prevention_safe_reason_map[this.updateParams.safetyFactor]; this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item=>+item);
this.updateParams.safetyFactorName = this.updateParams.safetyFactor.map(item=>this.$store.getters.prevention_safe_reason_map[item]).join(",")
this.buildUpdateForm() this.buildUpdateForm()
} }
} }

View File

@ -169,7 +169,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
},{ },{
name:"登记人", name:"登记人",
type:"text", type:"text",
key:"account", key:"registerUserName",
disable:true, disable:true,
require:true, require:true,
width:"100%", width:"100%",
@ -193,8 +193,9 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
endTime:"", endTime:"",
riskUnitStatus:status, riskUnitStatus:status,
registerUserId:this.account.userId, registerUserId:this.account.userId,
registerUserName:this.account.nickName,
registerTime:moment().format("YYYY-MM-DD HH:mm"), registerTime:moment().format("YYYY-MM-DD HH:mm"),
account:this.account.nickName,
} }
this.showTurnOff = true; this.showTurnOff = true;
this.buildTurnOffForm(); this.buildTurnOffForm();
@ -207,6 +208,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
this.getTableData(); this.getTableData();
this.showTurnOff = false; this.showTurnOff = false;
}) })
}else{
this.showTurnOff = false;
} }
} }
@ -283,6 +286,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
width:"calc(50% - 20px)", width:"calc(50% - 20px)",
format:"statusName", format:"statusName",
type:"select", type:"select",
disable:this.currentId!=-1,
require:true, require:true,
datas:[{ datas:[{
name:"启用", name:"启用",