From 66d6e9b9832c643eeb789eb972e8203cffe070ca Mon Sep 17 00:00:00 2001 From: ks3356143 <314298729@qq.com> Date: Wed, 23 Aug 2023 20:45:44 +0800 Subject: [PATCH] 987 --- .../views/datamanage/dictmanage/dataList.vue | 7 ++++ cdTMP/src/views/project/case/index.vue | 3 +- .../src/views/project/design-demand/index.vue | 24 +++++++++++- cdTMP/src/views/project/dut/index.vue | 39 +++++++++++++++---- cdTMP/src/views/project/testDemand/index.vue | 16 +++++++- 5 files changed, 77 insertions(+), 12 deletions(-) diff --git a/cdTMP/src/views/datamanage/dictmanage/dataList.vue b/cdTMP/src/views/datamanage/dictmanage/dataList.vue index e0e66b7..e4429fa 100644 --- a/cdTMP/src/views/datamanage/dictmanage/dataList.vue +++ b/cdTMP/src/views/datamanage/dictmanage/dataList.vue @@ -87,6 +87,13 @@ const columns = ref([ width: 220, commonRules: [{ required: true, message: "字典标签必填" }] }, + { + title:"字段缩写", + dataIndex:"show_title", + width: 220, + align: "center", + search: true, + }, { title: "字典键值", align: "center", diff --git a/cdTMP/src/views/project/case/index.vue b/cdTMP/src/views/project/case/index.vue index ddcd0f3..3d42d61 100644 --- a/cdTMP/src/views/project/case/index.vue +++ b/cdTMP/src/views/project/case/index.vue @@ -150,8 +150,9 @@ const crudColumns = ref([ width: 140, search: true, dataIndex: "ident", + editDisabled: true, + addDisabled: true, addDefaultValue: `PT_${route.query.ident}_`, - commonRules: [{ required: true, message: "标识是必填" }], validateTrigger: "blur" }, { diff --git a/cdTMP/src/views/project/design-demand/index.vue b/cdTMP/src/views/project/design-demand/index.vue index 5e009d4..7969e5e 100644 --- a/cdTMP/src/views/project/design-demand/index.vue +++ b/cdTMP/src/views/project/design-demand/index.vue @@ -2,7 +2,11 @@
- + + +
@@ -12,6 +16,7 @@ import { ref } from "vue" import { useRoute, useRouter } from "vue-router" import testDemandApi from "@/api/project/testDemand" import { useTreeDataStore } from "@/store" +import commonApi from "@/api/common" const treeDataStore = useTreeDataStore() const route = useRoute() const router = useRouter() @@ -20,6 +25,23 @@ const roundNumber = route.query.key.split("-")[0] const dutNumber = route.query.key.split("-")[1] const designDemandNumber = route.query.key.split("-")[2] const projectId = ref(route.query.id) +// 标识显示字段 +const testTypeDict = ref([]) +!(function () { + commonApi.getDict("testType").then((res) => { + testTypeDict.value = res + }) +})() +const showType = (record) => { + let len = testTypeDict.value.data.length + for (let i = 0; i < len; i++) { + if (testTypeDict.value.data[i].key === record.testType) { + let key_string = parseInt(record.key.substring(record.key.lastIndexOf("-") + 1)) + 1 + let item = testTypeDict.value.data[i] + return item.show_title + "-" + record.ident + "-" + key_string.toString().padStart(3,"0") + } + } +} // crud组件 const crudOptions = ref({ api: testDemandApi.getTestDemandList, diff --git a/cdTMP/src/views/project/dut/index.vue b/cdTMP/src/views/project/dut/index.vue index 1893f94..2a86a9d 100644 --- a/cdTMP/src/views/project/dut/index.vue +++ b/cdTMP/src/views/project/dut/index.vue @@ -2,15 +2,20 @@
- + + +
-