liuchengxin
2022-06-06 4001279159dd37942b3cf4c83ab537f95832a82d
src/views/basics/building/index.vue
@@ -33,7 +33,6 @@
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
            v-hasPermi="['oa:building:add']"
        >新增
        </el-button>
      </el-col>
@@ -43,13 +42,14 @@
        v-loading="loading"
        :data="buildingList"
        row-key="id"
        height="calc(100vh - 210px)"
        default-expand-all
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
    >
      <el-table-column label="单元名称" align="center" prop="name"/>
      <el-table-column label="单元编号" prop="code"/>
      <el-table-column label="显示顺序" align="center" prop="orderNum"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
      <el-table-column label="单元名称" align="left" prop="name" show-overflow-tooltip/>
      <el-table-column label="单元编号" align="left" width="150" prop="code"/>
      <el-table-column label="显示顺序" align="center" width="80" prop="orderNum"/>
      <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
              size="mini"
@@ -64,7 +64,6 @@
              type="text"
              icon="el-icon-plus"
              @click="handleAdd(scope.row)"
              v-hasPermi="['oa:building:add']"
          >新增
          </el-button>
          <el-button
@@ -81,7 +80,7 @@
    </el-table>
    <!-- 添加或修改建筑单元对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
    <el-dialog :title="title" :visible.sync="open" width="500px" :append-to-body="true" :close-on-click-modal="false">
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="上级单元" prop="parentId">
          <treeselect v-model="form.parentId" :options="buildingOptions" :normalizer="normalizer"
@@ -256,9 +255,9 @@
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        this.form.schoolId = this.schoolId;
        if (valid) {
          this.buttonLoading = true;
          this.form.schoolId = this.schoolId;
          if (this.form.id != null) {
            updateBuilding(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
@@ -281,7 +280,7 @@
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      this.$modal.confirm('是否确认删除"' + row.detailedName + '"?').then(() => {
      this.$modal.confirm('是否确认删除?').then(() => {
        this.loading = true;
        return delBuilding(row.id);
      }).then(() => {