邓洁 : 修改页面细节
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
:data="list"
|
||||
row-key="dictId"
|
||||
border
|
||||
height="68vh"
|
||||
height="60vh"
|
||||
ref="singleTable"
|
||||
v-loading="loading"
|
||||
:header-cell-style="{'background':'#f5f7fa'}"
|
||||
|
||||
Reference in New Issue
Block a user