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