pull/176/head
贾博轩 1 year ago
commit 2256b416ac

8
components.d.ts vendored

@ -11,7 +11,6 @@ declare module 'vue' {
BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default']
DataHeader: typeof import('./src/components/DataHeader/index.vue')['default']
NAvatar: typeof import('naive-ui')['NAvatar']
NBackTop: typeof import('naive-ui')['NBackTop']
NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard']
NCheckbox: typeof import('naive-ui')['NCheckbox']
@ -22,8 +21,6 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi']
@ -35,7 +32,6 @@ declare module 'vue' {
NModal: typeof import('naive-ui')['NModal']
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
NotPassed: typeof import('./src/components/NotPassed.vue')['default']
NPopconfirm: typeof import('naive-ui')['NPopconfirm']
NPopover: typeof import('naive-ui')['NPopover']
NPopselect: typeof import('naive-ui')['NPopselect']
NProgress: typeof import('naive-ui')['NProgress']
@ -45,11 +41,7 @@ declare module 'vue' {
NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
NTimeline: typeof import('naive-ui')['NTimeline']
NTimelineItem: typeof import('naive-ui')['NTimelineItem']
NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger']

@ -14,7 +14,7 @@ export async function getFinalList(params: FinalParam) {
Object.keys(notEmptyParams).forEach((key) => {
const val = notEmptyParams[key]
if (key === 'izuptime') {
if (key === 'izyear') {
const start = formatToDate2(val[0])
const end = formatToDate2(val[1])
notEmptyParams[key] = `${start}-${end}`

@ -27,11 +27,11 @@ export const asideMap: Recordable<AsideEntity> = {
key: 'izstatus',
component: PlanVue, // todo
},
izuptime: {
izyear: {
label: '',
defaultValue: null,
isDefaultFilter: false,
key: 'izuptime',
key: 'izyear',
component: TimeVue,
},
iztaskrrom: {

@ -1,5 +1,6 @@
import type { AsideEntity } from './aside'
import { IzApprovalStatus, IzCustomlevel, IzCustomname, IzCustomtype, IzProductVue, IzProjectVue, IzProjecttype, IzShowAll, IzStatus, IzVisitcity, IzfirmVue, IztaskrromVue, IzvisitproVue, PictureDownloadVue, PlanVue, ReportUserVue, TimeVue } from '@/views/home/aside/comp/items'
import { defineAsyncComponent } from "vue"
export interface RowData {
id: string
@ -83,49 +84,56 @@ export const asideMap: Recordable<AsideEntity> = {
defaultValue: null,
isDefaultFilter: true,
key: 'izupuser',
component: ReportUserVue,
// component: ReportUserVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/ReportUser.vue")),
},
izproject: {
label: '所属项目',
defaultValue: null,
isDefaultFilter: true,
key: 'izproject',
component: IzProjectVue,
// component: IzProjectVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProject.vue")),
},
izplan: {
label: '所属计划',
defaultValue: null,
isDefaultFilter: true,
key: 'izplan',
component: PlanVue,
// component: PlanVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Plan.vue")),
},
izstatus: {
label: '审批状态',
defaultValue: null,
isDefaultFilter: false,
key: 'izstatus',
component: IzStatus, // todo
// component: IzStatus, // todo
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzStatus.vue")),
},
izuptime: {
izyear: {
label: '提报时间',
defaultValue: null,
isDefaultFilter: false,
key: 'izuptime',
component: TimeVue,
key: 'izyear',
// component: TimeVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Time.vue")),
},
iztaskrrom: {
label: '任务来源',
defaultValue: null,
isDefaultFilter: false,
key: 'iztaskrrom',
component: IztaskrromVue,
// component: IztaskrromVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Iztaskrrom.vue")),
},
izshowall: {
label: '显示全部任务数据',
defaultValue: false,
isDefaultFilter: false,
key: 'izshowall',
component: IzShowAll,
// component: IzShowAll,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzShowAll.vue")),
inFilterList: false,
},
}
@ -137,90 +145,103 @@ export const asideTaskMap: Recordable<AsideEntity> = {
defaultValue: null,
isDefaultFilter: true,
key: 'izApprovalStatus',
component: IzApprovalStatus, // todo
// component: IzApprovalStatus, // todo
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzApprovalStatus.vue")),
},
izuptime: {
label: '提报时间',
defaultValue: null,
isDefaultFilter: true,
key: 'izuptime',
component: TimeVue,
// component: TimeVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Time.vue")),
},
izupuser: {
label: '提报人',
defaultValue: null,
isDefaultFilter: true,
key: 'izupuser',
component: ReportUserVue,
// component: ReportUserVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/ReportUser.vue")),
},
iztaskrrom: {
label: '任务来源',
defaultValue: null,
isDefaultFilter: true,
key: 'iztaskrrom',
component: IztaskrromVue,
// component: IztaskrromVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Iztaskrrom.vue")),
},
izcustomname: {
label: '拜访客户',
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomname',
component: IzCustomname,
// component: IzCustomname,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomname.vue")),
},
izcustomtype: {
label: '客户类型',
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomtype',
component: IzCustomtype,
// component: IzCustomtype,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomtype.vue")),
},
izproject: {
label: '所属项目',
defaultValue: null,
isDefaultFilter: true,
key: 'izproject',
component: IzProjectVue,
// component: IzProjectVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProject.vue")),
},
izvisitpro: {
label: '拜访省份/直辖市',
defaultValue: null,
isDefaultFilter: true,
key: 'izvisitpro',
component: IzVisitcity,
// component: IzVisitcity,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzVisitcity.vue")),
},
izcustomlevel: {
label: '客户级别',
defaultValue: null,
isDefaultFilter: true,
key: 'izcustomlevel',
component: IzCustomlevel,
// component: IzCustomlevel,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzCustomlevel.vue")),
},
izprojecttype: {
label: '项目类别',
defaultValue: null,
isDefaultFilter: true,
key: 'izprojecttype',
component: IzProjecttype,
// component: IzProjecttype,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProjecttype.vue")),
},
izproductname: {
label: '产品名称',
defaultValue: null,
isDefaultFilter: true,
key: 'izproductname',
component: IzProductVue,
// component: IzProductVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/IzProduct.vue")),
},
izvisitcity: {
label: '拜访城市',
defaultValue: null,
isDefaultFilter: true,
key: 'izvisitcity',
component: IzvisitproVue,
// component: IzvisitproVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Izvisitpro.vue")),
},
izfirm: {
label: '厂商',
defaultValue: null,
isDefaultFilter: true,
key: 'izfirm',
component: IzfirmVue,
// component: IzfirmVue,
component: defineAsyncComponent(() => import("@/views/home/aside/comp/items/Izfirm.vue")),
},
}

@ -111,6 +111,12 @@ const layout = debounce(() => {
const clientHeight = el.value!.clientHeight
const top = scrollHeight - clientHeight - 20
el.value!.scrollTo({ top, behavior: 'instant' })
// let height = 800 - 15;
// const screenWidth = window.screen.width;
// if(screenWidth <= 1920) {
// height = 600 - 15;
// }
// el.value!.scrollTo({ top: height, behavior: 'instant' })
loading = false
console.log("loading---------------", loading);
})

@ -82,29 +82,24 @@ export const useFinalStore = defineStore({
},
// 获取系统配置信息
async fetchConfig() {
const response = await getConfig()
console.log("response.data----------", response.data);
this.setSystemConfig(response.data)
return response.data
// const response = await getConfig()
// console.log("response.data----------", response.data);
// this.setSystemConfig(response.data)
// return response.data
let list: any = {};
let tempAsideMap = cloneDeep(asideMap);
Object.keys(tempAsideMap).map(key => {
list[key] = "Y";
});
console.log("setSystemConfig---------------", list);
this.setSystemConfig(list);
return list
},
// // 获取终审个性化配置
// async fetchCustomConfig() {
// const res = await getFilter(1)
// const { data } = res
// const list = data && data.searchcount ? data.searchcount.split(',') : [];
// console.log("listkey---------------", list);
// this.customConfig = list
// return list
// },
// 获取终审个性化配置
async fetchCustomConfig() {
let list: any = [];
let tempAsideMap = cloneDeep(asideMap);
Object.keys(tempAsideMap).map(key => {
if(!tempAsideMap[key].isDefaultFilter) {
list.push(key);
}
});
const res = await getFilter(1)
const { data } = res
const list = data && data.searchcount ? data.searchcount.split(',') : [];
console.log("listkey---------------", list);
this.customConfig = list
return list

@ -49,7 +49,7 @@ export const useTaskStore = defineStore({
back() {
if (this.currentIndex === 0)
return
this.setActive(--this.currentIndex)
},
async fetchApprovalList(pagination) {

@ -36,6 +36,7 @@ const showItems = shallowRef<{ key: string; config: AsideEntity }[]>([]);
const initAsideValueRef = ref<any>(null); // ()
const customObjRef = ref<any>(null); //
const customTempObjRef = ref<any>(null); // ()
const configFilterRef = ref<any>([]); //
initAsideValueRef.value = cloneDeep(asideMap);
@ -113,36 +114,128 @@ onBeforeMount(async () => {
nextTick(()=>{
finalStore.$subscribe(() => {
// const customConfig = finalStore.getCustomConfig;
// console.log("customConfigaside---------------", customConfig);
// if (customConfig === null) return;
// const showKeys: string[] = [...customConfig];
// // const defaultKeys = Object.keys(asideMap).filter(
// // (key) => asideMap[key].isDefaultFilter
// // );
// // showKeys.unshift(...defaultKeys);
// Object.keys(asideMap).forEach((key) => {
// //
// if (key.startsWith("iz"))
// asideVisible[key] =
// asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter);
// });
// const items = showKeys.reduce((acc, key) => {
// if (asideMap[key]) {
// const config = {
// key,
// config: asideMap[key],
// };
// return [...acc, config];
// } else {
// return acc;
// }
// }, []);
// console.log("showItems111111111---------------", items);
// showItems.value = items;
const config = finalStore.getSystemConfig;
const customConfig = finalStore.getCustomConfig;
console.log("customConfig111111111---------------", customConfig);
if (customConfig === null) return;
const showKeys: string[] = [...customConfig];
const defaultKeys = Object.keys(asideMap).filter(
(key) => asideMap[key].isDefaultFilter
);
showKeys.unshift(...defaultKeys);
Object.keys(asideMap).forEach((key) => {
//
if (key.startsWith("iz"))
asideVisible[key] =
asideMap[key] && (showKeys.includes(key) || asideMap[key].isDefaultFilter);
if (
configFilterRef.value.length > 0 &&
isEqual(configFilterRef.value, finalStore.getFilterConfig) &&
customObjRef.value &&
isEqual(customObjRef.value, customTempObjRef.value)
) {
return;
}
if (config == null || customConfig == null) return;
// console.log("config", config, "customConfig", customConfig);
/* rao
const showKeys = [...customConfig].filter(key => !asideMap[key].isDefaultFilter)// customConfig isDefaultFilter
const defaultKeys = Object.keys(asideMap).filter(key => asideMap[key].isDefaultFilter)// asideMap isDefaultFilter
showKeys.unshift(...defaultKeys)
*/
let sortKeyList: any = [];
finalStore.getFilterConfig.map((item: any) => {
sortKeyList.push(item?.id);
});
const showKeys = [...sortKeyList];
Object.keys(config).forEach((key) => {
if (key.startsWith("iz") && asideMap[key] !== undefined)
asideVisible[key] =
(showKeys.includes(key) || asideMap[key].isDefaultFilter) && config[key] === "Y";
});
if (customObjRef.value) {
//
Object.keys(customObjRef.value).map((key) => {
if (asideMap.hasOwnProperty(key)) {
const str = key.toLowerCase();
// console.log("customObjRef.value[str]1111111111111", customObjRef.value[str]);
if (str == "izsimilarity") {
if (typeof customObjRef.value[str] == "string") {
customObjRef.value[str] = customObjRef.value[str].split(",");
}
asideValue[key] = customObjRef.value[str]; //
console.log("相似度2222222222", asideValue[key]);
} else if (str == "izyear") {
if (typeof customObjRef.value[str] == "string") {
let time = customObjRef.value[str].split("-");
time[0] = new Date(time[0]).getTime();
time[1] = new Date(time[1]).getTime();
customObjRef.value[str] = time;
}
asideValue[key] = customObjRef.value[str]; //
console.log("时间2222222222", asideValue[key]);
} else if (customObjRef.value[str]) {
console.log("customObjRef.value[str]222222", customObjRef.value[str]);
// let list = customObjRef.value[str].split(',');
// console.log("list222222", list);
if (typeof customObjRef.value[str] == "string") {
customObjRef.value[str] = customObjRef.value[str].split(",");
asideValue[key] = customObjRef.value[str]; //
}else {
asideValue[key] = customObjRef.value[str]; //
}
} else {
asideValue[key] = null;
}
// asideMap[str].defaultValue = customObjRef.value[str];//
}
});
customTempObjRef.value = customObjRef.value;
console.log("asideValue直接处理后的结果", asideValue);
console.log("customTempObjRef.value", customTempObjRef.value);
let tempobj = cloneDeep(asideValue);
console.log("tempObj", tempobj);
finalStore.setAsideValue(tempobj);
}
// console.log("showKeys", showKeys);
const items = showKeys.reduce((acc, key) => {
if (asideMap[key]) {
const config = {
key,
config: asideMap[key],
const currentData = asideMap[key];
const render = currentData?.render;
if (render !== false) {
const str = key?.toLowerCase();
const o = {
key: str,
config: asideMap[str],
};
return [...acc, config];
return [...acc, o];
} else {
return acc;
}
}, []);
console.log("showItems111111111---------------", items);
console.log("showItems=================================", items);
showItems.value = items;
configFilterRef.value = finalStore.getFilterConfig;
});
})
@ -197,9 +290,9 @@ function editFilter(filter: any) {
modal.edit(filter);
}
watch(asideValue, (newVal) => {
finalStore.setAsideValue(newVal);
});
// watch(asideValue, (newVal) => {
// finalStore.setAsideValue(newVal);
// });
const inputChange = (keyword) => {
emit("inputChange", keyword);
@ -214,6 +307,21 @@ const handleOk = (item: any) => {
filterHandler("");
}
};
function updateComponent(key, e) {
console.log("跟新值", key, e);
console.log("tempAsideValue跟新值", finalStore.getAsideValue, asideValue);
// let tempAsideValue = finalStore.getAsideValue || asideValue;
let tempobj = cloneDeep(asideValue);
console.log(tempobj, "tempobj");
tempobj[key] = e;
console.log(tempobj, "tempobj After");
customObjRef.value = tempobj;
// asideValue = Object.assign({}, asideValue, tempobj);
console.log("asideValue跟新值", tempobj);
finalStore.setAsideValue(tempobj);
}
</script>
<template>
@ -257,6 +365,7 @@ const handleOk = (item: any) => {
:key="index"
v-model:value="asideValue[item.key]"
:label="item.config.label"
@update:value="(e) => updateComponent(item.key, e)"
/>
<!-- 筛选 -->

@ -12,6 +12,14 @@ const finalStore = useFinal()
const checkAll = ref(false)
const selectIds = ref<string[]>([])
const tempList = ref<string[]>([])
let extraCustomConfig :any = [];
Object.keys(asideMap).forEach((key) => {
const { isDefaultFilter } = asideMap[key];
if (isDefaultFilter) {
extraCustomConfig.push(key);
}
});
function showModal() {
show.value = true
@ -21,6 +29,7 @@ function showModal() {
const customConfig = finalStore.getCustomConfig
console.log('开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------',config, customConfig)
console.log('开启了啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦筛选条件----------------',tempList.value, finalStore.getFilterConfig)
if (config == null || customConfig == null)
return
if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig))
@ -28,6 +37,7 @@ function showModal() {
const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
console.log("tempList.value开启了lllllllllllllllllll", showList, hideList);
if (tempList.value.length > 0)
finalStore.setFilterConfig(tempList.value)
@ -84,18 +94,43 @@ function generateDefaultList(config) {
function generatList(config, customConfig) {
const keys = Object.keys(config)
let onList: object[] = []
const offList: object[] = []
const showKeys = [...customConfig]
for (const key of keys) {
if (!key.startsWith('iz') || config[key] === 'N' || asideMap[key] === undefined)
continue
let offList: any = []
let showKeys = [];
const tempShowKeys = [...customConfig, ...extraCustomConfig];
tempShowKeys.map(item => {
if(!showKeys.includes(item)) {
showKeys.push(item);
}
});
console.log('原始筛选条件showKeys', showKeys)
console.log('原始筛选条件config customConfig', config, customConfig)
// for (const key of keys) {
// if (!key.startsWith('iz') || config[key] === 'N' || asideMap[key] === undefined)
// continue
// const name = asideMap[key]?.label
// const isDefaultFilter = asideMap[key]?.isDefaultFilter
// // Y
// if (!isDefaultFilter) {
// const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key)
// offList.push({
// id: key,
// name: name || '',
// fix: isDefaultFilter,
// checked: isChecked,
// })
// if (isChecked && !selectIds.value.includes(key))
// isChecked && selectIds.value.push(key)
// }
// }
Object.keys(asideMap).map(key => {
const name = asideMap[key]?.label
const isDefaultFilter = asideMap[key]?.isDefaultFilter
// Y
if (!isDefaultFilter) {
// if (!isDefaultFilter) {
const isChecked = asideMap[key].isDefaultFilter || showKeys.includes(key)
offList.push({
@ -106,14 +141,15 @@ function generatList(config, customConfig) {
})
if (isChecked && !selectIds.value.includes(key))
isChecked && selectIds.value.push(key)
}
}
// }
})
onList = showKeys.reduce((acc, key) => {
const isDefaultFilter = asideMap[key]?.isDefaultFilter
// && ()
if (config[key] === 'Y' && isDefaultFilter === false) {
// if (config[key] === 'Y') {
const config = {
id: key,
name: asideMap[key].label || '未配置',
@ -125,9 +161,10 @@ function generatList(config, customConfig) {
return acc
}
}, [])
console.log('原始筛选条件onList', onList)
const fixedList = generateDefaultList(config)
offList.unshift(...fixedList)
// offList.unshift(...fixedList)
console.log('原始筛选条件fixedList', fixedList)
onList.unshift(...fixedList)
console.log('原始筛选条件customConfig', customConfig)
// onListcustomConfig
@ -136,25 +173,30 @@ function generatList(config, customConfig) {
const sortKeyList: any = []
finalStore.getFilterConfig.map((item: any) => {
console.log("tFilterConfig item000000000000000", item);
sortKeyList.push(item.id)
})
console.log('原始筛选条件sortKeyList', sortKeyList)
console.log('原始筛选条件showKeys', showKeys)
const sortList: any = []
if (sortKeyList.length > 0) {
sortKeyList.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem)
if(tempItem) {
sortList.push(tempItem)
}
})
}
else {
customConfig.map((key) => {
showKeys.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
if(tempItem) {
sortList.push(tempItem)
}
})
}
console.log('原始筛选条件sortList', sortList)
console.log('原始筛选条件showList', sortList)
console.log('原始筛选条件hideList', offList)
console.log('原始筛选条件configStore.getFilterConfig', finalStore.getFilterConfig)
// return { showList: onList, hideList: offList }
return { showList: sortList, hideList: offList }
@ -166,19 +208,20 @@ finalStore.$subscribe(() => {
if (config == null || customConfig == null)
return
console.log('tempList.value-----------', tempList.value)
console.log('finalStore.getFilterConfig-----------', finalStore.getFilterConfig)
console.log('订阅tempList.value-----------', tempList.value)
console.log('订阅finalStore.getFilterConfig-----------', finalStore.getFilterConfig)
if (tempList.value.length > 0 && isEqual(tempList.value, finalStore.getFilterConfig))
return
const { showList, hideList } = generatList(config, customConfig)
tempList.value = cloneDeep(showList)
console.log('克隆条件', tempList.value)
console.log('订阅克隆条件', tempList.value)
if (tempList.value.length > 0)
finalStore.setFilterConfig(tempList.value)
// setTimeout(() => {
// }, 500);
console.log('订阅showList, hideList-----------', showList, hideList)
onList.value = showList
offList.value = hideList
})
@ -189,17 +232,19 @@ async function handleSumbit(e: MouseEvent) {
return item.id
}).join(',')
await setFilter({ searchcount: param, type: 0 })
await setFilter({ searchcount: param, type: 1 })
const obj = await finalStore.fetchCustomConfig()
console.log('obj-------------------------------', obj)
const tempOnList = cloneDeep(onList.value)
console.log('原始筛选条件tempOnList', tempOnList)
console.log('提交筛选条件tempOnList', tempOnList)
const sortList: any = []
obj.map((key) => {
const tempItem = tempOnList.find(item => item.id == key)
sortList.push(tempItem)
if(tempItem) {
sortList.push(tempItem)
}
})
console.log('finalStore.sortList---------------', sortList)
console.log('finalStore.sortList提交---------------', sortList)
// setTimeout(() => {
if (sortList.length > 0)
finalStore.setFilterConfig(sortList)

@ -126,7 +126,7 @@ function handleSumbit(e: MouseEvent) {
}
function formatValue(searchfield: string, searchvalue: any) {
if (searchfield === "izuptime") {
if (searchfield === "izyear") {
const start = formatToDate2(searchvalue[0]);
const end = formatToDate2(searchvalue[1]);
return `${start}-${end}`;
@ -138,7 +138,7 @@ function formatValue(searchfield: string, searchvalue: any) {
//
function unformatValue(searchfield: string, searchvalue: any) {
// 2022/01/03-2023/02/04
if (searchfield === "izuptime") {
if (searchfield === "izyear") {
const dataStrs = searchvalue.split("-");
const start = formatToDate3(dataStrs[0]);
const end = formatToDate3(dataStrs[1]);
@ -329,7 +329,7 @@ defineExpose({
placeholder="请选择"
:options="operatorOptions"
/>
<n-space v-if="item.type === 'izuptime'">
<n-space v-if="item.type === 'izyear'">
<n-date-picker
v-model:value="item.result"
style="margin-left: 8px; width: 240px"

@ -5,7 +5,9 @@ import { asideMap } from '@/config/aside'
import type { SearchEntity } from '/#/home'
import { useConfig } from '@/store/modules/asideConfig'
import { useRoute } from 'vue-router'
import { useFinal } from "@/store/modules/final";
const finalStore = useFinal();
const route = useRoute()
const searchContent = route.query.searchContent as string;
@ -59,6 +61,7 @@ function selectHandler(item: SearchEntity) {
//
const searchName = () => {
configStore.setSearchValue(searchKeyword.value);
finalStore.setSearchValue(searchKeyword.value);
emit('inputChange', searchKeyword.value);
}
@ -68,6 +71,7 @@ const searchName = () => {
const close = () => {
searchKeyword.value = "";
configStore.setSearchValue(searchKeyword.value);
finalStore.setSearchValue(searchKeyword.value);
emit('close');
}

@ -3,6 +3,7 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig()
@ -24,6 +25,27 @@ configUseStore.$subscribe(() => {
formValue.value.plans = [];
}
});
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['izproject']) {
if(typeof asideValue['izproject'] == "string") {
let list = asideValue['izproject'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izproject'];
}
console.log("formValue.value.izproject", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{
value: string[] | null
label: string

@ -3,6 +3,7 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig()
@ -24,6 +25,27 @@ configUseStore.$subscribe(() => {
formValue.value.plans = [];
}
});
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['izstatus']) {
if(typeof asideValue['izstatus'] == "string") {
let list = asideValue['izstatus'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izstatus'];
}
console.log("formValue.value.izstatus", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{
value: string[] | null
label: string

@ -3,6 +3,7 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import { type FormItemRule, type FormRules, faIR } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig()
@ -26,6 +27,27 @@ configUseStore.$subscribe(() => {
formValue.value.plans = [];
}
});
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['iztaskrrom']) {
if(typeof asideValue['iztaskrrom'] == "string") {
let list = asideValue['iztaskrrom'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['iztaskrrom'];
}
console.log("formValue.value.iztaskrrom", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{
value: string[] | null
label: string

@ -3,6 +3,7 @@ import { onBeforeMount, onMounted, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig()
@ -24,6 +25,27 @@ configUseStore.$subscribe(() => {
formValue.value.plans = [];
}
});
const finalStore = useFinal()
finalStore.$subscribe(() => {
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
let asideValue = finalStore.getAsideValue;
if(asideValue && asideValue['izplan']) {
if(typeof asideValue['izplan'] == "string") {
let list = asideValue['izplan'].split(',');
formValue.value.plans = list;
}else {
formValue.value.plans = asideValue['izplan'];
}
console.log("formValue.value.izplan", formValue.value.plans);
}else {
formValue.value.plans = [];
}
});
const props = defineProps<{
value: string[] | null
label: string

@ -3,6 +3,7 @@ import { onBeforeMount, onMounted, onUpdated, ref } from 'vue'
import type { FormItemRule, FormRules } from 'naive-ui'
import { useDictionary } from '@/store/modules/dictonary'
import { useConfig } from '@/store/modules/asideConfig'
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig()
@ -26,6 +27,27 @@ configUseStore.$subscribe(() => {
}
});
const finalStore = useFinal()
finalStore.$subscribe(() => {
let asideValue = finalStore.getAsideValue;
console.log("asideValue接受到的", asideValue);
if(isLoadValue.value) {
isLoadValue.value = false;
return
}
if(asideValue && asideValue['izupuser']) {
if(typeof asideValue['izupuser'] == "string") {
let list = asideValue['izupuser'].split(',');
formValue.value.users = list;
}else {
formValue.value.users = asideValue['izupuser'];
}
console.log("formValue.value.users222222222222222", formValue.value.users);
}else {
formValue.value.users = [];
}
});
const props = defineProps<{
value: string[] | null
label: string

@ -3,6 +3,7 @@ import dayjs from "dayjs";
import { onUpdated, watch } from "vue";
import { onMounted, ref } from "vue";
import { useConfig } from "@/store/modules/asideConfig";
import { useFinal } from '@/store/modules/final'
const configUseStore = useConfig();
@ -18,6 +19,23 @@ configUseStore.$subscribe(() => {
time.value = null;
}
});
const finalStore = useFinal()
finalStore.$subscribe(() => {
if (isLoadValue.value) {
isLoadValue.value = false;
return;
}
let asideValue = finalStore.getAsideValue;
console.log("asideValue izyear", asideValue);
if (asideValue && asideValue["izyear"]) {
time.value = asideValue["izyear"];
} else {
time.value = null;
}
});
const props = defineProps<{
value: [number, number] | null;
label: string;

@ -71,7 +71,7 @@ defineExpose({
</div>
<div class="item">
<SvgIcon name="modal_reImg" width="49" height="58" />
<div class="num_box">{{ 83 }}</div>
<div class="num_box">{{ toolsData?.repeat }}</div>
<div class="title_box">重复图片</div>
</div>
</div>

@ -76,7 +76,7 @@ async function fetchList() {
watch(
() => taskStore.activeId,
(newVal) => {
// activeId.value = newVal
activeId.value = newVal
},
)

@ -148,16 +148,12 @@ function handleKeydown(event) {
//
clearTimeout(keyPressTimer);
const item = taskDetailInfo.value;
if (
item?.userapprove?.statshis === 2 ||
item?.userapprove?.statshis == 3
) {
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
overTask.value = null;
return;
}
if (validate([item]) == null && batch.value === false)
overTask.value = item;
if (validate([item]) == null && batch.value === false) overTask.value = item;
//
approvalHandler();
@ -183,16 +179,12 @@ function handleKeydown(event) {
//
clearTimeout(keyPressTimer);
const item = taskDetailInfo.value;
if (
item?.userapprove?.statshis === 2 ||
item?.userapprove?.statshis == 3
) {
if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
overTask.value = null;
return;
}
if (validate([item]) == null && batch.value === false)
overTask.value = item;
if (validate([item]) == null && batch.value === false) overTask.value = item;
//
const modal = unref(notPassModalRef)! as any;
modal.showModal([taskDetailInfo.value]);
@ -265,8 +257,7 @@ function approvalHandler(items?: any) {
processItems = [cloneItem];
}
if (items !== undefined && !(items instanceof PointerEvent))
processItems = items;
if (items !== undefined && !(items instanceof PointerEvent)) processItems = items;
const msg = validate(processItems);
@ -520,9 +511,7 @@ function notPassSuccess(param) {
function reloadList(param, text) {
//
const id = currentTaskId();
const hasCurrentId = param.flowTaskInfoList.find(
(item) => item.formId === id
);
const hasCurrentId = param.flowTaskInfoList.find((item) => item.formId === id);
finalStore.setListKey();
if (hasCurrentId) emit("setAsideItemName", text);
@ -556,8 +545,7 @@ function overTaskHandelr(item: any) {
return;
}
if (validate([item]) == null && batchtwo.value === false)
overTasktwo.value = item;
if (validate([item]) == null && batchtwo.value === false) overTasktwo.value = item;
}
function closePassno() {
console.log(notPassModalRef.value);
@ -591,8 +579,7 @@ function checkBottom() {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
//
const clientHeight =
window.innerHeight || document.documentElement.clientHeight;
const clientHeight = window.innerHeight || document.documentElement.clientHeight;
//
const scrollHeight = document.documentElement.scrollHeight;
@ -661,18 +648,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
<div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<template v-if="!isDetail">
<SvgIcon
size="22"
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
<SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
</template>
</div>
<div v-if="!isDetail" class="right">
@ -769,9 +746,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
v-show="!imgbigshow"
:style="{
position: 'fixed',
height: '100vh',
zIndex: 169,
height: '100vh',
background: 'rgb(80, 122, 253)',
right: '16px',
marginTop: '5px',
@ -867,18 +842,10 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/>
</div>
<div class="mark">
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
<SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" />
</div>
<div class="mark">
<SvgIcon
v-show="taskDetailInfo?.iztrueorfalse === 1"
size="128"
name="zhen"
/>
<SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 1" size="128" name="zhen" />
</div>
<div class="big-mark" />
<div class="preview" @click="previewHandler">
@ -888,11 +855,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
<n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1">
<span>
<img
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
/>
<img class="icon-status" src="@/assets/images/task/status.png" alt="" />
</span>
</n-gi>
<n-gi span="8" class="gi2">
@ -911,39 +874,23 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span class="value num"
>{{ totalCount }}<span class="unit"></span>
</span>
<span class="value num">{{ totalCount }}<span class="unit"></span> </span>
<span class="label">相似匹配</span>
</n-gi>
</n-grid>
</div>
<div class="time">
<div class="time-item">
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="camera-time"
/>
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-"
}}</span>
<span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-" }}</span>
</div>
<div class="time-item time-item2">
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="submit-time"
/>
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.submitDateTimestamp)
)
? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp))
: "-"
}}</span>
</div>
@ -1043,12 +990,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/>
<div class="time">
<div class="time-item">
<SvgIcon
class="svg-time"
color="#FFF"
size="8"
name="camera-time"
/>
<SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
<span>{{
item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp))
@ -1056,12 +998,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
}}</span>
</div>
<div class="time-item time-item2">
<SvgIcon
class="svg-time"
color="#FFF"
size="8"
name="submit-time"
/>
<SvgIcon class="svg-time" color="#FFF" size="8" name="submit-time" />
<span>{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp))
@ -1143,16 +1080,10 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
{{ item[0].value }}
</div>
</div>
<div
v-if="!(item[0].label == '拜访终端名称')"
class="viewlabel"
>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewlabel">
{{ item[0].label }}
</div>
<div
v-if="!(item[0].label == '拜访终端名称')"
class="viewvalue"
>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewvalue">
{{ item[0].value }}
</div>
<div
@ -1195,11 +1126,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
<div v-else class="imgbottom">
<div
v-show="imgbigshow"
style="
display: flex;
justify-content: space-between;
padding: 12px 0px 3px 0;
"
style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0"
>
<div>
<span
@ -1223,36 +1150,16 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
>
<div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span>
<SvgIcon
v-if="true"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
/>
<SvgIcon v-if="true" style="margin-left: 5px" name="sort" size="12" />
<SvgIcon v-else style="margin-left: 5px" name="active-sort" size="12" />
</div>
<div
style="margin-left: 15px; cursor: pointer"
@click="sortHandler('similarityScore')"
>
<span>相似度排序</span>
<SvgIcon
v-if="true"
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
/>
<SvgIcon v-if="true" style="margin-left: 5px" name="sort" size="12" />
<SvgIcon v-else style="margin-left: 5px" name="active-sort" size="12" />
</div>
</div>
</div>
@ -1317,12 +1224,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/>
<div class="time">
<div class="time-item">
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="camera-time"
/>
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<span>{{
item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp))
@ -1330,12 +1232,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
}}</span>
</div>
<div class="time-item time-item2">
<SvgIcon
class="svg-time"
color="#FFF"
size="16"
name="submit-time"
/>
<SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
<span>{{
item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp))
@ -1343,10 +1240,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
}}</span>
</div>
</div>
<div
:class="{ 'percent-red': item.similarityScore === 100 }"
class="percent"
>
<div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
{{ item.similarityScore }}<span class="percent-unit">%</span>
</div>
</div>
@ -1433,16 +1327,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
</div>
</div> -->
</div>
<NotPassed
ref="notPassModalRef"
@success="notPassSuccess"
@close="closePassno"
/>
<BatchModal
ref="batchModalRef"
@reject="rejectHandler"
@approval="approvalHandler"
/>
<NotPassed ref="notPassModalRef" @success="notPassSuccess" @close="closePassno" />
<BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" />
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
</div>
</template>
@ -2151,11 +2037,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
.small-mark {
width: 100%;
height: 53px;
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0.01),
rgba(0, 0, 0, 0.44) 88%
);
background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.44) 88%);
border-radius: 0px 8px 8px 8px;
position: absolute;
left: 0;

@ -905,14 +905,14 @@ defineExpose({
.left {
flex: 0.6;
background-size: auto 346px;
// background-size: auto 346px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
border-radius: 8px;
position: relative;
width: 632px;
height: 346px;
// width: 632px;
// height: 346px;
.preview {
position: absolute;

Loading…
Cancel
Save