|
@@ -86,7 +86,7 @@
|
|
|
<SvgIcon name="czr_edit" size="14" class="__hover ml-auto"/>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip content="删除" effect="light" placement="top">
|
|
|
- <SvgIcon name="czr_del" size="16" class="__hover"/>
|
|
|
+ <SvgIcon name="czr_del" size="16" class="__hover" @click="onDel(info)"/>
|
|
|
</el-tooltip>
|
|
|
<el-tooltip :content="info.p7 ? '取消收藏' : '收藏'" effect="light" placement="top">
|
|
|
<SvgIcon name="star" size="15" class="__hover" :active="!!info.p7"/>
|
|
@@ -104,7 +104,10 @@
|
|
|
import {getCurrentInstance, onMounted, reactive, ref, watch} from "vue";
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
import {debounce} from "lodash";
|
|
|
+import {useDialogStore} from "@/stores";
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
+const DialogStore = useDialogStore();
|
|
|
const emits = defineEmits([])
|
|
|
const props = defineProps({})
|
|
|
const {proxy}: any = getCurrentInstance()
|
|
@@ -126,7 +129,7 @@ const state: any = reactive({
|
|
|
detail: {
|
|
|
show: false,
|
|
|
transfer: {}
|
|
|
- }
|
|
|
+ },
|
|
|
})
|
|
|
const setText = debounce((v) => {
|
|
|
state.query.form.name = v
|
|
@@ -209,50 +212,14 @@ const onEdit = (row) => {
|
|
|
}
|
|
|
state.detail.show = true
|
|
|
}
|
|
|
-const onDel = (row = null) => {
|
|
|
- // if (row) {
|
|
|
- // ElMessageBox.confirm(`<span class="__cus-del-sub-text">请确认是否删除${row.manifestNumber}?<br/><span>删除之后无法恢复该数据!</span></span>`, "提示", {
|
|
|
- // confirmButtonText: "是",
|
|
|
- // cancelButtonText: "否",
|
|
|
- // type: "warning",
|
|
|
- // dangerouslyUseHTMLString: true,
|
|
|
- // } as any).then(() => {
|
|
|
- // state.query.loading = true
|
|
|
- // delRuleLogisticsDataSubscribeInfo(row.id).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // ElMessage.success('删除成功!')
|
|
|
- // onSearch()
|
|
|
- // } else {
|
|
|
- // ElMessage.error(res.msg)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }).catch(() => {
|
|
|
- // state.query.loading = false
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // if (state.query.selected.length == 0) {
|
|
|
- // ElMessage.warning('请至少选择一条记录!')
|
|
|
- // return
|
|
|
- // }
|
|
|
- // ElMessageBox.confirm(`<span class="__cus-del-sub-text">请确认是否删除${state.query.selected.length}条记录?<br/><span>删除之后无法恢复该数据!</span></span>`, "提示", {
|
|
|
- // confirmButtonText: "是",
|
|
|
- // cancelButtonText: "否",
|
|
|
- // type: "warning",
|
|
|
- // dangerouslyUseHTMLString: true,
|
|
|
- // } as any).then(() => {
|
|
|
- // state.query.loading = true
|
|
|
- // delRuleLogisticsDataSubscribeInfo(state.query.selected.map(v => v.id).join(',')).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // ElMessage.success('删除成功!')
|
|
|
- // onSearch()
|
|
|
- // } else {
|
|
|
- // ElMessage.error(res.msg)
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }).catch(() => {
|
|
|
- // state.query.loading = false
|
|
|
- // })
|
|
|
- // }
|
|
|
+const onDel = (row: any) => {
|
|
|
+ DialogStore.confirm({
|
|
|
+ title: '删除确认',
|
|
|
+ content: `${row.p6}个应用正在使用该大模型,请确认是否删除`,
|
|
|
+ onSubmit: () => {
|
|
|
+ ElMessage.success('删除成功!')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const initDictionary = () => {
|