This commit is contained in:
2024-03-14 19:52:26 +08:00
parent 4b7a9d3c5f
commit 0d87961817
2 changed files with 12 additions and 3 deletions

View File

@@ -19,6 +19,10 @@
<template #unchecked> 未关联 </template> <template #unchecked> 未关联 </template>
</a-switch> </a-switch>
</template> </template>
<!-- ident插槽 -->
<template #ident="{ record }">
{{ "PT_" + route.query.ident + "_" + record.ident.padStart(3, "0") }}
</template>
</ma-crud> </ma-crud>
</div> </div>
</a-modal> </a-modal>
@@ -31,7 +35,7 @@ import { Message } from "@arco-design/web-vue"
import { useRoute, useRouter } from "vue-router" import { useRoute, useRouter } from "vue-router"
const route = useRoute() const route = useRoute()
// 定义emits // 定义emits
const emits = defineEmits(["deleted"]) const emits = defineEmits(["deleted", "relatedOrunrelated"])
// ~~~定义关联的switch-值改变处理~~~ 该函数返回false或返回Promise[reject]则停止切换 // ~~~定义关联的switch-值改变处理~~~ 该函数返回false或返回Promise[reject]则停止切换
/// 定义个switch的加载loading属性 /// 定义个switch的加载loading属性
@@ -56,6 +60,7 @@ const handleRelatedChange = async (record) => {
loading.value = false loading.value = false
} }
loading.value = false loading.value = false
emits("relatedOrunrelated")
Message.success(res.message) Message.success(res.message)
} }
@@ -83,10 +88,10 @@ const crudOptions = ref({
key: route.query.key key: route.query.key
}, },
showTools: false, // 不显示工具栏 showTools: false, // 不显示工具栏
tablePagination: false,
operationColumn: true, operationColumn: true,
operationColumnAlign: "center", // 操作列居中 operationColumnAlign: "center", // 操作列居中
isDbClickEdit: false, // 双击不编辑当前列 isDbClickEdit: false, // 双击不编辑当前列
bordered: { cell: true },
formOption: { formOption: {
width: 1000, width: 1000,
layout: [ layout: [

View File

@@ -17,7 +17,11 @@
</template> </template>
</ma-crud> </ma-crud>
</div> </div>
<problem-choose ref="problemchoose" @deleted="related_reload"></problem-choose> <problem-choose
ref="problemchoose"
@deleted="related_reload"
@relatedOrunrelated="related_reload"
></problem-choose>
</div> </div>
</template> </template>