823
This commit is contained in:
@@ -2,7 +2,11 @@
|
|||||||
<div class="ma-content-block lg:flex justify-between p-4">
|
<div class="ma-content-block lg:flex justify-between p-4">
|
||||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||||
<!-- CRUD组件 -->
|
<!-- CRUD组件 -->
|
||||||
<ma-crud :options="crudOptions" :columns="crudColumns"></ma-crud>
|
<ma-crud :options="crudOptions" :columns="crudColumns">
|
||||||
|
<template #ident="{ record }">
|
||||||
|
{{ "PT_" + route.query.ident + "_" + record.ident.padStart(3,"0") }}
|
||||||
|
</template>
|
||||||
|
</ma-crud>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -27,7 +31,7 @@ const crudOptions = ref({
|
|||||||
edit: { show: true, api: problemApi.update },
|
edit: { show: true, api: problemApi.update },
|
||||||
delete: { show: true, api: problemApi.delete },
|
delete: { show: true, api: problemApi.delete },
|
||||||
afterAdd: (res) => {
|
afterAdd: (res) => {
|
||||||
console.log(res);
|
console.log(res)
|
||||||
let id = projectId.value
|
let id = projectId.value
|
||||||
treeDataStore.updateProblemTreeData(res.data, id)
|
treeDataStore.updateProblemTreeData(res.data, id)
|
||||||
},
|
},
|
||||||
@@ -152,7 +156,7 @@ const crudColumns = ref([
|
|||||||
dataIndex: "ident",
|
dataIndex: "ident",
|
||||||
editDisabled: true,
|
editDisabled: true,
|
||||||
addDisabled: true,
|
addDisabled: true,
|
||||||
addDefaultValue: `PT_${route.query.ident}_`,
|
addDefaultValue: `${route.query.ident}`,
|
||||||
validateTrigger: "blur"
|
validateTrigger: "blur"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user