loulijun2021
2022-07-21 63fce2b793451ee340b7a0f6e0d6ce6c2d470dd0
src/views/jcsz/jsqd.vue
@@ -54,7 +54,6 @@
        <el-table
          :data="tableData"
          border
          stripe
          :height="tableHeight+'px'"
          :style="{width: 100+'%',height:tableHeight+'px'}"
@@ -72,24 +71,29 @@
            prop="RowNum"
            width="50"
            label="序号"
            fixed
          />
          <el-table-column
            prop="role_code"
            label="角色编码"
            sortable="custom"
            min-width="110"
          />
          <el-table-column
            prop="role_name"
            label="角色名称"
            sortable="custom"
            min-width="110"
          />
          <el-table-column
            prop="roletype_name"
            label="角色类型"
            sortable="custom"
            min-width="110"
          />
          <el-table-column
            prop="description"
            min-width="160"
            label="角色描述"
            sortable="custom"
          />
@@ -97,10 +101,12 @@
            prop="lm_user"
            label="创建人员"
            sortable="custom"
            width="110"
          />
          <el-table-column
            prop="lm_date"
            label="创建时间"
            min-width="160"
            sortable="custom"
          />
          <el-table-column
@@ -127,6 +133,7 @@
          </el-table-column>
          <el-table-column
            label="操作"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
@@ -975,49 +982,24 @@
        type: ''
      }
      const { data: res } = await RoleAssociationRight(data)// 接口获取数据
      // '0'显示  '1' 不显示
      this.dialogFormRight.rightPCArr = res[0][0].is_delete === '0' ? res[0] : []
      this.dialogFormRight.rightAPPArr = res[1][0].is_delete === '0' ? res[1] : []
      this.PCTrue = res[0][0].is_delete === '0'
      this.APPTrue = res[1][0].is_delete === '0'
      // '0'显示  '1' 不显示   过滤出相对应的菜单
      if (this.PCTrue) {
        this.dialogFormRight.rightPCArr[0].children.forEach((item, index) => {
          if (item.is_delete === '1') {
            this.dialogFormRight.rightPCArr[0].children.splice(index, 1)
          } else {
            if (item.children.length > 0 && item.children) {
              item.children.forEach((it, ind) => {
                console.log(it, 9)
                console.log(it.is_delete, 9)
                if (it.is_delete === '1') {
                  item.children.splice(ind, 1)
                }
              })
            }
            if (item.children.length === 0) {
              this.dialogFormRight.rightPCArr[0].children.splice(index, 1)
            }
          }
        this.dialogFormRight.rightPCArr[0].children = this.dialogFormRight.rightPCArr[0].children.filter(item => item.is_delete === '0')
        this.dialogFormRight.rightPCArr[0].children.forEach(item => {
          item.children = item.children.filter(it => it.is_delete === '0')
        })
      }
      if (this.APPTrue) {
        this.dialogFormRight.rightAPPArr[0].children.forEach((item, index) => {
          if (item.is_delete === '1') {
            this.dialogFormRight.rightAPPArr[0].children.splice(index, 1)
          } else {
            if (item.children.length > 0 && item.children) {
              item.children.forEach((it, ind) => {
                if (it.is_delete === '1') {
                  item.children.splice(ind, 1)
                }
              })
            }
            if (item.children.length === 0) {
              this.dialogFormRight.rightAPPArr[0].children.splice(index, 1)
            }
          }
        this.dialogFormRight.rightAPPArr[0].children = this.dialogFormRight.rightAPPArr[0].children.filter(item => item.is_delete === '0')
        this.dialogFormRight.rightAPPArr[0].children.forEach(item => {
          item.children = item.children.filter(it => it.is_delete === '0')
        })
      }