From 1247c287b7b6472cc96b71ba23628a815f80cc10 Mon Sep 17 00:00:00 2001 From: zhouhaibin Date: Mon, 24 Jun 2024 11:10:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=9F=E8=AE=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../countStatistics/countStatistics.api.ts | 12 +- .../countStatistics/countStatistics.data.ts | 69 +++++++--- .../informationSub/countStatistics/index.vue | 115 +++++++++-------- .../countStatistics/modifycountStatistics.vue | 121 ++++++++++-------- 4 files changed, 199 insertions(+), 118 deletions(-) diff --git a/src/views/informationSub/countStatistics/countStatistics.api.ts b/src/views/informationSub/countStatistics/countStatistics.api.ts index 5684f45..2f37e1b 100644 --- a/src/views/informationSub/countStatistics/countStatistics.api.ts +++ b/src/views/informationSub/countStatistics/countStatistics.api.ts @@ -4,7 +4,12 @@ export enum Api { periodicallabCountPageList = '/huzhouPeriodicallabCount/periodicallabCountPageList', getperiodicallabById = '/huzhouPeriodicallabCount/getperiodicallabById', - modifyPeriodicallabCount='/huzhouPeriodicallabCount/modifyPeriodicallabCount' + modifyPeriodicallabCount='/huzhouPeriodicallabCount/modifyPeriodicallabCount', + addPeriodicallabCount="/huzhouPeriodicallabCount/addPeriodicallabCount", + deletePeriodicallabCount="/huzhouPeriodicallabCount/deletePeriodicallabCount", + + getadminDivisionList="/huzhouProject/getadminDivisionList", + getDutyWorkplaceList="/huzhouProject/getDutyWorkplaceList", } /** @@ -14,6 +19,11 @@ export const periodicallabCountPageList = (params?) =>defHttp.get({ url: Api.pe export const getperiodicallabById = (params?) =>defHttp.get({ url: Api.getperiodicallabById, params }); export const modifyPeriodicallabCount = (params?) =>defHttp.post({ url: Api.modifyPeriodicallabCount, params }); +export const deletePeriodicallabCount = (params?) =>defHttp.post({ url: Api.deletePeriodicallabCount, params }); +export const addPeriodicallabCount = (params?) =>defHttp.post({ url: Api.addPeriodicallabCount, params }); + +export const getDutyWorkplaceList = (params?) =>defHttp.get({ url: Api.getDutyWorkplaceList, params }); +export const getadminDivisionList = (params?) =>defHttp.get({ url: Api.getadminDivisionList, params }); diff --git a/src/views/informationSub/countStatistics/countStatistics.data.ts b/src/views/informationSub/countStatistics/countStatistics.data.ts index 1335b2a..d0156e0 100644 --- a/src/views/informationSub/countStatistics/countStatistics.data.ts +++ b/src/views/informationSub/countStatistics/countStatistics.data.ts @@ -1,23 +1,53 @@ import { FormSchema } from '@/components/Form'; import { BasicColumn } from '@/components/Table'; import { useDictStore } from '@/store/modules/dict'; +import { getDutyWorkplaceList, getadminDivisionList } from './countStatistics.api'; +import { get } from 'sortablejs'; +let dutyWorkplaceOption=[] +let adminDivisionOption=[] +async function getDutyWorkplaceOptions() { + let list = await getDutyWorkplaceList(); + let uniqueList = [...new Set(list)]; + let res= uniqueList.map(item => { + return { + label: item, + value: item + } +}) +console.log("wwres",res) + +return res +} +async function getadminDivisionOptions() { + let list = await getadminDivisionList(); + let uniqueList = [...new Set(list)]; + + let res= uniqueList.map(item => { + return { + label: item, + value: item + } + }) + console.log("wres",res) + return res +} export const countStatisticsColumns: BasicColumn[] = [ { title: '责任单位', width: 150, - dataIndex: 'fieldName', + dataIndex: 'dutyWorkplace', }, { title: '行政区划', - dataIndex: 'ischange', + dataIndex: 'adminDivision', width: 150, }, { title: '已提交稿件数量', - dataIndex: 'isuploadfile', + dataIndex: 'countNumber', width: 150, sorter: true, @@ -29,42 +59,47 @@ export const countStatisticsColumns: BasicColumn[] = [ export const searchFormSchema: FormSchema[] = [ { label: '责任单位', - field: 'fieldName', + field: 'dutyWorkplace', component: 'Input', colProps: { span: 6 }, }, { label: '行政区划', - field: 'fieldName', + field: 'adminDivision', component: 'Input', colProps: { span: 6 }, }, ] export const countStatisticsFormSchema: FormSchema[] = [ + {label:"id", + field: 'id', + component: 'Input', + show:false, + }, { label: '责任单位', - field: 'fieldName', - component: 'Input', - dynamicDisabled: true, + field: 'dutyWorkplace', + required: true, + component: 'Select', + componentProps: { + options:await getDutyWorkplaceOptions() + }, colProps: { span:12}, }, { label: '行政区划', - field: 'ischange', - component: 'DictSelect', + field: 'adminDivision', + required: true, + component: 'Select', componentProps: { - dictType: 'whether', + options:await getadminDivisionOptions() }, - dynamicDisabled: true, colProps: { span:12 }, }, { label: '已提交稿件数量', - field: 'isuploadfile', - component: 'DictSelect', - componentProps: { - dictType: 'whether', - }, + field: 'countNumber', + component: 'InputNumber', required: true, colProps: { span: 12 }, } diff --git a/src/views/informationSub/countStatistics/index.vue b/src/views/informationSub/countStatistics/index.vue index f152449..56e1f4f 100644 --- a/src/views/informationSub/countStatistics/index.vue +++ b/src/views/informationSub/countStatistics/index.vue @@ -1,6 +1,5 @@ + - - - + - - \ No newline at end of file + diff --git a/src/views/informationSub/countStatistics/modifycountStatistics.vue b/src/views/informationSub/countStatistics/modifycountStatistics.vue index 54f7c82..a23f1c0 100644 --- a/src/views/informationSub/countStatistics/modifycountStatistics.vue +++ b/src/views/informationSub/countStatistics/modifycountStatistics.vue @@ -1,58 +1,79 @@ - \ No newline at end of file +