Commit 52a8f36ac0ac50f8a0d2f0c6f49c579afecc2f30

Authored by fengtao
1 parent 53b9a64f

fix:修改所有的批量删除 弹出确认框

... ... @@ -14,14 +14,16 @@
14 14 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增告警配置 </a-button>
15 15 </Authority>
16 16 <Authority value="api:yt:alarm:profile:delete">
17   - <a-button
18   - type="primary"
19   - color="error"
20   - @click="handleDeleteOrBatchDelete(null)"
21   - :disabled="hasBatchDelete"
  17 + <Popconfirm
  18 + title="您确定要批量删除数据"
  19 + ok-text="确定"
  20 + cancel-text="取消"
  21 + @confirm="handleDeleteOrBatchDelete(null)"
22 22 >
23   - 批量删除
24   - </a-button>
  23 + <a-button type="primary" color="error" :disabled="hasBatchDelete">
  24 + 批量删除
  25 + </a-button>
  26 + </Popconfirm>
25 27 </Authority>
26 28 </template>
27 29 <template #alarmContact="{ record }">
... ... @@ -86,7 +88,7 @@
86 88 import { useResetOrganizationTree, OrganizationIdTree } from '/@/views/common/organizationIdTree';
87 89 import { deleteAlarmConfig, queryAlarmConfig } from '/@/api/alarm/config/alarmConfig';
88 90 import { searchFormSchema, columns } from './config.data';
89   - import { Modal } from 'ant-design-vue';
  91 + import { Modal, Popconfirm } from 'ant-design-vue';
90 92 import { JsonPreview } from '/@/components/CodeEditor';
91 93 import { findDictItemByCode } from '/@/api/system/dict';
92 94 import { alarmContactGetPage } from '/@/api/device/deviceConfigApi';
... ... @@ -105,6 +107,7 @@
105 107 ContactDrawer,
106 108 Switch,
107 109 Authority,
  110 + Popconfirm,
108 111 },
109 112 setup() {
110 113 const searchInfo = reactive<Recordable>({});
... ...
... ... @@ -13,14 +13,16 @@
13 13 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增告警联系人 </a-button>
14 14 </Authority>
15 15 <Authority value="api:yt:alarmContact:delete">
16   - <a-button
17   - type="primary"
18   - color="error"
19   - @click="handleDeleteOrBatchDelete(null)"
20   - :disabled="hasBatchDelete"
  16 + <Popconfirm
  17 + title="您确定要批量删除数据"
  18 + ok-text="确定"
  19 + cancel-text="取消"
  20 + @confirm="handleDeleteOrBatchDelete(null)"
21 21 >
22   - 批量删除
23   - </a-button>
  22 + <a-button type="primary" color="error" :disabled="hasBatchDelete">
  23 + 批量删除
  24 + </a-button>
  25 + </Popconfirm>
24 26 </Authority>
25 27 </template>
26 28 <template #action="{ record }">
... ... @@ -52,7 +54,7 @@
52 54 </template>
53 55
54 56 <script lang="ts">
55   - import { defineComponent, reactive, nextTick, ref } from 'vue';
  57 + import { defineComponent, reactive, nextTick } from 'vue';
56 58 import { BasicTable, useTable, TableAction } from '/@/components/Table';
57 59 import { PageWrapper } from '/@/components/Page';
58 60 import { useDrawer } from '/@/components/Drawer';
... ... @@ -62,6 +64,7 @@
62 64 import { getAlarmContact, deleteAlarmContact } from '/@/api/alarm/contact/alarmContact';
63 65 import { searchFormSchema, columns } from './config.data';
64 66 import { Authority } from '/@/components/Authority';
  67 + import { Popconfirm } from 'ant-design-vue';
65 68
66 69 export default defineComponent({
67 70 components: {
... ... @@ -71,6 +74,7 @@
71 74 TableAction,
72 75 ContactDrawer,
73 76 Authority,
  77 + Popconfirm,
74 78 },
75 79 setup() {
76 80 const searchInfo = reactive<Recordable>({});
... ...
... ... @@ -52,7 +52,7 @@ export const columns: BasicColumn[] = [
52 52 width: 160,
53 53 },
54 54 {
55   - title: '添加时间',
  55 + title: '创建时间',
56 56 dataIndex: 'createTime',
57 57 width: 180,
58 58 },
... ...
... ... @@ -14,14 +14,16 @@
14 14 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增视频 </a-button>
15 15 </Authority>
16 16 <Authority value="api:yt:video:delete">
17   - <a-button
18   - type="primary"
19   - color="error"
20   - @click="handleDeleteOrBatchDelete(null)"
21   - :disabled="hasBatchDelete"
  17 + <Popconfirm
  18 + title="您确定要批量删除数据"
  19 + ok-text="确定"
  20 + cancel-text="取消"
  21 + @confirm="handleDeleteOrBatchDelete(null)"
22 22 >
23   - 批量删除
24   - </a-button>
  23 + <a-button type="primary" color="error" :disabled="hasBatchDelete">
  24 + 批量删除
  25 + </a-button>
  26 + </Popconfirm>
25 27 </Authority>
26 28 </template>
27 29 <template #img="{ record }">
... ... @@ -84,6 +86,7 @@
84 86 import { useModal } from '/@/components/Modal';
85 87 import { Authority } from '/@/components/Authority';
86 88 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
  89 + import { Popconfirm } from 'ant-design-vue';
87 90
88 91 export default defineComponent({
89 92 components: {
... ... @@ -95,6 +98,7 @@
95 98 VideoPreviewModal,
96 99 TableImg,
97 100 Authority,
  101 + Popconfirm,
98 102 },
99 103 setup() {
100 104 const searchInfo = reactive<Recordable>({});
... ...
... ... @@ -14,6 +14,7 @@
14 14 import { StreamingMediaModel } from '/@/api/camera/model/cameraModel';
15 15 import { ref } from 'vue';
16 16 import { useMessage } from '/@/hooks/web/useMessage';
  17 + import { Popconfirm } from 'ant-design-vue';
17 18
18 19 const enabledBatchDelete = ref(true);
19 20 const [register, { reload, getSelectRowKeys }] = useTable({
... ... @@ -116,14 +117,16 @@
116 117 <a-button type="primary" @click="handleCreateStreamingMedia">新增流媒体</a-button>
117 118 </Authority>
118 119 <Authority value="api:yt:streaming:delete">
119   - <a-button
120   - color="error"
121   - type="primary"
122   - :disabled="enabledBatchDelete"
123   - @click="handleDeleteRecord()"
  120 + <Popconfirm
  121 + title="您确定要批量删除数据"
  122 + ok-text="确定"
  123 + cancel-text="取消"
  124 + @confirm="handleDeleteRecord()"
124 125 >
125   - 批量删除
126   - </a-button>
  126 + <a-button color="error" type="primary" :disabled="enabledBatchDelete">
  127 + 批量删除
  128 + </a-button>
  129 + </Popconfirm>
127 130 </Authority>
128 131 </template>
129 132 </BasicTable>
... ...
... ... @@ -14,14 +14,16 @@
14 14 <a-button type="primary" @click="handleCreateOrEdit(null)"> 新增组态 </a-button>
15 15 </Authority>
16 16 <Authority value="api:yt:admin:deleteConfiguration">
17   - <a-button
18   - type="primary"
19   - color="error"
20   - @click="handleDeleteOrBatchDelete(null)"
21   - :disabled="hasBatchDelete"
  17 + <Popconfirm
  18 + title="您确定要批量删除数据"
  19 + ok-text="确定"
  20 + cancel-text="取消"
  21 + @confirm="handleDeleteOrBatchDelete(null)"
22 22 >
23   - 批量删除
24   - </a-button>
  23 + <a-button type="primary" color="error" :disabled="hasBatchDelete">
  24 + 批量删除
  25 + </a-button>
  26 + </Popconfirm>
25 27 </Authority>
26 28 </template>
27 29 <template #action="{ record }">
... ... @@ -79,6 +81,7 @@
79 81 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
80 82 import { getAppEnvConfig, isDevMode } from '/@/utils/env';
81 83 import { Authority } from '/@/components/Authority';
  84 + import { Popconfirm } from 'ant-design-vue';
82 85
83 86 export default defineComponent({
84 87 components: {
... ... @@ -88,6 +91,7 @@
88 91 TableAction,
89 92 ContactDrawer,
90 93 Authority,
  94 + Popconfirm,
91 95 },
92 96 setup() {
93 97 const { VITE_GLOB_CONFIGURATION } = getAppEnvConfig();
... ...
... ... @@ -10,14 +10,16 @@
10 10 </a-button>
11 11 </Authority>
12 12 <Authority value="api:yt:device:delete">
13   - <a-button
14   - color="error"
15   - v-if="authBtn(role)"
16   - @click="handleDeleteOrBatchDelete(null)"
17   - :disabled="hasBatchDelete"
  13 + <Popconfirm
  14 + title="您确定要批量删除数据"
  15 + ok-text="确定"
  16 + cancel-text="取消"
  17 + @confirm="handleDeleteOrBatchDelete(null)"
18 18 >
19   - 批量删除
20   - </a-button>
  19 + <a-button color="error" v-if="authBtn(role)" :disabled="hasBatchDelete">
  20 + 批量删除
  21 + </a-button>
  22 + </Popconfirm>
21 23 </Authority>
22 24 </template>
23 25 <template #img="{ record }">
... ... @@ -157,7 +159,7 @@
157 159 import { DeviceState, DeviceTypeEnum } from '/@/api/device/model/deviceModel';
158 160 import { BasicTable, useTable, TableAction, TableImg } from '/@/components/Table';
159 161 import { columns, searchFormSchema } from './config/device.data';
160   - import { Tag, Tooltip, Popover } from 'ant-design-vue';
  162 + import { Tag, Tooltip, Popover, Popconfirm } from 'ant-design-vue';
161 163 import {
162 164 deleteDevice,
163 165 devicePage,
... ... @@ -199,6 +201,7 @@
199 201 QuestionCircleOutlined,
200 202 Popover,
201 203 Authority,
  204 + Popconfirm,
202 205 },
203 206 setup(_) {
204 207 const { createMessage } = useMessage();
... ...
... ... @@ -17,14 +17,14 @@
17 17 </ImpExcel>
18 18 </Authority>
19 19 <Authority value="api:yt:deviceProfile:delete">
20   - <a-button
21   - type="primary"
22   - color="error"
23   - @click="handleDeleteOrBatchDelete(null)"
24   - :disabled="hasBatchDelete"
  20 + <Popconfirm
  21 + title="您确定要批量删除数据"
  22 + ok-text="确定"
  23 + cancel-text="取消"
  24 + @confirm="handleDeleteOrBatchDelete(null)"
25 25 >
26   - 批量删除
27   - </a-button>
  26 + <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  27 + </Popconfirm>
28 28 </Authority>
29 29 </template>
30 30 <template #img="{ record }">
... ... @@ -109,6 +109,7 @@
109 109 import { jsonToSheetXlsx, ExpExcelModal, ExportModalResult } from '/@/components/Excel';
110 110 import { Authority } from '/@/components/Authority';
111 111 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
  112 + import { Popconfirm } from 'ant-design-vue';
112 113
113 114 export default defineComponent({
114 115 name: 'DeviceProfileManagement',
... ... @@ -120,6 +121,7 @@
120 121 TableImg,
121 122 Authority,
122 123 ExpExcelModal,
  124 + Popconfirm,
123 125 },
124 126 setup() {
125 127 const exportData: any = ref([]);
... ...
... ... @@ -6,13 +6,14 @@
6 6 <a-button type="primary" @click="handleCreate"> 新增消息配置 </a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:message:delete">
9   - <a-button
10   - color="error"
11   - @click="handleDeleteOrBatchDelete(null)"
12   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
13 14 >
14   - 批量删除
15   - </a-button>
  15 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
16 17 </Authority>
17 18 </template>
18 19 <template #config="{ record }">
... ... @@ -61,7 +62,7 @@
61 62 import { useDrawer } from '/@/components/Drawer';
62 63 import ConfigDrawer from './ConfigDrawer.vue';
63 64 import { columns, searchFormSchema } from './config.data';
64   - import { Modal } from 'ant-design-vue';
  65 + import { Modal, Popconfirm } from 'ant-design-vue';
65 66 import { JsonPreview } from '/@/components/CodeEditor';
66 67 import { useMessage } from '/@/hooks/web/useMessage';
67 68 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
... ... @@ -71,7 +72,7 @@
71 72
72 73 export default defineComponent({
73 74 name: 'MessageConfigManagement',
74   - components: { BasicTable, ConfigDrawer, TableAction, Switch, Authority },
  75 + components: { BasicTable, ConfigDrawer, TableAction, Switch, Authority, Popconfirm },
75 76 setup() {
76 77 const [registerDrawer, { openDrawer }] = useDrawer();
77 78 function handleSuccess() {
... ...
... ... @@ -2,16 +2,18 @@
2 2 <div style="background-color: #f0f2f5">
3 3 <BasicTable @register="registerTable">
4 4 <template #toolbar>
5   - <a-button type="primary" @click="handleCreate"> 导出 </a-button>
6 5 <Authority value="api:yt:smsLog:export">
7   - <a-button
8   - type="primary"
9   - color="error"
10   - @click="handleDeleteOrBatchDelete(null)"
11   - :disabled="hasBatchDelete"
  6 + <a-button type="primary" @click="handleCreate"> 导出 </a-button>
  7 + </Authority>
  8 + <Authority value="api:yt:smsLog:delete">
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
12 14 >
13   - 批量删除
14   - </a-button>
  15 + <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
15 17 </Authority>
16 18 </template>
17 19 <template #action="{ record }">
... ... @@ -49,10 +51,11 @@
49 51 import EmailDetail from './EmailDetail.vue';
50 52 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
51 53 import { Authority } from '/@/components/Authority';
  54 + import { Popconfirm } from 'ant-design-vue';
52 55
53 56 export default defineComponent({
54 57 name: 'EmailLog',
55   - components: { EmailDetail, BasicTable, TableAction, Authority },
  58 + components: { EmailDetail, BasicTable, TableAction, Authority, Popconfirm },
56 59 setup() {
57 60 const [registerModal, { openModal }] = useModal();
58 61 const [registerTable, { reload, setProps }] = useTable({
... ...
... ... @@ -6,14 +6,14 @@
6 6 <a-button type="primary" @click="handleExport"> 导出 </a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:smsLog:delete">
9   - <a-button
10   - type="primary"
11   - color="error"
12   - @click="handleDeleteOrBatchDelete(null)"
13   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
14 14 >
15   - 批量删除
16   - </a-button>
  15 + <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
17 17 </Authority>
18 18 </template>
19 19 <template #action="{ record }">
... ... @@ -45,7 +45,7 @@
45 45 import { defineComponent, h, nextTick } from 'vue';
46 46 import { BasicTable, useTable, TableAction } from '/@/components/Table';
47 47 import { columns, searchFormSchema } from './sms.data';
48   - import { Modal } from 'ant-design-vue';
  48 + import { Modal, Popconfirm } from 'ant-design-vue';
49 49 import { smsLogPage, deleteSmsLog } from '/@/api/message/records';
50 50 import { JsonPreview } from '/@/components/CodeEditor';
51 51 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
... ... @@ -53,7 +53,7 @@
53 53
54 54 export default defineComponent({
55 55 name: 'SmsLog',
56   - components: { BasicTable, TableAction, Authority },
  56 + components: { BasicTable, TableAction, Authority, Popconfirm },
57 57 setup() {
58 58 const [registerTable, { reload, setProps }] = useTable({
59 59 title: '短信发送列表',
... ...
... ... @@ -6,13 +6,14 @@
6 6 <a-button type="primary" @click="handleCreate"> 新增消息模板 </a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:template:delete">
9   - <a-button
10   - color="error"
11   - @click="handleDeleteOrBatchDelete(null)"
12   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
13 14 >
14   - 批量删除
15   - </a-button>
  15 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
16 17 </Authority>
17 18 </template>
18 19 <template #config="{ record }">
... ... @@ -79,13 +80,22 @@
79 80 import SendEmail from '/@/views/message/template/SendEmail.vue';
80 81 import { useMessage } from '/@/hooks/web/useMessage';
81 82 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
82   - import { Switch } from 'ant-design-vue';
  83 + import { Switch, Popconfirm } from 'ant-design-vue';
83 84 import { setMessageTemplateStatus } from '/@/api/message/template';
84 85 import { Authority } from '/@/components/Authority';
85 86
86 87 export default defineComponent({
87 88 name: 'MessageTemplateManagement',
88   - components: { SendSms, SendEmail, BasicTable, TemplateDrawer, TableAction, Switch, Authority },
  89 + components: {
  90 + SendSms,
  91 + SendEmail,
  92 + BasicTable,
  93 + TemplateDrawer,
  94 + TableAction,
  95 + Switch,
  96 + Authority,
  97 + Popconfirm,
  98 + },
89 99 setup() {
90 100 const [registerModal, { openModal: openModal }] = useModal();
91 101 const [registerMailModal, { openModal: openMailModal }] = useModal();
... ...
... ... @@ -6,13 +6,14 @@
6 6 <a-button type="primary" @click="handleAdd">新增通知</a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:notice:delete">
9   - <a-button
10   - color="error"
11   - @click="handleDeleteOrBatchDelete(null)"
12   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
13 14 >
14   - 批量删除
15   - </a-button>
  15 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
16 17 </Authority>
17 18 </template>
18 19 <template #action="{ record }">
... ... @@ -73,10 +74,18 @@
73 74 import { USER_INFO_KEY } from '/@/enums/cacheEnum';
74 75 import { getAuthCache } from '/@/utils/auth';
75 76 import { Authority } from '/@/components/Authority';
  77 + import { Popconfirm } from 'ant-design-vue';
76 78
77 79 export default defineComponent({
78 80 name: 'Notificationmannager',
79   - components: { BasicTable, NotifyManagerDrawer, TableAction, tableViewChild, Authority },
  81 + components: {
  82 + BasicTable,
  83 + NotifyManagerDrawer,
  84 + TableAction,
  85 + tableViewChild,
  86 + Authority,
  87 + Popconfirm,
  88 + },
80 89 setup() {
81 90 const userInfo: any = getAuthCache(USER_INFO_KEY);
82 91 const userId = userInfo.userId;
... ...
... ... @@ -6,13 +6,14 @@
6 6 <a-button type="primary" @click="handleAdd"> 新增场景联动 </a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:sceneLinkage:delete">
9   - <a-button
10   - color="error"
11   - @click="handleDeleteOrBatchDelete(null)"
12   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
13 14 >
14   - 批量删除
15   - </a-button>
  15 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
16 17 </Authority>
17 18 </template>
18 19 <template #action="{ record }">
... ... @@ -69,7 +70,7 @@
69 70 screenLinkPagePutApi,
70 71 } from '/@/api/ruleengine/ruleengineApi';
71 72 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
72   - import { Switch } from 'ant-design-vue';
  73 + import { Switch, Popconfirm } from 'ant-design-vue';
73 74 import { columns, searchFormSchema } from './config/config.data.ts';
74 75 import { USER_INFO_KEY } from '/@/enums/cacheEnum';
75 76 import { getAuthCache } from '/@/utils/auth';
... ...
... ... @@ -6,13 +6,14 @@
6 6 <a-button type="primary" @click="handleCreate"> 新增转换脚本 </a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:convert:js:delete">
9   - <a-button
10   - color="error"
11   - @click="handleDeleteOrBatchDelete(null)"
12   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
13 14 >
14   - 批量删除
15   - </a-button>
  15 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
16 17 </Authority>
17 18 </template>
18 19 <template #status="{ record }">
... ... @@ -68,7 +69,7 @@
68 69
69 70 <script lang="ts" setup>
70 71 import { ref, nextTick } from 'vue';
71   - import { Switch } from 'ant-design-vue';
  72 + import { Switch, Popconfirm } from 'ant-design-vue';
72 73 import { BasicTable, useTable, TableAction } from '/@/components/Table';
73 74 import { columns, searchFormSchema } from './config/config.data';
74 75 import { getConvertApi, deleteTransformApi } from '/@/api/device/TransformScriptApi';
... ...
... ... @@ -13,13 +13,14 @@
13 13 <a-button type="primary" @click="handleCreate">新增账号</a-button>
14 14 </Authority>
15 15 <Authority value="api:yt:user:delete">
16   - <a-button
17   - color="error"
18   - @click="handleDeleteOrBatchDelete(null)"
19   - :disabled="hasBatchDelete"
  16 + <Popconfirm
  17 + title="您确定要批量删除数据"
  18 + ok-text="确定"
  19 + cancel-text="取消"
  20 + @confirm="handleDeleteOrBatchDelete(null)"
20 21 >
21   - 批量删除
22   - </a-button>
  22 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  23 + </Popconfirm>
23 24 </Authority>
24 25 </template>
25 26 <template #status="{ record }">
... ... @@ -86,7 +87,7 @@
86 87 import { deleteUser, getAccountList } from '/@/api/system/system';
87 88 import { PageWrapper } from '/@/components/Page';
88 89 import { useResetOrganizationTree, OrganizationIdTree } from '/@/views/common/organizationIdTree';
89   - import { Tag } from 'ant-design-vue';
  90 + import { Tag, Popconfirm } from 'ant-design-vue';
90 91 import { useModal } from '/@/components/Modal';
91 92 import AccountModal from './AccountModal.vue';
92 93 import { columns, searchFormSchema } from './account.data';
... ... @@ -104,6 +105,7 @@
104 105 TableAction,
105 106 Tag,
106 107 Authority,
  108 + Popconfirm,
107 109 },
108 110 setup() {
109 111 const go = useGo();
... ...
... ... @@ -6,13 +6,14 @@
6 6 <a-button type="primary" @click="handleCreate"> 新增字典 </a-button>
7 7 </Authority>
8 8 <Authority value="api:yt:dict:delete">
9   - <a-button
10   - color="error"
11   - @click="handleDeleteOrBatchDelete(null)"
12   - :disabled="hasBatchDelete"
  9 + <Popconfirm
  10 + title="您确定要批量删除数据"
  11 + ok-text="确定"
  12 + cancel-text="取消"
  13 + @confirm="handleDeleteOrBatchDelete(null)"
13 14 >
14   - 批量删除
15   - </a-button>
  15 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  16 + </Popconfirm>
16 17 </Authority>
17 18 </template>
18 19 <template #action="{ record }">
... ... @@ -61,13 +62,13 @@
61 62 import DictDrawer from './DictDrawer.vue';
62 63 import ItemIndex from './item/ItemIndex.vue';
63 64 import { columns, searchFormSchema } from './dict.data';
64   - import { Tag } from 'ant-design-vue';
  65 + import { Tag, Popconfirm } from 'ant-design-vue';
65 66 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
66 67 import { Authority } from '/@/components/Authority';
67 68
68 69 export default defineComponent({
69 70 name: 'DictManagement',
70   - components: { BasicTable, DictDrawer, ItemIndex, TableAction, Tag, Authority },
  71 + components: { BasicTable, DictDrawer, ItemIndex, TableAction, Tag, Authority, Popconfirm },
71 72 setup() {
72 73 const [registerDrawer, { openDrawer: openDrawer }] = useDrawer();
73 74 const [registerItemDrawer, { openDrawer: openItemDrawer }] = useDrawer();
... ...
... ... @@ -3,14 +3,14 @@
3 3 <BasicTable :clickToRowSelect="false" @register="registerTable" :searchInfo="searchInfo">
4 4 <template #toolbar>
5 5 <Authority value="api:yt:opinion:delete">
6   - <a-button
7   - type="primary"
8   - color="error"
9   - @click="handleDeleteOrBatchDelete(null)"
10   - :disabled="hasBatchDelete"
  6 + <Popconfirm
  7 + title="您确定要批量删除数据"
  8 + ok-text="确定"
  9 + cancel-text="取消"
  10 + @confirm="handleDeleteOrBatchDelete(null)"
11 11 >
12   - 批量删除
13   - </a-button>
  12 + <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  13 + </Popconfirm>
14 14 </Authority>
15 15 </template>
16 16 <template #action="{ record }">
... ... @@ -50,6 +50,7 @@
50 50 import { useModal } from '/@/components/Modal';
51 51 import { Authority } from '/@/components/Authority';
52 52 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
  53 + import { Popconfirm } from 'ant-design-vue';
53 54
54 55 export default defineComponent({
55 56 components: {
... ... @@ -57,6 +58,7 @@
57 58 TableAction,
58 59 FeedbackDrawer,
59 60 Authority,
  61 + Popconfirm,
60 62 },
61 63 setup() {
62 64 const searchInfo = reactive<Recordable>({});
... ...
... ... @@ -8,13 +8,14 @@
8 8 </a-button>
9 9 </Authority>
10 10 <Authority value="api:yt:organization:delete">
11   - <a-button
12   - color="error"
13   - @click="handleDeleteOrBatchDelete(null)"
14   - :disabled="hasBatchDelete"
  11 + <Popconfirm
  12 + title="您确定要批量删除数据"
  13 + ok-text="确定"
  14 + cancel-text="取消"
  15 + @confirm="handleDeleteOrBatchDelete(null)"
15 16 >
16   - 批量删除
17   - </a-button>
  17 + <a-button color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  18 + </Popconfirm>
18 19 </Authority>
19 20 </template>
20 21 <template #action="{ record }">
... ... @@ -54,10 +55,11 @@
54 55 import { delOrganization, getOrganizationList } from '/@/api/system/system';
55 56 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
56 57 import { Authority } from '/@/components/Authority';
  58 + import { Popconfirm } from 'ant-design-vue';
57 59
58 60 export default defineComponent({
59 61 name: 'DeptManagement',
60   - components: { BasicTable, DeptDrawer, TableAction, Authority },
  62 + components: { BasicTable, DeptDrawer, TableAction, Authority, Popconfirm },
61 63 setup() {
62 64 const [registerModal, { openDrawer }] = useDrawer();
63 65 const { t } = useI18n(); //加载国际化
... ...
... ... @@ -10,14 +10,14 @@
10 10 <a-button type="primary" @click="handleCreate">新增角色</a-button>
11 11 </Authority>
12 12 <Authority value="api:yt:role:delete">
13   - <a-button
14   - type="primary"
15   - color="error"
16   - @click="handleDeleteOrBatchDelete(null)"
17   - :disabled="hasBatchDelete"
  13 + <Popconfirm
  14 + title="您确定要批量删除数据"
  15 + ok-text="确定"
  16 + cancel-text="取消"
  17 + @confirm="handleDeleteOrBatchDelete(null)"
18 18 >
19   - 批量删除
20   - </a-button>
  19 + <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  20 + </Popconfirm>
21 21 </Authority>
22 22 </template>
23 23 <template #status="{ record }">
... ... @@ -67,11 +67,11 @@
67 67 import { Authority } from '/@/components/Authority';
68 68 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
69 69 import { useMessage } from '/@/hooks/web/useMessage';
70   - import { Switch } from 'ant-design-vue';
  70 + import { Switch, Popconfirm } from 'ant-design-vue';
71 71
72 72 export default defineComponent({
73 73 name: 'RoleManagement',
74   - components: { BasicTable, RoleDrawer, TableAction, Authority, Switch },
  74 + components: { BasicTable, RoleDrawer, TableAction, Authority, Switch, Popconfirm },
75 75 setup() {
76 76 const [registerDrawer, { openDrawer }] = useDrawer();
77 77 function handleSuccess() {
... ...
... ... @@ -11,9 +11,14 @@
11 11 <a-button type="primary" @click="handleAdd"> 新增租户配置 </a-button>
12 12 </Authority>
13 13 <Authority value="api:yt:tenantProfile:delete">
14   - <a-button color="error" :disabled="disabled" @click="handleMutilteDelete">
15   - 批量删除
16   - </a-button>
  14 + <Popconfirm
  15 + title="您确定要批量删除数据"
  16 + ok-text="确定"
  17 + cancel-text="取消"
  18 + @confirm="handleMutilteDelete"
  19 + >
  20 + <a-button color="error" :disabled="disabled"> 批量删除 </a-button>
  21 + </Popconfirm>
17 22 </Authority>
18 23 </template>
19 24 <template #action="{ record }">
... ... @@ -66,10 +71,11 @@
66 71 setTenantProfileIsDefaultApi,
67 72 } from '/@/api/tenant/tenantApi';
68 73 import { Authority } from '/@/components/Authority';
  74 + import { Popconfirm } from 'ant-design-vue';
69 75
70 76 export default defineComponent({
71 77 name: 'Index',
72   - components: { BasicTable, TenantSettingDrawer, TableAction, Authority },
  78 + components: { BasicTable, TenantSettingDrawer, TableAction, Authority, Popconfirm },
73 79 setup() {
74 80 const disabled = ref(true);
75 81 let echoEditData = reactive({});
... ...
... ... @@ -10,14 +10,14 @@
10 10 <a-button type="primary" @click="handleCreate"> 新增角色 </a-button>
11 11 </Authority>
12 12 <Authority value="api:yt:role:delete">
13   - <a-button
14   - type="primary"
15   - color="error"
16   - @click="handleDeleteOrBatchDelete(null)"
17   - :disabled="hasBatchDelete"
  13 + <Popconfirm
  14 + title="您确定要批量删除数据"
  15 + ok-text="确定"
  16 + cancel-text="取消"
  17 + @confirm="handleDeleteOrBatchDelete(null)"
18 18 >
19   - 批量删除
20   - </a-button>
  19 + <a-button type="primary" color="error" :disabled="hasBatchDelete"> 批量删除 </a-button>
  20 + </Popconfirm>
21 21 </Authority>
22 22 </template>
23 23 <template #status="{ record }">
... ... @@ -66,11 +66,11 @@
66 66 import { RoleEnum } from '/@/enums/roleEnum';
67 67 import { Authority } from '/@/components/Authority';
68 68 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
69   - import { Switch } from 'ant-design-vue';
  69 + import { Switch, Popconfirm } from 'ant-design-vue';
70 70
71 71 export default defineComponent({
72 72 name: 'TenantRoleManagement',
73   - components: { BasicTable, RoleDrawer, TableAction, Authority, Switch },
  73 + components: { BasicTable, RoleDrawer, TableAction, Authority, Switch, Popconfirm },
74 74 setup() {
75 75 const [registerDrawer, { openDrawer }] = useDrawer();
76 76 function handleSuccess() {
... ...