Commit c46dc64f authored by wangxl's avatar wangxl

4444444

parent aa137b34
...@@ -47,11 +47,11 @@ export default { ...@@ -47,11 +47,11 @@ export default {
return { return {
rules: { rules: {
personName: [{ required: true, message: '*', trigger: 'blur' },], personName: [{ required: true, message: '*', trigger: 'blur' },],
nation: [{ required: false, message: '*', trigger: 'change' }], nation: [{ required: true, message: '*', trigger: 'change' }],
title: [{ required: false, message: '*', trigger: 'change' }], title: [{ required: true, message: '*', trigger: 'change' }],
spec: [{ required: false, message: '*', trigger: 'change' }], spec: [{ required: true, message: '*', trigger: 'change' }],
degree: [{ required: false, message: '*', trigger: 'change' }], degree: [{ required: true, message: '*', trigger: 'change' }],
duty: [{ required: false, message: '*', trigger: 'blur' }], duty: [{ required: true, message: '*', trigger: 'blur' }],
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' },],
...@@ -77,12 +77,13 @@ export default { ...@@ -77,12 +77,13 @@ export default {
let par = { ...pars } let par = { ...pars }
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('load', false) this.$emit('load', false)
}).catch(() => { this.$emit('load', false) }) }).catch(() => { this.$emit('load', false) })
} else { } else {
return false; this.$message.warn('信息未填写完全!')
return false
} }
}); });
}, },
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import infoEdit from '@/views/basicSetting/person/components/infoEdit' import infoEdit from '@/views/basicSetting/person/components/infoEdit'
export default { export default {
name: "unitEdit", name: "personInfoEdit",
components: { components: {
infoEdit infoEdit
}, },
......
<template> <template>
<div class="app-content"> <div class="app-content">
<div class="card-left border-style"> <div style="min-width:910px;width:100%;height: 100%;">
<div class="holder-photo"><img alt="" src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png"> <div class="card-left border-style">
<div class="holder-name"> <div class="holder-photo"><img alt="" src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png">
<!-- <a title="修改" style="text-decoration:none;" href="#">[修改]</a> --> <div class="holder-name">
</div>
</div>
<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 title="修改" style="text-decoration:none;" href="#">[修改]</a> -->
</a-col> </div>
</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-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>
<div v-show="tabsActive=='1'"> <div class="holder-info">
<info-edit :formData.sync="formData" @load="onLoad" ref="infoEdit" /> <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-row>
<a-col style="text-align: center;width:100%;"> <a-col :span="6" class="title">
<a-button type="primary" style="width:80px;" @click="submit">保存</a-button> 证件号
</a-col>
<a-col :span="18">
{{personInfo.certId}}
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
</a-spin> </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'">
<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>
</div>
</a-spin>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -125,8 +127,8 @@ export default { ...@@ -125,8 +127,8 @@ export default {
this.$api.person.getUserInfo().then(({ data = {} }) => { this.$api.person.getUserInfo().then(({ data = {} }) => {
if (data) { if (data) {
this.personInfo = data this.personInfo = data
Object.assign(this.formData, data)
this.personInfo.birthday = moment(this.personInfo.birthday).format('YYYY-MM-DD') this.personInfo.birthday = moment(this.personInfo.birthday).format('YYYY-MM-DD')
this.getCurrentPersonInfo()
} }
}).catch(() => { }) }).catch(() => { })
}, },
...@@ -135,10 +137,8 @@ export default { ...@@ -135,10 +137,8 @@ export default {
}, },
onLoad (value) { onLoad (value) {
this.loading = value this.loading = value
this.personInfo.email=this.formData.email
}, },
getCurrentPersonInfo () {
Object.assign(this.personInfo, this.formData)
}
} }
} }
</script> </script>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import infoEdit from '@/views/basicSetting/person/components/infoEdit' import infoEdit from '@/views/basicSetting/person/components/infoEdit'
export default { export default {
name: "unitEdit", name: "unitInfoEdit",
components: { components: {
infoEdit infoEdit
}, },
......
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