Merge pull request '邓洁 : 修改页面细节' (#14) from dengjie into master

Reviewed-on: http://git.feashow.cn/feashow/tunnel-cloud-front/pulls/14
This commit is contained in:
odjbin
2023-11-08 14:37:15 +00:00
6 changed files with 25 additions and 25 deletions

View File

@@ -311,7 +311,9 @@ html, body, #app, .el-container, .el-aside, .el-main {
.scale { .scale {
margin-top: 10px; margin-top: 10px;
} }
.el-overlay-dialog{
left: 200px!important;
}
.el-overlay-dialog::-webkit-scrollbar, .scrollbar-dict::-webkit-scrollbar { .el-overlay-dialog::-webkit-scrollbar, .scrollbar-dict::-webkit-scrollbar {
width: 6px; width: 6px;
} }

View File

@@ -12,7 +12,8 @@ import {defineProps} from "vue";
const props = defineProps({ const props = defineProps({
dictType: { dictType: {
type: String, type: String,
default: "" default: "",
required:true
}, },
value: { value: {
type: Object, type: Object,
@@ -26,30 +27,30 @@ const tag = reactive({
label: "", label: "",
theme: "" theme: ""
}); });
const dictList = cacheStore.getDict(props.dictType); const dictList=ref()
const getDicList=async ()=>{
dictList.value =await cacheStore.getDict(props.dictType);
}
onMounted(async ()=>{
await getDicList()
await dictFormat();
})
const dictFormat = () => { const dictFormat = () => {
if (dictList === undefined) return; if (dictList.value === undefined) return;
let dictValue = '' let dictValue = ''
if (props.value === true || props.value === false) { if (props.value === true || props.value === false) {
dictValue = JSON.stringify(props.value) dictValue = JSON.stringify(props.value)
} else { } else {
dictValue = props.value dictValue = props.value
} }
for (let i = 0; i < dictList.length; i++) { dictList.value.forEach(item=>{
if (dictList[i].value == dictValue) { if(item.value==dictValue){
tag.label = dictList[i].label; tag.label = item.label;
tag.listClass = dictList[i].listClass; tag.listClass = item.listClass;
tag.isType = dictList[i].isType; tag.isType = item.isType;
tag.theme = dictList[i].theme; tag.theme = item.theme;
} }
} })
// for (let item of dictList) {
// if (item.value == props.value) {
// tag.label = item.label;
// tag.listClass = item.listClass;
// tag.isType = item.isType;
// }
// }
}; };
dictFormat(); dictFormat();

View File

@@ -18,10 +18,10 @@ export const useCacheStore = defineStore('cache',()=>{
}) })
} }
const getDict = (key) => { const getDict =async (key) => {
let dict let dict
if (!cacheKeyType.value.has(key) ) { if (!cacheKeyType.value.has(key) ) {
setCacheKey([key]) await setCacheKey([key])
} }
dict = cacheKeyType.value.get(key) dict = cacheKeyType.value.get(key)
return dict return dict

View File

@@ -32,6 +32,7 @@
:lazy="true" :lazy="true"
v-loading="loading" v-loading="loading"
@expand-change="expandChange" @expand-change="expandChange"
v-tabh
> >
<el-table-column prop="deptName" label="部门名称"/> <el-table-column prop="deptName" label="部门名称"/>
<el-table-column prop="orderNum" label="排序" width="60px"/> <el-table-column prop="orderNum" label="排序" width="60px"/>

View File

@@ -157,12 +157,10 @@
</el-row> </el-row>
</el-form> </el-form>
<template #footer> <template #footer>
<!-- <span>-->
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit(formInstance)"> <el-button type="primary" @click="handleSubmit(formInstance)">
确定 确定
</el-button> </el-button>
<!-- </span>-->
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
@@ -188,7 +186,6 @@ const loading = ref(true)
const list = ref([]) const list = ref([])
const tableTree = ref() const tableTree = ref()
const isExpand = ref(true) const isExpand = ref(true)
const deleteVisible = ref(false)
const isVisited = ref(false) const isVisited = ref(false)
const title = ref('') const title = ref('')
const form = ref({ const form = ref({
@@ -314,7 +311,6 @@ const handleDel = (menuId) => {
if (res.code === 1000) { if (res.code === 1000) {
ElMessage.success(res.msg) ElMessage.success(res.msg)
getList() getList()
deleteVisible.value = false
} else { } else {
ElMessage.error(res.msg) ElMessage.error(res.msg)
} }

View File

@@ -55,7 +55,7 @@
:data="list" :data="list"
row-key="dictId" row-key="dictId"
border border
height="68vh" height="60vh"
ref="singleTable" ref="singleTable"
v-loading="loading" v-loading="loading"
:header-cell-style="{'background':'#f5f7fa'}" :header-cell-style="{'background':'#f5f7fa'}"