Compare commits

..

No commits in common. "7e7140dd01fc6d5204e030edf773857897bf03b1" and "7fbf8d7c72df427d4165f924d90861badf80a0bf" have entirely different histories.

2 changed files with 8 additions and 20 deletions

View File

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

View File

@ -13,7 +13,7 @@
<div class="gva-card-title">快捷入口</div>
<el-row :gutter="20">
<el-col v-for="(card, key) in toolCards" :key="key" :span="4" :xs="8" class="quick-entrance-items"
@click="toTarget(card.name, card.params)">
@click="toTarget(card.name)">
<div class="quick-entrance-item">
<div class="quick-entrance-item-icon" :style="{ backgroundColor: card.bg }">
<el-icon>
@ -59,7 +59,6 @@ const toolCards = ref([
label: '院士管理',
icon: 'star',
name: 'academician',
params: { kind: 1 },
color: '#ffd666',
bg: 'rgba(255, 214, 102,.3)'
},
@ -88,9 +87,8 @@ const toolCards = ref([
const router = useRouter()
const toTarget = (name, params) => {
if (name)
router.push({ name, params })
const toTarget = (name) => {
router.push({ name })
}
</script>