|
@@ -8,26 +8,39 @@
|
|
|
@submit.native.prevent>
|
|
|
<el-row :gutter="26">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="名称" prop="name">
|
|
|
- <el-input v-model="inputForm.name" placeholder="请输入名称"></el-input>
|
|
|
+ <el-form-item label="职称名称" prop="name">
|
|
|
+ <el-select size="default" v-model="inputForm.name" placeholder="请选择职称名称"
|
|
|
+ style="width: 100%;">
|
|
|
+ <el-option v-for="item in $dictUtils.getDictList('professional_certificate')"
|
|
|
+ :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="掌握程度" prop="proficiency">
|
|
|
- <el-input v-model="inputForm.proficiency" placeholder="请输入掌握程度"></el-input>
|
|
|
+ <el-form-item label="职称等级" prop="proficiency">
|
|
|
+ <el-input v-model="inputForm.proficiency" placeholder="请输入职称等级"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="种类" prop="category">
|
|
|
- <el-input v-model="inputForm.category" placeholder="请输入种类"></el-input>
|
|
|
+ <el-form-item label="取得日期" prop="obtainDate">
|
|
|
+ <el-date-picker v-model="inputForm.obtainDate" type="date" placeholder="请选择取得日期"
|
|
|
+ style="width: 100%;">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="使用时间(月)" prop="usageTime">
|
|
|
- <el-input v-model="inputForm.usageTime" placeholder="请输入使用时间(月)"></el-input>
|
|
|
+ <el-form-item label="取得途径" prop="category">
|
|
|
+ <el-input v-model="inputForm.category" placeholder="请输入取得途径"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="审批单位" prop="usageTime">
|
|
|
+ <el-input v-model="inputForm.usageTime" placeholder="请输入审批单位"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
@@ -75,16 +88,29 @@ export default {
|
|
|
loading: false,
|
|
|
inputForm: {
|
|
|
id: "",
|
|
|
- name: '', // 名称
|
|
|
- proficiency: '', // 掌握程度
|
|
|
- category: '', // 种类
|
|
|
- usageTime: '', // 使用时间
|
|
|
+ name: '',
|
|
|
+ proficiency: '',
|
|
|
+ category: '',
|
|
|
+ obtainDate: "",
|
|
|
+ usageTime: '',
|
|
|
files: []
|
|
|
},
|
|
|
keyWatch: '',
|
|
|
rules: {
|
|
|
name: [
|
|
|
- { required: true, message: '请输入名称', trigger: 'blur' }
|
|
|
+ { required: true, message: '请输入职称名称', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ proficiency: [
|
|
|
+ { required: true, message: '请输入职称等级', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ category: [
|
|
|
+ { required: true, message: '请输入取得途径', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ obtainDate: [
|
|
|
+ { required: true, message: '请输入取得日期', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ usageTime: [
|
|
|
+ { required: true, message: '请输入审批单位', trigger: 'blur' }
|
|
|
],
|
|
|
},
|
|
|
fileType: ['jpg', 'jpeg', 'png', 'webp'],
|
|
@@ -139,10 +165,11 @@ export default {
|
|
|
this.method = method
|
|
|
this.inputForm = {
|
|
|
id: "",
|
|
|
- name: '', // 名称
|
|
|
- proficiency: '', // 掌握程度
|
|
|
- category: '', // 种类
|
|
|
- usageTime: '', // 使用时间
|
|
|
+ name: '',
|
|
|
+ proficiency: '',
|
|
|
+ category: '',
|
|
|
+ obtainDate: "",
|
|
|
+ usageTime: '',
|
|
|
files: []
|
|
|
}
|
|
|
if (method === 'add') {
|
|
@@ -162,11 +189,11 @@ export default {
|
|
|
if (!this.inputForm.files) {
|
|
|
this.inputForm.files = []
|
|
|
}
|
|
|
- this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', null, null, null, null, null, [...this.fileType])
|
|
|
+ this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', 50, null, null, null, null, [...this.fileType])
|
|
|
this.loading = false
|
|
|
} else {
|
|
|
this.inputForm.id = this.generateFallbackId()
|
|
|
- this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', null, null, null, null, null, [...this.fileType])
|
|
|
+ this.$refs.upLoadComponent.newUpload(method, this.inputForm.files, 'skill', 50, null, null, null, null, [...this.fileType])
|
|
|
this.loading = false
|
|
|
}
|
|
|
})
|
|
@@ -178,6 +205,7 @@ export default {
|
|
|
}
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
+ this.inputForm.obtainDate = new Date(this.inputForm.obtainDate).getTime(); // 转为时间戳
|
|
|
this.inputForm.files = this.$refs.upLoadComponent.getDataList()
|
|
|
this.$emit("addSkillInfo", JSON.parse(JSON.stringify(this.inputForm)))
|
|
|
this.close()
|