forked from xxhjsb/hbt-prevention-ui
feat:多选优化
parent
a16a8fca1d
commit
b52164bec7
|
@ -1081,10 +1081,10 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
const tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams))
|
||||
// this.analysisUpdateParams.measures = this.currentMeasureData.datas
|
||||
this.analysisUpdateParams.measuresNum = this.analysisUpdateParams.measures.length
|
||||
this.analysisUpdateParams.seriousResult = this.analysisUpdateParams.seriousResult.join(";")
|
||||
this.analysisUpdateParams.safetySign = this.analysisUpdateParams.safetySign.join(";")
|
||||
this.analysisUpdateParams.riskChoose = this.analysisUpdateParams.riskChoose.join(";")
|
||||
this.analysisUpdateParams.remainChoose = this.analysisUpdateParams.remainChoose.join(";")
|
||||
this.analysisUpdateParams.seriousResult = this.analysisUpdateParams.seriousResult.join(",")
|
||||
this.analysisUpdateParams.safetySign = this.analysisUpdateParams.safetySign.join(",")
|
||||
this.analysisUpdateParams.riskChoose = this.analysisUpdateParams.riskChoose.join(",")
|
||||
this.analysisUpdateParams.remainChoose = this.analysisUpdateParams.remainChoose.join(",")
|
||||
let diff = moment(this.analysisUpdateParams.reviewStartTime).diff(moment().subtract(1, 'day'), "months")
|
||||
if (diff > 0) {
|
||||
this.analysisUpdateParams.status = 2
|
||||
|
|
|
@ -166,7 +166,7 @@ export default class MeasureComponent extends Vue {
|
|||
format: "insuranceDutyFlagName",
|
||||
type: "radio",
|
||||
width: "100%",
|
||||
labelWidth: 'auto',
|
||||
labelWidth: '210px',
|
||||
require: true,
|
||||
datas: [
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ export default class MeasureComponent extends Vue {
|
|||
type: "number",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
labelWidth:"130px"
|
||||
// labelWidth:"130px"
|
||||
}, {
|
||||
key: "reviewCycleUnit",
|
||||
type: "select",
|
||||
|
|
|
@ -520,8 +520,8 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
|||
this.updateParams = Object.assign({
|
||||
analControls: row.analControlIds,
|
||||
planTypeName: this.planTypeMap[row.planType],
|
||||
areaNames: row.areaIds.map(item => this.areaMap[item]).join(";"),
|
||||
unitNames: row.unitIds.map(item => this.unitMap[item]).join(";"),
|
||||
areaNames: row.areaIds.map(item => this.areaMap[item]).join(","),
|
||||
unitNames: row.unitIds.map(item => this.unitMap[item]).join(","),
|
||||
inspectTypeName: this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
||||
inspectCycleUnitName: this.$store.getters.prevention_cycle_unit_map[row.inspectCycleUnit],
|
||||
}, row);
|
||||
|
|
|
@ -336,8 +336,8 @@ export default class IntegralMall extends BaseRecordComponent<any> {
|
|||
let resourceName = this.photoList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.updateParams.resourceId = resourceId.join(";")
|
||||
this.updateParams.resourceName = resourceName.join(";")
|
||||
this.updateParams.resourceId = resourceId.join(",")
|
||||
this.updateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
|
||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||
|
|
|
@ -314,7 +314,7 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
|||
const isTarget = el.target.classList.contains("link");
|
||||
if (isTarget) {
|
||||
if (row.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(",") }).then((files: any) => {
|
||||
this.showFileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
@ -374,8 +374,8 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.updateParams.resourceId = resourceId.join(";")
|
||||
this.updateParams.resourceName = resourceName.join(";")
|
||||
this.updateParams.resourceId = resourceId.join(",")
|
||||
this.updateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
let tmpContent = {} as any;
|
||||
tmpContent.content = this.estimateStandard;
|
||||
|
@ -424,7 +424,7 @@ export default class SelfAssessment extends BaseRecordComponent<any> {
|
|||
const tmpStandardContent = JSON.parse(JSON.stringify(StandardContent))
|
||||
this.StandardDetails = tmpStandardContent
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
|
@ -356,7 +356,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
// 岗位
|
||||
if (item && item.key === "postCode") {
|
||||
this.updateParams.postName = data.map(itm => this.$store.getters.post_map[itm]).join(";");
|
||||
this.updateParams.postName = data.map(itm => this.$store.getters.post_map[itm]).join(",");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -417,15 +417,15 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
if (isReadonly) {
|
||||
this.isReadonly = true;
|
||||
this.updateParams = Object.assign({
|
||||
safetyFactorName: res.data.safetyFactor.split(";").map(item => this.$store.getters.prevention_safe_reason_map[item]).join(";"),
|
||||
safetyFactorName: res.data.safetyFactor.split(",").map(item => this.$store.getters.prevention_safe_reason_map[item]).join(","),
|
||||
identifyUserName: this.$store.getters.user_map[res.data.identifyUserId],
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type],
|
||||
}, res.data)
|
||||
} else {
|
||||
this.isReadonly = false
|
||||
this.updateParams = res.data;
|
||||
this.updateParams.safetyFactor = res.data.safetyFactor.split(";").map(item => parseInt(item))
|
||||
this.updateParams.postCode = res.data.postCode.split(";").map(item => parseInt(item))
|
||||
this.updateParams.safetyFactor = res.data.safetyFactor.split(",").map(item => parseInt(item))
|
||||
this.updateParams.postCode = res.data.postCode.split(",").map(item => parseInt(item))
|
||||
this.loadUnitData(res.data.areas)
|
||||
}
|
||||
this.updateParams.items.forEach((item, i) => {
|
||||
|
@ -440,8 +440,8 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
public doSave(goOn?) {
|
||||
// 新增
|
||||
this.updateParams.itemNum = this.updateParams.items.length;
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(";")
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(";")
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(",")
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(",")
|
||||
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
|
||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||
this.updateParams = {
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
|
||||
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
|
||||
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
||||
<div class="sub-title">安全检查表分析法</div>
|
||||
<TableComponent :tableData="updateParams.items" :tableColumn="subTableColumn"
|
||||
|
@ -78,7 +78,7 @@
|
|||
</el-table>
|
||||
</TableComponent>
|
||||
</FormComponent>
|
||||
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes" @action="updateActions"
|
||||
:actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center">
|
||||
</FormComponent>
|
||||
|
|
|
@ -70,6 +70,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
value: "cancel"
|
||||
}];
|
||||
|
||||
public labelWidth = '140px';
|
||||
|
||||
//数据字典
|
||||
public dictData = {
|
||||
source: [],
|
||||
|
@ -256,7 +258,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
type: "select",
|
||||
showError: false,
|
||||
disable: true,
|
||||
labelWidth:'140px',
|
||||
labelWidth: '140px',
|
||||
datas: this.$store.state.prevention_risk_level
|
||||
}, {
|
||||
name: "是否为两大一重",
|
||||
|
@ -264,7 +266,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
format: "majorSignName",
|
||||
type: "checkbox",
|
||||
width: "calc(100% - 20px)",
|
||||
labelWidth:"140px",
|
||||
labelWidth: "140px",
|
||||
require: true,
|
||||
datas: [{
|
||||
name: "不涉及",
|
||||
|
@ -310,7 +312,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
labelWidth:"130px",
|
||||
labelWidth: "130px",
|
||||
datas: this.dictData.chemical,
|
||||
}];
|
||||
|
||||
|
@ -535,7 +537,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.subTableColumn.push({
|
||||
name: '最严重后果', key: "seriousResult", width: "100px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -576,7 +578,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.proTableColumn.push({
|
||||
name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -811,10 +813,10 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
if (isReadonly) {
|
||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||
this.updateParams = Object.assign({
|
||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(";").map(item => this.sourceMap[item]).join(";"),
|
||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(";").map(item => this.craftMap[item]).join(";"),
|
||||
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(";").map(item => this.chemicaltMap[item]).join(";"),
|
||||
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(";").map(item => this.$store.getters.prevention_majorsign_map[item]).join(";"),
|
||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(",").map(item => this.sourceMap[item]).join(","),
|
||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(",").map(item => this.craftMap[item]).join(","),
|
||||
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(",").map(item => this.chemicaltMap[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],
|
||||
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type],
|
||||
|
@ -937,8 +939,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
if (isReadonly) {
|
||||
this.analyIsReadonly = true;
|
||||
this.analysisUpdateParams = Object.assign({
|
||||
seriousResultName: !row.seriousResult ? null : row.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";"),
|
||||
safetySignName: !row.safetySign ? null : row.safetySign.split(";").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";"),
|
||||
seriousResultName: !row.seriousResult ? null : row.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(","),
|
||||
safetySignName: !row.safetySign ? null : row.safetySign.split(",").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(","),
|
||||
riskLevelName: this.$store.getters.prevention_risk_level_map[row.riskLevel],
|
||||
remainLevelName: this.$store.getters.prevention_risk_level_map[row.remainLevel],
|
||||
riskControlLevelName: this.$store.getters.prevention_control_level_map[row.riskControlLevel],
|
||||
|
@ -955,8 +957,8 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.analysisUpdateParams = { ...this.analysisUpdateParams, ...JSON.parse(JSON.stringify(row)) };
|
||||
this.analysisUpdateParams.seriousResult = this.stringChangeArray(row.seriousResult)
|
||||
this.analysisUpdateParams.safetySign = this.stringChangeArray(row.safetySign)
|
||||
this.analysisUpdateParams.riskChoose = row.riskChoose ? row.riskChoose.split(";") : []
|
||||
this.analysisUpdateParams.remainChoose = row.remainChoose ? row.remainChoose.split(";") : []
|
||||
this.analysisUpdateParams.riskChoose = row.riskChoose ? row.riskChoose.split(",") : []
|
||||
this.analysisUpdateParams.remainChoose = row.remainChoose ? row.remainChoose.split(",") : []
|
||||
this.analysisUpdateParams.chargeUserName = this.updateParams.chargeUserName
|
||||
this.analysisUpdateParams.deviceName = this.updateParams.name
|
||||
this.analysisUpdateParams.deviceType = this.updateParams.type
|
||||
|
@ -977,7 +979,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
public arrayChangeString(data) {
|
||||
if (data && data.length > 0) {
|
||||
if (data instanceof Array) {
|
||||
return data.join(";")
|
||||
return data.join(",")
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
|
@ -989,7 +991,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
//字符串转数组
|
||||
public stringChangeArray(data) {
|
||||
if (data) {
|
||||
return data.split(";").map((item) => parseInt(item))
|
||||
return data.split(",").map((item) => parseInt(item))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,7 +400,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
// 岗位
|
||||
if (item && item.key === "postCode") {
|
||||
this.updateParams.postName = data.map(itm => this.$store.getters.post_map[itm]).join(";");
|
||||
this.updateParams.postName = data.map(itm => this.$store.getters.post_map[itm]).join(",");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -477,7 +477,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
// 新增清单
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(",");
|
||||
this.updateParams.stepNum = this.updateParams.steps.length;
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(";")
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(",")
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then((res) => {
|
||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||
this.updateParams = {
|
||||
|
@ -524,7 +524,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
});
|
||||
this.currentStepTableData.datas = this.updateParams.steps;
|
||||
if (!isRead) {
|
||||
this.updateParams.postCode = this.updateParams.postCode.split(";").map(item => +item);
|
||||
this.updateParams.postCode = this.updateParams.postCode.split(",").map(item => +item);
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item);
|
||||
} else {
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item);
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
<el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
|
||||
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
|
||||
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes">
|
||||
<div class="sub-title">工作危害分析法</div>
|
||||
<TableComponent :tableData="updateParams" :tableColumn="subTableColumn"
|
||||
|
@ -78,7 +78,7 @@
|
|||
</el-table>
|
||||
</TableComponent>
|
||||
</FormComponent>
|
||||
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :labelWidth="labelWidth" :data.sync="updateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes"
|
||||
:actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center">
|
||||
</FormComponent>
|
||||
|
|
|
@ -170,6 +170,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public subTableActions: BtnOption[] = [];
|
||||
|
||||
public labelWidth = "140px";
|
||||
|
||||
public buildUpdateForm() {
|
||||
this.updateOptions = [{
|
||||
name: "区域名称",
|
||||
|
@ -261,7 +263,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
key: "majorSign",
|
||||
format: "majorSignName",
|
||||
type: "checkbox",
|
||||
labelWidth:"130px",
|
||||
labelWidth:"140px",
|
||||
width: "calc(100% - 20px)",
|
||||
require: true,
|
||||
datas: [{
|
||||
|
@ -529,7 +531,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.subTableColumn.push({
|
||||
name: '最严重后果', key: "seriousResult", width: "100px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -571,7 +573,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.proTableColumn.push({
|
||||
name: '可能发生事故', key: "seriousResult", width: "150px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -795,10 +797,10 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
if (isReadonly) {
|
||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||
this.updateParams = Object.assign({
|
||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(";").map(item => this.sourceMap[item]).join(";"),
|
||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(";").map(item => this.craftMap[item]).join(";"),
|
||||
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(";").map(item => this.chemicaltMap[item]).join(";"),
|
||||
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(";").map(item => this.$store.getters.prevention_majorsign_map[item]).join(";"),
|
||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(",").map(item => this.sourceMap[item]).join(","),
|
||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(",").map(item => this.craftMap[item]).join(","),
|
||||
regulatoryChemicalName: !res.data.regulatoryChemical ? null : res.data.regulatoryChemical.split(",").map(item => this.chemicaltMap[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],
|
||||
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type],
|
||||
|
@ -910,8 +912,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
if (isReadonly) {
|
||||
this.analyIsReadonly = true;
|
||||
this.analysisUpdateParams = Object.assign({
|
||||
seriousResultName: row.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";"),
|
||||
safetySignName: row.safetySign.split(";").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";"),
|
||||
seriousResultName: row.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(","),
|
||||
safetySignName: row.safetySign.split(",").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(","),
|
||||
riskLevelName: this.$store.getters.prevention_risk_level_map[row.riskLevel],
|
||||
remainLevelName: this.$store.getters.prevention_risk_level_map[row.remainLevel],
|
||||
riskControlLevelName: this.$store.getters.prevention_control_level_map[row.riskControlLevel],
|
||||
|
@ -930,8 +932,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.analysisUpdateParams = { ...this.analysisUpdateParams, ...JSON.parse(JSON.stringify(row)) };
|
||||
this.analysisUpdateParams.seriousResult = this.stringChangeArray(row.seriousResult)
|
||||
this.analysisUpdateParams.safetySign = this.stringChangeArray(row.safetySign)
|
||||
this.analysisUpdateParams.riskChoose = row.riskChoose ? row.riskChoose.split(";") : []
|
||||
this.analysisUpdateParams.remainChoose = row.remainChoose ? row.remainChoose.split(";") : []
|
||||
this.analysisUpdateParams.riskChoose = row.riskChoose ? row.riskChoose.split(",") : []
|
||||
this.analysisUpdateParams.remainChoose = row.remainChoose ? row.remainChoose.split(",") : []
|
||||
this.analysisUpdateParams.chargeUserName = this.updateParams.chargeUserName
|
||||
this.checkRiskType.risk = this.analysisUpdateParams.riskChoose
|
||||
this.checkRiskType.remain = this.analysisUpdateParams.remainChoose
|
||||
|
@ -952,7 +954,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
public arrayChangeString(data) {
|
||||
if (data && data.length > 0) {
|
||||
if (data instanceof Array) {
|
||||
return data.join(";")
|
||||
return data.join(",")
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
|
@ -964,7 +966,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
//字符串转数组
|
||||
public stringChangeArray(data) {
|
||||
if (data) {
|
||||
return data.split(";").map((item) => parseInt(item))
|
||||
return data.split(",").map((item) => parseInt(item))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -318,7 +318,7 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
let resourceId = this.fileList.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
this.updateParams.resourceId = resourceId.join(";")
|
||||
this.updateParams.resourceId = resourceId.join(",")
|
||||
}
|
||||
|
||||
this.$store.state.userList.map((item) => {
|
||||
|
|
|
@ -345,7 +345,7 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
|||
public showSubModal(row) {
|
||||
this.photoList = []
|
||||
if (row.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(";") }).then((photos: any) => {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(",") }).then((photos: any) => {
|
||||
this.photoList = photos.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
|
@ -329,7 +329,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({
|
||||
name: '事故后果', key: "seriousResult", width: "250px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -397,8 +397,8 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
|||
this.showUpdate = true
|
||||
const tmprow = JSON.parse(JSON.stringify(row))
|
||||
this.subUpdateParams = tmprow
|
||||
this.subUpdateParams.safetySignName =tmprow.safetySign? tmprow.safetySign.split(';').map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";"):null
|
||||
this.subUpdateParams.seriousResultName = tmprow.seriousResult.split(';').map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
this.subUpdateParams.safetySignName =tmprow.safetySign? tmprow.safetySign.split(',').map(item => this.$store.getters.prevention_security_identifier_map[item]).join(","):null
|
||||
this.subUpdateParams.seriousResultName = tmprow.seriousResult.split(',').map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
|
||||
//风险评估
|
||||
this.riskUpdateParams.riskLevelName = this.$store.getters.prevention_risk_level_map[tmprow.riskLevel]
|
||||
|
|
|
@ -107,7 +107,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({
|
||||
name: '事故后果', key: "seriousResult", width: "200px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.seriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -163,7 +163,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
name: '事故后果', key: "itemSeriousResult", width: "100px",
|
||||
render: (data) => {
|
||||
if (data.itemSeriousResult) {
|
||||
return data.itemSeriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
return data.itemSeriousResult.split(",").map(item => this.$store.getters.prevention_serious_result_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
width="952px" destroy-on-close>
|
||||
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
||||
@actionCallback="triCallback" :isReadonly="subIsReadonly" @change="changes" :actions="updateActions"
|
||||
:full-btn="true" btnPosition="center">
|
||||
:full-btn="true" btnPosition="center" :labelWidth="labelWidth">
|
||||
</FormComponent>
|
||||
</el-dialog>
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
|||
|
||||
public showFileList = [] as any;
|
||||
|
||||
public labelWidth = null;
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
@ -514,8 +516,8 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.updateParams.resourceId = resourceId.join(";")
|
||||
this.updateParams.resourceName = resourceName.join(";")
|
||||
this.updateParams.resourceId = resourceId.join(",")
|
||||
this.updateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
|
||||
this.setpsOptions.forEach((item, index) => {
|
||||
|
@ -556,7 +558,7 @@ export default class EmergencyCard extends BaseRecordComponent<any> {
|
|||
})
|
||||
this.updateParams.postCode = parseInt(this.updateParams.postCode)
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
|
@ -63,6 +63,8 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
|||
|
||||
public showFileList = [] as any;
|
||||
|
||||
public labelWidth='130px'
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
@ -335,7 +337,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({
|
||||
name: '安全警示标志', key: "safetySign", render: (data) => {
|
||||
if (data.safetySign) {
|
||||
return data.safetySign.split(";").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";")
|
||||
return data.safetySign.split(",").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(",")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -479,11 +481,11 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.subUpdateParams.resourceId = resourceId.join(";")
|
||||
this.subUpdateParams.resourceName = resourceName.join(";")
|
||||
this.subUpdateParams.resourceId = resourceId.join(",")
|
||||
this.subUpdateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
this.subUpdateParams.postName = this.$store.getters.post_map[this.subUpdateParams.postCode]
|
||||
this.subUpdateParams.safetySign = this.subUpdateParams.safetySign.join(";")
|
||||
this.subUpdateParams.safetySign = this.subUpdateParams.safetySign.join(",")
|
||||
this.tableService.addOrUpdate(this.subUpdateParams, this.subUpdateParams.id ? false : true).then((res) => {
|
||||
this.$message.success(!this.subUpdateParams.id ? "新增成功!" : "编辑成功!");
|
||||
this.subUpdateParams = {} as any
|
||||
|
@ -508,10 +510,10 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
|||
if (res.code === 200) {
|
||||
this.subUpdateParams = Object.assign({
|
||||
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
||||
safetySignName: res.data.safetySign.split(";").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";")
|
||||
safetySignName: res.data.safetySign.split(",").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(",")
|
||||
}, res.data)
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
@ -542,7 +544,7 @@ export default class RiskCard extends BaseRecordComponent<any> {
|
|||
//字符串转数组
|
||||
public stringChangeArray(data) {
|
||||
if (data) {
|
||||
return data.split(";").map((item) => parseInt(item))
|
||||
return data.split(",").map((item) => parseInt(item))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
|||
|
||||
public showFileList = [] as any;
|
||||
|
||||
public labelWidth = "130px";
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
@ -415,8 +417,8 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.subUpdateParams.resourceId = resourceId.join(";")
|
||||
this.subUpdateParams.resourceName = resourceName.join(";")
|
||||
this.subUpdateParams.resourceId = resourceId.join(",")
|
||||
this.subUpdateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
this.subUpdateParams.postName = this.$store.getters.post_map[this.subUpdateParams.postCode]
|
||||
this.subUpdateParams.promiserName = this.$store.getters.user_map[this.subUpdateParams.promiserId]
|
||||
|
@ -445,7 +447,7 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
|||
this.subUpdateParams = res.data
|
||||
this.subUpdateParams.postCode = parseInt(res.data.postCode)
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
@ -471,7 +473,7 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
|||
//字符串转数组
|
||||
public stringChangeArray(data) {
|
||||
if (data) {
|
||||
return data.split(";").map((item) => parseInt(item))
|
||||
return data.split(",").map((item) => parseInt(item))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -484,7 +486,7 @@ export default class SafeCard extends BaseRecordComponent<any> {
|
|||
const isTarget = el.target.classList.contains("link");
|
||||
if (isTarget) {
|
||||
if (data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: data.resourceId.split(",") }).then((files: any) => {
|
||||
this.showFileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
|
@ -378,8 +378,8 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.updateParams.resourceId = resourceId.join(";")
|
||||
this.updateParams.resourceName = resourceName.join(";")
|
||||
this.updateParams.resourceId = resourceId.join(",")
|
||||
this.updateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
|
||||
// 新增
|
||||
|
@ -481,7 +481,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
|||
});
|
||||
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
@ -523,7 +523,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
|||
|
||||
if (isTargetResourceName) {
|
||||
if (row.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(",") }).then((files: any) => {
|
||||
this.showFileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
|
@ -430,8 +430,8 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.subUpdateParams.resourceId = resourceId.join(";")
|
||||
this.subUpdateParams.resourceName = resourceName.join(";")
|
||||
this.subUpdateParams.resourceId = resourceId.join(",")
|
||||
this.subUpdateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
this.subUpdateParams.compileUserName = this.$store.getters.user_map[this.subUpdateParams.compileUserId];
|
||||
this.subUpdateParams.publishDeptName = this.$store.getters.dept_map[this.subUpdateParams.publishDeptId]
|
||||
|
@ -464,7 +464,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
|||
this.subUpdateParams.statusName = res.data.status == 1 ? '在用' : '废弃'
|
||||
}
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
@ -495,7 +495,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
|||
const isTarget = el.target.classList.contains("link");
|
||||
if (isTarget) {
|
||||
if (data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: data.resourceId.split(",") }).then((files: any) => {
|
||||
this.showFileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
|
@ -432,8 +432,8 @@ export default class Programme extends BaseRecordComponent<any> {
|
|||
let resourceName = this.fileList.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
this.subUpdateParams.resourceId = resourceId.join(";")
|
||||
this.subUpdateParams.resourceName = resourceName.join(";")
|
||||
this.subUpdateParams.resourceId = resourceId.join(",")
|
||||
this.subUpdateParams.resourceName = resourceName.join(",")
|
||||
}
|
||||
this.subUpdateParams.compileUserName = this.$store.getters.user_map[this.subUpdateParams.compileUserId];
|
||||
this.subUpdateParams.publishDeptName = this.$store.getters.dept_map[this.subUpdateParams.publishDeptId]
|
||||
|
@ -466,7 +466,7 @@ export default class Programme extends BaseRecordComponent<any> {
|
|||
this.subUpdateParams.statusName = res.data.status == 1 ? '在用' : '废弃'
|
||||
}
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId.split(",") }).then((files: any) => {
|
||||
this.fileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
@ -496,7 +496,7 @@ export default class Programme extends BaseRecordComponent<any> {
|
|||
const isTarget = el.target.classList.contains("link");
|
||||
if (isTarget) {
|
||||
if (data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: data.resourceId.split(";") }).then((files: any) => {
|
||||
this.tableService.getFileUrls({ ids: data.resourceId.split(",") }).then((files: any) => {
|
||||
this.showFileList = files.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
|
|
Loading…
Reference in New Issue