|
@@ -1,9 +1,15 @@
|
|
|
<template>
|
|
|
<div id="detail">
|
|
|
- <data-form :fields="fields" :data="data" @save="toSave" returns="/adminCenter/expert">
|
|
|
+ <data-form :fields="fields" :data="data" @save="toSave" returns="/adminCenter/expert" submitText="审核">
|
|
|
+ <template #radios="{ item }">
|
|
|
+ <template v-if="item.model === 'status'">
|
|
|
+ <el-radio v-for="(i, index) in statusList" :key="`status-${index}`" :label="i.value">{{ i.label }}</el-radio>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
<template #custom="{ item }">
|
|
|
<template v-if="item.model === 'img_path'">
|
|
|
- <e-upload url="/files/cysci/expert_image/upload" :limit="1" v-model="data[item.model]"></e-upload>
|
|
|
+ <!-- <e-upload url="/files/cysci/expert_image/upload" :limit="1" v-model="data[item.model]"></e-upload> -->
|
|
|
+ <img v-for="(i, index) in data[item.model]" :key="`icon-${index}`" :src="i.url" width="150px" height="150px" />
|
|
|
</template>
|
|
|
</template>
|
|
|
</data-form>
|
|
@@ -11,6 +17,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+const { status } = require('@common/dict/index');
|
|
|
const _ = require('lodash');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: expert } = createNamespacedHelpers('expert');
|
|
@@ -24,26 +31,28 @@ export default {
|
|
|
img_path: [],
|
|
|
},
|
|
|
fields: [
|
|
|
- { label: '姓名', model: 'name' },
|
|
|
- { label: '电话号码', model: 'phone', options: { maxLength: 11 } },
|
|
|
- { label: '地址', model: 'addr' },
|
|
|
- { label: '办公电话', model: 'office_phone' },
|
|
|
- { label: '所属行业', model: 'profession' },
|
|
|
- { label: '最高学历', model: 'education' },
|
|
|
- { label: '毕业院校', model: 'school' },
|
|
|
- { label: '出生日期', model: 'birthDate', type: 'date' },
|
|
|
- { label: 'qq&微信', model: 'qqwx' },
|
|
|
- { label: '邮箱', model: 'email' },
|
|
|
- { label: '单位名称', model: 'company' },
|
|
|
- { label: '职务职称', model: 'zwzc' },
|
|
|
- { label: '擅长领域', model: 'expertise' },
|
|
|
+ { label: '姓名', model: 'name', type: 'text' },
|
|
|
+ { label: '电话号码', model: 'phone', options: { maxLength: 11 }, type: 'text' },
|
|
|
+ { label: '地址', model: 'addr', type: 'text' },
|
|
|
+ { label: '办公电话', model: 'office_phone', type: 'text' },
|
|
|
+ { label: '所属行业', model: 'profession', type: 'text' },
|
|
|
+ { label: '最高学历', model: 'education', type: 'text' },
|
|
|
+ { label: '毕业院校', model: 'school', type: 'text' },
|
|
|
+ { label: '出生日期', model: 'birthDate', type: 'date', type: 'text' },
|
|
|
+ { label: 'qq&微信', model: 'qqwx', type: 'text' },
|
|
|
+ { label: '邮箱', model: 'email', type: 'text' },
|
|
|
+ { label: '单位名称', model: 'company', type: 'text' },
|
|
|
+ { label: '职务职称', model: 'zwzc', type: 'text' },
|
|
|
+ { label: '擅长领域', model: 'expertise', type: 'text' },
|
|
|
{ label: '头像图片', model: 'img_path', custom: true },
|
|
|
- { label: '工作经历', model: 'workexperience', type: 'textarea', options: { maxRows: 5, minRows: 3 } },
|
|
|
- { label: '科研综述', model: 'scientific', type: 'textarea', options: { maxRows: 5, minRows: 3 } },
|
|
|
- { label: '承担项目', model: 'undertakingproject' },
|
|
|
- { label: '科技奖励', model: 'scienceaward' },
|
|
|
- { label: '社会任职', model: 'social' },
|
|
|
+ { label: '工作经历', model: 'workexperience', type: 'textarea', options: { maxRows: 5, minRows: 3 }, type: 'text' },
|
|
|
+ { label: '科研综述', model: 'scientific', type: 'textarea', options: { maxRows: 5, minRows: 3 }, type: 'text' },
|
|
|
+ { label: '承担项目', model: 'undertakingproject', type: 'text' },
|
|
|
+ { label: '科技奖励', model: 'scienceaward', type: 'text' },
|
|
|
+ { label: '社会任职', model: 'social', type: 'text' },
|
|
|
+ { label: '账号状态', model: 'status', type: 'radio' },
|
|
|
],
|
|
|
+ statusList: status,
|
|
|
};
|
|
|
},
|
|
|
created() {
|