yuxc
2023-08-18 cf0d9d26330012e319b4de88d181c66bc907eb0d
Merge remote-tracking branch 'origin/master'
已修改2个文件
90 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/system/user.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -326,12 +326,11 @@
      >
        <template slot-scope="{ row }">
          <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text'  ||item.edit == 'refer' )"
                    ref="inputRef"
                    :id="'inputRef' + row.oid"
                    :ref="'input' + row.oid"
                    v-show="!AddCellFlag"
                    v-model="row[item.prop]"
                    @blur="saveRows"
                    autofocus></el-input>
                    @blur="saveRows(row)"
                    ></el-input>
          <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
                           :style="{width:(item.width-10)+'px'}"
                           controls-position="right"
@@ -1814,15 +1813,19 @@
    },
    //表格行编辑
    handleCellClicks(row, column) {
      console.log(row,column)
      if (this.editOpenFlag) {
        this.editingRows = row;
        this.editShows = column.property;
        this.rowOid = row.oid;
        this.CurrentCell = row;
          // const inputElement = document.querySelector(`#inputRef${row.oid}`);
          // if (inputElement) {
          //   inputElement.focus();
          // };
        this.$nextTick(() => {
          const inputs = this.$refs['input' + row.oid];
          const input = inputs && inputs.length > 0 ? inputs[0].$el : null;
          if (input) {
            input.focus();
          }
        });
        if (column.property == 'referConfig') {
          this.referConfigVisble = true;
          this.referConfigOption = {
Source/UBCS-WEB/src/views/system/user.vue
@@ -809,7 +809,6 @@
      });
    },
    nodeClick(data) {
      console.log(data)
      this.treeDeptId = data.id;
      this.page.currentPage = 1;
      this.onLoad(this.page);
@@ -842,24 +841,22 @@
      });
    },
    rowSave(row, done, loading) {
      const prop = this.findObject(this.option.group, 'tenantId');
      console.log('2',prop)
      row.deptId = row.deptId.join(",");
      row.roleId = row.roleId.join(",");
      row.postId = row.postId.join(",");
      console.log('3',row)
      add(row).then(() => {
        this.initFlag = false;
        this.onLoad(this.page);
        this.$message({
          type: "success",
          message: "操作成功!"
        row.deptId = row.deptId.join(",");
        row.roleId = row.roleId.join(",");
        row.postId = row.postId.join(",");
        console.log('3',row)
        add(row).then(() => {
          this.initFlag = false;
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        }, error => {
          window.console.log(error);
          loading();
        });
        done();
      }, error => {
        window.console.log(error);
        loading();
      });
    },
    rowUpdate(row, index, done, loading) {
      row.deptId = row.deptId.join(",");
@@ -1032,24 +1029,28 @@
    },
    beforeOpen(done, type) {
      console.log(type)
      if (["edit", "view"].includes(type)) {
        getUser(this.form.id).then(res => {
          this.form = res.data.data;
          if (this.form.hasOwnProperty("deptId")) {
            this.form.deptId = this.form.deptId.split(",");
          }
          if (this.form.hasOwnProperty("roleId")) {
            this.form.roleId = this.form.roleId.split(",");
          }
          if (this.form.hasOwnProperty("postId")) {
            this.form.postId = this.form.postId.split(",");
          }
        });
      if(this.treeDeptId){
        if (["edit", "view"].includes(type)) {
          getUser(this.form.id).then(res => {
            this.form = res.data.data;
            if (this.form.hasOwnProperty("deptId")) {
              this.form.deptId = this.form.deptId.split(",");
            }
            if (this.form.hasOwnProperty("roleId")) {
              this.form.roleId = this.form.roleId.split(",");
            }
            if (this.form.hasOwnProperty("postId")) {
              this.form.postId = this.form.postId.split(",");
            }
          });
        }
        const prop = this.findObject(this.option.group, 'tenantId');
        console.log('1',prop)
        this.initFlag = true;
        done();
      }else {
        this.$message.warning('请选择一条所属租户')
      }
      const prop = this.findObject(this.option.group, 'tenantId');
      console.log('1',prop)
      this.initFlag = true;
      done();
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;