Commit d623f059 authored by wangxl's avatar wangxl

22222

parent 2803a089
<template> <template>
<div class="app-content"> <div class="app-content" style="height:100%;overflow:auto;">
<div class="card-left border-style"> <div style="height: calc(100% - 32px);overflow:auto;margin-top: 16px;">
<div class="holder-photo"><img alt="" src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png"> <a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div class="holder-name"> <info-edit :formData.sync="formData" @load="onLoad" ref="infoEdit" />
<!-- <a title="修改" style="text-decoration:none;" href="#">[修改]</a> --> <a-row style="text-align: center;margin-top: 6px;">
</div> <a-col :span="24">
</div> <a-button type="primary" @click="submit">保存</a-button>
<div class="holder-info">
<a-row>
<a-col :span="6" class="title">
邮 箱
</a-col>
<a-col :span="18">
{{personInfo.email}}
</a-col>
</a-row>
<a-row>
<a-col :span="6" class="title">
手机号
</a-col>
<a-col :span="18">
{{personInfo.mobile}}
<!-- <a title="修改" style="text-decoration:none;" href="#">[修改]</a> -->
</a-col>
</a-row>
<a-divider dashed />
<a-row>
<a-col :span="6" class="title">
姓 名
</a-col>
<a-col :span="18">
{{personInfo.personName}}
</a-col>
</a-row>
<a-row>
<a-col :span="6" class="title">
性 别
</a-col>
<a-col :span="18">
{{personInfo.sex}}
</a-col>
</a-row>
<a-row>
<a-col :span="6" class="title">
生 日
</a-col>
<a-col :span="18">
{{personInfo.birthday}}
</a-col>
</a-row>
<a-row>
<a-col :span="6" class="title">
证件号
</a-col>
<a-col :span="18">
{{personInfo.certId}}
</a-col> </a-col>
</a-row> </a-row>
</div>
</div>
<div class="card-right border-style">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<a-tabs :activeKey="tabsActive" @tabClick="tabclick">
<a-tab-pane key="1" tab="设置">
</a-tab-pane>
<a-tab-pane key="2" tab="消息" force-render>
</a-tab-pane>
</a-tabs>
<div v-show="tabsActive!='1'">
<a-empty />
</div>
<div v-show="tabsActive=='1'">
<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="education">
<para-select v-model="formData.education" :width="180" :typeId="8" />
</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="email">
<a-input v-model="formData.email" :maxLength="30" style="width:180px;" />
</a-form-model-item>
<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-form-model>
</div>
</a-spin> </a-spin>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { isEmptyParams, hideIdCard, hidePhone, checkEmail } from "@/views/utils/common"
import paraMultiSelect from '@/views/components/common/paraMultiSelect' import infoEdit from '@/views/basicSetting/unit/components/infoEdit'
import paraSelect from '@/views/components/common/paraSelect'
import moment from 'moment'
export default { export default {
name: 'personInfo', name: "unitEdit",
components: { components: {
paraMultiSelect, paraSelect infoEdit
}, },
data () { data () {
return { return {
tabsActive: '1',
personInfo: {
id: null, certId: null, personName: null, sex: null, birthday: null, nation: null, title: null, education: null, spec: null, mobile: null, email: null,
},
formData: { formData: {
id: null, personName: null, nation: null, title: null, education: null, spec: null, email: null, id: null,
}, unitName: null,
rules: { unitType: null,
personName: [{ required: true, message: '请输入姓名', trigger: 'blur' },], unitAddress: null,
nation: [{ required: false, message: '请选择民族', trigger: 'change' }], linkName: null,
title: [{ required: false, message: '请选择职称', trigger: 'change' }], telephone: null,
education: [{ required: false, message: '请选择学历', trigger: 'change' }], email: null,
spec: [{ required: false, message: '请选择专业', trigger: 'change' }], fax: null,
email: [{ required: false, validator: checkEmail, trigger: 'blur' }], organizationCode: null,
registeredAddress: null,
postCode: null,
legalPerson: null,
workforce: null,
specializedPersonnel: null,
researchPersonnel: null,
depositBank: null,
bankAccount: null,
depositBankAddress: null,
interbankNumber: null,
}, },
loading: false loading: false
} }
}, },
created () { created () {
this.getUserInfo() this.getCurrentUnitInfo()
}, },
methods: { methods: {
moment, getCurrentUnitInfo () {
tabclick (key) { this.loading = true
this.tabsActive = key this.$api.unit.getCurrentUnitInfo().then(({ data = {} }) => {
},
getUserInfo () {
this.$api.person.getUserInfo().then(({ data = {} }) => {
if (data) { if (data) {
this.personInfo = data this.formData = data
this.personInfo.birthday = moment(this.personInfo.birthday).format('YYYY-MM-DD')
this.initformData()
} }
}).catch(() => { }) this.loading = false
}).catch(() => {
this.loading = false
})
}, },
submit () { submit () {
this.$refs.form.validate(valid => { this.$refs.infoEdit.submit()
if (valid) {
this.loading = true
let pars = isEmptyParams(this.formData)
let par = { ...pars }
this.$api.person.updatePerson(par).then(({ data = {} }) => {
if (data) {
this.$message.success('修改成功!')
this.getCurrentPersonInfo()
}
this.loading = false
}).catch(() => { this.loading = false })
} else {
return false;
}
});
}, },
initformData () { onLoad (value) {
this.formData = { this.loading = value
id: this.personInfo.id,
personName: this.personInfo.personName,
nation: this.personInfo.nation,
title: this.personInfo.title,
education: this.personInfo.education,
spec: this.personInfo.spec,
email: this.personInfo.email,
}
}, },
getCurrentPersonInfo () {
Object.assign(this.personInfo, this.formData)
}
}
}
</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: 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> </script>
\ No newline at end of file
This diff is collapsed.
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<!-- <a-row type="flex"> <a-row type="flex">
<a-col :span="4" class="bg-gray"> <a-col :span="4" class="bg-gray">
<div class="special-middle"> <div class="special-middle">
<div class="required">法定代表人</div> <div class="required">法定代表人</div>
...@@ -165,9 +165,9 @@ ...@@ -165,9 +165,9 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</div> </div>
</a-col> </a-col>
</a-row> --> </a-row>
<!-- <a-row type="flex"> <a-row type="flex">
<a-col :span="4" class="bg-gray"> <a-col :span="4" class="bg-gray">
<div class="special-middle"> <div class="special-middle">
<div class="required">开户银行</div> <div class="required">开户银行</div>
...@@ -196,8 +196,8 @@ ...@@ -196,8 +196,8 @@
</div> </div>
</div> </div>
</a-col> </a-col>
</a-row> --> </a-row>
<!-- <a-row type="flex"> <a-row type="flex">
<a-col :span="4" class="bg-gray"> <a-col :span="4" class="bg-gray">
<div class="special-middle"> <div class="special-middle">
<div class="required">开户银行地址</div> <div class="required">开户银行地址</div>
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
</div> </div>
</div> </div>
</a-col> </a-col>
</a-row> --> </a-row>
<!-- <a-row type="flex"> <!-- <a-row type="flex">
<a-col :span="4" class="bg-gray"> <a-col :span="4" class="bg-gray">
<div class="special-middle"> <div class="special-middle">
...@@ -772,14 +772,14 @@ export default { ...@@ -772,14 +772,14 @@ export default {
address: [{ required: true, message: '请填写通讯地址', trigger: 'blur' },], address: [{ required: true, message: '请填写通讯地址', trigger: 'blur' },],
registeredAddress: [{ required: true, message: '请填写注册所在地', trigger: 'blur' },], registeredAddress: [{ required: true, message: '请填写注册所在地', trigger: 'blur' },],
postCode: [{ required: true, message: '请填写邮编', trigger: 'blur' },], postCode: [{ required: true, message: '请填写邮编', trigger: 'blur' },],
// legalPerson: [{ required: true, message: '请填写法定代表人', trigger: 'blur' },], legalPerson: [{ required: true, message: '请填写法定代表人', trigger: 'blur' },],
// workforce: [{ required: true, message: '请填写职工总数', trigger: 'blur' },], workforce: [{ required: true, message: '请填写职工总数', trigger: 'blur' },],
// specializedPersonnel: [{ required: true, message: '请填写其中专科以上人员', trigger: 'blur' },], specializedPersonnel: [{ required: true, message: '请填写其中专科以上人员', trigger: 'blur' },],
// researchPersonnel: [{ required: true, message: '请填写研究开发人员', trigger: 'blur' },], researchPersonnel: [{ required: true, message: '请填写研究开发人员', trigger: 'blur' },],
// depositBank: [{ required: true, message: '请填写开户银行', trigger: 'blur' },], depositBank: [{ required: true, message: '请填写开户银行', trigger: 'blur' },],
// bankAccount: [{ required: true, message: '请填写银行账号', trigger: 'blur' },], bankAccount: [{ required: true, message: '请填写银行账号', trigger: 'blur' },],
// depositBankAddress: [{ required: false, message: '请填写开户银行地址', trigger: 'blur' },], depositBankAddress: [{ required: true, message: '请填写开户银行地址', trigger: 'blur' },],
// interbankNumber: [{ required: false, message: '请填写开户银行地址', trigger: 'blur' },], interbankNumber: [{ required: true, message: '请填写开户银行地址', trigger: 'blur' },],
// researchTotal: [{ required: true, message: '请填写上年度研发经费支出总额', trigger: 'blur' },], // researchTotal: [{ required: true, message: '请填写上年度研发经费支出总额', trigger: 'blur' },],
// isResearchActive: [{ required: true, message: '请选择上年度是否填报了研发活动情况', trigger: 'change' },], // isResearchActive: [{ required: true, message: '请选择上年度是否填报了研发活动情况', trigger: 'change' },],
// researchCount: [{ required: true, message: '请填写上一年度填报的研发投入总数', trigger: 'blur' },], // researchCount: [{ required: true, message: '请填写上一年度填报的研发投入总数', trigger: 'blur' },],
......
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
.header_btn { .header_btn {
position: absolute; position: absolute;
top: 0px; top: 0px;
right: 20px; right: 10px;
text-align: right; text-align: right;
max-width: 350px; max-width: 350px;
line-height: 46px; line-height: 46px;
......
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