Commit bae8fb2f authored by 徐俊's avatar 徐俊
parents 6aa88787 9db8a480
...@@ -4,5 +4,5 @@ VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com ...@@ -4,5 +4,5 @@ VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_BASE_API = https://beta-yacper.yiboshi.com VUE_APP_BASE_API = https://beta-yacper.yiboshi.com
VUE_APP_SYSTEM_TITLE = '云南省卫生健康科技项目管理系统' VUE_APP_SYSTEM_TITLE = '云南省卫生健康科技项目管理系统'
VUE_APP_SYSTEM_PROVINCE = '云南省' VUE_APP_SYSTEM_PROVINCE = '云南省'
VUE_APP_SYSTEM_TOP_CODE = '00015' VUE_APP_SYSTEM_TOP_CODE = '00053'
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B' VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
...@@ -4,5 +4,5 @@ VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com ...@@ -4,5 +4,5 @@ VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_BASE_API = https://beta-yacper.yiboshi.com VUE_APP_BASE_API = https://beta-yacper.yiboshi.com
VUE_APP_SYSTEM_TITLE = '云南省卫生健康科技项目管理系统' VUE_APP_SYSTEM_TITLE = '云南省卫生健康科技项目管理系统'
VUE_APP_SYSTEM_PROVINCE = '云南省' VUE_APP_SYSTEM_PROVINCE = '云南省'
VUE_APP_SYSTEM_TOP_CODE = '00015' VUE_APP_SYSTEM_TOP_CODE = '00053'
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B' VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
...@@ -4,5 +4,5 @@ VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com ...@@ -4,5 +4,5 @@ VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_BASE_API = https://beta-yacper.yiboshi.com VUE_APP_BASE_API = https://beta-yacper.yiboshi.com
VUE_APP_SYSTEM_TITLE = '云南省卫生健康科技项目管理系统' VUE_APP_SYSTEM_TITLE = '云南省卫生健康科技项目管理系统'
VUE_APP_SYSTEM_PROVINCE = '云南省' VUE_APP_SYSTEM_PROVINCE = '云南省'
VUE_APP_SYSTEM_TOP_CODE = '00015' VUE_APP_SYSTEM_TOP_CODE = '00053'
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B' VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
...@@ -139,6 +139,9 @@ export default { ...@@ -139,6 +139,9 @@ export default {
getUnitTypes () { getUnitTypes () {
return fetch('/v1/science-admin/com-unit/getUnitType') return fetch('/v1/science-admin/com-unit/getUnitType')
}, },
getAppUnitInfo() {
return fetch('/v1/science-admin/com-unit/getAppUnitInfo')
},
getCurrentUnitInfo() { getCurrentUnitInfo() {
return fetch('/v1/science-admin/com-unit/getCurrentUnitInfo') return fetch('/v1/science-admin/com-unit/getCurrentUnitInfo')
}, },
......
...@@ -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">
<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-form-model-item>
<a-form-model-item label="民 族" prop="nation"> </a-col>
<para-select v-model="formData.nation" :width="180" :typeId="11" /> </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-form-model-item>
<a-form-model-item label="职 称" prop="title"> </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" /> <para-multi-select :width="180" v-model="formData.title" :typeId="7" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="专 业" prop="spec"> </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" /> <para-multi-select :width="180" v-model="formData.spec" :typeId="57" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="学 位" prop="degree"> </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" /> <para-select v-model="formData.degree" :width="180" :typeId="9" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="职 务" prop="duty"> </a-col>
<a-input v-model="formData.duty" :maxLength="30" style="width:180px;" /> </a-row>
</a-form-model-item> <a-row>
<a-form-model-item label="联系电话" prop="telephone"> <a-col :span="4" class="bg-gray">
<a-input v-model="formData.telephone" :maxLength="30" style="width:180px;" /> <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-form-model-item>
<a-form-model-item label="传 真" prop="fax"> </a-col>
<a-input v-model="formData.fax" :maxLength="30" style="width:180px;" /> </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-form-model-item>
<a-form-model-item label="邮 箱" prop="email"> </a-col>
<a-input v-model="formData.email" :maxLength="30" style="width:180px;" /> </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-form-model-item>
<a-form-model-item label="通讯地址" prop="address"> </a-col>
<a-input v-model="formData.address" :maxLength="60" style="width:180px;" /> </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> </a-form-model-item>
</div>
</div>
</a-col>
</a-row>
</a-form-model> </a-form-model>
</div> </div>
</template> </template>
<script> <script>
import { isEmptyParams, hideIdCard, hidePhone, checkEmail } from "@/views/utils/common" import { isEmptyParams, checkEmail, checkPhone, checkIdentitytionId, personBirthday, personGender } from "@/views/utils/common"
export default { export default {
...@@ -55,8 +121,12 @@ export default { ...@@ -55,8 +121,12 @@ export default {
duty: [{ required: true, 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: [
address: [{ required: true, message: '*', trigger: 'blur' },], { required: true, message: '*', trigger: 'blur' },
{ required: true, validator: checkEmail, trigger: 'blur' }
],
address: [{ required: false, message: '*', trigger: 'blur' },],
mainResearchAreas: [{ required: false, message: '*', trigger: 'blur' },],
}, },
} }
}, },
...@@ -80,11 +150,12 @@ export default { ...@@ -80,11 +150,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 +164,4 @@ export default { ...@@ -93,66 +164,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" ref="infoEdit" /> <info-edit :formData.sync="formData" @load="onLoad" @sub="save" ref="infoEdit" />
<a-row> <a-row>
<a-col style="text-align: center;width:100%;"> <a-col style="text-align: center;width:100%;margin-top: 12px;">
<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
...@@ -90,7 +90,7 @@ import infoEdit from '@/views/basicSetting/person/components/infoEdit' ...@@ -90,7 +90,7 @@ import infoEdit from '@/views/basicSetting/person/components/infoEdit'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: 'personInfo', name: 'perInfoEdit',
components: { components: {
infoEdit infoEdit
}, },
...@@ -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,11 +7,11 @@ ...@@ -7,11 +7,11 @@
</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>
<a-row> <!-- <a-row>
<a-col :span="4" class="bg-gray"> <a-col :span="4" class="bg-gray">
<div class="required">单位类型</div> <div class="required">单位类型</div>
</a-col> </a-col>
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
<base-select v-model="formData.unitType" :type="6" :isAll="true" /> <base-select v-model="formData.unitType" :type="6" :isAll="true" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row> -->
<a-row> <a-row>
<a-col :span="4" class="bg-gray"> <a-col :span="4" class="bg-gray">
<div class="required">单位地址</div> <div class="required">单位地址</div>
</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>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</a-col> </a-col>
<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>传真</div>
</div> </div>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
...@@ -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>
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<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>开户银行</div>
</div> </div>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
</a-col> </a-col>
<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>银行账号</div>
</div> </div>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
<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>开户银行地址</div>
</div> </div>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
</a-col> </a-col>
<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>银行联行号</div>
</div> </div>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
...@@ -262,7 +262,7 @@ ...@@ -262,7 +262,7 @@
</template> </template>
<script> <script>
import { isEmptyParams } from "@/views/utils/common" import { isEmptyParams, checkEmail, checkPhone, checkIdentitytionId, personBirthday, personGender } from "@/views/utils/common"
export default { export default {
...@@ -274,12 +274,15 @@ export default { ...@@ -274,12 +274,15 @@ export default {
return { return {
rules: { rules: {
unitName: [{ required: true, message: '*' }], unitName: [{ required: true, message: '*' }],
unitType: [{ required: true, message: '*' }], // unitType: [{ required: true, message: '*' }],
unitAddress: [{ required: true, message: '*' }], unitAddress: [{ required: true, message: '*' }],
linkName: [{ required: true, message: '*' }], linkName: [{ required: true, message: '*' }],
telephone: [{ required: true, message: '*' }], telephone: [{ required: true, message: '*' }],
email: [{ required: true, message: '*' }], email: [
fax: [{ required: true, message: '*' }], { required: true, message: '*', trigger: 'blur' },
{ required: true, validator: checkEmail, trigger: 'blur' }
],
fax: [{ required: false, message: '*' }],
organizationCode: [{ required: true, message: '*', trigger: 'blur' },], organizationCode: [{ 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' },],
...@@ -287,10 +290,10 @@ export default { ...@@ -287,10 +290,10 @@ export default {
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: false, message: '*', trigger: 'blur' },],
bankAccount: [{ required: true, message: '*', trigger: 'blur' },], bankAccount: [{ required: false, message: '*', trigger: 'blur' },],
depositBankAddress: [{ required: true, message: '*', trigger: 'blur' },], depositBankAddress: [{ required: false, message: '*', trigger: 'blur' },],
interbankNumber: [{ required: true, message: '*', trigger: 'blur' },], interbankNumber: [{ required: false, message: '*', trigger: 'blur' },],
// unitName: [{ required: true, message: '请输入单位名称' }], // unitName: [{ required: true, message: '请输入单位名称' }],
// unitType: [{ required: true, message: '请选择单位类型' }], // unitType: [{ required: true, message: '请选择单位类型' }],
...@@ -329,22 +332,23 @@ export default { ...@@ -329,22 +332,23 @@ export default {
submit () { submit () {
//提交单位数据 //提交单位数据
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
// if (valid) { if (valid) {
this.$emit('load', true) this.$emit('load', true)
let pars = isEmptyParams(this.formData) let pars = isEmptyParams(this.formData)
let par = { ...pars } let par = { ...pars }
this.$api.unit.updateUnit(par).then(({ data = {} }) => { this.$api.unit.updateUnit(par).then(({ data = {} }) => {
if (data) { if (data) {
this.$message.success('修改成功!') this.$message.success('修改成功!')
this.$emit('load', false) this.$emit('sub', true)
} }
this.$emit('load', false)
}).catch(() => { }).catch(() => {
this.$emit('load', false) this.$emit('load', false)
}) })
// } else { } else {
// this.$message.warn('信息未填写完全!') this.$message.error('信息未填写完全!')
// return false return false
// } }
}) })
} }
} }
......
<template>
<div class="app-content" style="height: 65vh;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div style="height: calc(100% - 36px);overflow:auto;">
<info-edit :formData.sync="formData" @load="onLoad" @sub="save" ref="infoEdit" />
</div>
<div style="text-align:center;width:100%; height: 36px;">
<a-button type="primary" @click="submit">保存</a-button>
</div>
</a-spin>
</div>
</template>
<script>
import infoEdit from '@/views/basicSetting/unit/components/infoEdit'
import { getUnitComplete, setUnitComplete } from '@/views/utils/auth'
export default {
name: "unitEdit",
components: {
infoEdit
},
data () {
return {
formData: {
id: null,
unitName: null,
unitType: null,
unitAddress: null,
linkName: null,
telephone: null,
email: null,
fax: null,
organizationCode: null,
registeredAddress: null,
postCode: null,
legalPerson: null,
workforce: null,
specializedPersonnel: null,
researchPersonnel: null,
depositBank: null,
bankAccount: null,
depositBankAddress: null,
interbankNumber: null,
},
loading: false
}
},
created () {
this.getAppUnitInfo()
},
methods: {
getAppUnitInfo () {
this.loading = true
this.$api.unit.getAppUnitInfo().then(({ data = {} }) => {
if (data) {
this.formData = data.unit
setUnitComplete(data.isComplete)
}
this.loading = false
}).catch(() => {
this.loading = false
})
},
submit () {
this.$refs.infoEdit.submit()
},
onLoad (value) {
this.loading = value
},
save (value) {
this.$emit('sub', value)
},
}
}
</script>
<style scoped lang="less">
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
...@@ -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",
......
<template>
<a-cascader :options="options" :show-search="{ filter }" :display-render="displayRender" expand-trigger="hover" placeholder="Please select" @change="onChange" />
</template>
<script>
import { specList } from "@/views/components/common/config"
export default {
name: "cascaderSelect",
data () {
return {
options: specList
};
},
created () {
console.log(this.options)
},
methods: {
onChange (value, selectedOptions) {
console.log(value, selectedOptions);
},
displayRender({ labels }) {
return labels[labels.length - 1];
},
filter (inputValue, path) {
return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
},
},
};
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
<span style="line-height:2;">五、请严格遵守各项法律法规和评审纪律,评审工作做到实事求是、客观公正、科学规范、廉洁自律。</span><br /> <span style="line-height:2;">五、请严格遵守各项法律法规和评审纪律,评审工作做到实事求是、客观公正、科学规范、廉洁自律。</span><br />
<span style="line-height:2;">六、此次专家评审时间为:{{exportTime.expertStart + '至' + exportTime.expertEnd}},请务必于{{exportTime.expertEnd}}前提交评审结果。</span><br /> <span style="line-height:2;">六、此次专家评审时间为:{{exportTime.expertStart + '至' + exportTime.expertEnd}},请务必于{{exportTime.expertEnd}}前提交评审结果。</span><br />
<span style="line-height:2;">&nbsp; &nbsp; &nbsp; 再次感谢您对我们工作的大力支持,未尽事宜,另行通知。</span><br /> <span style="line-height:2;">&nbsp; &nbsp; &nbsp; 再次感谢您对我们工作的大力支持,未尽事宜,另行通知。</span><br />
<span style="line-height:2;">&nbsp; &nbsp; &nbsp; 联系电话:{{ unitInfo.linkTel }}</span><br /> <!-- <span style="line-height:2;">&nbsp; &nbsp; &nbsp; 联系电话:{{ unitInfo.linkTel }}</span><br /> -->
<br /> <br />
</div> </div>
<div style="height:40px;width:100%;text-align:center;padding:4px 0px;background: #fafafa;border:1px solid #e8e8e8; "> <div style="height:40px;width:100%;text-align:center;padding:4px 0px;background: #fafafa;border:1px solid #e8e8e8; ">
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
this.getAssignExpertById() this.getAssignExpertById()
this.getYear() this.getYear()
this.countStart() this.countStart()
this.getCurrentUnitInfo() // this.getCurrentUnitInfo()
}, },
methods: { methods: {
moment, moment,
......
...@@ -6,17 +6,22 @@ ...@@ -6,17 +6,22 @@
<dashboard-gov v-if="isGov" /> <dashboard-gov v-if="isGov" />
<dashboard-top v-if="isTop" /> <dashboard-top v-if="isTop" />
<dashboard-admin v-if="isAdmin" /> <dashboard-admin v-if="isAdmin" />
<a-modal v-model="visibleUnitEdit" v-if="visibleUnitEdit" title="请先完善单位信息!" width="70%" :dialog-style="{ top: '12%' }" :footer="null" destroyOnClose :maskClosable="false" :closable="false">
<unit-info-edit @sub="unitSave" />
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import { getUnitComplete, setUnitComplete } from '@/views/utils/auth'
import dashboardPerson from '@/views/home/components/dashboardPerson' import dashboardPerson from '@/views/home/components/dashboardPerson'
import dashboardExpert from '@/views/home/components/dashboardPerson' import dashboardExpert from '@/views/home/components/dashboardPerson'
import dashboardUnit from '@/views/home/components/dashboardUnit' import dashboardUnit from '@/views/home/components/dashboardUnit'
import dashboardGov from '@/views/home/components/dashboardGov' import dashboardGov from '@/views/home/components/dashboardGov'
import dashboardTop from '@/views/home/components/dashboardTop' import dashboardTop from '@/views/home/components/dashboardTop'
import dashboardAdmin from '@/views/home/components/dashboardAdmin' import dashboardAdmin from '@/views/home/components/dashboardAdmin'
import unitInfoEdit from '@/views/basicSetting/unit/edit'
export default { export default {
components: { dashboardPerson, dashboardExpert, dashboardUnit, dashboardGov, dashboardTop, dashboardAdmin }, components: { dashboardPerson, dashboardExpert, dashboardUnit, dashboardGov, dashboardTop, dashboardAdmin, unitInfoEdit },
data () { data () {
return { return {
isTop: false, isTop: false,
...@@ -25,6 +30,8 @@ export default { ...@@ -25,6 +30,8 @@ export default {
isReport: false, isReport: false,
isAdmin: false, isAdmin: false,
isExpert: false, isExpert: false,
isUnitComplete: getUnitComplete(),
visibleUnitEdit: false,
}; };
}, },
created () { created () {
...@@ -36,6 +43,9 @@ export default { ...@@ -36,6 +43,9 @@ export default {
this.isGov = true this.isGov = true
} else if (user.roles.indexOf("2") != -1) { } else if (user.roles.indexOf("2") != -1) {
this.isUnit = true this.isUnit = true
if (!this.isUnitComplete) {
this.visibleUnitEdit = true
}
} else if (user.roles.indexOf("3") != -1) { } else if (user.roles.indexOf("3") != -1) {
this.isReport = true this.isReport = true
} else if (user.roles.indexOf("4") != -1) { } else if (user.roles.indexOf("4") != -1) {
...@@ -46,7 +56,11 @@ export default { ...@@ -46,7 +56,11 @@ export default {
} }
}, },
methods: { methods: {
unitSave () {
setUnitComplete(true)
this.isUnitComplete = true
this.visibleUnitEdit = false
}
}, },
}; };
</script> </script>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<a-form-item> <a-form-item>
<a-button type="primary" icon="search" @click="search">搜索</a-button> <a-button type="primary" icon="search" @click="search">搜索</a-button>
<a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
<cascader-select/>
</a-form-item> </a-form-item>
</a-form> </a-form>
<a-divider style="height: 1px; background-color: #e8e8e8;" /> <a-divider style="height: 1px; background-color: #e8e8e8;" />
...@@ -52,15 +53,12 @@ import { getType } from '@/views/utils/auth' ...@@ -52,15 +53,12 @@ import { getType } from '@/views/utils/auth'
import moment from 'moment' import moment from 'moment'
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"; import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common";
import projectView from '@/views/report/project/components/projectView' import projectView from '@/views/report/project/components/projectView'
import scoreEdit from '@/views/evaluation/components/scoreEdit' import scoreEdit from '@/views/evaluation/components/scoreEdit'
import cascaderSelect from '@/views/components/common/cascaderSelect'
import paraSelect from '@/views/components/common/paraSelect'
import baseSelect from '@/views/components/common/baseSelect'
export default { export default {
name: 'queryProject', name: 'queryProject',
components: { components: {
projectView, scoreEdit, paraSelect, baseSelect projectView, scoreEdit, cascaderSelect
}, },
data () { data () {
return { return {
......
...@@ -87,8 +87,9 @@ import expertView from './components/expertView' ...@@ -87,8 +87,9 @@ import expertView from './components/expertView'
import expertEdit from './components/expertEdit'; import expertEdit from './components/expertEdit';
import expertImport from './components/expertImport'; import expertImport from './components/expertImport';
export default { export default {
name: 'expertManager', name: 'expertReport',
components: { expertView, expertEdit, expertImport }, components: { expertView, expertEdit, expertImport },
data () { data () {
return { return {
......
<template> <template>
<div class="app-content"> <div class="app-content">
<div v-if="load && !isComplete" style="margin-top:12px">
<a-form-model ref="ruleForm" :model="formData" :rules="rules" class="from-table">
<a-row>
<a-col :span="24">
<div class="main-title">
<span>补充人员基本信息</span>
</div>
</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" :width="150" :typeId="11" />
</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="education">
<para-select v-model="formData.education" :width="150" :typeId="8" />
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">学位</div>
</div>
</a-col>
<a-col :span="20">
<a-form-model-item prop="degree">
<para-select v-model="formData.degree" :typeId="9" :width="150" />
</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 v-model="formData.title" :typeId="7" :width="150" />
</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="150" 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="email">
<a-input v-model="formData.email" :maxLength="30" style="width:250px;" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="text-align: center;">
<a-button type="primary" @click="submit">提交</a-button>
</a-col>
</a-row>
</a-form-model>
</div>
<div v-if="load && isComplete">
<a-form :form="form" :model="searchForm" layout="inline" class="search_form"> <a-form :form="form" :model="searchForm" layout="inline" class="search_form">
<a-form-item> <a-form-item>
<a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 180px" /> <a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 180px" />
...@@ -86,9 +7,6 @@ ...@@ -86,9 +7,6 @@
<a-form-item> <a-form-item>
<a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 180px" /> <a-input placeholder="项目编号" v-model="searchForm.projNo" :maxLength="100" style="width: 180px" />
</a-form-item> </a-form-item>
<a-form-item>
<knowledge-select v-model="searchForm.knowledgeId"></knowledge-select>
</a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" icon="search" @click="search">搜索</a-button> <a-button type="primary" icon="search" @click="search">搜索</a-button>
<a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button> <a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
...@@ -129,19 +47,21 @@ ...@@ -129,19 +47,21 @@
</template> </template>
</a-table> </a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
</div>
<a-modal v-model="visibleEdit" v-if="visibleEdit" title="项目创建/修改" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false"> <a-modal v-model="visibleEdit" v-if="visibleEdit" title="项目创建/修改" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<project-create v-model="id" @close="closeWindow"></project-create> <project-create v-model="id" @close="closeWindow"></project-create>
</a-modal> </a-modal>
<a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false"> <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<project-view v-model="id" @close="closeWindow"></project-view> <project-view v-model="id" @close="closeWindow"></project-view>
</a-modal> </a-modal>
<a-modal v-model="visibleFileView" title="查看" width="1000px" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose> <a-modal v-model="visibleFileView" title="查看" width="1000px" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose :maskClosable="false">
<preview-file v-model="realurl.downloadUrl" :fileName="realurl.fileName"></preview-file> <preview-file v-model="realurl.downloadUrl" :fileName="realurl.fileName"></preview-file>
</a-modal> </a-modal>
<a-modal v-model="projectKPIView" title="查看项目KPI" width="80%" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose> <a-modal v-model="projectKPIView" title="查看项目KPI" width="80%" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose :maskClosable="false">
<project-kpi></project-kpi> <project-kpi></project-kpi>
</a-modal> </a-modal>
<a-modal v-model="visiblePersonEdit" v-if="visiblePersonEdit" title="请先完善个人信息!" width="700px" :dialog-style="{ top: '12%' }" :footer="null" destroyOnClose :maskClosable="false">
<person-info-edit @sub="personSave" />
</a-modal>
</div> </div>
</template> </template>
...@@ -155,29 +75,18 @@ import projectEditKey from "@/views/report/project/components/keyProject/project ...@@ -155,29 +75,18 @@ import projectEditKey from "@/views/report/project/components/keyProject/project
import projectView from '@/views/report/project/components/projectView' import projectView from '@/views/report/project/components/projectView'
import previewFile from '@/views/components/common/previewFile' import previewFile from '@/views/components/common/previewFile'
import knowledgeSelect from '@/views/components/common/knowledgeSelect' import knowledgeSelect from '@/views/components/common/knowledgeSelect'
import personInfoEdit from '@/views/basicSetting/person/index'
import axios from 'axios' import axios from 'axios'
export default { export default {
name: 'reportProject', name: 'reportProject',
components: { components: {
projectView, projectCreate, projectEdit,previewFile, projectEditKey, knowledgeSelect projectView, projectCreate, projectEdit,previewFile, projectEditKey, knowledgeSelect, personInfoEdit
}, },
data () { data () {
return { return {
load: false, //判断是否查询信息完整状态
isComplete: getComplete(), isComplete: getComplete(),
formData: { id: null, nation: null, title: null, education: null, degree: null, spec: null, email: null, sex: null, birthday: null },
rules: {
nation: [{ required: true, message: '请选择民族', trigger: 'change' }],
title: [{ required: true, message: '请选择职称', trigger: 'change' }],
education: [{ required: true, message: '请选择学历', trigger: 'change' }],
degree: [{ required: true, message: '请选择学位', trigger: 'change' }],
spec: [{ required: true, message: '请选择专业', trigger: 'change' }],
email: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{ required: true, validator: checkEmail, trigger: 'blur' }
],
},
size: 'small', size: 'small',
form: this.$form.createForm(this, { name: 'advanced_search' }), form: this.$form.createForm(this, { name: 'advanced_search' }),
activekey: '1', activekey: '1',
...@@ -222,35 +131,23 @@ export default { ...@@ -222,35 +131,23 @@ export default {
realurl: null, realurl: null,
visibleFileView: false, visibleFileView: false,
projectKPIView: false, projectKPIView: false,
visiblePersonEdit: false,
} }
}, },
created () { created () {
this.getUserState() this.getYear()
if (getType() == "1") if (getType() == "1")
this.realurl = this.url1 this.realurl = this.url1
else else
this.realurl = this.url2 this.realurl = this.url2
}, },
methods: { methods: {
getUserState () { personSave (value) {
if (this.isComplete) { setComplete(true)
this.load = true this.isComplete = true
this.getYear() this.visiblePersonEdit = false
} this.id = null
else { this.visibleEdit = true
this.getAppPersonInfo()
}
},
getAppPersonInfo () {
this.$api.person.getAppPersonInfo().then(({ data = {} }) => {
if (data) {
this.load = true
this.formData = data.person
setComplete(data.isComplete)
this.isComplete = data.isComplete
this.getYear()
}
}).catch(() => { })
}, },
getYear () { getYear () {
this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => { this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => {
...@@ -308,27 +205,14 @@ export default { ...@@ -308,27 +205,14 @@ export default {
this.pagination.pageSize = pageSize this.pagination.pageSize = pageSize
this.getListByPage() this.getListByPage()
}, },
submit () {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let pars = isEmptyParams(this.formData)
let par = { ...pars }
this.$api.person.updatePerson(par).then(({ data = {} }) => {
if (data) {
this.$message.success('提交成功!')
setComplete(true)
this.isComplete = true
}
}).catch(() => { })
} else {
return false
}
});
},
createProject () { createProject () {
if (this.isComplete) {
this.id = null this.id = null
this.visibleEdit = true this.visibleEdit = true
//this.$store.commit('app/addCard', { title: '项目创建', key: '1299', code: 'projectCreate', keepAlive: 1, router: '/project/create', closable: true }) }
else {
this.visiblePersonEdit = true
}
}, },
closeWindow (value) { closeWindow (value) {
if (value === 'submit') { if (value === 'submit') {
......
...@@ -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' },],
......
...@@ -50,3 +50,20 @@ export function setComplete (value) { ...@@ -50,3 +50,20 @@ export function setComplete (value) {
} }
} }
export function getUnitComplete () {
let state = false
let user = window.sessionStorage.getItem('user')
if (user)
state = JSON.parse(user).unitComplete
return state
}
export function setUnitComplete (value) {
let user = window.sessionStorage.getItem('user')
if (user) {
let obj = JSON.parse(user)
obj.unitComplete = value
window.sessionStorage.setItem('user', JSON.stringify(obj))
}
}
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