loulijun2021
2022-08-05 d33eacc1f85ac3a736b33ba4713a19aae466d711
src/views/jcsz/yhqd.vue
@@ -189,12 +189,13 @@
          >
            <template slot-scope="{row}">
              <i v-if="row.is_role==='Y'" class="el-icon-share" @click="roleClick({row})" />
              <i v-if="row.is_role==='N'" class="el-icon-share" style="color: #E4E7ED" @click="roleClick({row})" />
              <i v-if="row.is_role==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="roleClick({row})" />
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            fixed="right"
            width="120"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
@@ -318,8 +319,8 @@
      title="关联角色"
      :visible.sync="dialogVisibleRoles"
      width="800px"
      top="15vh"
      :fullscreen="isFullscreen"
      :top="isIpad?'3vh':'15vh'"
      :fullscreen="isIpad"
      :close-on-click-modal="false"
      class="dialogVisibleRoles"
      @closed="handleCloseRoles"
@@ -550,7 +551,7 @@
    }
    return {
      isFullscreen: false,
      isIpad: false,
      mainHeight: 0,
      tableHeight: 0,
      form: {
@@ -653,25 +654,42 @@
        prop: 'group_code',
        order: 'desc'
      },
      title_value: '数据导入 / 用户清单',
      code: '1',
      code: '2',
      shows: false
    }
  },
  created() {
    this.getUserSearch()
    this.getUserOrganization()
  watch: {
    shows() {
      if (!this.shows) {
        this.getUserSearch()
      }
    }
  },
  created() {
    this.handleRequest()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    handleRequest() {
      this.getUserSearch().then(res => {
        if (res.code === '200') {
          this.getUserOrganization()
        }
      })
    },
    // 获取用户清单
    async getUserSearch() {
      const res = await UserSearch(this.form)
      this.tableData = res.data
      this.total = res.count
      return { code: res.code }
    },
    // 获取所属组织
    async getUserOrganization() {
@@ -828,15 +846,13 @@
    },
    // 获取页面高度
    getHeight() {
      console.log(window.innerHeight)
      console.log(window.innerWidth)
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 100
        // this.isFullscreen = window.innerHeight < 800
        if (window.innerHeight < 800) {
        this.tableHeight = this.mainHeight - 50
        if (window.innerHeight < 769) {
          this.tableHeight = this.tableHeight - 50
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
      })
    },
    // 关联角色点击事件