Commit 82e4757ea349f2de77555f75e44844a7d50b06df

Authored by gesilong
1 parent 3ad4f7e9

commit: 按钮权限标识添加

... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable style="flex: auto" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:checkPlan:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('equipment.checkPlan.createCategoryText') }}
8 8 </Button>
... ... @@ -19,7 +19,7 @@
19 19 "
20 20 class="ml-2"
21 21 >
22   - {{ t(`equipment.checkPlan.${record.type}`) }}
  22 + {{ record.type ? t(`equipment.checkPlan.${record.type}`) : ''}}
23 23 </Tag>
24 24 </template>
25 25 <template #status="{ record }">
... ... @@ -38,18 +38,18 @@
38 38 {
39 39 label: t('common.detailText'),
40 40 icon: 'ant-design:eye-outlined',
41   - auth: 'api:yt:product:category:get',
  41 + auth: 'api:yt:checkPlan:get',
42 42 onClick: handleDetail.bind(null, record),
43 43 },
44 44 {
45 45 label: t('common.editText'),
46   - auth: 'api:yt:product:category:update',
  46 + auth: 'api:yt:checkPlan:update',
47 47 icon: 'clarity:note-edit-line',
48 48 onClick: handleEdit.bind(null, record),
49 49 },
50 50 {
51 51 label: t('common.delText'),
52   - auth: 'api:yt:product:category:delete',
  52 + auth: 'api:yt:checkPlan:delete',
53 53 icon: 'ant-design:delete-outlined',
54 54 color: 'error',
55 55 popConfirm: {
... ...
... ... @@ -2,12 +2,12 @@
2 2 <div>
3 3 <BasicTable style="flex: auto" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:errorReason:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('equipment.errorReason.createCategoryText') }}
8 8 </Button>
9 9 </Authority>
10   - <Authority value="api:yt:product:category:delete">
  10 + <Authority value="api:yt:errorReason:delete">
11 11 <Popconfirm :title="t('common.deleteConfirmText')" @confirm="handleDelete()">
12 12 <a-button color="error" :disabled="!isExistOption">
13 13 {{ t('common.batchDeleteText') }}
... ... @@ -30,18 +30,18 @@
30 30 {
31 31 label: t('common.detailText'),
32 32 icon: 'ant-design:eye-outlined',
33   - auth: 'api:yt:product:category:get',
  33 + auth: 'api:yt:errorReason:get',
34 34 onClick: handleDetail.bind(null, record),
35 35 },
36 36 {
37 37 label: t('common.editText'),
38   - auth: 'api:yt:product:category:update',
  38 + auth: 'api:yt:errorReason:update',
39 39 icon: 'clarity:note-edit-line',
40 40 onClick: handleEdit.bind(null, record),
41 41 },
42 42 {
43 43 label: t('common.delText'),
44   - auth: 'api:yt:product:category:delete',
  44 + auth: 'api:yt:errorReason:delete',
45 45 icon: 'ant-design:delete-outlined',
46 46 color: 'error',
47 47 popConfirm: {
... ...
... ... @@ -4,7 +4,7 @@
4 4 <OrganizationIdTree @select="handleSelect" ref="organizationIdTreeRef" listType="equipment"/>
5 5 <BasicTable style="flex: auto" @register="registerTable" class="w-5/6 xl:w-4/5 device-table">
6 6 <template #toolbar>
7   - <Authority :value="DeviceListAuthEnum.CREATE">
  7 + <Authority value="api:yt:ledger:post">
8 8 <a-button type="primary" @click="handleBussinessDrawer('add', null)" v-if="authBtn(role)">
9 9 {{ t('equipment.ledger.createLedgerText') }}
10 10 </a-button>
... ... @@ -31,17 +31,20 @@
31 31 :actions="[
32 32 {
33 33 label: t('common.viewText'),
  34 + auth: 'api:yt:ledger:get',
34 35 icon: 'ant-design:eye-outlined',
35 36 onClick: handleBussinessDrawer.bind(null, 'view', record),
36 37 },
37 38 {
38 39 label: t('common.editText'),
  40 + auth: 'api:yt:ledger:update',
39 41 icon: 'clarity:note-edit-line',
40 42 onClick: handleBussinessDrawer.bind(null, 'edit', record),
41 43 },
42 44 {
43 45 label: t('common.delText'),
44 46 icon: 'ant-design:delete-outlined',
  47 + auth: 'api:yt:delete:get',
45 48 color: 'error',
46 49 popConfirm: {
47 50 title: t('common.isDelete'),
... ... @@ -68,7 +71,6 @@ import {OrganizationIdTree, useResetOrganizationTree} from "/@/views/common/orga
68 71 import { getLedgerList, deleteLedger } from "/@/api/equipment/ledger"
69 72 import {
70 73 columns,
71   - DeviceListAuthEnum,
72 74 searchFormSchema
73 75 } from "/@/views/equipment/ledger/config/ledger.data";
74 76 import { SbStatusEnum } from '/@/enums/deviceEnum';
... ...
  1 +import {FormSchema} from "/@/components/Form";
  2 +import {useI18n} from "/@/hooks/web/useI18n";
  3 +import {BasicColumn} from "/@/components/Table";
  4 +
  5 +const { t } = useI18n();
  6 +export const searchFormSchema: FormSchema[] = [
  7 + {
  8 + field: 'name',
  9 + label: t('equipment.supplier.supplier'),
  10 + component: 'Input',
  11 + colProps: { span: 6 },
  12 + },
  13 + {
  14 + field: 'code',
  15 + label: t('equipment.supplier.supplierCode'),
  16 + component: 'Input',
  17 + colProps: { span: 6 },
  18 + },
  19 +];
  20 +
  21 +export const columns: BasicColumn[] = [
  22 + {
  23 + title: t('equipment.supplier.supplierCode'),
  24 + dataIndex: 'code',
  25 + },
  26 + {
  27 + title: t('equipment.supplier.supplier'),
  28 + dataIndex: 'name',
  29 + },
  30 + {
  31 + title: t('equipment.supplier.contactsName'),
  32 + dataIndex: 'contacts',
  33 + },
  34 + {
  35 + title: t('equipment.supplier.contactsMobile'),
  36 + dataIndex: 'contactsMobile',
  37 + },
  38 +];
  39 +
  40 +export const schemas: FormSchema[] = [
  41 + {
  42 + field: 'code',
  43 + label: t('equipment.supplier.supplierCode'),
  44 + component: 'Input',
  45 + colProps: { span: 21 },
  46 + required: true,
  47 + componentProps: {
  48 + maxLength: 20,
  49 + },
  50 + },
  51 + {
  52 + field: 'name',
  53 + label: t('equipment.supplier.supplier'),
  54 + component: 'Input',
  55 + colProps: { span: 21 },
  56 + required: true,
  57 + componentProps: {
  58 + maxLength: 20,
  59 + },
  60 + },
  61 + {
  62 + field: 'contacts',
  63 + label: t('equipment.supplier.contactsName'),
  64 + component: 'Input',
  65 + colProps: { span: 21 },
  66 + required: true,
  67 + componentProps: {
  68 + maxLength: 20,
  69 + },
  70 + },
  71 + {
  72 + field: 'contactsMobile',
  73 + label: t('equipment.supplier.contactsMobile'),
  74 + component: 'Input',
  75 + colProps: { span: 21 },
  76 + required: true,
  77 + componentProps: {
  78 + maxLength: 20,
  79 + },
  80 + },
  81 +];
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:supplier:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('equipment.supplier.createPlanText') }}
8 8 </Button>
... ... @@ -13,13 +13,13 @@
13 13 :actions="[
14 14 {
15 15 label: t('common.editText'),
16   - auth: 'api:yt:product:category:update',
  16 + auth: 'api:yt:supplier:update',
17 17 icon: 'clarity:note-edit-line',
18 18 onClick: handleEdit.bind(null, record),
19 19 },
20 20 {
21 21 label: t('common.delText'),
22   - auth: 'api:yt:product:category:delete',
  22 + auth: 'api:yt:supplier:delete',
23 23 icon: 'ant-design:delete-outlined',
24 24 color: 'error',
25 25 popConfirm: {
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:inspectionPlan:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('inspection.inspectionPlan.createCategoryText') }}
8 8 </Button>
... ... @@ -27,20 +27,20 @@
27 27 :actions="[
28 28 {
29 29 label: t('common.viewText'),
30   - auth: 'api:yt:product:category:update',
  30 + auth: 'api:yt:inspectionPlan:get',
31 31 icon: 'ant-design:eye-outlined',
32 32 onClick: handleViewDetail.bind(null, record),
33 33 },
34 34 {
35 35 label: t('common.editText'),
36   - auth: 'api:yt:product:category:update',
  36 + auth: 'api:yt:inspectionPlan:update',
37 37 icon: 'clarity:note-edit-line',
38 38 onClick: handleEdit.bind(null, record),
39 39 ifShow: () => record.status === 'NOT_START',
40 40 },
41 41 {
42 42 label: t('common.delText'),
43   - auth: 'api:yt:product:category:delete',
  43 + auth: 'api:yt:inspectionPlan:delete',
44 44 icon: 'ant-design:delete-outlined',
45 45 color: 'error',
46 46 ifShow: () => record.status === 'NOT_START',
... ... @@ -51,7 +51,7 @@
51 51 },
52 52 {
53 53 label: t('common.start'),
54   - auth: 'api:yt:product:category:delete',
  54 + auth: 'api:yt:inspectionPlan:update',
55 55 icon: 'ant-design:caret-right-outlined',
56 56 ifShow: () => record.status === 'NOT_START',
57 57 popConfirm: {
... ... @@ -61,7 +61,7 @@
61 61 },
62 62 {
63 63 label: t('common.stop'),
64   - auth: 'api:yt:product:category:delete',
  64 + auth: 'api:yt:inspectionPlan:update',
65 65 icon: ' <PauseCircleOutlined />',
66 66 ifShow: () => record.status === 'NOT_START' || record.status === 'UNDERWAY',
67 67 popConfirm: {
... ... @@ -71,7 +71,7 @@
71 71 },
72 72 {
73 73 label: t('common.down'),
74   - auth: 'api:yt:product:category:delete',
  74 + auth: 'api:yt:inspectionPlan:update',
75 75 icon: 'ant-design:check-circle-outlined',
76 76 ifShow: () => record.status === 'UNDERWAY',
77 77 popConfirm: {
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:inspectionRecord:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('inspection.inspectionRecord.createRecordText') }}
8 8 </Button>
... ... @@ -21,19 +21,19 @@
21 21 :actions="[
22 22 {
23 23 label: t('common.viewText'),
24   - auth: 'api:yt:product:category:update',
  24 + auth: 'api:yt:inspectionRecord:get',
25 25 icon: 'ant-design:eye-outlined',
26 26 onClick: handleViewDetail.bind(null, record),
27 27 },
28 28 {
29 29 label: t('common.editText'),
30   - auth: 'api:yt:product:category:update',
  30 + auth: 'api:yt:inspectionRecord:update',
31 31 icon: 'clarity:note-edit-line',
32 32 onClick: handleEdit.bind(null, record),
33 33 },
34 34 {
35 35 label: t('common.delText'),
36   - auth: 'api:yt:product:category:delete',
  36 + auth: 'api:yt:inspectionRecord:delete',
37 37 icon: 'ant-design:delete-outlined',
38 38 color: 'error',
39 39 popConfirm: {
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:servicePlan:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('inspection.servicePlan.createPlanText') }}
8 8 </Button>
... ... @@ -27,20 +27,20 @@
27 27 :actions="[
28 28 {
29 29 label: t('common.viewText'),
30   - auth: 'api:yt:product:category:update',
  30 + auth: 'api:yt:servicePlan:get',
31 31 icon: 'ant-design:eye-outlined',
32 32 onClick: handleViewDetail.bind(null, record),
33 33 },
34 34 {
35 35 label: t('common.editText'),
36   - auth: 'api:yt:product:category:update',
  36 + auth: 'api:yt:servicePlan:update',
37 37 icon: 'clarity:note-edit-line',
38 38 onClick: handleEdit.bind(null, record),
39 39 ifShow: () => record.status === 'NOTSTART',
40 40 },
41 41 {
42 42 label: t('common.delText'),
43   - auth: 'api:yt:product:category:delete',
  43 + auth: 'api:yt:servicePlan:delete',
44 44 icon: 'ant-design:delete-outlined',
45 45 color: 'error',
46 46 ifShow: () => record.status === 'NOTSTART',
... ... @@ -51,7 +51,7 @@
51 51 },
52 52 {
53 53 label: t('common.start'),
54   - auth: 'api:yt:product:category:delete',
  54 + auth: 'api:yt:servicePlan:update',
55 55 icon: 'ant-design:caret-right-outlined',
56 56 ifShow: () => record.status === 'NOTSTART',
57 57 popConfirm: {
... ... @@ -61,7 +61,7 @@
61 61 },
62 62 {
63 63 label: t('common.stop'),
64   - auth: 'api:yt:product:category:delete',
  64 + auth: 'api:yt:servicePlan:update',
65 65 icon: ' <PauseCircleOutlined />',
66 66 ifShow: () => record.status === 'NOTSTART' || record.status === 'UNDERWAY',
67 67 popConfirm: {
... ... @@ -71,7 +71,7 @@
71 71 },
72 72 {
73 73 label: t('common.down'),
74   - auth: 'api:yt:product:category:delete',
  74 + auth: 'api:yt:servicePlan:update',
75 75 icon: 'ant-design:check-circle-outlined',
76 76 ifShow: () => record.status === 'UNDERWAY',
77 77 popConfirm: {
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:serviceRecord:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('inspection.serviceRecord.createCategoryText') }}
8 8 </Button>
... ... @@ -25,19 +25,19 @@
25 25 :actions="[
26 26 {
27 27 label: t('common.viewText'),
28   - auth: 'api:yt:product:category:update',
  28 + auth: 'api:yt:serviceRecord:get',
29 29 icon: 'ant-design:eye-outlined',
30 30 onClick: handleViewDetail.bind(null, record),
31 31 },
32 32 {
33 33 label: t('common.editText'),
34   - auth: 'api:yt:product:category:update',
  34 + auth: 'api:yt:serviceRecord:update',
35 35 icon: 'clarity:note-edit-line',
36 36 onClick: handleEdit.bind(null, record),
37 37 },
38 38 {
39 39 label: t('common.delText'),
40   - auth: 'api:yt:product:category:delete',
  40 + auth: 'api:yt:serviceRecord:delete',
41 41 icon: 'ant-design:delete-outlined',
42 42 color: 'error',
43 43 popConfirm: {
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable style="flex: auto" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:product:category:post">
  5 + <Authority value="api:yt:order:post">
6 6 <Button type="primary" @click="handleCreate">
7 7 {{ t('repair.order.createOrderText') }}
8 8 </Button>
... ... @@ -47,13 +47,13 @@
47 47 :actions="[
48 48 {
49 49 label: t('common.editText'),
50   - auth: 'api:yt:product:category:update',
  50 + auth: 'api:yt:order:update',
51 51 icon: 'clarity:note-edit-line',
52 52 onClick: handleEdit.bind(null, record),
53 53 },
54 54 {
55 55 label: t('common.delText'),
56   - auth: 'api:yt:product:category:delete',
  56 + auth: 'api:yt:order:delete',
57 57 icon: 'ant-design:delete-outlined',
58 58 color: 'error',
59 59 popConfirm: {
... ...