remove all semicolons
This commit is contained in:
@@ -61,21 +61,21 @@
|
||||
</template>
|
||||
|
||||
<script setup name="SelectUser">
|
||||
import { authUserSelectAll, unallocatedUserList } from "@/api/system/role";
|
||||
import { authUserSelectAll, unallocatedUserList } from "@/api/system/role"
|
||||
|
||||
const props = defineProps({
|
||||
roleId: {
|
||||
type: [Number, String]
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
|
||||
const userList = ref([]);
|
||||
const visible = ref(false);
|
||||
const total = ref(0);
|
||||
const userIds = ref([]);
|
||||
const userList = ref([])
|
||||
const visible = ref(false)
|
||||
const total = ref(0)
|
||||
const userIds = ref([])
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNum: 1,
|
||||
@@ -83,62 +83,62 @@ const queryParams = reactive({
|
||||
roleId: undefined,
|
||||
userName: undefined,
|
||||
phonenumber: undefined
|
||||
});
|
||||
})
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
queryParams.roleId = props.roleId;
|
||||
getList();
|
||||
visible.value = true;
|
||||
queryParams.roleId = props.roleId
|
||||
getList()
|
||||
visible.value = true
|
||||
}
|
||||
|
||||
/**选择行 */
|
||||
function clickRow(row) {
|
||||
proxy.$refs["refTable"].toggleRowSelection(row);
|
||||
proxy.$refs["refTable"].toggleRowSelection(row)
|
||||
}
|
||||
|
||||
// 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
userIds.value = selection.map(item => item.userId);
|
||||
userIds.value = selection.map(item => item.userId)
|
||||
}
|
||||
|
||||
// 查询表数据
|
||||
function getList() {
|
||||
unallocatedUserList(queryParams).then(res => {
|
||||
userList.value = res.rows;
|
||||
total.value = res.total;
|
||||
});
|
||||
userList.value = res.rows
|
||||
total.value = res.total
|
||||
})
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.pageNum = 1;
|
||||
getList();
|
||||
queryParams.pageNum = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
proxy.resetForm("queryRef")
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
const emit = defineEmits(["ok"]);
|
||||
const emit = defineEmits(["ok"])
|
||||
/** 选择授权用户操作 */
|
||||
function handleSelectUser() {
|
||||
const roleId = queryParams.roleId;
|
||||
const uIds = userIds.value.join(",");
|
||||
const roleId = queryParams.roleId
|
||||
const uIds = userIds.value.join(",")
|
||||
if (uIds == "") {
|
||||
proxy.$modal.msgError("请选择要分配的用户");
|
||||
return;
|
||||
proxy.$modal.msgError("请选择要分配的用户")
|
||||
return
|
||||
}
|
||||
authUserSelectAll({ roleId: roleId, userIds: uIds }).then(res => {
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
visible.value = false;
|
||||
emit("ok");
|
||||
});
|
||||
proxy.$modal.msgSuccess(res.msg)
|
||||
visible.value = false
|
||||
emit("ok")
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user