Commit bc461d346a229f89b8b5b4179f2527b9ad6e9aad

Authored by xp.Huang
2 parents 2fbbe510 e989a152

Merge branch 'f-dev' into 'main'

fix:修改pc端首页右上帮助文档跳转"

See merge request huang/yun-teng-iot-front!228
... ... @@ -3,6 +3,8 @@ import { BasicPageParams } from '/@/api/model/baseModel';
3 3 export type TDeviceConfigPageQueryParam = BasicPageParams & TDeviceConfigParams;
4 4
5 5 export type TDeviceConfigParams = {
  6 + page?: any;
  7 + pageSize?: any;
6 8 name?: string;
7 9 transportType?: string;
8 10 orderFiled?: string;
... ...
... ... @@ -15,7 +15,7 @@
15 15 </template>
16 16 <script lang="ts">
17 17 import type { ExportModalResult } from './typing';
18   - import { defineComponent } from 'vue';
  18 + import { defineComponent, nextTick } from 'vue';
19 19 import { BasicModal, useModalInner } from '/@/components/Modal';
20 20 import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
21 21
... ... @@ -66,7 +66,7 @@
66 66 components: { BasicModal, BasicForm },
67 67 emits: ['success', 'register'],
68 68 setup(_, { emit }) {
69   - const [registerForm, { validateFields }] = useForm();
  69 + const [registerForm, { validateFields, resetFields }] = useForm();
70 70 const [registerModal, { closeModal }] = useModalInner();
71 71
72 72 async function handleOk() {
... ... @@ -79,12 +79,15 @@
79 79 closeModal();
80 80 }
81 81
  82 + const clearFieldFunc = () => nextTick(() => resetFields());
  83 +
82 84 return {
83 85 schemas,
84 86 handleOk,
85 87 registerForm,
86 88 registerModal,
87 89 t,
  90 + clearFieldFunc,
88 91 };
89 92 },
90 93 });
... ...
... ... @@ -10,11 +10,11 @@ export function listToTree(lists: getMenuListResultModel): getMenuListResultMode
10 10
11 11 // console.log(goods.children?.length);
12 12 if (goods.children?.length) {
13   - goods.children.forEach((goodChildren) => {
14   - goodChildren['menuName'] = t(goodChildren.meta.title); // 为goodChildren添加属性menuName
15   - });
  13 + listToTree(goods.children);
  14 + // goods.children.forEach((goodChildren) => {
  15 + // goodChildren['menuName'] = t(goodChildren.meta.title); // 为goodChildren添加属性menuName
  16 + // });
16 17 }
17 18 });
18   -
19 19 return lists;
20 20 }
... ...
... ... @@ -13,10 +13,10 @@
13 13 :clickToRowSelect="false"
14 14 >
15 15 <template #toolbar>
16   - <Authority value="api:yt:admin:addAlarmConfig">
  16 + <Authority value="api:yt:alarm:profile:post">
17 17 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增告警配置 </a-button>
18 18 </Authority>
19   - <Authority value="api:yt:admin:deleteAlarmConfig">
  19 + <Authority value="api:yt:alarm:profile:delete">
20 20 <a-button
21 21 type="primary"
22 22 color="error"
... ... @@ -51,7 +51,7 @@
51 51 :actions="[
52 52 {
53 53 label: '编辑',
54   - auth: 'api:yt:admin:editAlarmConfig',
  54 + auth: 'api:yt:alarm:profile:update',
55 55 icon: 'clarity:note-edit-line',
56 56 onClick: handleCreateOrEdit.bind(null, record),
57 57 ifShow: () => {
... ... @@ -60,7 +60,7 @@
60 60 },
61 61 {
62 62 label: '删除',
63   - auth: 'api:yt:admin:deleteAlarmConfig',
  63 + auth: 'api:yt:alarm:profile:delete',
64 64 icon: 'ant-design:delete-outlined',
65 65 color: 'error',
66 66 ifShow: () => {
... ...
... ... @@ -8,10 +8,10 @@
8 8 />
9 9 <BasicTable @register="registerTable" :searchInfo="searchInfo" class="w-3/4 xl:w-4/5">
10 10 <template #toolbar>
11   - <Authority value="api:yt:admin:addAlarmContact">
  11 + <Authority value="api:yt:alarmContact:post">
12 12 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增告警联系人 </a-button>
13 13 </Authority>
14   - <Authority value="api:yt:admin:deleteAlarmContact">
  14 + <Authority value="api:yt:alarmContact:delete">
15 15 <a-button
16 16 type="primary"
17 17 color="error"
... ... @@ -27,13 +27,13 @@
27 27 :actions="[
28 28 {
29 29 label: '编辑',
30   - auth: 'api:yt:admin:editAlarmContact',
  30 + auth: 'api:yt:alarmContact:update',
31 31 icon: 'clarity:note-edit-line',
32 32 onClick: handleCreateOrEdit.bind(null, record),
33 33 },
34 34 {
35 35 label: '删除',
36   - auth: 'api:yt:admin:deleteAlarmContact',
  36 + auth: 'api:yt:alarmContact:delete',
37 37 icon: 'ant-design:delete-outlined',
38 38 color: 'error',
39 39 popConfirm: {
... ...
... ... @@ -6,7 +6,7 @@
6 6 :actions="[
7 7 {
8 8 label: '详情',
9   - auth: 'api:yt:admin:viewAlarmLog',
  9 + auth: 'api:yt:alarm:get',
10 10 icon: 'ant-design:eye-outlined',
11 11 onClick: handleDetail.bind(null, record),
12 12 },
... ...
... ... @@ -13,10 +13,10 @@
13 13 class="w-3/4 xl:w-4/5"
14 14 >
15 15 <template #toolbar>
16   - <Authority value="api:yt:admin:addCamera">
  16 + <Authority value="api:yt:video:post">
17 17 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增视频 </a-button>
18 18 </Authority>
19   - <Authority value="api:yt:admin:deleteCamera">
  19 + <Authority value="api:yt:video:delete">
20 20 <a-button
21 21 type="primary"
22 22 color="error"
... ... @@ -45,18 +45,18 @@
45 45 {
46 46 label: '预览',
47 47 icon: 'clarity:note-edit-line',
48   - auth: 'api:yt:admin:viewCamera',
  48 + auth: 'api:yt:video:get',
49 49 onClick: handleViewVideo.bind(null, record),
50 50 },
51 51 {
52 52 label: '编辑',
53   - auth: 'api:yt:admin:editCamera',
  53 + auth: 'api:yt:video:update',
54 54 icon: 'clarity:note-edit-line',
55 55 onClick: handleCreateOrEdit.bind(null, record),
56 56 },
57 57 {
58 58 label: '删除',
59   - auth: 'api:yt:admin:deleteCamera',
  59 + auth: 'api:yt:video:delete',
60 60 icon: 'ant-design:delete-outlined',
61 61 color: 'error',
62 62 popConfirm: {
... ...
... ... @@ -204,19 +204,23 @@
204 204 const helpDoc = ref([
205 205 {
206 206 title: '如何接入设备?',
207   - href: '',
  207 + href: 'https://docs.thingskit.com/',
  208 + target: '_blank ',
208 209 },
209 210 {
210 211 title: '什么是设备配置?',
211   - href: '',
  212 + href: 'https://docs.thingskit.com/',
  213 + target: '_blank ',
212 214 },
213 215 {
214 216 title: '云组态模板如何使用?',
215   - href: '',
  217 + href: 'https://docs.thingskit.com/',
  218 + target: '_blank ',
216 219 },
217 220 {
218 221 title: '查看全部>>',
219   - href: '',
  222 + href: 'https://docs.thingskit.com/',
  223 + target: '_blank ',
220 224 },
221 225 ]);
222 226 const activeKey = ref('tab1');
... ...
... ... @@ -8,12 +8,12 @@
8 8 />
9 9 <BasicTable @register="registerTable" class="w-5/6 xl:w-4/5">
10 10 <template #toolbar>
11   - <Authority value="api:yt:admin:addDeviceList">
  11 + <Authority value="api:yt:device:post">
12 12 <a-button type="primary" @click="handleCreate" v-if="authBtn(role)">
13 13 新增设备
14 14 </a-button>
15 15 </Authority>
16   - <Authority value="api:yt:admin:deleteDeviceList">
  16 + <Authority value="api:yt:device:delete">
17 17 <a-button
18 18 color="error"
19 19 v-if="authBtn(role)"
... ... @@ -123,19 +123,19 @@
123 123 {
124 124 label: '详情',
125 125 icon: 'ant-design:eye-outlined',
126   - auth: 'api:yt:admin:viewDeviceList',
  126 + auth: 'api:yt:device:get',
127 127 onClick: handleDetail.bind(null, record),
128 128 },
129 129 {
130 130 label: '编辑',
131   - auth: 'api:yt:admin:editDeviceList',
  131 + auth: 'api:yt:device:update',
132 132 icon: 'clarity:note-edit-line',
133 133 ifShow: authBtn(role) && record.customerId === undefined,
134 134 onClick: handleEdit.bind(null, record),
135 135 },
136 136 {
137 137 label: '删除',
138   - auth: 'api:yt:admin:deleteDeviceList',
  138 + auth: 'api:yt:device:delete',
139 139 icon: 'ant-design:delete-outlined',
140 140 ifShow: authBtn(role) && record.customerId === undefined,
141 141 color: 'error',
... ...
... ... @@ -8,13 +8,15 @@
8 8 :clickToRowSelect="false"
9 9 >
10 10 <template #toolbar>
11   - <Authority value="api:yt:admin:addDeviceConfig">
  11 + <Authority value="api:yt:deviceProfile:post">
12 12 <a-button type="primary" @click="handleCreate"> 新增设备配置 </a-button>
13 13 </Authority>
14   - <ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
15   - <a-button disabled @click="handleImport"> 导入设备配置 </a-button>
16   - </ImpExcel>
17   - <Authority value="api:yt:admin:deleteDeviceConfig">
  14 + <Authority value="api:yt:deviceProfile:import">
  15 + <ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
  16 + <a-button @click="handleImport"> 导入设备配置 </a-button>
  17 + </ImpExcel>
  18 + </Authority>
  19 + <Authority value="api:yt:deviceProfile:delete">
18 20 <a-button
19 21 type="primary"
20 22 color="error"
... ... @@ -50,24 +52,25 @@
50 52 },
51 53 {
52 54 label: '详情',
53   - auth: 'api:yt:admin:viewDeviceConfig',
  55 + auth: 'api:yt:deviceProfile:get',
54 56 icon: 'ant-design:eye-outlined',
55 57 onClick: handleDetailView.bind(null, record),
56 58 },
57 59 {
58 60 label: '编辑',
59   - auth: 'api:yt:admin:editDeviceConfig',
  61 + auth: 'api:yt:deviceProfile:update',
60 62 icon: 'clarity:note-edit-line',
61 63 onClick: handleEdit.bind(null, record),
62 64 },
63 65 {
64 66 label: '导出',
  67 + auth: 'api:yt:deviceProfile:export',
65 68 icon: 'ant-design:login-outlined',
66 69 onClick: handleExport.bind(null, record),
67 70 },
68 71 {
69 72 label: '删除',
70   - auth: 'api:yt:admin:deleteDeviceConfig',
  73 + auth: 'api:yt:deviceProfile:delete',
71 74 icon: 'ant-design:delete-outlined',
72 75 color: 'error',
73 76 popConfirm: {
... ... @@ -83,7 +86,11 @@
83 86 </template>
84 87 </BasicTable>
85 88 <DeviceProfileModal @register="registerModal" @success="handleSuccess" />
86   - <!-- <ExpExcelModal @register="register1" @success="defaultHeader" /> -->
  89 + <ExpExcelModal
  90 + ref="expExcelModalRef"
  91 + @register="registerExportModal"
  92 + @success="defaultHeader"
  93 + />
87 94 </div>
88 95 </template>
89 96 <script lang="ts">
... ... @@ -99,14 +106,24 @@
99 106 import { useModal } from '/@/components/Modal';
100 107 import DeviceProfileModal from '/@/views/device/profiles/DeviceProfileModal.vue';
101 108 import { ImpExcel, ExcelData } from '/@/components/Excel';
102   - // import { jsonToSheetXlsx, ExportModalResult } from '/@/components/Excel';
  109 + import { jsonToSheetXlsx, ExpExcelModal, ExportModalResult } from '/@/components/Excel';
103 110 import { Authority } from '/@/components/Authority';
104 111 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
105 112
106 113 export default defineComponent({
107 114 name: 'DeviceProfileManagement',
108   - components: { BasicTable, DeviceProfileModal, TableAction, ImpExcel, TableImg, Authority },
  115 + components: {
  116 + BasicTable,
  117 + DeviceProfileModal,
  118 + TableAction,
  119 + ImpExcel,
  120 + TableImg,
  121 + Authority,
  122 + ExpExcelModal,
  123 + },
109 124 setup() {
  125 + const exportData: any = ref([]);
  126 + const expExcelModalRef = ref(null);
110 127 let selectedRowKeys: any = [];
111 128 const deviceDetailRef = ref(null);
112 129 const getPathUrl = ref('');
... ... @@ -114,10 +131,9 @@
114 131 const disabled = ref(true);
115 132 const onCloseVal = ref(0);
116 133 const immediateStatus = ref(false);
117   -
118 134 const { createMessage } = useMessage();
119 135 const [registerModal, { openModal }] = useModal();
120   - const [registerModalDetail] = useModal();
  136 + const [registerExportModal, { openModal: openModalExcel }] = useModal();
121 137 const [
122 138 registerTable,
123 139 { setProps, reload, getSelectRows, setTableData, getForm, getSelectRowKeys },
... ... @@ -144,8 +160,11 @@
144 160 fixed: 'right',
145 161 },
146 162 });
147   - const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions, resetSelectedRowKeys } =
148   - useBatchDelete(deviceConfigDelete, handleSuccess, setProps);
  163 + const { hasBatchDelete, handleDeleteOrBatchDelete, selectionOptions } = useBatchDelete(
  164 + deviceConfigDelete,
  165 + handleSuccess,
  166 + setProps
  167 + );
149 168 selectionOptions.rowSelection.getCheckboxProps = (record: Recordable) => {
150 169 // Demo:status为1的选择框禁用
151 170 if (record.default === true) {
... ... @@ -271,26 +290,6 @@
271 290 disabled.value = true;
272 291 }
273 292 };
274   - // const handleTableDel = () => {
275   - // disabled.value = true;
276   - // deviceConfigDelete(selectedRowKeys)
277   - // .then(() => {
278   - // createMessage.success('删除设备配置成功');
279   - // handleSuccess();
280   - // setTimeout(() => {
281   - // disabled.value = false;
282   - // }, 3000);
283   - // selectedRowKeys.length = 0;
284   - // })
285   - // .catch((e) => {
286   - // selectedRowKeys.length = 0;
287   - // setTimeout(() => {
288   - // disabled.value = false;
289   - // }, 3000);
290   - // createMessage.error(e);
291   - // });
292   - // selectedRowKeys.length = 0;
293   - // };
294 293
295 294 function handleDelete(record: Recordable) {
296 295 let ids = [record.id];
... ... @@ -300,24 +299,31 @@
300 299 });
301 300 }
302 301
303   - // function defaultHeader({ filename, bookType }: ExportModalResult) {
304   - // // 默认Object.keys(data[0])作为header
305   - // jsonToSheetXlsx({
306   - // data,
307   - // filename,
308   - // write2excelOpts: {
309   - // bookType,
310   - // },
311   - // });
312   - // }
313   -
314   - // const [register1, { openModal: openModalExcel }] = useModal();
  302 + function defaultHeader({ filename, bookType }: ExportModalResult) {
  303 + // 默认Object.keys(data[0])作为header
  304 + const data = exportData.value;
  305 + jsonToSheetXlsx({
  306 + data,
  307 + filename,
  308 + write2excelOpts: {
  309 + bookType,
  310 + },
  311 + });
  312 + }
  313 + //导出
315 314 const handleExport = (record: Recordable) => {
316   - console.log(record);
317   - // setTimeout(() => {
318   - // openModalExcel();
319   - // }, 50);
  315 + exportData.value = [];
  316 + exportData.value.push({
  317 + createTime: record.createTime,
  318 + description: record.description,
  319 + name: record.name,
  320 + });
  321 + nextTick(() => {
  322 + openModalExcel();
  323 + expExcelModalRef.value?.clearFieldFunc();
  324 + });
320 325 };
  326 + //导入
321 327 function handleImport() {
322 328 console.log('record');
323 329 }
... ... @@ -354,11 +360,9 @@
354 360 handleSetDefault,
355 361 disabled,
356 362 deviceDetailRef,
357   - registerModalDetail,
358   - // register1,
359   - // defaultHeader,
  363 + registerExportModal,
  364 + defaultHeader,
360 365 useSelectionChange,
361   - // handleTableDel,
362 366 tableListRef,
363 367 loadDataSuccess,
364 368 handleImport,
... ... @@ -372,6 +376,7 @@
372 376 registerModal,
373 377 hasBatchDelete,
374 378 handleDeleteOrBatchDelete,
  379 + expExcelModalRef,
375 380 };
376 381 },
377 382 });
... ...
... ... @@ -2,10 +2,10 @@
2 2 <div>
3 3 <BasicTable @register="registerTable" :clickToRowSelect="false">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addMessageConfig">
  5 + <Authority value="api:yt:message:post">
6 6 <a-button type="primary" @click="handleCreate"> 新增消息配置 </a-button>
7 7 </Authority>
8   - <Authority value="api:yt:admin:deleteMessageConfig">
  8 + <Authority value="api:yt:message:delete">
9 9 <a-button
10 10 color="error"
11 11 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -32,13 +32,13 @@
32 32 :actions="[
33 33 {
34 34 label: '编辑',
35   - auth: 'api:yt:admin:editMessageConfig',
  35 + auth: 'api:yt:message:update',
36 36 icon: 'clarity:note-edit-line',
37 37 onClick: handleEdit.bind(null, record),
38 38 },
39 39 {
40 40 label: '删除',
41   - auth: 'api:yt:admin:deleteMessageConfig',
  41 + auth: 'api:yt:message:delete',
42 42 icon: 'ant-design:delete-outlined',
43 43 color: 'error',
44 44 popConfirm: {
... ...
... ... @@ -2,8 +2,10 @@
2 2 <div style="background-color: #f0f2f5">
3 3 <BasicTable @register="registerTable">
4 4 <template #toolbar>
5   - <a-button type="primary" @click="handleExport"> 导出 </a-button>
6   - <Authority value="api:yt:admin:deleteMessageLog">
  5 + <Authority value="api:yt:smsLog:export">
  6 + <a-button type="primary" @click="handleExport"> 导出 </a-button>
  7 + </Authority>
  8 + <Authority value="api:yt:smsLog:delete">
7 9 <a-button
8 10 type="primary"
9 11 color="error"
... ... @@ -19,13 +21,13 @@
19 21 :actions="[
20 22 {
21 23 label: '查看',
22   - auth: 'api:yt:admin:viewMessageLog',
  24 + auth: 'api:yt:smsLog:get',
23 25 icon: 'ant-design:fund-view-outlined',
24 26 onClick: handleQuery.bind(null, record),
25 27 },
26 28 {
27 29 label: '删除',
28   - auth: 'api:yt:admin:deleteMessageLog',
  30 + auth: 'api:yt:smsLog:delete',
29 31 icon: 'ant-design:delete-outlined',
30 32 color: 'error',
31 33 popConfirm: {
... ...
... ... @@ -2,10 +2,10 @@
2 2 <div>
3 3 <BasicTable @register="registerTable" :clickToRowSelect="false">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addMessageTemplate">
  5 + <Authority value="api:yt:template:post">
6 6 <a-button type="primary" @click="handleCreate"> 新增消息模板 </a-button>
7 7 </Authority>
8   - <Authority value="api:yt:admin:deleteMessageTemplate">
  8 + <Authority value="api:yt:template:delete">
9 9 <a-button
10 10 color="error"
11 11 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -34,18 +34,19 @@
34 34 :actions="[
35 35 {
36 36 label: '发送',
  37 + auth: 'api:yt:template:sendEmail:post',
37 38 icon: 'ant-design:send-outlined',
38 39 onClick: handleModal.bind(null, record),
39 40 },
40 41 {
41 42 label: '编辑',
42   - auth: 'api:yt:admin:editMessageTemplate',
  43 + auth: 'api:yt:template:update',
43 44 icon: 'clarity:note-edit-line',
44 45 onClick: handleEdit.bind(null, record),
45 46 },
46 47 {
47 48 label: '删除',
48   - auth: 'api:yt:admin:deleteMessageTemplate',
  49 + auth: 'api:yt:template:delete',
49 50 icon: 'ant-design:delete-outlined',
50 51 color: 'error',
51 52 popConfirm: {
... ...
... ... @@ -2,10 +2,10 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addNotify">
  5 + <Authority value="api:yt:notice:send:post">
6 6 <a-button type="primary" @click="handleAdd">新增通知</a-button>
7 7 </Authority>
8   - <Authority value="api:yt:admin:deleteNotify">
  8 + <Authority value="api:yt:notice:delete">
9 9 <a-button
10 10 color="error"
11 11 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -20,7 +20,7 @@
20 20 :actions="[
21 21 {
22 22 label: '查看',
23   - auth: 'api:yt:admin:viewNotify',
  23 + auth: 'api:yt:notice:get',
24 24 icon: 'ant-design:eye-outlined',
25 25 onClick: handleView.bind(null, record),
26 26 ifShow: (_action) => {
... ... @@ -30,7 +30,7 @@
30 30 },
31 31 {
32 32 label: '编辑',
33   - auth: 'api:yt:admin:editNotify',
  33 + auth: 'api:yt:notice:update',
34 34 icon: 'clarity:note-edit-line',
35 35 onClick: handleEdit.bind(null, record),
36 36 ifShow: (_action) => {
... ... @@ -40,7 +40,7 @@
40 40 },
41 41 {
42 42 label: '删除',
43   - auth: 'api:yt:admin:deleteNotify',
  43 + auth: 'api:yt:notice:delete',
44 44 icon: 'ant-design:delete-outlined',
45 45 color: 'error',
46 46 ifShow: record.creator === userId,
... ...
... ... @@ -6,7 +6,7 @@
6 6 :actions="[
7 7 {
8 8 label: '查看',
9   - auth: 'api:yt:admin:viewMyNotify',
  9 + auth: 'api:yt:noticeUser:get',
10 10 tooltip: '查看',
11 11 icon: 'ant-design:eye-outlined',
12 12 onClick: handleView.bind(null, record),
... ...
... ... @@ -8,10 +8,10 @@
8 8 :clickToRowSelect="false"
9 9 >
10 10 <template #toolbar>
11   - <Authority value="api:yt:admin:addDataFlow">
  11 + <Authority value="api:yt:convert:config:post">
12 12 <a-button type="primary" @click="handleAdd"> 添加流转 </a-button>
13 13 </Authority>
14   - <Authority value="api:yt:admin:deleteDataFlow">
  14 + <Authority value="api:yt:convert:config:delete">
15 15 <a-button
16 16 type="primary"
17 17 color="error"
... ... @@ -41,7 +41,7 @@
41 41 :actions="[
42 42 {
43 43 label: '编辑',
44   - auth: 'api:yt:admin:editDataFlow',
  44 + auth: 'api:yt:convert:config:update',
45 45 icon: 'clarity:note-edit-line',
46 46 onClick: handleEdit.bind(null, record),
47 47 ifShow: (_action) => {
... ... @@ -51,7 +51,7 @@
51 51
52 52 {
53 53 label: '删除',
54   - auth: 'api:yt:admin:deleteDataFlow',
  54 + auth: 'api:yt:convert:config:delete',
55 55 icon: 'ant-design:delete-outlined',
56 56 color: 'error',
57 57 popConfirm: {
... ...
... ... @@ -2,10 +2,10 @@
2 2 <div>
3 3 <BasicTable @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addLinkEdge">
  5 + <Authority value="api:yt:sceneLinkage:post">
6 6 <a-button type="primary" @click="handleAdd"> 新增场景联动 </a-button>
7 7 </Authority>
8   - <Authority value="api:yt:admin:deleteLinkEdge">
  8 + <Authority value="api:yt:sceneLinkage:delete">
9 9 <a-button
10 10 color="error"
11 11 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -20,20 +20,20 @@
20 20 :actions="[
21 21 {
22 22 label: '查看',
23   - auth: 'api:yt:admin:viewLinkEdge',
  23 + auth: 'api:yt:sceneLinkage:get',
24 24 icon: 'ant-design:eye-outlined',
25 25 onClick: handleView.bind(null, record),
26 26 },
27 27 {
28 28 label: '编辑',
29   - auth: 'api:yt:admin:editLinkEdge',
  29 + auth: 'api:yt:sceneLinkage:update',
30 30 icon: 'clarity:note-edit-line',
31 31 onClick: handleEdit.bind(null, record),
32 32 ifShow: record.creator === userId && record.status !== 1,
33 33 },
34 34 {
35 35 label: '删除',
36   - auth: 'api:yt:admin:deleteLinkEdge',
  36 + auth: 'api:yt:sceneLinkage:delete',
37 37 icon: 'ant-design:delete-outlined',
38 38 color: 'error',
39 39 ifShow: record.creator === userId && record.status !== 1,
... ...
... ... @@ -2,10 +2,10 @@
2 2 <div>
3 3 <BasicTable @register="registerTable" v-show="isStatus === 0">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addScript">
  5 + <Authority value="api:yt:convert:js:post">
6 6 <a-button type="primary" @click="handleCreate"> 新增转换脚本 </a-button>
7 7 </Authority>
8   - <Authority value="api:yt:admin:deleteScript">
  8 + <Authority value="api:yt:convert:js:delete">
9 9 <a-button
10 10 color="error"
11 11 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -29,13 +29,13 @@
29 29 :actions="[
30 30 {
31 31 label: '编辑',
32   - auth: 'api:yt:admin:editScript',
  32 + auth: 'api:yt:convert:js:update',
33 33 icon: 'clarity:note-edit-line',
34 34 onClick: handleEdit.bind(null, record),
35 35 },
36 36 {
37 37 label: '删除',
38   - auth: 'api:yt:admin:deleteScript',
  38 + auth: 'api:yt:convert:js:delete',
39 39 icon: 'ant-design:delete-outlined',
40 40 ifShow: record.status == 0,
41 41 color: 'error',
... ...
... ... @@ -8,10 +8,10 @@
8 8 />
9 9 <BasicTable :clickToRowSelect="false" @register="registerTable" class="w-3/4 xl:w-4/5">
10 10 <template #toolbar>
11   - <Authority value="api:yt:admin:addAccount">
  11 + <Authority value="api:yt:user:post">
12 12 <a-button type="primary" @click="handleCreate">新增账号</a-button>
13 13 </Authority>
14   - <Authority value="api:yt:admin:deleteAccount">
  14 + <Authority value="api:yt:user:delete">
15 15 <a-button
16 16 color="error"
17 17 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -45,7 +45,7 @@
45 45 :actions="[
46 46 {
47 47 label: '用户详情',
48   - auth: 'api:yt:admin:viewAccount',
  48 + auth: 'api:yt:user:get',
49 49 icon: 'clarity:info-standard-line',
50 50 tooltip: '用户详情',
51 51 onClick: handleView.bind(null, record),
... ... @@ -53,7 +53,7 @@
53 53 },
54 54 {
55 55 label: '编辑',
56   - auth: 'api:yt:admin:editAccount',
  56 + auth: 'api:yt:user:update',
57 57 icon: 'clarity:note-edit-line',
58 58 tooltip: '编辑',
59 59 onClick: handleEdit.bind(null, record),
... ... @@ -61,7 +61,7 @@
61 61 },
62 62 {
63 63 label: '删除',
64   - auth: 'api:yt:admin:deleteAccount',
  64 + auth: 'api:yt:user:delete',
65 65 icon: 'ant-design:delete-outlined',
66 66 color: 'error',
67 67 tooltip: '删除',
... ...
... ... @@ -81,7 +81,7 @@
81 81 </BasicForm>
82 82 </Card>
83 83 <Loading v-bind="compState" />
84   - <Authority value="api:yt:admin:customizeSaveApp">
  84 + <Authority value="api:yt:appDesign:update:put">
85 85 <a-button @click="handleUpdateInfo" type="primary" class="mt-4">保存信息</a-button>
86 86 </Authority>
87 87 </div>
... ...
... ... @@ -83,7 +83,7 @@
83 83 </BasicForm>
84 84 </Card>
85 85 <Loading v-bind="compState" />
86   - <Authority value="api:yt:admin:customizeSavePlatform">
  86 + <Authority value="api:yt:platform:update:put">
87 87 <a-button @click="handleUpdateInfo" type="primary" class="mt-4">保存信息</a-button>
88 88 </Authority>
89 89 </div>
... ...
... ... @@ -31,7 +31,7 @@
31 31 </BasicForm>
32 32 </Card>
33 33 <Loading v-bind="compState" />
34   - <Authority value="api:yt:admin:customizeUpdate">
  34 + <Authority value="api:yt:enterprise:update:put">
35 35 <a-button @click="handleUpdateInfo" type="primary" class="mt-4">更新基本信息</a-button>
36 36 </Authority>
37 37 </div>
... ...
... ... @@ -2,10 +2,10 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addDict">
  5 + <Authority value="api:yt:dict:post">
6 6 <a-button type="primary" @click="handleCreate"> 新增字典 </a-button>
7 7 </Authority>
8   - <Authority value="api:yt:admin:deleteDict">
  8 + <Authority value="api:yt:dict:delete">
9 9 <a-button
10 10 color="error"
11 11 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -25,13 +25,13 @@
25 25 },
26 26 {
27 27 label: '编辑',
28   - auth: 'api:yt:admin:editDict',
  28 + auth: 'api:yt:dict:update',
29 29 icon: 'clarity:note-edit-line',
30 30 onClick: handleEdit.bind(null, record),
31 31 },
32 32 {
33 33 label: '删除',
34   - auth: 'api:yt:admin:deleteDict',
  34 + auth: 'api:yt:dict:delete',
35 35 icon: 'ant-design:delete-outlined',
36 36 color: 'error',
37 37 popConfirm: {
... ...
... ... @@ -2,7 +2,7 @@
2 2 <div>
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable" :searchInfo="searchInfo">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:deleteFeedBack">
  5 + <Authority value="api:yt:opinion:delete">
6 6 <a-button
7 7 type="primary"
8 8 color="error"
... ... @@ -21,13 +21,13 @@
21 21 :actions="[
22 22 {
23 23 label: '预览',
24   - auth: 'api:yt:admin:viewFeedBack',
  24 + auth: 'api:yt:opinion:get',
25 25 icon: 'clarity:note-edit-line',
26 26 onClick: handleViewVideo.bind(null, record),
27 27 },
28 28 {
29 29 label: '删除',
30   - auth: 'api:yt:admin:deleteFeedBack',
  30 + auth: 'api:yt:opinion:delete',
31 31 icon: 'ant-design:delete-outlined',
32 32 color: 'error',
33 33 popConfirm: {
... ...
... ... @@ -7,7 +7,7 @@
7 7 :actions="[
8 8 {
9 9 label: '详情',
10   - auth: 'api:yt:admin:viewFeedBack',
  10 + auth: 'api:yt:log:get',
11 11 icon: 'clarity:note-edit-line',
12 12 onClick: handleViewDetail.bind(null, record),
13 13 },
... ...
... ... @@ -7,7 +7,7 @@
7 7 :actions="[
8 8 {
9 9 label: '详情',
10   - auth: 'api:yt:admin:viewFeedBack',
  10 + auth: 'api:yt:log:get',
11 11 icon: 'clarity:note-edit-line',
12 12 onClick: handleViewDetail.bind(null, record),
13 13 },
... ...
... ... @@ -7,7 +7,7 @@
7 7 :actions="[
8 8 {
9 9 label: '详情',
10   - auth: 'api:yt:admin:viewFeedBack',
  10 + auth: 'api:yt:log:get',
11 11 icon: 'clarity:note-edit-line',
12 12 onClick: handleViewDetail.bind(null, record),
13 13 },
... ...
... ... @@ -73,7 +73,7 @@
73 73 menuId = Reflect.get(data.record, 'id');
74 74 }
75 75 //加载菜单
76   - let treeData = await getMenuList();
  76 + let treeData = await getMenuList(1);
77 77 treeData = listToTree(treeData);
78 78 updateSchema({
79 79 field: 'parentId',
... ...
... ... @@ -2,12 +2,12 @@
2 2 <div class="p-4">
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable" @fetch-success="onFetchSuccess">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:addOrg">
  5 + <Authority value="api:yt:organization:post">
6 6 <a-button type="primary" @click="handleCreate">
7 7 {{ getI18n }}
8 8 </a-button>
9 9 </Authority>
10   - <Authority value="api:yt:admin:deleteOrg">
  10 + <Authority value="api:yt:organization:delete">
11 11 <a-button
12 12 color="error"
13 13 @click="handleDeleteOrBatchDelete(null)"
... ... @@ -22,13 +22,13 @@
22 22 :actions="[
23 23 {
24 24 label: '编辑',
25   - auth: 'api:yt:admin:editOrg',
  25 + auth: 'api:yt:organization:update',
26 26 icon: 'clarity:note-edit-line',
27 27 onClick: handleEdit.bind(null, record),
28 28 },
29 29 {
30 30 label: '删除',
31   - auth: 'api:yt:admin:deleteOrg',
  31 + auth: 'api:yt:organization:delete',
32 32 icon: 'ant-design:delete-outlined',
33 33 color: 'error',
34 34 popConfirm: {
... ...
... ... @@ -6,10 +6,10 @@
6 6 :clickToRowSelect="false"
7 7 >
8 8 <template #toolbar>
9   - <Authority value="api:yt:admin:addSysRole">
  9 + <Authority value="api:yt:role:saveOrUpdateRoleInfoWithMenu:post">
10 10 <a-button type="primary" @click="handleCreate">新增角色</a-button>
11 11 </Authority>
12   - <Authority value="api:yt:admin:deleteSysRole">
  12 + <Authority value="api:yt:role:delete">
13 13 <a-button
14 14 type="primary"
15 15 color="error"
... ... @@ -34,13 +34,13 @@
34 34 :actions="[
35 35 {
36 36 label: '编辑',
37   - auth: 'api:yt:admin:editSysRole',
  37 + auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
38 38 icon: 'clarity:note-edit-line',
39 39 onClick: handleEdit.bind(null, record),
40 40 },
41 41 {
42 42 label: '删除',
43   - auth: 'api:yt:admin:deleteSysRole',
  43 + auth: 'api:yt:role:delete',
44 44 icon: 'ant-design:delete-outlined',
45 45 color: 'error',
46 46 ifShow: record.roleType != RoleEnum.SYS_ADMIN,
... ...
... ... @@ -7,10 +7,10 @@
7 7 :clickToRowSelect="false"
8 8 >
9 9 <template #toolbar>
10   - <Authority value="api:yt:admin:addTenantConfig">
  10 + <Authority value="api:yt:tenantProfile:post">
11 11 <a-button type="primary" @click="handleAdd"> 新增租户配置 </a-button>
12 12 </Authority>
13   - <Authority value="api:yt:admin:deleteTenantConfig">
  13 + <Authority value="api:yt:tenantProfile:delete">
14 14 <a-button color="error" :disabled="disabled" @click="handleMutilteDelete">
15 15 批量删除
16 16 </a-button>
... ... @@ -27,13 +27,13 @@
27 27 },
28 28 {
29 29 label: '编辑',
30   - auth: 'api:yt:admin:editTenantConfig',
  30 + auth: 'api:yt:tenantProfile:update',
31 31 icon: 'clarity:note-edit-line',
32 32 onClick: handleEdit.bind(null, record),
33 33 },
34 34 {
35 35 label: '删除',
36   - auth: 'api:yt:admin:deleteTenantConfig',
  36 + auth: 'api:yt:tenantProfile: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 @register="tenantTable">
4 4 <template #toolbar>
5   - <Authority value="api:yt:admin:saveTenant">
  5 + <Authority value="api:yt:admin:tenant:post">
6 6 <a-button type="primary" @click="handleCreate"> 新增租户</a-button>
7 7 </Authority>
8 8 </template>
... ... @@ -48,13 +48,13 @@
48 48 {
49 49 icon: 'clarity:note-edit-line',
50 50 label: '编辑',
51   - auth: 'api:yt:admin:editTenant',
  51 + auth: 'api:yt:admin:tenant:update',
52 52 onClick: handleEdit.bind(null, record),
53 53 },
54 54 {
55 55 icon: 'ant-design:delete-outlined',
56 56 label: '删除',
57   - auth: 'api:yt:admin:deleteTenant',
  57 + auth: 'api:yt:admin:tenant:delete',
58 58 color: 'error',
59 59 popConfirm: {
60 60 title: '是否确认删除',
... ...
... ... @@ -6,10 +6,10 @@
6 6 :clickToRowSelect="false"
7 7 >
8 8 <template #toolbar>
9   - <Authority value="api:yt:admin:addTenantRole">
  9 + <Authority value="api:yt:role:saveOrUpdateRoleInfoWithMenu:post">
10 10 <a-button type="primary" @click="handleCreate"> 新增角色 </a-button>
11 11 </Authority>
12   - <Authority value="api:yt:admin:deleteTenantRole">
  12 + <Authority value="api:yt:role:delete">
13 13 <a-button
14 14 type="primary"
15 15 color="error"
... ... @@ -34,13 +34,13 @@
34 34 :actions="[
35 35 {
36 36 label: '编辑',
37   - auth: 'api:yt:admin:editTenantRole',
  37 + auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
38 38 icon: 'clarity:note-edit-line',
39 39 onClick: handleEdit.bind(null, record),
40 40 },
41 41 {
42 42 label: '删除',
43   - auth: 'api:yt:admin:deleteTenantRole',
  43 + auth: 'api:yt:role:delete',
44 44 icon: 'ant-design:delete-outlined',
45 45 color: 'error',
46 46 popConfirm: {
... ...