fix : 修复标签管理页面问题
Showing
2 changed files
with
34 additions
and
10 deletions
| ... | @@ -4,9 +4,13 @@ | ... | @@ -4,9 +4,13 @@ |
| 4 | 4 | ||
| 5 | <script lang="ts" setup name="configureRules"> | 5 | <script lang="ts" setup name="configureRules"> |
| 6 | import { ref } from "vue"; | 6 | import { ref } from "vue"; |
| 7 | import router from "@/router"; | 7 | import useUserStore from "@/store/modules/user"; |
| 8 | import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory' | 8 | import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory' |
| 9 | const { proxy } = getCurrentInstance() as any; | 9 | const { proxy } = getCurrentInstance() as any; |
| 10 | const router = useRouter(); | ||
| 11 | const route = useRoute(); | ||
| 12 | const fullPath = route.fullPath; | ||
| 13 | const userStore = useUserStore(); | ||
| 10 | const bizRuleConfigData = ref<any>() | 14 | const bizRuleConfigData = ref<any>() |
| 11 | const getBizRuleConfigDetailData = async () => { | 15 | const getBizRuleConfigDetailData = async () => { |
| 12 | const params = { | 16 | const params = { |
| ... | @@ -205,8 +209,9 @@ const data = [ | ... | @@ -205,8 +209,9 @@ const data = [ |
| 205 | }, | 209 | }, |
| 206 | ] | 210 | ] |
| 207 | 211 | ||
| 212 | const loading = ref(false) | ||
| 208 | const saveData = async () => { | 213 | const saveData = async () => { |
| 209 | 214 | loading.value = true | |
| 210 | /**入参 | 215 | /**入参 |
| 211 | * "guid": "string", | 216 | * "guid": "string", |
| 212 | "fieldGuid": "string", | 217 | "fieldGuid": "string", |
| ... | @@ -220,7 +225,6 @@ const saveData = async () => { | ... | @@ -220,7 +225,6 @@ const saveData = async () => { |
| 220 | const inParams = [] as any | 225 | const inParams = [] as any |
| 221 | tableData.value.forEach((item: any) => { | 226 | tableData.value.forEach((item: any) => { |
| 222 | const obj = { | 227 | const obj = { |
| 223 | guid: router.currentRoute.value.query.tableGuid, | ||
| 224 | fieldGuid: item.fieldGuid, | 228 | fieldGuid: item.fieldGuid, |
| 225 | execGuid: router.currentRoute.value.query.execGuid, | 229 | execGuid: router.currentRoute.value.query.execGuid, |
| 226 | fieldLengthCondition: item.fieldLengthCondition, | 230 | fieldLengthCondition: item.fieldLengthCondition, |
| ... | @@ -236,15 +240,28 @@ const saveData = async () => { | ... | @@ -236,15 +240,28 @@ const saveData = async () => { |
| 236 | console.log('finalParams', inParams) | 240 | console.log('finalParams', inParams) |
| 237 | const res: any = await saveBizRuleConfig(inParams) | 241 | const res: any = await saveBizRuleConfig(inParams) |
| 238 | if (res.code === proxy.$passCode) { | 242 | if (res.code === proxy.$passCode) { |
| 243 | loading.value = false | ||
| 239 | proxy.$message.success('修改配置规则成功!') | 244 | proxy.$message.success('修改配置规则成功!') |
| 240 | router.back() | 245 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); |
| 246 | router.push({ | ||
| 247 | name: 'classifyGradeCatalogue' | ||
| 248 | }); | ||
| 241 | } else { | 249 | } else { |
| 250 | loading.value = false | ||
| 242 | proxy.$message.error(res.msg) | 251 | proxy.$message.error(res.msg) |
| 243 | } | 252 | } |
| 244 | } | 253 | } |
| 245 | 254 | ||
| 255 | |||
| 246 | const cancel = () => { | 256 | const cancel = () => { |
| 247 | router.back() | 257 | proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => { |
| 258 | userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); | ||
| 259 | router.push({ | ||
| 260 | name: 'classifyGradeCatalogue' | ||
| 261 | }); | ||
| 262 | }, () => { | ||
| 263 | proxy.$ElMessage.info("已取消"); | ||
| 264 | }); | ||
| 248 | } | 265 | } |
| 249 | 266 | ||
| 250 | </script> | 267 | </script> |
| ... | @@ -392,7 +409,7 @@ const cancel = () => { | ... | @@ -392,7 +409,7 @@ const cancel = () => { |
| 392 | </el-table> | 409 | </el-table> |
| 393 | </div> | 410 | </div> |
| 394 | <div class="botton_btn"> | 411 | <div class="botton_btn"> |
| 395 | <el-button type="primary" @click="saveData">保存</el-button> | 412 | <el-button type="primary" @click="saveData" :loading="loading">保存</el-button> |
| 396 | <el-button @click="cancel">取消</el-button> | 413 | <el-button @click="cancel">取消</el-button> |
| 397 | </div> | 414 | </div> |
| 398 | </div> | 415 | </div> | ... | ... |
| ... | @@ -7,7 +7,6 @@ import TableTools from '@/components/Tools/table_tools.vue'; | ... | @@ -7,7 +7,6 @@ import TableTools from '@/components/Tools/table_tools.vue'; |
| 7 | import { getGradeList } from "@/api/modules/dataInventory"; | 7 | import { getGradeList } from "@/api/modules/dataInventory"; |
| 8 | import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, deleteLabel, updateLabel } from "@/api/modules/dataLabel"; | 8 | import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, deleteLabel, updateLabel } from "@/api/modules/dataLabel"; |
| 9 | import { CirclePlus, Delete, Warning } from "@element-plus/icons-vue"; | 9 | import { CirclePlus, Delete, Warning } from "@element-plus/icons-vue"; |
| 10 | import { tr } from 'element-plus/es/locale'; | ||
| 11 | 10 | ||
| 12 | 11 | ||
| 13 | const { proxy } = getCurrentInstance() as any; | 12 | const { proxy } = getCurrentInstance() as any; |
| ... | @@ -840,7 +839,7 @@ const matchEnValue = ref({ | ... | @@ -840,7 +839,7 @@ const matchEnValue = ref({ |
| 840 | <template v-slot:default> | 839 | <template v-slot:default> |
| 841 | <div> | 840 | <div> |
| 842 | <div class="dim-label"> | 841 | <div class="dim-label"> |
| 843 | <span class="front">模糊匹配</span> | 842 | <span class="front">精确匹配</span> |
| 844 | <el-icon> | 843 | <el-icon> |
| 845 | <Warning /> | 844 | <Warning /> |
| 846 | </el-icon> | 845 | </el-icon> |
| ... | @@ -973,12 +972,20 @@ const matchEnValue = ref({ | ... | @@ -973,12 +972,20 @@ const matchEnValue = ref({ |
| 973 | align-items: center; | 972 | align-items: center; |
| 974 | margin-top: 6px; | 973 | margin-top: 6px; |
| 975 | 974 | ||
| 975 | .el-icon svg { | ||
| 976 | height: 16px; | ||
| 977 | width: 16px; | ||
| 978 | color: #999999; | ||
| 979 | } | ||
| 980 | |||
| 976 | .front { | 981 | .front { |
| 977 | margin-right: 8px; | 982 | margin-right: 16px; |
| 978 | } | 983 | } |
| 979 | 984 | ||
| 980 | .tip { | 985 | .tip { |
| 981 | margin-left: 3px; | 986 | margin-left: 4px; |
| 987 | font-size: 12px; | ||
| 988 | color: #999999; | ||
| 982 | } | 989 | } |
| 983 | } | 990 | } |
| 984 | 991 | ... | ... |
-
Please register or sign in to post a comment