loulijun2021
2022-06-22 e45cb00314d0d027996a6155d05bde749ab4acd8
src/views/jcsz/jsqd.vue
@@ -1,7 +1,8 @@
<template>
  <div>
    <div class="body" style="background-color: #ffffff;  padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}">
      <div style="height: 50px;">
    <div class="body" style="background-color: #ffffff;  padding: 20px 10px 0 20px;">
      <!--    <div class="body" style="background-color: #ffffff;  padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}">-->
      <div>
        <el-form
          ref="form"
          :model="form"
@@ -47,11 +48,12 @@
          :data="tableData"
          border
          highlight-current-row
          :style="{width: 100+'%',height:tableHeight+'px'}"
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
        >
          <!--          :style="{width: 100+'%',height:tableHeight+'px'}"-->
          <!--          <el-table-column-->
          <!--            type="selection"-->
          <!--            width="50"-->
@@ -91,6 +93,7 @@
            prop="lm_date"
            label="创建时间"
            sortable="custom"
            show-overflow-tooltip
          />
          <el-table-column
            prop="lm_date"
@@ -765,13 +768,12 @@
          AddUpdateRole(data).then(res => {
            if (res.code === '200') {
              this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.dialogVisible = false
              this.getRoleSearch()
            } else {
              this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
            }
          })
          this.dialogVisible = false
        }
      })
    },
@@ -975,7 +977,7 @@
          this.$nextTick(() => {
            $('input:checkbox').eq(0).prop('checked', true)// 自定义单选框回显
          })
        }, 1)
        }, 10)
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
      }
      // 3.第三种情况PC未选中,APP已选中
@@ -986,7 +988,7 @@
          this.$nextTick(() => {
            $('input:checkbox').eq(1).prop('checked', true)// 自定义单选框回显
          })
        }, 1)
        }, 10)
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code
      }
      // 4.第四种情况PC已选中,APP已选中
@@ -1000,7 +1002,7 @@
            $('input:checkbox').eq(0).prop('checked', true)// 自定义单选框回显
            $('input:checkbox').eq(1).prop('checked', true)// 自定义单选框回显
          })
        }, 1)
        }, 10)
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
      }
      this.dialogFormRight.rightOperationArr.push({
@@ -1043,8 +1045,12 @@
        }
      })
      this.$nextTick(() => {
        this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected)
        this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected)
        if (this.$refs.rightPCRef) {
          this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected)
        }
        if (this.$refs.rightAPPRef) {
          this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected)
        }
      })
    },
    // 分配权限关闭事件
@@ -1054,8 +1060,12 @@
      this.dialogFormRight.rightAPPArr = []
      this.dialogFormRight.rightAPPArrSelected = []
      this.dialogFormRight.rightOperationArr = []
      this.$refs.rightPCRef.setCheckedKeys([])
      this.$refs.rightAPPRef.setCheckedKeys([])
      if (this.$refs.rightPCRef) {
        this.$refs.rightPCRef.setCheckedKeys([])
      }
      if (this.$refs.rightAPPRef) {
        this.$refs.rightAPPRef.setCheckedKeys([])
      }
    },
    // 权限对话框取消事件
    rightDialogVisibleCancel() {
@@ -1071,7 +1081,7 @@
          const children = []
          let flag = false // 表示children里有值push进去了
          item.children.forEach(it => {
            if (this.dialogFormRight.rightPCArrSelected.includes(it.code)) {
            if (this.dialogFormRight.rightPCArrSelected.includes(it.code) || this.dialogFormRight.rightPCArrSelected.includes('PC')) {
              flag = true
              children.push(
                { code: it.code, name: it.name, flag: 'Y' }
@@ -1090,7 +1100,7 @@
          const children = []
          let flag = false // 表示children里有值push进去了
          item.children.forEach(it => {
            if (this.dialogFormRight.rightAPPArrSelected.includes(it.code)) {
            if (this.dialogFormRight.rightAPPArrSelected.includes(it.code) || this.dialogFormRight.rightAPPArrSelected.includes('APP')) {
              flag = true
              children.push(
                { code: it.code, name: it.name, flag: 'Y' }
@@ -1393,7 +1403,8 @@
}
::v-deep .el-input__inner {
  height: 30px
  height: 30px;
  line-height:30px;
}
::v-deep .el-table .caret-wrapper {