forked from xxhjsb/hbt-prevention-ui
feat:分页优化,功能优化
parent
9db238dfe3
commit
254fe212e1
|
|
@ -7,10 +7,13 @@ 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-zsz","bpm":"/bpm-zsz"}'
|
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file","prevention":"/prevention-yx","bpm":"/bpm"}'
|
||||||
# 是否显示全部菜单
|
# 是否显示全部菜单
|
||||||
VUE_APP_ALL_MENU = false
|
VUE_APP_ALL_MENU = false
|
||||||
# 微前端地址
|
# # 微前端地址
|
||||||
VUE_APP_REMOTES_URL="http://192.168.1.20:8090"
|
# VUE_APP_REMOTES_URL="http://192.168.1.20:8090"
|
||||||
|
# # 当前应用部署地址
|
||||||
|
# VUE_APP_EXPOSES_URL="http://192.168.1.20:8090"
|
||||||
|
VUE_APP_REMOTES_URL="http://119.45.158.12/common_dev/"
|
||||||
# 当前应用部署地址
|
# 当前应用部署地址
|
||||||
VUE_APP_EXPOSES_URL="http://192.168.1.20:8090"
|
VUE_APP_EXPOSES_URL=""
|
||||||
|
|
@ -12,9 +12,10 @@ import Mock from "mockjs"
|
||||||
// import { MockData } from './mock';
|
// import { MockData } from './mock';
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
Vue.config.warnHandler = ()=>{
|
// Vue.config.silent = true;
|
||||||
|
// Vue.config.warnHandler = ()=>{
|
||||||
|
|
||||||
}
|
// }
|
||||||
document.title = process.env.VUE_APP_TITLE || '汉邦唐全真数字服务平台';
|
document.title = process.env.VUE_APP_TITLE || '汉邦唐全真数字服务平台';
|
||||||
|
|
||||||
// if(process.env.NODE_ENV==="development"){
|
// if(process.env.NODE_ENV==="development"){
|
||||||
|
|
|
||||||
|
|
@ -43,19 +43,13 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import FormComponent from 'hbt-common/components/common/form.component.vue';
|
import FormComponent from 'hbt-common/components/common/form.component.vue';
|
||||||
import { Component, Emit, Prop, PropSync, Vue, Watch } from 'vue-property-decorator';
|
import { Component, Emit, Prop, PropSync, Vue, Watch } from 'vue-property-decorator';
|
||||||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
|
|
||||||
import TableComponent from "hbt-common/components/common/table.component.vue"
|
import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||||
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 DrawComponent from '@/components/draw.component.vue';
|
||||||
import WorkService from '@/service/work.service';
|
|
||||||
import UnitService from '@/service/unit.service';
|
|
||||||
import AreaService from '@/service/area.service';
|
|
||||||
import SystemService from "hbt-common/service/system.service"
|
import SystemService from "hbt-common/service/system.service"
|
||||||
import JobHazardService from '@/service/jobHazard.service';
|
|
||||||
import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue";
|
import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue";
|
||||||
import { L_COLUMN, L_VALUE, S_COLUMN, S_VALUE } from '@/mock/lsRisk';
|
import moment from 'moment';
|
||||||
import { L_LECCOLUMN, L_LECVALUE, E_COLUMN, E_VALUE, C_COLUMN, C_VALUE } from '@/mock/lecRisk';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -258,7 +252,15 @@ export default class MeasureComponent extends Vue {
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
hide: !(this.taskUpdataParams.reviewCycleUnit === 7),
|
hide: !(this.taskUpdataParams.reviewCycleUnit === 7),
|
||||||
}]
|
},{
|
||||||
|
name: "开始执行时间",
|
||||||
|
key: "executeStartTime",
|
||||||
|
format: "yyyy-MM-dd HH:mm",
|
||||||
|
type: "date",
|
||||||
|
subType:'datetime',
|
||||||
|
width: "calc(50% - 20px)",
|
||||||
|
require: true,
|
||||||
|
},]
|
||||||
}
|
}
|
||||||
|
|
||||||
public subActions = [{
|
public subActions = [{
|
||||||
|
|
@ -541,6 +543,15 @@ export default class MeasureComponent extends Vue {
|
||||||
})
|
})
|
||||||
this.taskUpdataParams.taskItemName = map[data]
|
this.taskUpdataParams.taskItemName = map[data]
|
||||||
}
|
}
|
||||||
|
//开始执行时间
|
||||||
|
if(item && item.key === 'executeStartTime'){
|
||||||
|
const now = moment().format("YYYY-MM-DD HH:mm");
|
||||||
|
if (now > data) {
|
||||||
|
this.$message.error("开始执行时间不能早于当前时间")
|
||||||
|
this.taskUpdataParams.executeStartTime = null;
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
this.taskUpdateForm()
|
this.taskUpdateForm()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ export default class DeviceService extends BaseService<any>{
|
||||||
}
|
}
|
||||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/device/inventory/getList';
|
const url = this.prefix.prevention+'/device/inventory/getList';
|
||||||
return this.post(url,params)
|
return this.get(url,params)
|
||||||
}
|
}
|
||||||
|
|
||||||
public selectById(id):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectById(id):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
|
@ -33,6 +33,12 @@ export default class DeviceService extends BaseService<any>{
|
||||||
|
|
||||||
public selectByPage2(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectByPage2(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/device/inventory/getList';
|
const url = this.prefix.prevention+'/device/inventory/getList';
|
||||||
return this.post(url,params)
|
return this.get(url,params)
|
||||||
|
}
|
||||||
|
//检查项目
|
||||||
|
|
||||||
|
public selectProjectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.prevention+'/device/item/list';
|
||||||
|
return this.get(url,params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ export default class DeviceService extends BaseService<any>{
|
||||||
}
|
}
|
||||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/device/anal/getList';
|
const url = this.prefix.prevention+'/device/anal/getList';
|
||||||
return this.get(url,params)
|
return this.get(url,params,true)
|
||||||
}
|
}
|
||||||
|
|
||||||
public selectById(id):Promise<AxiosResponse<ActionResult<any>>>{
|
public selectById(id):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
|
@ -48,4 +48,9 @@ export default class DeviceService extends BaseService<any>{
|
||||||
const url = this.prefix.prevention+'/device/inventory/getDistinctList';
|
const url = this.prefix.prevention+'/device/inventory/getDistinctList';
|
||||||
return this.post(url,params)
|
return this.post(url,params)
|
||||||
}
|
}
|
||||||
|
//检查项目
|
||||||
|
public selectProjectById(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.prevention+'/device/analitem/list';
|
||||||
|
return this.get(url,params)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -47,6 +47,11 @@ export default class JobHazardService extends BaseService<any>{
|
||||||
//过滤区域单元
|
//过滤区域单元
|
||||||
public getDistinctList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
public getDistinctList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/job/inventory/getDistinctList';
|
const url = this.prefix.prevention+'/job/inventory/getDistinctList';
|
||||||
return this.post(url,params)
|
return this.post(url,params,{},false)
|
||||||
|
}
|
||||||
|
//作业步骤
|
||||||
|
public selectStepById(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.prevention+'/job/analstep/list';
|
||||||
|
return this.get(url,params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -13,6 +13,11 @@ export default class MeasuresService extends BaseService<any>{
|
||||||
const url = this.prefix.prevention+'/risk/inventory';
|
const url = this.prefix.prevention+'/risk/inventory';
|
||||||
return this.deleteBatch(url,params,{},true)
|
return this.deleteBatch(url,params,{},true)
|
||||||
}
|
}
|
||||||
|
//措施详情
|
||||||
|
public selectDetailById(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.prevention+'/risk/detail/list';
|
||||||
|
return this.get(url,params)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -52,8 +52,8 @@
|
||||||
<el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state"
|
<el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state"
|
||||||
@click="changeState(scope.row)">停用</el-button>
|
@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 && scope.row.tag===0"
|
<el-button type="text" v-if="isAction && scope.row.status !==4&& (scope.row.status !==2 &&(nowDate > scope.row.taskStartTime ? true :
|
||||||
@click="openRecordModel(scope.row)">检查</el-button>
|
false) ) && scope.row.tag===0 " @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 && params.type===4 && scope.row.status<5"
|
<el-button type="text" v-if="isManager && params.type===4 && scope.row.status<5"
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
<!-- 检查表记录 -->
|
<!-- 检查表记录 -->
|
||||||
<el-dialog v-if="isPlan || isAction" :close-on-click-modal="false" :title="isPlan?'检查表记录':'检查表'"
|
<el-dialog v-if="isPlan || isAction" :close-on-click-modal="false" :title="isPlan?'检查表记录':'检查表'"
|
||||||
:visible.sync="showRecord" width="980px" :before-close="handleClose" destroy-on-close>
|
:visible.sync="showRecord" width="1080px" :before-close="handleClose" destroy-on-close>
|
||||||
<div class="full">
|
<div class="full">
|
||||||
<el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
|
<el-radio-group size="medium" v-model="currentTableId" @change="sendTabChange">
|
||||||
<el-radio-button :label="item.id" v-for="item in tableTabs"
|
<el-radio-button :label="item.id" v-for="item in tableTabs"
|
||||||
|
|
@ -98,12 +98,16 @@
|
||||||
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.itemReason}}</div>
|
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.itemReason}}</div>
|
||||||
<el-input type="textarea" v-else v-model="scope.row.reason"></el-input>
|
<el-input type="textarea" v-else v-model="scope.row.reason"></el-input>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查人">
|
<el-table-column label="执行人">
|
||||||
<div slot-scope="scope">{{scope.row.itemExecuteNames}}</div>
|
<div slot-scope="scope">{{scope.row.itemExecuteNames}}</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="检查人">
|
||||||
|
<div slot-scope="scope">{{scope.row.inspectUserName?scope.row.inspectUserName :'--'}}</div>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="检查结果" width="160px">
|
<el-table-column label="检查结果" width="160px">
|
||||||
<div slot-scope="scope">
|
<div slot-scope="scope">
|
||||||
<span v-if="hideActions || isPlan || (isAction && !scope.row.userIds.includes(account.userId))"
|
<span
|
||||||
|
v-if="hideActions || isPlan || (isAction && !scope.row.userIds.includes(account.userId)) || (scope.row.inspectUserName && scope.row.inspectUserName!=account.userId) "
|
||||||
:class="'color_'+scope.row.itemResult">{{['异常','正常'][scope.row.itemResult]}}</span>
|
:class="'color_'+scope.row.itemResult">{{['异常','正常'][scope.row.itemResult]}}</span>
|
||||||
<el-radio-group v-else v-model="scope.row.itemResult">
|
<el-radio-group v-else v-model="scope.row.itemResult">
|
||||||
<el-radio :label="1">正常</el-radio>
|
<el-radio :label="1">正常</el-radio>
|
||||||
|
|
@ -239,26 +243,25 @@
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="full" style="margin-bottom: 20px;">
|
<div class="full" style="margin-bottom: 20px;">
|
||||||
<el-table :data="currentTable.tableItems" tooltip-effect="dark" border height="100%" width="100%"
|
<el-table :data="currentTable.tableItems" tooltip-effect="dark" border height="400px" width="100%">
|
||||||
style="min-height:400px;">
|
|
||||||
<el-table-column label="序号" width="60">
|
<el-table-column label="序号" width="60">
|
||||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查项目" :show-overflow-tooltip="true">
|
<el-table-column label="检查项目">
|
||||||
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.name}}</div>
|
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.name}}</div>
|
||||||
<el-input type="text" v-else v-model="scope.row.name"></el-input>
|
<el-input type="text" v-else v-model="scope.row.name"></el-input>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查内容" :show-overflow-tooltip="true">
|
<el-table-column label="检查内容">
|
||||||
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.content}}</div>
|
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.content}}</div>
|
||||||
<el-input type="textarea" v-else v-model="scope.row.content"></el-input>
|
<el-input type="textarea" v-else v-model="scope.row.content"></el-input>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检查依据" :show-overflow-tooltip="true">
|
<el-table-column label="检查依据">
|
||||||
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.reason}}</div>
|
<div slot-scope="scope" v-if="!scope.row.edit">{{scope.row.reason}}</div>
|
||||||
<el-input type="textarea" v-else v-model="scope.row.reason"></el-input>
|
<el-input type="textarea" v-else v-model="scope.row.reason"></el-input>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="选择执行人">
|
<el-table-column label="选择执行人">
|
||||||
<div slot-scope="scope">
|
<div slot-scope="scope" >
|
||||||
<el-select v-model="scope.row.userList" multiple filterable placeholder="请选择">
|
<el-select v-model="scope.row.userList" multiple filterable placeholder="请选择" >
|
||||||
<el-option v-for="item in $store.state.userList" :key="item.value" :label="item.name"
|
<el-option v-for="item in $store.state.userList" :key="item.value" :label="item.name"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,13 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
public isBase = false;
|
public isBase = false;
|
||||||
public isFile = false;
|
public isFile = false;
|
||||||
public isManager = false;
|
public isManager = false;
|
||||||
public tableActionWidth = "60px";
|
public tableActionWidth = "80px";
|
||||||
public statusList = ["", "检查中", "已检查", "未检查"];
|
public statusList = ["", "检查中", "已检查", "待检查", "超期未检查"];
|
||||||
public account = JSON.parse(localStorage.getItem("account") as string);
|
public account = JSON.parse(localStorage.getItem("account") as string);
|
||||||
// 是否隐藏隐患登记情况
|
// 是否隐藏隐患登记情况
|
||||||
public hideActions = false;
|
public hideActions = false;
|
||||||
|
|
||||||
|
public nowDate = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||||
public params = {} as any;
|
public params = {} as any;
|
||||||
|
|
||||||
public idReadonly = false;
|
public idReadonly = false;
|
||||||
|
|
@ -100,8 +101,13 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
public levelMap = ["", "一般隐患", "重大隐患"]
|
public levelMap = ["", "一般隐患", "重大隐患"]
|
||||||
public reformModeMap = ["", "即查即改", "限期整改"]
|
public reformModeMap = ["", "即查即改", "限期整改"]
|
||||||
|
|
||||||
created() {
|
public planTypeMap = {
|
||||||
|
1: "单次计划",
|
||||||
|
2: "长期计划"
|
||||||
|
}
|
||||||
|
|
||||||
|
created() {
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
|
|
@ -119,11 +125,30 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
return "<span class='link'>" + (data.tableNum || 0) + "</span>"
|
return "<span class='link'>" + (data.tableNum || 0) + "</span>"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({ name: '数据生成时间', key: "createTime", width: "180px" });
|
this.tableColumn.push({ name: '开始时间', key: "taskStartTime", width: "180px" });
|
||||||
this.tableColumn.push({ name: '检查周期', key: "inspectCycleValue" });
|
this.tableColumn.push({
|
||||||
|
name: '截止时间', key: "taskEndTime", width: "180px", render: (data) => {
|
||||||
|
if (data.inspectCycleUnit && data.inspectCycleValue) {
|
||||||
|
return this.taskEndTime(data.taskStartTime, data.inspectCycleValue, data.inspectCycleUnit)
|
||||||
|
} else {
|
||||||
|
return data.taskEndTime
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.tableColumn.push({
|
||||||
|
name: '计划类型', render: (data) => {
|
||||||
|
return this.planTypeMap[data.planType]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.tableColumn.push({
|
||||||
|
name: '检查周期', key: "inspectCycleValue", render: (data) => {
|
||||||
|
return !data.inspectCycleValue ? '--' : data.inspectCycleValue
|
||||||
|
}
|
||||||
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '单位', render: (data) => {
|
name: '单位', render: (data) => {
|
||||||
return this.$store.getters.prevention_cycle_unit_map[data.inspectCycleUnit]
|
return !data.inspectCycleUnit ? '--' : this.$store.getters.prevention_cycle_unit_map[data.inspectCycleUnit]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
|
|
@ -134,13 +159,30 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
text: "已检查",
|
text: "已检查",
|
||||||
value: 2
|
value: 2
|
||||||
}, {
|
}, {
|
||||||
text: "未检查",
|
text: "待检查",
|
||||||
value: 3
|
value: 3
|
||||||
|
}, {
|
||||||
|
text: "超期未检查",
|
||||||
|
value: 4
|
||||||
}], filterMethod: (data, row) => {
|
}], filterMethod: (data, row) => {
|
||||||
return row.status === data
|
return row.status === data
|
||||||
}, key: "status", render: (data) => {
|
}, key: "status", render: (data) => {
|
||||||
return "<span class='color_" + (data.status - 1) + "'>" + (this.statusList[data.status] || '') + "</span>"
|
if (data.status === 3) {
|
||||||
|
const now = moment().format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
if (now > data.taskStartTime) {
|
||||||
|
return "<span class='color_2'>" + (this.statusList[data.status] || '') + "</span>"
|
||||||
|
} else {
|
||||||
|
return "即将开始"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let color = "color_1"
|
||||||
|
if (data.status === 1) {
|
||||||
|
color = "color_3"
|
||||||
|
} else if (data.status === 4) {
|
||||||
|
color = "color_4"
|
||||||
|
}
|
||||||
|
return "<span class='" + (color) + "'>" + (this.statusList[data.status] || '') + "</span>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -360,6 +402,39 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//截止时间计算
|
||||||
|
// 开始时间 + 周期(周期单位) - 一天
|
||||||
|
public taskEndTime(begindate, inspectCycleValue, inspectCycleUnit) {
|
||||||
|
let unitData = this.transformDate(inspectCycleUnit)
|
||||||
|
if (unitData) {
|
||||||
|
if (unitData === 'halfyear') {
|
||||||
|
return moment(begindate).add(inspectCycleValue * 6, 'months').format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
} else {
|
||||||
|
return moment(begindate).add(inspectCycleValue, unitData).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//周期单位转换
|
||||||
|
public transformDate(unit) {
|
||||||
|
switch (unit) {
|
||||||
|
case '1':
|
||||||
|
return 'year';
|
||||||
|
case '2':
|
||||||
|
return 'halfyear';
|
||||||
|
case '3':
|
||||||
|
return 'quarters';
|
||||||
|
case '4':
|
||||||
|
return 'months';
|
||||||
|
case '5':
|
||||||
|
return 'weeks';
|
||||||
|
case '6':
|
||||||
|
return 'days';
|
||||||
|
case '7':
|
||||||
|
return 'hours';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public change(data, item) {
|
public change(data, item) {
|
||||||
if (item && item.key === "inspectUserId") {
|
if (item && item.key === "inspectUserId") {
|
||||||
this.updateParams.inspectUserName = this.$store.getters.user_map[data]
|
this.updateParams.inspectUserName = this.$store.getters.user_map[data]
|
||||||
|
|
@ -571,6 +646,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
}, row)
|
}, row)
|
||||||
// 获取url
|
// 获取url
|
||||||
if (row.resourceId) {
|
if (row.resourceId) {
|
||||||
|
this.updateParams.photo = row.resourceId
|
||||||
this.tableService.getFileUrls({ ids: row.resourceId.split(",") }).then((photos: any) => {
|
this.tableService.getFileUrls({ ids: row.resourceId.split(",") }).then((photos: any) => {
|
||||||
this.photoList = photos.data.map(item => {
|
this.photoList = photos.data.map(item => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -604,14 +680,15 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public openRecordModel(row) {
|
public openRecordModel(row, isRecord?) {
|
||||||
this.showRecord = true;
|
this.showRecord = true;
|
||||||
this.recordParams.taskId = row.id;
|
this.recordParams.taskId = row.id;
|
||||||
this.recordParams.planId = row.planId
|
this.recordParams.planId = row.planId
|
||||||
this.getTabsData()
|
this.getTabsData(isRecord)
|
||||||
this.getTroubleList();
|
this.getTroubleList();
|
||||||
}
|
}
|
||||||
public getTabsData() {
|
|
||||||
|
public getTabsData(isRecord?) {
|
||||||
this.tableService.getRecordTabList(this.recordParams).then((res: any) => {
|
this.tableService.getRecordTabList(this.recordParams).then((res: any) => {
|
||||||
this.tableTabs = res.data.map(item => {
|
this.tableTabs = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -627,9 +704,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
subItem.userIds = subItem.itemExecuteIds ? subItem.itemExecuteIds.split(",").map(id => +id) : [];
|
subItem.userIds = subItem.itemExecuteIds ? subItem.itemExecuteIds.split(",").map(id => +id) : [];
|
||||||
// 属于自己的必填 未避免多集检索 默认正常
|
// 属于自己的必填 未避免多集检索 默认正常
|
||||||
if (subItem.userIds.includes(this.account.userId)) {
|
if (subItem.userIds.includes(this.account.userId)) {
|
||||||
console.log(subItem.userIds)
|
if (!isRecord) {
|
||||||
if (!subItem.itemResult && subItem.itemResult !== 0) {
|
if (!subItem.itemResult && subItem.itemResult !== 0) {
|
||||||
subItem.itemResult = 1
|
subItem.itemResult = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return subItem
|
return subItem
|
||||||
|
|
@ -693,14 +771,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
public doCheck() {
|
public doCheck() {
|
||||||
const params = [] as any;
|
const params = [] as any;
|
||||||
let total = 0;
|
let total = 0;
|
||||||
console.log(' this.tableTabs', this.tableTabs);
|
|
||||||
|
|
||||||
this.tableTabs.forEach(item => {
|
this.tableTabs.forEach(item => {
|
||||||
total += item.tableItems.length;
|
total += item.tableItems.length;
|
||||||
item.tableItems.forEach(subItem => {
|
item.tableItems.forEach(subItem => {
|
||||||
console.log(subItem.userIds.includes(this.account.userId));
|
|
||||||
console.log('this.account', this.account);
|
|
||||||
|
|
||||||
if (subItem.userIds.includes(this.account.userId)) {
|
if (subItem.userIds.includes(this.account.userId)) {
|
||||||
params.push({
|
params.push({
|
||||||
content: subItem.itemRecord,
|
content: subItem.itemRecord,
|
||||||
|
|
@ -710,11 +784,9 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
inspectUserId: this.account.userId,
|
inspectUserId: this.account.userId,
|
||||||
inspectUserName: this.account.nickName,
|
inspectUserName: this.account.nickName,
|
||||||
})
|
})
|
||||||
console.log('params', params);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log('params', params);
|
|
||||||
|
|
||||||
this.tableService.addRecord({
|
this.tableService.addRecord({
|
||||||
dangerInspectTaskRecords: params,
|
dangerInspectTaskRecords: params,
|
||||||
|
|
@ -738,7 +810,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if (isTarget) {
|
if (isTarget) {
|
||||||
this.hideActions = true;
|
this.hideActions = true;
|
||||||
this.openRecordModel(data)
|
this.openRecordModel(data, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import PlanService from '@/service/plan.service';
|
||||||
import SystemService from 'hbt-common/service/system.service';
|
import SystemService from 'hbt-common/service/system.service';
|
||||||
import UnitService from '@/service/unit.service';
|
import UnitService from '@/service/unit.service';
|
||||||
import TableService from '@/service/table.service';
|
import TableService from '@/service/table.service';
|
||||||
|
import moment from 'moment';
|
||||||
@Component({
|
@Component({
|
||||||
template,
|
template,
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -107,6 +108,8 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
} as any;
|
} as any;
|
||||||
public updateOptions: FormOption<BtnOption>[] = [] as any;
|
public updateOptions: FormOption<BtnOption>[] = [] as any;
|
||||||
|
|
||||||
|
public nowDate = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||||
|
|
||||||
|
|
||||||
public areaList = [] as any;
|
public areaList = [] as any;
|
||||||
public areaMap = {} as any;
|
public areaMap = {} as any;
|
||||||
|
|
@ -219,10 +222,10 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
name: "1次",
|
name: "1次",
|
||||||
key: "times",
|
key: "times",
|
||||||
type: 'null',
|
type: 'null',
|
||||||
labelWidth:"0px",
|
labelWidth: "0px",
|
||||||
// width: "30px",
|
// width: "30px",
|
||||||
hide: this.updateParams.planType === 1,
|
hide: this.updateParams.planType === 1,
|
||||||
},{
|
}, {
|
||||||
name: "检查区域",
|
name: "检查区域",
|
||||||
key: "areaIds",
|
key: "areaIds",
|
||||||
format: "areaNames",
|
format: "areaNames",
|
||||||
|
|
@ -363,11 +366,11 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
return data.startTime + (data.endTime ? '~' + data.endTime : "")
|
return data.startTime + (data.endTime ? '~' + data.endTime : "")
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({ name: '检查负责人', key: "chargeUserName",});
|
this.tableColumn.push({ name: '检查负责人', key: "chargeUserName", });
|
||||||
this.tableColumn.push({ name: '检查范围', key: "scope" });
|
this.tableColumn.push({ name: '检查范围', key: "scope" });
|
||||||
this.tableColumn.push({ name: '发现隐患数量', key: "dangerCount",});
|
this.tableColumn.push({ name: '发现隐患数量', key: "dangerCount", });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '检查类型', render: (data) => {
|
name: '计划类型', render: (data) => {
|
||||||
return this.planTypeMap[data.planType]
|
return this.planTypeMap[data.planType]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,13 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-for="item in tableColumn">
|
<template v-for="item in tableColumn">
|
||||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key" :show-overflow-tooltip="item.showTip">
|
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key"
|
||||||
|
:show-overflow-tooltip="item.showTip">
|
||||||
<div slot-scope="scope" v-html="item.render(scope.row)" @click="showPros($event,scope.row)">
|
<div slot-scope="scope" v-html="item.render(scope.row)" @click="showPros($event,scope.row)">
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key" :show-overflow-tooltip="item.showTip">
|
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key"
|
||||||
|
:show-overflow-tooltip="item.showTip">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
<el-table-column label="操作" fixed="right" width="150">
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
|
|
@ -42,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :title=" isReadonly?'详情':currentId>0?'编辑':'新增'" :visible.sync="showUpdate"
|
<el-dialog :close-on-click-modal="false" :title=" isReadonly?'详情':currentId>0?'编辑':'新增'" :visible.sync="showUpdate"
|
||||||
width="952px" :before-close="handleClose" destroy-on-close>
|
width="952px" :before-close="handleClose" destroy-on-close>
|
||||||
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
|
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
|
||||||
:data.sync="updateParams" @change="changes" :actions="updateActions" @actionCallback="callback"
|
:data.sync="updateParams" @change="changes" :actions="updateActions" @actionCallback="callback"
|
||||||
:full-btn="true" btnPosition="center">
|
:full-btn="true" btnPosition="center">
|
||||||
|
|
@ -76,7 +78,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :title="proIsReadonly?'详情':updateProParams.index ?'编辑' :'新增'"
|
<el-dialog :close-on-click-modal="false" :title="proIsReadonly?'详情':updateProParams.index ?'编辑' :'新增'"
|
||||||
:visible.sync="showProject" width="952px" :before-close="handleProClose" destroy-on-close>
|
:visible.sync="showProject" width="952px" :before-close="handleProClose" destroy-on-close>
|
||||||
<FormComponent :options="projectOptions" :isReadonly="proIsReadonly" labelWidth="110px" labelAlign="right"
|
<FormComponent :options="projectOptions" :isReadonly="proIsReadonly" labelWidth="110px" labelAlign="right"
|
||||||
:data.sync="updateProParams" :actions="proIsReadonly ? [] :updateActions" @actionCallback="subCallback"
|
:data.sync="updateProParams" :actions="proIsReadonly ? [] :updateActions" @actionCallback="subCallback"
|
||||||
:full-btn="true" btnPosition="center">
|
:full-btn="true" btnPosition="center">
|
||||||
|
|
@ -84,7 +86,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" title="检查项目" :visible.sync="showProtable" width="952px"
|
<el-dialog :close-on-click-modal="false" title="检查项目" :visible.sync="showProtable" width="952px"
|
||||||
:before-close="handleClosePro" destroy-on-close>
|
:before-close="handleClosePro" destroy-on-close>
|
||||||
<TableComponent :tableData="currentProTableData" :tableColumn="subTableColumn" :showFooter="false"
|
<TableComponent :tableData="currentProTableData" :tableColumn="subTableColumn" :showFooter="false"
|
||||||
style="margin-bottom: 20px;">
|
style="margin-bottom: 20px;">
|
||||||
<el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" height="250" border
|
<el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" height="250" border
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载区域列表
|
// 加载区域列表
|
||||||
|
|
@ -317,10 +317,15 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
||||||
public showPros(el, data) {
|
public showPros(el, data) {
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if (isTarget) {
|
if (isTarget) {
|
||||||
this.showProtable = true;
|
this.currentId = data.id;
|
||||||
this.currentProTableData.datas = data.items.map((item, index) => {
|
this.tableService.selectProjectByPage({ deviceInventoryId: this.currentId }).then((res: any) => {
|
||||||
item.index = index + 1;
|
if (res.code === 200) {
|
||||||
return item
|
this.showProtable = true;
|
||||||
|
this.currentProTableData.datas = res.data.map((item, index) => {
|
||||||
|
item.index = index + 1;
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="table-box flex-1">
|
<div class="table-box flex-1">
|
||||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
||||||
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
|
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
|
||||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
|
@pageSizeChange="callback($event,'pageSize')" :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%">
|
||||||
|
|
@ -47,8 +47,8 @@
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
|
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
|
||||||
:visible.sync="showUpdate" width="1080px" :before-close="handleClose">
|
:visible.sync="showUpdate" width="1080px" :before-close="handleClose">
|
||||||
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth"
|
||||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
:data.sync="updateParams" :isReadonly="isReadonly" @actionCallback="callback" @change="changes" ref="basicForm">
|
||||||
<div class="sub-title">安全检查表分析法</div>
|
<div class="sub-title">安全检查表分析法</div>
|
||||||
<TableComponent :tableData="updateParams.items" :tableColumn="subTableColumn"
|
<TableComponent :tableData="updateParams.items" :tableColumn="subTableColumn"
|
||||||
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
|
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
|
||||||
|
|
@ -78,21 +78,22 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</TableComponent>
|
</TableComponent>
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth"
|
||||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes" @action="updateActions"
|
:data.sync="updateParams" :isReadonly="isReadonly" @actionCallback="callback" @change="changes"
|
||||||
:actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center">
|
@action="updateActions" :actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center" ref="riskForm">
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 评估矩阵 -->
|
<!-- 评估矩阵 -->
|
||||||
<el-dialog :close-on-click-modal="false" width="600px" :visible.sync="showMatrixModal" :title="'区域风险等级判定准则'" destroy-on-close>
|
<el-dialog :close-on-click-modal="false" width="600px" :visible.sync="showMatrixModal" :title="'区域风险等级判定准则'"
|
||||||
|
destroy-on-close>
|
||||||
<img style="width:90%" src="../../../../assets/images/5.png" alt="">
|
<img style="width:90%" src="../../../../assets/images/5.png" alt="">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 评价 -->
|
<!-- 评价 -->
|
||||||
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="952px"
|
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="952px"
|
||||||
:before-close="handleAnalyClose" >
|
:before-close="handleAnalyClose">
|
||||||
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
|
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
|
||||||
:show.sync="showSubUpdate" :tabledata.sync="updateParams"
|
:show.sync="showSubUpdate" :tabledata.sync="updateParams" :areaList="areaList" :type="'device'"
|
||||||
:areaList="areaList" :type="'device'" :checkRiskType="checkRiskType" ></AnalEvaluationComponent>
|
:checkRiskType="checkRiskType"></AnalEvaluationComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 检查项目 -->
|
<!-- 检查项目 -->
|
||||||
<el-dialog :close-on-click-modal="false" title="检查项目" :show-close="false" :visible.sync="showProtable"
|
<el-dialog :close-on-click-modal="false" title="检查项目" :show-close="false" :visible.sync="showProtable"
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.areaList
|
datas: this.areaList,
|
||||||
|
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "单元名称",
|
name: "单元名称",
|
||||||
key: "unitId",
|
key: "unitId",
|
||||||
|
|
@ -175,7 +176,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.unitList
|
datas: this.unitList,
|
||||||
|
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "责任部门",
|
name: "责任部门",
|
||||||
key: "chargeDeptName",
|
key: "chargeDeptName",
|
||||||
|
|
@ -200,6 +202,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.diviceList,
|
datas: this.diviceList,
|
||||||
|
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "设备类型",
|
name: "设备类型",
|
||||||
key: "type",
|
key: "type",
|
||||||
|
|
@ -253,21 +256,22 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
width: "calc(100% - 20px)",
|
width: "calc(100% - 20px)",
|
||||||
labelWidth: "140px",
|
labelWidth: "140px",
|
||||||
require: true,
|
require: true,
|
||||||
|
showError: false,
|
||||||
datas: [{
|
datas: [{
|
||||||
name: "不涉及",
|
name: "不涉及",
|
||||||
disable: false,
|
disable: false,
|
||||||
value: 0
|
value: 0
|
||||||
}, {
|
}, {
|
||||||
name: "重大危险源",
|
name: "重大危险源",
|
||||||
disable: this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
|
disable: this.updateParams.majorSign && this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
|
||||||
value: 1
|
value: 1
|
||||||
}, {
|
}, {
|
||||||
name: "重大监管化工工艺",
|
name: "重大监管化工工艺",
|
||||||
disable: this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
|
disable: this.updateParams.majorSign && this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
|
||||||
value: 2
|
value: 2
|
||||||
}, {
|
}, {
|
||||||
name: "重点监管危化品",
|
name: "重点监管危化品",
|
||||||
disable: this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
|
disable: this.updateParams.majorSign && this.updateParams.majorSign.length > 0 && this.updateParams.majorSign.includes(0),
|
||||||
value: 3
|
value: 3
|
||||||
}],
|
}],
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -278,7 +282,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
format: "majorHazardName",
|
format: "majorHazardName",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
datas: this.$store.state.prevention_risk_source
|
datas: this.$store.state.prevention_risk_source,
|
||||||
|
showError: false,
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
name: "重点监管工艺",
|
name: "重点监管工艺",
|
||||||
|
|
@ -289,6 +294,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
datas: this.$store.state.prevention_risk_craft,
|
datas: this.$store.state.prevention_risk_craft,
|
||||||
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
name: "重点监管化学品",
|
name: "重点监管化学品",
|
||||||
key: "regulatoryChemical",
|
key: "regulatoryChemical",
|
||||||
|
|
@ -298,7 +304,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
labelWidth: "130px",
|
labelWidth: "130px",
|
||||||
datas: this.$store.state.prevention_risk_chemical
|
datas: this.$store.state.prevention_risk_chemical,
|
||||||
|
showError: false,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
this.subTableActions = [{
|
this.subTableActions = [{
|
||||||
|
|
@ -320,7 +327,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
disable: true,
|
disable: true,
|
||||||
datas: this.$store.state.prevention_risk_level
|
datas: this.$store.state.prevention_risk_level,
|
||||||
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
name: "残余风险等级",
|
name: "残余风险等级",
|
||||||
key: "remainRiskLevel",
|
key: "remainRiskLevel",
|
||||||
|
|
@ -329,7 +337,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
require: true,
|
require: true,
|
||||||
disable: true,
|
disable: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
datas: this.$store.state.prevention_risk_level
|
datas: this.$store.state.prevention_risk_level,
|
||||||
|
showError: false,
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -345,12 +354,12 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
hide: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
hide: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "保存并继续添加",
|
name: "保存并继续添加",
|
||||||
value: "saveAndContinue",
|
value: "storeAndContinue",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
hide: this.updateParams.id ? true : false
|
hide: this.updateParams.id ? true : false
|
||||||
}, {
|
}, {
|
||||||
name: "保存",
|
name: "保存",
|
||||||
value: "save",
|
value: "store",
|
||||||
type: "primary"
|
type: "primary"
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
@ -486,7 +495,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.subTableColumn.push({ name: '检查项目', key: "itemName" ,showTip: true,});
|
this.subTableColumn.push({ name: '检查项目', key: "itemName", showTip: true, });
|
||||||
this.subTableColumn.push({ name: '检查标准', key: "itemStandard", showTip: true, width: "100px" });
|
this.subTableColumn.push({ name: '检查标准', key: "itemStandard", showTip: true, width: "100px" });
|
||||||
this.subTableColumn.push({ name: '风险源', key: "riskSource" });
|
this.subTableColumn.push({ name: '风险源', key: "riskSource" });
|
||||||
this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis" });
|
this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis" });
|
||||||
|
|
@ -539,7 +548,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.proTableColumn.push({
|
this.proTableColumn.push({
|
||||||
name: '风险等级', key: "riskLevel", render: (data) => {
|
name: '风险等级', key: "riskLevel", width: "120px", render: (data) => {
|
||||||
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -591,8 +600,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
this.handleClose()
|
this.handleClose()
|
||||||
} else if (data.value === "estimateMatrix") {
|
} else if (data.value === "estimateMatrix") {
|
||||||
this.showMatrixModal = true
|
this.showMatrixModal = true
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("store") >= 0) {
|
||||||
this.doSave(data.value !== "save")
|
this.doSave(data.value !== "store")
|
||||||
this.isReadonly = false;
|
this.isReadonly = false;
|
||||||
} else if (data && data.value === 'addDraft') {
|
} else if (data && data.value === 'addDraft') {
|
||||||
this.doSaveDraft()
|
this.doSaveDraft()
|
||||||
|
|
@ -750,10 +759,13 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if (isTarget) {
|
if (isTarget) {
|
||||||
this.showProtable = true;
|
this.showProtable = true;
|
||||||
this.currentProTableData.datas = data.items.map((item, index) => {
|
this.tableService.selectProjectById({ deviceAnalId: data.id }).then((res: any) => {
|
||||||
item.index = index + 1;
|
this.currentProTableData.datas = res.data.map((item, index) => {
|
||||||
return item
|
item.index = index + 1;
|
||||||
|
return item
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -847,13 +859,17 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
//保存 更新
|
//保存 更新
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
// 如果是新增工作危害分析清单
|
// 如果是新增工作危害分析清单
|
||||||
//对数据进行处理
|
//对数据进行处理\
|
||||||
this.saveTransformData();
|
if ((this.$refs.basicForm as any).vaildParams()) {
|
||||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
if ((this.$refs.riskForm as any).vaildParams()) {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.saveTransformData();
|
||||||
this.showUpdate = !!goOn;
|
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
||||||
this.getTableData();
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
})
|
this.showUpdate = !!goOn;
|
||||||
|
this.getTableData();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="table-box flex-1">
|
<div class="table-box flex-1">
|
||||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
||||||
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
|
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
|
||||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
|
@pageSizeChange="callback($event,'pageSize')" :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 type="selection" fixed label="全选" width="40">
|
<el-table-column type="selection" fixed label="全选" width="40">
|
||||||
|
|
@ -46,13 +46,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
|
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
|
||||||
:visible.sync="showUpdate" width="1080px" :before-close="handleClose" destroy-on-close>
|
:visible.sync="showUpdate" width="1080px" :before-close="handleClose" destroy-on-close>
|
||||||
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth"
|
||||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
:data.sync="updateParams" :isReadonly="isReadonly" @actionCallback="callback" @change="changes"
|
||||||
|
ref="basicForm">
|
||||||
<div class="sub-title">工作危害分析法</div>
|
<div class="sub-title">工作危害分析法</div>
|
||||||
<TableComponent :tableData="updateParams" :tableColumn="subTableColumn"
|
<TableComponent :tableData="updateParams" :tableColumn="subTableColumn" @actionCallback="callback($event)"
|
||||||
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
|
:actions="isReadonly? []:subTableActions" actionPosition="flex-start" :showFooter="false"
|
||||||
:showFooter="false" style="margin-bottom: 20px;">
|
style="margin-bottom: 20px;">
|
||||||
<el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" max-height="500" border
|
<el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" max-height="500" border
|
||||||
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
||||||
<el-table-column v-if="!isReadonly" type="selection" fixed label="全选" width="40">
|
<el-table-column v-if="!isReadonly" type="selection" fixed label="全选" width="40">
|
||||||
|
|
@ -72,28 +73,30 @@
|
||||||
<el-button v-if="isReadonly || isModifyonly" type="text"
|
<el-button v-if="isReadonly || isModifyonly" type="text"
|
||||||
@click="showSubModel(scope.row,true)">查看</el-button>
|
@click="showSubModel(scope.row,true)">查看</el-button>
|
||||||
<el-button v-if="isModifyonly" type="text" @click="showSubModel(scope.row)">修改</el-button>
|
<el-button v-if="isModifyonly" type="text" @click="showSubModel(scope.row)">修改</el-button>
|
||||||
<el-button v-if="!isReadonly && !isModifyonly" type="text" @click="showSubModel(scope.row)">评价</el-button>
|
<el-button v-if="!isReadonly && !isModifyonly" type="text"
|
||||||
|
@click="showSubModel(scope.row)">评价</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</TableComponent>
|
</TableComponent>
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth"
|
||||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes"
|
:data.sync="updateParams" :isReadonly="isReadonly" @actionCallback="callback" @change="changes"
|
||||||
:actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center">
|
:actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center" ref="riskForm">
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 评估矩阵 -->
|
<!-- 评估矩阵 -->
|
||||||
<el-dialog :close-on-click-modal="false" :visible.sync="showMatrixModal" width="600px" :title="'区域风险等级判定准则'" destroy-on-close>
|
<el-dialog :close-on-click-modal="false" :visible.sync="showMatrixModal" width="600px" :title="'区域风险等级判定准则'"
|
||||||
|
destroy-on-close>
|
||||||
<img style="width:90%" src="../../../../assets/images/5.png" alt="">
|
<img style="width:90%" src="../../../../assets/images/5.png" alt="">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 危害分析评价 -->
|
<!-- 危害分析评价 -->
|
||||||
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="952px"
|
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="952px"
|
||||||
:before-close="handleAnalyClose" destroy-on-close>
|
:before-close="handleAnalyClose" destroy-on-close>
|
||||||
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
|
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
|
||||||
:show.sync="showSubUpdate" :tabledata.sync="updateParams"
|
:show.sync="showSubUpdate" :tabledata.sync="updateParams" :areaList="areaList" :type="'work'"
|
||||||
:areaList="areaList" :type="'work'" :checkRiskType="checkRiskType"></AnalEvaluationComponent>
|
:checkRiskType="checkRiskType"></AnalEvaluationComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 检查项目 -->
|
<!-- 检查项目 -->
|
||||||
<el-dialog :close-on-click-modal="false" title="作业步骤" :show-close="false" :visible.sync="showProtable"
|
<el-dialog :close-on-click-modal="false" title="作业步骤" :show-close="false" :visible.sync="showProtable"
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.areaList
|
datas: this.areaList,
|
||||||
|
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "单元名称",
|
name: "单元名称",
|
||||||
key: "unitId",
|
key: "unitId",
|
||||||
|
|
@ -175,7 +176,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.unitList
|
datas: this.unitList,
|
||||||
|
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "责任部门",
|
name: "责任部门",
|
||||||
key: "chargeDeptName",
|
key: "chargeDeptName",
|
||||||
|
|
@ -200,6 +202,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.jobList,
|
datas: this.jobList,
|
||||||
|
disable: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "作业地点",
|
name: "作业地点",
|
||||||
key: "location",
|
key: "location",
|
||||||
|
|
@ -351,12 +354,12 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
hide: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
hide: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||||
}, {
|
}, {
|
||||||
name: "保存并继续添加",
|
name: "保存并继续添加",
|
||||||
value: "saveAndContinue",
|
value: "storeAndContinue",
|
||||||
type: "primary",
|
type: "primary",
|
||||||
hide: this.updateParams.id ? true : false
|
hide: this.updateParams.id ? true : false
|
||||||
}, {
|
}, {
|
||||||
name: "保存",
|
name: "保存",
|
||||||
value: "save",
|
value: "store",
|
||||||
type: "primary"
|
type: "primary"
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
@ -365,17 +368,20 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
onChanges() {
|
onChanges() {
|
||||||
this.loadAreaData()
|
this.loadAreaData()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Watch("updateParams", { immediate: true, deep: true })
|
@Watch("updateParams", { immediate: true, deep: true })
|
||||||
onCountValueChange() {
|
onCountValueChange() {
|
||||||
this.buildUpdateForm()
|
this.buildUpdateForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载区域列表
|
// 加载区域列表
|
||||||
public loadAreaData() {
|
public loadAreaData() {
|
||||||
|
|
||||||
this.unitList = [];
|
this.unitList = [];
|
||||||
this.jobList = [];
|
this.jobList = [];
|
||||||
this.tableService.getDistinctList({}).then((res: any) => {
|
this.tableService.getDistinctList({}).then((res: any) => {
|
||||||
|
|
@ -532,23 +538,23 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.proTableColumn.push({ name: '作业地点', key: "location" });
|
this.proTableColumn.push({ name: '作业地点', key: "location" });
|
||||||
this.proTableColumn.push({ name: '风险源', key: "riskSource", width: "100px", });
|
this.proTableColumn.push({ name: '风险源', key: "riskSource", width: "100px", });
|
||||||
this.proTableColumn.push({
|
this.proTableColumn.push({
|
||||||
name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => {
|
name: '可能发生事故', key: "seriousResult", width: "130px", render: (data) => {
|
||||||
if (data.seriousResult) {
|
if (data.seriousResult) {
|
||||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.proTableColumn.push({
|
this.proTableColumn.push({
|
||||||
name: '风险等级', key: "riskLevel", render: (data) => {
|
name: '风险等级', key: "riskLevel", width: "100px", render: (data) => {
|
||||||
if (data.riskLevel) {
|
if (data.riskLevel) {
|
||||||
return "<span class='color_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.proTableColumn.push({
|
this.proTableColumn.push({
|
||||||
name: '残余风险等级', key: "remainLevel", width: "120px", render: (data) => {
|
name: '残余风险等级', key: "remainLevel", width: "120px", render: (data) => {
|
||||||
if (data.remainLevel) {
|
if (data.remainLevel) {
|
||||||
return "<span class='color_" + data.remainLevel + "'>" + (data.remainLevel ? (this.$store.getters.prevention_risk_level_map[data.remainLevel]) : '') + "</span>"
|
return "<span class='color_level_" + data.remainLevel + "'>" + (data.remainLevel ? (this.$store.getters.prevention_risk_level_map[data.remainLevel]) : '') + "</span>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -595,8 +601,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
} else if (data.value === "estimateMatrix") {
|
} else if (data.value === "estimateMatrix") {
|
||||||
this.showMatrixModal = true
|
this.showMatrixModal = true
|
||||||
//保存
|
//保存
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("store") >= 0) {
|
||||||
this.doSave(data.value !== "save")
|
this.doSave(data.value !== "store")
|
||||||
this.isReadonly = false;
|
this.isReadonly = false;
|
||||||
//存草稿
|
//存草稿
|
||||||
} else if (data && data.value === 'addDraft') {
|
} else if (data && data.value === 'addDraft') {
|
||||||
|
|
@ -750,10 +756,15 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
public showPros(el, data) {
|
public showPros(el, data) {
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if (isTarget) {
|
if (isTarget) {
|
||||||
this.showProtable = true;
|
this.currentId = data.id;
|
||||||
this.currentProTableData.datas = data.steps.map((item, index) => {
|
this.tableService.selectStepById({ jobAnalId: this.currentId }).then((res: any) => {
|
||||||
item.index = index + 1;
|
if (res.code === 200) {
|
||||||
return item
|
this.showProtable = true;
|
||||||
|
this.currentProTableData.datas = res.data.map((item, index) => {
|
||||||
|
item.index = index + 1;
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -847,12 +858,16 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
// 如果是新增工作危害分析清单
|
// 如果是新增工作危害分析清单
|
||||||
//对数据进行处理
|
//对数据进行处理
|
||||||
this.saveTransformData();
|
if ((this.$refs.basicForm as any).vaildParams()) {
|
||||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
if ((this.$refs.riskForm as any).vaildParams()) {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.saveTransformData();
|
||||||
this.showUpdate = !!goOn;
|
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
||||||
this.getTableData();
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
})
|
this.showUpdate = !!goOn;
|
||||||
|
this.getTableData();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="tableActions">
|
@pageSizeChange="callback($event,'pageSize')" :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%" @sort-change="sortChange($event)">
|
||||||
<el-table-column type="selection" fixed label="全选" width="60px">
|
<el-table-column type="selection" fixed label="全选" width="60px">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="序号" width="60">
|
<el-table-column label="序号" width="60">
|
||||||
|
|
@ -22,11 +22,11 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-for="item in tableColumn">
|
<template v-for="item in tableColumn">
|
||||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
|
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key" :sortable="item.sortable">
|
||||||
<div slot-scope="scope" v-html="item.render(scope.row)" :filters="item.filters"
|
<div slot-scope="scope" v-html="item.render(scope.row)" :filters="item.filters"
|
||||||
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip"></div>
|
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip"></div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key"
|
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key" :sortable="item.sortable"
|
||||||
:filters="item.filters" :filter-method="item.filterMethod"
|
:filters="item.filters" :filter-method="item.filterMethod"
|
||||||
:show-overflow-tooltip="item.showTip">
|
:show-overflow-tooltip="item.showTip">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,10 @@ import moment from 'moment';
|
||||||
export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
public tableService = new DutyService();
|
public tableService = new DutyService();
|
||||||
|
|
||||||
public params = {} as any;
|
public params = {
|
||||||
|
orderByColumn: "",
|
||||||
|
isAsc: "desc"
|
||||||
|
} as any;
|
||||||
|
|
||||||
|
|
||||||
public formActions = [{
|
public formActions = [{
|
||||||
|
|
@ -78,6 +81,10 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
public showFile = false;
|
public showFile = false;
|
||||||
|
|
||||||
public currentUrl = null;
|
public currentUrl = null;
|
||||||
|
//排序属性转换
|
||||||
|
public sortAttribute = {
|
||||||
|
submitTime: "submit_time"
|
||||||
|
} as any;
|
||||||
|
|
||||||
public account = JSON.parse(localStorage.getItem("account") as any);
|
public account = JSON.parse(localStorage.getItem("account") as any);
|
||||||
|
|
||||||
|
|
@ -155,8 +162,8 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
}, {
|
}, {
|
||||||
name: "隐患类别",
|
name: "隐患类别",
|
||||||
key: "taskType",
|
key: "dangerType",
|
||||||
format: "taskTypeName",
|
format: "dangerTypeName",
|
||||||
type: "select",
|
type: "select",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
require: true,
|
require: true,
|
||||||
|
|
@ -240,29 +247,32 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.params.unitName = "";
|
this.params.unitName = "";
|
||||||
this.params.areaName = "";
|
this.params.areaName = "";
|
||||||
if (data.areaId) {
|
if (data.areaId) {
|
||||||
this.params.unitName = data.name
|
this.params.unitId = data.id
|
||||||
} else {
|
} else {
|
||||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
this.params.areaId = data.id
|
||||||
}
|
}
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '管控对象', key: "analControlName" });
|
this.tableColumn.push({ name: '管控对象', key: "analControlName" });
|
||||||
this.tableColumn.push({ name: '分析对象', key: "itemName" });
|
this.tableColumn.push({ name: '分析对象', key: "itemName" });
|
||||||
this.tableColumn.push({ name: '管控措施', key: "measureDescription" });
|
this.tableColumn.push({ name: '管控措施', key: "measureDescription" });
|
||||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName" });
|
this.tableColumn.push({ name: '隐患排查任务', key: "taskName" });
|
||||||
this.tableColumn.push({ name: '结束时间', key: "endTime" });
|
this.tableColumn.push({ name: '排查时间', key: "endTime" });
|
||||||
this.tableColumn.push({ name: '责任人', key: "taskChargeUserName" });
|
this.tableColumn.push({ name: '责任人', key: "taskChargeUserName" });
|
||||||
this.tableColumn.push({ name: '生成时间', key: "generateTime" });
|
this.tableColumn.push({ name: '开始时间', key: "taskStartTime", sortable: 'custom' });
|
||||||
|
this.tableColumn.push({ name: '截止时间', key: "taskEndTime", });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '任务状态', width: "110px", key: "status", render: (data) => {
|
name: '任务状态', width: "110px", key: "status", render: (data) => {
|
||||||
if (data.status == 2) {
|
if (data.status == 2) {
|
||||||
return "<span class='noDraw'>待排查</span>"
|
return "<span class='color_2'>待排查</span>"
|
||||||
} else if (data.status == 1) {
|
} else if (data.status == 1) {
|
||||||
return "<span class='color_1'>已排查</span>"
|
return "<span class='color_1'>已排查</span>"
|
||||||
} else if (data.status == 3) {
|
} else if (data.status == 3) {
|
||||||
return "<span class='color_3'>超期未排查</span>"
|
return "<span class='noDraw'>超期未排查</span>"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: this.$store.state.prevention_task_status.map(item => {
|
filters: this.$store.state.prevention_task_status.map(item => {
|
||||||
|
|
@ -276,6 +286,39 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//截止时间计算
|
||||||
|
// 开始时间 + 周期(周期单位) - 一天
|
||||||
|
public submitEndTime(begindate, inspectCycleValue, inspectCycleUnit) {
|
||||||
|
let unitData = this.transformDate(inspectCycleUnit)
|
||||||
|
if (unitData) {
|
||||||
|
if (unitData === 'halfyear') {
|
||||||
|
return moment(begindate).add(inspectCycleValue * 6, 'months').format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
} else {
|
||||||
|
return moment(begindate).add(inspectCycleValue, unitData).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//周期单位转换
|
||||||
|
public transformDate(unit) {
|
||||||
|
switch (unit) {
|
||||||
|
case 1:
|
||||||
|
return 'year';
|
||||||
|
case 2:
|
||||||
|
return 'halfyear';
|
||||||
|
case 3:
|
||||||
|
return 'quarters';
|
||||||
|
case 4:
|
||||||
|
return 'months';
|
||||||
|
case 5:
|
||||||
|
return 'weeks';
|
||||||
|
case 6:
|
||||||
|
return 'days';
|
||||||
|
case 7:
|
||||||
|
return 'hours';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public callback(data, type) {
|
public callback(data, type) {
|
||||||
if (type) {
|
if (type) {
|
||||||
this.params[type] = data;
|
this.params[type] = data;
|
||||||
|
|
@ -342,7 +385,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (item && item.key === "result") {
|
if (item && item.key === "result") {
|
||||||
if (data === 1) {
|
if (data === 1) {
|
||||||
this.updateParams.dangerFlag = null
|
this.updateParams.dangerFlag = null
|
||||||
this.updateParams.taskType = null
|
this.updateParams.dangerType = null
|
||||||
this.updateParams.ownerId = null
|
this.updateParams.ownerId = null
|
||||||
} else if (data === 2) {
|
} else if (data === 2) {
|
||||||
this.updateParams.dangerFlag = 0
|
this.updateParams.dangerFlag = 0
|
||||||
|
|
@ -351,7 +394,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
if (item && item.key === "dangerFlag") {
|
if (item && item.key === "dangerFlag") {
|
||||||
if (data === 0) {
|
if (data === 0) {
|
||||||
this.updateParams.taskType = null
|
this.updateParams.dangerType = null
|
||||||
this.updateParams.ownerId = null
|
this.updateParams.ownerId = null
|
||||||
}
|
}
|
||||||
this.subUpdateForm()
|
this.subUpdateForm()
|
||||||
|
|
@ -450,12 +493,25 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||||
imeiCode: moment().format('DDHHmm') + mathData,
|
imeiCode: moment().format('DDHHmm') + mathData,
|
||||||
result: 1
|
result: 1
|
||||||
}, row)
|
}, row)
|
||||||
this.updateParams.checkUserId = this.account.userId,
|
this.updateParams.checkUserId = this.account.userId
|
||||||
this.updateParams.status = 1
|
this.updateParams.status = 1
|
||||||
this.updateParams.endTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
this.updateParams.endTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||||
this.subUpdateForm()
|
this.subUpdateForm()
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//排序事件
|
||||||
|
public sortChange(column) {
|
||||||
|
if (column.order) {
|
||||||
|
this.params.isAsc = column.order == "descending" ? 'desc' : 'asc'
|
||||||
|
this.params.orderByColumn = this.sortAttribute[column.prop]
|
||||||
|
} else {
|
||||||
|
this.params.isAsc = null
|
||||||
|
this.params.orderByColumn = null
|
||||||
|
}
|
||||||
|
this.getTableData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
}, {
|
}, {
|
||||||
name: "隐患类别",
|
name: "隐患类别",
|
||||||
key: "dangerType",
|
key: "dangerType",
|
||||||
format: "taskTypeName",
|
format: "dangerTypeName",
|
||||||
type: "select",
|
type: "select",
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)"
|
width: "calc(50% - 20px)"
|
||||||
|
|
@ -201,9 +201,9 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", with: "250px" });
|
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", with: "250px" });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '排查结果', key: "result", render: (data) => {
|
name: '排查结果', key: "result", render: (data) => {
|
||||||
if (data.status == 0) {
|
if (data.result == 2) {
|
||||||
return "<span class='noDraw'>异常</span>"
|
return "<span class='noDraw'>异常</span>"
|
||||||
} else if (data.status == 1) {
|
} else if (data.result == 1) {
|
||||||
return "<span class='color_1'>正常</span>"
|
return "<span class='color_1'>正常</span>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -223,10 +223,20 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
return "<span class='noDraw'>是</span>"
|
return "<span class='noDraw'>是</span>"
|
||||||
} else if (data.dangerFlag == 0) {
|
} else if (data.dangerFlag == 0) {
|
||||||
return "<span>否</span>"
|
return "<span>否</span>"
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.tableColumn.push({
|
||||||
|
name: '隐患归属人', key: "ownerName", render: (data) => {
|
||||||
|
if (data.ownerName) {
|
||||||
|
return data.ownerName
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({ name: '隐患归属人', key: "ownerName" });
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -360,7 +370,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
|
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
|
||||||
resultName: row.result === 1 ? '正常' : '异常',
|
resultName: row.result === 1 ? '正常' : '异常',
|
||||||
dangerFlagName: row.dangerFlag === 0 ? '否' : row.dangerFlag === 1 ? '是' : null,
|
dangerFlagName: row.dangerFlag === 0 ? '否' : row.dangerFlag === 1 ? '是' : null,
|
||||||
taskTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType],
|
dangerTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType],
|
||||||
checkUserName: this.$store.getters.user_map[row.checkUserId]
|
checkUserName: this.$store.getters.user_map[row.checkUserId]
|
||||||
}, row)
|
}, row)
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
|
|
|
||||||
|
|
@ -101,18 +101,18 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '管控对象', key: "controlName"});
|
this.tableColumn.push({ name: '管控对象', key: "controlName" });
|
||||||
this.tableColumn.push({ name: '分析对象', key: "analName"});
|
this.tableColumn.push({ name: '分析对象', key: "analName" });
|
||||||
this.tableColumn.push({ name: '风险源', key: "riskSource"});
|
this.tableColumn.push({ name: '风险源', key: "riskSource" });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '事故后果', key: "seriousResult", render: (data) => {
|
name: '事故后果', key: "seriousResult", render: (data) => {
|
||||||
if (data.seriousResult) {
|
if (data.seriousResult) {
|
||||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '风险等级', key: "riskLevel", render: (data) => {
|
name: '风险等级', key: "riskLevel", render: (data) => {
|
||||||
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
||||||
},
|
},
|
||||||
filters: this.$store.state.prevention_risk_level.map(item => {
|
filters: this.$store.state.prevention_risk_level.map(item => {
|
||||||
|
|
@ -125,15 +125,15 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '措施详情', key: "measureNum", render: (data) => {
|
name: '措施详情', key: "detailNum", render: (data) => {
|
||||||
return "<span class='link'>" + (data.details ? data.details.length : 0) + "</span>"
|
return "<span class='link'>" + (data.detailNum ? data.detailNum : 0) + "</span>"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({ name: '涉及岗位', key: "postName" });
|
this.tableColumn.push({ name: '涉及岗位', key: "postName" });
|
||||||
|
|
||||||
|
|
||||||
//管控措施详情
|
//管控措施详情
|
||||||
this.proTableColumn.push({ name: '序号', key: "index",});
|
this.proTableColumn.push({ name: '序号', key: "index", });
|
||||||
this.proTableColumn.push({
|
this.proTableColumn.push({
|
||||||
name: '措施类型一', key: "firstTypeName", render: (data) => {
|
name: '措施类型一', key: "firstTypeName", render: (data) => {
|
||||||
if (data.firstType) {
|
if (data.firstType) {
|
||||||
|
|
@ -151,7 +151,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.proTableColumn.push({ name: '措施类型三', key: "thirdType" });
|
this.proTableColumn.push({ name: '措施类型三', key: "thirdType" });
|
||||||
this.proTableColumn.push({ name: '管控措施', key: "description",});
|
this.proTableColumn.push({ name: '管控措施', key: "description", });
|
||||||
}
|
}
|
||||||
|
|
||||||
public callback(data, type) {
|
public callback(data, type) {
|
||||||
|
|
@ -200,8 +200,8 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public toggleAll() {
|
public toggleAll() {
|
||||||
|
|
||||||
this.tableData.datas.forEach((item,index)=>{
|
this.tableData.datas.forEach((item, index) => {
|
||||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -226,11 +226,17 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
||||||
public showPros(el, data) {
|
public showPros(el, data) {
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if (isTarget) {
|
if (isTarget) {
|
||||||
this.showProtable = true;
|
this.tableService.selectDetailById({ measureInventoryId: data.id }).then((res: any) => {
|
||||||
this.currentProTableData.datas = data.details.map((item, index) => {
|
if (res.code === 200) {
|
||||||
item.index = index + 1;
|
this.currentProTableData.datas = res.data.datas.map((item, index) => {
|
||||||
return item
|
item.index = index + 1;
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
this.showProtable = true;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,9 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
|
|
||||||
public filterStatusData: any;
|
public filterStatusData: any;
|
||||||
|
|
||||||
|
//来源类型
|
||||||
|
public sourceType = ["","JHA","SCL","线下评估","巡检"]
|
||||||
|
|
||||||
public subActions = [{
|
public subActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value: "cancel"
|
value: "cancel"
|
||||||
|
|
@ -154,6 +157,11 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
return row.status === data;
|
return row.status === data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.tableColumn.push({
|
||||||
|
name: '来源', key: "type", render:(data)=>{
|
||||||
|
return this.sourceType[data.type]
|
||||||
|
}
|
||||||
|
});
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '区域名称', key: "areaName", width: "130px",
|
name: '区域名称', key: "areaName", width: "130px",
|
||||||
});
|
});
|
||||||
|
|
@ -252,6 +260,10 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
return this.$store.getters.prevention_cycle_unit_map[data.taskReviewCycleUnit]
|
return this.$store.getters.prevention_cycle_unit_map[data.taskReviewCycleUnit]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.tableColumn.push({ name: '开始执行时间', key: "executeStartTime", width: "150px" });
|
||||||
|
this.tableColumn.push({ name: '开始时间', key: "startTime", width: "100px" });
|
||||||
|
this.tableColumn.push({ name: '结束时间', key: "endTime", width: "100px" });
|
||||||
|
|
||||||
|
|
||||||
//查看执行记录
|
//查看执行记录
|
||||||
this.proTableColumn.push({ name: '序号', key: "index", width: "80px" });
|
this.proTableColumn.push({ name: '序号', key: "index", width: "80px" });
|
||||||
|
|
@ -279,7 +291,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
||||||
return "<span class='noDraw'>是</span>"
|
return "<span class='noDraw'>是</span>"
|
||||||
} else if (data.dangerFlag == 0) {
|
} else if (data.dangerFlag == 0) {
|
||||||
return "<span>否</span>"
|
return "<span>否</span>"
|
||||||
}else{
|
} else {
|
||||||
return '--'
|
return '--'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue