|
@@ -7,21 +7,21 @@
|
|
|
label-width="80px"
|
|
|
:span="4"
|
|
|
label="主题名称"
|
|
|
- v-model:param="state.query.form.keyword"
|
|
|
+ v-model:param="state.query.form.themeName"
|
|
|
/>
|
|
|
<CusFormColumn
|
|
|
:span="4"
|
|
|
label="类别"
|
|
|
- v-model:param="state.query.form.keyword"
|
|
|
+ v-model:param="state.query.form.themeType"
|
|
|
link="select"
|
|
|
- :options="DictionaryStore.trueFalseList"
|
|
|
+ :options="DictionaryStore.themeTypeList"
|
|
|
/>
|
|
|
<CusFormColumn
|
|
|
:span="4"
|
|
|
label="状态"
|
|
|
- v-model:param="state.query.form.keyword"
|
|
|
+ v-model:param="state.query.form.themeState"
|
|
|
link="select"
|
|
|
- :options="DictionaryStore.trueFalseList"
|
|
|
+ :options="DictionaryStore.themeStatusList"
|
|
|
/>
|
|
|
<CusButton type="main" title="搜索" @click="onSearch"/>
|
|
|
<CusButton type="main" title="重置" @click="onReset"/>
|
|
@@ -37,14 +37,21 @@
|
|
|
:table-head="state.query.tableHead"
|
|
|
@handlePage="onPage"
|
|
|
>
|
|
|
- <template #shareMethod-column-value="{scope}">
|
|
|
- {{DictionaryStore.gxMethodMap.get(scope.row.shareMethod)}}
|
|
|
+ <template #themeType-column-value="{scope}">
|
|
|
+ {{DictionaryStore.themeTypeMap.get(scope.row.themeType)}}
|
|
|
+ </template>
|
|
|
+ <template #themeState-column-value="{scope}">
|
|
|
+ {{DictionaryStore.themeStatusMap.get(scope.row.themeState)}}
|
|
|
</template>
|
|
|
<template #do-column-value="{scope}">
|
|
|
<CusButton type="table-edit" @click="onEdit(scope.row)"/>
|
|
|
<CusButton type="table-del" @click="onDel(scope.row)"/>
|
|
|
- <CusButton type="table-edit" title="配置" icon="text" @click="onPassword(scope.row)"/>
|
|
|
- <CusButton type="table" icon="relation" title="索引构成" @click="onRole(scope.row)"/>
|
|
|
+ <template v-if="scope.row.themeType == '1'">
|
|
|
+ <CusButton type="table-edit" title="配置" icon="text" @click="onPassword(scope.row)"/>
|
|
|
+ </template>
|
|
|
+ <template v-else-if="scope.row.themeType == '2'">
|
|
|
+ <CusButton type="table" icon="relation" title="索引构成" @click="onRole(scope.row)"/>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</CusTable>
|
|
|
</div>
|
|
@@ -54,10 +61,10 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import {getCurrentInstance, onMounted, reactive} from "vue";
|
|
|
-import {ElMessage} from "element-plus";
|
|
|
+import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
import DetailCom from "./detail.vue";
|
|
|
import {useDictionaryStore} from "@/stores";
|
|
|
-import {sysThemeGetPageTheme} from "@/api/modules/manage/theme";
|
|
|
+import {sysThemeDelete, sysThemeGetPageTheme} from "@/api/modules/manage/theme";
|
|
|
|
|
|
const {proxy} = getCurrentInstance()
|
|
|
const DictionaryStore = useDictionaryStore()
|
|
@@ -69,21 +76,21 @@ const state: any = reactive({
|
|
|
pageSize: 10
|
|
|
},
|
|
|
tableHead: [
|
|
|
- {value: "indexName", label: "主题名称", fixed: 'left'},
|
|
|
- {value: "indexName", label: "类别"},
|
|
|
- {value: "dataSource", label: "状态"},
|
|
|
- {value: "dataSource", label: "请求URL示例",width: 200, popover: true},
|
|
|
+ {value: "themeName", label: "主题名称", fixed: 'left'},
|
|
|
+ {value: "themeType", label: "类别"},
|
|
|
+ {value: "themeState", label: "状态"},
|
|
|
+ {value: "themeUrl", label: "请求URL示例",width: 200, popover: true},
|
|
|
{value: "createTime", label: "创建时间", width: 200},
|
|
|
- {value: "indexName", label: "创建人"},
|
|
|
+ {value: "createBy", label: "创建人"},
|
|
|
{value: "updateTime", label: "最后修改时间", width: 200},
|
|
|
- {value: "updateTime", label: "最后修改人"},
|
|
|
- {value: "do", label: "操作", width: 320, fixed: 'right'},
|
|
|
+ {value: "updateBy", label: "最后修改人"},
|
|
|
+ {value: "do", label: "操作", width: 280, fixed: 'right'},
|
|
|
],
|
|
|
form: {},
|
|
|
formReal: {},
|
|
|
result: {
|
|
|
total: 0,
|
|
|
- data: [{}]
|
|
|
+ data: []
|
|
|
}
|
|
|
},
|
|
|
detail: {
|
|
@@ -140,7 +147,7 @@ const onAdd = () => {
|
|
|
const onEdit = (row) => {
|
|
|
state.detail.transfer = {
|
|
|
mode: 'edit',
|
|
|
- id: row.id,
|
|
|
+ id: row.themeId,
|
|
|
}
|
|
|
state.detail.show = true
|
|
|
}
|
|
@@ -150,16 +157,27 @@ const onPassword = (row) => {
|
|
|
}
|
|
|
state.password.show = true
|
|
|
}
|
|
|
-const onRole = (row) => {
|
|
|
- state.role.transfer = {
|
|
|
- id: row.id,
|
|
|
- }
|
|
|
- state.role.show = true
|
|
|
-}
|
|
|
const onDel = (row) => {
|
|
|
+ ElMessageBox.confirm(`请确认是否删除${row.themeName}?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ } as any).then(() => {
|
|
|
+ state.query.loading = true
|
|
|
+ sysThemeDelete(row.themeId).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ ElMessage.success('删除成功!')
|
|
|
+ state.query.loading = false
|
|
|
+ onSearch()
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
const initDictionary = () => {
|
|
|
- DictionaryStore.initDict('true_false')
|
|
|
+ DictionaryStore.initDict('theme_type')
|
|
|
+ DictionaryStore.initDict('theme_status')
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
initDictionary()
|