zouyu
2023-09-04 aca7c994977ecb1cc8fb3b7740a04192135a40a9
src/views/laboratory/ledger/index.vue
@@ -52,9 +52,9 @@
          </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" />
@@ -68,7 +68,6 @@
              </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>
@@ -250,7 +249,7 @@
              <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">
@@ -686,7 +685,7 @@
    // 节点点击处理
    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 })
@@ -951,15 +950,14 @@
      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) {
@@ -1052,7 +1050,7 @@
    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 {
@@ -1088,6 +1086,7 @@
    .library-bom {
      flex: 2;
      margin-right: 12px;
         height: 80vh;
      .bom-item-search {
        margin-bottom: 12px;
@@ -1119,6 +1118,7 @@
      margin-left: 12px;
      display: flex;
      flex-direction: column;
         height: 80vh;
      .table-box {
        margin-top: 30px;