Commit e48147f8c8b002188dfc918106c62a7bcff2cbbe
1 parent
6094d271
feat: 新增审核搜索&首页图高度调整
Showing
6 changed files
with
206 additions
and
277 deletions
src/views/dashboard/analysis/components/VisitAnalysis.vue
1 | <template> | 1 | <template> |
2 | - <div ref="chartRef" :style="{ height, width }"></div> | 2 | + <div ref="chartRef" :style="{ height: '500px', width }"></div> |
3 | </template> | 3 | </template> |
4 | 4 | ||
5 | <script lang="ts" setup> | 5 | <script lang="ts" setup> |
@@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
48 | { | 48 | { |
49 | type: 'value', | 49 | type: 'value', |
50 | max: maxY + 20, | 50 | max: maxY + 20, |
51 | - splitNumber: 4, | 51 | + splitNumber: 20, |
52 | axisTick: { | 52 | axisTick: { |
53 | show: false, | 53 | show: false, |
54 | }, | 54 | }, |
src/views/project/approve/FieldPanel.vue
1 | <template> | 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 | </template> | 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 | </template> | 61 | </template> |
66 | <script lang="ts"> | 62 | <script lang="ts"> |
67 | import MsgModal from './MsgModal.vue'; | 63 | import MsgModal from './MsgModal.vue'; |
68 | import { computed, defineComponent, ref } from 'vue'; | 64 | import { computed, defineComponent, ref } from 'vue'; |
69 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 65 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
70 | - import { PageWrapper } from '/@/components/Page'; | ||
71 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; | 66 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; |
72 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; | 67 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; |
73 | import { | 68 | import { |
@@ -82,12 +77,12 @@ | @@ -82,12 +77,12 @@ | ||
82 | import { useUserStoreWithOut } from '/@/store/modules/user'; | 77 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
83 | import BaseInfo from './BaseInfo.vue'; | 78 | import BaseInfo from './BaseInfo.vue'; |
84 | import { createImgPreview } from '/@/components/Preview'; | 79 | import { createImgPreview } from '/@/components/Preview'; |
80 | + import { getFormConfig } from './data'; | ||
85 | 81 | ||
86 | const userStore = useUserStoreWithOut(); | 82 | const userStore = useUserStoreWithOut(); |
87 | 83 | ||
88 | export default defineComponent({ | 84 | export default defineComponent({ |
89 | components: { | 85 | components: { |
90 | - PageWrapper, | ||
91 | BasicTable, | 86 | BasicTable, |
92 | BasicDrawer, | 87 | BasicDrawer, |
93 | TableAction, | 88 | TableAction, |
@@ -153,12 +148,12 @@ | @@ -153,12 +148,12 @@ | ||
153 | } | 148 | } |
154 | 149 | ||
155 | const [registerTable, { reload }] = useTable({ | 150 | const [registerTable, { reload }] = useTable({ |
151 | + scroll: false, | ||
156 | api: props.isApproved ? getApprovedListApi : getWaitListApi, | 152 | api: props.isApproved ? getApprovedListApi : getWaitListApi, |
157 | searchInfo: { type: 0 }, | 153 | searchInfo: { type: 0 }, |
158 | - | ||
159 | columns, | 154 | columns, |
160 | - // useSearchForm: true, | ||
161 | - // formConfig: getFormConfig(), | 155 | + useSearchForm: true, |
156 | + formConfig: getFormConfig(), | ||
162 | rowKey: 'id', | 157 | rowKey: 'id', |
163 | actionColumn: { | 158 | actionColumn: { |
164 | width: 160, | 159 | width: 160, |
src/views/project/approve/ProfitPanel.vue
1 | <template> | 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 | </template> | 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 | </template> | 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 | </template> | 44 | </template> |
47 | <script lang="ts"> | 45 | <script lang="ts"> |
48 | import MsgModal from './MsgModal.vue'; | 46 | import MsgModal from './MsgModal.vue'; |
49 | import { computed, defineComponent, ref } from 'vue'; | 47 | import { computed, defineComponent, ref } from 'vue'; |
50 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 48 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
51 | - import { PageWrapper } from '/@/components/Page'; | ||
52 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; | 49 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; |
53 | 50 | ||
54 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; | 51 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; |
@@ -57,12 +54,12 @@ | @@ -57,12 +54,12 @@ | ||
57 | import { useUserStoreWithOut } from '/@/store/modules/user'; | 54 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
58 | import BaseInfo from './BaseInfo.vue'; | 55 | import BaseInfo from './BaseInfo.vue'; |
59 | import { createImgPreview } from '/@/components/Preview'; | 56 | import { createImgPreview } from '/@/components/Preview'; |
57 | + import { getFormConfig } from './data'; | ||
60 | 58 | ||
61 | const userStore = useUserStoreWithOut(); | 59 | const userStore = useUserStoreWithOut(); |
62 | 60 | ||
63 | export default defineComponent({ | 61 | export default defineComponent({ |
64 | components: { | 62 | components: { |
65 | - PageWrapper, | ||
66 | BasicTable, | 63 | BasicTable, |
67 | BasicDrawer, | 64 | BasicDrawer, |
68 | TableAction, | 65 | TableAction, |
@@ -123,10 +120,12 @@ | @@ -123,10 +120,12 @@ | ||
123 | const [registerTable, { reload }] = useTable({ | 120 | const [registerTable, { reload }] = useTable({ |
124 | api: props.isApproved ? getApprovedListApi : getWaitListApi, | 121 | api: props.isApproved ? getApprovedListApi : getWaitListApi, |
125 | searchInfo: { type: 10 }, | 122 | searchInfo: { type: 10 }, |
126 | - | 123 | + // scroll: { |
124 | + // scrollToFirstRowOnChange: true, | ||
125 | + // }, | ||
127 | columns, | 126 | columns, |
128 | - // useSearchForm: true, | ||
129 | - // formConfig: getFormConfig(), | 127 | + useSearchForm: true, |
128 | + formConfig: getFormConfig(), | ||
130 | rowKey: 'id', | 129 | rowKey: 'id', |
131 | actionColumn: { | 130 | actionColumn: { |
132 | width: 160, | 131 | width: 160, |
src/views/project/approve/ReportPanel.vue
1 | <template> | 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 | </template> | 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 | </template> | 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 | </template> | 43 | </template> |
47 | <script lang="ts"> | 44 | <script lang="ts"> |
48 | import MsgModal from './MsgModal.vue'; | 45 | import MsgModal from './MsgModal.vue'; |
49 | import { computed, defineComponent, ref } from 'vue'; | 46 | import { computed, defineComponent, ref } from 'vue'; |
50 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 47 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
51 | - import { PageWrapper } from '/@/components/Page'; | ||
52 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; | 48 | import { BasicDrawer, useDrawer } from '/@/components/Drawer'; |
53 | 49 | ||
54 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; | 50 | import { approveAuditApi, getApprovedListApi, getWaitListApi } from '/@/api/project/approve'; |
@@ -57,12 +53,12 @@ | @@ -57,12 +53,12 @@ | ||
57 | import { useUserStoreWithOut } from '/@/store/modules/user'; | 53 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
58 | import BaseInfo from './BaseInfo.vue'; | 54 | import BaseInfo from './BaseInfo.vue'; |
59 | import { createImgPreview } from '/@/components/Preview'; | 55 | import { createImgPreview } from '/@/components/Preview'; |
56 | + import { getFormConfig } from './data'; | ||
60 | 57 | ||
61 | const userStore = useUserStoreWithOut(); | 58 | const userStore = useUserStoreWithOut(); |
62 | 59 | ||
63 | export default defineComponent({ | 60 | export default defineComponent({ |
64 | components: { | 61 | components: { |
65 | - PageWrapper, | ||
66 | BasicTable, | 62 | BasicTable, |
67 | BasicDrawer, | 63 | BasicDrawer, |
68 | BaseInfo, | 64 | BaseInfo, |
@@ -124,8 +120,8 @@ | @@ -124,8 +120,8 @@ | ||
124 | searchInfo: { type: 20 }, | 120 | searchInfo: { type: 20 }, |
125 | 121 | ||
126 | columns, | 122 | columns, |
127 | - // useSearchForm: true, | ||
128 | - // formConfig: getFormConfig(), | 123 | + useSearchForm: true, |
124 | + formConfig: getFormConfig(), | ||
129 | rowKey: 'id', | 125 | rowKey: 'id', |
130 | actionColumn: { | 126 | actionColumn: { |
131 | width: 160, | 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 | <template> | 1 | <template> |
2 | - <PageWrapper contentBackground> | 2 | + <div className="approve-page px-4 bg-white"> |
3 | <a-tabs default-active-key="1" v-model:activeKey="currentKey"> | 3 | <a-tabs default-active-key="1" v-model:activeKey="currentKey"> |
4 | <a-tab-pane key="1" tab="字段待审核"> | 4 | <a-tab-pane key="1" tab="字段待审核"> |
5 | <FieldPanel /> | 5 | <FieldPanel /> |
6 | </a-tab-pane> | 6 | </a-tab-pane> |
7 | - <a-tab-pane key="2" tab="字段已审核"> | ||
8 | - <FieldPanel isApproved /> | ||
9 | - </a-tab-pane> | ||
10 | <a-tab-pane key="3" tab="利润分析待审核"> | 7 | <a-tab-pane key="3" tab="利润分析待审核"> |
11 | <ProfitPanel /> | 8 | <ProfitPanel /> |
12 | </a-tab-pane> | 9 | </a-tab-pane> |
13 | - <a-tab-pane key="4" tab="利润分析已审核"> | ||
14 | - <ProfitPanel isApproved /> | ||
15 | - </a-tab-pane> | ||
16 | <a-tab-pane key="5" tab="项目报告书待审核"> | 10 | <a-tab-pane key="5" tab="项目报告书待审核"> |
17 | <ReportPanel /> | 11 | <ReportPanel /> |
18 | </a-tab-pane> | 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 | <a-tab-pane key="6" tab="项目报告书已审核"> | 19 | <a-tab-pane key="6" tab="项目报告书已审核"> |
20 | <ReportPanel isApproved /> | 20 | <ReportPanel isApproved /> |
21 | </a-tab-pane> | 21 | </a-tab-pane> |
22 | </a-tabs> | 22 | </a-tabs> |
23 | - </PageWrapper> | 23 | + </div> |
24 | </template> | 24 | </template> |
25 | <script lang="ts"> | 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 | import { Tabs } from 'ant-design-vue'; | 27 | import { Tabs } from 'ant-design-vue'; |
29 | - import { PageWrapper } from '/@/components/Page'; | ||
30 | import ReportPanel from './ReportPanel.vue'; | 28 | import ReportPanel from './ReportPanel.vue'; |
31 | import ProfitPanel from './ProfitPanel.vue'; | 29 | import ProfitPanel from './ProfitPanel.vue'; |
32 | import FieldPanel from './FieldPanel.vue'; | 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 | export default defineComponent({ | 35 | export default defineComponent({ |
36 | components: { | 36 | components: { |
37 | - PageWrapper, | ||
38 | - BasicTable, | ||
39 | - TableAction, | ||
40 | [Tabs.name]: Tabs, | 37 | [Tabs.name]: Tabs, |
41 | [Tabs.TabPane.name]: Tabs.TabPane, | 38 | [Tabs.TabPane.name]: Tabs.TabPane, |
42 | ReportPanel, | 39 | ReportPanel, |
@@ -47,116 +44,30 @@ | @@ -47,116 +44,30 @@ | ||
47 | const checkedKeys = ref<Array<string | number>>([]); | 44 | const checkedKeys = ref<Array<string | number>>([]); |
48 | const currentKey = ref('1'); | 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 | return { | 51 | return { |
150 | - registerTable1, | ||
151 | - registerTable2, | ||
152 | checkedKeys, | 52 | checkedKeys, |
153 | currentKey, | 53 | currentKey, |
154 | - onSelect, | ||
155 | - handleEdit, | ||
156 | - onSelectAll, | ||
157 | - handleTrue, | ||
158 | - handleFalse, | ||
159 | }; | 54 | }; |
160 | }, | 55 | }, |
161 | }); | 56 | }); |
162 | </script> | 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> |