邓洁 : 修改页面细节

This commit is contained in:
邓洁
2023-11-08 22:36:54 +08:00
parent fa4af69d4c
commit 1c354f542e
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 {
margin-top: 10px;
}
.el-overlay-dialog{
left: 200px!important;
}
.el-overlay-dialog::-webkit-scrollbar, .scrollbar-dict::-webkit-scrollbar {
width: 6px;
}

View File

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

View File

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

View File

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

View File

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

View File

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