Commit 09a707b4 authored by wangxl's avatar wangxl

7777

parent d05850d8
...@@ -9,13 +9,9 @@ const state = { ...@@ -9,13 +9,9 @@ const state = {
tabsArray: [], tabsArray: [],
tabsActive: '', tabsActive: '',
cachedViews: [], cachedViews: [],
isComplete: false,
projType: null, projType: null,
} }
const mutations = { const mutations = {
setComplete: (state, payload) => {
state.isComplete = payload
},
setTabsActive: (state, payload) => { setTabsActive: (state, payload) => {
state.tabsActive = payload state.tabsActive = payload
}, },
......
...@@ -20,7 +20,6 @@ const actions = { ...@@ -20,7 +20,6 @@ const actions = {
try { try {
window.sessionStorage.setItem('user', JSON.stringify(data.userInfo)) window.sessionStorage.setItem('user', JSON.stringify(data.userInfo))
window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList)) window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList))
this.commit('app/setComplete', data.complete)
this.commit('app/initStore', [data.menuList[0].id]) this.commit('app/initStore', [data.menuList[0].id])
resolve(data) resolve(data)
} catch (error) { } catch (error) {
......
...@@ -36,22 +36,9 @@ ...@@ -36,22 +36,9 @@
</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} 条`" />
<a-modal v-model="visibleEdit" :title="'项目修改'" :width="'86%'" :dialog-style="{ top: '20px' }" :maskClosable="false" :footer="null" destroyOnClose> <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<project-edit v-model="id" @close="closeWindow"></project-edit> <project-view v-model="id" @close="closeWindow"></project-view>
</a-modal> </a-modal>
<!-- <a-modal v-model="visibleView" :title="'项目查看'" :width="'80%'" :dialog-style="{ top: '20px' }" destroyOnClose>
<template slot="footer">
<a-button type="primary" @click="() => visibleView = false">
确定
</a-button>
</template>
<project-view v-model="id"></project-view>
</a-modal> -->
<s-modal title="项目详情" v-model="visibleView" v-if="visibleView">
<div slot="content">
<project-view v-model="id" @close="() => this.visibleView = false"></project-view>
</div>
</s-modal>
</div> </div>
</template> </template>
...@@ -60,7 +47,6 @@ import { getType } from '@/views/utils/auth' ...@@ -60,7 +47,6 @@ 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 projectEdit from '@/views/report/project/components/projectEdit'
import paraSelect from '@/views/components/common/paraSelect' import paraSelect from '@/views/components/common/paraSelect'
import baseSelect from '@/views/components/common/baseSelect' import baseSelect from '@/views/components/common/baseSelect'
export default { export default {
...@@ -91,7 +77,6 @@ export default { ...@@ -91,7 +77,6 @@ export default {
loading: false, loading: false,
// 弹窗标志 // 弹窗标志
visibleView: false, visibleView: false,
visibleEdit: false,
id: null, id: null,
loadState: false loadState: false
} }
...@@ -140,18 +125,19 @@ export default { ...@@ -140,18 +125,19 @@ export default {
this.getListByPage() this.getListByPage()
}, },
closeWindow (value) { closeWindow (value) {
if (value === 'view') if (value === 'submit') {
this.visibleView = false this.getListByPage()
else } else if (value === 'save') {
this.getListByPage()
} else if (value === 'error') {
this.id = null
this.visibleView = false this.visibleView = false
}
}, },
recordClick (record, type) { recordClick (record, type) {
if (type === 'view') { if (type === 'view') {
this.id = record.id this.id = record.id
this.visibleView = true this.visibleView = true
} else if (type === 'edit') {
this.id = record.id
this.visibleEdit = true
} }
}, },
exportData () { exportData () {
......
<template> <template>
<div class="app-content"> <div class="app-content">
<div v-if="loadState && !isComplete" style="margin-top:12px"> <div v-if="load && !isComplete" style="margin-top:12px">
<a-form-model ref="ruleForm" :model="formData" :rules="rules" class="from-table"> <a-form-model ref="ruleForm" :model="formData" :rules="rules" class="from-table">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div class="tb-title"> <div class="main-title">
<span>补充人员基本信息</span> <span>补充人员基本信息</span>
</div> </div>
</a-col> </a-col>
...@@ -29,13 +29,25 @@ ...@@ -29,13 +29,25 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </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-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="title"> <a-form-model-item prop="title">
<para-multi-select :width="150" v-model="formData.title" :typeId="7" /> <para-multi-select v-model="formData.title" :typeId="7" :width="150" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -45,7 +57,7 @@ ...@@ -45,7 +57,7 @@
</a-col> </a-col>
<a-col :span="20"> <a-col :span="20">
<a-form-model-item prop="spec"> <a-form-model-item prop="spec">
<para-multi-select :width="150" v-model="formData.spec" :typeId="42" /> <para-multi-select :width="150" v-model="formData.spec" :typeId="57" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -66,7 +78,7 @@ ...@@ -66,7 +78,7 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
</div> </div>
<div v-if="loadState && isComplete"> <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" />
...@@ -131,7 +143,7 @@ ...@@ -131,7 +143,7 @@
</template> </template>
<script> <script>
import { getType } from '@/views/utils/auth' import { getType, getComplete, setComplete } from '@/views/utils/auth'
import moment from 'moment' import moment from 'moment'
import { isEmptyParams, filterExportExcelData, tableColumnsName, checkEmail, personGender, personBirthday, checkImageFileType, checkDocumentFileType } from "@/views/utils/common" import { isEmptyParams, filterExportExcelData, tableColumnsName, checkEmail, personGender, personBirthday, checkImageFileType, checkDocumentFileType } from "@/views/utils/common"
import paraMultiSelect from '@/views/components/common/paraMultiSelect' import paraMultiSelect from '@/views/components/common/paraMultiSelect'
...@@ -150,15 +162,15 @@ export default { ...@@ -150,15 +162,15 @@ export default {
}, },
data () { data () {
return { return {
loadState: false, //判断是否查询信息完整状态 load: false, //判断是否查询信息完整状态
isComplete: false, isComplete: getComplete(),
formData: { id: null, nation: null, title: null, education: null, spec: null, email: null, sex: null, birthday: null }, formData: { id: null, nation: null, title: null, education: null, degree: null, spec: null, email: null, sex: null, birthday: null },
rules: { rules: {
nation: [{ required: true, message: '请选择民族', trigger: 'change' }], nation: [{ required: true, message: '请选择民族', trigger: 'change' }],
title: [{ required: true, message: '请选择职称', trigger: 'change' }], title: [{ required: true, message: '请选择职称', trigger: 'change' }],
education: [{ required: true, message: '请选择学历', trigger: 'change' }], education: [{ required: true, message: '请选择学历', trigger: 'change' }],
degree: [{ required: true, message: '请选择学位', trigger: 'change' }],
spec: [{ required: true, message: '请选择专业', trigger: 'change' }], spec: [{ required: true, message: '请选择专业', trigger: 'change' }],
// mobile: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
email: [ email: [
{ required: true, message: '请输入邮箱', trigger: 'blur' }, { required: true, message: '请输入邮箱', trigger: 'blur' },
{ required: true, validator: checkEmail, trigger: 'blur' } { required: true, validator: checkEmail, trigger: 'blur' }
...@@ -220,16 +232,15 @@ export default { ...@@ -220,16 +232,15 @@ export default {
}, },
created () { created () {
this.getUserState() this.getUserState()
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 () { getUserState () {
this.isComplete = this.$store.state.app.isComplete
if (this.isComplete) { if (this.isComplete) {
this.loadState = true this.load = true
this.getYear() this.getYear()
} }
else { else {
...@@ -239,10 +250,10 @@ export default { ...@@ -239,10 +250,10 @@ export default {
getAppPersonInfo () { getAppPersonInfo () {
this.$api.person.getAppPersonInfo().then(({ data = {} }) => { this.$api.person.getAppPersonInfo().then(({ data = {} }) => {
if (data) { if (data) {
this.load = true
this.formData = data.person this.formData = data.person
this.loadState = true setComplete(data.isComplete)
this.isComplete = data.isComplete this.isComplete = data.isComplete
this.$store.commit('app/setComplete', data.isComplete)
this.getYear() this.getYear()
} }
}).catch(() => { }) }).catch(() => { })
...@@ -310,7 +321,7 @@ export default { ...@@ -310,7 +321,7 @@ 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.$store.commit('app/setComplete', true) setComplete(true)
this.isComplete = true this.isComplete = true
} }
}).catch(() => { }) }).catch(() => { })
......
...@@ -854,7 +854,7 @@ export default { ...@@ -854,7 +854,7 @@ export default {
if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0) if (!!!this.formData.cooperativeUnits || this.formData.cooperativeUnits.length == 0)
this.formData.cooperativeUnits = [{ ...Cooperative }] this.formData.cooperativeUnits = [{ ...Cooperative }]
if (!!!this.formData.members || this.formData.members.length == 0) if (!!!this.formData.members || this.formData.members.length == 0)
this.formData.members = [{ ...Members }] this.formData.members = []
if (!!!this.formData.equipments || !this.formData.equipments.length || this.formData.equipments.length == 0) { if (!!!this.formData.equipments || !this.formData.equipments.length || this.formData.equipments.length == 0) {
this.formData.equipments = [] this.formData.equipments = []
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div class="tb-title"> <div class="tb-title">
<span>项目组成员 <strong>(注:项目负责人填写到第一行)</strong><a-button type="primary" size="small" style="margin-left:18px;" @click="addMember">添加成员</a-button></span> <span>项目组成员 <strong>(注:项目负责人填写到第一行)</strong></span>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div>民族</div> <div>民族</div>
</div> </div>
</a-col> </a-col>
<a-col :span="2" class="bg-gray"> <a-col :span="1" class="bg-gray">
<div class="special-middle"> <div class="special-middle">
<div>国别或地区</div> <div>国别或地区</div>
</div> </div>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<div>从事专业</div> <div>从事专业</div>
</div> </div>
</a-col> </a-col>
<a-col :span="2" class="bg-gray"> <a-col :span="3" class="bg-gray">
<div class="special-middle"> <div class="special-middle">
<div>操作</div> <div>操作</div>
</div> </div>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
</div> </div>
</div> </div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="1">
<div class="special-middle"> <div class="special-middle">
<div> <div>
{{ item.country }} {{ item.country }}
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
</div> </div>
</div> </div>
</a-col> </a-col>
<a-col :span="2"> <a-col :span="3">
<div class="special-middle"> <div class="special-middle">
<div> <div>
<a-button icon="arrow-up" type="primary" shape="circle" size="small" :disabled="index == 0" @click="memberUp(index)"></a-button> <a-button icon="arrow-up" type="primary" shape="circle" size="small" :disabled="index == 0" @click="memberUp(index)"></a-button>
...@@ -245,6 +245,15 @@ ...@@ -245,6 +245,15 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row type="flex">
<a-col :span="24" style="text-align: center;">
<div class="special-middle">
<a-button type="dashed" style="width: 30%;background: #40a9ff;" @click="addMember">
<a-icon type="plus" /> 添加项目组成员
</a-button>
</div>
</a-col>
</a-row>
</div> </div>
<a-modal v-model="visibleEdit" v-if="visibleEdit" title="项目组成员(添加/修改)" width="60%" :footer="null" :dialog-style="{ top: '20%' }" destroyOnClose :maskClosable="false"> <a-modal v-model="visibleEdit" v-if="visibleEdit" title="项目组成员(添加/修改)" width="60%" :footer="null" :dialog-style="{ top: '20%' }" destroyOnClose :maskClosable="false">
......
...@@ -48,21 +48,12 @@ ...@@ -48,21 +48,12 @@
</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} 条`" />
<s-modal title="项目详情" v-model="visibleView" v-if="visibleView"> <a-modal v-model="visibleView" v-if="visibleView" title="项目详情" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<div slot="content"> <project-view v-model="id" @close="closeWindow"></project-view>
<project-view v-model="id" @close="() => this.visibleView = false"></project-view> </a-modal>
</div> <a-modal v-model="visibleEdit" v-if="visibleEdit" title="项目修改" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
</s-modal> <project-create v-model="id" @close="closeWindow"></project-create>
<s-modal title="项目修改" v-model="visibleEdit" v-if="visibleEdit"> </a-modal>
<div slot="content">
<project-edit v-model="id" @close="closeWindow" ref="projCreate" :isModifyNo="true"></project-edit>
</div>
<template slot="footer">
<a-button @click="() => this.$refs.projCreate.save()">
保存
</a-button>
</template>
</s-modal>
<a-modal v-model="visibleUnitEdit" title="修改" :dialog-style="{ top: '15%' }" width="700px" :footer="null" destroyOnClose> <a-modal v-model="visibleUnitEdit" title="修改" :dialog-style="{ top: '15%' }" width="700px" :footer="null" destroyOnClose>
<unit-edit v-model="id" :appUnitId="appUnitId" @close="closeWindow"></unit-edit> <unit-edit v-model="id" :appUnitId="appUnitId" @close="closeWindow"></unit-edit>
</a-modal> </a-modal>
...@@ -188,14 +179,23 @@ export default { ...@@ -188,14 +179,23 @@ export default {
this.getListByPage() this.getListByPage()
}, },
closeWindow (value) { closeWindow (value) {
if (value === 'view') if (value === 'view') {
this.visibleView = false this.visibleView = false
else if (value === 'unitEdit') { } else if (value === 'unitEdit') {
this.visibleUnitEdit = false this.visibleUnitEdit = false
this.getListByPage() this.getListByPage()
} else if (value === 'submit') {
this.visibleEdit = false
this.getListByPage()
} else if (value === 'save') {
this.getListByPage()
} }
else else if (value === 'error') {
this.id = null
this.visibleUnitEdit = false
this.visibleEdit = false
this.visibleView = false this.visibleView = false
}
}, },
recordClick (record, type) { recordClick (record, type) {
if (type === 'view') { if (type === 'view') {
......
...@@ -33,3 +33,20 @@ export function setType (type) { ...@@ -33,3 +33,20 @@ export function setType (type) {
} }
export function getComplete () {
let state = false
let user = window.sessionStorage.getItem('user')
if (user)
state = JSON.parse(user).complete
return state
}
export function setComplete (value) {
let user = window.sessionStorage.getItem('user')
if (user) {
let obj = JSON.parse(user)
obj.complete = 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