From e65492366fd5db5266dd67f45ca96b21979341d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com>
Date: Fri, 4 Nov 2022 10:17:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/testItems.js | 7 +++
src/views/system/testItems/index.vue | 87 ++++++++++++++++++++--------
2 files changed, 71 insertions(+), 23 deletions(-)
diff --git a/src/api/system/testItems.js b/src/api/system/testItems.js
index 955fe3b..0c74e2d 100644
--- a/src/api/system/testItems.js
+++ b/src/api/system/testItems.js
@@ -8,6 +8,13 @@ export function listTestItems(query) {
params: query
})
}
+//查看分类
+export function getTestCategoryItemInfo(itemId) {
+ return request({
+ url: `/system/testItems/getTestCategoryItemInfo/?itemId=${itemId}`,
+ method: 'get'
+ })
+}
// 查询测试项目详细
export function getTestItems(id) {
diff --git a/src/views/system/testItems/index.vue b/src/views/system/testItems/index.vue
index 4bd5fa5..a2c0bfb 100644
--- a/src/views/system/testItems/index.vue
+++ b/src/views/system/testItems/index.vue
@@ -50,7 +50,6 @@
>
-
-
-
+
+
+ 查看
+
+
@@ -272,7 +273,6 @@
/> -->
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -471,6 +494,7 @@ import {
delTestItems,
addTestItems,
updateTestItems,
+ getTestCategoryItemInfo,
} from "@/api/system/testItems";
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
import { listItemCategory } from "@/api/system/itemCategory";
@@ -721,7 +745,6 @@ export default {
// }
// });
};
-
let minScore = (rule, value, callback) => {
if (!value) {
callback();
@@ -739,14 +762,10 @@ export default {
callback();
}
};
-
const validateVin = (rule, value, callback) => {
const containAlpha = /[a-zA-Z]/; //含有字母
-
const containLowerCase = /[a-z]/; //匹配小写字母
value = value.slice(0, 1);
- console.log(value);
-
if (!value) {
callback(new Error("不能为空"));
} else if (!containAlpha.test(value)) {
@@ -914,6 +933,8 @@ export default {
},
],
},
+ categorynamelist: [],
+ itemtypeopen: false,
};
},
created() {
@@ -1049,8 +1070,6 @@ export default {
tKindergartenInfo(this.itemResultType).then((res) => {
// console.log(res);
this.itemResultTypelist = res.data;
- console.log(this.itemResultTypelist);
-
this.ResultType1 = this.itemResultTypelist[0];
this.ResultType2 = this.itemResultTypelist[1];
// console.log(this.ResultType1);
@@ -1061,7 +1080,6 @@ export default {
});
tKindergartenInfo(this.standardType).then((res) => {
this.standardTypelist = res.data;
- console.log(this.standardTypelist);
});
listTestItems(this.queryParams).then((response) => {
this.testItemsList = response.rows;
@@ -1126,6 +1144,15 @@ export default {
this.open = true;
this.title = "添加测试项目";
},
+ //查看所属分类
+ looktype(row) {
+ this.categorynamelist = [];
+ getTestCategoryItemInfo(row.id).then((res) => {
+ this.categorynamelist = res.data;
+ this.itemtypeopen = true;
+ console.log(this.categorynamelist);
+ });
+ },
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
@@ -1206,3 +1233,17 @@ export default {
},
};
+
\ No newline at end of file