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
5d31e0ad
Commit
5d31e0ad
authored
Dec 23, 2024
by
徐俊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yiboshi.com/XuJun/yn-science-front
parents
003e1d71
797b83de
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
42 deletions
+39
-42
cache.js
src/store/modules/cache.js
+19
-19
cascaderSelect.vue
src/views/components/common/cascaderSelect.vue
+5
-5
paraSelect.vue
src/views/components/common/paraSelect.vue
+5
-6
economy.vue
src/views/evaluation/components/economy.vue
+0
-0
score.vue
src/views/evaluation/components/score.vue
+9
-2
Index.vue
src/views/query/project/Index.vue
+1
-10
No files found.
src/store/modules/cache.js
View file @
5d31e0ad
import
Vue
from
'vue'
import
Vue
from
'vue'
import
Api
from
'@/api/index.js'
import
api
from
'@/api'
const
state
=
{
const
state
=
{
dict
:
{},
dict
:
{},
queue
:
[]
queue
:
[]
...
@@ -24,10 +25,10 @@ const mutations = {
...
@@ -24,10 +25,10 @@ const mutations = {
}
}
}
}
const
actions
=
{
const
actions
=
{
getDict
:
(
stat
e
)
=>
{
getDict
:
(
{
commit
,
state
},
typ
e
)
=>
{
return
state
.
dict
return
state
.
dict
},
},
getDictByType
:
(
state
)
=>
(
type
)
=>
{
getDictByType
:
(
{
dispatch
,
state
},
type
)
=>
{
/**
/**
* 闭包特性。返回一个函数,该函数接收一个type参数。
* 闭包特性。返回一个函数,该函数接收一个type参数。
* 同时由于闭包还持有state对象,故可以返回需要的值。
* 同时由于闭包还持有state对象,故可以返回需要的值。
...
@@ -43,25 +44,24 @@ const actions = {
...
@@ -43,25 +44,24 @@ const actions = {
// 没有缓存则请求数据
// 没有缓存则请求数据
if
(
!
isExistence
)
{
if
(
!
isExistence
)
{
// 在异步请求之前将该任务标记为已缓存(存入队列)
// 在异步请求之前将该任务标记为已缓存(存入队列)
commit
(
'SET_QUEUE'
,
'dict/'
+
type
)
this
.
commit
(
'cache/SET_QUEUE'
,
'dict/'
+
type
)
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
return
Api
.
getDict
(
type
)
await
api
.
parameter
.
getArrayListByType
({
typeId
:
type
})
.
then
((
res
)
=>
{
.
then
(({
data
=
{}
})
=>
{
const
{
code
,
data
}
=
res
if
(
data
)
{
if
(
code
&&
code
!==
200
)
{
try
{
// 获取失败移除缓存队列
this
.
commit
(
'cache/SET_DICT'
,
{
type
:
type
,
list
:
data
})
commit
(
'DEL_QUEUE'
,
'dict/'
+
type
)
resolve
(
data
)
reject
(
res
)
}
catch
(
error
)
{
reject
(
error
)
}
}
else
{
}
else
{
// 获取到的值存入字典
reject
(
'error'
)
commit
(
'SET_DICT'
,
{
type
:
type
,
list
:
data
})
resolve
(
res
)
}
}
})
}).
catch
(
err
=>
{
.
catch
((
error
)
=>
{
// 获取失败移除缓存队列
// 获取失败移除缓存队列
commit
(
'
DEL_QUEUE'
,
'dict/'
+
type
)
this
.
commit
(
'cache/
DEL_QUEUE'
,
'dict/'
+
type
)
reject
(
err
or
)
reject
(
err
.
response
)
})
})
})
})
}
else
{
}
else
{
...
...
src/views/components/common/cascaderSelect.vue
View file @
5d31e0ad
...
@@ -74,11 +74,11 @@ export default {
...
@@ -74,11 +74,11 @@ export default {
value
:
{
value
:
{
handler
(
value
)
{
handler
(
value
)
{
if
(
!!
value
)
{
if
(
!!
value
)
{
this
.
selected
=
getSpecArray
(
this
.
value
)
//
this.selected = getSpecArray(this.value)
if
(
!!
this
.
selected
&&
this
.
selected
.
length
==
3
)
{
//
if (!!this.selected && this.selected.length == 3) {
this
.
$emit
(
"input"
,
this
.
selected
[
2
])
//
this.$emit("input", this.selected[2])
this
.
$emit
(
"change"
);
//
this.$emit("change");
}
//
}
}
}
},
},
},
},
...
...
src/views/components/common/paraSelect.vue
View file @
5d31e0ad
<
template
>
<
template
>
<div
style=
" width:auto; display:inline-block !important; display:inline;"
>
<div
style=
" width:auto; display:inline-block !important; display:inline;"
>
<a-select
:style=
"
{width: width? width+ 'px':'80%'}" v-model="selected" @change="
para
Change($event)" :key="0">
<a-select
:style=
"
{width: width? width+ 'px':'80%'}" v-model="selected" @change="
on
Change($event)" :key="0">
<a-select-option
v-for=
"item in selectArray"
:key=
"item.key"
:value=
"item.key"
select
>
{{
item
.
title
}}
</a-select-option>
<a-select-option
v-for=
"item in selectArray"
:key=
"item.key"
:value=
"item.key"
select
>
{{
item
.
title
}}
</a-select-option>
</a-select>
</a-select>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
// 用法
<
para
-
select
v
-
model
=
"formData.projClass"
:
typeId
=
"52"
/>
export
default
{
export
default
{
name
:
"paraSelect"
,
name
:
"paraSelect"
,
data
()
{
data
()
{
...
@@ -49,17 +49,16 @@ export default {
...
@@ -49,17 +49,16 @@ export default {
},
},
},
},
created
()
{
created
()
{
this
.
load
Selected
()
this
.
load
()
},
},
methods
:
{
methods
:
{
load
Selected
()
{
load
()
{
let
pars
=
{
typeId
:
this
.
typeId
}
let
pars
=
{
typeId
:
this
.
typeId
}
this
.
$api
.
parameter
.
getParameterList
(
pars
).
then
(({
data
=
{
data
}
})
=>
{
this
.
$api
.
parameter
.
getParameterList
(
pars
).
then
(({
data
=
{
data
}
})
=>
{
if
(
data
)
{
if
(
data
)
{
this
.
selectArray
=
data
.
data
this
.
selectArray
=
data
.
data
this
.
selectArray
.
unshift
(
this
.
defaultValue
)
this
.
selectArray
.
unshift
(
this
.
defaultValue
)
if
(
!!
this
.
value
)
{
if
(
!!
this
.
value
)
{
this
.
loadState
=
true
this
.
selected
=
this
.
value
this
.
selected
=
this
.
value
}
}
else
else
...
@@ -67,7 +66,7 @@ export default {
...
@@ -67,7 +66,7 @@ export default {
}
}
}).
catch
(()
=>
{
})
}).
catch
(()
=>
{
})
},
},
para
Change
(
value
)
{
on
Change
(
value
)
{
this
.
$emit
(
"input"
,
value
);
this
.
$emit
(
"input"
,
value
);
var
newArr
=
this
.
selectArray
.
filter
(
x
=>
x
.
key
==
value
);
var
newArr
=
this
.
selectArray
.
filter
(
x
=>
x
.
key
==
value
);
if
(
!!
newArr
&&
newArr
.
length
>
0
)
{
if
(
!!
newArr
&&
newArr
.
length
>
0
)
{
...
...
src/views/evaluation/components/economy.vue
View file @
5d31e0ad
This diff is collapsed.
Click to expand it.
src/views/evaluation/components/score.vue
View file @
5d31e0ad
...
@@ -11,9 +11,8 @@
...
@@ -11,9 +11,8 @@
<div
v-show=
"tabsActive==='1'"
style=
"height:100%;"
>
<div
v-show=
"tabsActive==='1'"
style=
"height:100%;"
>
<div
style=
"height:calc(100% - 40px);overflow: auto;"
>
<div
style=
"height:calc(100% - 40px);overflow: auto;"
>
<a-form-model
ref=
"form"
:model=
"formData"
:rules=
"rules"
class=
"from-table font-line-space"
>
<a-form-model
ref=
"form"
:model=
"formData"
:rules=
"rules"
class=
"from-table font-line-space"
>
<economy
v-model=
"formData"
v-if=
"false"
/>
<technology-evalucation
v-if=
"totalFunding >= 50"
v-model=
"formData"
></technology-evalucation>
<technology-evalucation
v-if=
"totalFunding >= 50"
v-model=
"formData"
></technology-evalucation>
<economy
v-if=
"totalFunding
<
50
"
v-model=
"formData"
/>
<div
v-else
>
<div
v-else
>
<a-row
type=
"flex"
>
<a-row
type=
"flex"
>
<a-col
:span=
"4"
class=
"bg-gray"
>
<a-col
:span=
"4"
class=
"bg-gray"
>
...
@@ -191,6 +190,10 @@ export default {
...
@@ -191,6 +190,10 @@ export default {
remark
:
[{
required
:
true
,
message
:
'请填写评审意见'
,
trigger
:
'blur'
},],
remark
:
[{
required
:
true
,
message
:
'请填写评审意见'
,
trigger
:
'blur'
},],
supportState
:
{
required
:
true
,
message
:
"请选择是否支持立项"
,
trigger
:
"blur"
},
supportState
:
{
required
:
true
,
message
:
"请选择是否支持立项"
,
trigger
:
"blur"
},
evaluationType
:
{
required
:
true
,
message
:
"*"
,
trigger
:
"blur"
},
evaluationType
:
{
required
:
true
,
message
:
"*"
,
trigger
:
"blur"
},
score18
:
{
required
:
true
,
message
:
"*"
,
trigger
:
"blur"
},
score19
:
{
required
:
true
,
message
:
"*"
,
trigger
:
"blur"
},
additionalScore
:
{
required
:
true
,
message
:
"*"
,
trigger
:
"blur"
},
recommendFunding
:
{
required
:
true
,
message
:
"*"
,
trigger
:
"blur"
},
},
},
projectInfo
:
{
projectInfo
:
{
projName
:
''
,
projName
:
''
,
...
@@ -287,6 +290,10 @@ export default {
...
@@ -287,6 +290,10 @@ export default {
if
(
this
.
projectInfo
.
fileList
[
i
].
fileExplain
.
indexOf
(
"项目申报简要信息首页"
)
==
-
1
&&
this
.
projectInfo
.
fileList
[
i
].
fileExplain
.
indexOf
(
"项目组成员签字"
)
==
-
1
)
if
(
this
.
projectInfo
.
fileList
[
i
].
fileExplain
.
indexOf
(
"项目申报简要信息首页"
)
==
-
1
&&
this
.
projectInfo
.
fileList
[
i
].
fileExplain
.
indexOf
(
"项目组成员签字"
)
==
-
1
)
fileArr
.
push
(
this
.
projectInfo
.
fileList
[
i
])
fileArr
.
push
(
this
.
projectInfo
.
fileList
[
i
])
}
}
this
.
formData
.
projName
=
data
.
projName
this
.
formData
.
appUnitName
=
data
.
appUnitName
this
.
formData
.
appPersonName
=
data
.
appPersonName
this
.
formData
.
applyFunding
=
data
.
govFunding
this
.
projectInfo
.
fileList
=
fileArr
this
.
projectInfo
.
fileList
=
fileArr
this
.
isProjectInfoLoad
=
true
this
.
isProjectInfoLoad
=
true
this
.
loading
=
false
this
.
loading
=
false
...
...
src/views/query/project/Index.vue
View file @
5d31e0ad
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
<a-divider
style=
"height: 1px; background-color: #e8e8e8;"
/>
<a-divider
style=
"height: 1px; background-color: #e8e8e8;"
/>
<div
class=
"submit-btn"
>
<div
class=
"submit-btn"
>
<a-button
type=
"primary"
@
click=
"exportData"
icon=
"download"
>
Excel
</a-button>
<a-button
type=
"primary"
@
click=
"exportData"
icon=
"download"
>
Excel
</a-button>
<!--
<a-button
type=
"primary"
@
click=
"scoreClick"
icon=
"download"
>
评分
</a-button>
-->
</div>
</div>
<a-table
:dataSource=
"tableData"
:columns=
"columns"
:scroll=
"
{ x: 'max-content' }" rowKey="id" :pagination="false" :loading="loading">
<a-table
:dataSource=
"tableData"
:columns=
"columns"
:scroll=
"
{ x: 'max-content' }" rowKey="id" :pagination="false" :loading="loading">
<template
slot=
"projName"
slot-scope=
"record"
>
<template
slot=
"projName"
slot-scope=
"record"
>
...
@@ -40,9 +39,6 @@
...
@@ -40,9 +39,6 @@
<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=
"visibleScore"
v-if=
"visibleScore"
title=
"评分"
width=
"94%"
:footer=
"null"
:dialog-style=
"{ top: '8%' }"
destroyOnClose
:maskClosable=
"false"
>
<score-edit
/>
</a-modal>
</div>
</div>
</template>
</template>
...
@@ -51,11 +47,10 @@ import { getType } from '@/views/utils/auth'
...
@@ -51,11 +47,10 @@ 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/economy'
export
default
{
export
default
{
name
:
'queryProject'
,
name
:
'queryProject'
,
components
:
{
components
:
{
projectView
,
scoreEdit
projectView
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -79,7 +74,6 @@ export default {
...
@@ -79,7 +74,6 @@ export default {
loading
:
false
,
loading
:
false
,
// 弹窗标志
// 弹窗标志
visibleView
:
false
,
visibleView
:
false
,
visibleScore
:
false
,
id
:
null
,
id
:
null
,
loadState
:
false
loadState
:
false
}
}
...
@@ -87,9 +81,6 @@ export default {
...
@@ -87,9 +81,6 @@ export default {
created
()
{
created
()
{
},
},
methods
:
{
methods
:
{
scoreClick
()
{
this
.
visibleScore
=
true
},
search
()
{
search
()
{
this
.
pagination
.
pageIndex
=
1
this
.
pagination
.
pageIndex
=
1
this
.
getListByPage
()
this
.
getListByPage
()
...
...
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