Commit 191bd6fb authored by 徐俊's avatar 徐俊

xujun

parents 4227f5aa 70cb94c7
......@@ -320,26 +320,19 @@ router.beforeEach(async (to, from, next) => {
const hasUser = JSON.parse(window.sessionStorage.getItem('user'))
const hasMenu = JSON.parse(window.sessionStorage.getItem('menuList'))
if (hasUser && hasMenu) {
if (hasUser.type === '3' && !!!hasUser.projType && hasUser.roles != '4') {
if (to.path === '/sys') {
if (!hasUser.projType && hasUser.type === '3' && hasUser.roles != '4') {
next()
NProgress.done()
}
else {
next({ path: '/' })
NProgress.done()
}
} else {
if (!hasUser.projType && hasUser.type === '3' && hasUser.roles != '4') {
next(`/sys`)
NProgress.done()
}
} else {
// setType(hasUser.type + '')
// await store.dispatch('app/auth', to.path)
await store.dispatch('app/auth', to.path)
next()
NProgress.done()
}
}
} else {
await store.dispatch('user/getUser')
next({ ...to, replace: true })
......
......@@ -60,7 +60,7 @@
</template>
<script>
import { getType, getUnitType } from '@/views/utils/auth'
import { getType } from '@/views/utils/auth'
import moment from 'moment'
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common";
import paraSelect from '@/views/components/common/paraSelect'
......@@ -151,19 +151,16 @@ export default {
this.getListByPage()
},
getYear () {
let type = getUnitType()
this.$api.batch.getCurrentYearBatch({ type: type, projType: getType() }).then(({ data = {} }) => {
this.$api.batch.getCurrentYearBatch({ type: 1, projType: getType() }).then(({ data = {} }) => {
if (data) {
this.isButten = data.disabled
this.description = data.description
this.searchForm.reportYear = data.year
console.log('1')
this.getListByPage()
}
}).catch(() => { })
},
getListByPage () {
console.log('2')
this.getCount()
this.loading = true;
let pars = isEmptyParams(this.searchForm);
......
......@@ -11,8 +11,8 @@
</div>
<div style="width: 100%;height: calc(100% - 50px);overflow: auto;" ref="main">
<div class="x_modal_content">
<project-info v-model="projectInfo" :tabsData.sync="tabsData" v-if="projType" />
<project-info-Key v-model="projectInfo" :tabsData.sync="tabsData" v-else />
<project-info v-model="formData" :tabsData.sync="tabsData" v-if="projType=='1'" />
<project-info-Key v-model="formData" :tabsData.sync="tabsData" v-if="projType=='2'" />
<a-row>
<a-col :span="24">
<div class="tb-title">
......@@ -22,7 +22,7 @@
</a-row>
<a-row>
<a-col :span="24">
<audit-list v-model="projectInfo.auditList" />
<audit-list v-model="formData.auditList" />
</a-col>
</a-row>
<a-form-model ref="form" :model="auditObj" :rules="rules" class="from-table font-line-space">
......@@ -66,7 +66,7 @@ export default {
{ title: '单位科研项目及资金管理制度', key: '10', isShow: true },
// { title: '诚信承诺书', key: '11', isShow: true },
],
projectInfo: {
formData: {
id: null,
organizationCode: null,
address: null,
......@@ -121,7 +121,7 @@ export default {
auditResult: { required: true, message: '请选择审核结果', trigger: 'change' },
},
loading: false,
projType: getType() == "1"
projType: getType()
};
},
props: {
......@@ -148,7 +148,7 @@ export default {
this.loading = true
this.$api.project.getProjectInfoById(pars).then(({ data = {} }) => {
if (data) {
this.projectInfo = data
this.formData = data
this.loading = false
} else
this.$emit('close', 'error')
......
......@@ -133,7 +133,7 @@ export default {
this.$message.success('登录成功!');
setToken(data.access_token)
//this.$router.push({ path: this.redirect || '/home', query: this.otherQuery })
this.$router.push({ path: '/home' })
this.$router.push({ path: '/' })
}
else {
this.getCode()
......
......@@ -150,7 +150,6 @@ export default {
},
data () {
return {
projType: getType() == "1",
loadState: false, //判断是否查询信息完整状态
isComplete: false,
formData: { id: null, nation: null, title: null, education: null, spec: null, email: null, sex: null, birthday: null },
......
......@@ -113,7 +113,7 @@ export default {
dataList: {
type: Array,
default: () => {
return [{ ...ManagementRule }]
return []
}
},
},
......
......@@ -145,7 +145,7 @@
</div>
</a-col>
</a-row> -->
<a-row type="flex">
<!-- <a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div>开户银行</div>
......@@ -196,8 +196,8 @@
</div>
</div>
</a-col>
</a-row>
<a-row type="flex">
</a-row> -->
<!-- <a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div>上年度研发经费支出总额(单位:万元)</div>
......@@ -252,7 +252,7 @@
</div>
</div>
</a-col>
</a-row>
</a-row> -->
<a-row>
<a-col :span="24" style="border-top: 0px">
......@@ -293,7 +293,7 @@
</a-col>
<a-col :span="20">
<div class="special-middle">
{{ value.recommendUnit }}
{{ value.appUnitName }}
</div>
</a-col>
</a-row>
......@@ -319,7 +319,7 @@
</div>
</a-col>
</a-row>
<a-row type="flex">
<!-- <a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div>项目依托的科技创新基地</div>
......@@ -330,7 +330,7 @@
{{ value.technologyInnovationBase }}
</div>
</a-col>
</a-row>
</a-row> -->
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
......@@ -555,10 +555,19 @@
<div v-html="toTextarea(value.memResume)"></div>
</a-col>
</a-row>
<a-row>
<a-col :span="24" style="border-top: 0px">
<div class="tb-title">
<span>3、在研或完成基础研究项目情况</span>
</div>
</a-col>
</a-row>
<!-- 在研或完成基础研究项目情况 -->
<project-research-info :dataList.sync="value.projectResearchList" />
<a-row type="flex">
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div>3、与项目相关的国内外技术发展现状(包括知识产权情况)以及本项目主要研究开发内容技术关键(创新点)、可行性评价及项目风险分析与对策</div>
<div>4、与项目相关的国内外技术发展现状(包括知识产权情况)以及本项目主要研究开发内容技术关键(创新点)、可行性评价及项目风险分析与对策</div>
</div>
</a-col>
<a-col :span="20">
......@@ -672,6 +681,7 @@ import fundPlanInfo from '@/views/report/project/components/fundPlanInfo'
import equipmentsInfo from '@/views/report/project/components/equipmentsInfo.vue'
import unitPaymentInfo from '@/views/report/project/components/unitPaymentInfo.vue'
import projectKpiInfo from '@/views/report/project/components/projectKpiInfo.vue'
import projectResearchInfo from '@/views/report/project/components/projectResearchInfo'
import projectSubInfo from '@/views/report/project/components/projectSubInfo'
import managementRuleInfo from '@/views/report/project/components/managementRuleInfo'
import fileInfo from "@/views/report/project/components/fileInfo";
......@@ -684,7 +694,7 @@ import { toTextarea } from '@/views/utils/common'
export default {
components: {
projectMemberInfo, cooperativeUnitsInfo, budgetInfo, fundPlanInfo, equipmentsInfo, unitPaymentInfo, projectKpiInfo, projectSubInfo, managementRuleInfo, fileInfo, AuditList, documentView
projectMemberInfo, cooperativeUnitsInfo, budgetInfo, fundPlanInfo, equipmentsInfo, unitPaymentInfo, projectKpiInfo,projectResearchInfo, projectSubInfo, managementRuleInfo, fileInfo, AuditList, documentView
},
name: "ProjectInfo",
data () {
......
<template>
<div>
<a-row type="flex" class="row_center">
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">项目编号</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">项目名称</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">批准单位</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">负责人</div>
</div>
</a-col>
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">开始日期</div>
</div>
</a-col>
<a-col :span="4" class="bg-gray">
<div class="special-middle">
<div class="required">结束日期</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div class="required">项目经费(万元)</div>
</div>
</a-col>
<a-col :span="2" class="bg-gray">
<div class="special-middle">
<div>操作</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in projectResearchList" :key="'projectResearchList'+index" type="flex" class="row_center">
<a-col :span="3">
<a-form-model-item :prop="'projectResearchList.' + index + '.projNo'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.projNo" :maxLength="50" placeholder="项目编号" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'projectResearchList.' + index + '.projName'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.projName" :projName="50" placeholder="项目名称" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'projectResearchList.' + index + '.approveUnit'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.approveUnit" :maxLength="50" placeholder="批准单位" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="3">
<a-form-model-item :prop="'projectResearchList.' + index + '.leader'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input v-model="item.leader" :maxLength="100" placeholder="负责人" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item :prop="'projectResearchList.' + index + '.startDate'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="开始日期" v-model="item.startDate" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="4">
<a-form-model-item :prop="'projectResearchList.' + index + '.endDate'" :rules="{ required: true, message: '*', trigger: 'change',}">
<a-date-picker format="YYYY-MM-DD" valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="结束日期" v-model="item.endDate" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="2">
<a-form-model-item :prop="'projectResearchList.' + index + '.funds'" :rules="{ required: true, message: '*', trigger: 'blur',}">
<a-input-number v-model="item.funds" placeholder="项目经费" :min="0" :step="0.01" style="width:85%" />
</a-form-model-item>
</a-col>
<a-col :span="2">
<div class="special-middle">
<a-popconfirm title="确定要删除吗?" ok-text="确定" cancel-text="取消" @confirm="deleteArrey(item)">
<a-button type="link" size="small">删除</a-button>
</a-popconfirm>
</div>
</a-col>
</a-row>
<a-row type="flex">
<a-col :span="24" style="text-align: center">
<div class="special-middle">
<a-button type="dashed" style="width: 20%" @click="addArrey()">
<a-icon type="plus" /> 添加 <span style="color:red;margin-left:10px"></span>
</a-button>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
const ProjResearch = { projNo: null, projName: null, approveUnit: null, leader: null, startDate: null, endDate: null, funds: null }
export default {
name: "projectResearchEdit",
components: {
},
props: {
projectResearchList: {
type: Array,
default: () => {
return [{ ...ProjResearch }]
}
},
},
data () {
return {
};
},
created () {
},
computed: {
},
methods: {
addArrey () {//添加成员
this.dataList.push({ ...ProjResearch })
},
deleteArrey (item) {//移除成员
let index = this.dataList.indexOf(item)
if (index !== -1) {
this.dataList.splice(index, 1)
}
},
},
};
</script>
<style scoped lang="less">
.file-description {
display: block;
width: 100%;
line-height: 22px;
padding: 3px 3px 3px 3px;
color: red;
white-space: normal;
word-wrap: break-word;
// text-indent: 1em;
}
.inner_from {
.ant-row-flex:last-child .ant-col {
border-bottom: 0;
}
.ant-row-flex .ant-col:first-child {
border-left: 0;
}
.ant-row-flex {
border-right: 0;
}
}
.special-middle {
.font_s {
margin: 0 6px;
}
}
</style>
<template>
<div>
<a-row type="flex" class="row_center">
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>序号</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">项目编号</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">项目名称</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">批准单位</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">负责人</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">开始日期</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">结束日期</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div class="required">项目经费(万元)</div>
</div>
</a-col>
<a-col :span="3" class="bg-gray">
<div class="special-middle">
<div>操作</div>
</div>
</a-col>
</a-row>
<a-row v-for="(item, index) in dataList" :key="'researchListInfo'+index" type="flex" class="row_center">
<a-col :span="3">
<div class="special-middle">
<div>
{{ index + 1 }}
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
{{ item.projNo }}
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
{{ item.projName }}
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
{{ item.approveUnit }}
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
{{ item.leader }}
</div>
</div>
</a-col>
<a-col :span="2">
<div class="special-middle">
<div>
{{ moment(item.startDate).format('YYYY-MM-DD') }}
</div>
</div>
</a-col>
<a-col :span="2">
<div class="special-middle">
<div>
{{ moment(item.endDate).format('YYYY-MM-DD') }}
</div>
</div>
</a-col>
<a-col :span="4">
<div class="special-middle">
<div>
{{ item.funds }}
</div>
</div>
</a-col>
</a-row>
</div>
</template>
<script>
import moment from 'moment'
export default {
name: "projectResearchInfo",
components: {
},
props: {
dataList: {
type: Array,
default: () => {
return []
}
},
},
data () {
return {
};
},
created () {
},
computed: {
},
methods: {
moment,
},
};
</script>
<style scoped lang="less">
.file-description {
display: block;
width: 100%;
line-height: 22px;
padding: 3px 3px 3px 3px;
color: red;
white-space: normal;
word-wrap: break-word;
// text-indent: 1em;
}
.inner_from {
.ant-row-flex:last-child .ant-col {
border-bottom: 0;
}
.ant-row-flex .ant-col:first-child {
border-left: 0;
}
.ant-row-flex {
border-right: 0;
}
}
.special-middle {
.font_s {
margin: 0 6px;
}
}
</style>
......@@ -148,7 +148,7 @@ export default {
dataList: {
type: Array,
default: () => {
return [{ ...ProjectSub }]
return []
}
},
},
......
......@@ -11,8 +11,8 @@
<div class="page-footer">
<!-- 申报项目详情 -->
<!-- <a-button type="primary" @click="onExport">导出</a-button> -->
<project-info v-model="projectInfo" :tabsData.sync="tabsData" v-if="projType" />
<project-info-Key v-model="projectInfo" :tabsData.sync="tabsData" v-else />
<project-info v-model="formData" :tabsData.sync="tabsData" v-if="projType=='1'" />
<project-info-Key v-model="formData" :tabsData.sync="tabsData" v-if="projType=='2'" />
</div>
</a-spin>
</div>
......@@ -73,7 +73,7 @@ export default {
{ title: '单位科研项目及资金管理制度', key: '10', isShow: true },
// { title: '诚信承诺书', key: '11', isShow: true },
],
projectInfo: {
formData: {
id: null,
organizationCode: null,
address: null,
......@@ -118,13 +118,13 @@ export default {
members: [],
budget: [],
equipments: [],
projectResearchList: [],
projectSubList: [],
managementRuleList: [],
fileList: [],
projType: getType()
},
loading: false,
projType: getType() == "1"
projType: getType()
};
},
props: {
......@@ -133,9 +133,10 @@ export default {
default: () => {
return null
}
}
},
},
created () {
console.log(this.projType)
this.getProjectInfoById()
},
methods: {
......@@ -144,7 +145,7 @@ export default {
this.loading = true
this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => {
if (data) {
this.projectInfo = data
this.formData = data
this.loading = false
} else
this.$emit('close', 'error')
......@@ -156,7 +157,7 @@ export default {
let blob = new Blob([res], {
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8",
});
const fileName = this.projectInfo.projName + '.doc';
const fileName = this.formData.projName + '.doc';
let downloadElement = document.createElement('a')
let href = window.URL.createObjectURL(blob); //创建下载的链接
downloadElement.href = href;
......
......@@ -32,22 +32,22 @@
</div>
<div class="content">
<div class="content_list">
<div class="content_list_item " @click="onUser(1)">
<div class="content_list_item " @click="onChangeType(1)">
<div class="item_header item_b"></div>
<div class="item_center">
<a-icon type="file-text" class="item_center-icon" theme="twoTone" two-tone-color="#f5b65c" />
</div>
<div class="item_title">云南省卫生健康领域<br/>科技计划项目</div>
<div class="item_title">云南省卫生健康领域<br />科技计划项目</div>
<div class="item_bottom">
<a-icon type="right-circle" class="item_bottom-icon" />
</div>
</div>
<div style="margin-left: 70px;" class="content_list_item" @click="onUser(2)">
<div style="margin-left: 70px;" class="content_list_item" @click="onChangeType(2)">
<div class="item_header item_r"></div>
<div class="item_center">
<a-icon type="book" class="item_center-icon" theme="twoTone" two-tone-color="#ff87a8" />
</div>
<div class="item_title">云南省<br/>公立医院高水平临床专科建设<br/>科技项目</div>
<div class="item_title">云南省<br />公立医院高水平临床专科建设<br />科技项目</div>
<div class="item_bottom">
<a-icon type="right-circle" class="item_bottom-icon" />
</div>
......@@ -76,7 +76,7 @@ export default {
this.userInfo = JSON.parse(window.sessionStorage.getItem('user'))
},
methods: {
onUser (type) {
onChangeType (type) {
this.loading = true
this.$changeProjType(type)
this.loading = false
......
......@@ -32,21 +32,4 @@ export function setType (type) {
return type
}
export function getUnitType () {
let user = JSON.parse(window.sessionStorage.getItem("user"))
let type = 0
//最高级行政单位管理员
if (user && user.roles && (user.roles.indexOf("0") != -1)) {}
else if (user && user.roles && (user.roles.indexOf("1") != -1)) {//行政管理员
type = 3
} else if (user && user.roles && (user.roles.indexOf("2") != -1)) {//单位管理员
if (user.unitCode.length == (Vue.prototype.$defaultLength * 2))
type = 4//省直单位
else
type = 2//州市级及以下单位
} else if (user && user.roles && (user.roles.indexOf("5") != -1)) {//专家
type = 5
}
return type
}
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