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
ad69e459
Commit
ad69e459
authored
Apr 10, 2025
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
3c3031de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
4 deletions
+108
-4
index.js
src/api/index.js
+3
-0
final.vue
src/views/audit/project/final.vue
+105
-4
No files found.
src/api/index.js
View file @
ad69e459
...
...
@@ -468,6 +468,9 @@ export default {
projectExport
(
params
)
{
return
fetch
(
`/v1/science-admin/com-project/projectExport/
${
params
.
id
}
`
,
params
,
'get'
,
'json'
)
},
updateDefenseScore
(
params
)
{
return
fetch
(
`/v1/science-admin/com-project/updateDefenseScore`
,
params
,
'post'
,
'json'
)
},
},
talent
:
{
getListByPage
(
params
)
{
...
...
src/views/audit/project/final.vue
View file @
ad69e459
...
...
@@ -43,6 +43,9 @@
<template
slot=
"projName"
slot-scope=
"record"
>
<a
@
click=
"recordClick(record, 'view')"
>
{{
record
.
projName
}}
</a>
</
template
>
<
template
slot=
"defenseInfo"
slot-scope=
"record"
>
<editable-cell
:text=
"record.defenseScore"
@
change=
"onCellChange(record.id, 'defenseScore', $event)"
/>
</
template
>
<
template
slot=
"auditResultName"
slot-scope=
"record"
>
<span
v-if=
"record"
>
{{
record
}}
...
...
@@ -99,10 +102,46 @@ import projectView from '@/views/report/project/components/projectView'
import
unitTreeSelect
from
'@/views/components/common/unitTreeSelect'
import
scoreView
from
'@/views/evaluation/components/scoreView'
const
EditableCell
=
{
template
:
`
<div class="editable-cell">
<div v-if="editable" class="editable-cell-input-wrapper">
<a-input-number :value="value" :min="0" :max="100" :step="1" @change="handleChange" @pressEnter="check" />
<a-icon type="check" class="editable-cell-icon-check" @click="check"/>
</div>
<div v-else class="editable-cell-text-wrapper">
{{ value || ' ' }}
<a-icon type="edit" class="editable-cell-icon" @click="edit" />
</div>
</div>
`
,
props
:
{
text
:
Number
,
},
data
()
{
return
{
value
:
this
.
text
,
editable
:
false
,
};
},
methods
:
{
handleChange
(
value
)
{
this
.
value
=
value
;
},
check
()
{
this
.
editable
=
false
;
this
.
$emit
(
'change'
,
this
.
value
);
},
edit
()
{
this
.
editable
=
true
;
},
},
};
export
default
{
name
:
"projectFinal"
,
components
:
{
projectView
,
paraSelect
,
audit
,
unitTreeSelect
,
projectAssignDetail
,
scoreView
,
batchAudit
projectView
,
paraSelect
,
audit
,
unitTreeSelect
,
projectAssignDetail
,
scoreView
,
batchAudit
,
EditableCell
,
},
data
()
{
return
{
...
...
@@ -134,8 +173,9 @@ export default {
],
itemCount
:
[
0
,
0
,
0
,
0
,
0
],
columns
:
[
{
title
:
"项目名称"
,
scopedSlots
:
{
customRender
:
'projName'
}
},
{
title
:
"项目名称"
,
scopedSlots
:
{
customRender
:
'projName'
}
,
ellipsis
:
true
,
width
:
300
},
{
title
:
"项目编号"
,
dataIndex
:
"projNo"
,
align
:
'center'
},
{
title
:
"答辩分数"
,
scopedSlots
:
{
customRender
:
'defenseInfo'
},
align
:
'center'
,
width
:
150
},
{
title
:
"项目类别"
,
dataIndex
:
'projClassName'
,
align
:
'center'
},
{
title
:
'申报单位'
,
dataIndex
:
'appUnitName'
,
align
:
'center'
},
{
title
:
'申报人'
,
dataIndex
:
'appPersonName'
,
align
:
'center'
},
...
...
@@ -359,7 +399,68 @@ export default {
this
.
loading
=
false
}
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
onCellChange
(
key
,
dataIndex
,
value
)
{
const
target
=
this
.
tableData
.
find
(
item
=>
item
.
id
===
key
);
if
(
target
)
{
target
[
dataIndex
]
=
value
;
// 调用API更新数据
this
.
$api
.
project
.
updateDefenseScore
({
id
:
target
.
id
,
defenseScore
:
value
}).
then
(()
=>
{
this
.
$message
.
success
(
'答辩分数更新成功'
)
this
.
getListByPage
()
}).
catch
(()
=>
{
this
.
$message
.
error
(
'答辩分数更新失败,请稍后再试'
)
});
}
}
},
};
</
script
>
\ No newline at end of file
</
script
>
<
style
>
.editable-cell
{
position
:
relative
;
}
.editable-cell-input-wrapper
,
.editable-cell-text-wrapper
{
padding-right
:
24px
;
}
.editable-cell-text-wrapper
{
padding
:
5px
24px
5px
5px
;
}
.editable-cell-icon
,
.editable-cell-icon-check
{
position
:
absolute
;
right
:
0
;
width
:
20px
;
cursor
:
pointer
;
}
.editable-cell-icon
{
line-height
:
18px
;
display
:
none
;
}
.editable-cell-icon-check
{
line-height
:
28px
;
}
.editable-cell
:hover
.editable-cell-icon
{
display
:
inline-block
;
}
.editable-cell-icon
:hover
,
.editable-cell-icon-check
:hover
{
color
:
#108ee9
;
}
.editable-add-btn
{
margin-bottom
:
8px
;
}
</
style
>
\ No newline at end of file
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