feat: 修改bug

pull/173/head
raofuzi 1 year ago
parent 39e4d383fe
commit f5cc60e423

8
components.d.ts vendored

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

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

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

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

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

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

Loading…
Cancel
Save