按钮级别的新版本,多级别的组织架构
loulijun2021
2023-08-24 68338b19f9dc2ad9725326b7e699a3e191030cb8
src/views/basicSettings/roleList.vue
@@ -29,7 +29,24 @@
            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
        <div
          class="bodyTopFormExpand"
          style="height:5px"
        >
          <!--          <svg-icon-->
          <!--            v-show="mouseHoverType==='mouseout'"-->
          <!--            style="cursor: pointer"-->
          <!--            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"-->
          <!--            @mouseenter="mouseHoverType=$event.type"-->
          <!--          />-->
          <!--          <svg-icon-->
          <!--            v-show="mouseHoverType==='mouseenter'"-->
          <!--            style="cursor: pointer"-->
          <!--            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"-->
          <!--            @click="isExpandForm=!isExpandForm"-->
          <!--            @mouseout="mouseHoverType=$event.type"-->
          <!--          />-->
        </div>
      </div>
      <div class="elTableDiv">
@@ -81,9 +98,13 @@
            prop="description"
            label="备注"
            sortable="custom"
          />
          >
            <template slot-scope="{row}">
              {{ row.description?row.description:'/' }}
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_user"
            prop="username"
            label="创建人员"
            sortable="custom"
          />
@@ -131,7 +152,7 @@
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item icon="el-icon-circle-check" command="menuPower">菜单权限</el-dropdown-item>
                    <el-dropdown-item icon="el-icon-user" command="divideUser">分配用户</el-dropdown-item>
                    <el-dropdown-item icon="el-icon-download" command="downloadMenu">导出菜单</el-dropdown-item>
                    <!--                    <el-dropdown-item icon="el-icon-download" command="downloadMenu">导出菜单</el-dropdown-item>-->
                  </el-dropdown-menu>
                </el-dropdown>
              </div>
@@ -227,7 +248,13 @@
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button v-waves @click="dialogVisibleCancel">取 消</el-button>
          <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定</el-button>
          <el-button
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
            :disabled="$store.state.app.buttonIsDisabled"
            @click="dialogVisibleConfirm"
          >确 定</el-button>
        </div>
      </span>
    </el-dialog>
@@ -412,6 +439,7 @@
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          this.$store.state.app.buttonIsDisabled = true
          if (this.$refs.tree) {
            this.dialogForm.datapermissions = this.$refs.tree.getCheckedKeys().join(',')
          }
@@ -419,8 +447,10 @@
            if (res.code === '200') {
              this.$notify.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.dialogVisible = false
              this.$store.state.app.buttonIsDisabled = false
              this.getRoleData()
            } else {
              this.$store.state.app.buttonIsDisabled = false
              this.$notify.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
            }
          })
@@ -430,7 +460,10 @@
    handleCommand(command, row) {
      console.log(command, row)
      if (command === 'menuPower') {
        this.$router.push('./roleList?powerId=' + row.id)// demo
        this.$router.push('./powerDivider?rolecode=' + row.rolecode)
      }
      if (command === 'divideUser') {
        this.$router.push('./roleDivider?rolecode=' + row.rolecode)
      }
    },
    // 获取页面高度