|
|
@@ -1,133 +1,75 @@
|
|
|
<!-- 搜索表单 -->
|
|
|
<template>
|
|
|
- <el-form
|
|
|
- label-width="80px"
|
|
|
- class="ele-form-search"
|
|
|
- @keyup.enter.native="search"
|
|
|
- @submit.native.prevent
|
|
|
- >
|
|
|
- <el-row>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
|
|
|
- <el-form-item label="参数编码:">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model.trim="where.inspectionCode"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
|
|
|
- <el-form-item label="参数名称:">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model.trim="where.inspectionName"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
|
|
|
- <el-form-item label="工艺要求:">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model.trim="where.inspectionStandard"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
|
|
|
- <el-form-item label="标准类型:" prop="qualityStandardType">
|
|
|
- <DictSelection
|
|
|
- dictName="质检标准类型"
|
|
|
- v-model="where.qualityStandardType"
|
|
|
- ></DictSelection>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 4, md: 10 } : { span: 4 }">
|
|
|
- <el-form-item label="标准名称:">
|
|
|
- <el-select
|
|
|
- v-model="where.qualityStandardId"
|
|
|
- placeholder="请选择"
|
|
|
- style="width: 100%"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- :label="item.name"
|
|
|
- v-for="item in qualityStandardList"
|
|
|
- :key="item.id"
|
|
|
- :value="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col
|
|
|
- v-bind="styleResponsive ? { lg: 4, md: 8 } : { span: 4 }"
|
|
|
- style="text-align: right"
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-search"
|
|
|
- class="ele-btn-icon"
|
|
|
- @click="search"
|
|
|
- >
|
|
|
- 查询
|
|
|
- </el-button>
|
|
|
- <el-button @click="reset">重置</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getList } from '@/api/inspectionStandard';
|
|
|
export default {
|
|
|
data() {
|
|
|
- // 默认表单数据
|
|
|
- const defaultWhere = {
|
|
|
- inspectionCode: '',
|
|
|
- inspectionName: '',
|
|
|
- qualityStandardType: '',
|
|
|
- inspectionStandard: '',
|
|
|
- qualityStandardId: ''
|
|
|
- };
|
|
|
return {
|
|
|
- // 表单数据
|
|
|
- where: { ...defaultWhere },
|
|
|
qualityStandardList: []
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- // 是否开启响应式布局
|
|
|
- styleResponsive() {
|
|
|
- return this.$store.state.theme.styleResponsive;
|
|
|
+ seekList() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ label: '参数编码:',
|
|
|
+ value: 'inspectionCode',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: '请输入'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '参数名称:',
|
|
|
+ value: 'inspectionName',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: '请输入'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '工艺要求:',
|
|
|
+ value: 'inspectionStandard',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: '请输入'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '标准类型:',
|
|
|
+ value: 'qualityStandardType',
|
|
|
+ type: 'DictSelection',
|
|
|
+ dictName: '质检标准类型',
|
|
|
+ placeholder: '请选择'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '标准名称:',
|
|
|
+ value: 'qualityStandardId',
|
|
|
+ type: 'select',
|
|
|
+ placeholder: '请选择',
|
|
|
+ planList: this.qualityStandardList.map(item=>({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ }))
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '标谯代码:',
|
|
|
+ value: 'standardCode',
|
|
|
+ type: 'input',
|
|
|
+ placeholder: '请输入'
|
|
|
+ }
|
|
|
+ ];
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getListFn();
|
|
|
+ getList({
|
|
|
+ pageNum: 1,
|
|
|
+ size: -1
|
|
|
+ }).then((res) => {
|
|
|
+ this.qualityStandardList = res.list
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
/* 搜索 */
|
|
|
- search() {
|
|
|
- this.$emit('search', this.where);
|
|
|
- },
|
|
|
- /* 重置 */
|
|
|
- reset() {
|
|
|
- this.where = { ...this.defaultWhere };
|
|
|
- this.search();
|
|
|
- },
|
|
|
-
|
|
|
- getListFn() {
|
|
|
- let param = {
|
|
|
- pageNum: 1,
|
|
|
- size: -1
|
|
|
- };
|
|
|
-
|
|
|
- getList(param).then((res) => {
|
|
|
- this.qualityStandardList = res.list;
|
|
|
- });
|
|
|
+ search(e) {
|
|
|
+ this.$emit('search', { ...e });
|
|
|
}
|
|
|
}
|
|
|
};
|