|
@@ -206,6 +206,7 @@
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { getChildList, getParentList, removeDictionary, submitDictionary } from '~api/system/parameter.js'
|
|
import { getChildList, getParentList, removeDictionary, submitDictionary } from '~api/system/parameter.js'
|
|
import { arrToId, getArrValue } from 'js-fast-way'
|
|
import { arrToId, getArrValue } from 'js-fast-way'
|
|
|
|
+import { delMessageV2 } from '~com/message/index.js'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
cur: {
|
|
cur: {
|
|
@@ -349,25 +350,22 @@ const delModal = (item)=>{
|
|
|
|
|
|
const ids = arrToId(rows)
|
|
const ids = arrToId(rows)
|
|
delbtnloading.value = true
|
|
delbtnloading.value = true
|
|
- window?.$messageBox?.alert('您确定要删除该信息吗? 一旦注销数据将彻底清除,请谨慎操作?', '删除提醒', {
|
|
|
|
- showCancelButton: true,
|
|
|
|
- confirmButtonText: '确认注销',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- callback: async (action) => {
|
|
|
|
- if (action === 'confirm') {
|
|
|
|
- const { error, code, msg } = await removeDictionary({
|
|
|
|
|
|
+ delMessageV2(async (action, instance, done) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ instance.confirmButtonLoading = true
|
|
|
|
+ const { error, code, msg } = await removeDictionary({
|
|
ids: ids || item.id,
|
|
ids: ids || item.id,
|
|
- })
|
|
|
|
- delbtnloading.value = false
|
|
|
|
- if (!error && code === 200) {
|
|
|
|
- window?.$message?.success('删除成功')
|
|
|
|
- getTableData()
|
|
|
|
- } else {
|
|
|
|
- window?.$message?.warning(msg)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ })
|
|
|
|
+ delbtnloading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window?.$message?.success('删除成功')
|
|
|
|
+ getTableData()
|
|
|
|
+ }
|
|
|
|
+ instance.confirmButtonLoading = false
|
|
|
|
+ done()
|
|
|
|
+ } else {
|
|
|
|
+ done()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -496,25 +494,22 @@ const configdelClick = (item)=>{
|
|
const rows = configtableCheckedKeys.value
|
|
const rows = configtableCheckedKeys.value
|
|
const ids = arrToId(rows)
|
|
const ids = arrToId(rows)
|
|
configdelbtnloading.value = true
|
|
configdelbtnloading.value = true
|
|
- window?.$messageBox?.alert('您确定要删除该信息吗? 一旦注销数据将彻底清除,请谨慎操作?', '删除提醒', {
|
|
|
|
- showCancelButton: true,
|
|
|
|
- confirmButtonText: '确认注销',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- callback: async (action) => {
|
|
|
|
- if (action === 'confirm') {
|
|
|
|
- const { error, code, msg } = await removeDictionary({
|
|
|
|
- ids: ids || item.id,
|
|
|
|
- })
|
|
|
|
- configdelbtnloading.value = false
|
|
|
|
- if (!error && code === 200) {
|
|
|
|
- window?.$message?.success('删除成功')
|
|
|
|
- getChildListData()
|
|
|
|
- } else {
|
|
|
|
- window?.$message?.warning(msg)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ delMessageV2(async (action, instance, done) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ instance.confirmButtonLoading = true
|
|
|
|
+ const { error, code, msg } = await removeDictionary({
|
|
|
|
+ ids: ids || item.id,
|
|
|
|
+ })
|
|
|
|
+ configdelbtnloading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ window?.$message?.success('删除成功')
|
|
|
|
+ getChildListData()
|
|
|
|
+ }
|
|
|
|
+ instance.confirmButtonLoading = false
|
|
|
|
+ done()
|
|
|
|
+ } else {
|
|
|
|
+ done()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|