39db99b7 by xukangle

fix : 修复标签管理页面问题

1 parent d04e0078
......@@ -4,9 +4,13 @@
<script lang="ts" setup name="configureRules">
import { ref } from "vue";
import router from "@/router";
import useUserStore from "@/store/modules/user";
import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory'
const { proxy } = getCurrentInstance() as any;
const router = useRouter();
const route = useRoute();
const fullPath = route.fullPath;
const userStore = useUserStore();
const bizRuleConfigData = ref<any>()
const getBizRuleConfigDetailData = async () => {
const params = {
......@@ -205,8 +209,9 @@ const data = [
},
]
const loading = ref(false)
const saveData = async () => {
loading.value = true
/**入参
* "guid": "string",
"fieldGuid": "string",
......@@ -220,7 +225,6 @@ const saveData = async () => {
const inParams = [] as any
tableData.value.forEach((item: any) => {
const obj = {
guid: router.currentRoute.value.query.tableGuid,
fieldGuid: item.fieldGuid,
execGuid: router.currentRoute.value.query.execGuid,
fieldLengthCondition: item.fieldLengthCondition,
......@@ -236,15 +240,28 @@ const saveData = async () => {
console.log('finalParams', inParams)
const res: any = await saveBizRuleConfig(inParams)
if (res.code === proxy.$passCode) {
loading.value = false
proxy.$message.success('修改配置规则成功!')
router.back()
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: 'classifyGradeCatalogue'
});
} else {
loading.value = false
proxy.$message.error(res.msg)
}
}
const cancel = () => {
router.back()
proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => {
userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
router.push({
name: 'classifyGradeCatalogue'
});
}, () => {
proxy.$ElMessage.info("已取消");
});
}
</script>
......@@ -392,7 +409,7 @@ const cancel = () => {
</el-table>
</div>
<div class="botton_btn">
<el-button type="primary" @click="saveData">保存</el-button>
<el-button type="primary" @click="saveData" :loading="loading">保存</el-button>
<el-button @click="cancel">取消</el-button>
</div>
</div>
......
......@@ -7,7 +7,6 @@ import TableTools from '@/components/Tools/table_tools.vue';
import { getGradeList } from "@/api/modules/dataInventory";
import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, deleteLabel, updateLabel } from "@/api/modules/dataLabel";
import { CirclePlus, Delete, Warning } from "@element-plus/icons-vue";
import { tr } from 'element-plus/es/locale';
const { proxy } = getCurrentInstance() as any;
......@@ -840,7 +839,7 @@ const matchEnValue = ref({
<template v-slot:default>
<div>
<div class="dim-label">
<span class="front">模糊匹配</span>
<span class="front">精确匹配</span>
<el-icon>
<Warning />
</el-icon>
......@@ -973,12 +972,20 @@ const matchEnValue = ref({
align-items: center;
margin-top: 6px;
.el-icon svg {
height: 16px;
width: 16px;
color: #999999;
}
.front {
margin-right: 8px;
margin-right: 16px;
}
.tip {
margin-left: 3px;
margin-left: 4px;
font-size: 12px;
color: #999999;
}
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!