Merge branch 'lichang' into lite
This commit is contained in:
@@ -42,7 +42,7 @@ let queryParams = reactive({
|
||||
/**角色ID */
|
||||
roleId: roleId,
|
||||
/**是否已分配 */
|
||||
allocated: true,
|
||||
auth: true,
|
||||
/**当前页数 */
|
||||
pageNum: 1,
|
||||
/**每页条数 */
|
||||
@@ -207,8 +207,8 @@ function fnModalOk(userIds: string[] | number[]) {
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
authUserChecked({
|
||||
checked: true,
|
||||
userIds: userIds.join(','),
|
||||
roleId: roleId,
|
||||
userIds: userIds.map(v => Number(v)),
|
||||
roleId: Number(roleId),
|
||||
}).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
modalState.openBySelectUser = false;
|
||||
@@ -244,7 +244,8 @@ function fnRecordDelete(userId: string | number) {
|
||||
onOk() {
|
||||
const key = 'authUserChecked';
|
||||
message.loading({ content: t('common.loading'), key });
|
||||
authUserChecked({ checked: false, userIds: userId, roleId: roleId }).then(
|
||||
const userIds = `${userId}`.split(',').map(v => Number(v));
|
||||
authUserChecked({ checked: false, userIds, roleId: Number(roleId) }).then(
|
||||
res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
message.success({
|
||||
@@ -286,7 +287,7 @@ function fnGetList(pageNum?: number) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
authUserList(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
// 取消勾选
|
||||
if (tableState.selectedRowKeys.length > 0) {
|
||||
tableState.selectedRowKeys = [];
|
||||
@@ -294,7 +295,11 @@ function fnGetList(pageNum?: number) {
|
||||
const { total, rows } = res.data;
|
||||
tablePagination.total = total;
|
||||
tableState.data = rows;
|
||||
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
|
||||
if (
|
||||
tablePagination.total <=
|
||||
(queryParams.pageNum - 1) * tablePagination.pageSize &&
|
||||
queryParams.pageNum !== 1
|
||||
) {
|
||||
tableState.loading = false;
|
||||
fnGetList(queryParams.pageNum - 1);
|
||||
}
|
||||
@@ -346,10 +351,7 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.role.phone')"
|
||||
name="phone"
|
||||
>
|
||||
<a-form-item :label="t('views.system.role.phone')" name="phone">
|
||||
<a-input
|
||||
v-model:value="queryParams.phone"
|
||||
allow-clear
|
||||
|
||||
@@ -46,7 +46,7 @@ let queryParams = reactive({
|
||||
/**角色ID */
|
||||
roleId: props.roleId,
|
||||
/**是否已分配 */
|
||||
allocated: false,
|
||||
auth: false,
|
||||
/**当前页数 */
|
||||
pageNum: 1,
|
||||
/**每页条数 */
|
||||
|
||||
Reference in New Issue
Block a user