forked from xxhjsb/hbt-prevention-ui
feat:更新到线上环境,依据测试进行优化
parent
64b7afc5a1
commit
405c549834
|
@ -1,4 +1,4 @@
|
||||||
#生产环境
|
#开发环境
|
||||||
NODE_ENV:"production"
|
NODE_ENV:"production"
|
||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 汉邦唐全真数字服务平台
|
VUE_APP_TITLE = 汉邦唐全真数字服务平台
|
||||||
|
@ -7,10 +7,13 @@ VUE_APP_GATEWAY_URL="/prod-api"
|
||||||
# 服务地址
|
# 服务地址
|
||||||
VUE_APP_BASE_API_URL=""
|
VUE_APP_BASE_API_URL=""
|
||||||
# 服务前-- 请严格遵守格式 不允许换行
|
# 服务前-- 请严格遵守格式 不允许换行
|
||||||
VUE_APP_SERVICE_PREFIX= '{"knowledge":"/knowledge","system":"/system"}'
|
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file","prevention":"/prevention","bpm":"/bpm"}'
|
||||||
# 是否显示全部菜单
|
# 是否显示全部菜单
|
||||||
VUE_APP_ALL_MENU = false
|
VUE_APP_ALL_MENU = false
|
||||||
# 微前端地址
|
# # 微前端地址
|
||||||
|
# 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/"
|
VUE_APP_REMOTES_URL="http://119.45.158.12/common/"
|
||||||
# 当前应用部署地址
|
# 当前应用部署地址
|
||||||
VUE_APP_EXPOSES_URL=""
|
VUE_APP_EXPOSES_URL="/prevention"
|
|
@ -278,7 +278,7 @@ export default class AnalEvaluationComponent extends Vue {
|
||||||
{
|
{
|
||||||
name: "危害分析",
|
name: "危害分析",
|
||||||
key: "hazardAnalysis",
|
key: "hazardAnalysis",
|
||||||
type: "text",
|
type: "textarea",
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(100% - 20px)"
|
width: "calc(100% - 20px)"
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
</TableComponent>
|
</TableComponent>
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
|
|
||||||
<el-dialog :close-on-click-modal="false" :title="taskIsReadonly?'详情':taskUpdataParams.index?'编辑':'新增'" :visible.sync="showSubUpdate" width="952px"
|
<el-dialog :close-on-click-modal="false" :title="taskIsReadonly ? '详情' : taskUpdataParams.index ? '编辑' : '新增'"
|
||||||
:before-close="handleCloseTask">
|
:visible.sync="showSubUpdate" width="952px" :before-close="handleCloseTask">
|
||||||
<FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right"
|
<FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right"
|
||||||
:data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center"
|
:data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center"
|
||||||
@actionCallback="taskCallback" @change="taskSelectChange">
|
@actionCallback="taskCallback" @change="taskSelectChange">
|
||||||
|
@ -127,15 +127,17 @@ export default class MeasureComponent extends Vue {
|
||||||
width: "25%",
|
width: "25%",
|
||||||
datas: this.secondTypeItem
|
datas: this.secondTypeItem
|
||||||
}, {
|
}, {
|
||||||
|
name:"",
|
||||||
key: "thirdType",
|
key: "thirdType",
|
||||||
type: "text",
|
type: "text",
|
||||||
require: true,
|
require: true,
|
||||||
width: "25%",
|
width: "25%",
|
||||||
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
|
|
||||||
name: "措施描述",
|
name: "措施描述",
|
||||||
key: "description",
|
key: "description",
|
||||||
type: "text",
|
type: "textarea",
|
||||||
require: true,
|
require: true,
|
||||||
width: "100%"
|
width: "100%"
|
||||||
}];
|
}];
|
||||||
|
@ -202,7 +204,7 @@ export default class MeasureComponent extends Vue {
|
||||||
}, {
|
}, {
|
||||||
name: "隐患排查任务",
|
name: "隐患排查任务",
|
||||||
key: "name",
|
key: "name",
|
||||||
type: "text",
|
type: "textarea",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
require: true,
|
require: true,
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -44,4 +44,9 @@ export default class JobHazardService extends BaseService<any>{
|
||||||
const url = this.prefix.prevention+'/job/inventory/filter/list';
|
const url = this.prefix.prevention+'/job/inventory/filter/list';
|
||||||
return this.post(url,params,{},true)
|
return this.post(url,params,{},true)
|
||||||
}
|
}
|
||||||
|
//过滤区域单元
|
||||||
|
public getDistinctList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
|
const url = this.prefix.prevention+'/job/inventory/getDistinctList';
|
||||||
|
return this.post(url,params)
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -197,24 +197,31 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.$store.state.prevention_danger_check_type
|
datas: this.$store.state.prevention_danger_check_type
|
||||||
}, {
|
}, {
|
||||||
name: "巡检周期",
|
name: "巡检周期 每隔",
|
||||||
key: "inspectCycleValue",
|
key: "inspectCycleValue",
|
||||||
type: "number",
|
type: "number",
|
||||||
hide: this.updateParams.planType === 1,
|
hide: this.updateParams.planType === 1,
|
||||||
controls: false,
|
controls: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(35% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
showError: false,
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
name: "巡检周期单位",
|
// name: "巡检周期单位",
|
||||||
key: "inspectCycleUnit",
|
key: "inspectCycleUnit",
|
||||||
format: "inspectCycleUnitName",
|
format: "inspectCycleUnitName",
|
||||||
type: "select",
|
type: "select",
|
||||||
hide: this.updateParams.planType === 1,
|
hide: this.updateParams.planType === 1,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(15% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.$store.state.prevention_cycle_unit
|
datas: this.$store.state.prevention_cycle_unit
|
||||||
|
}, {
|
||||||
|
name: "1次",
|
||||||
|
key: "times",
|
||||||
|
type: 'null',
|
||||||
|
labelWidth:"0px",
|
||||||
|
// width: "30px",
|
||||||
|
hide: this.updateParams.planType === 1,
|
||||||
},{
|
},{
|
||||||
name: "检查区域",
|
name: "检查区域",
|
||||||
key: "areaIds",
|
key: "areaIds",
|
||||||
|
@ -345,9 +352,9 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '检查标题', key: "name", width: "100px" });
|
this.tableColumn.push({ name: '检查标题', key: "name", width: "250px" });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '检查类型', width: "100px", render: (data) => {
|
name: '检查类型', render: (data) => {
|
||||||
return this.$store.getters.prevention_danger_check_type_map[data.inspectType]
|
return this.$store.getters.prevention_danger_check_type_map[data.inspectType]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -356,9 +363,9 @@ 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", width: "100px" });
|
this.tableColumn.push({ name: '检查负责人', key: "chargeUserName",});
|
||||||
this.tableColumn.push({ name: '检查范围', width: "270px", key: "scope" });
|
this.tableColumn.push({ name: '检查范围', key: "scope" });
|
||||||
this.tableColumn.push({ name: '发现隐患数量', key: "dangerCount", width: "120px" });
|
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]
|
||||||
|
|
|
@ -156,7 +156,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
name: "岗位:",
|
name: "岗位:",
|
||||||
type: "text",
|
type: "text",
|
||||||
key: "postName",
|
key: "postName",
|
||||||
require: true,
|
// require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
disable: true,
|
disable: true,
|
||||||
|
@ -188,7 +188,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
showError: false,
|
showError: false,
|
||||||
datas: this.rewardsType
|
datas: this.rewardsType
|
||||||
}, {
|
}, {
|
||||||
name: "发生金额/¥",
|
name: "发生金额/元",
|
||||||
type: "number",
|
type: "number",
|
||||||
key: "money",
|
key: "money",
|
||||||
require: true,
|
require: true,
|
||||||
|
@ -244,12 +244,16 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
if (item && item.key === 'userId') {
|
if (item && item.key === 'userId') {
|
||||||
this.userService.getDetailsByIds({ userId: data }).then((res: any) => {
|
this.userService.getDetailsByIds({ userId: data }).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const postName = res.posts.map((item) => item.postName).join(",")
|
const postName = res.postIds.map((item) => {
|
||||||
|
if (item) {
|
||||||
|
return this.$store.getters.post_map[item]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
).join(",")
|
||||||
this.updateParams.userName = res.data.nickName
|
this.updateParams.userName = res.data.nickName
|
||||||
this.updateParams.postName = postName
|
this.updateParams.postName = postName
|
||||||
this.buildUpdateForm()
|
this.buildUpdateForm()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -282,7 +286,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.subTableColumn.push({ name: '事由', key: "reason", });
|
this.subTableColumn.push({ name: '事由', key: "reason", });
|
||||||
this.subTableColumn.push({ name: '发生金额/¥', key: "money" });
|
this.subTableColumn.push({ name: '发生金额/元', key: "money" });
|
||||||
this.subTableColumn.push({ name: '实施人', key: "operatorName", });
|
this.subTableColumn.push({ name: '实施人', key: "operatorName", });
|
||||||
this.subTableColumn.push({ name: '实施部门', key: "operateDeptName", });
|
this.subTableColumn.push({ name: '实施部门', key: "operateDeptName", });
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
v-if="scope.row.recordFlag" @blur="inputClick(scope.row)" v-focus></el-input>
|
v-if="scope.row.recordFlag" @blur="inputClick(scope.row)" v-focus></el-input>
|
||||||
<span
|
<span
|
||||||
style="font-size: 14px;font-weight: 400;color: rgba(0,0,0,0.3) ;line-height: 20px;"
|
style="font-size: 14px;font-weight: 400;color: rgba(0,0,0,0.3) ;line-height: 20px;"
|
||||||
v-if="!scope.row.recordFlag && !scope.row.record">{{'点击输入评估记录'}}</span>
|
v-if="!scope.row.recordFlag && !scope.row.record">{{isReadonly?'--': '点击输入评估记录'}}</span>
|
||||||
<span v-if="!scope.row.recordFlag &&scope.row.record ">
|
<span v-if="!scope.row.recordFlag &&scope.row.record ">
|
||||||
{{scope.row.record}}
|
{{scope.row.record}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -188,10 +188,6 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
||||||
public updateActions = [{
|
public updateActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value: "cancel"
|
value: "cancel"
|
||||||
}, {
|
|
||||||
name: "保存并继续添加",
|
|
||||||
value: "saveAndContinue",
|
|
||||||
type: "primary"
|
|
||||||
},{
|
},{
|
||||||
name: "保存",
|
name: "保存",
|
||||||
value: "save",
|
value: "save",
|
||||||
|
|
|
@ -170,6 +170,7 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
}, {
|
}, {
|
||||||
name: "重大危险源等级",
|
name: "重大危险源等级",
|
||||||
key: "majorHazardLevel",
|
key: "majorHazardLevel",
|
||||||
|
format: "majorHazardLevelName",
|
||||||
type: "select",
|
type: "select",
|
||||||
hide: !this.updateParams.majorHazardFlag,
|
hide: !this.updateParams.majorHazardFlag,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
|
@ -275,10 +276,13 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.tableColumn.push({ name: '区域名称', key: "name" });
|
this.tableColumn.push({ name: '区域名称', key: "name" });
|
||||||
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
|
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
|
||||||
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
|
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
|
||||||
this.tableColumn.push({name:'是否属于重大危险源',key:"majorHazardFlag",render:(data)=>{
|
this.tableColumn.push({
|
||||||
|
name: '是否属于重大危险源', key: "majorHazardFlag", render: (data) => {
|
||||||
return this.$store.getters.common_yes_no_map[data.majorHazardFlag]
|
return this.$store.getters.common_yes_no_map[data.majorHazardFlag]
|
||||||
}});
|
}
|
||||||
this.tableColumn.push({name:'绘制情况',filters:this.filters,filterMethod:(data,row)=>{
|
});
|
||||||
|
this.tableColumn.push({
|
||||||
|
name: '绘制情况', filters: this.filters, filterMethod: (data, row) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
return row.geoJson && row.geoJson !== "[]"
|
return row.geoJson && row.geoJson !== "[]"
|
||||||
} else {
|
} else {
|
||||||
|
@ -288,9 +292,10 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (data.geoJson === '[]' || !data.geoJson) {
|
if (data.geoJson === '[]' || !data.geoJson) {
|
||||||
return "<span class='noDraw'>未绘制</span>"
|
return "<span class='noDraw'>未绘制</span>"
|
||||||
} else {
|
} else {
|
||||||
return "<span>已绘制</span>"
|
return "<span class='color_1'>已绘制</span>"
|
||||||
}
|
}
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public doDraw() {
|
public doDraw() {
|
||||||
|
@ -393,7 +398,7 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.getCreateNumber();
|
this.getCreateNumber();
|
||||||
} else {
|
} else {
|
||||||
this.currentId = data.id;
|
this.currentId = data.id;
|
||||||
this.updateParams = Object.assign({bottomHeight:0,topHeight:0,geoJson:"[]",majorHazardFlagName:this.$store.getters.common_yes_no_map[data.majorHazardFlag]},data);
|
this.updateParams = Object.assign({ bottomHeight: 0, topHeight: 0, geoJson: "[]", majorHazardFlagName: this.$store.getters.common_yes_no_map[data.majorHazardFlag], majorHazardLevelName: this.levelName(data.majorHazardLevel) }, data);
|
||||||
|
|
||||||
this.isReadonly = !!isRead;
|
this.isReadonly = !!isRead;
|
||||||
this.buildFormOptions();
|
this.buildFormOptions();
|
||||||
|
@ -401,6 +406,20 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public levelName(type) {
|
||||||
|
if (type === 1) {
|
||||||
|
return "一级"
|
||||||
|
} else if (type === 2) {
|
||||||
|
return "二级"
|
||||||
|
} else if (type === 3) {
|
||||||
|
return "三级"
|
||||||
|
} else if (type === 4) {
|
||||||
|
return "四级"
|
||||||
|
} else if (type === 5) {
|
||||||
|
return "不涉及级"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public handleClose() {
|
public handleClose() {
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
this.currentId = -1;
|
this.currentId = -1;
|
||||||
|
|
|
@ -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" :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">
|
<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">
|
||||||
|
|
|
@ -291,7 +291,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '区域名称', key: "areaName", width: "200px" });
|
this.tableColumn.push({ name: '区域名称', key: "areaName", width: "200px" });
|
||||||
this.tableColumn.push({ name: '风险分析单元', key: "unitName", width: "200px" });
|
this.tableColumn.push({ name: '风险分析单元', key: "unitName", width: "200px" });
|
||||||
this.tableColumn.push({ name: '设备名称', key: "name" });
|
this.tableColumn.push({ name: '设备名称', key: "name",width:"250px",showTip: true, });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '设备类别', key: "type", render: (data) => {
|
name: '设备类别', key: "type", render: (data) => {
|
||||||
if (data.type) {
|
if (data.type) {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</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="952px" :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" :data.sync="updateParams"
|
||||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
||||||
<div class="sub-title">安全检查表分析法</div>
|
<div class="sub-title">安全检查表分析法</div>
|
||||||
|
|
|
@ -748,11 +748,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = []
|
data = []
|
||||||
}
|
}
|
||||||
if (data.length > 0 && data.includes(0)) {
|
if (this.updateParams.majorSign.includes(0)) {
|
||||||
data = []
|
this.updateParams.majorSign = this.updateParams.majorSign.filter(item => item === 0)
|
||||||
this.updateParams.majorSign = []
|
data = this.updateParams.majorSign.filter(item => item === 0)
|
||||||
data.push(0)
|
|
||||||
this.updateParams.majorSign.push(0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.buildUpdateForm()
|
this.buildUpdateForm()
|
||||||
|
@ -812,10 +810,14 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
this.tableService.selectById(this.currentId).then((res: any) => {
|
this.tableService.selectById(this.currentId).then((res: any) => {
|
||||||
if (isReadonly) {
|
if (isReadonly) {
|
||||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||||
|
const majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
|
||||||
|
const regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
|
||||||
|
const regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
|
||||||
|
|
||||||
this.updateParams = Object.assign({
|
this.updateParams = Object.assign({
|
||||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(",").map(item => this.sourceMap[item]).join(","),
|
majorHazardName: majorHazard || majorHazard === 0 ? this.sourceMap[majorHazard] : null,
|
||||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(",").map(item => this.craftMap[item]).join(","),
|
regulatoryProcessName: regulatoryProcess || regulatoryProcess === 0 ? this.craftMap[regulatoryProcess] : null,
|
||||||
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(",").map(item => this.chemicaltMap[item]).join(","),
|
regulatoryChemicalName: regulatoryChemical || regulatoryChemical === 0 ? this.chemicaltMap[regulatoryChemical] : null,
|
||||||
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(",").map(item => this.$store.getters.prevention_majorsign_map[item]).join(","),
|
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(",").map(item => this.$store.getters.prevention_majorsign_map[item]).join(","),
|
||||||
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
||||||
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
||||||
|
@ -836,9 +838,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
this.isModifyonly = true
|
this.isModifyonly = true
|
||||||
this.updateParams = res.data;
|
this.updateParams = res.data;
|
||||||
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
|
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
|
||||||
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
|
this.updateParams.majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
|
||||||
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
|
this.updateParams.regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
|
||||||
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
|
this.updateParams.regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
|
||||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||||
this.updateParams.analRiskLevel = areaAnalRiskLevel
|
this.updateParams.analRiskLevel = areaAnalRiskLevel
|
||||||
this.loadUnitData(res.data.areaId)
|
this.loadUnitData(res.data.areaId)
|
||||||
|
@ -863,9 +865,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
// 如果是新增工作危害分析清单
|
// 如果是新增工作危害分析清单
|
||||||
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
||||||
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
|
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
|
||||||
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
|
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
|
||||||
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
|
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
|
||||||
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
||||||
if (!this.updateParams.id) {
|
if (!this.updateParams.id) {
|
||||||
if (this.updateParams.steps && this.updateParams.steps.length > 0) {
|
if (this.updateParams.steps && this.updateParams.steps.length > 0) {
|
||||||
|
@ -885,9 +887,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
public doSaveDraft() {
|
public doSaveDraft() {
|
||||||
// 如果是新增工作危害分析清单
|
// 如果是新增工作危害分析清单
|
||||||
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
||||||
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
|
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
|
||||||
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
|
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
|
||||||
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
|
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
|
||||||
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
||||||
if (this.updateParams.steps && this.updateParams.steps.length > 0) {
|
if (this.updateParams.steps && this.updateParams.steps.length > 0) {
|
||||||
this.updateParams.items = this.updateParams.steps
|
this.updateParams.items = this.updateParams.steps
|
||||||
|
@ -994,6 +996,16 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
||||||
return data.split(",").map((item) => parseInt(item))
|
return data.split(",").map((item) => parseInt(item))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//数字转字符串
|
||||||
|
public numberChangeString(data) {
|
||||||
|
if (data || data === 0) {
|
||||||
|
return data.toString()
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../../../common.component.scss"></style>
|
<style lang="scss" scoped src="../../../common.component.scss"></style>
|
||||||
|
|
|
@ -97,6 +97,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
||||||
public updateParams = {
|
public updateParams = {
|
||||||
identifyTime: moment().format('YYYY-MM-DD'),
|
identifyTime: moment().format('YYYY-MM-DD'),
|
||||||
identifyUserId: this.account.userId,
|
identifyUserId: this.account.userId,
|
||||||
|
steps: [],
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
public selectData = [];
|
public selectData = [];
|
||||||
|
@ -482,7 +483,10 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
this.updateParams = {
|
this.updateParams = {
|
||||||
postCode: [],
|
postCode: [],
|
||||||
safetyFactor: []
|
safetyFactor: [],
|
||||||
|
identifyTime: moment().format('YYYY-MM-DD'),
|
||||||
|
identifyUserId: this.account.userId,
|
||||||
|
steps: []
|
||||||
} as any
|
} as any
|
||||||
this.showUpdate = !!goOn;
|
this.showUpdate = !!goOn;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</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="952px" :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" :data.sync="updateParams"
|
||||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
||||||
<div class="sub-title">工作危害分析法</div>
|
<div class="sub-title">工作危害分析法</div>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
</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"
|
||||||
width="940px" destroy-on-close>
|
width="940px">
|
||||||
<FormComponent labelWidth="110px" labelAlign="right" :actions="proActions" @actionCallback="proCallback"
|
<FormComponent labelWidth="110px" labelAlign="right" :actions="proActions" @actionCallback="proCallback"
|
||||||
:full-btn="true" btnPosition="center">
|
:full-btn="true" btnPosition="center">
|
||||||
<TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false"
|
<TableComponent :tableData="currentProTableData" :tableColumn="proTableColumn" :showFooter="false"
|
||||||
|
|
|
@ -266,54 +266,57 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
labelWidth: "140px",
|
labelWidth: "140px",
|
||||||
width: "calc(100% - 20px)",
|
width: "calc(100% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
|
showError: false,
|
||||||
datas: [{
|
datas: [{
|
||||||
name: "不涉及",
|
name: "不涉及",
|
||||||
disable: false,
|
|
||||||
value: 0
|
value: 0
|
||||||
}, {
|
}, {
|
||||||
name: "重大危险源",
|
name: "重大危险源",
|
||||||
disable: this.updateParams.majorSign.includes(0),
|
disable: this.updateParams.majorSign && this.updateParams.majorSign.includes(0),
|
||||||
value: 1
|
value: 1
|
||||||
}, {
|
}, {
|
||||||
name: "重大监管化工工艺",
|
name: "重大监管化工工艺",
|
||||||
disable: this.updateParams.majorSign.includes(0),
|
disable: this.updateParams.majorSign && this.updateParams.majorSign.includes(0),
|
||||||
value: 2
|
value: 2
|
||||||
}, {
|
}, {
|
||||||
name: "重点监管危化品",
|
name: "重点监管危化品",
|
||||||
disable: this.updateParams.majorSign.includes(0),
|
disable: this.updateParams.majorSign && this.updateParams.majorSign.includes(0),
|
||||||
value: 3
|
value: 3
|
||||||
}],
|
}],
|
||||||
}, {
|
}, {
|
||||||
name: "重大危险源",
|
name: "重大危险源",
|
||||||
key: "majorHazard",
|
key: "majorHazard",
|
||||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || (!this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0)),
|
hide: (!this.updateParams.majorSign) || (this.updateParams.majorSign && (this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0))),
|
||||||
type: "select",
|
type: "select",
|
||||||
format: "majorHazardName",
|
format: "majorHazardName",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
// multiple: true,
|
// multiple: true,
|
||||||
datas: this.dictData.source
|
datas: this.dictData.source,
|
||||||
|
showError: false,
|
||||||
|
|
||||||
}, {
|
}, {
|
||||||
name: "重点监管工艺",
|
name: "重点监管工艺",
|
||||||
key: "regulatoryProcess",
|
key: "regulatoryProcess",
|
||||||
format: "regulatoryProcessName",
|
format: "regulatoryProcessName",
|
||||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0),
|
hide: (!this.updateParams.majorSign) || (this.updateParams.majorSign && (this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0))),
|
||||||
type: "select",
|
type: "select",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
// multiple: true,
|
// multiple: true,
|
||||||
datas: this.dictData.craft,
|
datas: this.dictData.craft,
|
||||||
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
name: "重点监管化学品",
|
name: "重点监管化学品",
|
||||||
key: "regulatoryChemical",
|
key: "regulatoryChemical",
|
||||||
format: "regulatoryChemicalName",
|
format: "regulatoryChemicalName",
|
||||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0),
|
hide: (!this.updateParams.majorSign) || (this.updateParams.majorSign && (this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0))),
|
||||||
type: "select",
|
type: "select",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require: true,
|
require: true,
|
||||||
// multiple: true,
|
// multiple: true,
|
||||||
datas: this.dictData.chemical,
|
datas: this.dictData.chemical,
|
||||||
|
showError: false,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
this.subTableActions = [{
|
this.subTableActions = [{
|
||||||
|
@ -335,6 +338,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
disable: true,
|
disable: true,
|
||||||
|
showError: false,
|
||||||
datas: this.$store.state.prevention_risk_level
|
datas: this.$store.state.prevention_risk_level
|
||||||
}, {
|
}, {
|
||||||
name: "残余风险等级",
|
name: "残余风险等级",
|
||||||
|
@ -344,6 +348,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
disable: true,
|
disable: true,
|
||||||
|
showError: false,
|
||||||
datas: this.$store.state.prevention_risk_level
|
datas: this.$store.state.prevention_risk_level
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
@ -417,11 +422,11 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
public loadAreaData() {
|
public loadAreaData() {
|
||||||
this.unitList = [];
|
this.unitList = [];
|
||||||
this.jobList = [];
|
this.jobList = [];
|
||||||
this.areaService.selectByPage({ pageSize: 1000 }).then((res: any) => {
|
this.tableService.getDistinctList({}).then((res: any) => {
|
||||||
this.areaList = res.data.datas.map(item => {
|
this.areaList = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.areaName,
|
||||||
value: item.id,
|
value: item.areaId,
|
||||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -430,14 +435,14 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
// 加载单元列表
|
// 加载单元列表
|
||||||
public loadUnitData(id?) {
|
public loadUnitData(id?) {
|
||||||
this.unitService.selectByPage({ pageSize: 1000, areaId: id }, false).then((res: any) => {
|
this.tableService.getDistinctList({ areaId: id }).then((res: any) => {
|
||||||
this.unitList = res.data.datas.map(item => {
|
this.unitList = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.unitName,
|
||||||
value: item.id,
|
value: item.unitId,
|
||||||
deptId: item.chargeDeptId,
|
deptId: item.chargeDeptId,
|
||||||
userId: item.chargeUserId,
|
|
||||||
deptName: item.chargeDeptName,
|
deptName: item.chargeDeptName,
|
||||||
|
userId: item.chargeUserId,
|
||||||
userName: item.chargeUserName,
|
userName: item.chargeUserName,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -742,11 +747,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
data = []
|
data = []
|
||||||
}
|
}
|
||||||
if (data.includes(0)) {
|
if (this.updateParams.majorSign.includes(0)) {
|
||||||
data = []
|
this.updateParams.majorSign = this.updateParams.majorSign.filter(item => item === 0)
|
||||||
this.updateParams.majorSign = []
|
data = this.updateParams.majorSign.filter(item => item === 0)
|
||||||
data.push(0)
|
|
||||||
this.updateParams.majorSign.push(0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -796,10 +799,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.tableService.selectById(this.currentId).then((res: any) => {
|
this.tableService.selectById(this.currentId).then((res: any) => {
|
||||||
if (isReadonly) {
|
if (isReadonly) {
|
||||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||||
|
const majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
|
||||||
|
const regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
|
||||||
|
const regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
|
||||||
this.updateParams = Object.assign({
|
this.updateParams = Object.assign({
|
||||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(",").map(item => this.sourceMap[item]).join(","),
|
majorHazardName: majorHazard || majorHazard === 0 ? this.sourceMap[majorHazard] : null,
|
||||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(",").map(item => this.craftMap[item]).join(","),
|
regulatoryProcessName: regulatoryProcess || regulatoryProcess === 0 ? this.craftMap[regulatoryProcess] : null,
|
||||||
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(",").map(item => this.chemicaltMap[item]).join(","),
|
regulatoryChemicalName: regulatoryChemical || regulatoryChemical === 0 ? this.chemicaltMap[regulatoryChemical] : null,
|
||||||
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(",").map(item => this.$store.getters.prevention_majorsign_map[item]).join(","),
|
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(",").map(item => this.$store.getters.prevention_majorsign_map[item]).join(","),
|
||||||
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
||||||
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
||||||
|
@ -821,9 +827,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.isModifyonly = true
|
this.isModifyonly = true
|
||||||
this.updateParams = res.data;
|
this.updateParams = res.data;
|
||||||
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
|
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
|
||||||
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
|
this.updateParams.majorHazard = res.data.majorHazard ? parseInt(res.data.majorHazard) : null
|
||||||
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
|
this.updateParams.regulatoryProcess = res.data.regulatoryProcess ? parseInt(res.data.regulatoryProcess) : null
|
||||||
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
|
this.updateParams.regulatoryChemical = res.data.regulatoryChemical ? parseInt(res.data.regulatoryChemical) : null
|
||||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||||
this.updateParams.analRiskLevel = areaAnalRiskLevel
|
this.updateParams.analRiskLevel = areaAnalRiskLevel
|
||||||
this.loadUnitData(res.data.areaId)
|
this.loadUnitData(res.data.areaId)
|
||||||
|
@ -852,9 +858,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
public doSave(goOn?) {
|
public doSave(goOn?) {
|
||||||
// 如果是新增工作危害分析清单
|
// 如果是新增工作危害分析清单
|
||||||
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
||||||
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
|
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
|
||||||
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
|
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
|
||||||
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
|
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
|
||||||
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
||||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
|
@ -866,9 +872,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
public doSaveDraft() {
|
public doSaveDraft() {
|
||||||
// 如果是新增工作危害分析清单
|
// 如果是新增工作危害分析清单
|
||||||
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
this.updateParams.majorSign = this.arrayChangeString(this.updateParams.majorSign)
|
||||||
this.updateParams.regulatoryProcess = this.arrayChangeString(this.updateParams.regulatoryProcess)
|
this.updateParams.regulatoryProcess = this.numberChangeString(this.updateParams.regulatoryProcess)
|
||||||
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
|
this.updateParams.regulatoryChemical = this.numberChangeString(this.updateParams.regulatoryChemical)
|
||||||
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
|
this.updateParams.majorHazard = this.numberChangeString(this.updateParams.majorHazard)
|
||||||
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
||||||
this.tableService.addOrDraft(this.updateParams, !this.updateParams.id).then((res) => {
|
this.tableService.addOrDraft(this.updateParams, !this.updateParams.id).then((res) => {
|
||||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||||
|
@ -969,6 +975,16 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
return data.split(",").map((item) => parseInt(item))
|
return data.split(",").map((item) => parseInt(item))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//数字转字符串
|
||||||
|
public numberChangeString(data) {
|
||||||
|
if (data || data === 0) {
|
||||||
|
return data.toString()
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped src="../../../common.component.scss"></style>
|
<style lang="scss" scoped src="../../../common.component.scss"></style>
|
||||||
|
|
|
@ -219,9 +219,9 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
this.tableColumn.push({ name: '排查时间', key: "checkTime" });
|
this.tableColumn.push({ name: '排查时间', key: "checkTime" });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '是否为隐患', key: "dangerFlag", render: (data) => {
|
name: '是否为隐患', key: "dangerFlag", render: (data) => {
|
||||||
if (data.status == 1) {
|
if (data.dangerFlag == 1) {
|
||||||
return "<span class='noDraw'>是</span>"
|
return "<span class='noDraw'>是</span>"
|
||||||
} else if (data.status == 0) {
|
} else if (data.dangerFlag == 0) {
|
||||||
return "<span>否</span>"
|
return "<span>否</span>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
this.updateParams = Object.assign({
|
this.updateParams = Object.assign({
|
||||||
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
|
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
|
||||||
resultName: row.result === 1 ? '正常' : '异常',
|
resultName: row.result === 1 ? '正常' : '异常',
|
||||||
dangerFlagName: row.dangerFlag === 0 ? '否' : '是',
|
dangerFlagName: row.dangerFlag === 0 ? '否' : row.dangerFlag === 1 ? '是' : null,
|
||||||
taskTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType],
|
taskTypeName: 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)
|
||||||
|
|
|
@ -248,9 +248,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
rules: [
|
// rules: [
|
||||||
{ pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', }
|
// { pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', }
|
||||||
]
|
// ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "应急联络方式",
|
name: "应急联络方式",
|
||||||
|
@ -259,9 +259,9 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
rules: [
|
// rules: [
|
||||||
{ pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', }
|
// { pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', }
|
||||||
]
|
// ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "附件",
|
name: "附件",
|
||||||
|
|
|
@ -276,6 +276,7 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
|
hide: !(this.subUpdateParams.examStatus === 1)
|
||||||
},]
|
},]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,6 +346,13 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
||||||
this.updateParams.endTime = null
|
this.updateParams.endTime = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item && item.key === "examStatus") {
|
||||||
|
if (data === 0) {
|
||||||
|
this.subUpdateParams.score = null
|
||||||
|
}
|
||||||
|
this.buildSubForm()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public callback(data, type) {
|
public callback(data, type) {
|
||||||
|
|
Loading…
Reference in New Issue