|
@@ -6,16 +6,10 @@
|
|
|
<cSearch :is_back="true" @toBack="toBack"></cSearch>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="two">
|
|
|
- <cForm :span="24" :fields="formFields" :form="form" :rules="rules" @save="onSubmit" :disabled="disabled">
|
|
|
- <template #type>
|
|
|
- <el-option v-for="(i, index) in typeList" :key="index" :label="i.label" :value="i.value"></el-option>
|
|
|
- </template>
|
|
|
+ <cForm :span="12" :fields="formFields" :form="form" :rules="rules" @save="onSubmit" :disabled="disabled" :isSave="!disabled">
|
|
|
<template #code>
|
|
|
<el-option v-for="(i, index) in codeList" :key="index" :label="i.label" :value="i.value"></el-option>
|
|
|
</template>
|
|
|
- <template #password>
|
|
|
- <el-input v-model="form.password" placeholder="请输入密码" :disabled="form._id ? true : false" show-password></el-input>
|
|
|
- </template>
|
|
|
<template #area>
|
|
|
<el-option v-for="(i, index) in areaList" :key="index" :label="i.label" :value="i.value"></el-option>
|
|
|
</template>
|
|
@@ -56,16 +50,14 @@ let form: Ref<any> = ref({});
|
|
|
let roleList: Ref<any> = ref([]);
|
|
|
let statusList: Ref<any> = ref([]);
|
|
|
let codeList: Ref<any> = ref([]);
|
|
|
-let typeList: Ref<any> = ref([{ label: '专家', value: '6' }]);
|
|
|
let areaList: Ref<any> = ref([]);
|
|
|
let personalList: Ref<any> = ref([]);
|
|
|
let disabled: Ref<any> = ref(false);
|
|
|
// 表单
|
|
|
let formFields: Ref<any[]> = ref([
|
|
|
- { label: '用户类型', model: 'type', type: 'select', options: { disabled: true } },
|
|
|
{ label: '邀请码', model: 'code', type: 'select' },
|
|
|
{ label: '账号', model: 'account' },
|
|
|
- { label: '密码', model: 'password', custom: true },
|
|
|
+ { label: '密码', model: 'password', type: 'password' },
|
|
|
{ label: '名称', model: 'name' },
|
|
|
{ label: '手机号', model: 'phone' },
|
|
|
{ label: '电子邮箱', model: 'email' },
|
|
@@ -80,8 +72,8 @@ let formFields: Ref<any[]> = ref([
|
|
|
{ label: '最高学历', model: 'education' },
|
|
|
{ label: '所学专业', model: 'major' },
|
|
|
{ label: '单位名称', model: 'company' },
|
|
|
- { label: '职务职称', model: 'zwzc' },
|
|
|
{ label: '头像图片', model: 'icon', custom: true },
|
|
|
+ { label: '职务职称', model: 'zwzc' },
|
|
|
{ label: '擅长领域', model: 'expertise' },
|
|
|
{ label: '工作经历', model: 'workexperience' },
|
|
|
{ label: '科研综述', model: 'scientific' },
|
|
@@ -105,6 +97,7 @@ onMounted(async () => {
|
|
|
});
|
|
|
const search = async () => {
|
|
|
if (route.query.id) {
|
|
|
+ formFields.value = formFields.value.filter((i) => i.model != 'password');
|
|
|
let res: IQueryResult = await expert.fetch(route.query.id);
|
|
|
if (res.errcode == 0) form.value = res.data as {};
|
|
|
} else form.value = { type: '6', status: '1' };
|