forked from xxhjsb/hbt-prevention-ui
feat:新增安全检查计划
parent
088c113af0
commit
d76d951c2f
|
@ -7,7 +7,7 @@ VUE_APP_GATEWAY_URL="/dev-api"
|
|||
# 服务地址
|
||||
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
|
||||
# 微前端地址
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "test",
|
||||
"name": "prevention",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
@ -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>>>{
|
||||
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)
|
||||
}
|
||||
}
|
|
@ -34,4 +34,18 @@ export default class TaskService extends BaseService<any>{
|
|||
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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import NoteService from '@/service/note.service';
|
|||
import UnitService from '@/service/unit.service';
|
||||
import MapComponent from "@/components/map.component.vue"
|
||||
import mapboxgl from "mapbox-gl";
|
||||
import moment from 'moment';
|
||||
@Component({
|
||||
template,
|
||||
components:{
|
||||
|
@ -44,7 +45,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
public tableActionWidth = "150px";
|
||||
|
||||
public isReadonly = false;
|
||||
|
||||
public account = JSON.parse(localStorage.getItem("account") as string);
|
||||
public showMap = false;
|
||||
public center = [118.751353,31.969568];
|
||||
public marker:any;
|
||||
|
@ -268,8 +269,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
showError:false,
|
||||
unit:{
|
||||
type:"btn",
|
||||
hide:this.isReadonly,
|
||||
name:"点击定位",
|
||||
name:this.isReadonly?"查看定位":"点击定位",
|
||||
value:"fixed",
|
||||
btnType:"primary"
|
||||
}
|
||||
|
@ -369,7 +369,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
key:"violateNumber",
|
||||
type:"number",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
name:"专业分类",
|
||||
|
@ -386,7 +385,6 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
format:"occurNodeName",
|
||||
type:"select",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.$store.state.prevention_occur_step,
|
||||
},{
|
||||
|
@ -394,14 +392,12 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
key:"violateTerm",
|
||||
type:"textarea",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
name:"隐患整改要求",
|
||||
key:"reformDemand",
|
||||
type:"textarea",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
}]
|
||||
}
|
||||
|
@ -421,9 +417,10 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
}
|
||||
|
||||
public addMarker(){
|
||||
this.marker = new mapboxgl.Marker({draggable:true})
|
||||
this.marker = new mapboxgl.Marker({draggable:!this.isReadonly})
|
||||
.setLngLat(this.center)
|
||||
.addTo(this.map);
|
||||
this.map.flyTo({center:this.center})
|
||||
}
|
||||
|
||||
public change(data,item){
|
||||
|
@ -485,7 +482,15 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
this.isReadonly = !!isRead;
|
||||
this.fileList = [];
|
||||
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){
|
||||
|
||||
this.tableService.getNumber().then(res=>{
|
||||
|
@ -512,6 +517,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
|||
},res.data)
|
||||
// 地图定位
|
||||
this.center = [res.data.locationLng,res.data.locationLat];
|
||||
this.buildUpdateForm()
|
||||
|
||||
// 获取url
|
||||
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();
|
||||
this.updateParams.locationLng = lngLat.lng;
|
||||
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()
|
||||
}
|
||||
|
||||
|
|
|
@ -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="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.planType && !scope.row.state" @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===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="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>
|
||||
|
@ -59,14 +59,14 @@
|
|||
<!-- 下发 -->
|
||||
<el-dialog v-if="isPlan" :close-on-click-modal="false" title="下发" :visible.sync="showSend" width="980px"
|
||||
:before-close="handleClose">
|
||||
<FormComponent :options="sendOptions" labelAlign="right" :data.sync="sendParams" @change="change" :fullBtn="true" btn-position="center" @actionCallback="sendCallback" :actions="updateActions">
|
||||
<div class="full">
|
||||
<el-radio-group size="medium" v-model="currentTableId" @change="tabChange">
|
||||
<el-radio-button :label="item.id" v-for="item in sendTables" :key="item.id">{{item.name}}</el-radio-button>
|
||||
<FormComponent :options="sendOptions" :data.sync="sendParams" @change="change" :fullBtn="true" btn-position="center" @actionCallback="sendCallback" :actions="updateActions">
|
||||
<div class="full" style="margin-bottom: 20px;">
|
||||
<el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
|
||||
<el-radio-button :label="item.id" v-for="item in tableTabs" :key="item.id">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<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">
|
||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||
</el-table-column>
|
||||
|
@ -84,7 +84,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="选择执行人">
|
||||
<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
|
||||
v-for="item in $store.state.userList"
|
||||
:key="item.value"
|
||||
|
@ -109,52 +109,54 @@
|
|||
</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">
|
||||
<div class="full">
|
||||
<el-radio-group size="medium" v-model="currentTableId" @change="tabChange">
|
||||
<el-radio-button :label="item.id" v-for="item in sendTables" :key="item.id">{{item.name}}</el-radio-button>
|
||||
<el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
|
||||
<el-radio-button :label="item.id" v-for="item in tableTabs" :key="item.id">{{item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<div class="full" style="margin-bottom: 20px;">
|
||||
<el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" width="100%" style="min-height:250px;">
|
||||
<div class="full" style="margin: 20px 0;">
|
||||
<el-table :data="currentTable.tableItems" tooltip-effect="dark" height="100%" border width="100%" style="min-height:250px;">
|
||||
<el-table-column label="序号" width="60">
|
||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||
</el-table-column>
|
||||
<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-table-column>
|
||||
<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-table-column>
|
||||
<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-table-column>
|
||||
<el-table-column label="检查人">
|
||||
<div slot-scope="scope"></div>
|
||||
<div slot-scope="scope">{{scope.row.itemExecuteNames}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查结果">
|
||||
<div slot-scope="scope"></div>
|
||||
<el-table-column label="检查结果" width="160px">
|
||||
<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 label="检查记录">
|
||||
<div slot-scope="scope"></div>
|
||||
<el-table-column label="检查记录" width="280px">
|
||||
<div slot-scope="scope">
|
||||
<el-input type="textarea" v-model="scope.row.itemRecord"></el-input>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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="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;">
|
||||
<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>
|
||||
</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 v-if="showMap" :close-on-click-modal="false" destroy-on-close title="地图定位" :visible.sync="showMap" width="980px"
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<el-table ref="multipleTable" :data="updateParams.tableItems" tooltip-effect="dark" height="100%" border
|
||||
@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>
|
||||
<template v-for="item in updateTableColumn">
|
||||
<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"
|
||||
: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')"
|
||||
:showFooter="false">
|
||||
:showFooter="true">
|
||||
|
||||
<el-table ref="multipleTable" :data="updateTableData.datas" tooltip-effect="dark" height="100%" border
|
||||
@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>
|
||||
<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">
|
||||
|
@ -104,10 +105,10 @@
|
|||
</el-table-column>
|
||||
</template>
|
||||
</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>
|
||||
<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>
|
||||
</div>
|
|
@ -42,11 +42,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
value:"search",
|
||||
icon:"el-icon-search",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"清空",
|
||||
icon:"el-icon-tickets",
|
||||
value:"reset"
|
||||
}];
|
||||
|
||||
public tableActions = [{
|
||||
name:"添加",
|
||||
value:"add",
|
||||
|
@ -87,9 +84,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
}];
|
||||
public formOptions:FormOption<BtnOption>[] = [{
|
||||
name:"检查表名称",
|
||||
key:"areaId",
|
||||
key:"name",
|
||||
type:"text"
|
||||
}];
|
||||
public mutilAddOptions:FormOption<BtnOption>[] = [];
|
||||
|
||||
public showUpdate = false;
|
||||
public currentId = -1;
|
||||
|
@ -176,6 +174,18 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
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 = [{
|
||||
name:"检查表编号",
|
||||
key:"number",
|
||||
|
@ -253,8 +263,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
value:item.id
|
||||
}
|
||||
});
|
||||
this.buildUpdateForm();
|
||||
this.buildTable()
|
||||
this.loadUnitData()
|
||||
})
|
||||
}
|
||||
// 加载单元列表
|
||||
|
@ -284,21 +293,26 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({name:'对象名称',key:"targets"});
|
||||
this.tableColumn.push({name:'适用部门',key:"depts"});
|
||||
this.tableColumn.push({name:'适用类型',key:"types",filters:this.$store.state.prevention_dangrous_type.map(item=>{
|
||||
item.text = item.name;
|
||||
item.value = item.name;
|
||||
delete item.name;
|
||||
return item
|
||||
return {
|
||||
text:item.name,
|
||||
value:item.name,
|
||||
}
|
||||
}),filterMethod:(data,row)=>{
|
||||
return row.types.indexOf(data)>=0;
|
||||
}});
|
||||
this.tableColumn.push({name:'编制人',key:"createBy"});
|
||||
this.tableColumn.push({name:'编制时间',key:"createTime"});
|
||||
this.updateTableColumn = [];
|
||||
|
||||
|
||||
this.updateTableColumn.push({name:'序号',key:"index"});
|
||||
this.updateTableColumn.push({name:'序号',key:"index",width:"60px"});
|
||||
this.updateTableColumn.push({name:'检查项目',key:"name",showTip:true});
|
||||
this.updateTableColumn.push({name:'检查内容',key:"content",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){
|
||||
|
@ -336,6 +350,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||
}else if(data && data.value.indexOf("save")>=0){
|
||||
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))
|
||||
}else if(data && data.value==="subMutilAdd"){
|
||||
this.showSubMutilUpdate = true;
|
||||
this.buildTable()
|
||||
this.clearSelect()
|
||||
}
|
||||
}
|
||||
|
@ -369,12 +386,18 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
item.index = i+1
|
||||
})
|
||||
this.clearSelect()
|
||||
this.showSubMutilUpdate=false
|
||||
this.showSubMutilUpdate=false;
|
||||
this.buildTable();
|
||||
}
|
||||
|
||||
public cancelMutilAdd(){
|
||||
this.clearSelect()
|
||||
this.clearSelect();
|
||||
this.ruleParams = {
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
}
|
||||
this.showSubMutilUpdate=false;
|
||||
this.buildTable();
|
||||
|
||||
}
|
||||
|
||||
|
@ -389,6 +412,11 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
pageNum:1,
|
||||
pageSize:20,
|
||||
} as any;
|
||||
|
||||
this.ruleParams = {
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
}
|
||||
}
|
||||
|
||||
public showSubUpdateModel(row?,isRead?){
|
||||
|
@ -406,6 +434,8 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
this.updateParams = {number:null,tableItems:[]} as any;
|
||||
this.isReadonly = !!isRead;
|
||||
this.clearSelect()
|
||||
|
||||
this.buildUpdateForm();
|
||||
if(!row){
|
||||
this.currentId = -1;
|
||||
this.getNumber();
|
||||
|
@ -480,6 +510,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
public handleClose(){
|
||||
if(this.showSubMutilUpdate){
|
||||
this.showSubMutilUpdate = false;
|
||||
this.buildTable();
|
||||
return
|
||||
}
|
||||
if(this.showSubUpdate){
|
||||
|
|
|
@ -46,107 +46,22 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
public footerActions = [];
|
||||
public formOptions:FormOption<BtnOption>[] = [];
|
||||
|
||||
public showUpdate = false;
|
||||
public currentId = -1;
|
||||
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 updateOptions:FormOption<BtnOption>[] = [];
|
||||
public updateParams = {} as any
|
||||
|
||||
public showRecord = false;
|
||||
public recordParams = {
|
||||
taskId:null,
|
||||
tableId:null,
|
||||
} as any;
|
||||
|
||||
public tableTabs = [] as any;
|
||||
|
||||
public updateActions = [{
|
||||
name:"取消",
|
||||
value:"cancel"
|
||||
},{
|
||||
name:"保存并继续添加",
|
||||
value:"saveAndContinue",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"保存",
|
||||
value:"save",
|
||||
type:"primary"
|
||||
}];
|
||||
public currentTable = {} as any;
|
||||
|
||||
public selectData = [];
|
||||
|
||||
public currentTableId:any = null;
|
||||
|
||||
public troubleTableData = {} as any;
|
||||
|
||||
created(){
|
||||
|
||||
|
@ -184,6 +99,41 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
key:"inspectType",
|
||||
type:"select",
|
||||
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"){
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public showUpdateModel(id){
|
||||
if(id!==-1){
|
||||
}
|
||||
this.currentId = id;
|
||||
this.showUpdate = true
|
||||
}
|
||||
|
||||
public handleClose(){
|
||||
this.showUpdate = false;
|
||||
if(this.showRecord){
|
||||
this.showRecord = false;
|
||||
this.recordParams = {
|
||||
taskId:null,
|
||||
tableId:null,
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public toggleAll() {
|
||||
(this.$refs.multipleTable as any).toggleAllSelection();
|
||||
public openRecordModel(row){
|
||||
this.showRecord = true;
|
||||
this.recordParams.taskId = row.id;
|
||||
this.getTabsData()
|
||||
this.getTroubleList();
|
||||
}
|
||||
public selectAll(){
|
||||
if(!this.selectData.length){
|
||||
this.toggleAll()
|
||||
}else{
|
||||
this.tableData.datas.forEach((item,index)=>{
|
||||
const find = this.selectData.find((data:any)=>data.userId === item.userId);
|
||||
if(!find){
|
||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||
public getTabsData(){
|
||||
this.tableService.getRecordTabList(this.recordParams).then((res:any)=>{
|
||||
this.tableTabs = res.data.map(item=>{
|
||||
return {
|
||||
name:item.tableName,
|
||||
id:item.tableId,
|
||||
tableItems:[]
|
||||
}
|
||||
})
|
||||
}
|
||||
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){
|
||||
this.selectData = data;
|
||||
public getTroubleList(){
|
||||
this.tableService.getTroubleList(this.recordParams).then(res=>{
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
|
||||
public sendTabChange(data){
|
||||
this.currentTable = this.tableTabs.find(item=>item.id===data)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||
|
|
|
@ -114,14 +114,14 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public planType = [{
|
||||
name:"单次计划",
|
||||
value:0,
|
||||
value:1,
|
||||
},{
|
||||
name:"长期计划",
|
||||
value:1,
|
||||
value:2,
|
||||
}];
|
||||
public planTypeMap = {
|
||||
0:"单次计划",
|
||||
1:"长期计划"
|
||||
1:"单次计划",
|
||||
2:"长期计划"
|
||||
}
|
||||
|
||||
public stateMap = ["停用","启用"];
|
||||
|
@ -131,12 +131,14 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
} as any;
|
||||
|
||||
public recordParams = {
|
||||
taskId:null,
|
||||
tableId:null,
|
||||
pageNum:1,
|
||||
pageSize:5
|
||||
} as any;
|
||||
|
||||
public recordData = {} as any;
|
||||
public sendTables = [] as any;
|
||||
public tableTabs = [] as any;
|
||||
public currentTable = {} as any;
|
||||
|
||||
public currentTableId:any = null;
|
||||
|
@ -162,6 +164,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
width:"100%",
|
||||
format:"planTypeName",
|
||||
require:true,
|
||||
disable:this.updateParams.id,
|
||||
showError:false,
|
||||
datas:this.planType
|
||||
},{
|
||||
|
@ -184,7 +187,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
name:"巡检周期",
|
||||
key:"inspectCycleValue",
|
||||
type:"number",
|
||||
hide:this.updateParams.planType===0,
|
||||
hide:this.updateParams.planType===1,
|
||||
controls:false,
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
|
@ -194,7 +197,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
key:"inspectCycleUnit",
|
||||
format:"inspectCycleUnitName",
|
||||
type:"select",
|
||||
hide:this.updateParams.planType===0,
|
||||
hide:this.updateParams.planType===1,
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
|
@ -240,7 +243,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
key:"startTime",
|
||||
type:"date",
|
||||
subType:"datetime",
|
||||
hide:this.updateParams.planType===0,
|
||||
hide:this.updateParams.planType===1,
|
||||
format:"yyyy-MM-dd HH:mm",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
|
@ -249,7 +252,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
name:"检查时间",
|
||||
key:"time",
|
||||
type:"date",
|
||||
hide:this.updateParams.planType===1,
|
||||
hide:this.updateParams.planType===2,
|
||||
subType:"datetimerange",
|
||||
format:"yyyy-MM-dd HH:mm",
|
||||
width:"calc(50% - 20px)",
|
||||
|
@ -335,28 +338,35 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
|
||||
|
||||
public buildTable(){
|
||||
this.tableColumn.push({name:'检查标题',key:"name"});
|
||||
this.tableColumn.push({name:'检查类型',width:"270px",render:(data)=>{
|
||||
this.tableColumn.push({name:'检查标题',key:"name",width:"100px"});
|
||||
this.tableColumn.push({name:'检查类型',width:"100px",render:(data)=>{
|
||||
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:"")
|
||||
}});
|
||||
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:'发现隐患数量',key:"dangerCount"});
|
||||
this.tableColumn.push({name:'发现隐患数量',key:"dangerCount",width:"120px"});
|
||||
this.tableColumn.push({name:'检查类型',render:(data)=>{
|
||||
return this.planTypeMap[data.planType]
|
||||
}});
|
||||
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){
|
||||
datas.forEach(async (item)=>{
|
||||
if(this.sendTables.find(items=>items.id === item)){
|
||||
return
|
||||
// 因为保存的时候需要提交所有的列表 所以要把所有的列表都查出来
|
||||
if(!datas.length){
|
||||
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;
|
||||
data.tableItems = data.tableItems.map(itm=>{
|
||||
|
@ -365,7 +375,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
tableId:data.id,
|
||||
tableItemId:itm.id,
|
||||
tableName:data.name,
|
||||
scopeId:this.currentPlan.chargeUserId,
|
||||
userList:[this.currentPlan.chargeUserId],
|
||||
},itm)
|
||||
})
|
||||
|
||||
|
@ -373,13 +383,20 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
this.currentTableId = data.id;
|
||||
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){
|
||||
this.currentTable = this.sendTables.find(item=>item.id===data)
|
||||
public sendTabChange(data){
|
||||
this.currentTable = this.tableTabs.find(item=>item.id===data)
|
||||
}
|
||||
|
||||
public change(data,item){
|
||||
|
@ -446,13 +463,21 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
public sendCallback(data){
|
||||
if(data && data.value === "save"){
|
||||
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,
|
||||
}).then(()=>{
|
||||
this.$message.success("下发成功!")
|
||||
this.currentPlan=null;
|
||||
this.showSend = false;
|
||||
this.sendTables = [];
|
||||
this.tableTabs = [];
|
||||
this.sendParams.tables = [];
|
||||
this.getTableData()
|
||||
})
|
||||
|
@ -478,51 +503,79 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
this.updateParams = Object.assign({
|
||||
analControls:row.analControlIds,
|
||||
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(";"),
|
||||
unitNames:row.unitIds.map(item=>this.unitMap[item]).join(";"),
|
||||
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
||||
inspectCycleUnitName:this.$store.getters.prevention_cycle_unit_map[row.inspectCycleUnit]
|
||||
},row);
|
||||
}else{
|
||||
this.updateParams = {planType:0} as any;
|
||||
this.updateParams = {planType:1} as any;
|
||||
}
|
||||
this.buildUpdateForm();
|
||||
this.showUpdate = true
|
||||
}
|
||||
|
||||
// 打开下发弹窗
|
||||
public openSendModel(row){
|
||||
this.currentPlan = row;
|
||||
this.showSend = true
|
||||
this.showSend = true;
|
||||
this.tableTabs = [];
|
||||
}
|
||||
|
||||
public openRecordModel(row){
|
||||
this.showRecord = true;
|
||||
this.recordParams.planTableId = row.id;
|
||||
this.getRecordData()
|
||||
this.recordParams.taskId = row.latestExecuteId;
|
||||
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){
|
||||
this.recordParams.pageNum = data
|
||||
}
|
||||
this.tableService.getRecordList(this.recordParams).then(res=>{
|
||||
this.recordData = res.data
|
||||
this.tableService.getRecordList(this.recordParams).then((res:any)=>{
|
||||
this.currentTable = res.data
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
public handleClose(){
|
||||
if(this.showSend){
|
||||
this.sendParams.tables = [];
|
||||
this.currentTable = {} as any;
|
||||
this.sendTables = [];
|
||||
this.currentTable = {tableItems:[]} as any;
|
||||
this.tableTabs = [];
|
||||
this.currentPlan = null;
|
||||
this.currentTableId = null;
|
||||
this.showSend = false;
|
||||
|
||||
return
|
||||
}
|
||||
if(this.showRecord){
|
||||
this.showRecord = false;
|
||||
this.recordParams = {
|
||||
taskId:null,
|
||||
tableId:null,
|
||||
pageNum:1,
|
||||
pageSize:5
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
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() {
|
||||
(this.$refs.multipleTable as any).toggleAllSelection();
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
|
||||
:data.sync="updateParams" @actionCallback="callback" :actions="updateActions" :full-btn="true"
|
||||
@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>
|
||||
|
|
|
@ -64,7 +64,8 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
|
|||
name:"取消",
|
||||
value:"cancel",
|
||||
type:""
|
||||
}]
|
||||
}];
|
||||
public numberForMat = ["","(Ⅳ)","(Ⅲ)","(Ⅱ)","(Ⅰ)"]
|
||||
|
||||
|
||||
created(){
|
||||
|
@ -90,7 +91,7 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
|
|||
|
||||
}});
|
||||
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)=>{
|
||||
if(data.edit){
|
||||
|
|
|
@ -197,6 +197,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
key:"safetyFactor",
|
||||
format:"safetyFactorName",
|
||||
type:"select",
|
||||
multiple:true,
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
|
@ -447,12 +448,14 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
return
|
||||
}
|
||||
// 新增清单
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(",");
|
||||
this.updateParams.stepNum = this.updateParams.steps.length;
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(";")
|
||||
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res)=>{
|
||||
this.$message.success(this.currentId===-1?"新增成功!":"编辑成功!");
|
||||
this.updateParams = {
|
||||
postCode:[]
|
||||
postCode:[],
|
||||
safetyFactor:[]
|
||||
} as any
|
||||
this.showUpdate = !!goOn;
|
||||
this.getTableData();
|
||||
|
@ -489,8 +492,10 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
this.currentStepTableData.datas = this.updateParams.steps;
|
||||
if(!isRead){
|
||||
this.updateParams.postCode = this.updateParams.postCode.split(";").map(item=>+item);
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item=>+item);
|
||||
}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()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
},{
|
||||
name:"登记人",
|
||||
type:"text",
|
||||
key:"account",
|
||||
key:"registerUserName",
|
||||
disable:true,
|
||||
require:true,
|
||||
width:"100%",
|
||||
|
@ -193,8 +193,9 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
endTime:"",
|
||||
riskUnitStatus:status,
|
||||
registerUserId:this.account.userId,
|
||||
registerUserName:this.account.nickName,
|
||||
registerTime:moment().format("YYYY-MM-DD HH:mm"),
|
||||
account:this.account.nickName,
|
||||
|
||||
}
|
||||
this.showTurnOff = true;
|
||||
this.buildTurnOffForm();
|
||||
|
@ -207,6 +208,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
this.getTableData();
|
||||
this.showTurnOff = false;
|
||||
})
|
||||
}else{
|
||||
this.showTurnOff = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,6 +286,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
|||
width:"calc(50% - 20px)",
|
||||
format:"statusName",
|
||||
type:"select",
|
||||
disable:this.currentId!=-1,
|
||||
require:true,
|
||||
datas:[{
|
||||
name:"启用",
|
||||
|
|
Loading…
Reference in New Issue