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;" />
<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-form-model-item label="民 族" prop="nation">
<para-select v-model="formData.nation" :width="180" :typeId="11" />
</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-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" />
</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" />
</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" />
</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-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-form-model-item label="传 真" prop="fax">
<a-input v-model="formData.fax" :maxLength="30" style="width:180px;" />
</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-form-model-item label="邮 箱" prop="email">
<a-input v-model="formData.email" :maxLength="30" style="width:180px;" />
</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-form-model-item label="通讯地址" prop="address">
<a-input v-model="formData.address" :maxLength="60" style="width:180px;" />
</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>
......@@ -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;">
<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" ref="infoEdit" />
<info-edit :formData.sync="formData" @load="onLoad" @sub="save" 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 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>
</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",
......
<template>
<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-item>
<a-input placeholder="项目名称" v-model="searchForm.projName" :maxLength="100" style="width: 180px" />
......@@ -126,7 +47,6 @@
</template>
</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} 条`" />
</div>
<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>
</a-modal>
......@@ -139,6 +59,9 @@
<a-modal v-model="projectKPIView" title="查看项目KPI" width="80%" :dialog-style="{ top: '10%' }" :footer="null" destroyOnClose>
<project-kpi></project-kpi>
</a-modal>
<a-modal v-model="visiblePersonEdit" v-if="visiblePersonEdit" title="请先完善个人信息!" width="700px" :dialog-style="{ top: '12%' }" :footer="null" destroyOnClose>
<person-info-edit @sub="personSave" />
</a-modal>
</div>
</template>
......@@ -151,29 +74,17 @@ import projectEdit from '@/views/report/project/components/projectEdit'
import projectEditKey from "@/views/report/project/components/keyProject/projectEdit"
import projectView from '@/views/report/project/components/projectView'
import previewFile from '@/views/components/common/previewFile'
import personInfoEdit from '@/views/basicSetting/person/index'
import axios from 'axios'
export default {
name: 'reportProject',
components: {
projectView, projectCreate, projectEdit,previewFile, projectEditKey
projectView, projectCreate, projectEdit, previewFile, projectEditKey, personInfoEdit
},
data () {
return {
load: false, //判断是否查询信息完整状态
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',
form: this.$form.createForm(this, { name: 'advanced_search' }),
activekey: '1',
......@@ -218,35 +129,21 @@ export default {
realurl: null,
visibleFileView: false,
projectKPIView: false,
visiblePersonEdit: false,
}
},
created () {
this.getUserState()
this.getYear()
if (getType() == "1")
this.realurl = this.url1
else
this.realurl = this.url2
},
methods: {
getUserState () {
if (this.isComplete) {
this.load = true
this.getYear()
}
else {
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(() => { })
personSave (value) {
setComplete(true)
this.isComplete = true
this.visiblePersonEdit = false
},
getYear () {
this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => {
......@@ -303,27 +200,14 @@ export default {
this.pagination.pageSize = pageSize
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 () {
if (this.isComplete) {
this.id = null
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) {
if (value === 'submit') {
......
......@@ -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