Commit 51c85aee authored by wangxl's avatar wangxl

222

parent f6332c83
......@@ -102,7 +102,7 @@ export const routes = [
meta: { title: '单位设置', icon: 'el-icon-user' },
hidden: false,
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>
<div>
<a-form-model ref="form" :model="formData" :rules="rules">
<a-form-model-item label="姓 名" prop="personName">
<a-input v-model="formData.personName" :maxLength="30" style="width:180px;" />
</a-form-model-item>
<a-form-model-item label="民 族" prop="nation">
<para-select v-model="formData.nation" :width="180" :typeId="11" />
</a-form-model-item>
<a-form-model-item label="职 称" prop="title">
<para-multi-select :width="180" v-model="formData.title" :typeId="7" />
</a-form-model-item>
<a-form-model-item label="专 业" prop="spec">
<para-multi-select :width="180" v-model="formData.spec" :typeId="57" />
</a-form-model-item>
<a-form-model-item label="学 位" prop="degree">
<para-select v-model="formData.degree" :width="180" :typeId="9" />
</a-form-model-item>
<a-form-model-item label="职 务" prop="duty">
<a-input v-model="formData.duty" :maxLength="30" style="width:180px;" />
</a-form-model-item>
<a-form-model-item label="联系电话" prop="telephone">
<a-input v-model="formData.telephone" :maxLength="30" style="width:180px;" />
</a-form-model-item>
<a-form-model-item label="传 真" prop="fax">
<a-input v-model="formData.fax" :maxLength="30" style="width:180px;" />
</a-form-model-item>
<a-form-model-item label="邮 箱" prop="email">
<a-input v-model="formData.email" :maxLength="30" style="width:180px;" />
</a-form-model-item>
<a-form-model-item label="通讯地址" prop="address">
<a-input v-model="formData.address" :maxLength="60" style="width:180px;" />
</a-form-model-item>
<div class="per_edit">
<a-form-model ref="form" :model="formData" :rules="rules" class="from-table">
<a-row>
<a-col :span="4" class="bg-gray">
<div class="required">姓 名</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="unitName">
<a-input v-model="formData.personName" placeholder="姓 名" 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="nation">
<para-select v-model="formData.nation" :typeId="11" :width="180" />
</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="title">
<para-multi-select :width="180" v-model="formData.title" :typeId="7" />
</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="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>
</div>
</template>
......@@ -42,7 +108,7 @@ import { isEmptyParams, hideIdCard, hidePhone, checkEmail } from "@/views/utils/
export default {
name: "infoEdit",
components: {
},
data () {
return {
......@@ -56,7 +122,8 @@ export default {
telephone: [{ required: true, message: '*', trigger: 'blur' },],
fax: [{ 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 {
this.$api.person.updatePerson(par).then(({ data = {} }) => {
if (data) {
this.$message.success('成功!')
this.$emit('sub', true)
}
this.$emit('load', false)
}).catch(() => { this.$emit('load', false) })
} else {
this.$message.warn('信息未填写完全!')
this.$message.error('信息未填写完全!')
return false
}
});
......@@ -93,66 +161,4 @@ export default {
}
</script>
<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>
\ No newline at end of file
<template>
<div class="app-content" style="height:100%;overflow:auto;">
<div style="height: calc(100% - 32px);overflow:auto;margin-top: 16px;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<info-edit :formData.sync="formData" @load="onLoad" ref="infoEdit" />
<a-row>
<a-col style="text-align: center;width:100%;">
<a-button type="primary" style="width:80px;" @click="submit">保存</a-button>
</a-col>
</a-row>
</a-spin>
</div>
<div class="app-content" style="height:480px;overflow:auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<info-edit :formData.sync="formData" @load="onLoad" @sub="save" ref="infoEdit" />
<a-row>
<a-col style="text-align: center;width:100%;margin-top: 12px;">
<a-button type="primary" style="width:80px;" @click="submit">提交</a-button>
</a-col>
</a-row>
</a-spin>
</div>
</template>
<script>
import { getType, getComplete, setComplete } from '@/views/utils/auth'
import infoEdit from '@/views/basicSetting/person/components/infoEdit'
export default {
......@@ -41,19 +40,18 @@ export default {
}
},
created () {
this.getCurrentUnitInfo()
this.getAppPersonInfo()
},
methods: {
getCurrentUnitInfo () {
getAppPersonInfo () {
this.loading = true
this.$api.unit.getCurrentUnitInfo().then(({ data = {} }) => {
this.$api.person.getAppPersonInfo().then(({ data = {} }) => {
if (data) {
this.formData = data
this.formData = data.person
setComplete(data.isComplete)
}
this.loading = false
}).catch(() => {
this.loading = false
})
}).catch(() => { this.loading = false })
},
submit () {
this.$refs.infoEdit.submit()
......@@ -61,6 +59,9 @@ export default {
onLoad (value) {
this.loading = value
},
save (value) {
this.$emit('sub', value)
},
}
}
</script>
\ No newline at end of file
......@@ -186,24 +186,6 @@ export default {
min-width: 600px;
min-height: 200px;
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>
......@@ -7,7 +7,7 @@
</a-col>
<a-col :span="20">
<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-col>
</a-row>
......@@ -27,7 +27,7 @@
</a-col>
<a-col :span="20">
<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-col>
</a-row>
......@@ -101,7 +101,7 @@
<div class="special-middle">
<div>
<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>
</div>
</div>
......
......@@ -15,7 +15,7 @@
<script>
import infoEdit from '@/views/basicSetting/person/components/infoEdit'
import infoEdit from '@/views/basicSetting/unit/components/infoEdit'
export default {
name: "unitInfoEdit",
......
This diff is collapsed.
......@@ -156,8 +156,8 @@
<a-col :span="21">
<div class="special-middle">
<div>
<a-form-model-item>
<div>{{ formData.address }}</div>
<a-form-model-item prop="address">
<a-input v-model="formData.address" :maxLength="100" style="width: 80%;" />
</a-form-model-item>
</div>
</div>
......@@ -460,7 +460,7 @@
<a-row type="flex">
<a-col :span="24">
<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>
</a-col>
</a-row>
......@@ -596,6 +596,7 @@ export default {
},
rules: {
jobTime: [{ required: true, message: '请填写每年工作时间(月)', trigger: 'blur' },],
address: [{ required: true, message: '请填写个人通讯地址', trigger: 'blur' },],
mainResearchAreas: [{ required: true, message: '请填写主要研究领域', trigger: 'blur' },],
unitLinkName: [{ 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