loulijun2021
2023-05-30 a169bda5b19db4714d2aa476504e58105228cc40
src/views/jcsz/jsqd.vue
@@ -287,7 +287,12 @@
          sortable="custom"
        >
          <template slot-scope="{row}">
            <el-input v-if="row.isVisible===1" v-model="row.roletype_code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="请输入" />
            <el-input
              v-if="row.isVisible===1"
              v-model="row.roletype_code"
              oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')"
              placeholder="请输入"
            />
            <div v-else> {{ row.roletype_code }}</div>
          </template>
        </el-table-column>
@@ -410,7 +415,7 @@
        </el-button>
      </div>
      <el-table
        ref="multipleTable"
        ref="multipleTableRef"
        :data="dialogFormUserTable"
        border
        :row-class-name="tableRowClassName"
@@ -981,7 +986,7 @@
    },
    /* 关联用户模块*/
    async  userClick(row) {
    userClick(row) {
      if (row.role_code === 'S001') {
        return this.$message.info('此角色无法操作!')
      }
@@ -995,29 +1000,31 @@
      this.userForm.roleName = row.role_name
      this.dialogFormUser.rolecode = row.role_code
      const res = await this.getRoleAssociationUser()
      if (res.code === '200') {
        setTimeout(() => {
          loading.close()
          this.userDialogVisible = true
          this.$nextTick(() => {
            this.$refs.multipleTable.doLayout()
      this.getRoleAssociationUser().then(res => {
        if (res.code === '200') {
          setTimeout(() => {
            loading.close()
            this.$nextTick(() => {
              this.$refs.multipleTableRef.doLayout()
            })
          })
        }, 1000)
      } else {
        loading.close()
      }
        } else {
          loading.close()
        }
      })
    },
    // 获取角色清单关联用户
    async getRoleAssociationUser() {
      const res = await RoleAssociationUser(this.dialogFormUser)
      this.dialogFormUserTable = res.data
      this.dialogFormUserTableLength = res.count
      this.userDialogVisible = true
      this.$nextTick(() => {
        this.dialogFormUserTable.forEach((item, index) => {
          if (item.flag === 'Y') {
            this.$refs.multipleTable.toggleRowSelection(this.dialogFormUserTable[index], true)
            this.$refs.multipleTableRef.toggleRowSelection(this.dialogFormUserTable[index], true)
          }
        })
      })
@@ -1064,7 +1071,7 @@
      this.dialogFormUser.orgcode = ''
      this.dialogFormUser.isrole = ''
      this.$refs.dialogCascaderUser.checkedValue = ''
      this.$refs.multipleTable.clearSelection()
      this.$refs.multipleTableRef.clearSelection()
    },
    // 关联用户对话框关闭
    userDialogVisibleCancel() {
@@ -1130,7 +1137,7 @@
            this.PCTrue = res.data[0][0].is_delete === '0'
            this.APPTrue = res.data[1][0].children.filter(item => item.is_delete === '0').length === 0 ? false : res.data[1][0].is_delete === '0'
            console.log(this.APPTrue, 1)
            // '0'显示  '1' 不显示   过滤出相对应的菜单
            if (this.PCTrue) {
              this.dialogFormRight.rightPCArr[0].children = this.dialogFormRight.rightPCArr[0].children.filter(item => item.is_delete === '0')
@@ -1202,13 +1209,13 @@
                pcIsSelected2 = true
                const interval = setInterval(() => {
                  if ($("input[name='PC']").length > 0) {
                  if ($('input[name=\'PC\']').length > 0) {
                    waitFlag = true
                  }
                  if (waitFlag) {
                    clearInterval(interval)
                    this.$nextTick(() => {
                      $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
                      $('input[name=\'PC\']').eq(0).prop('checked', true)// 自定义单选框回显
                    })
                  }
                }, 100)
@@ -1221,13 +1228,13 @@
                appIsSelected2 = true
                const interval = setInterval(() => {
                  if ($("input[name='APP']").length > 0) {
                  if ($('input[name=\'APP\']').length > 0) {
                    waitFlag = true
                  }
                  if (waitFlag) {
                    clearInterval(interval)
                    this.$nextTick(() => {
                      $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
                      $('input[name=\'APP\']').eq(0).prop('checked', true)// 自定义单选框回显
                    })
                  }
                }, 100)
@@ -1242,14 +1249,14 @@
                appIsSelected2 = true
                const interval = setInterval(() => {
                  if ($("input[name='PC']").length > 0) {
                  if ($('input[name=\'PC\']').length > 0) {
                    waitFlag = true
                  }
                  if (waitFlag) {
                    clearInterval(interval)
                    this.$nextTick(() => {
                      $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
                      $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
                      $('input[name=\'PC\']').eq(0).prop('checked', true)// 自定义单选框回显
                      $('input[name=\'APP\']').eq(0).prop('checked', true)// 自定义单选框回显
                    })
                  }
                }, 100)
@@ -1266,13 +1273,13 @@
                pcIsSelected2 = true
                const interval = setInterval(() => {
                  if ($("input[name='PC']").length > 0) {
                  if ($('input[name=\'PC\']').length > 0) {
                    waitFlag = true
                  }
                  if (waitFlag) {
                    clearInterval(interval)
                    this.$nextTick(() => {
                      $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
                      $('input[name=\'PC\']').eq(0).prop('checked', true)// 自定义单选框回显
                    })
                  }
                }, 100)
@@ -1288,13 +1295,13 @@
                appIsSelected2 = true
                const interval = setInterval(() => {
                  if ($("input[name='APP']").length > 0) {
                  if ($('input[name=\'APP\']').length > 0) {
                    waitFlag = true
                  }
                  if (waitFlag) {
                    clearInterval(interval)
                    this.$nextTick(() => {
                      $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
                      $('input[name=\'APP\']').eq(0).prop('checked', true)// 自定义单选框回显
                    })
                  }
                }, 100)
@@ -1550,10 +1557,10 @@
            this.$nextTick(() => {
              if (item.name === 'PC') {
                $("input[name='PC']").eq(0).prop('checked', false)// 自定义单选框回显
                $('input[name=\'PC\']').eq(0).prop('checked', false)// 自定义单选框回显
              }
              if (item.name === 'APP') {
                $("input[name='APP']").eq(0).prop('checked', false)// 自定义单选框回显
                $('input[name=\'APP\']').eq(0).prop('checked', false)// 自定义单选框回显
              }
              // $("input[name='APP']").eq(0).prop('checked', false)// 自定义单选框回显
              // $('input:checkbox').eq(index).prop('checked', false)// 自定义单选框回显
@@ -1576,10 +1583,10 @@
            item.isSelected2 = true
            this.$nextTick(() => {
              if (item.name === 'PC') {
                $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
                $('input[name=\'PC\']').eq(0).prop('checked', true)// 自定义单选框回显
              }
              if (item.name === 'APP') {
                $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
                $('input[name=\'APP\']').eq(0).prop('checked', true)// 自定义单选框回显
              }
              // $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显
            })
@@ -1602,10 +1609,10 @@
            item.isSelected2 = true
            this.$nextTick(() => {
              if (item.name === 'PC') {
                $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
                $('input[name=\'PC\']').eq(0).prop('checked', true)// 自定义单选框回显
              }
              if (item.name === 'APP') {
                $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
                $('input[name=\'APP\']').eq(0).prop('checked', true)// 自定义单选框回显
              }
              // $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显
            })
@@ -1711,10 +1718,11 @@
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--text{
  font-size: 14px ;
  cursor: pointer ;
::v-deep .el-button--text {
  font-size: 14px;
  cursor: pointer;
}
.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
  color: $main_color;
  cursor: pointer;
@@ -1803,23 +1811,25 @@
  margin-bottom: 0;
}
.tableFixed{
  ::v-deep .el-table__fixed-right{
.tableFixed {
  ::v-deep .el-table__fixed-right {
    height: 100% !important;
  }
  ::v-deep .el-table__fixed{
  ::v-deep .el-table__fixed {
    height: 100% !important;
  }
}
</style>
<style>
.osloading{
.osloading {
  font-size: 26px !important;
}
.el-loading-text{
.el-loading-text {
  font-size: 26px !important;
}
.el-table .custom-row {
  background: #f8f8fa;
}