Commit 3b30c624 authored by mengzixuan's avatar mengzixuan

feat(标准库管理): 检验项目字段修改

parent c144859b
...@@ -74,21 +74,21 @@ ...@@ -74,21 +74,21 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="检验项目(可多选)" prop="inspectionItemList"> <!-- <el-form-item label="检验项目(可多选)" prop="inspectionItemList">-->
<div class="test-scenario-container"> <!-- <div class="test-scenario-container">-->
<div <!-- <div-->
v-for="(item, index) in inspectionItemList" <!-- v-for="(item, index) in inspectionItemList"-->
:key="index" <!-- :key="index"-->
:class="{ <!-- :class="{-->
'test-scenario': item.check === false, <!-- 'test-scenario': item.check === false,-->
'check-test-scenario': item.check === true <!-- 'check-test-scenario': item.check === true-->
}" <!-- }"-->
@click="handleInspectionItem(item)" <!-- @click="handleInspectionItem(item)"-->
> <!-- >-->
<div>{{ item.label }}</div> <!-- <div>{{ item.label }}</div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</el-form-item> <!-- </el-form-item>-->
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button @click="handleClose()"> 取消 </el-button> <el-button @click="handleClose()"> 取消 </el-button>
...@@ -114,6 +114,14 @@ export default { ...@@ -114,6 +114,14 @@ export default {
}, },
dicts: ['sys_detailed_classification', 'sys_standard_status'], dicts: ['sys_detailed_classification', 'sys_standard_status'],
data() { data() {
// const validatePass = (rule, value, callback) => {
// var result = this.inspectionItemList.findIndex((value)=>value.check == true)
// if (result === -1) {
// callback(new Error("请至少选择一个检验项目"))
// } else {
// callback()
// }
// }
return { return {
model: this.$modelDataSource({ model: this.$modelDataSource({
url: '/standard', url: '/standard',
...@@ -148,6 +156,9 @@ export default { ...@@ -148,6 +156,9 @@ export default {
implementationDate: [ implementationDate: [
{ required: true, message: '实施日期不能为空', trigger: 'blur' } { required: true, message: '实施日期不能为空', trigger: 'blur' }
] ]
// inspectionItemList: [
// { type: 'array', required: true, trigger: 'change', validator: validatePass }
// ]
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment