标题优化
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { FormProps, FormSchema } from '/@/components/Form';
|
||||
import { BasicColumn } from '/@/components/Table';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
const defaultDate = [dayjs().subtract(6, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')];
|
||||
export const formConfig = {
|
||||
useCustomConfig: false,
|
||||
};
|
||||
@ -10,6 +11,7 @@ export const searchFormSchema: FormSchema[] = [
|
||||
field: 'dateAppro',
|
||||
label: '拟稿日期',
|
||||
component: 'RangePicker',
|
||||
defaultValue: defaultDate,
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
import useEventBus from '/@/hooks/event/useEventBus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
@ -113,7 +114,8 @@
|
||||
const visibleFlowRecordModal = ref(false);
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const formName='签报';
|
||||
const [registerTable, { reload, }] = useTable({
|
||||
const defaultDate = ref([dayjs().subtract(6, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]);
|
||||
const [registerTable, { reload, getForm }] = useTable({
|
||||
title: '' || (formName + '列表'),
|
||||
api: getLngApproPage,
|
||||
rowKey: 'id',
|
||||
@ -122,10 +124,55 @@
|
||||
rowProps: {
|
||||
gutter: 16,
|
||||
},
|
||||
schemas: customSearchFormSchema,
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true],],
|
||||
schemas: [
|
||||
{
|
||||
field: 'dateAppro',
|
||||
label: '拟稿日期',
|
||||
component: 'RangePicker',
|
||||
defaultValue: defaultDate.value,
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
label: '标题/编号',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
field: 'typeCode',
|
||||
label: '签报类型',
|
||||
component: 'XjrSelect',
|
||||
componentProps: {
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '2001500486723887105' },
|
||||
labelField: 'name',
|
||||
valueField: 'value',
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'approCode',
|
||||
label: '审批状态',
|
||||
component: 'XjrSelect',
|
||||
componentProps: {
|
||||
datasourceType: 'dic',
|
||||
params: { itemId: '1990669393069129729' },
|
||||
labelField: 'name',
|
||||
valueField: 'value',
|
||||
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
}
|
||||
],
|
||||
fieldMapToTime: [['dateAppro', ['startDate', 'endDate'], 'YYYY-MM-DD ', true],],
|
||||
showResetButton: true,
|
||||
},
|
||||
immediate: false,
|
||||
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit};
|
||||
},
|
||||
@ -160,7 +207,7 @@
|
||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: formName,
|
||||
formName: '查看'+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
readonly: 1,
|
||||
@ -172,7 +219,7 @@
|
||||
query: {
|
||||
readonly: 1,
|
||||
taskId: '',
|
||||
formName: formName,
|
||||
formName: '查看'+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id,
|
||||
}
|
||||
@ -183,7 +230,7 @@
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formName: '查看'+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id,
|
||||
@ -214,7 +261,11 @@
|
||||
function handleAdd() {
|
||||
if (schemaIdComputedRef.value) {
|
||||
router.push({
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow'
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: '新建'+formName,
|
||||
}
|
||||
});
|
||||
} else {
|
||||
router.push({
|
||||
@ -234,7 +285,7 @@
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formName: '编辑'+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'edit',
|
||||
id: record.id
|
||||
@ -259,7 +310,7 @@
|
||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||
query: {
|
||||
formPath: 'approve/Appro',
|
||||
formName: formName,
|
||||
formName: '变更'+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
type:'update',
|
||||
id: record.id,
|
||||
@ -275,7 +326,7 @@
|
||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
||||
query: {
|
||||
taskId: taskIds[0],
|
||||
formName: formName,
|
||||
formName: '审批'+formName,
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.id
|
||||
}
|
||||
@ -318,6 +369,7 @@
|
||||
|
||||
}
|
||||
onMounted(() => {
|
||||
reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }});
|
||||
|
||||
if (schemaIdComputedRef.value) {
|
||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
||||
@ -499,6 +551,13 @@
|
||||
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
|
||||
width: 80px !important;
|
||||
}
|
||||
:deep( .ant-col-8:nth-child(4)) {
|
||||
width: 320px !important;
|
||||
max-width: 320px !important;;
|
||||
}
|
||||
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
||||
width: 80px !important;
|
||||
}
|
||||
.show{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user