| | |
| | | <template> |
| | | <div class="ledger-main"> |
| | | <div class="page-header-search"> |
| | | <div class="search-bar"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | | <el-form-item> |
| | | <el-input v-model="searchData.keyword" placeholder="请输入编号/设备名称/型号规格"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="filterTableData">查询</el-button> |
| | | <el-button type="primary" plain @click="resetBtn">重置</el-button> |
| | | <!-- <el-button type="text">高级搜索<i class="el-icon-arrow-down el-icon--right" /></el-button> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="serve-btn"> |
| | | <el-button type="primary" icon="el-icon-plus" |
| | | @click="addDrawerVisible = true; equipmentform.equipmentMeasurement = 1; equipmentform.whetherDataAcquisition = 1">新增仪器</el-button> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" |
| | | @click="showAddDrawer()">新增仪器</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="content-main"> |
| | |
| | | <div class="bom-item-search"> |
| | | <el-row> |
| | | <el-col :span="19"> |
| | | <el-input v-model="filterText" clearable placeholder="输入关键字进行过滤" /> |
| | | <el-input size="small" v-model="filterText" clearable placeholder="输入关键字进行过滤" /> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-button type="primary" size="small" @click="addClassVisible = true"><i |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-tree highlight-current="true" ref="classTree" :data="classTree" :props="defaultProps" :default-expand-all="true" |
| | | <el-tree :highlight-current="true" ref="classTree" :data="classTree" :props="defaultProps" :default-expand-all="true" |
| | | :filter-node-method="filterNode" @node-click="nodeClickHandler" /> |
| | | </div> |
| | | <div class="library-table"> |
| | | <div class="table-header"> |
| | | <div class="search-bar"> |
| | | <el-radio-group v-model="radioValue" @change="getConditionTable"> |
| | | <!-- <el-radio-button label="0">全部</el-radio-button> --> |
| | | <el-radio-button v-for="item in conditionsOptions" :key="item.value" :label="item.value"> |
| | | {{ item.label }} |
| | | </el-radio-button> |
| | | </el-radio-group> |
| | | <el-checkbox v-model="isOut" @change="getExpireTable" :style="{ 'marginLeft': '12px' }">已过期</el-checkbox> |
| | | </div> |
| | | <div class="serve-btn"> |
| | | <!-- <el-button type="primary" icon="el-icon-plus">新增人员</el-button> --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | | <el-form-item width="200"> |
| | | <el-input size="small" v-model="searchData.keyword" placeholder="请输入编号/设备名称/型号规格"> |
| | | <i slot="prefix" class="el-input__icon el-icon-search" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" type="primary" @click="filterTableData">查询</el-button> |
| | | <el-button size="small" type="primary" plain @click="resetBtn">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="16"> |
| | | <el-radio-group v-model="radioValue" @change="getConditionTable"> |
| | | <el-radio-button v-for="item in conditionsOptions" :key="item.value" :label="item.value"> |
| | | {{ item.label }} |
| | | </el-radio-button> |
| | | </el-radio-group> |
| | | <el-checkbox v-model="isOut" @change="getExpireTable" :style="{ 'marginLeft': '12px' }">已过期</el-checkbox> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <div class="table-box"> |
| | |
| | | <span><i class="el-icon-edit" />验收日期:{{ equipmentDetail.acceptanceDate }}</span> |
| | | </div> |
| | | <div class="message-item"> |
| | | <span><i class="el-icon-edit" />保管人:{{ equipmentDetail.name }}</span> |
| | | <span><i class="el-icon-edit" />保管人:{{ equipmentDetail.userName }}</span> |
| | | </div> |
| | | <div class="message-item"> |
| | | <span><i class="el-icon-edit" />是否支持数采:{{ equipmentDetail.whetherDataAcquisition == 1 ? '支持' : '不支持' |
| | |
| | | </div> |
| | | <el-tabs v-model="activeTabsName"> |
| | | <el-tab-pane label="设备码点" name="codePoints"> |
| | | <el-button v-show="!codePointesTableStatus" :style="{ marginBottom: '18px' }" |
| | | @click="addCodePoints">新增设备码点</el-button> |
| | | <div v-show="codePointesTableStatus" :style="{ marginBottom: '18px' }" class="btns"> |
| | | <div :style="{ marginBottom: '18px' }" class="btns"> |
| | | <el-button @click="addNewCodePoints">添加</el-button> |
| | | <el-button @click="saveCodePoins">保存</el-button> |
| | | <el-button v-show="codePointesTableStatus" @click="saveCodePoins">保存</el-button> |
| | | <el-button @click="closeCodePoins">取消</el-button> |
| | | </div> |
| | | |
| | |
| | | <el-table-column type="index" label="序号" min-width="90" /> |
| | | <el-table-column prop="equipmentPoint" label="码点编码" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <span v-show="!codePointesTableStatus">{{ scope.row.equipmentPoint }}</span> |
| | | <el-input v-show="codePointesTableStatus" v-model="scope.row.equipmentPoint" /> |
| | | <el-input v-if="codePointesTableStatus && scope.row.isInput" v-model="scope.row.equipmentPoint" /> |
| | | <span v-else>{{ scope.row.equipmentPoint }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="equipmentPointName" label="码点名称" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <span v-show="!codePointesTableStatus">{{ scope.row.equipmentPointName }}</span> |
| | | <el-input v-show="codePointesTableStatus" v-model="scope.row.equipmentPointName" /> |
| | | <el-input v-if="codePointesTableStatus && scope.row.isInput" v-model="scope.row.equipmentPointName" /> |
| | | <span v-else>{{ scope.row.equipmentPointName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <span v-show="!codePointesTableStatus">{{ scope.row.unit }}</span> |
| | | <el-input v-show="codePointesTableStatus" v-model="scope.row.unit" /> |
| | | <el-input v-if="codePointesTableStatus && scope.row.isInput" v-model="scope.row.unit" /> |
| | | <span v-else>{{ scope.row.unit }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="name" label="更新人" min-width="100" /> |
| | | <el-table-column prop="updateTime" label="更新日期" min-width="120" /> --> |
| | | <el-table-column prop="descriptiveness" label="描述" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <span v-show="!codePointesTableStatus">{{ scope.row.descriptiveness }}</span> |
| | | <el-input v-show="codePointesTableStatus" v-model="scope.row.descriptiveness" /> |
| | | <el-input v-if="codePointesTableStatus && scope.row.isInput" v-model="scope.row.descriptiveness" /> |
| | | <span v-else>{{ scope.row.descriptiveness }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | |
| | | <el-col :span="11"> |
| | | <el-form-item label="状态:" prop="conditions" |
| | | :rules="[{ required: true, message: '请选择仪器设备状态', trigger: 'blur' }]" label-width="80"> |
| | | <el-select v-model="equipmentform.conditions" clearable filterable :allow-create="true" |
| | | <el-select v-model="equipmentform.conditions" clearable :allow-create="true" |
| | | placeholder="请选择仪器设备状态" style="width:100%"> |
| | | <el-option v-for="item in conditionsOptions" :key="item.value" :label="item.label" |
| | | :value="item.value" /> |
| | |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="保管人:" label-width="80"> |
| | | <el-select v-model="equipmentform.userId" clearable filterable :allow-create="true" placeholder="请选择保管人" |
| | | <el-select v-model="equipmentform.userId" clearable :allow-create="true" placeholder="请选择保管人" |
| | | style="width:100%"> |
| | | <el-option v-for="item in userOpetions" :key="item.id" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | |
| | | </el-row> |
| | | <el-row v-show="equipmentform.equipmentMeasurement === 1" :gutter="50"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计量截止有效期:" label-width="80"> |
| | | <el-input min="0" v-model="equipmentform.termValidity" placeholder="请填写计量有效期" type="number" /> |
| | | <el-form-item label="计量周期(月):" label-width="80"> |
| | | <el-input min="0" v-model="equipmentform.termValidity" placeholder="请填写计量周期" type="number" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-form label-position="top" ref="addmeasureForm" :model="measureForm"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="负责人" prop="userId" :rules="[{ required: true, message: '请选择负责人', trigger: 'blur' }]"> |
| | | <el-form-item label="负责人" prop="userId" :rules="[{ required: true, message: '请选择负责人', trigger: 'change' }]"> |
| | | <el-select v-model="measureForm.userId" clearable filterable :allow-create="true" placeholder="负责人" |
| | | style="width:100%"> |
| | | <el-option v-for="item in userOpetions" :key="item.id" :label="item.label" :value="item.value" /> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="结果" prop="result" :rules="[{ required: true, message: '请选择结果', trigger: 'blur' }]"> |
| | | <el-form-item label="结果" prop="result" :rules="[{ required: true, message: '请选择结果', trigger: 'change' }]"> |
| | | <el-select v-model="measureForm.result" clearable filterable :allow-create="true" placeholder="请选择结果" |
| | | style="width:100%"> |
| | | <el-option v-for="item in resultOptions" :key="item.id" :label="item.label" :value="item.value" /> |
| | |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="24"> |
| | | <el-form-item label=""> |
| | | <el-form-item label="" prop="file"> |
| | | <el-upload ref="upload" class="upload-demo" action="#" :on-change="handleUpload" :auto-upload="false"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | </el-upload> |
| | |
| | | userOpetions: [], |
| | | // 仪器状态配置项 |
| | | conditionsOptions: [ |
| | | { |
| | | label: '全部', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '运行', |
| | | value: 1 |
| | |
| | | // 码点表格 |
| | | codePointsTable: [ |
| | | { |
| | | 'isInput':false, |
| | | 'unit': '', |
| | | 'descriptiveness': '', |
| | | 'equipmentPoint': '', |
| | |
| | | result: null, |
| | | performanceIndex: null, |
| | | remarks: null, |
| | | file: null |
| | | file: "" |
| | | }, |
| | | activeTabsName: 'codePoints', |
| | | // 码点表格的状态:数据展示false/新增输入true |
| | |
| | | }, |
| | | measureFormVisible(newVal){ |
| | | if(newVal === false){ |
| | | this.measureForm.file = null; |
| | | this.$refs['upload'].clearFiles(); |
| | | this.cancelAddMeasure(); |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.getUserOptions() |
| | | }, |
| | | methods: { |
| | | //显示新增仪器模态框 |
| | | showAddDrawer(){ |
| | | this.addDrawerVisible = true; |
| | | this.equipmentform = { |
| | | acceptanceDate: '', // 验收日期 |
| | | arrivalDate: '', // 到货日期 |
| | | classifyId: '', // 所属分类 |
| | | conditions: '', // 状态 |
| | | descriptiveness: '', // 描述 |
| | | equipmentCode: '', // 设备编号 |
| | | equipmentMeasurement: 1, // 仪器设备计量 |
| | | equipmentName: '', // 仪器设备名称 |
| | | errorRate: '', // 不确定度/准确度/最大允许误差 |
| | | userId: '', // 保管人 |
| | | manufacturer: '', // 生产厂家 |
| | | measuringRange: '', // 测量范围 |
| | | specificationsModels: '', // 型号规格 |
| | | storagePlace: '', // 存放地点 |
| | | whetherDataAcquisition: 1 // 是否支持数采 |
| | | } |
| | | }, |
| | | // 获取分类数据 |
| | | async getThreeData() { |
| | | const { data } = await getClassifyList() |
| | | // console.log(data) |
| | | this.classTree = data.map(item => { |
| | | if (item.children) { |
| | | item.children = item.children.map(childrenItem => { |
| | |
| | | }, |
| | | // 显示仪器详情 |
| | | async openDetail(row) { |
| | | // console.log(row) |
| | | this.detailDrawer = true |
| | | const { data } = await getInstrumentDetail({ InstrumentId: row.id }) |
| | | this.equipmentDetail = data |
| | | this.equipmentform = data |
| | | console.log(this.equipmentform) |
| | | const { data: pointList } = await getEquipmentPointList({ InstrumentId: this.equipmentDetail.id }) |
| | | this.codePointsTable = pointList |
| | | const { data: informationList } = await getMetricalInformationList({ InstrumentId: this.equipmentDetail.id }) |
| | | this.measureTable = informationList |
| | | console.log(informationList) |
| | | }, |
| | | // 节点点击处理 |
| | | nodeClickHandler(data, node, element) { |
| | | this.nodeclicked = data |
| | | console.log(data) |
| | | // 只有数据中携带id才能发送查询请求 |
| | | if (data.id) { |
| | | this.getEquipmentTable({ classifyId: data.id, pageSize: this.pageSize, pageNo: this.currentPage, whetherWhether: this.isOut }) |
| | |
| | | }, |
| | | // 获取仪器列表数据 |
| | | async getEquipmentTable(ages) { |
| | | // console.log('条件对象', ages) |
| | | const { data } = await getInstrumentList(ages) |
| | | this.equipmentTable = data.row |
| | | this.total = data.total |
| | |
| | | handleCurrentChange() { |
| | | // 当前页更改 |
| | | }, |
| | | // 显示设备码点 |
| | | addCodePoints() { |
| | | // 添加新码点,清空原数组 |
| | | this.codePointesTableStatus = true |
| | | this.codePointsTable = undefined |
| | | }, |
| | | // 新增设备码点 |
| | | addNewCodePoints() { |
| | | // |
| | | if (!this.codePointsTable) { |
| | | this.codePointsTable = [] |
| | | } |
| | | this.codePointesTableStatus = true; |
| | | const newObj = {} |
| | | newObj.isInput = true, |
| | | newObj.name = '' // 当前用户的名称 |
| | | newObj.updateTime = '' // 获取当前时间 |
| | | newObj.equipmentPoint = '' |
| | |
| | | newObj.descriptiveness = '' |
| | | newObj.unit = '' |
| | | newObj.instrumentId = this.equipmentDetail.id |
| | | this.codePointsTable.push(newObj) |
| | | this.codePointsTable.unshift(newObj) |
| | | }, |
| | | // 保存提交新增设备码点 |
| | | async saveCodePoins() { |
| | | console.log(this.codePointsTable) |
| | | if (!this.codePointsTable) { |
| | | this.codePointsTable = [] |
| | | if (this.codePointsTable.length === 0) { |
| | | return this.$message.error('请点击添加按钮添加数据') |
| | | } |
| | | if (this.codePointsTable.length === 0) return this.$message.error('请点击添加按钮添加数据') |
| | | try { |
| | | for (const item of this.codePointsTable) { |
| | | const { code, data, message } = await addEquipmentPoint(item) |
| | | console.log(data) |
| | | if (code !== 200) throw new Error(message) |
| | | this.$message.success('添加成功') |
| | | } |
| | | } catch (error) { |
| | | this.$message.error(error) |
| | | } |
| | | let data = this.codePointsTable.filter(item => { |
| | | return item.instrumentId != null; |
| | | }) |
| | | await addEquipmentPoint(data).then(()=>{ |
| | | this.$message.success('添加成功') |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message) |
| | | }) |
| | | await this.closeCodePoins() |
| | | }, |
| | | // 取消新增设备码点 |
| | |
| | | }, |
| | | // 点击新增仪器设备或当存在仪器详情时是修改仪器设备信息 |
| | | async addNewEquipment() { |
| | | let v = this.submitForm('addNewEquipment') |
| | | if (!v) { |
| | | return |
| | | } |
| | | if (Array.isArray(this.equipmentform.classifyId)) { |
| | | this.equipmentform.classifyId = this.equipmentform.classifyId.pop() |
| | | } |
| | | if (!this.equipmentDetail.id) { |
| | | // 格式化日期 |
| | | this.equipmentform.arrivalDate = parseTime(this.equipmentform.arrivalDate, '{y}-{m}-{d}') |
| | | this.equipmentform.acceptanceDate = parseTime(this.equipmentform.acceptanceDate, '{y}-{m}-{d}') |
| | | // this.equipmentform.termValidity = parseTime(this.equipmentform?.termValidity, '{y}-{m}-{d}') |
| | | try { |
| | | const res = await addInstrument(this.equipmentform) |
| | | console.log(res) |
| | | } catch (error) { |
| | | this.$message.error('添加失败') |
| | | this.$refs["addNewEquipment"].validate(async(valid)=>{ |
| | | if(valid){ |
| | | if (Array.isArray(this.equipmentform.classifyId)) { |
| | | this.equipmentform.classifyId = this.equipmentform.classifyId.pop() |
| | | } |
| | | if (!this.equipmentDetail.id) { |
| | | // 格式化日期 |
| | | this.equipmentform.arrivalDate = parseTime(this.equipmentform.arrivalDate, '{y}-{m}-{d}') |
| | | this.equipmentform.acceptanceDate = parseTime(this.equipmentform.acceptanceDate, '{y}-{m}-{d}') |
| | | // this.equipmentform.termValidity = parseTime(this.equipmentform?.termValidity, '{y}-{m}-{d}') |
| | | await addInstrument(this.equipmentform).then(()=>{ |
| | | this.$message.success('添加成功') |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | let d = this.nodeclicked; |
| | | this.nodeClickHandler(d); |
| | | this.addDrawerVisible = false |
| | | this.equipmentform = {} |
| | | return |
| | | } |
| | | console.log('修改仪器参数', this.equipmentform) |
| | | await changeInstrument(this.equipmentform).then(()=>{ |
| | | this.$message.success('修改成功') |
| | | let d = this.nodeclicked; |
| | | this.nodeClickHandler(d); |
| | | this.addDrawerVisible = false |
| | | this.detailDrawer = false |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | } |
| | | this.$message.success('添加成功') |
| | | let d = this.nodeclicked |
| | | this.nodeClickHandler(d); |
| | | this.addDrawerVisible = false |
| | | this.equipmentform = {} |
| | | return |
| | | } |
| | | console.log('修改仪器参数', this.equipmentform) |
| | | try { |
| | | const res = await changeInstrument(this.equipmentform) |
| | | this.$message.success('修改成功') |
| | | this.addDrawerVisible = false |
| | | this.detailDrawer = false |
| | | } catch (error) { |
| | | this.$message.error('添加失败') |
| | | } |
| | | }); |
| | | }, |
| | | cancelAddEq() { |
| | | this.resetForm('addDrawer') |
| | | this.addDrawerVisible = false |
| | | }, |
| | | resetForm(formName) { |
| | | this.measureForm = { |
| | | userId: null, |
| | | measurementUnit: null, |
| | | date: null, |
| | | uncertainty: null, |
| | | result: null, |
| | | performanceIndex: null, |
| | | remarks: null, |
| | | file: "" |
| | | } |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | cancelAddMeasure() { |
| | | this.$refs['upload'].clearFiles(); |
| | | this.measureForm.file = null; |
| | | this.measureFormVisible = false |
| | | this.resetForm('addmeasureForm') |
| | | this.resetForm('addmeasureForm'); |
| | | this.$refs['upload'].clearFiles(); |
| | | }, |
| | | // 添加计量信息 |
| | | async addMeasure() { |
| | | let v = this.submitForm('addmeasureForm') |
| | | console.log(v); |
| | | if (!v) { |
| | | return |
| | | } |
| | | // 格式化时间 |
| | | this.measureForm.instrumentId = this.equipmentDetail.id |
| | | if (Array.isArray(this.measureForm.date)) { |
| | | this.measureForm.beginDate = parseTime(this.measureForm.date[0], '{y}-{m}-{d}') |
| | | this.measureForm.endDate = parseTime(this.measureForm.date[1], '{y}-{m}-{d}') |
| | | } |
| | | console.log(this.measureForm) |
| | | const formData = new FormData() |
| | | formData.append('file', this.measureForm.file?.raw, this.measureForm.file?.name) |
| | | console.log(this.measureForm) |
| | | for (const key in this.measureForm) { |
| | | console.log(key) |
| | | // if (key === 'file') return |
| | | formData.append(key, this.measureForm[key]) |
| | | } |
| | | console.log(formData) |
| | | try { |
| | | const { data } = await addMetricalInformation(formData) |
| | | console.log(data) |
| | | this.$message.success('添加成功') |
| | | const { data: informationList } = await getMetricalInformationList({ InstrumentId: this.equipmentDetail.id }) |
| | | this.measureTable = informationList |
| | | this.measureForm = {} |
| | | this.measureFormVisible = false |
| | | } catch (error) { |
| | | this.$message.error('添加失败') |
| | | } |
| | | this.measureForm.file = null; |
| | | this.$refs['upload'].clearFiles(); |
| | | this.$refs['addmeasureForm'].validate(async(valid)=>{ |
| | | if(valid){ |
| | | // 格式化时间 |
| | | this.measureForm.instrumentId = this.equipmentDetail.id |
| | | if (Array.isArray(this.measureForm.date)) { |
| | | this.measureForm.beginDate = parseTime(this.measureForm.date[0], '{y}-{m}-{d}') |
| | | this.measureForm.endDate = parseTime(this.measureForm.date[1], '{y}-{m}-{d}') |
| | | } |
| | | const formData = new FormData() |
| | | if(this.measureForm.file == null || this.measureForm.file == ""){ |
| | | this.$message.warning("请选择要上传的文件!"); |
| | | return; |
| | | }else{ |
| | | formData.append('file', this.measureForm.file?.raw, this.measureForm.file?.name) |
| | | } |
| | | for (const key in this.measureForm) { |
| | | formData.append(key, this.measureForm[key]) |
| | | } |
| | | try { |
| | | await addMetricalInformation(formData) |
| | | this.$message.success('添加成功') |
| | | const { data: informationList } = await getMetricalInformationList({ InstrumentId: this.equipmentDetail.id }) |
| | | this.measureTable = informationList |
| | | this.measureForm = {} |
| | | this.measureFormVisible = false |
| | | } catch (error) { |
| | | this.$message.error('添加失败') |
| | | } |
| | | this.measureForm.file = null; |
| | | this.$refs['upload'].clearFiles(); |
| | | } |
| | | }); |
| | | }, |
| | | // 关闭设备详情抽屉 |
| | | closeDetailDrawer() { |
| | |
| | | this.codePointsTable = [] |
| | | this.measureTable = [] |
| | | this.measureForm.file = null; |
| | | this.$refs['upload'].clearFiles(); |
| | | }, |
| | | // 关闭添加修改设备抽屉 |
| | | closeAddOrChangeDrawer() { |
| | |
| | | }, |
| | | // 文件上传 |
| | | handleUpload(file, fileList) { |
| | | // console.log(file, fileList) |
| | | this.measureForm.file = file |
| | | }, |
| | | // 根据输入的设备编号,设备名称或者型号规格关键字进行过滤列表 |
| | |
| | | }, |
| | | resetBtn() { |
| | | this.searchData.keyword = '' |
| | | this.radioValue = 0; |
| | | this.isOut = false; |
| | | this.equipmentTable = this.oldtableData |
| | | }, |
| | | getConditionTable() { |
| | | // console.log(this.radioValue) |
| | | let filteredTable = this.oldtableData.filter(item => { |
| | | return item.conditions === this.radioValue |
| | | }) |
| | |
| | | let expireItem |
| | | for (expireItem of this.expireData) { |
| | | this.equipmentTable = this.oldtableData.filter(item => { |
| | | console.log(this.radioValue) |
| | | console.log('item', item) |
| | | console.log('expireItem', expireItem) |
| | | return item.conditions === this.radioValue && item.equipment_code === expireItem.equipment_code |
| | | }) |
| | | console.log(this.equipmentTable) |
| | | } |
| | | } else { |
| | | this.equipmentTable = this.expireData |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 15px 24px 12px 24px; |
| | | |
| | | .serve-btn{ |
| | | position: relative; |
| | | left: 92%; |
| | | } |
| | | .search-bar { |
| | | .el-radio-button.is-active { |
| | | color: #409EFF !important; |
| | | background: #ecf5ff !important; |
| | | border-color: #b3d8ff !important; |
| | | } |
| | | |
| | | .el-form { |
| | | .el-form-item { |
| | | margin-bottom: 0px !important; |
| | | |
| | | .el-input { |
| | | width: 360px; |
| | | width: 500px; |
| | | } |
| | | } |
| | | } |