检查项(部位)+工具方法拆分

master
wws 12 months ago
parent 30d8e62556
commit 36fc7906d2

@ -9,15 +9,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label-width="60px" label="检查项" prop="itemName"> <el-form-item label-width="60px" label="部位" prop="itemName">
<el-input <el-input
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入检查项名称" placeholder="请输入部位"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label-width="120px" label="检查项方法/工具" prop="itemMethod"> <el-form-item label-width="120px" label="检查项方法" prop="itemMethod">
<el-input <el-input
v-model="queryParams.itemMethod" v-model="queryParams.itemMethod"
placeholder="请输入检查项方法/工具" placeholder="请输入检查项方法/工具"
@ -25,6 +25,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label-width="120px" label="检查项方法" prop="itemMethod">
<el-input
v-model="queryParams.itemTools"
placeholder="请输入检查项工具"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="维护类型" prop="itemType"> <el-form-item label="维护类型" prop="itemType">
<el-select v-model="queryParams.itemType" placeholder="请选择维护类型" clearable> <el-select v-model="queryParams.itemType" placeholder="请选择维护类型" clearable>
<el-option <el-option
@ -197,8 +205,9 @@
<el-table-column v-if="false" label="主键" align="center" prop="itemId"/> <el-table-column v-if="false" label="主键" align="center" prop="itemId"/>
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column> <el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column width="120" label="检查项编码" align="center" prop="itemCode"/> <el-table-column width="120" label="检查项编码" align="center" prop="itemCode"/>
<el-table-column width="200" label="检查项" align="center" prop="itemName"/> <el-table-column width="200" label="部位" align="center" prop="itemName"/>
<el-table-column width="150" label="方法/工具" align="center" prop="itemMethod"/> <el-table-column width="150" label="方法" align="center" prop="itemMethod"/>
<el-table-column width="150" label="工具" align="center" prop="itemTools"/>
<el-table-column width="120" label="维护类型编码" align="center" prop="itemType"/> <el-table-column width="120" label="维护类型编码" align="center" prop="itemType"/>
<el-table-column width="120" label="维护类型" align="center" prop="itemTypeName"/> <el-table-column width="120" label="维护类型" align="center" prop="itemTypeName"/>
<el-table-column width="200" label="备注" align="center" prop="itemRemark"/> <el-table-column width="200" label="备注" align="center" prop="itemRemark"/>
@ -252,18 +261,18 @@
<!-- 添加或修改检查项维护对话框 --> <!-- 添加或修改检查项维护对话框 -->
<el-dialog v-loading="itemLoading" :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog v-loading="itemLoading" :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-tabs v-model="activePage" type="border-card"> <el-tabs v-model="activePage" type="border-card">
<el-tab-pane name="check" label="检查项配置"> <el-tab-pane name="check" label="标准配置">
<el-form ref="form" :model="form" :rules="rules" label-width="90px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<!-- 第一行 --> <!-- 第一行 -->
<el-row> <el-row>
<!-- 第一列 --> <!-- 第一列 -->
<el-col :span="6"> <el-col :span="10">
<el-form-item label="检查项"> <el-form-item label="检查项">
<el-input v-model="form.itemName" placeholder="请输入检查项"></el-input> <el-input v-model="form.itemName" placeholder="请输入检查项"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 第二列 --> <!-- 第二列 -->
<el-col :span="6" :offset="1"> <el-col :span="8" :offset="1">
<el-form-item label="维护类型"> <el-form-item label="维护类型">
<el-select v-model="form.itemType" placeholder="请选择维护类型" clearable> <el-select v-model="form.itemType" placeholder="请选择维护类型" clearable>
<el-option <el-option
@ -275,15 +284,22 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 第三列 --> </el-row>
<el-col :span="7" :offset="1"> <el-row>
<el-form-item label-width="100px" label="检查方法/工具"> <el-col :span="10">
<el-input v-model="form.itemMethod" placeholder="请输入检查方法/工具"></el-input> <el-form-item label="方法">
<el-input v-model="form.itemMethod" placeholder="请输入检查方法"></el-input>
</el-form-item>
</el-col>
<el-col :span="8" :offset="1">
<el-form-item label="工具">
<el-input v-model="form.itemTools" placeholder="请输入检查工具"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<!-- 动态表单 --> <!-- 动态表单 -->
<div v-for="(item, index) in formStandard" :key="index"> <div v-for="(item, index) in formStandard" :key="index">
<el-divider></el-divider>
<!-- 标准类型 --> <!-- 标准类型 -->
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
@ -295,9 +311,9 @@
</el-row> </el-row>
<!-- 单选-动态表单 --> <!-- 单选-动态表单 -->
<el-row v-if="item.standardType === 'qualitative'"> <el-row v-if="item.standardType === 'qualitative'">
<el-col :span="6"> <el-col :span="12">
<el-form-item label="标准名称"> <el-form-item label="标准名称">
<el-input v-model="item.standardName" placeholder="请输入标准名称"></el-input> <el-input type="textarea" autosize v-model="item.standardName" placeholder="请输入标准名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 操作 --> <!-- 操作 -->
@ -310,28 +326,28 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row v-else> <el-row v-else>
<el-col :span="6"> <el-col :span="12">
<el-form-item label="标准名称"> <el-form-item label="标准名称">
<el-input v-model="item.standardName" placeholder="请输入标准名称"></el-input> <el-input type="textarea" autosize v-model="item.standardName" placeholder="请输入标准名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="6">
<el-form-item label-width="50px" label="上限"> <el-form-item label-width="50px" label="上限">
<el-input v-model="item.detailUpLimit" step="0.01" type="number" maxlength="9" oninput="value=value.replace(/[^\d.]/g, '')" placeholder="请输入上限"></el-input> <el-input v-model="item.detailUpLimit" step="0.01" type="number" maxlength="9" oninput="value=value.replace(/[^\d.]/g, '')" placeholder="请输入上限"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="6">
<el-form-item label-width="50px" label="下限"> <el-form-item label-width="50px" label="下限">
<el-input v-model="item.detailDownLimit" step="0.01" type="number" maxlength="9" oninput="value=value.replace(/[^\d.]/g, '')" placeholder="请输入下限"></el-input> <el-input v-model="item.detailDownLimit" step="0.01" type="number" maxlength="9" oninput="value=value.replace(/[^\d.]/g, '')" placeholder="请输入下限"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :offset="1" :span="6">
<el-form-item label-width="50px" label="单位"> <el-form-item label-width="50px" label="单位">
<el-input v-model="item.detailUnit" placeholder="请输入单位"></el-input> <el-input v-model="item.detailUnit" placeholder="请输入单位"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 操作 --> <!-- 操作 -->
<el-col :span="4" class="my-dynamic-btn"> <el-col :span="6" class="my-dynamic-btn">
<el-button size="small" v-if="formStandard.length > 1" @click="removeStandard(index)" type="danger"> <el-button size="small" v-if="formStandard.length > 1" @click="removeStandard(index)" type="danger">
</el-button> </el-button>
<el-button size="small" v-if="index === formStandard.length - 1" @click="addStandard" type="primary"> <el-button size="small" v-if="index === formStandard.length - 1" @click="addStandard" type="primary">
@ -470,6 +486,7 @@ export default {
}, },
// //
form: { form: {
itemTools:null,
itemName: null, itemName: null,
itemType: null, itemType: null,
itemMethod: null, itemMethod: null,
@ -547,6 +564,7 @@ export default {
updateTime: null, updateTime: null,
updateBy: null, updateBy: null,
formStandard: [], formStandard: [],
itemTools:null,
}; };
this.formStandard = [{ this.formStandard = [{
standardType: 'qualitative', standardType: 'qualitative',
@ -625,13 +643,6 @@ export default {
}) })
return return
} }
if (this.form.itemMethod == null) {
this.$message({
message: "请输入检查方法/工具!",
type: "warning"
})
return
}
if (this.selectEquipmentList.length == 0) { if (this.selectEquipmentList.length == 0) {
this.$message({ this.$message({
message: "请关联设备!", message: "请关联设备!",

Loading…
Cancel
Save