| | |
| | | <el-input v-model="listQuery.filter.equipmentName" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8" style="text-align: center"> |
| | | <el-button type="primary" icon="el-icon-search" @click="find()" class="btns" |
| | | >搜索</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | class="btns" |
| | | @click="handleClick('', '新增')" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | class="btns" |
| | | @click="importData()" |
| | | >导入</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-refresh" @click="reset()" class="btns" |
| | | >重置</el-button |
| | | > |
| | | <el-col :span="10" style="text-align: center"> |
| | | <el-button type="primary" icon="el-icon-search" @click="find()" class="btns">搜索</el-button> |
| | | <el-button type="primary" icon="el-icon-refresh" @click="reset()" class="btns">重置</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" class="btns" @click="handleClick('', '新增')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" class="btns" @click="importData()">导入</el-button> |
| | | <el-button type="primary" class="btns" @click="exportTemplate()">下载导入模板</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="recordTotal" |
| | | style="margin-top: 20px;" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="dialogVisible" |
| | | :close-on-click-modal="false" |
| | | width="40%" |
| | | > |
| | | <el-form ref="form" :rules="rules" :model="form" label-width="120px"> |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仪表量程下限" prop="rangeLowerLimit"> |
| | | <el-input v-model.number="form.rangeLowerLimit" maxlength="50"></el-input> |
| | | <el-input v-model="form.rangeLowerLimit" maxlength="50"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="仪表量程上限" prop="rangeLowerLimit"> |
| | | <el-input v-model.number="form.rangeUpperLimit" maxlength="50"></el-input> |
| | | <el-form-item label="仪表量程上限" prop="rangeUpperLimit"> |
| | | <el-input v-model="form.rangeUpperLimit" maxlength="50"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="高高液位报警值" prop="rangeUpperLimit"> |
| | | <el-input v-model.number="form.highHighLiquidAlarm" maxlength="50"></el-input> |
| | | <el-form-item label="高高液位报警值" prop="highHighLiquidAlarm"> |
| | | <el-input v-model="form.highHighLiquidAlarm" maxlength="50"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="高液位报警值" prop="highLiquidAlarm"> |
| | | <el-input v-model.number="form.highLiquidAlarm" maxlength="50"></el-input> |
| | | <el-input v-model="form.highLiquidAlarm" maxlength="50"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="低液位报警值" prop="lowLiquidAlarm"> |
| | | <el-input v-model.number="form.lowLiquidAlarm" maxlength="50"></el-input> |
| | | <el-input v-model="form.lowLiquidAlarm" maxlength="50"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="低低液位报警值" prop="lowLowLiquidAlarm"> |
| | | <el-input v-model.number="form.lowLowLiquidAlarm" maxlength="50"></el-input> |
| | | <el-input v-model="form.lowLowLiquidAlarm" maxlength="50"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-button type="primary" class="btns" @click="AddelementManagement()" |
| | | >确 定</el-button |
| | | > |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button @click="cancel()">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | } from "@/api/majorEquipmentData.js"; |
| | | import { majorEquipmentErt } from "@/api/majorEquipment.js"; |
| | | import XLSX from 'xlsx' |
| | | const exampleFile = require('@/assets/example/instrumentData.xlsx') |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | { required: true, message: "请选择检测时间", trigger: "change"}, |
| | | rangeLowerLimit:[ |
| | | { required: true, message: "仪表量程下限不能为空", trigger: "change"}, |
| | | { type: 'number', message: '仪表量程下限必须为数字值'} |
| | | { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入数字格式,可保留两位小数' } |
| | | ], |
| | | rangeUpperLimit:[ |
| | | { required: true, message: "仪表量程上限不能为空", trigger: "change"}, |
| | | { type: 'number', message: '仪表量程上限必须为数字值'} |
| | | { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入数字格式,可保留两位小数' } |
| | | ], |
| | | highHighLiquidAlarm:[ |
| | | { required: true, message: "高高液位报警值不能为空", trigger: "change"}, |
| | | { type: 'number', message: '高高液位报警值必须为数字值'} |
| | | { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入数字格式,可保留两位小数' } |
| | | ], |
| | | highLiquidAlarm:[ |
| | | { required: true, message: "高液位报警值不能为空", trigger: "change"}, |
| | | { type: 'number', message: '高液位报警值必须为数字值'} |
| | | { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入数字格式,可保留两位小数' } |
| | | ], |
| | | lowLiquidAlarm:[ |
| | | { required: true, message: "低液位报警值不能为空", trigger: "change"}, |
| | | { type: 'number', message: '低液位报警值必须为数字值'} |
| | | { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入数字格式,可保留两位小数' } |
| | | ], |
| | | lowLowLiquidAlarm:[ |
| | | { required: true, message: "低低液位报警值不能为空", trigger: "change"}, |
| | | { type: 'number', message: '低低液位报警值必须为数字值'}, |
| | | { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入数字格式,可保留两位小数' } |
| | | ], |
| | | }, |
| | | equipmentName:[], |
| | |
| | | this.initMajorEquipment() |
| | | }, |
| | | methods: { |
| | | exportTemplate(){ |
| | | window.open(exampleFile, '_blank') |
| | | }, |
| | | |
| | | importData(){ |
| | | let input = document.createElement('input'); input.type = 'file'; |
| | |
| | | }; |
| | | } else { |
| | | this.title = "编辑"; |
| | | this.form = value; |
| | | console.log(123,this.form) |
| | | console.log(222,this.equipmentName) |
| | | this.form=JSON.parse(JSON.stringify(value)); |
| | | } |
| | | }, |
| | | AddelementManagement() { |
| | |
| | | title: "成功", |
| | | }); |
| | | } else { |
| | | his.$message({ |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | cancel(){ |
| | | this.elementManagementL(); |
| | | this.dialogVisible = false |
| | | }, |
| | | deleteById(val) { |
| | | this.$confirm('确认删除吗','提示', { |
| | |
| | | type: "success", |
| | | duration: 2000, |
| | | }); |
| | | }else { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: res.data.message, |
| | | }); |
| | | } |
| | | }); |
| | | }) |