增加国外院士管理

This commit is contained in:
jacky 2024-07-18 11:49:01 +08:00
parent 7fbf8d7c72
commit 6af861ac09
1 changed files with 15 additions and 5 deletions

View File

@ -125,6 +125,16 @@ watch(
} }
) )
const formatKind = (kind) => {
if (kind == 1) {
return "院士"
} else if (kind == 2) {
return "研究员"
} else if (kind == 3) {
return "国外院士"
}
}
// //
const handleResetSearch = () => { const handleResetSearch = () => {
initSearchInfo() initSearchInfo()
@ -187,7 +197,7 @@ const handleMultiDelete = () => {
} }
// //
const handleRowDelete = (ID) => { const handleRowDelete = (ID) => {
ElMessageBox.confirm('此操作将删除' + (route.params.kind == '1' ? '院士' : '研究员') + ', 是否继续?', '请确认', { ElMessageBox.confirm('此操作将删除' + formatKind(route.params.kind) + ', 是否继续?', '请确认', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@ -210,12 +220,12 @@ const elEditRef = ref(null)
const editTitle = ref('') const editTitle = ref('')
// //
const handleAdd = () => { const handleAdd = () => {
editTitle.value = '添加' + (route.params.kind == '1' ? '院士' : '研究员') editTitle.value = '添加' + formatKind(route.params.kind)
elEditRef.value.openPage({ id: 0, kind: parseInt(route.params.kind) }) elEditRef.value.openPage({ id: 0, kind: parseInt(route.params.kind) })
} }
// //
const handleRowEdit = async (ID) => { const handleRowEdit = async (ID) => {
editTitle.value = '修改' + (route.params.kind == '1' ? '院士' : '研究员') + '-ID:' + ID editTitle.value = '修改' + formatKind(route.params.kind) + '-ID:' + ID
elEditRef.value.openPage({ ID: ID, kind: parseInt(route.params.kind) }) elEditRef.value.openPage({ ID: ID, kind: parseInt(route.params.kind) })
} }
// //
@ -225,7 +235,7 @@ const handlerFormSave = () => {
const selectArticleTitle = ref('') const selectArticleTitle = ref('')
const handleSelProject = (row) => { const handleSelProject = (row) => {
selectArticleTitle.value = '关联' + (route.params.kind == '1' ? '院士' : '研究员') + '项目' + '-ID:' + row.ID selectArticleTitle.value = '关联' + formatKind(route.params.kind) + '项目' + '-ID:' + row.ID
let articleIds = [] let articleIds = []
if (row.projects != '') { if (row.projects != '') {
articleIds = JSON.parse(row.projects) articleIds = JSON.parse(row.projects)
@ -234,7 +244,7 @@ const handleSelProject = (row) => {
elSelectArticleRef.value.openPage(params, articleIds) elSelectArticleRef.value.openPage(params, articleIds)
} }
const handleSelLecture = (row) => { const handleSelLecture = (row) => {
selectArticleTitle.value = '关联' + (route.params.kind == '1' ? '院士' : '研究员') + '讲座' + '-ID:' + row.ID selectArticleTitle.value = '关联' + formatKind(route.params.kind) + '讲座' + '-ID:' + row.ID
let articleIds = [] let articleIds = []
if (row.lectures != '') { if (row.lectures != '') {
articleIds = JSON.parse(row.lectures) articleIds = JSON.parse(row.lectures)