Compare commits
11 Commits
d65fdb0799
...
819f64e9f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
819f64e9f2 | ||
|
|
b097de5841 | ||
|
|
48f78d1b62 | ||
|
|
6033534929 | ||
|
|
499e351236 | ||
|
|
0227a6bf36 | ||
|
|
62f458c203 | ||
|
|
1ebe4d84c0 | ||
|
|
ba634fa907 | ||
|
|
4531ea0302 | ||
|
|
1c44044063 |
@@ -18,10 +18,10 @@ export const useCacheStore = defineStore('cache',()=>{
|
||||
})
|
||||
}
|
||||
|
||||
const getDict =async (key) => {
|
||||
const getDict = (key) => {
|
||||
let dict
|
||||
if (!cacheKeyType.value.has(key) ) {
|
||||
await setCacheKey([key])
|
||||
setCacheKey([key])
|
||||
}
|
||||
dict = cacheKeyType.value.get(key)
|
||||
return dict
|
||||
|
||||
@@ -9,8 +9,14 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="配置类型" prop="configType">
|
||||
<el-select v-model="queryParams.configType" placeholder="请选择配置类型" clearable filterable>
|
||||
<el-option label="主机" value="1"/>
|
||||
<el-option label="JDBC" value="2"/>
|
||||
<!-- <el-option label="主机" value="1"/>-->
|
||||
<!-- <el-option label="JDBC" value="2"/>-->
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('data_source_config')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -158,7 +164,9 @@ import {Search, Refresh, Delete, Plus, Edit, Download} from '@element-plus/icons
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {downLoadExcel} from "@/utils/downloadZip";
|
||||
import Paging from "@/components/pagination/index.vue";
|
||||
|
||||
import {useCacheStore} from '@/stores/cache.js'
|
||||
const cacheStore = useCacheStore()
|
||||
cacheStore.setCacheKey(['data_source_config'])
|
||||
//查询参数
|
||||
const queryParams = reactive({
|
||||
dsName: '',
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-form-item label="状态" prop="state">
|
||||
<el-select v-model="queryParams.state" placeholder="操作状态" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in [{label:'成功',value: '0'},{label:'失败',value: '1'}]"
|
||||
v-for="item in cacheStore.getDict('common_state')"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -148,7 +148,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="操作状态:" prop="state">
|
||||
<tag dict-type="common_state" :value="form.state"/>
|
||||
<tag v-if="showTag" dict-type="common_state" :value="form.state"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -176,7 +176,7 @@ import {useCacheStore} from '@/stores/cache.js'
|
||||
import Paging from "@/components/pagination/index.vue";
|
||||
|
||||
const cacheStore = useCacheStore()
|
||||
cacheStore.setCacheKey(['oper_type'])
|
||||
cacheStore.setCacheKey(['oper_type','common_state'])
|
||||
import Tag from '@/components/Tag.vue'
|
||||
|
||||
const queryParams = reactive({
|
||||
@@ -196,6 +196,7 @@ const dateValue = ref();
|
||||
const total = ref();
|
||||
const operIds = ref([]);
|
||||
const disabled = ref(true);
|
||||
const showTag = ref(true);
|
||||
const isVisited = ref(false);
|
||||
const pageInfo = reactive({
|
||||
pageSize: 10,
|
||||
@@ -289,8 +290,13 @@ const handleSelect = async (selection) => {
|
||||
}
|
||||
//查看详情
|
||||
const handleViewDetails = async (operId) => {
|
||||
showTag.value=false
|
||||
nextTick(()=>{
|
||||
|
||||
})
|
||||
getOperateLogDetail(operId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
showTag.value=true
|
||||
isVisited.value = true;
|
||||
try {
|
||||
if (res.data.operParam !== null) {
|
||||
|
||||
@@ -98,6 +98,11 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1" v-if="form.menuType === 'B'">
|
||||
<el-form-item label="权限字符" prop="perms" required>
|
||||
<el-input v-model="form.perms"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1" v-if="form.menuType !== 'B'">
|
||||
<el-form-item label="路由地址" prop="path" required>
|
||||
<el-input v-model="form.path"></el-input>
|
||||
@@ -290,6 +295,16 @@ const handleEdit = async (menuId) => {
|
||||
title.value = '修改菜单'
|
||||
restFrom()
|
||||
await getMenuInfo(menuId).then(res => {
|
||||
if(form.value.isFrame==false){
|
||||
form.value.isFrame='0'
|
||||
}else {
|
||||
form.value.isFrame='1'
|
||||
}
|
||||
if(form.value.isCache==false){
|
||||
form.value.isCache='0'
|
||||
}else {
|
||||
form.value.isCache='1'
|
||||
}
|
||||
form.value = {...res.data}
|
||||
})
|
||||
await getMenuOpt(menuId).then(res => {
|
||||
@@ -321,6 +336,8 @@ const handleSubmit = async (instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if (!valid) return
|
||||
form.value.isFrame = form.value.isFrame !== '0';
|
||||
form.value.isCache = form.value.isCache !== '0';
|
||||
if (title.value === '新增菜单') {
|
||||
await addMenu(form.value).then(res => {
|
||||
if (res.code === 1000) {
|
||||
|
||||
Reference in New Issue
Block a user