修改
This commit is contained in:
parent
965b90ed94
commit
e65492366f
@ -8,6 +8,13 @@ export function listTestItems(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//查看分类
|
||||||
|
export function getTestCategoryItemInfo(itemId) {
|
||||||
|
return request({
|
||||||
|
url: `/system/testItems/getTestCategoryItemInfo/?itemId=${itemId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询测试项目详细
|
// 查询测试项目详细
|
||||||
export function getTestItems(id) {
|
export function getTestItems(id) {
|
||||||
|
|||||||
@ -50,7 +50,6 @@
|
|||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -103,18 +102,19 @@
|
|||||||
@queryTable="getList"
|
@queryTable="getList"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="testItemsList"
|
:data="testItemsList"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column
|
<el-table-column label="项目所属分类" align="center" prop="categoryName">
|
||||||
label="项目所属分类"
|
<template slot-scope="scope">
|
||||||
align="center"
|
<el-button size="mini" type="text" @click="looktype(scope.row)"
|
||||||
prop="categoryName"
|
>查看</el-button
|
||||||
/>
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- <el-table-column label="字典类型" align="center" prop="resultDictType">
|
<!-- <el-table-column label="字典类型" align="center" prop="resultDictType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
@ -179,7 +179,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
@ -187,7 +186,6 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改测试项目对话框 -->
|
<!-- 添加或修改测试项目对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
@ -208,8 +206,11 @@
|
|||||||
:normalizer="normalizer"
|
:normalizer="normalizer"
|
||||||
:options="itemCategoryList"
|
:options="itemCategoryList"
|
||||||
placeholder="请选择所属项目分类"
|
placeholder="请选择所属项目分类"
|
||||||
v-model="form.itemCategoryId"
|
v-model="form.testCategoryItemList"
|
||||||
style="width: 300px"
|
style="width: 500px"
|
||||||
|
:multiple="true"
|
||||||
|
:disable-branch-nodes="true"
|
||||||
|
search-nested
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@ -272,7 +273,6 @@
|
|||||||
/> -->
|
/> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-form-item label="排序" prop="sorting">
|
<el-form-item label="排序" prop="sorting">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.sorting"
|
v-model="form.sorting"
|
||||||
@ -281,7 +281,6 @@
|
|||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="度量单位" prop="measureUnit">
|
<el-form-item label="度量单位" prop="measureUnit">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.measureUnit"
|
v-model="form.measureUnit"
|
||||||
@ -388,7 +387,6 @@
|
|||||||
placeholder="请输入统一标准最高得分"
|
placeholder="请输入统一标准最高得分"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="级别描述" prop="levelDescription">
|
<el-form-item label="级别描述" prop="levelDescription">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
@ -455,12 +453,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer" style="margin-right: 80px">
|
<div slot="footer" class="dialog-footer" style="margin-right: 80px">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -471,6 +494,7 @@ import {
|
|||||||
delTestItems,
|
delTestItems,
|
||||||
addTestItems,
|
addTestItems,
|
||||||
updateTestItems,
|
updateTestItems,
|
||||||
|
getTestCategoryItemInfo,
|
||||||
} from "@/api/system/testItems";
|
} from "@/api/system/testItems";
|
||||||
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
|
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
|
||||||
import { listItemCategory } from "@/api/system/itemCategory";
|
import { listItemCategory } from "@/api/system/itemCategory";
|
||||||
@ -721,7 +745,6 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
let minScore = (rule, value, callback) => {
|
let minScore = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
callback();
|
callback();
|
||||||
@ -739,14 +762,10 @@ export default {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const validateVin = (rule, value, callback) => {
|
const validateVin = (rule, value, callback) => {
|
||||||
const containAlpha = /[a-zA-Z]/; //含有字母
|
const containAlpha = /[a-zA-Z]/; //含有字母
|
||||||
|
|
||||||
const containLowerCase = /[a-z]/; //匹配小写字母
|
const containLowerCase = /[a-z]/; //匹配小写字母
|
||||||
value = value.slice(0, 1);
|
value = value.slice(0, 1);
|
||||||
console.log(value);
|
|
||||||
|
|
||||||
if (!value) {
|
if (!value) {
|
||||||
callback(new Error("不能为空"));
|
callback(new Error("不能为空"));
|
||||||
} else if (!containAlpha.test(value)) {
|
} else if (!containAlpha.test(value)) {
|
||||||
@ -914,6 +933,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
categorynamelist: [],
|
||||||
|
itemtypeopen: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -1049,8 +1070,6 @@ export default {
|
|||||||
tKindergartenInfo(this.itemResultType).then((res) => {
|
tKindergartenInfo(this.itemResultType).then((res) => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
this.itemResultTypelist = res.data;
|
this.itemResultTypelist = res.data;
|
||||||
console.log(this.itemResultTypelist);
|
|
||||||
|
|
||||||
this.ResultType1 = this.itemResultTypelist[0];
|
this.ResultType1 = this.itemResultTypelist[0];
|
||||||
this.ResultType2 = this.itemResultTypelist[1];
|
this.ResultType2 = this.itemResultTypelist[1];
|
||||||
// console.log(this.ResultType1);
|
// console.log(this.ResultType1);
|
||||||
@ -1061,7 +1080,6 @@ export default {
|
|||||||
});
|
});
|
||||||
tKindergartenInfo(this.standardType).then((res) => {
|
tKindergartenInfo(this.standardType).then((res) => {
|
||||||
this.standardTypelist = res.data;
|
this.standardTypelist = res.data;
|
||||||
console.log(this.standardTypelist);
|
|
||||||
});
|
});
|
||||||
listTestItems(this.queryParams).then((response) => {
|
listTestItems(this.queryParams).then((response) => {
|
||||||
this.testItemsList = response.rows;
|
this.testItemsList = response.rows;
|
||||||
@ -1126,6 +1144,15 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加测试项目";
|
this.title = "添加测试项目";
|
||||||
},
|
},
|
||||||
|
//查看所属分类
|
||||||
|
looktype(row) {
|
||||||
|
this.categorynamelist = [];
|
||||||
|
getTestCategoryItemInfo(row.id).then((res) => {
|
||||||
|
this.categorynamelist = res.data;
|
||||||
|
this.itemtypeopen = true;
|
||||||
|
console.log(this.categorynamelist);
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
@ -1206,3 +1233,17 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</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