feige
7 天以前 7a27d189379110ec1b9dcb356f73dcae66756ab0
src/views/archiveManager/seleUser.vue
@@ -57,12 +57,17 @@
</template>
<script>
  import {listArchiverecordstouser,addArchiverecordstouser,authRecordToUser} from "@/api/system/archiverecordstouser"
import { UserRoleIdList,unallocatedUserList, authUserSelectAll } from "@/api/system/role"
export default {
  dicts: ['sys_normal_disable'],
  props: {
    // 角色编号
    roleId: {
      type: [Number, String]
    },
    recordId: {
      type: [Number, String]
    }
  },
@@ -81,6 +86,7 @@
        pageNum: 1,
        pageSize: 10,
        roleId: undefined,
        recordId: undefined,
        userName: undefined,
        phonenumber: undefined
      }
@@ -90,6 +96,7 @@
    // 显示弹框
    show() {
      this.queryParams.roleId = this.roleId
      this.queryParams.recordId = this.recordId
      this.getList()
      this.visible = true
    },
@@ -103,6 +110,8 @@
    // 查询表数据
    getList() {
      UserRoleIdList(this.queryParams).then(res => {
        console.log("=------00000000009")
        console.log(res)
        this.userList = res.rows
        this.total = res.total
      })
@@ -119,13 +128,16 @@
    },
    /** 选择授权用户操作 */
    handleSelectUser() {
      const roleId = this.queryParams.roleId
      const recordId = this.queryParams.recordId
      const userIds = this.userIds.join(",")
      alert(recordId)
      alert(userIds)
      if (userIds == "") {
        this.$modal.msgError("请选择要分配的用户")
        return
      }
      authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
      authRecordToUser({ recordId: recordId, userIds: userIds }).then(res => {
        this.$modal.msgSuccess(res.msg)
        this.visible = false
        this.$emit("ok")