修改
This commit is contained in:
parent
965b90ed94
commit
e65492366f
@ -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) {
|
||||
|
||||
@ -50,7 +50,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -103,18 +102,19 @@
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="testItemsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="项目所属分类"
|
||||
align="center"
|
||||
prop="categoryName"
|
||||
/>
|
||||
<el-table-column label="项目所属分类" align="center" prop="categoryName">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="looktype(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="字典类型" align="center" prop="resultDictType">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
@ -179,7 +179,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
@ -187,7 +186,6 @@
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改测试项目对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
@ -208,8 +206,11 @@
|
||||
:normalizer="normalizer"
|
||||
:options="itemCategoryList"
|
||||
placeholder="请选择所属项目分类"
|
||||
v-model="form.itemCategoryId"
|
||||
style="width: 300px"
|
||||
v-model="form.testCategoryItemList"
|
||||
style="width: 500px"
|
||||
:multiple="true"
|
||||
:disable-branch-nodes="true"
|
||||
search-nested
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@ -272,7 +273,6 @@
|
||||
/> -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="排序" prop="sorting">
|
||||
<el-input
|
||||
v-model="form.sorting"
|
||||
@ -281,7 +281,6 @@
|
||||
style="width: 300px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="度量单位" prop="measureUnit">
|
||||
<el-select
|
||||
v-model="form.measureUnit"
|
||||
@ -388,7 +387,6 @@
|
||||
placeholder="请输入统一标准最高得分"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="级别描述" prop="levelDescription">
|
||||
<el-input
|
||||
style="width: 300px"
|
||||
@ -455,12 +453,37 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="margin-right: 80px">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- //查看所属分类 -->
|
||||
<el-dialog
|
||||
title="项目所属分类"
|
||||
:visible.sync="itemtypeopen"
|
||||
width="1050px"
|
||||
append-to-body
|
||||
>
|
||||
<el-table v-loading="loading" :data="categorynamelist">
|
||||
<el-table-column label="分类名称" align="center" prop="categoryName" />
|
||||
<el-table-column label="分类编号" align="center" prop="categoryCode" />
|
||||
<!-- <el-table-column
|
||||
label="分类名称"
|
||||
align="center"
|
||||
prop="categoryName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="分类名称"
|
||||
align="center"
|
||||
prop="categoryName"
|
||||
/> -->
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer" style="">
|
||||
<el-button type="primary" @click="itemtypeopen = false">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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 {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
::v-deep .vue-treeselect__multi-value-item-container {
|
||||
padding: 2px 5px 2px 0;
|
||||
}
|
||||
::v-deep .vue-treeselect__multi-value {
|
||||
margin: 0;
|
||||
}
|
||||
::v-deep .vue-treeselect__multi-value-item {
|
||||
line-height: 23px;
|
||||
}
|
||||
::v-deep .el-form-item__content {
|
||||
line-height: 23px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user