Commit 51c85aee authored by wangxl's avatar wangxl

222

parent f6332c83
...@@ -102,7 +102,7 @@ export const routes = [ ...@@ -102,7 +102,7 @@ export const routes = [
meta: { title: '单位设置', icon: 'el-icon-user' }, meta: { title: '单位设置', icon: 'el-icon-user' },
hidden: false, hidden: false,
children: [ children: [
{ path: '/unit/info', name: '单位基础信息设置', component: () => import('@/views/basicSetting/unit/index.vue'), meta: { title: '个人设置', icon: '', noCache: true } }, { path: '/unit/info', name: '单位基础信息设置', component: () => import('@/views/basicSetting/unit/index.vue'), meta: { title: '单位基础信息设置', icon: '', noCache: true } },
] ]
}, },
{ {
......
<template> <template>
<div> <div class="per_edit">
<a-form-model ref="form" :model="formData" :rules="rules"> <a-form-model ref="form" :model="formData" :rules="rules" class="from-table">
<a-form-model-item label="姓 名" prop="personName"> <a-row>
<a-input v-model="formData.personName" :maxLength="30" style="width:180px;" /> <a-col :span="4" class="bg-gray">
</a-form-model-item> <div class="required">姓 名</div>
<a-form-model-item label="民 族" prop="nation"> </a-col>
<para-select v-model="formData.nation" :width="180" :typeId="11" /> <a-col :span="20">
</a-form-model-item> <a-form-model-item prop="unitName">
<a-form-model-item label="职 称" prop="title"> <a-input v-model="formData.personName" placeholder="姓 名" style="width:360px" />
<para-multi-select :width="180" v-model="formData.title" :typeId="7" /> </a-form-model-item>
</a-form-model-item> </a-col>
<a-form-model-item label="专 业" prop="spec"> </a-row>
<para-multi-select :width="180" v-model="formData.spec" :typeId="57" /> <a-row>
</a-form-model-item> <a-col :span="4" class="bg-gray">
<a-form-model-item label="学 位" prop="degree"> <div class="required">民 族</div>
<para-select v-model="formData.degree" :width="180" :typeId="9" /> </a-col>
</a-form-model-item> <a-col :span="20">
<a-form-model-item label="职 务" prop="duty"> <a-form-model-item prop="nation">
<a-input v-model="formData.duty" :maxLength="30" style="width:180px;" /> <para-select v-model="formData.nation" :typeId="11" :width="180" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="联系电话" prop="telephone"> </a-col>
<a-input v-model="formData.telephone" :maxLength="30" style="width:180px;" /> </a-row>
</a-form-model-item> <a-row>
<a-form-model-item label="传 真" prop="fax"> <a-col :span="4" class="bg-gray">
<a-input v-model="formData.fax" :maxLength="30" style="width:180px;" /> <div class="required">职 称</div>
</a-form-model-item> </a-col>
<a-form-model-item label="邮 箱" prop="email"> <a-col :span="20">
<a-input v-model="formData.email" :maxLength="30" style="width:180px;" /> <a-form-model-item prop="title">
</a-form-model-item> <para-multi-select :width="180" v-model="formData.title" :typeId="7" />
<a-form-model-item label="通讯地址" prop="address"> </a-form-model-item>
<a-input v-model="formData.address" :maxLength="60" style="width:180px;" /> </a-col>
</a-form-model-item> </a-row>
<a-row>
<a-col :span="4" class="bg-gray">
<div class="required">专 业</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="spec">
<para-multi-select :width="180" v-model="formData.spec" :typeId="57" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="4" class="bg-gray">
<div class="required">学 位</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="degree">
<para-select v-model="formData.degree" :width="180" :typeId="9" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="4" class="bg-gray">
<div class="required">职 务</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="duty">
<a-input v-model="formData.duty" placeholder="职 务" :maxLength="30" style="width:360px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="4" class="bg-gray">
<div class="required">邮 箱</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="email">
<a-input v-model="formData.email" placeholder="邮 箱" style="width:360px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="4" class="bg-gray">
<div>通讯地址</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="address">
<a-input v-model="formData.address" placeholder="通讯地址" style="width:360px" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div>主要研究领域</div>
</div>
</a-col>
<a-col :span="20">
<div class="special-middle">
<div>
<a-form-model-item prop="mainResearchAreas">
<a-textarea placeholder="主要研究领域" v-model="formData.mainResearchAreas" :maxLength="300" style="width: 360px; height: 80px; margin-top: 4px" />
</a-form-model-item>
</div>
</div>
</a-col>
</a-row>
</a-form-model> </a-form-model>
</div> </div>
</template> </template>
...@@ -42,7 +108,7 @@ import { isEmptyParams, hideIdCard, hidePhone, checkEmail } from "@/views/utils/ ...@@ -42,7 +108,7 @@ import { isEmptyParams, hideIdCard, hidePhone, checkEmail } from "@/views/utils/
export default { export default {
name: "infoEdit", name: "infoEdit",
components: { components: {
}, },
data () { data () {
return { return {
...@@ -56,7 +122,8 @@ export default { ...@@ -56,7 +122,8 @@ export default {
telephone: [{ required: true, message: '*', trigger: 'blur' },], telephone: [{ required: true, message: '*', trigger: 'blur' },],
fax: [{ required: true, message: '*', trigger: 'blur' },], fax: [{ required: true, message: '*', trigger: 'blur' },],
email: [{ required: true, message: '*', trigger: 'blur' },], email: [{ required: true, message: '*', trigger: 'blur' },],
address: [{ required: true, message: '*', trigger: 'blur' },], address: [{ required: false, message: '*', trigger: 'blur' },],
mainResearchAreas: [{ required: false, message: '*', trigger: 'blur' },],
}, },
} }
}, },
...@@ -80,11 +147,12 @@ export default { ...@@ -80,11 +147,12 @@ export default {
this.$api.person.updatePerson(par).then(({ data = {} }) => { this.$api.person.updatePerson(par).then(({ data = {} }) => {
if (data) { if (data) {
this.$message.success('成功!') this.$message.success('成功!')
this.$emit('sub', true)
} }
this.$emit('load', false) this.$emit('load', false)
}).catch(() => { this.$emit('load', false) }) }).catch(() => { this.$emit('load', false) })
} else { } else {
this.$message.warn('信息未填写完全!') this.$message.error('信息未填写完全!')
return false return false
} }
}); });
...@@ -93,66 +161,4 @@ export default { ...@@ -93,66 +161,4 @@ export default {
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.app-content {
padding: 10px 8px 10px 8px;
min-width: 920px;
.border-style {
border-radius: 4px;
border: 1px solid #e6ebf5;
background-color: #ffffff;
overflow: hidden;
color: #303133;
-webkit-transition: 0.3s;
transition: 0.3s;
}
.card-left {
float: left;
width: 300px;
height: 600px;
margin-right: 6px;
.holder-photo {
margin: 20px 0px 10px 0px;
text-align: center;
}
.holder-photo > img {
width: 104px;
height: 104px;
margin-bottom: 10px;
}
.holder-info {
padding: 0px 10px 0px 10px;
.ant-row .ant-col {
padding: 3px 5px 3px 5px;
}
}
.title {
text-align: right;
}
}
.card-right {
float: left;
width: calc(100% - 320px);
min-width: 600px;
min-height: 200px;
padding: 0px 15px 15px 15px;
.ant-form-item {
margin-bottom: 0px;
}
::v-deep .ant-row {
.ant-col {
display: inline-block;
}
.ant-form-item-label {
width: 70px;
}
.ant-form-item-control-wrapper {
width: calc(100% - 70px);
}
.ant-form-explain {
margin-left: 5px;
display: inline-block;
}
}
}
}
</style> </style>
\ No newline at end of file
<template> <template>
<div class="app-content" style="height:100%;overflow:auto;"> <div class="app-content" style="height:480px;overflow:auto;">
<div style="height: calc(100% - 32px);overflow:auto;margin-top: 16px;"> <a-spin :spinning="loading" style="width: 100%;height: 100%;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;"> <info-edit :formData.sync="formData" @load="onLoad" @sub="save" ref="infoEdit" />
<info-edit :formData.sync="formData" @load="onLoad" ref="infoEdit" /> <a-row>
<a-row> <a-col style="text-align: center;width:100%;margin-top: 12px;">
<a-col style="text-align: center;width:100%;"> <a-button type="primary" style="width:80px;" @click="submit">提交</a-button>
<a-button type="primary" style="width:80px;" @click="submit">保存</a-button> </a-col>
</a-col> </a-row>
</a-row> </a-spin>
</a-spin>
</div>
</div> </div>
</template> </template>
<script> <script>
import { getType, getComplete, setComplete } from '@/views/utils/auth'
import infoEdit from '@/views/basicSetting/person/components/infoEdit' import infoEdit from '@/views/basicSetting/person/components/infoEdit'
export default { export default {
...@@ -41,19 +40,18 @@ export default { ...@@ -41,19 +40,18 @@ export default {
} }
}, },
created () { created () {
this.getCurrentUnitInfo() this.getAppPersonInfo()
}, },
methods: { methods: {
getCurrentUnitInfo () { getAppPersonInfo () {
this.loading = true this.loading = true
this.$api.unit.getCurrentUnitInfo().then(({ data = {} }) => { this.$api.person.getAppPersonInfo().then(({ data = {} }) => {
if (data) { if (data) {
this.formData = data this.formData = data.person
setComplete(data.isComplete)
} }
this.loading = false this.loading = false
}).catch(() => { }).catch(() => { this.loading = false })
this.loading = false
})
}, },
submit () { submit () {
this.$refs.infoEdit.submit() this.$refs.infoEdit.submit()
...@@ -61,6 +59,9 @@ export default { ...@@ -61,6 +59,9 @@ export default {
onLoad (value) { onLoad (value) {
this.loading = value this.loading = value
}, },
save (value) {
this.$emit('sub', value)
},
} }
} }
</script> </script>
\ No newline at end of file
...@@ -186,24 +186,6 @@ export default { ...@@ -186,24 +186,6 @@ export default {
min-width: 600px; min-width: 600px;
min-height: 200px; min-height: 200px;
padding: 0px 15px 15px 15px; padding: 0px 15px 15px 15px;
.ant-form-item {
margin-bottom: 6px;
}
::v-deep .ant-row {
.ant-col {
display: inline-block;
}
.ant-form-item-label {
width: 70px;
}
.ant-form-item-control-wrapper {
width: calc(100% - 70px);
}
.ant-form-explain {
margin-left: 5px;
display: inline-block;
}
}
} }
} }
</style> </style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</a-col> </a-col>
<a-col :span="20"> <a-col :span="20">
<a-form-model-item prop="unitName"> <a-form-model-item prop="unitName">
<a-input v-model="formData.unitName" placeholder="单位名称" style="width:400px" /> <a-input v-model="formData.unitName" placeholder="单位名称" style="width:80%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</a-col> </a-col>
<a-col :span="20"> <a-col :span="20">
<a-form-model-item prop="unitAddress"> <a-form-model-item prop="unitAddress">
<a-input v-model="formData.unitAddress" :maxLength="30" style="width:400px" /> <a-input v-model="formData.unitAddress" :maxLength="30" style="width:80%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<div class="special-middle"> <div class="special-middle">
<div> <div>
<a-form-model-item prop="organizationCode"> <a-form-model-item prop="organizationCode">
<a-input placeholder="组织机构代码/统一社会信用代码" v-model="formData.organizationCode" :maxLength="100" style="width:400px" /> <a-input placeholder="组织机构代码/统一社会信用代码" v-model="formData.organizationCode" :maxLength="100" style="width:80%" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<script> <script>
import infoEdit from '@/views/basicSetting/person/components/infoEdit' import infoEdit from '@/views/basicSetting/unit/components/infoEdit'
export default { export default {
name: "unitInfoEdit", name: "unitInfoEdit",
......
This diff is collapsed.
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
<a-col :span="21"> <a-col :span="21">
<div class="special-middle"> <div class="special-middle">
<div> <div>
<a-form-model-item> <a-form-model-item prop="address">
<div>{{ formData.address }}</div> <a-input v-model="formData.address" :maxLength="100" style="width: 80%;" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
...@@ -460,7 +460,7 @@ ...@@ -460,7 +460,7 @@
<a-row type="flex"> <a-row type="flex">
<a-col :span="24"> <a-col :span="24">
<div style="min-height:34px;line-height: 40px;text-align: center;"> <div style="min-height:34px;line-height: 40px;text-align: center;">
<up-load :isUpload="true" :file.sync="formData" :format="['doc', 'docx']" message="请上传申请书正文"/> <up-load :isUpload="true" :file.sync="formData" :format="['doc', 'docx']" message="请上传申请书正文" />
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
...@@ -596,6 +596,7 @@ export default { ...@@ -596,6 +596,7 @@ export default {
}, },
rules: { rules: {
jobTime: [{ required: true, message: '请填写每年工作时间(月)', trigger: 'blur' },], jobTime: [{ required: true, message: '请填写每年工作时间(月)', trigger: 'blur' },],
address: [{ required: true, message: '请填写个人通讯地址', trigger: 'blur' },],
mainResearchAreas: [{ required: true, message: '请填写主要研究领域', trigger: 'blur' },], mainResearchAreas: [{ required: true, message: '请填写主要研究领域', trigger: 'blur' },],
unitLinkName: [{ required: true, message: '请填写单位联系人', trigger: 'blur' },], unitLinkName: [{ required: true, message: '请填写单位联系人', trigger: 'blur' },],
unitLinkMobile: [{ required: true, message: '请填写联系人电话', trigger: 'blur' },], unitLinkMobile: [{ required: true, message: '请填写联系人电话', trigger: 'blur' },],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment