| | |
| | | </div> |
| | | </div> |
| | | <div class="table-box"> |
| | | <el-table ref="equipmentTable" node-key="father_name" :cell-style="{ textAlign: 'center' }" |
| | | :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }" |
| | | :data="equipmentTable" style="width: 100%"> |
| | | <el-table ref="equipmentTable" node-key="father_name" :cell-style="{ textAlign: 'left' }" |
| | | :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'left' }" |
| | | :data="equipmentTable" style="width: 100%;"> |
| | | <el-table-column type="index" label="序号" min-width="90" /> |
| | | <el-table-column prop="equipment_code" label="仪器设备编号" min-width="200" /> |
| | | <el-table-column prop="equipment_name" label="仪器设备名称" min-width="150" /> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="storage_place" label="存放地" min-width="200" /> |
| | | |
| | | <el-table-column label="操作" min-width="120" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="openDetail(scope.row)">编辑</el-button> |
| | |
| | | <el-form-item label="所属分类:" prop="classifyId" label-width="80" :rules="[ |
| | | { required: true, message: '请选择所属分类', trigger: 'change' } |
| | | ]"> |
| | | <el-cascader v-model="equipmentform.classifyId" :options="classTree" :show-all-levels="false" /> |
| | | <el-cascader style="width: 100%;" v-model="equipmentform.classifyId" :options="classTree" :show-all-levels="false" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | |
| | | // 节点点击处理 |
| | | nodeClickHandler(data, node, element) { |
| | | this.nodeclicked = data |
| | | // console.log(data) |
| | | console.log(data) |
| | | // 只有数据中携带id才能发送查询请求 |
| | | if (data.id) { |
| | | this.getEquipmentTable({ classifyId: data.id, pageSize: this.pageSize, pageNo: this.currentPage, whetherWhether: this.isOut }) |
| | |
| | | this.deletedialogVisible = true |
| | | }, |
| | | async deleteInstrument() { |
| | | let up = await deleteInstrument({ instrumentId: this.instrumentId }) |
| | | if (up.data) { |
| | | this.$message({ |
| | | message: '操作成功!', |
| | | type: 'success' |
| | | }); |
| | | await deleteInstrument({ instrumentId: this.instrumentId }).then(res=>{ |
| | | this.$message.error('删除成功!'); |
| | | let d = this.nodeclicked |
| | | console.log(d); |
| | | this.nodeClickHandler(d); |
| | | } |
| | | }).catch(()=>{ |
| | | this.$message.error('删除失败!'); |
| | | }); |
| | | this.deletedialogVisible = false |
| | | }, |
| | | async submitTreeForm(formName) { |
| | |
| | | fatherName: null, |
| | | sonName: null |
| | | } |
| | | |
| | | if (_that.addTreeForm.type != null && _that.addTreeForm.type[0] != 0) { |
| | | data.fatherName = _that.addTreeForm.type[0] |
| | | data.fatherName = _that.addTreeFormClassTree.filter(item => { |
| | | return item.value == _that.addTreeForm.type[0] |
| | | })[0].label |
| | | data.sonName = _that.addTreeForm.name |
| | | } else { |
| | | data.fatherName = _that.addTreeForm.name |
| | | } |
| | | } // return; |
| | | let add = await addClassify(data); |
| | | switch (add.message.split('-$')[0]) { |
| | | case '1': |
| | |
| | | _that.resetTreeForm('addTreeForm') |
| | | break; |
| | | case '2': |
| | | this.$message({ |
| | | message: '已存在该分类', |
| | | type: 'warning' |
| | | }); |
| | | this.$message({ |
| | | message: '已存在该分类', |
| | | type: 'warning' |
| | | }); |
| | | break; |
| | | case '0': |
| | | this.$message.error('添加失败!请联系管理员'); |
| | | this.$message.error('添加失败!请联系管理员'); |
| | | break; |
| | | } |
| | | |
| | |
| | | background: #fff; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 0 24px 12px 24px; |
| | | padding: 15px 24px 12px 24px; |
| | | |
| | | .search-bar { |
| | | .el-radio-button.is-active { |
| | |
| | | .library-bom { |
| | | flex: 2; |
| | | margin-right: 12px; |
| | | height: 80vh; |
| | | |
| | | .bom-item-search { |
| | | margin-bottom: 12px; |
| | |
| | | margin-left: 12px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 80vh; |
| | | |
| | | .table-box { |
| | | margin-top: 30px; |