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,
|
||||||
}, {
|
}, {
|
||||||
|
@ -324,7 +326,7 @@ export default class MeasureComponent extends Vue {
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
// 排查任务制定
|
// 排查任务制定
|
||||||
this.tableColumn.push({ name: '序号', key: "index" ,width:"80px"});
|
this.tableColumn.push({ name: '序号', key: "index", width: "80px" });
|
||||||
this.tableColumn.push({ name: "任务名称", key: "name" })
|
this.tableColumn.push({ name: "任务名称", key: "name" })
|
||||||
this.tableColumn.push({ name: "执行岗位", key: "executePostName" })
|
this.tableColumn.push({ name: "执行岗位", key: "executePostName" })
|
||||||
this.tableColumn.push({ name: "执行人", key: "chargeUserName" })
|
this.tableColumn.push({ name: "执行人", key: "chargeUserName" })
|
||||||
|
|
|
@ -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,25 +197,32 @@ 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",
|
||||||
format: "areaNames",
|
format: "areaNames",
|
||||||
|
@ -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]
|
||||||
|
|
|
@ -96,7 +96,7 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
name: "姓名",
|
name: "姓名",
|
||||||
key: "userId",
|
key: "userId",
|
||||||
type: "select",
|
type: "select",
|
||||||
datas:this.$store.state.userList
|
datas: this.$store.state.userList
|
||||||
}, {
|
}, {
|
||||||
name: "岗位",
|
name: "岗位",
|
||||||
key: "postName",
|
key: "postName",
|
||||||
|
@ -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,11 +188,7 @@ 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",
|
||||||
type: "primary"
|
type: "primary"
|
||||||
|
|
|
@ -12,7 +12,7 @@ import DrawComponent from '@/components/draw.component.vue';
|
||||||
import SystemService from "hbt-common/service/system.service"
|
import SystemService from "hbt-common/service/system.service"
|
||||||
@Component({
|
@Component({
|
||||||
template,
|
template,
|
||||||
components:{
|
components: {
|
||||||
FormComponent,
|
FormComponent,
|
||||||
TableComponent,
|
TableComponent,
|
||||||
DrawComponent,
|
DrawComponent,
|
||||||
|
@ -24,17 +24,17 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
public systemService = new SystemService();
|
public systemService = new SystemService();
|
||||||
// 列表参数
|
// 列表参数
|
||||||
public params = {
|
public params = {
|
||||||
name:"",
|
name: "",
|
||||||
chargeDeptId:null,
|
chargeDeptId: null,
|
||||||
majorHazardFlag:null
|
majorHazardFlag: null
|
||||||
} as any;
|
} as any;
|
||||||
|
|
||||||
public filters = [{
|
public filters = [{
|
||||||
text:"未绘制",
|
text: "未绘制",
|
||||||
value:0
|
value: 0
|
||||||
},{
|
}, {
|
||||||
text:"已绘制",
|
text: "已绘制",
|
||||||
value:1
|
value: 1
|
||||||
}]
|
}]
|
||||||
|
|
||||||
public isArea = true;
|
public isArea = true;
|
||||||
|
@ -46,51 +46,51 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
// 列表搜索条件按钮
|
// 列表搜索条件按钮
|
||||||
public formActions = [{
|
public formActions = [{
|
||||||
name:"查询",
|
name: "查询",
|
||||||
value:"search",
|
value: "search",
|
||||||
icon:"el-icon-search",
|
icon: "el-icon-search",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
},{
|
}, {
|
||||||
name:"清空",
|
name: "清空",
|
||||||
icon:"el-icon-tickets",
|
icon: "el-icon-tickets",
|
||||||
value:"reset"
|
value: "reset"
|
||||||
}];
|
}];
|
||||||
// 列表头部按钮
|
// 列表头部按钮
|
||||||
public tableActions = [{
|
public tableActions = [{
|
||||||
name:"添加",
|
name: "添加",
|
||||||
value:"add",
|
value: "add",
|
||||||
icon:"el-icon-plus",
|
icon: "el-icon-plus",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
},{
|
}, {
|
||||||
name:"批量绘制",
|
name: "批量绘制",
|
||||||
value:"drawList",
|
value: "drawList",
|
||||||
plain:true,
|
plain: true,
|
||||||
icon:"el-icon-plus",
|
icon: "el-icon-plus",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
},{
|
}, {
|
||||||
name:"批量删除",
|
name: "批量删除",
|
||||||
value:"delete",
|
value: "delete",
|
||||||
plain:true,
|
plain: true,
|
||||||
icon:"el-icon-delete",
|
icon: "el-icon-delete",
|
||||||
type:"danger"
|
type: "danger"
|
||||||
}];
|
}];
|
||||||
// 列表底部按钮
|
// 列表底部按钮
|
||||||
public footerActions = [{
|
public footerActions = [{
|
||||||
name:"选择全部",
|
name: "选择全部",
|
||||||
value:"selectAll",
|
value: "selectAll",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
},{
|
}, {
|
||||||
name:"反向选择",
|
name: "反向选择",
|
||||||
value:"reverse"
|
value: "reverse"
|
||||||
}];
|
}];
|
||||||
// 搜索条件表单
|
// 搜索条件表单
|
||||||
public formOptions:FormOption<BtnOption>[] = [];
|
public formOptions: FormOption<BtnOption>[] = [];
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public currentId = -1;
|
public currentId = -1;
|
||||||
public updateParams = {} as any;
|
public updateParams = {} as any;
|
||||||
// 新增/更新表单
|
// 新增/更新表单
|
||||||
public updateOptions:FormOption<BtnOption>[] = [];
|
public updateOptions: FormOption<BtnOption>[] = [];
|
||||||
|
|
||||||
|
|
||||||
public showDraw = false;
|
public showDraw = false;
|
||||||
|
@ -100,201 +100,206 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
public isReadonly = false;
|
public isReadonly = false;
|
||||||
|
|
||||||
|
|
||||||
public updateActions:BtnOption[] = [];
|
public updateActions: BtnOption[] = [];
|
||||||
|
|
||||||
public selectData = [];
|
public selectData = [];
|
||||||
|
|
||||||
@Watch("$store.state.deptList",{immediate:true,deep:true})
|
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
||||||
onChanges(){
|
onChanges() {
|
||||||
this.buildFormOptions()
|
this.buildFormOptions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
created(){
|
|
||||||
|
created() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildFormOptions(){
|
public buildFormOptions() {
|
||||||
this.updateOptions = [{
|
this.updateOptions = [{
|
||||||
name:"区域编号",
|
name: "区域编号",
|
||||||
key:"number",
|
key: "number",
|
||||||
type:"text",
|
type: "text",
|
||||||
disable:true,
|
disable: true,
|
||||||
showError:false,
|
showError: false,
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true
|
require: true
|
||||||
},{
|
}, {
|
||||||
name:"区域名称",
|
name: "区域名称",
|
||||||
key:"name",
|
key: "name",
|
||||||
type:"text",
|
type: "text",
|
||||||
showError:false,
|
showError: false,
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true
|
require: true
|
||||||
},{
|
}, {
|
||||||
name:"责任部门",
|
name: "责任部门",
|
||||||
key:"chargeDeptId",
|
key: "chargeDeptId",
|
||||||
format:"chargeDeptName",
|
format: "chargeDeptName",
|
||||||
type:"treeSelect",
|
type: "treeSelect",
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true,
|
require: true,
|
||||||
expandLevel:Infinity,
|
expandLevel: Infinity,
|
||||||
showError:false,
|
showError: false,
|
||||||
datas:this.$store.state.deptTreeList
|
datas: this.$store.state.deptTreeList
|
||||||
},{
|
}, {
|
||||||
name:"责任人",
|
name: "责任人",
|
||||||
key:"chargeUserId",
|
key: "chargeUserId",
|
||||||
format:"chargeUserName",
|
format: "chargeUserName",
|
||||||
type:"select",
|
type: "select",
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true,
|
require: true,
|
||||||
showError:false,
|
showError: false,
|
||||||
datas:this.$store.state.userList
|
datas: this.$store.state.userList
|
||||||
},{
|
}, {
|
||||||
name:"属于重大危险源",
|
name: "属于重大危险源",
|
||||||
key:"majorHazardFlag",
|
key: "majorHazardFlag",
|
||||||
format:"majorHazardFlagName",
|
format: "majorHazardFlagName",
|
||||||
type:"radio",
|
type: "radio",
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
labelWidth:"auto",
|
labelWidth: "auto",
|
||||||
require:true,
|
require: true,
|
||||||
showError:false,
|
showError: false,
|
||||||
datas:this.$store.state.common_yes_no
|
datas: this.$store.state.common_yes_no
|
||||||
},{
|
}, {
|
||||||
name:"重大危险源名称",
|
name: "重大危险源名称",
|
||||||
key:"majorHazardName",
|
key: "majorHazardName",
|
||||||
hide:!this.updateParams.majorHazardFlag,
|
hide: !this.updateParams.majorHazardFlag,
|
||||||
type:"text",
|
type: "text",
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true,
|
require: true,
|
||||||
showError:false,
|
showError: false,
|
||||||
},{
|
}, {
|
||||||
name:"重大危险源等级",
|
name: "重大危险源等级",
|
||||||
key:"majorHazardLevel",
|
key: "majorHazardLevel",
|
||||||
type:"select",
|
format: "majorHazardLevelName",
|
||||||
hide:!this.updateParams.majorHazardFlag,
|
type: "select",
|
||||||
width:"calc(50% - 20px)",
|
hide: !this.updateParams.majorHazardFlag,
|
||||||
require:true,
|
width: "calc(50% - 20px)",
|
||||||
showError:false,
|
require: true,
|
||||||
datas:[{
|
showError: false,
|
||||||
name:"一级",
|
datas: [{
|
||||||
value:1
|
name: "一级",
|
||||||
},{
|
value: 1
|
||||||
name:"二级",
|
}, {
|
||||||
value:2
|
name: "二级",
|
||||||
},{
|
value: 2
|
||||||
name:"三级",
|
}, {
|
||||||
value:3
|
name: "三级",
|
||||||
},{
|
value: 3
|
||||||
name:"四级",
|
}, {
|
||||||
value:4
|
name: "四级",
|
||||||
},{
|
value: 4
|
||||||
name:"不涉及",
|
}, {
|
||||||
value:5
|
name: "不涉及",
|
||||||
|
value: 5
|
||||||
}]
|
}]
|
||||||
},{
|
}, {
|
||||||
type:"btn",
|
type: "btn",
|
||||||
name:"区域绘制",
|
name: "区域绘制",
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
btn:[{
|
btn: [{
|
||||||
name:"开始绘制",
|
name: "开始绘制",
|
||||||
value:"draw",
|
value: "draw",
|
||||||
height:"36px",
|
height: "36px",
|
||||||
hide:this.isReadonly,
|
hide: this.isReadonly,
|
||||||
size:"small",
|
size: "small",
|
||||||
icon:"el-icon-edit-outline",
|
icon: "el-icon-edit-outline",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
},{
|
}, {
|
||||||
name:"查看绘制",
|
name: "查看绘制",
|
||||||
value:"readDraw",
|
value: "readDraw",
|
||||||
hide:!this.isReadonly,
|
hide: !this.isReadonly,
|
||||||
height:"36px",
|
height: "36px",
|
||||||
size:"small",
|
size: "small",
|
||||||
icon:"el-icon-edit-outline",
|
icon: "el-icon-edit-outline",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
}]
|
}]
|
||||||
},{
|
}, {
|
||||||
name:"分析对象编号",
|
name: "分析对象编号",
|
||||||
key:"analTargetNum",
|
key: "analTargetNum",
|
||||||
type:"text",
|
type: "text",
|
||||||
showError:false,
|
showError: false,
|
||||||
width:"calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
require:true,
|
require: true,
|
||||||
}];
|
}];
|
||||||
|
|
||||||
this.updateActions = [{
|
this.updateActions = [{
|
||||||
name:"取消",
|
name: "取消",
|
||||||
value:"cancel"
|
value: "cancel"
|
||||||
},{
|
}, {
|
||||||
name:"保存并继续添加",
|
name: "保存并继续添加",
|
||||||
value:"saveAndContinue",
|
value: "saveAndContinue",
|
||||||
hide:this.currentId!=-1,
|
hide: this.currentId != -1,
|
||||||
type:"primary"
|
type: "primary"
|
||||||
},{
|
}, {
|
||||||
name:"保存",
|
name: "保存",
|
||||||
value:"submit",
|
value: "submit",
|
||||||
type:"primary"
|
type: "primary"
|
||||||
}];
|
}];
|
||||||
this.formOptions=[{
|
this.formOptions = [{
|
||||||
name:"区域名称",
|
name: "区域名称",
|
||||||
key:"name",
|
key: "name",
|
||||||
type:"text"
|
type: "text"
|
||||||
},{
|
}, {
|
||||||
name:"责任部门",
|
name: "责任部门",
|
||||||
key:"chargeDeptId",
|
key: "chargeDeptId",
|
||||||
type:"select",
|
type: "select",
|
||||||
datas:this.$store.state.deptList
|
datas: this.$store.state.deptList
|
||||||
},{
|
}, {
|
||||||
name:"是否重大危险源",
|
name: "是否重大危险源",
|
||||||
key:"majorHazardFlag",
|
key: "majorHazardFlag",
|
||||||
type:"select",
|
type: "select",
|
||||||
datas:this.$store.state.common_yes_no
|
datas: this.$store.state.common_yes_no
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
public getQrCode(row){
|
public getQrCode(row) {
|
||||||
this.tableService.getQrCode({
|
this.tableService.getQrCode({
|
||||||
url:"/",
|
url: "/",
|
||||||
id:row.id,
|
id: row.id,
|
||||||
system:"prevention",
|
system: "prevention",
|
||||||
type:0,
|
type: 0,
|
||||||
data:"",
|
data: "",
|
||||||
params:{
|
params: {
|
||||||
"区域名称" : row.name,
|
"区域名称": row.name,
|
||||||
"区域编号" : row.number,
|
"区域编号": row.number,
|
||||||
"责任人" : row.chargeUserName,
|
"责任人": row.chargeUserName,
|
||||||
"责任部门" : row.chargeDeptName,
|
"责任部门": row.chargeDeptName,
|
||||||
"重大危险源名称" : row.majorHazardName
|
"重大危险源名称": row.majorHazardName
|
||||||
}
|
}
|
||||||
}).then((res:any)=>{
|
}).then((res: any) => {
|
||||||
this.showQrCode = true;
|
this.showQrCode = true;
|
||||||
this.qrUrl = res.data.url;
|
this.qrUrl = res.data.url;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable(){
|
public buildTable() {
|
||||||
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({
|
||||||
return this.$store.getters.common_yes_no_map[data.majorHazardFlag]
|
name: '是否属于重大危险源', key: "majorHazardFlag", render: (data) => {
|
||||||
}});
|
return this.$store.getters.common_yes_no_map[data.majorHazardFlag]
|
||||||
this.tableColumn.push({name:'绘制情况',filters:this.filters,filterMethod:(data,row)=>{
|
|
||||||
if(data){
|
|
||||||
return row.geoJson && row.geoJson!=="[]"
|
|
||||||
}else{
|
|
||||||
return !row.geoJson || row.geoJson === "[]"
|
|
||||||
}
|
}
|
||||||
}, render:(data)=>{
|
});
|
||||||
if(data.geoJson==='[]' || !data.geoJson){
|
this.tableColumn.push({
|
||||||
return "<span class='noDraw'>未绘制</span>"
|
name: '绘制情况', filters: this.filters, filterMethod: (data, row) => {
|
||||||
}else{
|
if (data) {
|
||||||
return "<span>已绘制</span>"
|
return row.geoJson && row.geoJson !== "[]"
|
||||||
|
} else {
|
||||||
|
return !row.geoJson || row.geoJson === "[]"
|
||||||
|
}
|
||||||
|
}, render: (data) => {
|
||||||
|
if (data.geoJson === '[]' || !data.geoJson) {
|
||||||
|
return "<span class='noDraw'>未绘制</span>"
|
||||||
|
} else {
|
||||||
|
return "<span class='color_1'>已绘制</span>"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public doDraw(){
|
public doDraw() {
|
||||||
if(!this.updateParams.name){
|
if (!this.updateParams.name) {
|
||||||
this.$message.error("请先输入区域名称");
|
this.$message.error("请先输入区域名称");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -302,106 +307,120 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.showDraw = true;
|
this.showDraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCreateNumber(){
|
public getCreateNumber() {
|
||||||
this.tableService.getAreaNumber().then((res)=>{
|
this.tableService.getAreaNumber().then((res) => {
|
||||||
this.updateParams = {bottomHeight:0,topHeight:0,geoJson:"[]",number:res.data} as any;
|
this.updateParams = { bottomHeight: 0, topHeight: 0, geoJson: "[]", number: res.data } as any;
|
||||||
this.buildFormOptions();
|
this.buildFormOptions();
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public doSave(goOn?){
|
public doSave(goOn?) {
|
||||||
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res)=>{
|
this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res) => {
|
||||||
this.$message.success(this.currentId===-1?"新增成功!":"修改成功!");
|
this.$message.success(this.currentId === -1 ? "新增成功!" : "修改成功!");
|
||||||
if(goOn){
|
if (goOn) {
|
||||||
this.getCreateNumber();
|
this.getCreateNumber();
|
||||||
}else{
|
} else {
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
}
|
}
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public change(data,item?){
|
public change(data, item?) {
|
||||||
// 新增编辑选择部门
|
// 新增编辑选择部门
|
||||||
if(item && item.key === "chargeDeptId"){
|
if (item && item.key === "chargeDeptId") {
|
||||||
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
|
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
|
||||||
}
|
}
|
||||||
// 新增编辑选择人员
|
// 新增编辑选择人员
|
||||||
if(item && item.key === "chargeUserId"){
|
if (item && item.key === "chargeUserId") {
|
||||||
this.updateParams.chargeUserName = this.$store.getters.user_map[data];
|
this.updateParams.chargeUserName = this.$store.getters.user_map[data];
|
||||||
}
|
}
|
||||||
// 新增编辑选择是否重大危险源
|
// 新增编辑选择是否重大危险源
|
||||||
if(item && item.key === "majorHazardFlag"){
|
if (item && item.key === "majorHazardFlag") {
|
||||||
this.updateOptions[5].hide = !data;
|
this.updateOptions[5].hide = !data;
|
||||||
this.updateOptions[6].hide = !data;
|
this.updateOptions[6].hide = !data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public callback(data,type?){
|
public callback(data, type?) {
|
||||||
if(type){
|
if (type) {
|
||||||
this.params[type] = data;
|
this.params[type] = data;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 查询
|
// 查询
|
||||||
if(data && data.value==="search"){
|
if (data && data.value === "search") {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
// 重置
|
// 重置
|
||||||
}else if(data && data.value === "reset"){
|
} else if (data && data.value === "reset") {
|
||||||
this.reset()
|
this.reset()
|
||||||
// 反选
|
// 反选
|
||||||
}else if(data && data.value === "reverse"){
|
} else if (data && data.value === "reverse") {
|
||||||
this.toggleAll()
|
this.toggleAll()
|
||||||
// 全选
|
// 全选
|
||||||
}else if(data && data.value === "selectAll"){
|
} else if (data && data.value === "selectAll") {
|
||||||
this.selectAll()
|
this.selectAll()
|
||||||
}else if(data && data.value === "add"){
|
} else if (data && data.value === "add") {
|
||||||
this.showUpdateModel()
|
this.showUpdateModel()
|
||||||
}else if(data && data.value === "delete"){
|
} else if (data && data.value === "delete") {
|
||||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||||
}else if(data && (data.value === "draw" || data.value==="readDraw")){
|
} else if (data && (data.value === "draw" || data.value === "readDraw")) {
|
||||||
this.doDraw()
|
this.doDraw()
|
||||||
}else if(data && data.value === "drawList"){
|
} else if (data && data.value === "drawList") {
|
||||||
this.drawModel = "list";
|
this.drawModel = "list";
|
||||||
this.showDraw = true;
|
this.showDraw = true;
|
||||||
}else if(data && data.value === "submit"){
|
} else if (data && data.value === "submit") {
|
||||||
this.doSave()
|
this.doSave()
|
||||||
}else if(data && data.value === "saveAndContinue"){
|
} else if (data && data.value === "saveAndContinue") {
|
||||||
this.doSave(true)
|
this.doSave(true)
|
||||||
}else if(data && data.value === "cancel"){
|
} else if (data && data.value === "cancel") {
|
||||||
this.updateParams = {} as any;
|
this.updateParams = {} as any;
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 重置数据
|
// 重置数据
|
||||||
public reset(){
|
public reset() {
|
||||||
this.params = {
|
this.params = {
|
||||||
name:null,
|
name: null,
|
||||||
chargeDeptId:null,
|
chargeDeptId: null,
|
||||||
majorHazardFlag:null,
|
majorHazardFlag: null,
|
||||||
pageNum:1,
|
pageNum: 1,
|
||||||
pageSize:20,
|
pageSize: 20,
|
||||||
} as any;
|
} as any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public showUpdateModel(data?,isRead?){
|
public showUpdateModel(data?, isRead?) {
|
||||||
if(!data){
|
if (!data) {
|
||||||
this.currentId = -1;
|
this.currentId = -1;
|
||||||
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();
|
||||||
this.showUpdate = true
|
this.showUpdate = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleClose(){
|
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() {
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
this.currentId = -1;
|
this.currentId = -1;
|
||||||
this.isReadonly = false;
|
this.isReadonly = false;
|
||||||
|
@ -409,30 +428,30 @@ export default class AreaManagerComponent 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);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
public selectAll(){
|
public selectAll() {
|
||||||
if(!this.selectData.length){
|
if (!this.selectData.length) {
|
||||||
this.toggleAll()
|
this.toggleAll()
|
||||||
}else{
|
} else {
|
||||||
this.tableData.datas.forEach((item,index)=>{
|
this.tableData.datas.forEach((item, index) => {
|
||||||
const find = this.selectData.find((data:any)=>data.id === item.id);
|
const find = this.selectData.find((data: any) => data.id === item.id);
|
||||||
if(!find){
|
if (!find) {
|
||||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleSelectionChange(data){
|
public handleSelectionChange(data) {
|
||||||
this.selectData = data;
|
this.selectData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mounted(){
|
mounted() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -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 = [];
|
||||||
|
@ -351,14 +352,14 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
||||||
const isTarget = el.target.classList.contains("link");
|
const isTarget = el.target.classList.contains("link");
|
||||||
if (isTarget) {
|
if (isTarget) {
|
||||||
this.showSteptable = true;
|
this.showSteptable = true;
|
||||||
this.tableService.getListDetail({ id: data.id }).then((res:any) => {
|
this.tableService.getListDetail({ id: data.id }).then((res: any) => {
|
||||||
this.currentStepTableData.datas = res.data.steps.map((item, index) => {
|
this.currentStepTableData.datas = res.data.steps.map((item, index) => {
|
||||||
item.index = index + 1;
|
item.index = index + 1;
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
|
|
@ -253,7 +253,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
format: "analRiskLevelName",
|
format: "analRiskLevelName",
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
labelWidth:"140px",
|
labelWidth: "140px",
|
||||||
type: "select",
|
type: "select",
|
||||||
showError: false,
|
showError: false,
|
||||||
disable: true,
|
disable: true,
|
||||||
|
@ -263,57 +263,60 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
key: "majorSign",
|
key: "majorSign",
|
||||||
format: "majorSignName",
|
format: "majorSignName",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
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: "残余风险等级",
|
||||||
|
@ -342,8 +346,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
format: "remainRiskLevelName",
|
format: "remainRiskLevelName",
|
||||||
type: "select",
|
type: "select",
|
||||||
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)
|
||||||
|
@ -844,7 +850,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.showUpdate = false;
|
this.showUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public handleAnalyClose(){
|
public handleAnalyClose() {
|
||||||
this.showSubUpdate = false
|
this.showSubUpdate = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 ? "新增成功!" : "编辑成功!");
|
||||||
|
@ -877,8 +883,8 @@ export default class WorkAnalManagerComponent 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);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -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>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,8 +239,8 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
||||||
// 查询
|
// 查询
|
||||||
if (data.value === "search") {
|
if (data.value === "search") {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
console.log('this.tableData',this.tableData);
|
console.log('this.tableData', this.tableData);
|
||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
} else if (data.value === "reset") {
|
} else if (data.value === "reset") {
|
||||||
this.reset()
|
this.reset()
|
||||||
|
@ -278,8 +278,8 @@ export default class DutyRecordsManagerComponent 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);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -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