|
@ -19,12 +19,30 @@ |
|
|
modifyPeriodicallabCount, |
|
|
modifyPeriodicallabCount, |
|
|
getperiodicallabById, |
|
|
getperiodicallabById, |
|
|
addPeriodicallabCount, |
|
|
addPeriodicallabCount, |
|
|
|
|
|
getDutyWorkplaceList, |
|
|
|
|
|
getadminDivisionList, |
|
|
} from './countStatistics.api'; |
|
|
} from './countStatistics.api'; |
|
|
|
|
|
|
|
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
|
|
import { useModalInner, BasicModal } from '@/components/Modal'; |
|
|
const [registerModal, { closeModal }] = useModalInner(init); |
|
|
const [registerModal, { closeModal }] = useModalInner(init); |
|
|
let id = ref(''); |
|
|
let id = ref(''); |
|
|
let emit = defineEmits(['exit']); |
|
|
let emit = defineEmits(['exit']); |
|
|
async function init(dataTo) { |
|
|
async function init(dataTo) { |
|
|
|
|
|
let dutyWorkplaceOption = await getDutyWorkplaceOptions(); |
|
|
|
|
|
let adminDivisionOption = await getadminDivisionOptions(); |
|
|
|
|
|
|
|
|
|
|
|
updateSchema({ |
|
|
|
|
|
field: 'dutyWorkplace', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
options: dutyWorkplaceOption, |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
updateSchema({ |
|
|
|
|
|
field: 'adminDivision', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
options: adminDivisionOption, |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
id.value = dataTo.id; |
|
|
id.value = dataTo.id; |
|
|
if (dataTo.id) { |
|
|
if (dataTo.id) { |
|
|
let res = await getperiodicallabById({ id: dataTo.id }); |
|
|
let res = await getperiodicallabById({ id: dataTo.id }); |
|
@ -33,30 +51,31 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
onMounted(async () => {}); |
|
|
onMounted(async () => {}); |
|
|
const [registerchangeFieldForm, { getFieldsValue, validate, setFieldsValue }] = useForm({ |
|
|
const [registerchangeFieldForm, { getFieldsValue, validate, setFieldsValue, updateSchema }] = |
|
|
//注册表单列 |
|
|
useForm({ |
|
|
schemas: countStatisticsFormSchema, |
|
|
//注册表单列 |
|
|
//自定义查询按钮的文本和图标 |
|
|
schemas: countStatisticsFormSchema, |
|
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
|
|
//自定义查询按钮的文本和图标 |
|
|
//自定义重置按钮的文本和图标 |
|
|
// submitButtonOptions: { text: '提交', preIcon: '' }, |
|
|
resetButtonOptions: { text: '取消' }, |
|
|
//自定义重置按钮的文本和图标 |
|
|
// showActionButtonGroup: false, |
|
|
resetButtonOptions: { text: '取消' }, |
|
|
//回车提交 |
|
|
// showActionButtonGroup: false, |
|
|
// autoSubmitOnEnter: true, |
|
|
//回车提交 |
|
|
// //不显示重置按钮 |
|
|
// autoSubmitOnEnter: true, |
|
|
// showResetButton: false, |
|
|
// //不显示重置按钮 |
|
|
//自定义提交按钮文本和图标 |
|
|
// showResetButton: false, |
|
|
submitButtonOptions: { text: '提交' }, |
|
|
//自定义提交按钮文本和图标 |
|
|
//查询列占比 24代表一行 取值范围 0-24 |
|
|
submitButtonOptions: { text: '提交' }, |
|
|
actionColOptions: { span: 14 }, |
|
|
//查询列占比 24代表一行 取值范围 0-24 |
|
|
//提交按钮的自定义事件 |
|
|
actionColOptions: { span: 14 }, |
|
|
// submitFunc: customSubmitFunc, |
|
|
//提交按钮的自定义事件 |
|
|
//重置按钮的自定义时间 |
|
|
// submitFunc: customSubmitFunc, |
|
|
resetFunc: customResetFunc, |
|
|
//重置按钮的自定义时间 |
|
|
labelCol: { style: { width: '120px' } }, |
|
|
resetFunc: customResetFunc, |
|
|
wrapperCol: { style: { width: 'auto' } }, |
|
|
labelCol: { style: { width: '120px' } }, |
|
|
// disabled:true |
|
|
wrapperCol: { style: { width: 'auto' } }, |
|
|
}); |
|
|
// disabled:true |
|
|
|
|
|
}); |
|
|
async function handleSubmit() { |
|
|
async function handleSubmit() { |
|
|
if (await validate()) { |
|
|
if (await validate()) { |
|
|
if (id.value) { |
|
|
if (id.value) { |
|
@ -68,12 +87,41 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
emit('exit'); |
|
|
emit('exit'); |
|
|
closeModal() |
|
|
closeModal(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
async function customResetFunc() { |
|
|
async function customResetFunc() { |
|
|
emit('exit'); |
|
|
emit('exit'); |
|
|
closeModal() |
|
|
closeModal(); |
|
|
|
|
|
} |
|
|
|
|
|
async function getDutyWorkplaceOptions() { |
|
|
|
|
|
let dutyWorkplaceOption = await getDutyWorkplaceList(); |
|
|
|
|
|
|
|
|
|
|
|
let uniqueList = [...new Set(dutyWorkplaceOption)]; |
|
|
|
|
|
|
|
|
|
|
|
let res = uniqueList.map((item) => { |
|
|
|
|
|
return { |
|
|
|
|
|
label: item, |
|
|
|
|
|
value: item, |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
console.log('wwres', res); |
|
|
|
|
|
|
|
|
|
|
|
return res; |
|
|
|
|
|
} |
|
|
|
|
|
async function getadminDivisionOptions() { |
|
|
|
|
|
let adminDivisionOption = await getadminDivisionList(); |
|
|
|
|
|
|
|
|
|
|
|
let uniqueList = [...new Set(adminDivisionOption)]; |
|
|
|
|
|
|
|
|
|
|
|
let res = uniqueList.map((item) => { |
|
|
|
|
|
return { |
|
|
|
|
|
label: item, |
|
|
|
|
|
value: item, |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
console.log('wres', res); |
|
|
|
|
|
return res; |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<style scoped></style> |
|
|
<style scoped></style> |
|
|