修改几个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 { showAdvancedButton, actionSpan: span, actionColOptions } = props;
const actionSpan = 24 - span; const actionSpan = 24 - span;
const advancedSpanObj = showAdvancedButton ? { span: actionSpan < 6 ? 24 : actionSpan } : {}; 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> = { const actionColOpt: Partial<ColEx> = {
style: { textAlign: 'right' }, style: { textAlign: 'right' },
...defaultSpan,
...advancedSpanObj, ...advancedSpanObj,
...actionColOptions, ...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; return actionColOpt;
}); });

View File

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

View File

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

View File

@ -17,7 +17,7 @@
<span style="margin-left: 5px">{{ ellipsisFileName }}</span> <span style="margin-left: 5px">{{ ellipsisFileName }}</span>
</a-tooltip> </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="操作"> <a-tooltip title="操作">
<Icon v-if="file.status !== 'uploading'" icon="ant-design:setting" style="cursor: pointer" /> <Icon v-if="file.status !== 'uploading'" icon="ant-design:setting" style="cursor: pointer" />
</a-tooltip> </a-tooltip>

View File

@ -9,10 +9,10 @@
</template> </template>
<template v-else-if="file['path']"> <template v-else-if="file['path']">
<template v-for="src of imgList"> <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>
</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" /> <Icon icon="ant-design:exclamation-circle" style="color: red" />
</a-tooltip> </a-tooltip>
</div> </div>
@ -38,7 +38,7 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, defineComponent } from 'vue'; import { computed, defineComponent ,unref } from 'vue';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types'; import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types';
import { useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks'; import { useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
@ -51,8 +51,14 @@
components: components, components: components,
props: useJVxeCompProps(), props: useJVxeCompProps(),
setup(props: JVxeComponent.Props) { setup(props: JVxeComponent.Props) {
const { createErrorModal } = useMessage(); const { createErrorModal } = useMessage();
const setup = useFileCell(props, UploadTypeEnum.image, { multiple: true }); 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 { innerFile, maxCount } = setup;
const imgList = computed(() => { const imgList = computed(() => {
@ -84,6 +90,7 @@
imgList, imgList,
maxCount, maxCount,
handleClickShowImageError, handleClickShowImageError,
clickEvent
}; };
}, },
// JVxeComponent.Enhanced // JVxeComponent.Enhanced

View File

@ -90,6 +90,12 @@
}) })
.map((action) => { .map((action) => {
const { popConfirm } = 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 { return {
getPopupContainer: () => unref((table as any)?.wrapRef.value) ?? document.body, getPopupContainer: () => unref((table as any)?.wrapRef.value) ?? document.body,
type: 'link', type: 'link',
@ -110,6 +116,12 @@
}); });
return list.map((action, index) => { return list.map((action, index) => {
const { label, popConfirm } = action; 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 { return {
...action, ...action,
...popConfirm, ...popConfirm,
@ -205,5 +217,10 @@
font-weight: 700; font-weight: 700;
} }
} }
&-popconfirm {
.ant-popconfirm-buttons {
min-width: 120px;
}
}
} }
</style> </style>

View File

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

View File

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

View File

@ -8,6 +8,7 @@ import { h } from 'vue';
import { useRouter, useRoute } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { useMethods } from '/@/hooks/system/useMethods'; import { useMethods } from '/@/hooks/system/useMethods';
import { importViewsFile, _eval } from '/@/utils'; import { importViewsFile, _eval } from '/@/utils';
import {getToken} from "@/utils/auth";
export function usePopBiz(ob, tableRef?) { export function usePopBiz(ob, tableRef?) {
// update-begin--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新 // update-begin--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新
@ -71,6 +72,7 @@ export function usePopBiz(ob, tableRef?) {
*/ */
const rowSelection = { const rowSelection = {
fixed: true, fixed: true,
type: props.multi ? 'checkbox' : 'radio',
selectedRowKeys: checkedKeys, selectedRowKeys: checkedKeys,
selectionRows: selectRows, selectionRows: selectRows,
onChange: onSelectChange, onChange: onSelectChange,
@ -111,6 +113,13 @@ export function usePopBiz(ob, tableRef?) {
* @param selectRow * @param selectRow
*/ */
function onSelectChange(selectedRowKeys: (string | number)[]) { 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】跨页选择导出问题 // update-begin--author:liaozhiyang---date:20230919---for【QQYUN-4263】跨页选择导出问题
if (!selectedRowKeys || selectedRowKeys.length == 0) { if (!selectedRowKeys || selectedRowKeys.length == 0) {
selectRows.value = []; selectRows.value = [];
@ -456,6 +465,11 @@ export function usePopBiz(ob, tableRef?) {
if (jsPattern.test(href)) { if (jsPattern.test(href)) {
href = href.replace(jsPattern, function (text, s0) { href = href.replace(jsPattern, function (text, s0) {
try { try {
// 支持 {{ ACCESS_TOKEN }} 占位符
if (s0.trim() === 'ACCESS_TOKEN') {
return getToken()
}
// update-begin--author:liaozhiyang---date:20230904---for【QQYUN-6390】eval替换成new Function解决build警告 // update-begin--author:liaozhiyang---date:20230904---for【QQYUN-6390】eval替换成new Function解决build警告
return _eval(s0); return _eval(s0);
// update-end--author:liaozhiyang---date:20230904---for【QQYUN-6390】eval替换成new Function解决build警告 // 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) { function clickThenCheck(record) {
if (clickThenCheckFlag === true) { 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); let rowKey = combineRowKey(record);
if (!unref(checkedKeys) || unref(checkedKeys).length == 0) { if (!unref(checkedKeys) || unref(checkedKeys).length == 0) {
let arr1: any[] = [], 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; white-space:nowrap;
} }
// update-end--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x // 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', CatTree = 'cat_tree',
//下拉搜索 //下拉搜索
SelSearch = 'search', SelSearch = 'search',
//用户选择 //用户现在
SelUser = 'sel_user', SelUser = 'sel_user',
//复选框 //复选框
Checkbox = 'checkbox', Checkbox = 'checkbox',

View File

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

View File

@ -7,7 +7,10 @@ import { useUserStore } from '/@/store/modules/user';
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
const openSso = globSetting.openSso; const openSso = globSetting.openSso;
export function useSso() { 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】登录之后直接刷新页面导致没有进入创建组织页面------------ //update-begin---author:wangshuai ---date:20230424 for【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------
if (redirect && goHome) { if (redirect && goHome) {
//update-end---author:wangshuai ---date:20230424 for【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ //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') window.open(redirect, '_self')
return data; return data;

View File

@ -33,7 +33,7 @@ export const getThirdConfigByTenantId = (params) => {
* @param params * @param params
*/ */
export const syncDingTalkDepartUserToLocal = () => { 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: {}, wrapperCol: {},
schemas: dictItemSearchFormSchema, schemas: dictItemSearchFormSchema,
autoSubmitOnEnter: true, autoSubmitOnEnter: true,
actionColOptions: {
span: 8
}
}, },
striped: true, striped: true,
useSearchForm: true, useSearchForm: true,

View File

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

View File

@ -17,7 +17,7 @@
<!--用户抽屉--> <!--用户抽屉-->
<TenantUserDrawer @register="registerDrawer" @success="handleSuccess" /> <TenantUserDrawer @register="registerDrawer" @success="handleSuccess" />
<!-- 离职受理人弹窗 --> <!-- 离职受理人弹窗 -->
<UserQuitAgentModal @register="registerQuitAgentModal" @success="reload" /> <UserQuitAgentModal @register="registerQuitAgentModal" @success="handleQuitSuccess" />
<!-- 离职人员列弹窗 --> <!-- 离职人员列弹窗 -->
<UserQuitModal @register="registerQuitModal" @success="reload" /> <UserQuitModal @register="registerQuitModal" @success="reload" />
<!-- 变更拥有者弹窗 --> <!-- 变更拥有者弹窗 -->
@ -159,7 +159,7 @@
{ {
label: '离职', label: '离职',
//update-begin---author:wangshuai---date:2023-10-25---for:QQYUN-68229.--- //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-end---author:wangshuai---date:2023-10-25---for:QQYUN-68229.---
//update-begin---author:wangshuai ---date:20230130 for[QQYUN-3974] ------------ //update-begin---author:wangshuai ---date:20230130 for[QQYUN-3974] ------------
ifShow: () =>{ ifShow: () =>{
@ -282,6 +282,21 @@
} }
//update-end---author:wangshuai ---date:20230710 forQQYUN-57234------------ //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(()=>{ onMounted(()=>{
tenantSaasMessage('租户用户') tenantSaasMessage('租户用户')
}) })

View File

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