loulijun2021
2022-06-27 2cb8775339209916fcc889dfa9d5ea7a9f63cd24
src/views/jcsz/jsqd.vue
@@ -17,7 +17,13 @@
              <el-input v-model="form.RoleName" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="角色类型" style=" display: flex;">
              <el-select v-model="form.RoleTypeCode" :popper-append-to-body="false" filterable style="width: 200px" placeholder="请选择">
              <el-select
                v-model="form.RoleTypeCode"
                :popper-append-to-body="false"
                filterable
                style="width: 200px"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in RoleTypeCodeArr2"
                  :key="item.roletype_code"
@@ -237,7 +243,6 @@
          </template>
        </el-table-column>
        <el-table-column label="操作">
          <template slot-scope="{row}">
            <div class="operationClass">
              <el-button v-if="row.isVisible===0" type="text" @click="delSetting(row)">删除</el-button>
@@ -245,12 +250,6 @@
              <el-button v-if="row.isVisible===1" type="text" @click="formSettingCancel(row)">取消</el-button>
            </div>
          </template>
          <!--          <template v-for="item in RoleTypeCodeArr" slot-scope="{row}">-->
          <!--            <div :key="item.roletype_code" class="operationClass">-->
          <!--              <el-button v-if="item.isVisible" type="text" @click="formSettingSave(row)">保存</el-button>-->
          <!--              <el-button v-if="item.isVisible" type="text" @click="formSettingCancel(row)">取消</el-button>-->
          <!--            </div>-->
          <!--          </template>-->
        </el-table-column>
      </el-table>
      <!--分页-->
@@ -301,6 +300,7 @@
              ref="dialogCascaderUser"
              key="cascaderKey"
              filterable
              popper-class="elCascader"
              :append-to-body="false"
              :options="StuOrgArr"
              :props="defaultProps"
@@ -838,7 +838,7 @@
      }
      const res = await RoleTypeAdd([data])
      if (res.code === '200') {
        this.$message.success('添加成功!')
        this.$message.success('保存成功!')
        await this.getRoleTypeSearch()
      }
    },
@@ -966,31 +966,51 @@
      const rightPCArrFlag = res[0][0].flag
      const rightAPPArrFlag = res[1][0].flag
      let waitFlag = false// 回显等待是否放行
      // 1.第一种情况PC和APP都一次都没选中时    PC未选中,APP未选中
      if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'N') {
        pcIsSelected1 = true
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
      }
      // 2.第二种情况PC已选中,APP未选中
      if (rightPCArrFlag === 'Y' && rightAPPArrFlag === 'N') {
        pcIsSelected1 = true
        pcIsSelected2 = true
        setTimeout(() => {
          this.$nextTick(() => {
            $('input:checkbox').eq(0).prop('checked', true)// 自定义单选框回显
          })
        const interval = setInterval(() => {
          if ($('input:checkbox').length > 0) {
            waitFlag = true
          }
          if (waitFlag) {
            clearInterval(interval)
            this.$nextTick(() => {
              $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显
            })
          }
        }, 100)
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
      }
      // 3.第三种情况PC未选中,APP已选中
      if (rightPCArrFlag === 'N' && rightAPPArrFlag === 'Y') {
        appIsSelected1 = true
        appIsSelected2 = true
        setTimeout(() => {
          this.$nextTick(() => {
            $('input:checkbox').eq(1).prop('checked', true)// 自定义单选框回显
          })
        const interval = setInterval(() => {
          if ($('input:checkbox').length > 0) {
            waitFlag = true
          }
          if (waitFlag) {
            clearInterval(interval)
            this.$nextTick(() => {
              $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显
            })
          }
        }, 100)
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code
      }
      // 4.第四种情况PC已选中,APP已选中
@@ -999,12 +1019,20 @@
        pcIsSelected2 = true
        appIsSelected1 = false
        appIsSelected2 = true
        setTimeout(() => {
          this.$nextTick(() => {
            $('input:checkbox').eq(0).prop('checked', true)// 自定义单选框回显
            $('input:checkbox').eq(1).prop('checked', true)// 自定义单选框回显
          })
        const interval = setInterval(() => {
          if ($('input:checkbox').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)// 自定义单选框回显
            })
          }
        }, 100)
        this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code
      }
      this.dialogFormRight.rightOperationArr.push({
@@ -1285,11 +1313,12 @@
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info{
::v-deep .el-button--info {
  //background-color: $main_color !important;
  height: 30px;
  display: flex;
@@ -1383,8 +1412,8 @@
    }
    input[type=checkbox]:checked::after {
      content: "✓";
      //content: "√";
      //content: "✓";
      content: "√";
      color: #fff;
      font-size: 12px;
      font-weight: bold;
@@ -1421,6 +1450,7 @@
  height: 30px;
  line-height: 30px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
@@ -1483,28 +1513,55 @@
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-divider{
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item{
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus{
::v-deep .el-select .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected{
::v-deep .el-select-dropdown__item.selected {
  color: $main_color;
}
::v-deep .el-textarea__inner:focus{
::v-deep .el-textarea__inner:focus {
  border-color: $main_color;
}
</style>
<style lang="scss">
.elCascader {
  //.el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path {
  //  color: #42b983 ;
  //}
  .el-cascader-node.is-selectable.in-checked-path {
    color: #42b983;
  }
  .el-radio__input.is-checked .el-radio__inner {
    background-color: #42b983;
    border-color: #42b983;
  }
  .el-radio__input.is-checked .el-radio__inner:hover {
    border-color: #42b983;
  }
  .el-input__inner {
    border-color: #42b983 !important;
  }
}
</style>