修改几个bug

pull/998/head^2
zhangdaiscott 2024-01-07 17:11:30 +08:00
parent 511f7b782f
commit 4d1e2c4711
19 changed files with 146 additions and 30 deletions

View File

@ -75,16 +75,18 @@
const { showAdvancedButton, actionSpan: span, actionColOptions } = props;
const actionSpan = 24 - span;
const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {};
// update-begin--author:liaozhiyang---date:20240105---forQQYUN-6566BasicForm(inline)
const defaultSpan = props.layout == 'inline' ? {} : { span: showAdvancedButton ? 6 : 4 };
// update-end--author:liaozhiyang---date:20240105---forQQYUN-6566BasicForm(inline)
const actionColOpt: Partial<ColEx> = {
style: { textAlign: 'right' },
...defaultSpan,
...advancedSpanObj,
...actionColOptions,
};
// update-begin--author:liaozhiyang---date:20231017---forQQYUN-6566BasicForm(inline)
if (props.layout !== 'inline') {
actionColOpt['span'] = showAdvancedButton ? 6 : 4;
}
// update-end--author:liaozhiyang---date:20231017---forQQYUN-6566BasicForm(inline)
return actionColOpt;
});

View File

@ -391,10 +391,10 @@
// update-begin--author:liaozhiyang---date:20230803---forissues-641span
const { getIsMobile } = useAppInject();
let realColProps;
if (colProps['span'] && !unref(getIsMobile)) {
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach((name) => delete baseColProps[name]);
}
realColProps = { ...baseColProps, ...colProps };
if (colProps['span'] && !unref(getIsMobile)) {
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach((name) => delete realColProps[name]);
}
// update-end--author:liaozhiyang---date:20230803---forissues-641span
const { isIfShow, isShow } = getShow();
const values = unref(getValues);

View File

@ -9,7 +9,7 @@
allowClear
:getPopupContainer="getParentContainer"
:placeholder="placeholder"
:filterOption="false"
:filterOption="isDictTable ? false : filterOption"
:notFoundContent="loading ? undefined : null"
@search="loadData"
@change="handleAsyncChange"
@ -91,12 +91,29 @@
const lastLoad = ref(0);
// valuetext
const loadSelectText = ref(true);
//
const isDictTable = computed(() => {
if (props.dict) {
return props.dict.split(',').length >= 2
}
return false;
})
/**
* 监听字典code
*/
watchEffect(() => {
props.dict && initDictData();
});
watch(() => props.dict, () => {
if (!props.dict) {
return
}
if (isDictTable.value) {
initDictTableData();
} else {
initDictCodeData();
}
}, {immediate: true});
/**
* 监听value
*/
@ -128,6 +145,9 @@
* 异步查询数据
*/
async function loadData(value) {
if (!isDictTable.value) {
return;
}
lastLoad.value += 1;
const currentLoad = unref(lastLoad);
options.value = [];
@ -190,7 +210,7 @@
/**
* 初始化字典下拉数据
*/
async function initDictData() {
async function initDictTableData() {
let { dict, async, dictOptions, pageSize } = props;
if (!async) {
//
@ -233,6 +253,14 @@
}
}
}
/**
* 查询数据字典
*/
async function initDictCodeData() {
options.value = await initDictOptions(props.dict);
}
/**
* 同步改变事件
* */
@ -316,6 +344,7 @@
attrs,
options,
loading,
isDictTable,
selectedValue,
selectedAsyncValue,
loadData: useDebounceFn(loadData, 800),

View File

@ -17,7 +17,7 @@
<span style="margin-left: 5px">{{ ellipsisFileName }}</span>
</a-tooltip>
<Dropdown :trigger="['click']" placement="bottomRight" style="margin-left: 10px">
<Dropdown :trigger="['click']" placement="bottomRight" style="margin-left: 10px" :disabled="cellProps.disabled">
<a-tooltip title="操作">
<Icon v-if="file.status !== 'uploading'" icon="ant-design:setting" style="cursor: pointer" />
</a-tooltip>

View File

@ -9,10 +9,10 @@
</template>
<template v-else-if="file['path']">
<template v-for="src of imgList">
<img class="j-vxe-image" :src="src" alt="图片错误" @click="handleMoreOperation" />
<img class="j-vxe-image" :src="src" alt="图片错误" @[clickEvent]="handleMoreOperation" />
</template>
</template>
<a-tooltip v-else :title="file.message || '上传失败'" @click="handleClickShowImageError">
<a-tooltip v-else :title="file.message || '上传失败'" @[clickEvent]="handleClickShowImageError">
<Icon icon="ant-design:exclamation-circle" style="color: red" />
</a-tooltip>
</div>
@ -38,7 +38,7 @@
</div>
</template>
<script lang="ts">
import { computed, defineComponent } from 'vue';
import { computed, defineComponent ,unref } from 'vue';
import { useMessage } from '/@/hooks/web/useMessage';
import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types';
import { useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
@ -51,8 +51,14 @@
components: components,
props: useJVxeCompProps(),
setup(props: JVxeComponent.Props) {
const { createErrorModal } = useMessage();
const setup = useFileCell(props, UploadTypeEnum.image, { multiple: true });
// update-begin--author:liaozhiyang---date:20240105---forissues/953onlinevxe-table
const clickEvent = computed(() => {
return unref(setup.cellProps).disabled ? null : 'click';
});
// update-end--author:liaozhiyang---date:20240105---forissues/953onlinevxe-table
const { innerFile, maxCount } = setup;
const imgList = computed(() => {
@ -84,6 +90,7 @@
imgList,
maxCount,
handleClickShowImageError,
clickEvent
};
},
// JVxeComponent.Enhanced

View File

@ -90,6 +90,12 @@
})
.map((action) => {
const { popConfirm } = action;
// update-begin--author:liaozhiyang---date:20240105---forissues/951table
if (popConfirm) {
const overlayClassName = popConfirm.overlayClassName;
popConfirm.overlayClassName = `${overlayClassName ? overlayClassName : ''} ${prefixCls}-popconfirm`;
}
// update-end--author:liaozhiyang---date:20240105---forissues/951table
return {
getPopupContainer: () => unref((table as any)?.wrapRef.value) ?? document.body,
type: 'link',
@ -110,6 +116,12 @@
});
return list.map((action, index) => {
const { label, popConfirm } = action;
// update-begin--author:liaozhiyang---date:20240105---forissues/951table
if (popConfirm) {
const overlayClassName = popConfirm.overlayClassName;
popConfirm.overlayClassName = `${overlayClassName ? overlayClassName : ''} ${prefixCls}-popconfirm`;
}
// update-end--author:liaozhiyang---date:20240105---forissues/951table
return {
...action,
...popConfirm,
@ -205,5 +217,10 @@
font-weight: 700;
}
}
&-popconfirm {
.ant-popconfirm-buttons {
min-width: 120px;
}
}
}
</style>

View File

@ -1,6 +1,6 @@
import type { BasicColumn } from '/@/components/Table/src/types/table';
import { h, Ref } from 'vue';
import { h, Ref, toRaw } from 'vue';
import EditableCell from './EditableCell.vue';
import { isArray } from '/@/utils/is';
@ -13,7 +13,7 @@ interface Params {
export function renderEditCell(column: BasicColumn) {
return ({ text: value, record, index }: Params) => {
record.onValid = async () => {
toRaw(record).onValid = async () => {
if (isArray(record?.validCbs)) {
const validFns = (record?.validCbs || []).map((fn) => fn());
const res = await Promise.all(validFns);
@ -23,7 +23,7 @@ export function renderEditCell(column: BasicColumn) {
}
};
record.onEdit = async (edit: boolean, submit = false) => {
toRaw(record).onEdit = async (edit: boolean, submit = false) => {
if (!submit) {
record.editable = edit;
}

View File

@ -28,4 +28,5 @@ export interface PopConfirm {
cancel?: Fn;
icon?: string;
placement?: string;
overlayClassName?: string;
}

View File

@ -8,6 +8,7 @@ import { h } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { useMethods } from '/@/hooks/system/useMethods';
import { importViewsFile, _eval } from '/@/utils';
import {getToken} from "@/utils/auth";
export function usePopBiz(ob, tableRef?) {
// update-begin--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新
@ -71,6 +72,7 @@ export function usePopBiz(ob, tableRef?) {
*/
const rowSelection = {
fixed: true,
type: props.multi ? 'checkbox' : 'radio',
selectedRowKeys: checkedKeys,
selectionRows: selectRows,
onChange: onSelectChange,
@ -111,6 +113,13 @@ export function usePopBiz(ob, tableRef?) {
* @param selectRow
*/
function onSelectChange(selectedRowKeys: (string | number)[]) {
// update-begin--author:liaozhiyang---date:20240105---for【QQYUN-7514】popup单选显示radio
if (!props.multi) {
selectRows.value = [];
checkedKeys.value = [];
selectedRowKeys = [selectedRowKeys[selectedRowKeys.length - 1]];
}
// update-end--author:liaozhiyang---date:20240105---for【QQYUN-7514】popup单选显示radio
// update-begin--author:liaozhiyang---date:20230919---for【QQYUN-4263】跨页选择导出问题
if (!selectedRowKeys || selectedRowKeys.length == 0) {
selectRows.value = [];
@ -456,6 +465,11 @@ export function usePopBiz(ob, tableRef?) {
if (jsPattern.test(href)) {
href = href.replace(jsPattern, function (text, s0) {
try {
// 支持 {{ ACCESS_TOKEN }} 占位符
if (s0.trim() === 'ACCESS_TOKEN') {
return getToken()
}
// update-begin--author:liaozhiyang---date:20230904---for【QQYUN-6390】eval替换成new Function解决build警告
return _eval(s0);
// update-end--author:liaozhiyang---date:20230904---for【QQYUN-6390】eval替换成new Function解决build警告
@ -713,6 +727,12 @@ export function usePopBiz(ob, tableRef?) {
*/
function clickThenCheck(record) {
if (clickThenCheckFlag === true) {
// update-begin--author:liaozhiyang---date:20240104---for【QQYUN-7514】popup单选显示radio
if (!props.multi) {
selectRows.value = [];
checkedKeys.value = [];
}
// update-end--author:liaozhiyang---date:20240104---for【QQYUN-7514】popup单选显示radio
let rowKey = combineRowKey(record);
if (!unref(checkedKeys) || unref(checkedKeys).length == 0) {
let arr1: any[] = [],

View File

@ -125,3 +125,16 @@ html[data-theme='dark'] .ant-table-wrapper .ant-table-thead >tr>th, .ant-table-w
white-space:nowrap;
}
// update-end--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
// update-end--author:liaozhiyang---date:20230105---for【QQYUN-7493】多行文本内容过多时内容会覆盖掉清空按钮
.ant-input-affix-wrapper-textarea-with-clear-btn {
.ant-input-clear-icon {
background-color: #fff;
}
}
html[data-theme='dark'] .ant-input-affix-wrapper-textarea-with-clear-btn {
.ant-input-clear-icon {
background-color: #141414;
}
}
// update-end--author:liaozhiyang---date:20230105---for【QQYUN-7493】多行文本内容过多时内容会覆盖掉清空按钮

View File

@ -18,7 +18,7 @@ export enum CompTypeEnum {
CatTree = 'cat_tree',
//下拉搜索
SelSearch = 'search',
//用户选择
//用户现在
SelUser = 'sel_user',
//复选框
Checkbox = 'checkbox',

View File

@ -9,7 +9,7 @@ export enum ResultEnum {
}
/**
* @description: Request method
* @description: request method
*/
export enum RequestEnum {
GET = 'GET',
@ -19,7 +19,7 @@ export enum RequestEnum {
}
/**
* @description: Content type
* @description: contentTyp
*/
export enum ContentTypeEnum {
// json
@ -32,7 +32,7 @@ export enum ContentTypeEnum {
/**
* header
* @description: Request header
* @description: contentTyp
*/
export enum ConfigEnum {
// TOKEN

View File

@ -7,7 +7,10 @@ import { useUserStore } from '/@/store/modules/user';
const globSetting = useGlobSetting();
const openSso = globSetting.openSso;
export function useSso() {
let locationUrl = 'http://' + window.location.host + '/';
//update-begin---author:wangshuai---date:2024-01-03---for:【QQYUN-7805】SSO登录强制用http #957---
let locationUrl = document.location.protocol +"//" + window.location.host + '/';
//update-end---author:wangshuai---date:2024-01-03---for:【QQYUN-7805】SSO登录强制用http #957---
/**
*
*/

View File

@ -188,6 +188,12 @@ export const useUserStore = defineStore({
//update-begin---author:wangshuai ---date:20230424 for【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
if (redirect && goHome) {
//update-end---author:wangshuai ---date:20230424 for【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
// update-begin--author:liaozhiyang---date:20240104---for【QQYUN-7804】部署生产环境登录跳转404问题
const publicPath = import.meta.env.VITE_PUBLIC_PATH;
if (publicPath && publicPath != '/') {
redirect = publicPath + redirect;
}
// update-end--author:liaozhiyang---date:20240104---for【QQYUN-7804】部署生产环境登录跳转404问题
// 当前页面打开
window.open(redirect, '_self')
return data;

View File

@ -33,7 +33,7 @@ export const getThirdConfigByTenantId = (params) => {
* @param params
*/
export const syncDingTalkDepartUserToLocal = () => {
return defHttp.get({ url: Api.syncDingTalkDepartUserToLocal }, { isTransformResponse: false });
return defHttp.get({ url: Api.syncDingTalkDepartUserToLocal, timeout: 60000 }, { isTransformResponse: false });
};
/**

View File

@ -63,6 +63,9 @@
wrapperCol: {},
schemas: dictItemSearchFormSchema,
autoSubmitOnEnter: true,
actionColOptions: {
span: 8
}
},
striped: true,
useSearchForm: true,

View File

@ -27,7 +27,7 @@
:selectedKeys="selectedKeys"
:checkStrictly="checkStrictly"
:clickRowToExpand="false"
title="所拥有的权限"
title="所拥有的权限"
@check="onCheck"
@select="onTreeNodeSelect"
>

View File

@ -17,7 +17,7 @@
<!--用户抽屉-->
<TenantUserDrawer @register="registerDrawer" @success="handleSuccess" />
<!-- 离职受理人弹窗 -->
<UserQuitAgentModal @register="registerQuitAgentModal" @success="reload" />
<UserQuitAgentModal @register="registerQuitAgentModal" @success="handleQuitSuccess" />
<!-- 离职人员列弹窗 -->
<UserQuitModal @register="registerQuitModal" @success="reload" />
<!-- 变更拥有者弹窗 -->
@ -159,7 +159,7 @@
{
label: '离职',
//update-begin---author:wangshuai---date:2023-10-25---for:QQYUN-68229.---
onClick: handleQuit.bind(null, record.id),
onClick: handleQuit.bind(null,record.username, record.id),
//update-end---author:wangshuai---date:2023-10-25---for:QQYUN-68229.---
//update-begin---author:wangshuai ---date:20230130 for[QQYUN-3974] ------------
ifShow: () =>{
@ -282,6 +282,21 @@
}
//update-end---author:wangshuai ---date:20230710 forQQYUN-57234------------
/**
* 离职成功之后需要判断一下是否为当前用户当前用户需要刷新浏览器
* @param userName
*/
function handleQuitSuccess(userName) {
//便idnull
let username = userStore.getUserInfo.username;
if (username && userName === username) {
userStore.setTenant(null);
window.location.reload();
}else{
reload();
}
}
onMounted(()=>{
tenantSaasMessage('租户用户')
})

View File

@ -58,7 +58,7 @@
//
closeModal();
//
emit('success');
emit('success',values.userName);
} finally {
setModalProps({ confirmLoading: false });
}