loulijun2021
2022-07-15 869f6c069e86c2ff90393c1441854a6f05989481
src/views/jcsz/jsqd.vue
@@ -24,6 +24,7 @@
                style="width: 200px"
                placeholder="请选择"
              >
                <!--                @focus="getRoleTypeSearch2"-->
                <el-option
                  v-for="item in RoleTypeCodeArr2"
                  :key="item.roletype_code"
@@ -46,15 +47,16 @@
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-setting" @click="settingButton">设置</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          border
          stripe
          :height="tableHeight"
          :height="tableHeight+'px'"
          :style="{width: 100+'%',height:tableHeight+'px'}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
@@ -309,9 +311,10 @@
              :options="StuOrgArr"
              :props="defaultProps"
              style="width: 200px;"
              @change="dialogCascaderChange"
            />
            <!--            @focus="getUserOrganization"-->
          </el-form-item>
          <el-form-item label="关联角色">
            <el-select
@@ -506,6 +509,7 @@
} from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import $ from 'jquery'
import clearAllChildren from '@/utils/global'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -666,7 +670,7 @@
    // 获取所属组织
    async getUserOrganization() {
      const { data: res } = await UserOrganization()
      this.StuOrgArr = res
      this.StuOrgArr = clearAllChildren(res)
    },
    // 排序改变时
    sortChange({ column, prop, order }) {
@@ -951,6 +955,7 @@
      this.dialogFormUser.orgcode = ''
      this.dialogFormUser.isrole = ''
      this.$refs.dialogCascaderUser.checkedValue = ''
      this.getRoleAssociationUser()
    },
    /* 角色关联权限对话框部分*/
@@ -990,7 +995,7 @@
        pcIsSelected2 = true
        const interval = setInterval(() => {
          if ($('input:checkbox').length > 0) {
          if ($("input[name='PC']").length > 0) {
            waitFlag = true
          }
          if (waitFlag) {
@@ -1010,7 +1015,7 @@
        appIsSelected2 = true
        const interval = setInterval(() => {
          if ($('input:checkbox').length > 0) {
          if ($("input[name='APP']").length > 0) {
            waitFlag = true
          }
          if (waitFlag) {
@@ -1031,7 +1036,7 @@
        appIsSelected2 = true
        const interval = setInterval(() => {
          if ($('input:checkbox').length > 0) {
          if ($("input[name='PC']").length > 0) {
            waitFlag = true
          }
          if (waitFlag) {
@@ -1250,12 +1255,20 @@
      const currentCode = this.dialogFormRight.rightCurrentCode// 权限操作端code
      // 1.第一种情况  半叶为零  全叶为零
      if (checkedKeys.length === 0 && halfCheckedKeys.length === 0) {
        console.log('1.第一种情况  半叶为零  全叶为零')
        console.log('1.第一种情况  半叶为零  全叶为零1111')
        this.dialogFormRight.rightOperationArr.forEach((item, index) => {
          if (item.code === currentCode) {
            item.isSelected2 = false
            this.$nextTick(() => {
              $('input:checkbox').eq(index).prop('checked', false)// 自定义单选框回显
              if (item.name === 'PC') {
                $("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:checkbox').eq(index).prop('checked', false)// 自定义单选框回显
            })
          }
        })
@@ -1274,7 +1287,13 @@
          if (item.code === currentCode) {
            item.isSelected2 = true
            this.$nextTick(() => {
              $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显
              if (item.name === 'PC') {
                $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
              }
              if (item.name === 'APP') {
                $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
              }
              // $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显
            })
          }
        })
@@ -1294,7 +1313,13 @@
          if (item.code === currentCode) {
            item.isSelected2 = true
            this.$nextTick(() => {
              $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显
              if (item.name === 'PC') {
                $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
              }
              if (item.name === 'APP') {
                $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
              }
              // $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显
            })
          }
        })