Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-science-front
Commits
09a707b4
Commit
09a707b4
authored
Dec 05, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
7777
parent
d05850d8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
69 deletions
+87
-69
app.js
src/store/modules/app.js
+0
-4
user.js
src/store/modules/user.js
+1
-2
Index.vue
src/views/query/project/Index.vue
+9
-23
Index.vue
src/views/report/project/Index.vue
+27
-16
projectEdit.vue
src/views/report/project/components/projectEdit.vue
+1
-1
projectMemberEdit.vue
src/views/report/project/components/projectMemberEdit.vue
+14
-5
Index.vue
src/views/statistic/project/Index.vue
+18
-18
auth.js
src/views/utils/auth.js
+17
-0
No files found.
src/store/modules/app.js
View file @
09a707b4
...
...
@@ -9,13 +9,9 @@ const state = {
tabsArray
:
[],
tabsActive
:
''
,
cachedViews
:
[],
isComplete
:
false
,
projType
:
null
,
}
const
mutations
=
{
setComplete
:
(
state
,
payload
)
=>
{
state
.
isComplete
=
payload
},
setTabsActive
:
(
state
,
payload
)
=>
{
state
.
tabsActive
=
payload
},
...
...
src/store/modules/user.js
View file @
09a707b4
...
...
@@ -18,9 +18,8 @@ const actions = {
await
api
.
base
.
getUser
().
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
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
))
this
.
commit
(
'app/setComplete'
,
data
.
complete
)
this
.
commit
(
'app/initStore'
,
[
data
.
menuList
[
0
].
id
])
resolve
(
data
)
}
catch
(
error
)
{
...
...
src/views/query/project/Index.vue
View file @
09a707b4
...
...
@@ -36,22 +36,9 @@
</
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} 条`"
/>
<a-modal
v-model=
"visible
Edit"
:title=
"'项目修改'"
:width=
"'86%'"
:dialog-style=
"{ top: '20px' }"
:maskClosable=
"false"
:footer=
"null"
destroyOnClose
>
<project-
edit
v-model=
"id"
@
close=
"closeWindow"
></project-edit
>
<a-modal
v-model=
"visible
View"
v-if=
"visibleView"
title=
"项目详情"
width=
"94%"
:footer=
"null"
:dialog-style=
"{ top: '8%' }"
destroyOnClose
:maskClosable=
"false"
>
<project-
view
v-model=
"id"
@
close=
"closeWindow"
></project-view
>
</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>
</template>
...
...
@@ -60,7 +47,6 @@ import { getType } from '@/views/utils/auth'
import
moment
from
'moment'
import
{
isEmptyParams
,
filterExportExcelData
,
tableColumnsName
}
from
"@/views/utils/common"
;
import
projectView
from
'@/views/report/project/components/projectView'
import
projectEdit
from
'@/views/report/project/components/projectEdit'
import
paraSelect
from
'@/views/components/common/paraSelect'
import
baseSelect
from
'@/views/components/common/baseSelect'
export
default
{
...
...
@@ -91,7 +77,6 @@ export default {
loading
:
false
,
// 弹窗标志
visibleView
:
false
,
visibleEdit
:
false
,
id
:
null
,
loadState
:
false
}
...
...
@@ -140,18 +125,19 @@ export default {
this
.
getListByPage
()
},
closeWindow
(
value
)
{
if
(
value
===
'view'
)
this
.
visibleView
=
false
else
if
(
value
===
'submit'
)
{
this
.
getListByPage
()
}
else
if
(
value
===
'save'
)
{
this
.
getListByPage
()
}
else
if
(
value
===
'error'
)
{
this
.
id
=
null
this
.
visibleView
=
false
}
},
recordClick
(
record
,
type
)
{
if
(
type
===
'view'
)
{
this
.
id
=
record
.
id
this
.
visibleView
=
true
}
else
if
(
type
===
'edit'
)
{
this
.
id
=
record
.
id
this
.
visibleEdit
=
true
}
},
exportData
()
{
...
...
src/views/report/project/Index.vue
View file @
09a707b4
<
template
>
<div
class=
"app-content"
>
<div
v-if=
"load
State
&& !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-row>
<a-col
:span=
"24"
>
<div
class=
"
tb
-title"
>
<div
class=
"
main
-title"
>
<span>
补充人员基本信息
</span>
</div>
</a-col>
...
...
@@ -29,13 +29,25 @@
</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
:width=
"150"
v-model=
"formData.title"
:typeId=
"7
"
/>
<para-multi-select
v-model=
"formData.title"
:typeId=
"7"
:width=
"150
"
/>
</a-form-model-item>
</a-col>
</a-row>
...
...
@@ -45,7 +57,7 @@
</a-col>
<a-col
:span=
"20"
>
<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-col>
</a-row>
...
...
@@ -66,7 +78,7 @@
</a-row>
</a-form-model>
</div>
<div
v-if=
"load
State
&& isComplete"
>
<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"
/>
...
...
@@ -131,7 +143,7 @@
</template>
<
script
>
import
{
getType
}
from
'@/views/utils/auth'
import
{
getType
,
getComplete
,
setComplete
}
from
'@/views/utils/auth'
import
moment
from
'moment'
import
{
isEmptyParams
,
filterExportExcelData
,
tableColumnsName
,
checkEmail
,
personGender
,
personBirthday
,
checkImageFileType
,
checkDocumentFileType
}
from
"@/views/utils/common"
import
paraMultiSelect
from
'@/views/components/common/paraMultiSelect'
...
...
@@ -150,15 +162,15 @@ export default {
},
data
()
{
return
{
load
State
:
false
,
//判断是否查询信息完整状态
isComplete
:
false
,
formData
:
{
id
:
null
,
nation
:
null
,
title
:
null
,
education
:
null
,
spec
:
null
,
email
:
null
,
sex
:
null
,
birthday
:
null
},
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'
}],
// mobile: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
email
:
[
{
required
:
true
,
message
:
'请输入邮箱'
,
trigger
:
'blur'
},
{
required
:
true
,
validator
:
checkEmail
,
trigger
:
'blur'
}
...
...
@@ -220,16 +232,15 @@ export default {
},
created
()
{
this
.
getUserState
()
if
(
getType
()
==
1
)
if
(
getType
()
==
"1"
)
this
.
realurl
=
this
.
url1
else
this
.
realurl
=
this
.
url2
},
methods
:
{
getUserState
()
{
this
.
isComplete
=
this
.
$store
.
state
.
app
.
isComplete
if
(
this
.
isComplete
)
{
this
.
load
State
=
true
this
.
load
=
true
this
.
getYear
()
}
else
{
...
...
@@ -239,10 +250,10 @@ export default {
getAppPersonInfo
()
{
this
.
$api
.
person
.
getAppPersonInfo
().
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
load
=
true
this
.
formData
=
data
.
person
this
.
loadState
=
true
setComplete
(
data
.
isComplete
)
this
.
isComplete
=
data
.
isComplete
this
.
$store
.
commit
(
'app/setComplete'
,
data
.
isComplete
)
this
.
getYear
()
}
}).
catch
(()
=>
{
})
...
...
@@ -310,7 +321,7 @@ export default {
this
.
$api
.
person
.
updatePerson
(
par
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
$message
.
success
(
'提交成功!'
)
this
.
$store
.
commit
(
'app/setComplete'
,
true
)
setComplete
(
true
)
this
.
isComplete
=
true
}
}).
catch
(()
=>
{
})
...
...
src/views/report/project/components/projectEdit.vue
View file @
09a707b4
...
...
@@ -854,7 +854,7 @@ export default {
if
(
!!!
this
.
formData
.
cooperativeUnits
||
this
.
formData
.
cooperativeUnits
.
length
==
0
)
this
.
formData
.
cooperativeUnits
=
[{
...
Cooperative
}]
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
)
{
this
.
formData
.
equipments
=
[]
}
...
...
src/views/report/project/components/projectMemberEdit.vue
View file @
09a707b4
...
...
@@ -3,7 +3,7 @@
<a-row>
<a-col
:span=
"24"
>
<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>
</a-col>
</a-row>
...
...
@@ -43,7 +43,7 @@
<div>
民族
</div>
</div>
</a-col>
<a-col
:span=
"
2
"
class=
"bg-gray"
>
<a-col
:span=
"
1
"
class=
"bg-gray"
>
<div
class=
"special-middle"
>
<div>
国别或地区
</div>
</div>
...
...
@@ -98,7 +98,7 @@
<div>
从事专业
</div>
</div>
</a-col>
<a-col
:span=
"
2
"
class=
"bg-gray"
>
<a-col
:span=
"
3
"
class=
"bg-gray"
>
<div
class=
"special-middle"
>
<div>
操作
</div>
</div>
...
...
@@ -155,7 +155,7 @@
</div>
</div>
</a-col>
<a-col
:span=
"
2
"
>
<a-col
:span=
"
1
"
>
<div
class=
"special-middle"
>
<div>
{{
item
.
country
}}
...
...
@@ -232,7 +232,7 @@
</div>
</div>
</a-col>
<a-col
:span=
"
2
"
>
<a-col
:span=
"
3
"
>
<div
class=
"special-middle"
>
<div>
<a-button
icon=
"arrow-up"
type=
"primary"
shape=
"circle"
size=
"small"
:disabled=
"index == 0"
@
click=
"memberUp(index)"
></a-button>
...
...
@@ -245,6 +245,15 @@
</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: 30%;background: #40a9ff;"
@
click=
"addMember"
>
<a-icon
type=
"plus"
/>
添加项目组成员
</a-button>
</div>
</a-col>
</a-row>
</div>
<a-modal
v-model=
"visibleEdit"
v-if=
"visibleEdit"
title=
"项目组成员(添加/修改)"
width=
"60%"
:footer=
"null"
:dialog-style=
"
{ top: '20%' }" destroyOnClose :maskClosable="false">
...
...
src/views/statistic/project/Index.vue
View file @
09a707b4
...
...
@@ -48,21 +48,12 @@
</
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} 条`"
/>
<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>
<s-modal
title=
"项目修改"
v-model=
"visibleEdit"
v-if=
"visibleEdit"
>
<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=
"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>
</a-modal>
<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>
<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>
</a-modal>
...
...
@@ -188,14 +179,23 @@ export default {
this
.
getListByPage
()
},
closeWindow
(
value
)
{
if
(
value
===
'view'
)
if
(
value
===
'view'
)
{
this
.
visibleView
=
false
else
if
(
value
===
'unitEdit'
)
{
}
else
if
(
value
===
'unitEdit'
)
{
this
.
visibleUnitEdit
=
false
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
}
},
recordClick
(
record
,
type
)
{
if
(
type
===
'view'
)
{
...
...
src/views/utils/auth.js
View file @
09a707b4
...
...
@@ -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
))
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment