Compare commits

...

2 Commits

  1. 44
      src/views/certificate/index.vue
  2. 33
      src/views/device_management/index.vue
  3. 7
      src/views/ysjl/addJyfa.vue

44
src/views/certificate/index.vue

@ -34,7 +34,7 @@
</el-form-item> </el-form-item>
<el-form-item label="学历:" prop="education"> <el-form-item label="学历:" prop="education">
<el-select v-model="form.education" placeholder="填写学历"> <el-select v-model="form.education" placeholder="填写学历">
<el-option v-for="item in educationDicList" :key="item.id" :label="item.name" :value="item.value" /> <el-option v-for="item in educationDicList" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="专业:" prop="major"> <el-form-item label="专业:" prop="major">
@ -42,7 +42,7 @@
</el-form-item> </el-form-item>
<el-form-item label="职称:" prop="certificateName"> <el-form-item label="职称:" prop="certificateName">
<el-select v-model="form.certificateName" placeholder="填写职称"> <el-select v-model="form.certificateName" placeholder="填写职称">
<el-option v-for="item in certificateNameDicList" :key="item.id" :label="item.name" :value="item.value" /> <el-option v-for="item in certificateNameDicList" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="级别/项目/代号:" prop="levelList"> <el-form-item label="级别/项目/代号:" prop="levelList">
@ -59,7 +59,7 @@
</el-form-item> </el-form-item>
<el-form-item label="备注:" prop="remarks"> <el-form-item label="备注:" prop="remarks">
<el-select v-model="form.remarks" placeholder="填写备注"> <el-select v-model="form.remarks" placeholder="填写备注">
<el-option v-for="item in remarksDicList" :key="item.id" :label="item.name" :value="item.value" /> <el-option v-for="item in remarksDicList" :key="item.id" :label="item.name" :value="item.code" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -139,9 +139,9 @@ export default {
colConfigs: [ colConfigs: [
{ prop: 'username', label: '姓名', align: 'center', width: 50 }, { prop: 'username', label: '姓名', align: 'center', width: 50 },
{ prop: 'identificationNum', label: '身份证号码', align: 'center' }, { prop: 'identificationNum', label: '身份证号码', align: 'center' },
{ prop: 'education', label: '学历', align: 'center', width: 50 }, { prop: 'education', label: '学历', align: 'center', width: 50, formatter: this.formatterDicData },
{ prop: 'major', label: '专业', align: 'center' }, { prop: 'major', label: '专业', align: 'center', formatter: this.formatterDicDataMajor },
{ prop: 'certificateName', label: '职称', align: 'center', width: 60 }, { prop: 'certificateName', label: '职称', align: 'center', width: 60, formatter: this.formatterDicDataJob },
{ prop: 'level', label: '级别', align: 'center', width: 50 }, { prop: 'level', label: '级别', align: 'center', width: 50 },
{ prop: 'project', label: '项目', align: 'center' }, { prop: 'project', label: '项目', align: 'center' },
{ prop: 'code', label: '代号', align: 'center', width: 50 }, { prop: 'code', label: '代号', align: 'center', width: 50 },
@ -152,7 +152,7 @@ export default {
} }
}, },
{ prop: 'renewalDate', label: '发换证日期', align: 'center', width: 50 }, { 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' } { slot: 'operation' }
], ],
permission: { permission: {
@ -312,6 +312,36 @@ export default {
this.dialogVisible = false this.dialogVisible = false
downloadFile(data, parseTime(new Date()) + '-' + this.crud.title + '数据', 'xlsx') 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
} }
} }
} }

33
src/views/device_management/index.vue

@ -299,16 +299,16 @@ const defaultForm = form({
checkDate: '' checkDate: ''
}) })
// // //
const PrefixPlusText = { // const PrefixPlusText = {
props: ['value', 'functions'], // props: ['value', 'functions'],
template: ` // template: `
<el-tag v-if="functions(value) === '在用'" effect="dark"><span v-html="functions(value)"></span></el-tag> // <el-tag v-if="functions(value) === ''" effect="dark"><span v-html="functions(value)"></span></el-tag>
<el-tag v-else-if="functions(value) === ''" type="danger" effect="dark"><span v-html="functions(value)"></span></el-tag> // <el-tag v-else-if="functions(value) === ''" type="danger" effect="dark"><span v-html="functions(value)"></span></el-tag>
<el-tag v-else-if="functions(value) === '报废'" type="warning" effect="dark"><span v-html="functions(value)"></span></el-tag> // <el-tag v-else-if="functions(value) === ''" type="warning" effect="dark"><span v-html="functions(value)"></span></el-tag>
<el-tag v-else type="info" effect="dark"><span v-html="functions(value)"></span></el-tag> // <el-tag v-else type="info" effect="dark"><span v-html="functions(value)"></span></el-tag>
` // `
} // }
export default { export default {
name: 'InstrumentList', name: 'InstrumentList',
@ -400,18 +400,6 @@ export default {
instrumentId: 0, instrumentId: 0,
moveDialogVisible: false, moveDialogVisible: false,
ifMeasure: 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() { mounted() {
@ -505,7 +493,6 @@ export default {
getDicDataListByTypeName({ typeCode: 'use_purpose' }).then(data => { this.usePurposeList = data }) getDicDataListByTypeName({ typeCode: 'use_purpose' }).then(data => { this.usePurposeList = data })
// //
getDicDataListByTypeName({ typeCode: 'verification_cycle' }).then(data => { this.cycleList = data }) getDicDataListByTypeName({ typeCode: 'verification_cycle' }).then(data => { this.cycleList = data })
}, },
// //
getDepartmentValue(value) { getDepartmentValue(value) {

7
src/views/ysjl/addJyfa.vue

@ -84,7 +84,9 @@ export default {
type: '', type: '',
jianyanxiangmu: '', jianyanxiangmu: '',
userId: '', userId: '',
templateId: '' templateId: '',
defaultStatus: false,
jybgTemplateId: ''
} }
} }
}, },
@ -133,6 +135,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
} }
} }
this.api({ this.api({
url: '/ysjl/addJyfa', url: '/ysjl/addJyfa',
method: 'get', method: 'get',
@ -251,7 +254,7 @@ export default {
*/ */
editChild(id, jianyanxiangmu, departmentId, modelId) { editChild(id, jianyanxiangmu, departmentId, modelId) {
this.api({ this.api({
url: '/template/getById', url: '/template',
method: 'get', method: 'get',
params: { params: {
id: modelId id: modelId

Loading…
Cancel
Save