You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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: 'dutyWorkplace',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '行政区划',
|
|
|
|
dataIndex: 'adminDivision',
|
|
|
|
width: 150,
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '已提交稿件数量',
|
|
|
|
dataIndex: 'countNumber',
|
|
|
|
width: 150,
|
|
|
|
sorter: true,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
|
|
{
|
|
|
|
label: '责任单位',
|
|
|
|
field: 'dutyWorkplace',
|
|
|
|
component: 'Input',
|
|
|
|
colProps: { span: 6 },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '行政区划',
|
|
|
|
field: 'adminDivision',
|
|
|
|
component: 'Input',
|
|
|
|
colProps: { span: 6 },
|
|
|
|
},
|
|
|
|
]
|
|
|
|
export const countStatisticsFormSchema: FormSchema[] = [
|
|
|
|
{label:"id",
|
|
|
|
field: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
show:false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '责任单位',
|
|
|
|
field: 'dutyWorkplace',
|
|
|
|
required: true,
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options:await getDutyWorkplaceOptions()
|
|
|
|
},
|
|
|
|
colProps: { span:12},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '行政区划',
|
|
|
|
field: 'adminDivision',
|
|
|
|
required: true,
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options:await getadminDivisionOptions()
|
|
|
|
},
|
|
|
|
colProps: { span:12 },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '已提交稿件数量',
|
|
|
|
field: 'countNumber',
|
|
|
|
component: 'InputNumber',
|
|
|
|
required: true,
|
|
|
|
colProps: { span: 12 },
|
|
|
|
}
|
|
|
|
];
|