forked from xxhjsb/hbt-prevention-ui
feat:修复bug
parent
0fd8f2cb23
commit
fb146e0eac
|
@ -449,8 +449,9 @@ export default class DrawComponent extends Vue {
|
||||||
this.map.remove();
|
this.map.remove();
|
||||||
this.map = null;
|
this.map = null;
|
||||||
}
|
}
|
||||||
destoryed(){
|
destroyed(){
|
||||||
this.removeMap()
|
// console.log(123)
|
||||||
|
// this.removeMap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -50,8 +50,9 @@ export default class MapComponent extends Vue {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initMap()
|
this.initMap()
|
||||||
}
|
}
|
||||||
beforeDestory(){
|
beforeDestroy() {
|
||||||
|
// this.map.remove();
|
||||||
|
// this.map = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -143,7 +143,10 @@ export default class MeasureComponent extends Vue {
|
||||||
public taskUpdateOptions: FormOption<BtnOption>[] = [];
|
public taskUpdateOptions: FormOption<BtnOption>[] = [];
|
||||||
|
|
||||||
//排查任务
|
//排查任务
|
||||||
public taskUpdataParams = {} as any;
|
public taskUpdataParams = {
|
||||||
|
startTime: null,
|
||||||
|
endTime: null
|
||||||
|
} as any;
|
||||||
|
|
||||||
//排查任务类型
|
//排查任务类型
|
||||||
public taskType = [] as any;
|
public taskType = [] as any;
|
||||||
|
@ -227,7 +230,7 @@ export default class MeasureComponent extends Vue {
|
||||||
datas: this.$store.state.userList,
|
datas: this.$store.state.userList,
|
||||||
showError: false,
|
showError: false,
|
||||||
}, {
|
}, {
|
||||||
name: "排查周期 每隔",
|
name: "排查周期 每",
|
||||||
key: "reviewCycleValue",
|
key: "reviewCycleValue",
|
||||||
type: "number",
|
type: "number",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
|
@ -496,7 +499,10 @@ export default class MeasureComponent extends Vue {
|
||||||
this.showSubUpdate = false;
|
this.showSubUpdate = false;
|
||||||
this.taskIsReadonly = false;
|
this.taskIsReadonly = false;
|
||||||
this.taskCurrentId = -1;
|
this.taskCurrentId = -1;
|
||||||
this.taskUpdataParams = {} as any;
|
this.taskUpdataParams = {
|
||||||
|
startTime: null,
|
||||||
|
endTime: null
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public taskCallback(data) {
|
public taskCallback(data) {
|
||||||
|
@ -529,7 +535,10 @@ export default class MeasureComponent extends Vue {
|
||||||
|
|
||||||
public taskAdd() {
|
public taskAdd() {
|
||||||
this.taskType = this.taskItemSelect()
|
this.taskType = this.taskItemSelect()
|
||||||
this.taskUpdataParams = {} as any;
|
this.taskUpdataParams = {
|
||||||
|
startTime: null,
|
||||||
|
endTime: null
|
||||||
|
};
|
||||||
if (this.outermostData.majorSign && this.outermostData.majorSign.includes(0)) {
|
if (this.outermostData.majorSign && this.outermostData.majorSign.includes(0)) {
|
||||||
this.taskUpdataParams.insuranceDutyFlag = 0;
|
this.taskUpdataParams.insuranceDutyFlag = 0;
|
||||||
this.taskUpdataParams.taskType = 0
|
this.taskUpdataParams.taskType = 0
|
||||||
|
@ -621,7 +630,7 @@ export default class MeasureComponent extends Vue {
|
||||||
}
|
}
|
||||||
//开始时间
|
//开始时间
|
||||||
if (item && item.key === 'startTime') {
|
if (item && item.key === 'startTime') {
|
||||||
if (data > this.taskUpdataParams.endTime) {
|
if (this.taskUpdataParams.endTime && data > this.taskUpdataParams.endTime) {
|
||||||
this.$message.warning("结束时间不能早于开始时间!")
|
this.$message.warning("结束时间不能早于开始时间!")
|
||||||
this.taskUpdataParams.endTime = null;
|
this.taskUpdataParams.endTime = null;
|
||||||
return
|
return
|
||||||
|
|
|
@ -343,7 +343,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
key: "photo",
|
key: "photo",
|
||||||
ref: "photo",
|
ref: "photo",
|
||||||
type: "upload",
|
type: "upload",
|
||||||
width: "calc(50% - 20px)",
|
width: "100%",
|
||||||
require: true,
|
require: true,
|
||||||
onSucess: this.onSuccess,
|
onSucess: this.onSuccess,
|
||||||
onMove: this.onRemove,
|
onMove: this.onRemove,
|
||||||
|
@ -359,7 +359,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
key: "file",
|
key: "file",
|
||||||
ref: "file",
|
ref: "file",
|
||||||
type: "upload",
|
type: "upload",
|
||||||
width: "calc(50% - 20px)",
|
width: "100%",
|
||||||
showError: false,
|
showError: false,
|
||||||
onSucess: this.onSuccess2,
|
onSucess: this.onSuccess2,
|
||||||
onMove: this.onRemove2,
|
onMove: this.onRemove2,
|
||||||
|
@ -442,7 +442,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '整改单编号', width: "200px", key: "number" });
|
this.tableColumn.push({ name: '整改单编号', width: "220px", key: "number" });
|
||||||
this.tableColumn.push({ name: '隐患描述', key: "description", width: "300px" });
|
this.tableColumn.push({ name: '隐患描述', key: "description", width: "300px" });
|
||||||
this.tableColumn.push({ name: '整改部门', width: "100px", key: "reformDeptName" });
|
this.tableColumn.push({ name: '整改部门', width: "100px", key: "reformDeptName" });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
|
@ -618,7 +618,7 @@ export default class HiddenDangerClapComponent extends BaseRecordComponent<any>
|
||||||
id: item.id
|
id: item.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.updateParams.photo = this.photoList.length || null;
|
this.updateParams.photo = this.isReadonly ? null : (this.photoList.length || null);
|
||||||
this.buildUpdateForm()
|
this.buildUpdateForm()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,7 +462,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent<any>
|
||||||
hide: this.updateParams.reformConfirmFlag === 0,
|
hide: this.updateParams.reformConfirmFlag === 0,
|
||||||
showError: false,
|
showError: false,
|
||||||
rules: [
|
rules: [
|
||||||
{ pattern: /^[1-9]\d{0,7}(\.\d{1,3})?$/, message: '不超过八位的整数', },
|
{ pattern: /^[1-9]\d{0,7}(\.\d{1,2})?$/, message: '不超过八位的整数,保留两位小数', },
|
||||||
],
|
],
|
||||||
unit: {
|
unit: {
|
||||||
name: "元",
|
name: "元",
|
||||||
|
|
|
@ -514,7 +514,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
hide: this.updateParams.reformConfirmFlag === 0,
|
hide: this.updateParams.reformConfirmFlag === 0,
|
||||||
showError: false,
|
showError: false,
|
||||||
rules: [
|
rules: [
|
||||||
{ pattern: /^[1-9]\d{0,7}(\.\d{1,3})?$/, message: '不超过八位的整数', },
|
{ pattern: /^[1-9]\d{0,7}(\.\d{1,2})?$/, message: '不超过八位的整数,保留两位小数', },
|
||||||
],
|
],
|
||||||
unit: {
|
unit: {
|
||||||
name: "元",
|
name: "元",
|
||||||
|
@ -775,12 +775,12 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
||||||
this.getTableCallback()
|
this.getTableCallback()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (item && item.key === 'executeMoney') {
|
// if (item && item.key === 'executeMoney') {
|
||||||
this.updateParams.executeMoney = null;
|
// this.updateParams.executeMoney = null;
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.updateParams.executeMoney = +data.toFixed(2)
|
// this.updateParams.executeMoney = +data.toFixed(2)
|
||||||
}, 0)
|
// }, 0)
|
||||||
}
|
// }
|
||||||
if (item && item.key === "reformDeadline") {
|
if (item && item.key === "reformDeadline") {
|
||||||
const now = moment().format("YYYY-MM-DD HH");
|
const now = moment().format("YYYY-MM-DD HH");
|
||||||
if (now > data) {
|
if (now > data) {
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="!subUpdateParams.id?'新增':subIsReadonly?'详情':'编辑'"
|
<el-dialog v-if="isManager" :close-on-click-modal="false" :title="!subUpdateParams.id?'新增':subIsReadonly?'详情':'编辑'"
|
||||||
:visible.sync="showSubUpdate" :before-close="handleClose" destroy-on-close>
|
:visible.sync="showSubUpdate" :before-close="handleClose" destroy-on-close>
|
||||||
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right"
|
<FormComponent :options="subUpdateOptions" :isReadonly="subIsReadonly" labelWidth="110px" labelAlign="right"
|
||||||
:data.sync="subUpdateParams" @actionCallback="subCallback" :actions="subUpdateActions" :full-btn="true"
|
:data.sync="subUpdateParams" @actionCallback="subCallback" :actions="checkUpdateActions" :full-btn="true"
|
||||||
@change="subChange" btn-position="center">
|
@change="subChange" btn-position="center">
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
|
@ -95,7 +95,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public showUpdate = false;
|
public showUpdate = false;
|
||||||
public currentId = -1;
|
public currentId = -1;
|
||||||
public updateParams = {} as any;
|
public updateParams = {
|
||||||
|
units: [],
|
||||||
|
tableItems: []
|
||||||
|
} as any;
|
||||||
public subUpdateParams = {} as any;
|
public subUpdateParams = {} as any;
|
||||||
public updateOptions: FormOption<BtnOption>[] = [];
|
public updateOptions: FormOption<BtnOption>[] = [];
|
||||||
public updateTableData = { datas: [] };
|
public updateTableData = { datas: [] };
|
||||||
|
@ -488,6 +491,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.isReadonly = !!isRead;
|
this.isReadonly = !!isRead;
|
||||||
this.clearSelect()
|
this.clearSelect()
|
||||||
if (!row) {
|
if (!row) {
|
||||||
|
this.updateParams = { units: [], tableItems: [] } as any
|
||||||
this.currentId = -1;
|
this.currentId = -1;
|
||||||
this.getNumber();
|
this.getNumber();
|
||||||
this.buildUpdateForm();
|
this.buildUpdateForm();
|
||||||
|
@ -583,7 +587,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
item.index = i + 1
|
item.index = i + 1
|
||||||
})
|
})
|
||||||
this.subUpdateParams = {} as any;
|
this.subUpdateParams = {} as any;
|
||||||
this.showSubUpdate = false;
|
this.showSubUpdate = !!goOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public doSubDelete(indexs) {
|
public doSubDelete(indexs) {
|
||||||
|
|
|
@ -114,16 +114,17 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
public updateActions = [{
|
public updateActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
value: "cancel"
|
value: "cancel"
|
||||||
}, {
|
},
|
||||||
name: "保存",
|
{
|
||||||
value: "save",
|
|
||||||
type: "primary"
|
|
||||||
}, {
|
|
||||||
name: "保存并继续添加",
|
name: "保存并继续添加",
|
||||||
hide: false,
|
hide: false,
|
||||||
value: "saveAndContinue",
|
value: "saveAndContinue",
|
||||||
type: "primary"
|
type: "primary"
|
||||||
}];
|
}, {
|
||||||
|
name: "保存",
|
||||||
|
value: "save",
|
||||||
|
type: "primary"
|
||||||
|
},];
|
||||||
|
|
||||||
public selectData = [];
|
public selectData = [];
|
||||||
|
|
||||||
|
@ -205,7 +206,7 @@ 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,
|
||||||
|
@ -460,6 +461,10 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
this.buildUpdateForm();
|
this.buildUpdateForm();
|
||||||
}
|
}
|
||||||
if (item && item.key === "areaIds") {
|
if (item && item.key === "areaIds") {
|
||||||
|
if (!data) {
|
||||||
|
this.unitList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loadUnitData(data)
|
this.loadUnitData(data)
|
||||||
}
|
}
|
||||||
if (item && item.key === "chargeUserId") {
|
if (item && item.key === "chargeUserId") {
|
||||||
|
@ -577,7 +582,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
// 打开增改查弹窗
|
// 打开增改查弹窗
|
||||||
public async showUpdateModel(row?, isRead?) {
|
public async showUpdateModel(row?, isRead?) {
|
||||||
this.updateActions[2].hide = false;
|
this.updateActions[1].hide = false;
|
||||||
this.isReadonly = !!isRead;
|
this.isReadonly = !!isRead;
|
||||||
if (row) {
|
if (row) {
|
||||||
if (isRead) {
|
if (isRead) {
|
||||||
|
@ -683,7 +688,7 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
//单元是否删除
|
//单元是否删除
|
||||||
let isDeleteUnit = this.judgeDeleteUnitMethod(JSON.parse(JSON.stringify(row)));
|
let isDeleteUnit = this.judgeDeleteUnitMethod(JSON.parse(JSON.stringify(row)));
|
||||||
if (!isDeleteUnit) {
|
if (!isDeleteUnit) {
|
||||||
this.updateActions[2].hide = true;
|
this.updateActions[1].hide = true;
|
||||||
this.currentPlan = row;
|
this.currentPlan = row;
|
||||||
this.showSend = true;
|
this.showSend = true;
|
||||||
this.tableTabs = [];
|
this.tableTabs = [];
|
||||||
|
|
|
@ -397,7 +397,9 @@ export default class IntegralExchange extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableColumn.push({ name: '发起时间', key: "applyTime", });
|
this.tableColumn.push({ name: '发起时间', key: "applyTime",render:(data)=>{
|
||||||
|
return moment(data.applyTime).format('YYYY-MM-DD HH:mm')
|
||||||
|
} });
|
||||||
this.tableColumn.push({
|
this.tableColumn.push({
|
||||||
name: '兑换清单', key: "goodsNumber", render: (data) => {
|
name: '兑换清单', key: "goodsNumber", render: (data) => {
|
||||||
return `<span class="link goodsNumber">${data.goodsNumber}</span>`
|
return `<span class="link goodsNumber">${data.goodsNumber}</span>`
|
||||||
|
|
|
@ -125,7 +125,6 @@ export default class IntegralMall extends BaseRecordComponent<any> {
|
||||||
rules: [
|
rules: [
|
||||||
{ pattern: /^\d{1,5}$/, message: '在1~99999范围内', }
|
{ pattern: /^\d{1,5}$/, message: '在1~99999范围内', }
|
||||||
],
|
],
|
||||||
// max: 99999,
|
|
||||||
min: 1
|
min: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -143,6 +142,10 @@ export default class IntegralMall extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
|
rules: [
|
||||||
|
{ pattern: /^\d{1,8}$/, message: '在1~99999999范围内', }
|
||||||
|
],
|
||||||
|
min: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "状态",
|
name: "状态",
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
width="952px" destroy-on-close>
|
width="952px" destroy-on-close>
|
||||||
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="subUpdateParams"
|
||||||
@actionCallback="triCallback" :isReadonly="subIsReadonly" :actions="subUpdateActions" :full-btn="true" @change="changes"
|
@actionCallback="triCallback" :isReadonly="subIsReadonly" :actions="subUpdateActions" :full-btn="true" @change="changes"
|
||||||
btnPosition="center">
|
btnPosition="center" ref="recordForm">
|
||||||
</FormComponent>
|
</FormComponent>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
|
@ -221,8 +221,8 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
showError: false,
|
showError: false,
|
||||||
hide: !(this.subUpdateParams.type && this.subUpdateParams.type !== 1),
|
hide: !(this.subUpdateParams.type && this.subUpdateParams.type !== 1),
|
||||||
rules: [
|
rules: [
|
||||||
{ pattern: /^[1-9]\d{0,7}(\.\d{1,3})?$/, message: '不超过八位的整数', },
|
{ pattern: /^[1-9]\d{0,7}(\.\d{1,2})?$/, message: '不超过八位的整数,保留两位小数', },
|
||||||
]
|
],
|
||||||
}, {
|
}, {
|
||||||
name: "奖惩事由",
|
name: "奖惩事由",
|
||||||
type: "textarea",
|
type: "textarea",
|
||||||
|
@ -297,12 +297,12 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
option.hide = false
|
option.hide = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item && item.key === 'money') {
|
// if (item && item.key === 'money') {
|
||||||
this.subUpdateParams.money = null;
|
// this.subUpdateParams.money = null;
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.subUpdateParams.money = +data.toFixed(2)
|
// this.subUpdateParams.money = +data.toFixed(2)
|
||||||
}, 0)
|
// }, 0)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
|
@ -499,9 +499,11 @@ export default class RewardsRecord extends BaseRecordComponent<any> {
|
||||||
if (data.value === "cancel") {
|
if (data.value === "cancel") {
|
||||||
this.subShowUpdate = false;
|
this.subShowUpdate = false;
|
||||||
} else if (data && data.value.indexOf("save") >= 0) {
|
} else if (data && data.value.indexOf("save") >= 0) {
|
||||||
|
if ((this.$refs.recordForm as any).vaildParams()) {
|
||||||
this.doSubSave(data.value !== "save")
|
this.doSubSave(data.value !== "save")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 新增奖惩记录
|
* 新增奖惩记录
|
||||||
* @param goOn
|
* @param goOn
|
||||||
|
|
|
@ -362,6 +362,10 @@ export default class AreaManagerComponent extends BaseRecordComponent<any> {
|
||||||
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;
|
||||||
|
if(!data){
|
||||||
|
this.updateParams.majorHazardName = '';
|
||||||
|
this.updateParams.majorHazardLevel = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,11 +241,7 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
|
||||||
let len: number = 0;
|
let len: number = 0;
|
||||||
let tmpRiskDatas = []
|
let tmpRiskDatas = []
|
||||||
if (this.popTitle === 'L') {
|
if (this.popTitle === 'L') {
|
||||||
tmpRiskDatas = this.riskLDatas
|
tmpRiskDatas = this.riskLDatas;
|
||||||
}
|
|
||||||
if (this.popTitle === 'S') {
|
|
||||||
tmpRiskDatas = this.riskSDatas
|
|
||||||
}
|
|
||||||
tmpRiskDatas.forEach((item: any) => {
|
tmpRiskDatas.forEach((item: any) => {
|
||||||
if (item.value && typeof (item.value) === 'number') {
|
if (item.value && typeof (item.value) === 'number') {
|
||||||
len = len + 1
|
len = len + 1
|
||||||
|
@ -253,9 +249,19 @@ export default class AreaAnalComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tmpRiskDatas.forEach((item: any) => {
|
tmpRiskDatas.forEach((item: any) => {
|
||||||
item.result = Math.round(value / len).toString()
|
item.result = Math.ceil(value / len).toString()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (this.popTitle === 'S') {
|
||||||
|
tmpRiskDatas = this.riskSDatas;
|
||||||
|
let maxdata = Math.max.apply(Math, tmpRiskDatas.map((item: any) => {
|
||||||
|
return item.value && typeof (item.value) === 'number' ? item.value : 0
|
||||||
|
}))
|
||||||
|
tmpRiskDatas.forEach((item: any) => {
|
||||||
|
item.result = maxdata.toString()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public startEdit(row) {
|
public startEdit(row) {
|
||||||
row.edit = true;
|
row.edit = true;
|
||||||
|
|
|
@ -156,6 +156,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public subUpdateOptions: FormOption<BtnOption>[] = [];
|
public subUpdateOptions: FormOption<BtnOption>[] = [];
|
||||||
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
||||||
|
@Watch("$store.state.userList", { immediate: true, deep: true })
|
||||||
onChanges() {
|
onChanges() {
|
||||||
this.loadAreaData()
|
this.loadAreaData()
|
||||||
}
|
}
|
||||||
|
@ -618,6 +619,7 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
||||||
} else {
|
} else {
|
||||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item);
|
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item);
|
||||||
this.updateParams.safetyFactorName = this.updateParams.safetyFactor.map(item => this.$store.getters.prevention_safe_reason_map[item]).join(",")
|
this.updateParams.safetyFactorName = this.updateParams.safetyFactor.map(item => this.$store.getters.prevention_safe_reason_map[item]).join(",")
|
||||||
|
this.updateParams.identifyUserName = this.$store.getters.user_map[this.updateParams.identifyUserId];
|
||||||
}
|
}
|
||||||
this.updateActionsForm()
|
this.updateActionsForm()
|
||||||
})
|
})
|
||||||
|
|
|
@ -154,6 +154,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
name: "LS法:",
|
name: "LS法:",
|
||||||
key: "riskLSValue",
|
key: "riskLSValue",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
hide: !this.subUpdateParams.riskLsValue
|
||||||
// width: "20px",
|
// width: "20px",
|
||||||
}, {
|
}, {
|
||||||
name: "L值:",
|
name: "L值:",
|
||||||
|
@ -161,18 +162,21 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "S值:",
|
name: "S值:",
|
||||||
key: "lssvalue",
|
key: "lssvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "R值:",
|
name: "R值:",
|
||||||
key: "lsrvalue",
|
key: "lsrvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "风险等级:",
|
name: "风险等级:",
|
||||||
key: "lsgrade",
|
key: "lsgrade",
|
||||||
|
@ -180,10 +184,12 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
labelWidth: "60px",
|
labelWidth: "60px",
|
||||||
|
hide: !this.subUpdateParams.riskLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "LEC法:",
|
name: "LEC法:",
|
||||||
key: "riskLECValue",
|
key: "riskLECValue",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
hide: !this.subUpdateParams.riskLecValue
|
||||||
// labelWidth: "30px",
|
// labelWidth: "30px",
|
||||||
}, {
|
}, {
|
||||||
name: "L值:",
|
name: "L值:",
|
||||||
|
@ -191,24 +197,28 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "E值:",
|
name: "E值:",
|
||||||
key: "lecevalue",
|
key: "lecevalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "C值:",
|
name: "C值:",
|
||||||
key: "leccvalue",
|
key: "leccvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "D值:",
|
name: "D值:",
|
||||||
key: "lecdvalue",
|
key: "lecdvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "15%",
|
width: "15%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.riskLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "风险等级:",
|
name: "风险等级:",
|
||||||
key: "lecgrade",
|
key: "lecgrade",
|
||||||
|
@ -216,6 +226,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
labelWidth: "60px",
|
labelWidth: "60px",
|
||||||
|
hide: !this.subUpdateParams.riskLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "风险等级",
|
name: "风险等级",
|
||||||
key: "riskLevel",
|
key: "riskLevel",
|
||||||
|
@ -236,6 +247,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
name: "LS法:",
|
name: "LS法:",
|
||||||
key: "remainLSValue",
|
key: "remainLSValue",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
hide: !this.subUpdateParams.remainLsValue
|
||||||
// width: "30px",
|
// width: "30px",
|
||||||
}, {
|
}, {
|
||||||
name: "L值:",
|
name: "L值:",
|
||||||
|
@ -243,18 +255,21 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "S值:",
|
name: "S值:",
|
||||||
key: "lssvalue",
|
key: "lssvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "R值:",
|
name: "R值:",
|
||||||
key: "lsrvalue",
|
key: "lsrvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "风险等级:",
|
name: "风险等级:",
|
||||||
key: "lsgrade",
|
key: "lsgrade",
|
||||||
|
@ -262,10 +277,12 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
labelWidth: "60px",
|
labelWidth: "60px",
|
||||||
|
hide: !this.subUpdateParams.remainLsValue
|
||||||
}, {
|
}, {
|
||||||
name: "LEC法:",
|
name: "LEC法:",
|
||||||
key: "remainLECValue",
|
key: "remainLECValue",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
hide: !this.subUpdateParams.remainLecValue
|
||||||
// width: "30px",
|
// width: "30px",
|
||||||
}, {
|
}, {
|
||||||
name: "L值:",
|
name: "L值:",
|
||||||
|
@ -273,24 +290,28 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "E值:",
|
name: "E值:",
|
||||||
key: "lecevalue",
|
key: "lecevalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "C值:",
|
name: "C值:",
|
||||||
key: "leccvalue",
|
key: "leccvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "10%",
|
width: "10%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "D值:",
|
name: "D值:",
|
||||||
key: "lecdvalue",
|
key: "lecdvalue",
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "15%",
|
width: "15%",
|
||||||
labelWidth: "40px",
|
labelWidth: "40px",
|
||||||
|
hide: !this.subUpdateParams.remainLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "风险等级:",
|
name: "风险等级:",
|
||||||
key: "lecgrade",
|
key: "lecgrade",
|
||||||
|
@ -298,6 +319,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
type: "text",
|
type: "text",
|
||||||
width: "20%",
|
width: "20%",
|
||||||
labelWidth: "60px",
|
labelWidth: "60px",
|
||||||
|
hide: !this.subUpdateParams.remainLecValue
|
||||||
}, {
|
}, {
|
||||||
name: "风险等级",
|
name: "风险等级",
|
||||||
key: "remainLevel",
|
key: "remainLevel",
|
||||||
|
@ -449,7 +471,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.riskUpdateParams = { ...this.riskUpdateParams, ...tmpRiskLecValue };
|
this.riskUpdateParams = { ...this.riskUpdateParams, ...tmpRiskLecValue };
|
||||||
this.riskUpdateParams.lecgradeName = this.$store.getters.prevention_risk_level_map[this.riskUpdateParams.lsgrade];
|
this.riskUpdateParams.lecgradeName = this.$store.getters.prevention_risk_level_map[this.riskUpdateParams.lecgrade];
|
||||||
}
|
}
|
||||||
|
|
||||||
//处理 残余风险评估LS
|
//处理 残余风险评估LS
|
||||||
|
|
|
@ -224,7 +224,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
public buildFormOptions() {
|
public buildFormOptions() {
|
||||||
this.updateOptions = [{
|
this.updateOptions = [{
|
||||||
name: "选择区域",
|
name: "区域名称",
|
||||||
key: "areaId",
|
key: "areaId",
|
||||||
placeholder: "请选择区域名称",
|
placeholder: "请选择区域名称",
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
|
@ -361,7 +361,8 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
this.tableColumn.push({ name: '风险分析单元', key: "name" });
|
this.tableColumn.push({ name: '区域名称', key: "areaName" });
|
||||||
|
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({
|
this.tableColumn.push({
|
||||||
|
@ -394,7 +395,7 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
});
|
});
|
||||||
this.repairTableColumn.push({ name: "序号", key: "index" });
|
this.repairTableColumn.push({ name: "序号", key: "index" });
|
||||||
this.repairTableColumn.push({ name: "停用开始时间", key: "startTime" });
|
this.repairTableColumn.push({ name: "停用开始时间", key: "startTime" });
|
||||||
this.repairTableColumn.push({ name: "停用开始时间", key: "endTime" });
|
this.repairTableColumn.push({ name: "停用结束时间", key: "endTime" });
|
||||||
this.repairTableColumn.push({ name: "原因", key: "reason" });
|
this.repairTableColumn.push({ name: "原因", key: "reason" });
|
||||||
this.repairTableColumn.push({ name: "登记人", key: "registerUserName" });
|
this.repairTableColumn.push({ name: "登记人", key: "registerUserName" });
|
||||||
this.repairTableColumn.push({ name: "登记时间", key: "registerTime" });
|
this.repairTableColumn.push({ name: "登记时间", key: "registerTime" });
|
||||||
|
@ -441,8 +442,6 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public change(data, item) {
|
public change(data, item) {
|
||||||
console.log('data');
|
|
||||||
|
|
||||||
// 新增编辑选择部门
|
// 新增编辑选择部门
|
||||||
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];
|
||||||
|
@ -471,6 +470,14 @@ export default class UnitManagerComponent extends BaseRecordComponent<any> {
|
||||||
this.turnOffParams.endTime = null
|
this.turnOffParams.endTime = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//单元名称
|
||||||
|
if (item && item.key === 'name') {
|
||||||
|
if (this.updateParams.geoJson !== '[]') {
|
||||||
|
let tmpGeoJson = JSON.parse(this.updateParams.geoJson);
|
||||||
|
tmpGeoJson[0]['properties']['name'] = this.updateParams.name;
|
||||||
|
this.$set(this.updateParams, 'geoJson', JSON.stringify(tmpGeoJson))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public callback(data, type) {
|
public callback(data, type) {
|
||||||
if (type) {
|
if (type) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component } from 'vue-property-decorator';
|
import { Component, Watch } from 'vue-property-decorator';
|
||||||
import template from './common.component.html'
|
import template from './common.component.html'
|
||||||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue";
|
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue";
|
||||||
import FormComponent from "hbt-common/components/common/form.component.vue";
|
import FormComponent from "hbt-common/components/common/form.component.vue";
|
||||||
|
@ -95,7 +95,10 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
||||||
value: "reverse"
|
value: "reverse"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
public formOptions: FormOption<BtnOption>[] = [{
|
public formOptions: FormOption<BtnOption>[] = [] as any;
|
||||||
|
|
||||||
|
public buildFormOptions() {
|
||||||
|
this.formOptions = [{
|
||||||
name: "制度名称",
|
name: "制度名称",
|
||||||
key: "name",
|
key: "name",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
@ -112,6 +115,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
||||||
type: "date",
|
type: "date",
|
||||||
format: "yyyy-MM-dd"
|
format: "yyyy-MM-dd"
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
public subActions = [{
|
public subActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
|
@ -257,7 +261,13 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
//
|
//
|
||||||
|
this.buildFormOptions();
|
||||||
}
|
}
|
||||||
|
@Watch("$store.state.deptTreeList", { immediate: true, deep: true })
|
||||||
|
onChanges() {
|
||||||
|
this.buildFormOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public buildTable() {
|
public buildTable() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component } from 'vue-property-decorator';
|
import { Component, Watch } from 'vue-property-decorator';
|
||||||
import template from './common.component.html'
|
import template from './common.component.html'
|
||||||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue";
|
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue";
|
||||||
import FormComponent from "hbt-common/components/common/form.component.vue";
|
import FormComponent from "hbt-common/components/common/form.component.vue";
|
||||||
|
@ -99,7 +99,10 @@ export default class Programme extends BaseRecordComponent<any> {
|
||||||
value: "reverse"
|
value: "reverse"
|
||||||
}];
|
}];
|
||||||
|
|
||||||
public formOptions: FormOption<BtnOption>[] = [{
|
public formOptions: FormOption<BtnOption>[] = [] as any;
|
||||||
|
|
||||||
|
public buildFormOptions() {
|
||||||
|
this.formOptions = [{
|
||||||
name: "方案名称",
|
name: "方案名称",
|
||||||
key: "name",
|
key: "name",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
@ -107,8 +110,8 @@ export default class Programme extends BaseRecordComponent<any> {
|
||||||
name: "适用部门",
|
name: "适用部门",
|
||||||
key: "suitDeptId",
|
key: "suitDeptId",
|
||||||
type: "treeSelect",
|
type: "treeSelect",
|
||||||
datas: this.$store.state.deptTreeList,
|
|
||||||
expandLevel: Infinity,
|
expandLevel: Infinity,
|
||||||
|
datas: this.$store.state.deptTreeList,
|
||||||
width: "280px"
|
width: "280px"
|
||||||
}, {
|
}, {
|
||||||
name: "适用年度",
|
name: "适用年度",
|
||||||
|
@ -116,6 +119,7 @@ export default class Programme extends BaseRecordComponent<any> {
|
||||||
type: "select",
|
type: "select",
|
||||||
datas: this.suitList,
|
datas: this.suitList,
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
public subActions = [{
|
public subActions = [{
|
||||||
name: "取消",
|
name: "取消",
|
||||||
|
@ -260,10 +264,13 @@ export default class Programme extends BaseRecordComponent<any> {
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getSuitListData();
|
this.getSuitListData();
|
||||||
|
this.buildFormOptions();
|
||||||
|
}
|
||||||
|
@Watch("$store.state.deptTreeList", { immediate: true, deep: true })
|
||||||
|
onChanges() {
|
||||||
|
this.buildFormOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取适用年度
|
//获取适用年度
|
||||||
|
|
|
@ -175,6 +175,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
||||||
require: true,
|
require: true,
|
||||||
width: "calc(50% - 20px)",
|
width: "calc(50% - 20px)",
|
||||||
showError: false,
|
showError: false,
|
||||||
|
rules: [
|
||||||
|
{ pattern: /^(([1-9]?\d(\.\d{1,1})?)|99|99.0)$/, message: '支持输入两位整数,保留一位小数', }
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "培训时间",
|
name: "培训时间",
|
||||||
|
@ -375,9 +378,9 @@ export default class TrainRecords extends BaseRecordComponent<any> {
|
||||||
this.buildSubForm()
|
this.buildSubForm()
|
||||||
}
|
}
|
||||||
//培训时长格式化
|
//培训时长格式化
|
||||||
this.durationChange(data, item);
|
// this.durationChange(data, item);
|
||||||
//得分格式化
|
// //得分格式化
|
||||||
this.scoreFormat(data, item);
|
// this.scoreFormat(data, item);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 培训时长格式化,保留一位小数
|
* 培训时长格式化,保留一位小数
|
||||||
|
|
Loading…
Reference in New Issue