diff --git a/src/views/certificate/index.vue b/src/views/certificate/index.vue index 82efe3f..dfedc22 100644 --- a/src/views/certificate/index.vue +++ b/src/views/certificate/index.vue @@ -34,7 +34,7 @@ - + @@ -42,7 +42,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -139,9 +139,9 @@ export default { colConfigs: [ { prop: 'username', label: '姓名', align: 'center', width: 50 }, { prop: 'identificationNum', label: '身份证号码', align: 'center' }, - { prop: 'education', label: '学历', align: 'center', width: 50 }, - { prop: 'major', label: '专业', align: 'center' }, - { prop: 'certificateName', label: '职称', align: 'center', width: 60 }, + { prop: 'education', label: '学历', align: 'center', width: 50, formatter: this.formatterDicData }, + { prop: 'major', label: '专业', align: 'center', formatter: this.formatterDicDataMajor }, + { prop: 'certificateName', label: '职称', align: 'center', width: 60, formatter: this.formatterDicDataJob }, { prop: 'level', label: '级别', align: 'center', width: 50 }, { prop: 'project', label: '项目', align: 'center' }, { prop: 'code', label: '代号', align: 'center', width: 50 }, @@ -152,7 +152,7 @@ export default { } }, { prop: 'renewalDate', label: '发换证日期', align: 'center', width: 50 }, - { prop: 'remarks', label: '备注', align: 'center', width: 60 }, + { prop: 'remarks', label: '备注', align: 'center', width: 60,formatter: this.formatterDicDataRemark }, { slot: 'operation' } ], permission: { @@ -312,6 +312,36 @@ export default { this.dialogVisible = false downloadFile(data, parseTime(new Date()) + '-' + this.crud.title + '数据', 'xlsx') }) + }, + formatterDicData(cellValue) { + if (cellValue != null) { + let label = '' + this.educationDicList.filter(dicData => dicData.code === cellValue.education).forEach(dicData => { + label = dicData.name + }) + return label + } + return null + }, + formatterDicDataJob(cellValue) { + if (cellValue != null) { + let label = '' + this.certificateNameDicList.filter(dicData => dicData.code === cellValue.certificateName).forEach(dicData => { + label = dicData.name + }) + return label + } + return null + }, + formatterDicDataRemark(cellValue){ + if (cellValue != null) { + let label = '' + this.remarksDicList.filter(dicData => dicData.code === cellValue.remarks).forEach(dicData => { + label = dicData.name + }) + return label + } + return null } } } diff --git a/src/views/device_management/index.vue b/src/views/device_management/index.vue index 81f08a6..5a4cf03 100644 --- a/src/views/device_management/index.vue +++ b/src/views/device_management/index.vue @@ -219,7 +219,7 @@ - + @@ -299,16 +299,16 @@ const defaultForm = form({ checkDate: '' }) -// 自定义模板内容 -const PrefixPlusText = { - props: ['value', 'functions'], - template: ` - - - - - ` -} +// // 自定义模板内容 +// const PrefixPlusText = { +// props: ['value', 'functions'], +// template: ` +// +// +// +// +// ` +// } export default { name: 'InstrumentList', @@ -400,18 +400,6 @@ export default { instrumentId: 0, moveDialogVisible: false, ifMeasure: false - // pickerOptions1: { - // //disabledDate是日期组件的一个方法 - // disabledDate: (time) => { - // //这里就涉及到日期的指定了 setMonth()函数可以设置月份 - // let currentTime = this.value1; - // let threeMonths = currentTime.setMonth(currentTime.getMonth()+3); - // //一开始我没加下面减三个月的那个语句,他的值会一直累加 - // currentTime.setMonth(currentTime.getMonth()-3) - // return time.getTime() < this.value1 || time.getTime() > threeMonths ; - // } - // } - } }, mounted() { @@ -505,7 +493,6 @@ export default { getDicDataListByTypeName({ typeCode: 'use_purpose' }).then(data => { this.usePurposeList = data }) // 预警周期列表 getDicDataListByTypeName({ typeCode: 'verification_cycle' }).then(data => { this.cycleList = data }) - }, // 部门选择回调事件 getDepartmentValue(value) { @@ -541,7 +528,7 @@ export default { // } // return color // }, - getTableRowClassName({ row, rowIndex }) { + getTableRowClassName({ row, rowIndex }) { // row.index = rowIndex const nextTime = new Date(row.checkDate).getTime() const currentTime = new Date().getTime() diff --git a/src/views/ysjl/addJyfa.vue b/src/views/ysjl/addJyfa.vue index 99d9bf7..74a8c5f 100644 --- a/src/views/ysjl/addJyfa.vue +++ b/src/views/ysjl/addJyfa.vue @@ -84,7 +84,9 @@ export default { type: '', jianyanxiangmu: '', userId: '', - templateId: '' + templateId: '', + defaultStatus: false, + jybgTemplateId: '' } } }, @@ -133,6 +135,7 @@ export default { this.dialogVisible = false } } + this.api({ url: '/ysjl/addJyfa', method: 'get', @@ -251,7 +254,7 @@ export default { */ editChild(id, jianyanxiangmu, departmentId, modelId) { this.api({ - url: '/template/getById', + url: '/template', method: 'get', params: { id: modelId