Commit e48147f8c8b002188dfc918106c62a7bcff2cbbe
1 parent
6094d271
feat: 新增审核搜索&首页图高度调整
Showing
6 changed files
with
206 additions
and
277 deletions
src/views/dashboard/analysis/components/VisitAnalysis.vue
1 | 1 | <template> |
2 | - <div ref="chartRef" :style="{ height, width }"></div> | |
2 | + <div ref="chartRef" :style="{ height: '500px', width }"></div> | |
3 | 3 | </template> |
4 | 4 | |
5 | 5 | <script lang="ts" setup> |
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | { |
49 | 49 | type: 'value', |
50 | 50 | max: maxY + 20, |
51 | - splitNumber: 4, | |
51 | + splitNumber: 20, | |
52 | 52 | axisTick: { |
53 | 53 | show: false, |
54 | 54 | }, | ... | ... |
src/views/project/approve/FieldPanel.vue
1 | 1 | <template> |
2 | - <PageWrapper contentBackground> | |
3 | - <BasicTable @register="registerTable"> | |
4 | - <template #form-custom> custom-slot </template> | |
5 | - | |
6 | - <template #bodyCell="{ column, record }"> | |
7 | - <template v-if="column.key === 'picUrl'"> | |
8 | - <img | |
9 | - :width="100" | |
10 | - :height="100" | |
11 | - :src="record?.orderBaseInfo?.smallPicUrl" | |
12 | - @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
13 | - /> | |
14 | - </template> | |
15 | - <template v-if="column.key === 'action'"> | |
16 | - <TableAction | |
17 | - :actions="[ | |
18 | - { | |
19 | - label: '详情', | |
20 | - // icon: 'ic:outline-delete-outline', | |
21 | - onClick: handleDetail.bind(null, record), | |
22 | - }, | |
23 | - ]" | |
24 | - /> | |
25 | - </template> | |
2 | + <BasicTable @register="registerTable" className="p-0"> | |
3 | + <template #bodyCell="{ column, record }"> | |
4 | + <template v-if="column.key === 'picUrl'"> | |
5 | + <img | |
6 | + :width="50" | |
7 | + :height="50" | |
8 | + :src="record?.orderBaseInfo?.smallPicUrl" | |
9 | + @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
10 | + /> | |
11 | + </template> | |
12 | + <template v-if="column.key === 'action'"> | |
13 | + <TableAction | |
14 | + :actions="[ | |
15 | + { | |
16 | + label: '详情', | |
17 | + // icon: 'ic:outline-delete-outline', | |
18 | + onClick: handleDetail.bind(null, record), | |
19 | + }, | |
20 | + ]" | |
21 | + /> | |
26 | 22 | </template> |
27 | - </BasicTable> | |
28 | - <BasicDrawer | |
29 | - width="500" | |
30 | - :showFooter="!isApproved && role === ROLE.ADMIN" | |
31 | - @register="registerDrawer" | |
32 | - title="申请信息" | |
33 | - okText="通过" | |
34 | - @ok="handleTrue" | |
35 | - > | |
36 | - <BaseInfo :baseInfos="baseInfos" /> | |
37 | - <h2 className="mt-8">基本信息申请字段</h2> | |
38 | - <div>{{ fieldInfos.baseFields.join(' , ') }}</div> | |
23 | + </template> | |
24 | + </BasicTable> | |
25 | + <BasicDrawer | |
26 | + width="500" | |
27 | + :showFooter="!isApproved && role === ROLE.ADMIN" | |
28 | + @register="registerDrawer" | |
29 | + title="申请信息" | |
30 | + okText="通过" | |
31 | + @ok="handleTrue" | |
32 | + > | |
33 | + <BaseInfo :baseInfos="baseInfos" /> | |
34 | + <h2 className="mt-8">基本信息申请字段</h2> | |
35 | + <div>{{ fieldInfos.baseFields.join(' , ') }}</div> | |
39 | 36 | |
40 | - <h2 className="mt-8">利润分析表申请字段</h2> | |
41 | - <div> | |
42 | - {{ fieldInfos.profitFields.join(' , ') }} | |
43 | - </div> | |
37 | + <h2 className="mt-8">利润分析表申请字段</h2> | |
38 | + <div> | |
39 | + {{ fieldInfos.profitFields.join(' , ') }} | |
40 | + </div> | |
44 | 41 | |
45 | - <h2 className="mt-8">项目报告书申请字段</h2> | |
46 | - <div> | |
47 | - <span>{{ fieldInfos.reportFields.join(' , ') }}</span> | |
48 | - </div> | |
42 | + <h2 className="mt-8">项目报告书申请字段</h2> | |
43 | + <div> | |
44 | + <span>{{ fieldInfos.reportFields.join(' , ') }}</span> | |
45 | + </div> | |
49 | 46 | |
50 | - <h2 className="mt-8">跟单信息申请字段</h2> | |
51 | - <div> | |
52 | - <span>{{ fieldInfos.trackStageFields.join(' , ') }}</span> | |
53 | - </div> | |
47 | + <h2 className="mt-8">跟单信息申请字段</h2> | |
48 | + <div> | |
49 | + <span>{{ fieldInfos.trackStageFields.join(' , ') }}</span> | |
50 | + </div> | |
54 | 51 | |
55 | - <h2 className="mt-8">质量检测申请字段</h2> | |
56 | - <div> | |
57 | - <span>{{ fieldInfos.inspectionStageFields.join(' , ') }}</span> | |
58 | - </div> | |
59 | - <template #appendFooter> | |
60 | - <a-button @click="handleFalse"> 不通过</a-button> | |
61 | - </template> | |
62 | - </BasicDrawer> | |
63 | - <MsgModal v-if="msgVisible" @msg-modal-close="handleMsgModalClose" /> | |
64 | - </PageWrapper> | |
52 | + <h2 className="mt-8">质量检测申请字段</h2> | |
53 | + <div> | |
54 | + <span>{{ fieldInfos.inspectionStageFields.join(' , ') }}</span> | |
55 | + </div> | |
56 | + <template #appendFooter> | |
57 | + <a-button @click="handleFalse"> 不通过</a-button> | |
58 | + </template> | |
59 | + </BasicDrawer> | |
60 | + <MsgModal v-if="msgVisible" @msg-modal-close="handleMsgModalClose" /> | |
65 | 61 | </template> |
66 | 62 | <script lang="ts"> |
67 | 63 | import MsgModal from './MsgModal.vue'; |
68 | 64 | import { computed, defineComponent, ref } from 'vue'; |
69 | 65 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
70 | - import { PageWrapper } from '/@/components/Page'; | |
71 | 66 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; |
72 | 67 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; |
73 | 68 | import { |
... | ... | @@ -82,12 +77,12 @@ |
82 | 77 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
83 | 78 | import BaseInfo from './BaseInfo.vue'; |
84 | 79 | import { createImgPreview } from '/@/components/Preview'; |
80 | + import { getFormConfig } from './data'; | |
85 | 81 | |
86 | 82 | const userStore = useUserStoreWithOut(); |
87 | 83 | |
88 | 84 | export default defineComponent({ |
89 | 85 | components: { |
90 | - PageWrapper, | |
91 | 86 | BasicTable, |
92 | 87 | BasicDrawer, |
93 | 88 | TableAction, |
... | ... | @@ -153,12 +148,12 @@ |
153 | 148 | } |
154 | 149 | |
155 | 150 | const [registerTable, { reload }] = useTable({ |
151 | + scroll: false, | |
156 | 152 | api: props.isApproved ? getApprovedListApi : getWaitListApi, |
157 | 153 | searchInfo: { type: 0 }, |
158 | - | |
159 | 154 | columns, |
160 | - // useSearchForm: true, | |
161 | - // formConfig: getFormConfig(), | |
155 | + useSearchForm: true, | |
156 | + formConfig: getFormConfig(), | |
162 | 157 | rowKey: 'id', |
163 | 158 | actionColumn: { |
164 | 159 | width: 160, | ... | ... |
src/views/project/approve/ProfitPanel.vue
1 | 1 | <template> |
2 | - <PageWrapper contentBackground> | |
3 | - <BasicTable @register="registerTable"> | |
4 | - <template #form-custom> custom-slot </template> | |
5 | - <template #bodyCell="{ column, record }"> | |
6 | - <template v-if="column.key === 'picUrl'"> | |
7 | - <img | |
8 | - :width="100" | |
9 | - :height="100" | |
10 | - :src="record?.orderBaseInfo?.smallPicUrl" | |
11 | - @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
12 | - /> | |
13 | - </template> | |
14 | - <template v-if="column.key === 'action'"> | |
15 | - <TableAction | |
16 | - :actions="[ | |
17 | - { | |
18 | - label: '详情', | |
19 | - // icon: 'ic:outline-delete-outline', | |
20 | - onClick: handleDetail.bind(null, record), | |
21 | - }, | |
22 | - ]" | |
23 | - /> | |
24 | - </template> | |
2 | + <BasicTable @register="registerTable" className="p-0"> | |
3 | + <template #form-custom> custom-slot </template> | |
4 | + <template #bodyCell="{ column, record }"> | |
5 | + <template v-if="column.key === 'picUrl'"> | |
6 | + <img | |
7 | + :width="50" | |
8 | + :height="50" | |
9 | + :src="record?.orderBaseInfo?.smallPicUrl" | |
10 | + @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
11 | + /> | |
25 | 12 | </template> |
26 | - </BasicTable> | |
27 | - <BasicDrawer | |
28 | - :showFooter="!isApproved && role === ROLE.ADMIN" | |
29 | - @register="registerDrawer" | |
30 | - title="申请信息" | |
31 | - okText="通过" | |
32 | - @ok="handleTrue" | |
33 | - > | |
34 | - <BaseInfo :baseInfos="baseInfos" /> | |
35 | - <h2>利润分析信息</h2> | |
36 | - <div v-for="field in fieldInfos" :key="field"> | |
37 | - <span className="w-[140px] inline-block text-right mr-3">{{ field.label }}:</span | |
38 | - ><span>{{ field.value }}</span> | |
39 | - </div> | |
40 | - <template #appendFooter> | |
41 | - <a-button @click="handleFalse"> 不通过</a-button> | |
13 | + <template v-if="column.key === 'action'"> | |
14 | + <TableAction | |
15 | + :actions="[ | |
16 | + { | |
17 | + label: '详情', | |
18 | + // icon: 'ic:outline-delete-outline', | |
19 | + onClick: handleDetail.bind(null, record), | |
20 | + }, | |
21 | + ]" | |
22 | + /> | |
42 | 23 | </template> |
43 | - </BasicDrawer> | |
44 | - <MsgModal v-if="msgVisible" @msg-modal-close="handleMsgModalClose" /> | |
45 | - </PageWrapper> | |
24 | + </template> | |
25 | + </BasicTable> | |
26 | + <BasicDrawer | |
27 | + :showFooter="!isApproved && role === ROLE.ADMIN" | |
28 | + @register="registerDrawer" | |
29 | + title="申请信息" | |
30 | + okText="通过" | |
31 | + @ok="handleTrue" | |
32 | + > | |
33 | + <BaseInfo :baseInfos="baseInfos" /> | |
34 | + <h2>利润分析信息</h2> | |
35 | + <div v-for="field in fieldInfos" :key="field"> | |
36 | + <span className="w-[140px] inline-block text-right mr-3">{{ field.label }}:</span | |
37 | + ><span>{{ field.value }}</span> | |
38 | + </div> | |
39 | + <template #appendFooter> | |
40 | + <a-button @click="handleFalse"> 不通过</a-button> | |
41 | + </template> | |
42 | + </BasicDrawer> | |
43 | + <MsgModal v-if="msgVisible" @msg-modal-close="handleMsgModalClose" /> | |
46 | 44 | </template> |
47 | 45 | <script lang="ts"> |
48 | 46 | import MsgModal from './MsgModal.vue'; |
49 | 47 | import { computed, defineComponent, ref } from 'vue'; |
50 | 48 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
51 | - import { PageWrapper } from '/@/components/Page'; | |
52 | 49 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; |
53 | 50 | |
54 | 51 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; |
... | ... | @@ -57,12 +54,12 @@ |
57 | 54 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
58 | 55 | import BaseInfo from './BaseInfo.vue'; |
59 | 56 | import { createImgPreview } from '/@/components/Preview'; |
57 | + import { getFormConfig } from './data'; | |
60 | 58 | |
61 | 59 | const userStore = useUserStoreWithOut(); |
62 | 60 | |
63 | 61 | export default defineComponent({ |
64 | 62 | components: { |
65 | - PageWrapper, | |
66 | 63 | BasicTable, |
67 | 64 | BasicDrawer, |
68 | 65 | TableAction, |
... | ... | @@ -123,10 +120,12 @@ |
123 | 120 | const [registerTable, { reload }] = useTable({ |
124 | 121 | api: props.isApproved ? getApprovedListApi : getWaitListApi, |
125 | 122 | searchInfo: { type: 10 }, |
126 | - | |
123 | + // scroll: { | |
124 | + // scrollToFirstRowOnChange: true, | |
125 | + // }, | |
127 | 126 | columns, |
128 | - // useSearchForm: true, | |
129 | - // formConfig: getFormConfig(), | |
127 | + useSearchForm: true, | |
128 | + formConfig: getFormConfig(), | |
130 | 129 | rowKey: 'id', |
131 | 130 | actionColumn: { |
132 | 131 | width: 160, | ... | ... |
src/views/project/approve/ReportPanel.vue
1 | 1 | <template> |
2 | - <PageWrapper contentBackground> | |
3 | - <BasicTable @register="registerTable"> | |
4 | - <template #form-custom> custom-slot </template> | |
5 | - <template #bodyCell="{ column, record }"> | |
6 | - <template v-if="column.key === 'picUrl'"> | |
7 | - <img | |
8 | - :width="100" | |
9 | - :height="100" | |
10 | - :src="record?.orderBaseInfo?.smallPicUrl" | |
11 | - @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
12 | - /> | |
13 | - </template> | |
14 | - <template v-if="column.key === 'action'"> | |
15 | - <TableAction | |
16 | - :actions="[ | |
17 | - { | |
18 | - label: '详情', | |
19 | - // icon: 'ic:outline-delete-outline', | |
20 | - onClick: handleDetail.bind(null, record), | |
21 | - }, | |
22 | - ]" | |
23 | - /> | |
24 | - </template> | |
2 | + <BasicTable @register="registerTable" className="p-0"> | |
3 | + <template #bodyCell="{ column, record }"> | |
4 | + <template v-if="column.key === 'picUrl'"> | |
5 | + <img | |
6 | + :width="100" | |
7 | + :height="100" | |
8 | + :src="record?.orderBaseInfo?.smallPicUrl" | |
9 | + @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
10 | + /> | |
25 | 11 | </template> |
26 | - </BasicTable> | |
27 | - <BasicDrawer | |
28 | - :showFooter="!isApproved && role === ROLE.ADMIN" | |
29 | - @register="registerDrawer" | |
30 | - title="申请信息" | |
31 | - okText="通过" | |
32 | - @ok="handleTrue" | |
33 | - > | |
34 | - <BaseInfo :baseInfos="baseInfos" /> | |
35 | - <h2>项目报告书信息</h2> | |
36 | - <div v-for="field in fieldInfos" :key="field"> | |
37 | - <span className="w-[140px] inline-block text-right mr-3">{{ field.label }}:</span | |
38 | - ><span>{{ field.value }}</span> | |
39 | - </div> | |
40 | - <template #appendFooter> | |
41 | - <a-button @click="handleFalse"> 不通过</a-button> | |
12 | + <template v-if="column.key === 'action'"> | |
13 | + <TableAction | |
14 | + :actions="[ | |
15 | + { | |
16 | + label: '详情', | |
17 | + // icon: 'ic:outline-delete-outline', | |
18 | + onClick: handleDetail.bind(null, record), | |
19 | + }, | |
20 | + ]" | |
21 | + /> | |
42 | 22 | </template> |
43 | - </BasicDrawer> | |
44 | - <MsgModal v-if="msgVisible" @msg-modal-close="handleMsgModalClose" /> | |
45 | - </PageWrapper> | |
23 | + </template> | |
24 | + </BasicTable> | |
25 | + <BasicDrawer | |
26 | + :showFooter="!isApproved && role === ROLE.ADMIN" | |
27 | + @register="registerDrawer" | |
28 | + title="申请信息" | |
29 | + okText="通过" | |
30 | + @ok="handleTrue" | |
31 | + > | |
32 | + <BaseInfo :baseInfos="baseInfos" /> | |
33 | + <h2>项目报告书信息</h2> | |
34 | + <div v-for="field in fieldInfos" :key="field"> | |
35 | + <span className="w-[140px] inline-block text-right mr-3">{{ field.label }}:</span | |
36 | + ><span>{{ field.value }}</span> | |
37 | + </div> | |
38 | + <template #appendFooter> | |
39 | + <a-button @click="handleFalse"> 不通过</a-button> | |
40 | + </template> | |
41 | + </BasicDrawer> | |
42 | + <MsgModal v-if="msgVisible" @msg-modal-close="handleMsgModalClose" /> | |
46 | 43 | </template> |
47 | 44 | <script lang="ts"> |
48 | 45 | import MsgModal from './MsgModal.vue'; |
49 | 46 | import { computed, defineComponent, ref } from 'vue'; |
50 | 47 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
51 | - import { PageWrapper } from '/@/components/Page'; | |
52 | 48 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; |
53 | 49 | |
54 | 50 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; |
... | ... | @@ -57,12 +53,12 @@ |
57 | 53 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
58 | 54 | import BaseInfo from './BaseInfo.vue'; |
59 | 55 | import { createImgPreview } from '/@/components/Preview'; |
56 | + import { getFormConfig } from './data'; | |
60 | 57 | |
61 | 58 | const userStore = useUserStoreWithOut(); |
62 | 59 | |
63 | 60 | export default defineComponent({ |
64 | 61 | components: { |
65 | - PageWrapper, | |
66 | 62 | BasicTable, |
67 | 63 | BasicDrawer, |
68 | 64 | BaseInfo, |
... | ... | @@ -124,8 +120,8 @@ |
124 | 120 | searchInfo: { type: 20 }, |
125 | 121 | |
126 | 122 | columns, |
127 | - // useSearchForm: true, | |
128 | - // formConfig: getFormConfig(), | |
123 | + useSearchForm: true, | |
124 | + formConfig: getFormConfig(), | |
129 | 125 | rowKey: 'id', |
130 | 126 | actionColumn: { |
131 | 127 | width: 160, | ... | ... |
src/views/project/approve/data.ts
0 → 100644
1 | +import { useOrderInfo } from '/@/hooks/component/order'; | |
2 | +import { useOrderStoreWithOut } from '/@/store/modules/order'; | |
3 | + | |
4 | +export function getFormConfig() { | |
5 | + const orderStore = useOrderStoreWithOut(); | |
6 | + | |
7 | + const { innerNo } = useOrderInfo(orderStore); | |
8 | + | |
9 | + return { | |
10 | + labelWidth: 100, | |
11 | + schemas: [ | |
12 | + { | |
13 | + field: `innerNo`, | |
14 | + label: `内部编号`, | |
15 | + component: 'Select', | |
16 | + colProps: { | |
17 | + span: 8, | |
18 | + }, | |
19 | + labelWidth: 70, | |
20 | + componentProps: { | |
21 | + options: innerNo, | |
22 | + showSearch: true, | |
23 | + mode: 'multiple', | |
24 | + }, | |
25 | + }, | |
26 | + ], | |
27 | + }; | |
28 | +} | ... | ... |
src/views/project/approve/index.vue
1 | 1 | <template> |
2 | - <PageWrapper contentBackground> | |
2 | + <div className="approve-page px-4 bg-white"> | |
3 | 3 | <a-tabs default-active-key="1" v-model:activeKey="currentKey"> |
4 | 4 | <a-tab-pane key="1" tab="字段待审核"> |
5 | 5 | <FieldPanel /> |
6 | 6 | </a-tab-pane> |
7 | - <a-tab-pane key="2" tab="字段已审核"> | |
8 | - <FieldPanel isApproved /> | |
9 | - </a-tab-pane> | |
10 | 7 | <a-tab-pane key="3" tab="利润分析待审核"> |
11 | 8 | <ProfitPanel /> |
12 | 9 | </a-tab-pane> |
13 | - <a-tab-pane key="4" tab="利润分析已审核"> | |
14 | - <ProfitPanel isApproved /> | |
15 | - </a-tab-pane> | |
16 | 10 | <a-tab-pane key="5" tab="项目报告书待审核"> |
17 | 11 | <ReportPanel /> |
18 | 12 | </a-tab-pane> |
13 | + <a-tab-pane key="2" tab="字段已审核"> | |
14 | + <FieldPanel isApproved /> | |
15 | + </a-tab-pane> | |
16 | + <a-tab-pane key="4" tab="利润分析已审核"> | |
17 | + <ProfitPanel isApproved /> | |
18 | + </a-tab-pane> | |
19 | 19 | <a-tab-pane key="6" tab="项目报告书已审核"> |
20 | 20 | <ReportPanel isApproved /> |
21 | 21 | </a-tab-pane> |
22 | 22 | </a-tabs> |
23 | - </PageWrapper> | |
23 | + </div> | |
24 | 24 | </template> |
25 | 25 | <script lang="ts"> |
26 | - import { defineComponent, ref } from 'vue'; | |
27 | - import { BasicTable, useTable, TableAction } from '/@/components/Table'; | |
26 | + import { defineComponent, onMounted, ref } from 'vue'; | |
28 | 27 | import { Tabs } from 'ant-design-vue'; |
29 | - import { PageWrapper } from '/@/components/Page'; | |
30 | 28 | import ReportPanel from './ReportPanel.vue'; |
31 | 29 | import ProfitPanel from './ProfitPanel.vue'; |
32 | 30 | import FieldPanel from './FieldPanel.vue'; |
33 | - import { approveAuditApi, getWaitListApi, getApprovedListApi } from '/@/api/project/approve'; | |
31 | + import { useOrderStoreWithOut } from '/@/store/modules/order'; | |
32 | + | |
33 | + const orderStore = useOrderStoreWithOut(); | |
34 | 34 | |
35 | 35 | export default defineComponent({ |
36 | 36 | components: { |
37 | - PageWrapper, | |
38 | - BasicTable, | |
39 | - TableAction, | |
40 | 37 | [Tabs.name]: Tabs, |
41 | 38 | [Tabs.TabPane.name]: Tabs.TabPane, |
42 | 39 | ReportPanel, |
... | ... | @@ -47,116 +44,30 @@ |
47 | 44 | const checkedKeys = ref<Array<string | number>>([]); |
48 | 45 | const currentKey = ref('1'); |
49 | 46 | |
50 | - const [registerTable1, { reload }] = useTable({ | |
51 | - api: getWaitListApi, | |
52 | - columns: [ | |
53 | - { | |
54 | - title: '申请人', | |
55 | - dataIndex: 'createBy', | |
56 | - width: 150, | |
57 | - }, | |
58 | - { | |
59 | - title: '申请字段', | |
60 | - dataIndex: 'fields', | |
61 | - width: 600, | |
62 | - }, | |
63 | - { | |
64 | - title: '订单号', | |
65 | - dataIndex: 'no6', | |
66 | - }, | |
67 | - { | |
68 | - title: '订单字段1', | |
69 | - dataIndex: 'no5', | |
70 | - }, | |
71 | - { | |
72 | - title: '订单字段2', | |
73 | - dataIndex: 'no4', | |
74 | - }, | |
75 | - { | |
76 | - title: '订单字段3', | |
77 | - dataIndex: 'no3', | |
78 | - }, | |
79 | - | |
80 | - { | |
81 | - title: '订单字段5', | |
82 | - dataIndex: 'no1', | |
83 | - }, | |
84 | - ], | |
85 | - // useSearchForm: true, | |
86 | - // formConfig: getFormConfig(), | |
87 | - rowKey: 'id', | |
88 | - actionColumn: { | |
89 | - width: 160, | |
90 | - title: 'Action', | |
91 | - dataIndex: 'action', | |
92 | - // slots: { customRender: 'action' }, | |
93 | - }, | |
94 | - }); | |
95 | - | |
96 | - const [registerTable2] = useTable({ | |
97 | - api: getApprovedListApi, | |
98 | - columns: [ | |
99 | - { | |
100 | - title: '申请人', | |
101 | - dataIndex: 'createBy', | |
102 | - width: 150, | |
103 | - }, | |
104 | - // { | |
105 | - // title: '申请字段', | |
106 | - // dataIndex: 'fields', | |
107 | - // width: 600, | |
108 | - // }, | |
109 | - ], | |
110 | - rowKey: 'id', | |
47 | + onMounted(async () => { | |
48 | + await orderStore.getDict(); | |
111 | 49 | }); |
112 | 50 | |
113 | - // function getFormValues() { | |
114 | - // console.log(getForm1().getFieldsValue()); | |
115 | - // } | |
116 | - | |
117 | - function onSelect(record, selected) { | |
118 | - if (selected) { | |
119 | - checkedKeys.value = [...checkedKeys.value, record.id]; | |
120 | - } else { | |
121 | - checkedKeys.value = checkedKeys.value.filter((id) => id !== record.id); | |
122 | - } | |
123 | - } | |
124 | - function onSelectAll(selected, selectedRows, changeRows) { | |
125 | - const changeIds = changeRows.map((item) => item.id); | |
126 | - if (selected) { | |
127 | - checkedKeys.value = [...checkedKeys.value, ...changeIds]; | |
128 | - } else { | |
129 | - checkedKeys.value = checkedKeys.value.filter((id) => { | |
130 | - return !changeIds.includes(id); | |
131 | - }); | |
132 | - } | |
133 | - } | |
134 | - function handleEdit(record, e) { | |
135 | - e?.stopPropagation(); | |
136 | - return false; | |
137 | - } | |
138 | - | |
139 | - async function handleTrue(record) { | |
140 | - await approveAuditApi({ status: 10, id: record.id }); | |
141 | - reload(); | |
142 | - } | |
143 | - | |
144 | - async function handleFalse(record) { | |
145 | - await approveAuditApi({ status: 20, id: record.id }); | |
146 | - reload(); | |
147 | - } | |
148 | - | |
149 | 51 | return { |
150 | - registerTable1, | |
151 | - registerTable2, | |
152 | 52 | checkedKeys, |
153 | 53 | currentKey, |
154 | - onSelect, | |
155 | - handleEdit, | |
156 | - onSelectAll, | |
157 | - handleTrue, | |
158 | - handleFalse, | |
159 | 54 | }; |
160 | 55 | }, |
161 | 56 | }); |
162 | 57 | </script> |
58 | + | |
59 | +<style> | |
60 | + .approve-page .vben-basic-table .ant-table-wrapper { | |
61 | + margin-bottom: 0; | |
62 | + } | |
63 | + | |
64 | + .approve-page .vben-basic-table-form-container { | |
65 | + padding-right: 0; | |
66 | + padding-left: 0; | |
67 | + } | |
68 | + | |
69 | + .approve-page .vben-basic-table-form-container .ant-form { | |
70 | + margin-bottom: 0; | |
71 | + padding-top: 0; | |
72 | + } | |
73 | +</style> | ... | ... |