修改几个bug
parent
511f7b782f
commit
4d1e2c4711
|
@ -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---for:【QQYUN-6566】BasicForm支持一行显示(inline)
|
||||
const defaultSpan = props.layout == 'inline' ? {} : { span: showAdvancedButton ? 6 : 4 };
|
||||
// update-end--author:liaozhiyang---date:20240105---for:【QQYUN-6566】BasicForm支持一行显示(inline)
|
||||
const actionColOpt: Partial<ColEx> = {
|
||||
style: { textAlign: 'right' },
|
||||
...defaultSpan,
|
||||
...advancedSpanObj,
|
||||
...actionColOptions,
|
||||
};
|
||||
// update-begin--author:liaozhiyang---date:20231017---for:【QQYUN-6566】BasicForm支持一行显示(inline)
|
||||
if (props.layout !== 'inline') {
|
||||
actionColOpt['span'] = showAdvancedButton ? 6 : 4;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20231017---for:【QQYUN-6566】BasicForm支持一行显示(inline)
|
||||
|
||||
|
||||
|
||||
return actionColOpt;
|
||||
});
|
||||
|
||||
|
|
|
@ -391,10 +391,10 @@
|
|||
// update-begin--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效
|
||||
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---for:【issues-641】调整表格搜索表单的span配置无效
|
||||
const { isIfShow, isShow } = getShow();
|
||||
const values = unref(getValues);
|
||||
|
|
|
@ -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);
|
||||
// 是否根据value加载text
|
||||
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),
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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---for:【issues/953】online子表vxe-table展现形式详情图片上传可点击
|
||||
const clickEvent = computed(() => {
|
||||
return unref(setup.cellProps).disabled ? null : 'click';
|
||||
});
|
||||
// update-end--author:liaozhiyang---date:20240105---for:【issues/953】online子表vxe-table展现形式详情图片上传可点击
|
||||
const { innerFile, maxCount } = setup;
|
||||
|
||||
const imgList = computed(() => {
|
||||
|
@ -84,6 +90,7 @@
|
|||
imgList,
|
||||
maxCount,
|
||||
handleClickShowImageError,
|
||||
clickEvent
|
||||
};
|
||||
},
|
||||
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
||||
|
|
|
@ -90,6 +90,12 @@
|
|||
})
|
||||
.map((action) => {
|
||||
const { popConfirm } = action;
|
||||
// update-begin--author:liaozhiyang---date:20240105---for:【issues/951】table删除记录时按钮显示错位
|
||||
if (popConfirm) {
|
||||
const overlayClassName = popConfirm.overlayClassName;
|
||||
popConfirm.overlayClassName = `${overlayClassName ? overlayClassName : ''} ${prefixCls}-popconfirm`;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20240105---for:【issues/951】table删除记录时按钮显示错位
|
||||
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---for:【issues/951】table删除记录时按钮显示错位
|
||||
if (popConfirm) {
|
||||
const overlayClassName = popConfirm.overlayClassName;
|
||||
popConfirm.overlayClassName = `${overlayClassName ? overlayClassName : ''} ${prefixCls}-popconfirm`;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20240105---for:【issues/951】table删除记录时按钮显示错位
|
||||
return {
|
||||
...action,
|
||||
...popConfirm,
|
||||
|
@ -205,5 +217,10 @@
|
|||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
&-popconfirm {
|
||||
.ant-popconfirm-buttons {
|
||||
min-width: 120px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -28,4 +28,5 @@ export interface PopConfirm {
|
|||
cancel?: Fn;
|
||||
icon?: string;
|
||||
placement?: string;
|
||||
overlayClassName?: string;
|
||||
}
|
||||
|
|
|
@ -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[] = [],
|
||||
|
|
|
@ -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】多行文本内容过多时内容会覆盖掉清空按钮
|
||||
|
|
|
@ -18,7 +18,7 @@ export enum CompTypeEnum {
|
|||
CatTree = 'cat_tree',
|
||||
//下拉搜索
|
||||
SelSearch = 'search',
|
||||
//用户选择框
|
||||
//用户现在框
|
||||
SelUser = 'sel_user',
|
||||
//复选框
|
||||
Checkbox = 'checkbox',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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---
|
||||
|
||||
/**
|
||||
* 单点登录
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
wrapperCol: {},
|
||||
schemas: dictItemSearchFormSchema,
|
||||
autoSubmitOnEnter: true,
|
||||
actionColOptions: {
|
||||
span: 8
|
||||
}
|
||||
},
|
||||
striped: true,
|
||||
useSearchForm: true,
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
:selectedKeys="selectedKeys"
|
||||
:checkStrictly="checkStrictly"
|
||||
:clickRowToExpand="false"
|
||||
title="所拥有的权限"
|
||||
title="所拥有的的权限"
|
||||
@check="onCheck"
|
||||
@select="onTreeNodeSelect"
|
||||
>
|
||||
|
|
|
@ -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-6822】9.离职交接人选的是自己,完成之后数据没了---
|
||||
onClick: handleQuit.bind(null, record.id),
|
||||
onClick: handleQuit.bind(null,record.username, record.id),
|
||||
//update-end---author:wangshuai---date:2023-10-25---for:【QQYUN-6822】9.离职交接人选的是自己,完成之后数据没了---
|
||||
//update-begin---author:wangshuai ---date:20230130 for:[QQYUN-3974]租户的创建人 不应该有离职按钮------------
|
||||
ifShow: () =>{
|
||||
|
@ -282,6 +282,21 @@
|
|||
}
|
||||
//update-end---author:wangshuai ---date:20230710 for:【QQYUN-5723】4、显示当前登录租户------------
|
||||
|
||||
/**
|
||||
* 离职成功之后需要判断一下是否为当前用户,当前用户需要刷新浏览器
|
||||
* @param userName
|
||||
*/
|
||||
function handleQuitSuccess(userName) {
|
||||
//判断如果当前离职的是当前登录用户,需要刷新页面,便将租户id设置成null
|
||||
let username = userStore.getUserInfo.username;
|
||||
if (username && userName === username) {
|
||||
userStore.setTenant(null);
|
||||
window.location.reload();
|
||||
}else{
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
tenantSaasMessage('租户用户')
|
||||
})
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
//关闭弹窗
|
||||
closeModal();
|
||||
//刷新列表
|
||||
emit('success');
|
||||
emit('success',values.userName);
|
||||
} finally {
|
||||
setModalProps({ confirmLoading: false });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue