|
@@ -14,7 +14,7 @@
|
|
class="form"
|
|
class="form"
|
|
>
|
|
>
|
|
<el-form-item label="账号" prop="account">
|
|
<el-form-item label="账号" prop="account">
|
|
- <el-input v-model="form.account" placeholder="请输入账号">
|
|
|
|
|
|
+ <el-input disabled v-model="form.account" placeholder="请输入账号">
|
|
<template #prefix>
|
|
<template #prefix>
|
|
<el-icon>
|
|
<el-icon>
|
|
<User />
|
|
<User />
|
|
@@ -53,15 +53,24 @@
|
|
<el-form-item label="角色" prop="role">
|
|
<el-form-item label="角色" prop="role">
|
|
<el-col :span="24" class="role"> {{ getRole(form.role) }}</el-col>
|
|
<el-col :span="24" class="role"> {{ getRole(form.role) }}</el-col>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-col :span="24" class="button">
|
|
|
|
+ <el-button type="primary" @click="submitForm(ruleFormRef)">保存</el-button>
|
|
|
|
+ </el-col>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-row v-if="form.info">
|
|
|
|
- <el-col :span="24" class="one_1"> 个人基本资料</el-col>
|
|
|
|
- <el-col :span="24" class="one_2"> 11111 </el-col>
|
|
|
|
|
|
+ <el-row v-if="form.type">
|
|
|
|
+ <el-col :span="24" class="one_1"> 基本资料</el-col>
|
|
|
|
+ <el-col :span="24" class="one_2">
|
|
|
|
+ <expert v-if="form.type == '1'"></expert>
|
|
|
|
+ <company v-if="form.type == '2'"></company>
|
|
|
|
+ <incubator v-if="form.type == '3'"></incubator>
|
|
|
|
+ <competition v-if="form.type == '4'"></competition>
|
|
|
|
+ <investment v-if="form.type == '5'"></investment>
|
|
|
|
+ <association v-if="form.type == '6'"></association>
|
|
|
|
+ <state v-if="form.type == '7'"></state>
|
|
|
|
+ <unit v-if="form.type == '8'"></unit>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-col :span="24" class="button">
|
|
|
|
- <el-button type="primary" @click="submitForm(ruleFormRef)">保存</el-button>
|
|
|
|
- </el-col>
|
|
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -71,8 +80,16 @@
|
|
<script setup>
|
|
<script setup>
|
|
// API 引用
|
|
// API 引用
|
|
import { getCity } from '@/utils/city'
|
|
import { getCity } from '@/utils/city'
|
|
-import { get } from 'lodash-es'
|
|
|
|
-
|
|
|
|
|
|
+import { cloneDeep, get } from 'lodash-es'
|
|
|
|
+// 组件
|
|
|
|
+import association from './parts/association.vue'
|
|
|
|
+import company from './parts/company.vue'
|
|
|
|
+import competition from './parts/competition.vue'
|
|
|
|
+import expert from './parts/expert.vue'
|
|
|
|
+import incubator from './parts/incubator.vue'
|
|
|
|
+import state from './parts/state.vue'
|
|
|
|
+import unit from './parts/unit.vue'
|
|
|
|
+import investment from './parts/investment.vue'
|
|
// 接口
|
|
// 接口
|
|
import { UserStore } from '@/store/user'
|
|
import { UserStore } from '@/store/user'
|
|
const userStore = UserStore()
|
|
const userStore = UserStore()
|
|
@@ -87,6 +104,8 @@ const $checkRes = inject('$checkRes')
|
|
// 加载中
|
|
// 加载中
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const form = ref({})
|
|
const form = ref({})
|
|
|
|
+// 表单验证
|
|
|
|
+const ruleFormRef = ref()
|
|
const validatePhoneNumber = (rule, value, callback) => {
|
|
const validatePhoneNumber = (rule, value, callback) => {
|
|
const reg = /^1[3-9]\d{9}$/
|
|
const reg = /^1[3-9]\d{9}$/
|
|
if (!value) {
|
|
if (!value) {
|
|
@@ -127,6 +146,7 @@ const search = async () => {
|
|
if (user.value._id) {
|
|
if (user.value._id) {
|
|
let res = await store.fetch(user.value._id)
|
|
let res = await store.fetch(user.value._id)
|
|
if (res.errcode == '0') form.value = res.data
|
|
if (res.errcode == '0') form.value = res.data
|
|
|
|
+ form.value.type = '1'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const searchOther = async () => {
|
|
const searchOther = async () => {
|
|
@@ -177,6 +197,20 @@ const getRole = (data) => {
|
|
return list.join(',')
|
|
return list.join(',')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+// provide
|
|
|
|
+provide('cloneDeep', cloneDeep)
|
|
|
|
+provide('ruleFormRef ', ruleFormRef)
|
|
|
|
+// 字典
|
|
|
|
+provide('genderList', genderList)
|
|
|
|
+provide('fieldList', fieldList)
|
|
|
|
+provide('educationList', educationList)
|
|
|
|
+provide('cityList', cityList)
|
|
|
|
+provide('isUseList', isUseList)
|
|
|
|
+provide('patternList', patternList)
|
|
|
|
+provide('scaleList', scaleList)
|
|
|
|
+provide('IndustryList', IndustryList)
|
|
|
|
+provide('cardTypeList', cardTypeList)
|
|
|
|
+provide('contributionList', contributionList)
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.main {
|
|
.main {
|