forked from xxhjsb/hbt-prevention-ui
feat:新增隐患治理
parent
c44396a8f4
commit
26766bc914
|
@ -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-yx"}'
|
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-zsz","bpm":"/bpm-zsz"}'
|
||||||
# 是否显示全部菜单
|
# 是否显示全部菜单
|
||||||
VUE_APP_ALL_MENU = false
|
VUE_APP_ALL_MENU = false
|
||||||
# 微前端地址
|
# 微前端地址
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default class ManagerService extends BaseService<any>{
|
||||||
}
|
}
|
||||||
// 查询列表
|
// 查询列表
|
||||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/danger/manage/list';
|
const url = this.prefix.prevention+'/danger/manage/manageList';
|
||||||
return this.get(url,params,true)
|
return this.get(url,params,true)
|
||||||
}
|
}
|
||||||
// 批量删除
|
// 批量删除
|
||||||
|
@ -34,6 +34,10 @@ export default class ManagerService extends BaseService<any>{
|
||||||
return this.put(url,params,{},showLoading)
|
return this.put(url,params,{},showLoading)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public selectByPage2(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.prevention+'/danger/manage/dataList';
|
||||||
|
return this.get(url,params,true)
|
||||||
|
}
|
||||||
|
|
||||||
public getFileUrls(params):Promise<AxiosResponse<ActionResult<any>>>{
|
public getFileUrls(params):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.file+'/getSysFiles';
|
const url = this.prefix.file+'/getSysFiles';
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
import BaseService from "hbt-common/service/base.service"
|
||||||
|
import type { AxiosResponse } from 'axios'
|
||||||
|
import { ActionResult } from "hbt-common/models/actionResult";
|
||||||
|
export default class WorkFlowService extends BaseService<any>{
|
||||||
|
constructor(){
|
||||||
|
super()
|
||||||
|
}
|
||||||
|
|
||||||
|
public startWorkFlow(params,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.bpm+'/workflow-task/create-process';
|
||||||
|
return this.post(url,params,{},true)
|
||||||
|
}
|
||||||
|
|
||||||
|
public again(params,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.bpm+'/workflow-task/again-candidate';
|
||||||
|
return this.post(url,params,{},true)
|
||||||
|
}
|
||||||
|
public taskHandle(params,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.bpm+'/workflow-task/task-handle';
|
||||||
|
return this.post(url,params,{},true)
|
||||||
|
}
|
||||||
|
}
|
|
@ -120,6 +120,8 @@
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid #EEEEEE;
|
border: 1px solid #EEEEEE;
|
||||||
padding: 24px 24px 0;
|
padding: 24px 24px 0;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import FormOption from "hbt-common/models/formOptions"
|
||||||
import BtnOption from "hbt-common/models/btnOptions"
|
import BtnOption from "hbt-common/models/btnOptions"
|
||||||
import DrawComponent from '@/components/draw.component.vue';
|
import DrawComponent from '@/components/draw.component.vue';
|
||||||
import NoteService from '@/service/note.service';
|
import NoteService from '@/service/note.service';
|
||||||
|
import WorkFlowService from "@/service/workFlow.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";
|
||||||
|
@ -22,13 +23,14 @@ import moment from 'moment';
|
||||||
DrawComponent,
|
DrawComponent,
|
||||||
MapComponent
|
MapComponent
|
||||||
},
|
},
|
||||||
})
|
} as any)
|
||||||
export default class HiddenDangerClapComponent extends BaseRecordComponent<any> {
|
export default class HiddenDangerClapComponent extends BaseRecordComponent<any> {
|
||||||
public tableService = new NoteService();
|
public tableService = new NoteService();
|
||||||
|
|
||||||
public areaService = new AreaService();
|
public areaService = new AreaService();
|
||||||
|
|
||||||
public unitService = new UnitService();
|
public unitService = new UnitService();
|
||||||
|
public workFlowService = new WorkFlowService()
|
||||||
|
|
||||||
public areaList = [];
|
public areaList = [];
|
||||||
|
|
||||||
|
@ -105,11 +107,11 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
value:"cancel"
|
value:"cancel"
|
||||||
},{
|
},{
|
||||||
name:"保存并下发",
|
name:"保存并下发",
|
||||||
value:"saveAndContinue",
|
value:"submit",
|
||||||
type:"primary"
|
type:"primary"
|
||||||
},{
|
},{
|
||||||
name:"保存",
|
name:"保存",
|
||||||
value:"save",
|
value:"draft",
|
||||||
type:"primary"
|
type:"primary"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
@ -463,8 +465,8 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
}else if(data.value ==="fixed"){
|
}else if(data.value ==="fixed"){
|
||||||
this.showMap = true
|
this.showMap = true
|
||||||
|
|
||||||
}else if(data.value.indexOf("save")>=0){
|
}else if(data.value ==="draft" || data.value ==="submit"){
|
||||||
this.doSave();
|
this.doSave(data.value === "submit");
|
||||||
}else{
|
}else{
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
}
|
}
|
||||||
|
@ -506,6 +508,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
this.tableService.selectById(row.id).then((res:any)=>{
|
this.tableService.selectById(row.id).then((res:any)=>{
|
||||||
Object.assign(this.updateParams,{
|
Object.assign(this.updateParams,{
|
||||||
classifyName:this.$store.getters.prevention_dangrous_type_map[res.data.classify],
|
classifyName:this.$store.getters.prevention_dangrous_type_map[res.data.classify],
|
||||||
|
attributeClassifyName:this.$store.getters.prevention_safe_reason_map[row.attributeClassify],
|
||||||
dangerTypeName:this.$store.getters.prevention_danger_type_map[res.data.dangerType],
|
dangerTypeName:this.$store.getters.prevention_danger_type_map[res.data.dangerType],
|
||||||
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[res.data.inspectType],
|
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[res.data.inspectType],
|
||||||
levelName:this.levelMap[res.data.level],
|
levelName:this.levelMap[res.data.level],
|
||||||
|
@ -610,15 +613,43 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
window.open(file.url,"_blank")
|
window.open(file.url,"_blank")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public doSave(){
|
public doSave(isSubmit){
|
||||||
this.updateParams.resourceId = this.photoList.map(item=>item.id).join(",")
|
this.updateParams.resourceId = this.photoList.map(item=>item.id).join(",")
|
||||||
this.updateParams.resourceName = this.photoList.map(item=>item.name).join(",")
|
this.updateParams.resourceName = this.photoList.map(item=>item.name).join(",")
|
||||||
this.updateParams.resourceOtherId = this.fileList.map(item=>item.id).join(",")
|
this.updateParams.resourceOtherId = this.fileList.map(item=>item.id).join(",")
|
||||||
this.updateParams.resourceOtherName = this.fileList.map(item=>item.name).join(",")
|
this.updateParams.resourceOtherName = this.fileList.map(item=>item.name).join(",")
|
||||||
this.tableService.addOrUpdate(this.updateParams,!this.updateParams.id).then(res=>{
|
this.tableService.addOrUpdate(this.updateParams,!this.updateParams.id).then(res=>{
|
||||||
this.$message.success(!this.updateParams.id?"新增成功!":"编辑成功");
|
this.$message.success(!this.updateParams.id?"新增成功!":"编辑成功");
|
||||||
|
if(isSubmit){
|
||||||
|
this.startWorkFlow([res.data],[this.updateParams.reformUserId])
|
||||||
|
}else{
|
||||||
|
this.getTableData();
|
||||||
|
}
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
this.getTableData();
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public startWorkFlow(ids,userIds){
|
||||||
|
const keyValue = ids.map(id=>{
|
||||||
|
return {
|
||||||
|
F_Id:id,
|
||||||
|
F_FormId:1742822461669376,
|
||||||
|
F_Type:2,
|
||||||
|
F_UrlAddress:"ceshi1"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.workFlowService.startWorkFlow({
|
||||||
|
"F_Id": "1743872031226688",
|
||||||
|
"relationTaskList": "[]",
|
||||||
|
"keyValue": JSON.stringify(keyValue),
|
||||||
|
"userJson": "[]",
|
||||||
|
"fileValue": [],
|
||||||
|
"nextNodeName":"确认",
|
||||||
|
"nodeName":"上报",
|
||||||
|
"userList": userIds
|
||||||
|
}).then((res:any)=>{
|
||||||
|
this.getTableData()
|
||||||
|
// 发起工作流成功
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,18 @@
|
||||||
:full-btn="false" @change="change" btn-position="end"></FormComponent>
|
:full-btn="false" @change="change" btn-position="end"></FormComponent>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-box flex-1">
|
<div class="table-box flex-1">
|
||||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn"
|
<div class="full" v-if="isManager">
|
||||||
|
<el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type" @change="tabTableChange">
|
||||||
|
<el-radio-button :label="item.value" v-for="item in tabs" :key="item.value">{{item.name}}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<TableComponent style="flex: 1; height: 1px;" :tableData="tableData" :tableColumn="tableColumn"
|
||||||
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" @pageSizeChange="callback($event,'pageSize')"
|
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')" @pageSizeChange="callback($event,'pageSize')"
|
||||||
:footerActions="footerActions" :actions="tableActions">
|
:footerActions="footerActions" :actions="tableActions">
|
||||||
|
|
||||||
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
|
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
|
||||||
@selection-change="handleSelectionChange" style="width: 100%">
|
@selection-change="handleSelectionChange" style="width: 100%">
|
||||||
<el-table-column v-if="!isAction" type="selection" label="全选" width="40">
|
<el-table-column v-if="!isAction && !(isManager && params.type>1)" type="selection" label="全选" width="40">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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>
|
||||||
|
@ -19,7 +24,7 @@
|
||||||
<template v-for="item in tableColumn">
|
<template v-for="item in tableColumn">
|
||||||
<el-table-column v-if="item.render" :label="item.name" :filters="item.filters"
|
<el-table-column v-if="item.render" :label="item.name" :filters="item.filters"
|
||||||
:filter-method="item.filterMethod" :width="item.width" :key="item.key">
|
:filter-method="item.filterMethod" :width="item.width" :key="item.key">
|
||||||
<div slot-scope="scope" @click="" v-html="item.render(scope.row)" style="pointer-events: none;" @click="showCheckTable($event,scope.row)"></div>
|
<div slot-scope="scope" @click="" v-html="item.render(scope.row)" style="pointer-events: none;" @click="rowCallback($event,scope.row)"></div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-else :prop="item.key" :label="item.name" :filters="item.filters"
|
<el-table-column v-else :prop="item.key" :label="item.name" :filters="item.filters"
|
||||||
:filter-method="item.filterMethod" :width="item.width" :key="item.key">
|
:filter-method="item.filterMethod" :width="item.width" :key="item.key">
|
||||||
|
@ -27,20 +32,20 @@
|
||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" :width="tableActionWidth">
|
<el-table-column label="操作" :width="tableActionWidth">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" v-if="isFile" @click="showUpdateModel(scope.row.userId)">查看</el-button>
|
<el-button type="text" v-if="isBase || isFile" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||||
<el-button type="text" v-if="isBase" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
<el-button type="text" v-if="isBase" :disabled="isPlan && ((scope.row.planType===2 && scope.row.state) || (scope.row.planType===1 && scope.row.status)) || (isManager && scope.row.status)" @click="showUpdateModel(scope.row)">修改</el-button>
|
||||||
<el-button type="text" v-if="isBase" :disabled="isPlan && ((scope.row.planType===2 && scope.row.state) || (scope.row.planType===1 && scope.row.status))" @click="showUpdateModel(scope.row)">修改</el-button>
|
<el-button type="text" v-if="isBase" :disabled="(isPlan && ((scope.row.planType===2 && (scope.row.state || scope.row.status)) || (scope.row.planType===1 && scope.row.status))) || (isManager && scope.row.status)" @click="deleteData([scope.row])">删除</el-button>
|
||||||
<el-button type="text" v-if="isBase" :disabled="isPlan && ((scope.row.planType===2 && (scope.row.state || scope.row.status)) || (scope.row.planType===1 && scope.row.status))" @click="deleteData([scope.row.id])">删除</el-button>
|
|
||||||
<el-button type="text" v-if="isPlan && !scope.row.status" :disabled="scope.row.planType===2 && scope.row.state===0 " @click="openSendModel(scope.row)">下发</el-button>
|
<el-button type="text" v-if="isPlan && !scope.row.status" :disabled="scope.row.planType===2 && scope.row.state===0 " @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 && 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="isPlan" @click="openRecordModel(scope.row)">检查情况</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="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 && params.type===4 && scope.row.status<5" @click="changeStatus(scope.row,60+scope.row.status)">中断</el-button>
|
||||||
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">作废</el-button>
|
<el-button type="text" v-if="isManager && params.type===4 && scope.row.status>10" @click="changeStatus(scope.row,scope.row.status-60)">恢复</el-button>
|
||||||
<el-button type="text" v-if="isManager" @click="showUpdateModel(0)">处理</el-button>
|
<el-button type="text" v-if="isManager && params.type===4 && scope.row.status<5" @click="changeStatus(scope.row,7)">作废</el-button>
|
||||||
|
<!-- <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">处理</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -119,12 +124,12 @@
|
||||||
<div slot-scope="scope">{{reformModeMap[scope.row.reformMode]}}</div>
|
<div slot-scope="scope">{{reformModeMap[scope.row.reformMode]}}</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">
|
<div slot-scope="scope" style="display: flex; align-items: center;">
|
||||||
{{scope.row.description}}
|
{{scope.row.description}}
|
||||||
<el-image
|
<el-image
|
||||||
style="width: 60px; margin-left: 10px;"
|
style="width: 60px; margin-left: 10px;"
|
||||||
:src="currentUrl"
|
:src="scope.row.urls[0]"
|
||||||
:preview-src-list="srcList">
|
:preview-src-list="scope.row.urls">
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -150,7 +155,34 @@
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':!updateParams.id?'新增':'编辑'" :visible.sync="showUpdate" width="980px"
|
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':!updateParams.id?'新增':'编辑'" :visible.sync="showUpdate" width="980px"
|
||||||
:before-close="handleClose">
|
:before-close="handleClose">
|
||||||
<FormComponent ref="form" :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
<div class="sub-title" v-if="isManager || isFile" >隐患信息</div>
|
||||||
|
<FormComponent ref="form" :options="updateOptions" :isReadonly="isReadonly || ((isManager || isFile) && updateParams.status>1)" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||||
|
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="change"
|
||||||
|
btn-position="center"></FormComponent>
|
||||||
|
|
||||||
|
<div class="sub-title" v-if="((isManager || isFile) && updateParams.status>1 && !(updateParams.status===2 && isReadonly))
|
||||||
|
|| ((isManager || isFile) && updateParams.reformConfirmFlag!==null && updateParams.reformConfirmFlag!==undefined)" >隐患确认</div>
|
||||||
|
<FormComponent v-if="(isManager || isFile) && updateParams.status>1 && !(updateParams.status===2 && isReadonly)
|
||||||
|
|| ((isManager || isFile) && updateParams.reformConfirmFlag!==null && updateParams.reformConfirmFlag!==undefined)" :options="updateOptions2" :isReadonly="isReadonly || (isManager && updateParams.status>2)
|
||||||
|
|| ((isManager || isFile) && updateParams.status!==2 && updateParams.reformConfirmFlag!==null && updateParams.reformConfirmFlag!==undefined)"" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||||
|
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="change"
|
||||||
|
btn-position="center"></FormComponent>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="sub-title" v-if="((isManager || isFile) && updateParams.status>2 && !(updateParams.status===3 && isReadonly))
|
||||||
|
|| ((isManager || isFile) && updateParams.executeConfirmFlag!==null && updateParams.executeConfirmFlag!==undefined)" >隐患整改</div>
|
||||||
|
<FormComponent v-if="((isManager || isFile) && updateParams.status>2 && !(updateParams.status===3 && isReadonly))
|
||||||
|
|| ((isManager || isFile) && updateParams.executeConfirmFlag!==null && updateParams.executeConfirmFlag!==undefined)" :options="updateOptions3" :isReadonly="isReadonly || (isManager && updateParams.status>3)
|
||||||
|
|| ((isManager || isFile) && updateParams.status!==3 && updateParams.executeConfirmFlag!==null && updateParams.executeConfirmFlag!==undefined)" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||||
|
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="change"
|
||||||
|
btn-position="center"></FormComponent>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="sub-title" v-if="((isManager || isFile) && updateParams.status>3 && !(updateParams.status===4 && isReadonly))
|
||||||
|
|| ((isManager || isFile) && updateParams.verifyConfirmFlag!==null && updateParams.verifyConfirmFlag!==undefined)" >隐患验证</div>
|
||||||
|
<FormComponent v-if="(isManager && updateParams.status>3 && !(updateParams.status===4 && isReadonly))
|
||||||
|
|| ((isManager || isFile) && updateParams.verifyConfirmFlag!==null && updateParams.verifyConfirmFlag!==undefined)" :options="updateOptions4" :isReadonly="isReadonly || (isManager && updateParams.status>4)
|
||||||
|
|| ((isManager || isFile) && updateParams.status!==4 && updateParams.verifyConfirmFlag!==null && updateParams.verifyConfirmFlag!==undefined)" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||||
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="change"
|
@actionCallback="callback" :actions="updateActions" :full-btn="true" @change="change"
|
||||||
btn-position="center"></FormComponent>
|
btn-position="center"></FormComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
|
@ -8,15 +8,16 @@ import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||||
import ManagerService from "@/service/manager.service"
|
import ManagerService from "@/service/manager.service"
|
||||||
import FormOption from "hbt-common/models/formOptions"
|
import FormOption from "hbt-common/models/formOptions"
|
||||||
import BtnOption from "hbt-common/models/btnOptions"
|
import BtnOption from "hbt-common/models/btnOptions"
|
||||||
import DrawComponent from '@/components/draw.component.vue';
|
import MapComponent from "@/components/map.component.vue"
|
||||||
|
import mapboxgl from "mapbox-gl";
|
||||||
@Component({
|
@Component({
|
||||||
template,
|
template,
|
||||||
components:{
|
components:{
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
DrawComponent,
|
MapComponent
|
||||||
},
|
},
|
||||||
})
|
} as any)
|
||||||
export default class HiddenDangerFilesComponent extends BaseRecordComponent<any> {
|
export default class HiddenDangerFilesComponent extends BaseRecordComponent<any> {
|
||||||
public tableService = new ManagerService();
|
public tableService = new ManagerService();
|
||||||
|
|
||||||
|
@ -52,115 +53,80 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
|
||||||
public formOptions:FormOption<BtnOption>[] = [];
|
public formOptions:FormOption<BtnOption>[] = [];
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public currentId = -1;
|
|
||||||
public updateParams = {} as any;
|
public updateParams = {} as any;
|
||||||
public updateOptions:FormOption<BtnOption>[] = [{
|
public updateOptions:FormOption<BtnOption>[] = [];
|
||||||
name:"区域编号",
|
public updateActions = [];
|
||||||
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 showDraw = false;
|
|
||||||
|
|
||||||
public drawModel = "list";
|
|
||||||
|
|
||||||
|
|
||||||
public updateActions = [{
|
|
||||||
name:"取消",
|
|
||||||
value:"cancel"
|
|
||||||
},{
|
|
||||||
name:"保存并继续添加",
|
|
||||||
value:"saveAndContinue",
|
|
||||||
type:"primary"
|
|
||||||
},{
|
|
||||||
name:"保存",
|
|
||||||
value:"save",
|
|
||||||
type:"primary"
|
|
||||||
}];
|
|
||||||
|
|
||||||
public selectData = [];
|
public selectData = [];
|
||||||
|
public levelMap = ["","一般隐患","重大隐患"]
|
||||||
|
public reformModeMap = ["","即查即改","限期整改"];
|
||||||
|
public executeResultMap = ["","完成","降低标准完成","未完成","延期完成","延期未完成"];
|
||||||
|
public isReadonly = true
|
||||||
|
public isSureMap = ["未确认","确认"];
|
||||||
|
public isPassMap = ["不通过","通过"];
|
||||||
|
public isAcceptMap = ["不接受","接受"];
|
||||||
|
|
||||||
|
public fileList = [] as any;
|
||||||
|
public photoList = [] as any;
|
||||||
|
|
||||||
|
public fileList2 = [] as any;
|
||||||
|
public photoList2 = [] as any;
|
||||||
|
public showFile = false;
|
||||||
|
public currentUrl = null;
|
||||||
|
public center = [118.751353,31.969568];
|
||||||
|
public marker:any = null;
|
||||||
|
public map:any = null;
|
||||||
|
public showMap = false;
|
||||||
|
public executeResultList= [{
|
||||||
|
text:"完成",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
text:"降低标准完成",
|
||||||
|
value:2
|
||||||
|
},{
|
||||||
|
text:"未完成",
|
||||||
|
value:3
|
||||||
|
},{
|
||||||
|
text:"延期完成",
|
||||||
|
value:4,
|
||||||
|
},{
|
||||||
|
text:"延期未完成",
|
||||||
|
value:5
|
||||||
|
}];
|
||||||
|
|
||||||
created(){
|
created(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getTableData(){
|
||||||
|
this.tableService.selectByPage2(this.params).then(res=>{
|
||||||
|
this.tableData = res.data;
|
||||||
|
this.getTableCallback();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public getMap(map){
|
||||||
|
this.map = map;
|
||||||
|
this.addMarker();
|
||||||
|
}
|
||||||
|
public addMarker(){
|
||||||
|
this.marker = new mapboxgl.Marker({draggable:!this.isReadonly && this.updateParams.status<2})
|
||||||
|
.setLngLat(this.center)
|
||||||
|
.addTo(this.map);
|
||||||
|
this.map.flyTo({center:this.center})
|
||||||
|
}
|
||||||
|
|
||||||
|
public onDragEnd() {
|
||||||
|
const lngLat = this.marker.getLngLat();
|
||||||
|
this.updateParams.locationLng = lngLat.lng;
|
||||||
|
this.updateParams.locationLat = lngLat.lat;
|
||||||
|
this.center = [lngLat.lng,lngLat.lat]
|
||||||
|
// this.updateParams.locationName = lngLat.lng+","+lngLat.lat;
|
||||||
|
this.handleClose()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public getTableCallback(){
|
public getTableCallback(){
|
||||||
this.formOptions = [{
|
this.formOptions = [{
|
||||||
name:"隐患等级",
|
name:"隐患等级",
|
||||||
|
@ -190,20 +156,458 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
|
||||||
value:2
|
value:2
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
this.updateOptions = [{
|
||||||
|
name:"隐患编号",
|
||||||
|
key:"number",
|
||||||
|
disable:true,
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
type:"text"
|
||||||
|
},{
|
||||||
|
name:"隐患来源",
|
||||||
|
key:"source",
|
||||||
|
format:"sourceName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_danger_resource
|
||||||
|
},{
|
||||||
|
name:"隐患标题",
|
||||||
|
key:"title",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
type:"text"
|
||||||
|
},{
|
||||||
|
name:"隐患描述",
|
||||||
|
width:"100%",
|
||||||
|
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
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"整改方式",
|
||||||
|
key:"reformMode",
|
||||||
|
format:"reformModeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:[{
|
||||||
|
name:"即查即改",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
name:"限期整改",
|
||||||
|
value:2
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"隐患位置",
|
||||||
|
key:"locationName",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
unit:{
|
||||||
|
type:"btn",
|
||||||
|
name:(this.updateParams.status>1 || this.isReadonly)?"查看定位":"点击定位",
|
||||||
|
value:"fixed",
|
||||||
|
btnType:"primary"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
name:"隐患分类",
|
||||||
|
key:"classify",
|
||||||
|
format:"classifyName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_dangrous_type
|
||||||
|
},{
|
||||||
|
name:"整改部门",
|
||||||
|
key:"reformDeptId",
|
||||||
|
format:"reformDeptName",
|
||||||
|
type:"treeSelect",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
expandLevel:Infinity,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.deptTreeList
|
||||||
|
},{
|
||||||
|
name:"整改责任人",
|
||||||
|
key:"reformUserId",
|
||||||
|
format:"reformUserName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.userList,
|
||||||
|
},{
|
||||||
|
name:"验证人",
|
||||||
|
key:"verifyUserId",
|
||||||
|
format:"verifyUserName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.userList,
|
||||||
|
},{
|
||||||
|
name:"整改时限",
|
||||||
|
key:"reformDeadline",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
format:"yyyy-MM-dd HH",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
},{
|
||||||
|
name:"隐患照片",
|
||||||
|
key:"photo",
|
||||||
|
ref:"photo",
|
||||||
|
type:"upload",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
onSucess:this.onSuccess,
|
||||||
|
onMove:this.onRemove,
|
||||||
|
showError:false,
|
||||||
|
autoUpload:true,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
accept:"image/png, image/jpeg",
|
||||||
|
listType:"picture-card",
|
||||||
|
fileList:this.photoList,
|
||||||
|
icon:"el-icon-plus",
|
||||||
|
},{
|
||||||
|
name:"相关附件",
|
||||||
|
key:"file",
|
||||||
|
ref:"file",
|
||||||
|
type:"upload",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
onSucess:this.onSuccess2,
|
||||||
|
onMove:this.onRemove2,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
autoUpload:true,
|
||||||
|
accept:"image/png, image/jpeg,.doc,.docx,.xls,.xlsx,.pdf",
|
||||||
|
listType:"text",
|
||||||
|
tip:this.isReadonly?"":"请上传.pdf,.png,.jpg,.doc.docx,.xls,.xlsx格式文件",
|
||||||
|
fileList:this.fileList,
|
||||||
|
btn:[{
|
||||||
|
name:"上传",
|
||||||
|
value:"upload",
|
||||||
|
hide:this.isReadonly,
|
||||||
|
size:"small",
|
||||||
|
type:"primary"
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"隐患类别",
|
||||||
|
key:"dangerType",
|
||||||
|
format:"dangerTypeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_danger_type,
|
||||||
|
},{
|
||||||
|
name:"检查类型",
|
||||||
|
key:"inspectType",
|
||||||
|
format:"inspectTypeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_danger_check_type,
|
||||||
|
},{
|
||||||
|
name:"违章人数",
|
||||||
|
key:"violateNumber",
|
||||||
|
type:"number",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
},{
|
||||||
|
name:"专业分类",
|
||||||
|
key:"professionClassify",
|
||||||
|
format:"professionClassifyName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_major_type,
|
||||||
|
},{
|
||||||
|
name:"属性分类",
|
||||||
|
key:"attributeClassify",
|
||||||
|
format:"attributeClassifyName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_safe_reason,
|
||||||
|
},{
|
||||||
|
name:"发生环节",
|
||||||
|
key:"occurNode",
|
||||||
|
format:"occurNodeName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_occur_step,
|
||||||
|
},{
|
||||||
|
name:"违反规定条款",
|
||||||
|
key:"violateTerm",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
showError:false,
|
||||||
|
},{
|
||||||
|
name:"隐患整改要求",
|
||||||
|
key:"reformDemand",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
|
|
||||||
|
this.updateOptions2 = [{
|
||||||
|
name:"隐患确认",
|
||||||
|
key:"reformConfirmFlag",
|
||||||
|
format:"reformConfirmFlagName",
|
||||||
|
type:"radio",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.isSure
|
||||||
|
},{
|
||||||
|
name:"原因说明",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"reformReasonDescription",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.reformConfirmFlag,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入未确认原因"
|
||||||
|
},{
|
||||||
|
name:"治理人",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"executeUserId",
|
||||||
|
format:"executeUserName",
|
||||||
|
showError:false,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
datas:this.$store.state.userList
|
||||||
|
},{
|
||||||
|
name:"治理时限",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"executeDeadline",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
},{
|
||||||
|
name:"治理措施及要求",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeMeasure",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入治理措施与要求"
|
||||||
|
},{
|
||||||
|
name:"治理资金",
|
||||||
|
type:"number",
|
||||||
|
width:"35%",
|
||||||
|
key:"executeMoney",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
showError:false,
|
||||||
|
unit:{
|
||||||
|
name:"¥",
|
||||||
|
type:"text"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
name:"",
|
||||||
|
type:"textarea",
|
||||||
|
width:"calc(65% - 40px)",
|
||||||
|
key:"executeMoneySource",
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
placeholder:"请输入资金来源"
|
||||||
|
},{
|
||||||
|
name:"确认人",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
key:"realConfirmUserName",
|
||||||
|
require:true,
|
||||||
|
disable:true,
|
||||||
|
},{
|
||||||
|
name:"确认时间",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"realConfirmTime",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
|
this.updateOptions3 = [{
|
||||||
|
name:"接受确认",
|
||||||
|
key:"executeConfirmFlag",
|
||||||
|
format:"executeConfirmFlagName",
|
||||||
|
type:"radio",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.isAccept
|
||||||
|
},{
|
||||||
|
name:"整改结果",
|
||||||
|
key:"executeResult",
|
||||||
|
format:"executeResultName",
|
||||||
|
type:"radio",
|
||||||
|
hide:this.updateParams.executeConfirmFlag===0,
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.executeResultList
|
||||||
|
},{
|
||||||
|
name:"治理情况汇报",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeSituation",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.executeConfirmFlag===0,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入治理措施与要求"
|
||||||
|
},{
|
||||||
|
name:"原因说明",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeReasonDescription",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.executeConfirmFlag,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入未确认原因"
|
||||||
|
},{
|
||||||
|
name:"照片及相关附件",
|
||||||
|
key:"file2",
|
||||||
|
type:"upload",
|
||||||
|
hide:this.updateParams.executeConfirmFlag===0,
|
||||||
|
width:"100%",
|
||||||
|
showError:false,
|
||||||
|
onSucess:this.onSuccess3,
|
||||||
|
onMove:this.onRemove3,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
autoUpload:true,
|
||||||
|
accept:"image/png, image/jpeg,.doc,.docx,.xls,.xlsx,.pdf",
|
||||||
|
listType:"text",
|
||||||
|
tip:this.isReadonly?"":"请上传.pdf,.png,.jpg,.doc.docx,.xls,.xlsx格式文件",
|
||||||
|
fileList:this.fileList2,
|
||||||
|
btn:[{
|
||||||
|
name:"点击上传附件",
|
||||||
|
value:"upload",
|
||||||
|
hide:this.isReadonly,
|
||||||
|
size:"small",
|
||||||
|
type:"primary"
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"整改人",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
key:"realExecuteUserName",
|
||||||
|
require:true,
|
||||||
|
disable:true,
|
||||||
|
},{
|
||||||
|
name:"整改时间",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"realExecuteTime",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
|
this.updateOptions4 = [{
|
||||||
|
name:"验证结果",
|
||||||
|
key:"verifyConfirmFlag",
|
||||||
|
format:"verifyConfirmFlagName",
|
||||||
|
type:"radio",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.isPass
|
||||||
|
},{
|
||||||
|
name:"验证情况",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeReasonDescription",
|
||||||
|
hide:this.updateParams.executeConfirmFlag,
|
||||||
|
placeholder:"请输入验证情况"
|
||||||
|
},{
|
||||||
|
name:"照片",
|
||||||
|
key:"photo2",
|
||||||
|
type:"upload",
|
||||||
|
width:"100%",
|
||||||
|
onSucess:this.onSuccess4,
|
||||||
|
onMove:this.onRemove4,
|
||||||
|
autoUpload:true,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
accept:"image/png, image/jpeg",
|
||||||
|
listType:"picture-card",
|
||||||
|
fileList:this.photoList2,
|
||||||
|
icon:"el-icon-plus",
|
||||||
|
},{
|
||||||
|
name:"验证人",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
key:"realVerifyUserName",
|
||||||
|
require:true,
|
||||||
|
disable:true,
|
||||||
|
},{
|
||||||
|
name:"验证时间",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"realVerifyTime",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable(){
|
public buildTable(){
|
||||||
this.tableColumn.push({name:'隐患整改状态',key:"areaName"});
|
this.tableColumn.push({name:'隐患整改状态',width:"120",filters:[{text:"已整改",value:5},{text:"已作废",value:7},{text:"整改中",value:0}],filterMethod:(data,row)=>{
|
||||||
this.tableColumn.push({name:'隐患来源',key:"deptName"});
|
return row.status == data;
|
||||||
this.tableColumn.push({name:'隐患标题',key:"person"});
|
},render:(data)=>{
|
||||||
this.tableColumn.push({name:'隐患描述',key:"isDangrous"});
|
if(data.status===5){
|
||||||
this.tableColumn.push({name:'隐患等级',key:"isDangrous"});
|
return "已整改"
|
||||||
this.tableColumn.push({name:'隐患分类',key:"isDangrous"});
|
}else if(data.status===7){
|
||||||
this.tableColumn.push({name:'整改方式',key:"isDangrous"});
|
return "已作废"
|
||||||
this.tableColumn.push({name:'隐患位置',key:"isDangrous"});
|
}else{
|
||||||
this.tableColumn.push({name:'治理责任人',key:"isDangrous"});
|
return "整改中"
|
||||||
this.tableColumn.push({name:'整改结果',key:"isDangrous"});
|
}
|
||||||
this.tableColumn.push({name:'整改时限',key:"isDangrous"});
|
}});
|
||||||
|
this.tableColumn.push({name:'隐患来源',width:"150",render:(data)=>this.$store.getters.prevention_danger_resource_map[data.source]});
|
||||||
|
this.tableColumn.push({name:'隐患标题',width:"150",key:"title"});
|
||||||
|
this.tableColumn.push({name:'隐患描述',width:"150",key:"description"});
|
||||||
|
this.tableColumn.push({name:'隐患等级',render:(data)=>this.levelMap[data.level]});
|
||||||
|
this.tableColumn.push({name:'隐患分类',render:(data)=>this.$store.getters.prevention_dangrous_type_map[data.dangerType]});
|
||||||
|
this.tableColumn.push({name:'整改方式',render:(data)=>this.reformModeMap[data.reformMode]});
|
||||||
|
this.tableColumn.push({name:'隐患位置',width:"150",key:"locationName"});
|
||||||
|
this.tableColumn.push({name:'治理责任人',width:"150",key:"executeUserName"});
|
||||||
|
this.tableColumn.push({name:'整改结果',width:"150",filters:this.executeResultList,filterMethod:(data,row)=>{
|
||||||
|
return row.executeResult == data;
|
||||||
|
},render:(data)=>this.executeResultMap[data.executeResult]});
|
||||||
|
this.tableColumn.push({name:'整改时限',width:"100",key:"reformDeadline"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public callback(data){
|
public callback(data){
|
||||||
|
@ -219,16 +623,11 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
|
||||||
// 全选
|
// 全选
|
||||||
}else if(data.value === "selectAll"){
|
}else if(data.value === "selectAll"){
|
||||||
this.selectAll()
|
this.selectAll()
|
||||||
}else if(data.value === "add"){
|
|
||||||
this.showUpdateModel(-1)
|
|
||||||
}else if(data.value === "delete"){
|
}else if(data.value === "delete"){
|
||||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||||
}else if(data.value === "draw"){
|
}else if(data.value ==="fixed"){
|
||||||
this.drawModel = "area";
|
this.showMap = true
|
||||||
this.showDraw = true;
|
|
||||||
}else if(data.value === "drawList"){
|
|
||||||
this.drawModel = "list";
|
|
||||||
this.showDraw = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 重置数据
|
// 重置数据
|
||||||
|
@ -241,14 +640,71 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public showUpdateModel(id){
|
public showUpdateModel(row){
|
||||||
if(id!==-1){
|
Object.assign(this.updateParams,{
|
||||||
|
verifyConfirmFlagName:this.isPassMap[row.verifyConfirmFlag],
|
||||||
|
executeConfirmFlagName:this.isAcceptMap[row.executeConfirmFlag],
|
||||||
|
reformConfirmFlagName:this.isSureMap[row.reformConfirmFlag],
|
||||||
|
executeResultName:this.executeResultMap[row.executeResult],
|
||||||
|
sourceName:this.$store.getters.prevention_danger_resource_map[row.source],
|
||||||
|
attributeClassifyName:this.$store.getters.prevention_safe_reason_map[row.attributeClassify],
|
||||||
|
classifyName:this.$store.getters.prevention_dangrous_type_map[row.classify],
|
||||||
|
dangerTypeName:this.$store.getters.prevention_danger_type_map[row.dangerType],
|
||||||
|
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
||||||
|
levelName:this.levelMap[row.level],
|
||||||
|
occurNodeName:this.$store.getters.prevention_occur_step_map[row.occurNode],
|
||||||
|
professionClassifyName:this.$store.getters.prevention_major_type_map[row.professionClassify],
|
||||||
|
reformModeName:this.reformModeMap[row.reformMode],
|
||||||
|
},row);
|
||||||
|
|
||||||
|
this.getTableCallback()
|
||||||
|
// 获取url
|
||||||
|
if(row.resourceId){
|
||||||
|
this.tableService.getFileUrls({ids:row.resourceId.split(",")}).then((photos:any)=>{
|
||||||
|
this.photoList = photos.data.map(item=>{
|
||||||
|
return {
|
||||||
|
name:item.originalName,
|
||||||
|
url:item.url,
|
||||||
|
type:item.type,
|
||||||
|
id:item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
this.getTableCallback()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(row.resourceOtherId){
|
||||||
|
this.tableService.getFileUrls({ids:row.resourceOtherId.split(",")}).then((files:any)=>{
|
||||||
|
this.fileList = files.data.map(item=>{
|
||||||
|
return {
|
||||||
|
name:item.originalName,
|
||||||
|
url:item.url,
|
||||||
|
type:item.type,
|
||||||
|
id:item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getTableCallback()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.showUpdate = true
|
||||||
|
}
|
||||||
|
public onPreview(file){
|
||||||
|
if(file.type.indexOf("png")>=0 || file.type.indexOf("jp")>=0){
|
||||||
|
this.currentUrl = file.url;
|
||||||
|
this.showFile = true;
|
||||||
|
}else{
|
||||||
|
window.open(file.url,"_blank")
|
||||||
}
|
}
|
||||||
this.currentId = id;
|
|
||||||
this.showUpdate = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleClose(){
|
public handleClose(){
|
||||||
|
if(this.showMap){
|
||||||
|
this.showMap = false;
|
||||||
|
this.marker.remove();
|
||||||
|
this.marker = null;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.updateParams = {} as any
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,10 +5,9 @@ import template from "./common.component.html"
|
||||||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
|
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
|
||||||
import FormComponent from "hbt-common/components/common/form.component.vue"
|
import FormComponent from "hbt-common/components/common/form.component.vue"
|
||||||
import TableComponent from "hbt-common/components/common/table.component.vue"
|
import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||||
import AreaService from "@/service/area.service"
|
import WorkFlowService from "@/service/workFlow.service"
|
||||||
import FormOption from "hbt-common/models/formOptions"
|
import FormOption from "hbt-common/models/formOptions"
|
||||||
import BtnOption from "hbt-common/models/btnOptions"
|
import BtnOption from "hbt-common/models/btnOptions"
|
||||||
import DrawComponent from '@/components/draw.component.vue';
|
|
||||||
import MapComponent from "@/components/map.component.vue"
|
import MapComponent from "@/components/map.component.vue"
|
||||||
import ManagerService from '@/service/manager.service';
|
import ManagerService from '@/service/manager.service';
|
||||||
import mapboxgl from "mapbox-gl";
|
import mapboxgl from "mapbox-gl";
|
||||||
|
@ -18,12 +17,12 @@ import moment from 'moment';
|
||||||
components:{
|
components:{
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
DrawComponent,
|
|
||||||
MapComponent
|
MapComponent
|
||||||
},
|
},
|
||||||
})
|
} as any)
|
||||||
export default class HiddenDangerManagerComponent extends BaseRecordComponent<any> {
|
export default class HiddenDangerManagerComponent extends BaseRecordComponent<any> {
|
||||||
public tableService = new ManagerService();
|
public tableService = new ManagerService();
|
||||||
|
public workFlowService = new WorkFlowService()
|
||||||
// 是否显示删改查按钮
|
// 是否显示删改查按钮
|
||||||
public isBase = true;
|
public isBase = true;
|
||||||
// 显示治理列表按钮
|
// 显示治理列表按钮
|
||||||
|
@ -32,8 +31,11 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
public tableActionWidth="370";
|
public tableActionWidth="370";
|
||||||
|
|
||||||
public isReadonly = false;
|
public isReadonly = false;
|
||||||
|
public account = JSON.parse(localStorage.getItem("account") as string);
|
||||||
|
|
||||||
public params = {} as any;
|
public params = {
|
||||||
|
type:1
|
||||||
|
} as any;
|
||||||
|
|
||||||
public formActions = [{
|
public formActions = [{
|
||||||
name:"查询",
|
name:"查询",
|
||||||
|
@ -45,35 +47,50 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
icon:"el-icon-tickets",
|
icon:"el-icon-tickets",
|
||||||
value:"reset"
|
value:"reset"
|
||||||
}];
|
}];
|
||||||
public tableActions = [{
|
public tableActions = [] as any;
|
||||||
name:"添加",
|
public footerActions = [] as any;
|
||||||
value:"add",
|
|
||||||
icon:"el-icon-plus",
|
public isSure = [{
|
||||||
type:"primary"
|
name:"确认",
|
||||||
|
value:1
|
||||||
},{
|
},{
|
||||||
name:"批量删除",
|
name:"未确认",
|
||||||
value:"delete",
|
value:0
|
||||||
plain:true,
|
}]
|
||||||
icon:"el-icon-delete",
|
public isSureMap = ["未确认","确认"];
|
||||||
type:"danger"
|
|
||||||
}];
|
public isPass = [{
|
||||||
public footerActions = [{
|
name:"通过",
|
||||||
name:"选择全部",
|
value:1
|
||||||
value:"selectAll",
|
|
||||||
type:"primary"
|
|
||||||
},{
|
},{
|
||||||
name:"反向选择",
|
name:"不通过",
|
||||||
value:"reverse"
|
value:0
|
||||||
}];
|
}]
|
||||||
|
public isPassMap = ["不通过","通过"];
|
||||||
|
|
||||||
|
public isAccept = [{
|
||||||
|
name:"接受",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
name:"不接受",
|
||||||
|
value:0
|
||||||
|
}]
|
||||||
|
public isAcceptMap = ["不接受","接受"];
|
||||||
public formOptions:FormOption<BtnOption>[] = [];
|
public formOptions:FormOption<BtnOption>[] = [];
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public currentId = -1;
|
public currentId = -1;
|
||||||
public updateParams = {} as any;
|
public updateParams = {} as any;
|
||||||
public updateOptions:FormOption<BtnOption>[] = [];
|
public updateOptions:FormOption<BtnOption>[] = [];
|
||||||
|
public updateOptions2:FormOption<BtnOption>[] = [];
|
||||||
|
public updateOptions3:FormOption<BtnOption>[] = [];
|
||||||
|
public updateOptions4:FormOption<BtnOption>[] = [];
|
||||||
|
|
||||||
public fileList = [] as any;
|
public fileList = [] as any;
|
||||||
public photoList = [] as any;
|
public photoList = [] as any;
|
||||||
|
|
||||||
|
public fileList2 = [] as any;
|
||||||
|
public photoList2 = [] as any;
|
||||||
public showFile = false;
|
public showFile = false;
|
||||||
public currentUrl = null;
|
public currentUrl = null;
|
||||||
public center = [118.751353,31.969568];
|
public center = [118.751353,31.969568];
|
||||||
|
@ -81,28 +98,93 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
public map:any = null;
|
public map:any = null;
|
||||||
public showMap = false;
|
public showMap = false;
|
||||||
|
|
||||||
|
public statusMap = {0:"草稿",1:"上报",2:"隐患确认",3:"隐患治理",4:"隐患验收",5:"已闭环",6:"流程中断",7:"已作废"};
|
||||||
|
public tabs = [{
|
||||||
|
name:"草稿",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
name:"待办",
|
||||||
|
value:2
|
||||||
|
},{
|
||||||
|
name:"已办",
|
||||||
|
value:3
|
||||||
|
},{
|
||||||
|
name:"我发起的",
|
||||||
|
value:4
|
||||||
|
},{name:"作废",value:5}]
|
||||||
|
|
||||||
public updateActions = [{
|
|
||||||
name:"取消",
|
public updateActions = [] as any;
|
||||||
value:"cancel"
|
|
||||||
},{
|
|
||||||
name:"提交",
|
|
||||||
value:"submit",
|
|
||||||
type:"primary"
|
|
||||||
},{
|
|
||||||
name:"保存",
|
|
||||||
value:"draft",
|
|
||||||
type:"primary"
|
|
||||||
}];
|
|
||||||
|
|
||||||
public selectData = [];
|
public selectData = [];
|
||||||
|
|
||||||
|
public levelMap = ["","一般隐患","重大隐患"]
|
||||||
|
public reformModeMap = ["","即查即改","限期整改"];
|
||||||
|
public executeResultMap = ["","完成","降低标准完成","未完成","延期完成","延期未完成"];
|
||||||
|
public executeResultList= [{
|
||||||
|
name:"完成",
|
||||||
|
value:1
|
||||||
|
},{
|
||||||
|
name:"降低标准完成",
|
||||||
|
value:2
|
||||||
|
},{
|
||||||
|
name:"未完成",
|
||||||
|
value:3
|
||||||
|
},{
|
||||||
|
name:"延期完成",
|
||||||
|
value:4,
|
||||||
|
},{
|
||||||
|
name:"延期未完成",
|
||||||
|
value:5
|
||||||
|
}];
|
||||||
|
|
||||||
|
|
||||||
created(){
|
created(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public tabTableChange(){
|
||||||
|
this.params.pageNum=1;
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public getTableCallback(){
|
public getTableCallback(){
|
||||||
|
this.tableActions = [{
|
||||||
|
name:"添加",
|
||||||
|
value:"add",
|
||||||
|
icon:"el-icon-plus",
|
||||||
|
type:"primary"
|
||||||
|
},{
|
||||||
|
name:"批量删除",
|
||||||
|
value:"delete",
|
||||||
|
plain:true,
|
||||||
|
hide:this.params.type!==1,
|
||||||
|
icon:"el-icon-delete",
|
||||||
|
type:"danger"
|
||||||
|
}] as any
|
||||||
|
this.footerActions = [{
|
||||||
|
name:"选择全部",
|
||||||
|
value:"selectAll",
|
||||||
|
hide:this.params.type!==1,
|
||||||
|
type:"primary"
|
||||||
|
},{
|
||||||
|
name:"反向选择",
|
||||||
|
hide:this.params.type!==1,
|
||||||
|
value:"reverse"
|
||||||
|
}];
|
||||||
|
this.updateActions = [{
|
||||||
|
name:"取消",
|
||||||
|
value:"cancel"
|
||||||
|
},{
|
||||||
|
name:"保存",
|
||||||
|
value:"draft",
|
||||||
|
hide:this.updateParams.status>1,
|
||||||
|
type:"primary"
|
||||||
|
},{
|
||||||
|
name:"提交",
|
||||||
|
value:"submit",
|
||||||
|
type:"primary"
|
||||||
|
}];
|
||||||
this.formOptions = [{
|
this.formOptions = [{
|
||||||
name:"隐患等级",
|
name:"隐患等级",
|
||||||
key:"level",
|
key:"level",
|
||||||
|
@ -136,10 +218,19 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
name:"隐患编号",
|
name:"隐患编号",
|
||||||
key:"number",
|
key:"number",
|
||||||
disable:true,
|
disable:true,
|
||||||
width:"100%",
|
width:"calc(50% - 20px)",
|
||||||
require:true,
|
require:true,
|
||||||
showError:false,
|
showError:false,
|
||||||
type:"text"
|
type:"text"
|
||||||
|
},{
|
||||||
|
name:"隐患来源",
|
||||||
|
key:"source",
|
||||||
|
format:"sourceName",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.$store.state.prevention_danger_resource
|
||||||
},{
|
},{
|
||||||
name:"隐患标题",
|
name:"隐患标题",
|
||||||
key:"title",
|
key:"title",
|
||||||
|
@ -193,7 +284,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
showError:false,
|
showError:false,
|
||||||
unit:{
|
unit:{
|
||||||
type:"btn",
|
type:"btn",
|
||||||
name:this.isReadonly?"查看定位":"点击定位",
|
name:(this.updateParams.status>1 || this.isReadonly)?"查看定位":"点击定位",
|
||||||
value:"fixed",
|
value:"fixed",
|
||||||
btnType:"primary"
|
btnType:"primary"
|
||||||
}
|
}
|
||||||
|
@ -342,23 +433,304 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
width:"100%",
|
width:"100%",
|
||||||
showError:false,
|
showError:false,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
this.updateOptions2 = [{
|
||||||
|
name:"隐患确认",
|
||||||
|
key:"reformConfirmFlag",
|
||||||
|
format:"reformConfirmFlagName",
|
||||||
|
type:"radio",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.isSure
|
||||||
|
},{
|
||||||
|
name:"原因说明",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"reformReasonDescription",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.reformConfirmFlag,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入未确认原因"
|
||||||
|
},{
|
||||||
|
name:"治理人",
|
||||||
|
type:"select",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"executeUserId",
|
||||||
|
format:"executeUserName",
|
||||||
|
showError:false,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
datas:this.$store.state.userList
|
||||||
|
},{
|
||||||
|
name:"治理时限",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"executeDeadline",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
},{
|
||||||
|
name:"治理措施及要求",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeMeasure",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入治理措施与要求"
|
||||||
|
},{
|
||||||
|
name:"治理资金",
|
||||||
|
type:"number",
|
||||||
|
width:"35%",
|
||||||
|
key:"executeMoney",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
showError:false,
|
||||||
|
unit:{
|
||||||
|
name:"¥",
|
||||||
|
type:"text"
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
name:"",
|
||||||
|
type:"textarea",
|
||||||
|
width:"calc(65% - 40px)",
|
||||||
|
key:"executeMoneySource",
|
||||||
|
hide:this.updateParams.reformConfirmFlag===0,
|
||||||
|
placeholder:"请输入资金来源"
|
||||||
|
},{
|
||||||
|
name:"确认人",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
key:"realConfirmUserName",
|
||||||
|
require:true,
|
||||||
|
disable:true,
|
||||||
|
},{
|
||||||
|
name:"确认时间",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"realConfirmTime",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
|
this.updateOptions3 = [{
|
||||||
|
name:"接受确认",
|
||||||
|
key:"executeConfirmFlag",
|
||||||
|
format:"executeConfirmFlagName",
|
||||||
|
type:"radio",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.isAccept
|
||||||
|
},{
|
||||||
|
name:"整改结果",
|
||||||
|
key:"executeResult",
|
||||||
|
format:"executeResultName",
|
||||||
|
type:"radio",
|
||||||
|
hide:this.updateParams.executeConfirmFlag===0,
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.executeResultList
|
||||||
|
},{
|
||||||
|
name:"治理情况汇报",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeSituation",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.executeConfirmFlag===0,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入治理措施与要求"
|
||||||
|
},{
|
||||||
|
name:"原因说明",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeReasonDescription",
|
||||||
|
require:true,
|
||||||
|
hide:this.updateParams.executeConfirmFlag,
|
||||||
|
showError:false,
|
||||||
|
placeholder:"请输入未确认原因"
|
||||||
|
},{
|
||||||
|
name:"照片及相关附件",
|
||||||
|
key:"file2",
|
||||||
|
type:"upload",
|
||||||
|
hide:this.updateParams.executeConfirmFlag===0,
|
||||||
|
width:"100%",
|
||||||
|
showError:false,
|
||||||
|
onSucess:this.onSuccess3,
|
||||||
|
onMove:this.onRemove3,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
autoUpload:true,
|
||||||
|
accept:"image/png, image/jpeg,.doc,.docx,.xls,.xlsx,.pdf",
|
||||||
|
listType:"text",
|
||||||
|
tip:this.isReadonly?"":"请上传.pdf,.png,.jpg,.doc.docx,.xls,.xlsx格式文件",
|
||||||
|
fileList:this.fileList2,
|
||||||
|
btn:[{
|
||||||
|
name:"点击上传附件",
|
||||||
|
value:"upload",
|
||||||
|
hide:this.isReadonly,
|
||||||
|
size:"small",
|
||||||
|
type:"primary"
|
||||||
|
}]
|
||||||
|
},{
|
||||||
|
name:"整改人",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
key:"realExecuteUserName",
|
||||||
|
require:true,
|
||||||
|
disable:true,
|
||||||
|
},{
|
||||||
|
name:"整改时间",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"realExecuteTime",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
|
this.updateOptions4 = [{
|
||||||
|
name:"验证结果",
|
||||||
|
key:"verifyConfirmFlag",
|
||||||
|
format:"verifyConfirmFlagName",
|
||||||
|
type:"radio",
|
||||||
|
width:"100%",
|
||||||
|
require:true,
|
||||||
|
showError:false,
|
||||||
|
datas:this.isPass
|
||||||
|
},{
|
||||||
|
name:"验证情况",
|
||||||
|
type:"textarea",
|
||||||
|
width:"100%",
|
||||||
|
key:"executeReasonDescription",
|
||||||
|
hide:this.updateParams.executeConfirmFlag,
|
||||||
|
placeholder:"请输入验证情况"
|
||||||
|
},{
|
||||||
|
name:"照片",
|
||||||
|
key:"photo2",
|
||||||
|
type:"upload",
|
||||||
|
width:"100%",
|
||||||
|
onSucess:this.onSuccess4,
|
||||||
|
onMove:this.onRemove4,
|
||||||
|
autoUpload:true,
|
||||||
|
onPreview:this.onPreview,
|
||||||
|
accept:"image/png, image/jpeg",
|
||||||
|
listType:"picture-card",
|
||||||
|
fileList:this.photoList2,
|
||||||
|
icon:"el-icon-plus",
|
||||||
|
},{
|
||||||
|
name:"验证人",
|
||||||
|
type:"text",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
key:"realVerifyUserName",
|
||||||
|
require:true,
|
||||||
|
disable:true,
|
||||||
|
},{
|
||||||
|
name:"验证时间",
|
||||||
|
type:"date",
|
||||||
|
subType:"datetime",
|
||||||
|
width:"calc(50% - 20px)",
|
||||||
|
require:true,
|
||||||
|
key:"realVerifyTime",
|
||||||
|
format:"yyyy-MM-dd HH:mm",
|
||||||
|
showError:false,
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable(){
|
public buildTable(){
|
||||||
this.tableColumn.push({name:'序号',key:"areaName"});
|
this.tableColumn.push({name:'状态',render:(data)=>this.statusMap[data.status]});
|
||||||
this.tableColumn.push({name:'状态',key:"areaName"});
|
this.tableColumn.push({name:'当前执行人',width:"100",key:"executor"});
|
||||||
this.tableColumn.push({name:'当前执行人',key:"deptName"});
|
this.tableColumn.push({name:'最新提交时间',width:"180",key:"updateTime"});
|
||||||
this.tableColumn.push({name:'最新提交时间',key:"person"});
|
this.tableColumn.push({name:'隐患来源',width:"150",render:(data)=>this.$store.getters.prevention_danger_resource_map[data.source]});
|
||||||
this.tableColumn.push({name:'隐患来源',key:"isDangrous"});
|
this.tableColumn.push({name:'隐患标题',width:"150",render:(data)=>{
|
||||||
this.tableColumn.push({name:'隐患标题',key:"isDangrous"});
|
if(this.params.type===2){
|
||||||
this.tableColumn.push({name:'隐患描述',key:"isDangrous"});
|
return `<span class="link">${data.title}</span>`
|
||||||
this.tableColumn.push({name:'隐患等级',key:"isDangrous"});
|
}else{
|
||||||
this.tableColumn.push({name:'隐患分类',key:"isDangrous"});
|
return data.title
|
||||||
this.tableColumn.push({name:'整改方式',key:"isDangrous"});
|
}
|
||||||
this.tableColumn.push({name:'隐患位置',key:"isDangrous"});
|
}});
|
||||||
this.tableColumn.push({name:'治理责任人',key:"isDangrous"});
|
this.tableColumn.push({name:'隐患描述',key:"description"});
|
||||||
this.tableColumn.push({name:'整改结果',key:"isDangrous"});
|
this.tableColumn.push({name:'隐患等级',render:(data)=>this.levelMap[data.level]});
|
||||||
this.tableColumn.push({name:'整改时限',key:"isDangrous"});
|
this.tableColumn.push({name:'隐患分类',render:(data)=>this.$store.getters.prevention_dangrous_type_map[data.dangerType]});
|
||||||
|
this.tableColumn.push({name:'整改方式',render:(data)=>this.reformModeMap[data.reformMode]});
|
||||||
|
this.tableColumn.push({name:'隐患位置',width:"150",key:"locationName"});
|
||||||
|
this.tableColumn.push({name:'治理责任人',width:"100",key:"executeUserName"});
|
||||||
|
this.tableColumn.push({name:'整改结果',render:(data)=>this.executeResultMap[data.executeResult]});
|
||||||
|
this.tableColumn.push({name:'整改时限',width:"100",key:"reformDeadline"});
|
||||||
|
}
|
||||||
|
|
||||||
|
public rowCallback(el,data){
|
||||||
|
const isTarget = el.target.classList.contains("link");
|
||||||
|
if(isTarget){
|
||||||
|
if(data.status===2){
|
||||||
|
data = Object.assign({
|
||||||
|
realConfirmUserId:this.account.userId,
|
||||||
|
realConfirmUserName:this.account.nickName,
|
||||||
|
realConfirmTime:moment().format("YYYY-MM-DD HH:mm")
|
||||||
|
},data)
|
||||||
|
}
|
||||||
|
if(data.status===3){
|
||||||
|
data = Object.assign({
|
||||||
|
realExecuteUserId:this.account.userId,
|
||||||
|
realExecuteUserName:this.account.nickName,
|
||||||
|
realExecuteTime:moment().format("YYYY-MM-DD HH:mm")
|
||||||
|
},data)
|
||||||
|
}
|
||||||
|
if(data.status===4){
|
||||||
|
data = Object.assign({
|
||||||
|
realVerifyUserId:this.account.userId,
|
||||||
|
realVerifyUserName:this.account.nickName,
|
||||||
|
realVerifyTime:moment().format("YYYY-MM-DD HH:mm")
|
||||||
|
},data)
|
||||||
|
}
|
||||||
|
this.showUpdateModel(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public changeStatus(data,newStatus){
|
||||||
|
this.$confirm("确认要"+(newStatus>60?"中断数据?":newStatus===7?"作废数据?":"恢复数据"),"操作确认",{
|
||||||
|
type: 'warning'
|
||||||
|
}).then(()=>{
|
||||||
|
data.status = newStatus;
|
||||||
|
this.tableService.addOrUpdate(data,false).then(res=>{
|
||||||
|
this.$message.success(newStatus>60?"中断成功":"作废成功");
|
||||||
|
this.getTableData()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public change(data,item){
|
||||||
|
if(item && (item.key === "reformConfirmFlag" || item.key==="executeConfirmFlag")){
|
||||||
|
this.getTableCallback()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(item && item.key === "inspectUserId"){
|
||||||
|
this.updateParams.inspectUserName = this.$store.getters.user_map[data]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(item && item.key === "executeUserId"){
|
||||||
|
this.updateParams.executeUserName = this.$store.getters.user_map[data]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(item && item.key === "reformDeptId"){
|
||||||
|
this.updateParams.reformDeptName = this.$store.getters.dept_map[data]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(item && item.key === "reformUserId"){
|
||||||
|
this.updateParams.reformUserName = this.$store.getters.user_map[data]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(item && item.key === "verifyUserId"){
|
||||||
|
this.updateParams.verifyUserName = this.$store.getters.user_map[data]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public callback(data){
|
public callback(data){
|
||||||
|
@ -375,12 +747,15 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
}else if(data.value === "selectAll"){
|
}else if(data.value === "selectAll"){
|
||||||
this.selectAll()
|
this.selectAll()
|
||||||
}else if(data.value === "add"){
|
}else if(data.value === "add"){
|
||||||
this.showUpdateModel(-1)
|
this.showUpdateModel()
|
||||||
}else if(data.value === "delete"){
|
}else if(data.value === "delete"){
|
||||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||||
}else if(data.value ==="fixed"){
|
}else if(data.value ==="fixed"){
|
||||||
this.showMap = true
|
this.showMap = true
|
||||||
|
|
||||||
|
}else if(data.value ==="draft" || data.value==="submit"){
|
||||||
|
this.doSave(data.value==="submit");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 重置数据
|
// 重置数据
|
||||||
|
@ -393,11 +768,187 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public showUpdateModel(id){
|
public showUpdateModel(row?,isRead?){
|
||||||
if(id!==-1){
|
this.isReadonly = !!isRead
|
||||||
|
this.updateParams = {status:0} as any;
|
||||||
|
if(!row){
|
||||||
|
this.tableService.getNumber().then(res=>{
|
||||||
|
this.updateParams.number = res.data
|
||||||
|
this.getTableCallback();
|
||||||
|
this.showUpdate = true
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
Object.assign(this.updateParams,{
|
||||||
|
verifyConfirmFlagName:this.isPassMap[row.verifyConfirmFlag],
|
||||||
|
executeConfirmFlagName:this.isAcceptMap[row.executeConfirmFlag],
|
||||||
|
reformConfirmFlagName:this.isSureMap[row.reformConfirmFlag],
|
||||||
|
executeResultName:this.executeResultMap[row.executeResult],
|
||||||
|
sourceName:this.$store.getters.prevention_danger_resource_map[row.source],
|
||||||
|
attributeClassifyName:this.$store.getters.prevention_safe_reason_map[row.attributeClassify],
|
||||||
|
classifyName:this.$store.getters.prevention_dangrous_type_map[row.classify],
|
||||||
|
dangerTypeName:this.$store.getters.prevention_danger_type_map[row.dangerType],
|
||||||
|
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
||||||
|
levelName:this.levelMap[row.level],
|
||||||
|
occurNodeName:this.$store.getters.prevention_occur_step_map[row.occurNode],
|
||||||
|
professionClassifyName:this.$store.getters.prevention_major_type_map[row.professionClassify],
|
||||||
|
reformModeName:this.reformModeMap[row.reformMode],
|
||||||
|
},row);
|
||||||
|
|
||||||
|
this.getTableCallback()
|
||||||
|
// 获取url
|
||||||
|
if(row.resourceId){
|
||||||
|
this.tableService.getFileUrls({ids:row.resourceId.split(",")}).then((photos:any)=>{
|
||||||
|
this.photoList = photos.data.map(item=>{
|
||||||
|
return {
|
||||||
|
name:item.originalName,
|
||||||
|
url:item.url,
|
||||||
|
type:item.type,
|
||||||
|
id:item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(!this.isReadonly && this.updateParams.status<2){
|
||||||
|
this.updateParams.photo = this.photoList.length
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getTableCallback()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(row.resourceOtherId){
|
||||||
|
this.tableService.getFileUrls({ids:row.resourceOtherId.split(",")}).then((files:any)=>{
|
||||||
|
this.fileList = files.data.map(item=>{
|
||||||
|
return {
|
||||||
|
name:item.originalName,
|
||||||
|
url:item.url,
|
||||||
|
type:item.type,
|
||||||
|
id:item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.getTableCallback()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.showUpdate = true
|
||||||
}
|
}
|
||||||
this.currentId = id;
|
}
|
||||||
this.showUpdate = true
|
|
||||||
|
public doSave(isSubmit){
|
||||||
|
// 如果是提交 状态直接改成2变成代办 防止隐患确认退回变成草稿
|
||||||
|
// 从草稿或者新创建的 要记住 走startWorkFlow
|
||||||
|
// 从状态1 上报来不走startWorkFlow
|
||||||
|
let preStatus = this.updateParams.status;
|
||||||
|
const handleParams = {
|
||||||
|
"taskId": this.updateParams.taskId,
|
||||||
|
"btnValue": "agree_",
|
||||||
|
"message": "",
|
||||||
|
"esignature": "",
|
||||||
|
"esignature_pwd": null,
|
||||||
|
"forwarderList": "[]",
|
||||||
|
"formValue": "[]",
|
||||||
|
"keyValue": JSON.stringify([{
|
||||||
|
F_Id:this.updateParams.id,
|
||||||
|
F_FormId:1742822461669376,
|
||||||
|
F_Type:2,
|
||||||
|
F_UrlAddress:"ceshi1"
|
||||||
|
}]),
|
||||||
|
"rejectNodeId": null,
|
||||||
|
"userJson": "[]",
|
||||||
|
"fileValue": []
|
||||||
|
}
|
||||||
|
let userIds = [] as any;
|
||||||
|
if(!preStatus || preStatus===1){
|
||||||
|
this.updateParams.status = 2;
|
||||||
|
userIds = [this.updateParams.reformUserId]
|
||||||
|
}else if(preStatus===2){
|
||||||
|
// 确认下一步 退回上一步
|
||||||
|
if(this.updateParams.reformConfirmFlag){
|
||||||
|
this.updateParams.status+=1;
|
||||||
|
userIds = [this.updateParams.executeUserId]
|
||||||
|
}else{
|
||||||
|
this.updateParams.status-=1;
|
||||||
|
handleParams.btnValue = "reject_"
|
||||||
|
handleParams.rejectNodeId = "Activity_1r5fgcn" as any;
|
||||||
|
}
|
||||||
|
}else if(preStatus===3){
|
||||||
|
// 确认下一步 退回上一步
|
||||||
|
if(this.updateParams.executeConfirmFlag){
|
||||||
|
this.updateParams.status+=1
|
||||||
|
userIds = [this.updateParams.verifyUserId]
|
||||||
|
}else{
|
||||||
|
this.updateParams.status-=1
|
||||||
|
handleParams.btnValue = "reject_"
|
||||||
|
handleParams.rejectNodeId = "Activity_1ue7dkh" as any;
|
||||||
|
}
|
||||||
|
}else if(preStatus===4){
|
||||||
|
// 确认下一步 退回上一步
|
||||||
|
if(this.updateParams.verifyConfirmFlag){
|
||||||
|
this.updateParams.status+=1
|
||||||
|
}else{
|
||||||
|
this.updateParams.status-=1
|
||||||
|
handleParams.btnValue = "reject_"
|
||||||
|
handleParams.rejectNodeId = "Activity_1exiors" as any;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.updateParams.resourceId = this.photoList.map(item=>item.id).join(",")
|
||||||
|
this.updateParams.resourceName = this.photoList.map(item=>item.name).join(",")
|
||||||
|
this.updateParams.resourceOtherId = this.fileList.map(item=>item.id).join(",")
|
||||||
|
this.updateParams.resourceOtherName = this.fileList.map(item=>item.name).join(",")
|
||||||
|
this.updateParams.executeResourceId = this.fileList2.map(item=>item.id).join(",")
|
||||||
|
this.updateParams.executeResourceName = this.fileList2.map(item=>item.name).join(",")
|
||||||
|
this.updateParams.verifyResourceId = this.photoList2.map(item=>item.id).join(",")
|
||||||
|
this.updateParams.verifyResourceName = this.photoList2.map(item=>item.name).join(",")
|
||||||
|
|
||||||
|
this.tableService.addOrUpdate(this.updateParams,!this.updateParams.id).then(res=>{
|
||||||
|
this.$message.success(!this.updateParams.id?"新增成功":"编辑成功");
|
||||||
|
if(!preStatus){
|
||||||
|
this.startWorkFlow([res.data],[this.updateParams.reformUserId])
|
||||||
|
}else{
|
||||||
|
this.workFlowService.taskHandle(handleParams).then((data)=>{
|
||||||
|
// 验证不需要走下一步
|
||||||
|
if(this.updateParams.status > preStatus && preStatus!==4){
|
||||||
|
this.doAgain(data.data,userIds)
|
||||||
|
}else{
|
||||||
|
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.handleClose();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public startWorkFlow(ids,userIds){
|
||||||
|
const keyValue = ids.map(id=>{
|
||||||
|
return {
|
||||||
|
F_Id:id,
|
||||||
|
F_FormId:1742822461669376,
|
||||||
|
F_Type:2,
|
||||||
|
F_UrlAddress:"ceshi1"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.workFlowService.startWorkFlow({
|
||||||
|
"F_Id": "1743872031226688",
|
||||||
|
"relationTaskList": "[]",
|
||||||
|
"keyValue": JSON.stringify(keyValue),
|
||||||
|
"userJson": "[]",
|
||||||
|
"fileValue": [],
|
||||||
|
"nextNodeName":"确认",
|
||||||
|
"nodeName":"上报",
|
||||||
|
"userList": userIds
|
||||||
|
}).then((res:any)=>{
|
||||||
|
this.getTableData()
|
||||||
|
// 发起工作流成功
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public doAgain(data,userIds){
|
||||||
|
this.workFlowService.again([{
|
||||||
|
"name": "确认",
|
||||||
|
"taskId": data.CandidateInfo[0].taskId,
|
||||||
|
"userList": userIds
|
||||||
|
}]).then(()=>{
|
||||||
|
this.getTableData()
|
||||||
|
// 发起工作流成功
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public getMap(map){
|
public getMap(map){
|
||||||
|
@ -405,7 +956,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.addMarker();
|
this.addMarker();
|
||||||
}
|
}
|
||||||
public addMarker(){
|
public addMarker(){
|
||||||
this.marker = new mapboxgl.Marker({draggable:!this.isReadonly})
|
this.marker = new mapboxgl.Marker({draggable:!this.isReadonly && this.updateParams.status<2})
|
||||||
.setLngLat(this.center)
|
.setLngLat(this.center)
|
||||||
.addTo(this.map);
|
.addTo(this.map);
|
||||||
this.map.flyTo({center:this.center})
|
this.map.flyTo({center:this.center})
|
||||||
|
@ -442,6 +993,26 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public onSuccess3(res,file,fileList){
|
||||||
|
if(res.code===200){
|
||||||
|
this.fileList2.push({
|
||||||
|
name:res.data.originalName,
|
||||||
|
url:res.data.url,
|
||||||
|
type:res.data.type,
|
||||||
|
id:res.data.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public onSuccess4(res,file,fileList){
|
||||||
|
if(res.code===200){
|
||||||
|
this.photoList2.push({
|
||||||
|
name:res.data.originalName,
|
||||||
|
url:res.data.url,
|
||||||
|
type:res.data.type,
|
||||||
|
id:res.data.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public onRemove(file,fileList){
|
public onRemove(file,fileList){
|
||||||
this.photoList.splice(this.photoList.findIndex(item=>item.id === file.response.data.id),1)
|
this.photoList.splice(this.photoList.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
|
@ -450,6 +1021,12 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
public onRemove2(file,fileList){
|
public onRemove2(file,fileList){
|
||||||
this.fileList.splice(this.fileList.findIndex(item=>item.id === file.response.data.id),1)
|
this.fileList.splice(this.fileList.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
}
|
}
|
||||||
|
public onRemove3(file,fileList){
|
||||||
|
this.fileList2.splice(this.fileList2.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
|
}
|
||||||
|
public onRemove4(file,fileList){
|
||||||
|
this.photoList2.splice(this.photoList2.findIndex(item=>item.id === file.response.data.id),1)
|
||||||
|
}
|
||||||
|
|
||||||
public onPreview(file){
|
public onPreview(file){
|
||||||
if(file.type.indexOf("png")>=0 || file.type.indexOf("jp")>=0){
|
if(file.type.indexOf("png")>=0 || file.type.indexOf("jp")>=0){
|
||||||
|
@ -467,6 +1044,10 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.marker = null;
|
this.marker = null;
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.photoList = [];
|
||||||
|
this.photoList2 = [];
|
||||||
|
this.fileList2 = [];
|
||||||
|
this.fileList = [];
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,4 +1073,14 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../common.component.scss"></style>
|
<style lang="scss" scoped src="../common.component.scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.el-radio-button__inner{
|
||||||
|
border:none !important;
|
||||||
|
}
|
||||||
|
.el-radio-button__orig-radio:checked+.el-radio-button__inner{
|
||||||
|
border-bottom: 2px solid #409EFF !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -611,8 +611,11 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getTroubleList(){
|
public getTroubleList(){
|
||||||
this.tableService.getTroubleList(this.recordParams).then(res=>{
|
this.tableService.getTroubleList(this.recordParams).then((res:any)=>{
|
||||||
this.troubleTableData = res.data
|
this.troubleTableData =res.data.map(data=>{
|
||||||
|
data.urls = data.resources.map(source=>source.resourceUrl) || [];
|
||||||
|
return data
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,7 +672,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public showCheckTable(el,data){
|
public rowCallback(el,data){
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if(isTarget){
|
if(isTarget){
|
||||||
this.hideActions = true;
|
this.hideActions = true;
|
||||||
|
|
|
@ -542,13 +542,16 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
const datas = (await this.tableService.getRecordList(this.recordParams)).data as any;
|
const datas = (await this.tableService.getRecordList(this.recordParams)).data as any;
|
||||||
item.tableItems = datas;
|
item.tableItems = datas;
|
||||||
})
|
})
|
||||||
this.currentTableId = this.tableTabs[0].id;
|
this.currentTableId = this.tableTabs[0]?.id;
|
||||||
this.currentTable = this.tableTabs[0]
|
this.currentTable = this.tableTabs[0]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
public getTroubleList(){
|
public getTroubleList(){
|
||||||
this.tableService.getTroubleList(this.recordParams).then(res=>{
|
this.tableService.getTroubleList(this.recordParams).then((res:any)=>{
|
||||||
this.troubleTableData = res.data
|
this.troubleTableData = res.data.map(data=>{
|
||||||
|
data.urls = data.resources.map(source=>source.resourceUrl) || [];
|
||||||
|
return data
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,6 +219,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
key:"areaId",
|
key:"areaId",
|
||||||
placeholder:"请选择区域名称",
|
placeholder:"请选择区域名称",
|
||||||
width:"calc(50% - 20px)",
|
width:"calc(50% - 20px)",
|
||||||
|
format:"areaName",
|
||||||
type:"select",
|
type:"select",
|
||||||
require:true,
|
require:true,
|
||||||
datas:this.areaList
|
datas:this.areaList
|
||||||
|
@ -480,7 +481,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
}else{
|
}else{
|
||||||
this.currentId = data.id;
|
this.currentId = data.id;
|
||||||
this.updateParams = Object.assign({bottomHeight:0,topHeight:0,status:1,geoJson:"[]",number:null,statusName:["停用","启用"][data.status]},data);
|
this.updateParams = Object.assign({areaName:this.areaList.find(item=>item.value===data.areaId)?.name,bottomHeight:0,topHeight:0,status:1,geoJson:"[]",number:null,statusName:["停用","启用"][data.status]},data);
|
||||||
if(isRead){
|
if(isRead){
|
||||||
this.repairTableData.datas = this.updateParams.repairs.map((item,i)=>{
|
this.repairTableData.datas = this.updateParams.repairs.map((item,i)=>{
|
||||||
item.index = i+1;
|
item.index = i+1;
|
||||||
|
|
Loading…
Reference in New Issue