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 +