唐耀东
2022-05-13 3bb3488abec439ea977329505633b50ff56bce43
src/views/construction/ipc/index.vue
@@ -88,6 +88,13 @@
          <el-button
              size="mini"
              type="text"
              icon="el-icon-view"
              @click="handleInfo(scope.row)"
          >查看
          </el-button>
          <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['oa:ipc:edit']"
@@ -117,7 +124,7 @@
    <!-- 添加或修改ipc设备对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="700px" :append-to-body="true" :close-on-click-modal="false"
               :destroy-on-close="true">
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
      <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="disabled">
        <el-row>
          <el-col :span="9">
            <el-form-item label="MAC" prop="mac">
@@ -183,8 +190,8 @@
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button :loading="buttonLoading" type="primary" @click="copy">复制上一条信息</el-button>
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
        <el-button :loading="buttonLoading" :disabled="disabled" type="primary" @click="copy">复制上一条信息</el-button>
        <el-button :loading="buttonLoading" :disabled="disabled" type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
@@ -286,7 +293,8 @@
          {required: true, message: "施工批次不能为空", trigger: "blur"}
        ],
        passageway: []
      }
      },
      disabled: false
    };
  },
  computed: {
@@ -367,19 +375,33 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.disabled = false;
      this.open = true;
      this.title = "添加ipc设备";
      this.title = "添加IPC设备";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
    handleInfo(row) {
      this.loading = true;
      this.disabled = true;
      this.reset();
      const id = row.id || this.ids
      getIpc(id).then(response => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改ipc设备";
        this.title = "IPC设备详情";
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.loading = true;
      this.disabled = false;
      this.reset();
      const id = row.id || this.ids
      getIpc(id).then(response => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改IPC设备";
      });
    },
    /** 提交按钮 */