|
|
@@ -68,99 +68,154 @@
|
|
|
@click="addParameter"
|
|
|
>选择工艺参数标准</el-button
|
|
|
> -->
|
|
|
- <el-table
|
|
|
- style="margin-top: 15px"
|
|
|
- :data="form.parameterStandards"
|
|
|
- border
|
|
|
- height="40vh"
|
|
|
- >
|
|
|
- <el-table-column :label="form.singleWeightDivision" align="center">
|
|
|
- <el-table-column
|
|
|
- label="参数上限"
|
|
|
- align="center"
|
|
|
- v-if="form.parameterType == 3"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item label-width="0" prop="finalValue">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="scope.row.finalValue"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="参数下限"
|
|
|
- align="center"
|
|
|
- v-if="form.parameterType == 3"
|
|
|
+ <el-tabs v-model="activeName" type="card">
|
|
|
+ <el-tab-pane
|
|
|
+ :label="item.name"
|
|
|
+ :name="item.name"
|
|
|
+ v-for="item in activeList"
|
|
|
+ :key="item.name"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ v-show="activeName == '质检项'"
|
|
|
+ style="margin-top: 15px"
|
|
|
+ :data="form.parameterStandards"
|
|
|
+ border
|
|
|
+ height="40vh"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item label-width="0" prop="initialValue">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="scope.row.initialValue"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="默认值"
|
|
|
- align="center"
|
|
|
- v-if="form.parameterType != 3"
|
|
|
+ <el-table-column
|
|
|
+ :label="form.singleWeightDivision"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ label="参数上限"
|
|
|
+ align="center"
|
|
|
+ v-if="form.parameterType == 3"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item label-width="0" prop="finalValue">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="scope.row.finalValue"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="参数下限"
|
|
|
+ align="center"
|
|
|
+ v-if="form.parameterType == 3"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item label-width="0" prop="initialValue">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="scope.row.initialValue"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="默认值"
|
|
|
+ align="center"
|
|
|
+ v-if="form.parameterType != 3"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item label-width="0" prop="defaultValue">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="scope.row.defaultValue"
|
|
|
+ placeholder="请输入"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="form.tolerance" align="center">
|
|
|
+ <el-table-column label="质检标准" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item label-width="0" prop="inspectionStandard">
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="scope.row.toleranceValue"
|
|
|
+ placeholder="请输入"
|
|
|
+ >
|
|
|
+ <DictSelection
|
|
|
+ style="width: 100px"
|
|
|
+ slot="prepend"
|
|
|
+ clearable
|
|
|
+ dictName="数学字符"
|
|
|
+ v-model="scope.row.symbol"
|
|
|
+ ></DictSelection>
|
|
|
+ </el-input>
|
|
|
+ <!-- </el-form-item> -->
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link
|
|
|
+ type="danger"
|
|
|
+ :underline="false"
|
|
|
+ @click="handleDeleteItem(scope.$index, scope.row.id)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-table
|
|
|
+ v-show="activeName == '质检点'"
|
|
|
+ style="margin-top: 15px"
|
|
|
+ :data="form.linePoints"
|
|
|
+ border
|
|
|
+ height="40vh"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item label-width="0" prop="defaultValue">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="scope.row.defaultValue"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column :label="form.tolerance" align="center">
|
|
|
- <el-table-column label="质检标准" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-form-item label-width="0" prop="inspectionStandard">
|
|
|
- <el-input
|
|
|
- clearable
|
|
|
- v-model="scope.row.toleranceValue"
|
|
|
- placeholder="请输入"
|
|
|
+ <el-table-column label="编码" align="center" prop="pointCode">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ @click="openEdit('detail', scope.row)"
|
|
|
>
|
|
|
- <DictSelection
|
|
|
- style="width: 100px"
|
|
|
- slot="prepend"
|
|
|
- clearable
|
|
|
- dictName="数学字符"
|
|
|
- v-model="scope.row.symbol"
|
|
|
- ></DictSelection>
|
|
|
- </el-input>
|
|
|
- <!-- </el-form-item> -->
|
|
|
- </el-form-item>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="80">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-link
|
|
|
- type="danger"
|
|
|
- :underline="false"
|
|
|
- @click="handleDeleteItem(scope.$index, scope.row.id)"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ {{ scope.row.pointCode }}
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="名称"
|
|
|
+ align="center"
|
|
|
+ prop="pointName"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="区域"
|
|
|
+ align="center"
|
|
|
+ prop="areaName"
|
|
|
+ ></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="操作" align="center" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link
|
|
|
+ type="danger"
|
|
|
+ :underline="false"
|
|
|
+ @click="handleDeleteItem(scope.$index, scope.row.id)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane></el-tabs
|
|
|
+ >
|
|
|
+
|
|
|
<div class="add-product" @click="add">
|
|
|
<i class="el-icon-circle-plus-outline"></i>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
|
|
|
- <!-- <inspectionProjectList v-if="visible" :list="form.inspectionItems" ref="inspectionProjectRef" /> -->
|
|
|
+ <!-- <inspectionProjectList v-if="visible" :linePoints="form.inspectionItems" ref="inspectionProjectRef" /> -->
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
|
@@ -171,19 +226,26 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<standardDialog ref="standardDialogRef" @choose="choose" />
|
|
|
+ <EquipmentDialog ref="equipmentDialogRef" @choose="choose" />
|
|
|
+
|
|
|
+ <edit ref="edit" ></edit>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { save, update, getById } from '@/api/inspectionStandard';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
import standardDialog from './standardDialog';
|
|
|
-// import EquipmentDialog from '../../../views/inspectionPoint/components/EquipmentDialog';
|
|
|
+import EquipmentDialog from './EquipmentDialog';
|
|
|
+
|
|
|
+import edit from '@/views/inspectionPoint/components/edit';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
fileUpload,
|
|
|
- standardDialog
|
|
|
+ standardDialog,
|
|
|
+ EquipmentDialog,edit
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
@@ -199,6 +261,7 @@ export default {
|
|
|
singleWeightDivision: '',
|
|
|
tolerance: '',
|
|
|
parameterStandards: [],
|
|
|
+ linePoints: [],
|
|
|
parameterType: ''
|
|
|
};
|
|
|
};
|
|
|
@@ -206,7 +269,8 @@ export default {
|
|
|
defaultForm,
|
|
|
// 表单数据
|
|
|
form: { ...defaultForm() },
|
|
|
-
|
|
|
+ activeName: '质检项',
|
|
|
+ activeList: [{ name: '质检项' }, { name: '质检点' }],
|
|
|
// 表单验证规则
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
@@ -248,8 +312,15 @@ export default {
|
|
|
}
|
|
|
this.visible = true;
|
|
|
},
|
|
|
-
|
|
|
+ openEdit(type, row) {
|
|
|
+ console.log(row)
|
|
|
+ this.$refs.edit.open(type, row);
|
|
|
+ },
|
|
|
choose(data) {
|
|
|
+ if (this.activeName == '质检点') {
|
|
|
+ this.form.linePoints = data;
|
|
|
+ return;
|
|
|
+ }
|
|
|
let obj = {
|
|
|
finalValue: data.parameter?.maxValue,
|
|
|
initialValue: data.parameter?.minValue,
|
|
|
@@ -261,12 +332,16 @@ export default {
|
|
|
parameterType: data.parameter?.textType,
|
|
|
defaultValue: data.parameter?.defaultValue
|
|
|
};
|
|
|
- this.form.singleWeightDivision = obj.singleWeightDivision;
|
|
|
- this.form.tolerance = obj.tolerance;
|
|
|
+ this.$set(this.form, 'singleWeightDivision', obj.singleWeightDivision);
|
|
|
+ this.$set(this.form, 'tolerance', obj.tolerance);
|
|
|
this.form.parameterType = obj.parameterType;
|
|
|
this.form.parameterStandards.push(obj);
|
|
|
},
|
|
|
add() {
|
|
|
+ if (this.activeName == '质检点') {
|
|
|
+ this.$refs.equipmentDialogRef.open();
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (!this.form.parameterStandards.length) {
|
|
|
this.$refs.standardDialogRef.open();
|
|
|
return;
|
|
|
@@ -310,7 +385,6 @@ export default {
|
|
|
},
|
|
|
restForm() {
|
|
|
this.form = { ...this.defaultForm() };
|
|
|
- this.list = [];
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.form.clearValidate();
|
|
|
});
|