|
|
|
@ -13,6 +13,7 @@ import type { AsideConfig } from '/#/api'
|
|
|
|
|
import emitter from '@/utils/mitt'
|
|
|
|
|
import { getFilterList } from '@/api/home/main'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import { cloneDeep } from 'lodash-es'
|
|
|
|
|
|
|
|
|
|
const configStore = useConfig()
|
|
|
|
|
|
|
|
|
@ -27,6 +28,7 @@ Object.keys(asideMap).forEach((key) => {
|
|
|
|
|
const entity = asideMap[key]
|
|
|
|
|
const { defaultValue } = entity
|
|
|
|
|
asideValue[key] = defaultValue
|
|
|
|
|
console.log("asideMap和asideValue", asideValue);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const filterModalRef = ref(null)
|
|
|
|
@ -119,8 +121,8 @@ configStore.$subscribe(() => {
|
|
|
|
|
console.log("时间2222222222", customObjRef.value[str]);
|
|
|
|
|
}else if((str != 'izsimilarity' && str != "izyear") && customObjRef.value[str]) {
|
|
|
|
|
console.log("customObjRef.value[str]222222", customObjRef.value[str]);
|
|
|
|
|
let list = customObjRef.value[str].split(',');
|
|
|
|
|
console.log("list222222", list);
|
|
|
|
|
// let list = customObjRef.value[str].split(',');
|
|
|
|
|
// console.log("list222222", list);
|
|
|
|
|
asideValue[key] = customObjRef.value[str];// 赋值
|
|
|
|
|
}else {
|
|
|
|
|
asideValue[key] = null;
|
|
|
|
@ -194,6 +196,14 @@ function editFilter(filter: any) {
|
|
|
|
|
modal.edit(filter)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateComponent(key, e) {
|
|
|
|
|
console.log("跟新值", key, e);
|
|
|
|
|
let tempobj = cloneDeep(asideValue);
|
|
|
|
|
tempobj[key] = e;
|
|
|
|
|
customObjRef.value = tempobj;
|
|
|
|
|
Object.assign(asideValue, tempobj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
watch(asideValue, (newVal) => {
|
|
|
|
|
console.log("asideValue处理后", newVal);
|
|
|
|
|
configStore.setAsideValue(newVal)
|
|
|
|
@ -220,7 +230,7 @@ watch(asideValue, (newVal) => {
|
|
|
|
|
|
|
|
|
|
<component
|
|
|
|
|
:is="item.config.component" v-for="(item, index) in showItems" :id="item.key" :key="index" v-model:value="asideValue[item.key]"
|
|
|
|
|
:label="item.config.label"
|
|
|
|
|
:label="item.config.label" @update:value="e=>updateComponent(item.key, e)"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 过滤列表 -->
|
|
|
|
|