Merge branch 'master' into sas
commit
52534d92c2
|
@ -24,7 +24,7 @@
|
||||||
"@jeecg/online": "3.6.2-beta",
|
"@jeecg/online": "3.6.2-beta",
|
||||||
"@iconify/iconify": "^3.1.1",
|
"@iconify/iconify": "^3.1.1",
|
||||||
"@ant-design/colors": "^7.0.0",
|
"@ant-design/colors": "^7.0.0",
|
||||||
"@ant-design/icons-vue": "^6.1.0",
|
"@ant-design/icons-vue": "^7.0.1",
|
||||||
"@logicflow/core": "^1.2.12",
|
"@logicflow/core": "^1.2.12",
|
||||||
"@logicflow/extension": "^1.2.13",
|
"@logicflow/extension": "^1.2.13",
|
||||||
"@vue/runtime-core": "^3.3.4",
|
"@vue/runtime-core": "^3.3.4",
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
"@vueuse/core": "^10.4.1",
|
"@vueuse/core": "^10.4.1",
|
||||||
"@tinymce/tinymce-vue": "^4.0.7",
|
"@tinymce/tinymce-vue": "^4.0.7",
|
||||||
"@zxcvbn-ts/core": "^3.0.3",
|
"@zxcvbn-ts/core": "^3.0.3",
|
||||||
"ant-design-vue": "^4.0.6",
|
"ant-design-vue": "^4.0.8",
|
||||||
"axios": "^1.5.0",
|
"axios": "^1.5.0",
|
||||||
"china-area-data": "^5.0.1",
|
"china-area-data": "^5.0.1",
|
||||||
"clipboard": "^2.0.11",
|
"clipboard": "^2.0.11",
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"tinymce": "^6.6.2",
|
"tinymce": "^6.6.2",
|
||||||
"vditor": "^3.9.5",
|
"vditor": "^3.9.5",
|
||||||
"vue": "^3.3.4",
|
"vue": "3.3.11",
|
||||||
"vue-cropper": "^0.6.2",
|
"vue-cropper": "^0.6.2",
|
||||||
"vue-cropperjs": "^5.0.0",
|
"vue-cropperjs": "^5.0.0",
|
||||||
"vue-i18n": "9.2.2",
|
"vue-i18n": "9.2.2",
|
||||||
|
|
19230
pnpm-lock.yaml
19230
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -30,30 +30,13 @@
|
||||||
|
|
||||||
// get inherit binding value
|
// get inherit binding value
|
||||||
const getBindValues = computed(() => {
|
const getBindValues = computed(() => {
|
||||||
// update-begin--author:liaozhiyang---date:20231228---for:【issues/936】表格操作栏删除当接口失败时,气泡确认框不会消失
|
return Object.assign(
|
||||||
const result: any = Object.assign(
|
|
||||||
{
|
{
|
||||||
okText: t('common.okText'),
|
okText: t('common.okText'),
|
||||||
cancelText: t('common.cancelText'),
|
cancelText: t('common.cancelText'),
|
||||||
},
|
},
|
||||||
{ ...props, ...unref(attrs) }
|
{ ...props, ...unref(attrs) }
|
||||||
);
|
);
|
||||||
if (result.onConfirm) {
|
|
||||||
const confirm = result.confirm;
|
|
||||||
result.onConfirm = () => {
|
|
||||||
return new Promise<void>((resolve) => {
|
|
||||||
confirm()
|
|
||||||
?.finally(() => {
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
// update-end--author:liaozhiyang---date:20231228---for:【issues/936】表格操作栏删除当接口失败时,气泡确认框不会消失
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|
|
@ -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---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> = {
|
const actionColOpt: Partial<ColEx> = {
|
||||||
style: { textAlign: 'right' },
|
style: { textAlign: 'right' },
|
||||||
|
...defaultSpan,
|
||||||
...advancedSpanObj,
|
...advancedSpanObj,
|
||||||
...actionColOptions,
|
...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;
|
return actionColOpt;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -391,10 +391,10 @@
|
||||||
// update-begin--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效
|
// update-begin--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效
|
||||||
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---for:【issues-641】调整表格搜索表单的span配置无效
|
// update-end--author:liaozhiyang---date:20230803---for:【issues-641】调整表格搜索表单的span配置无效
|
||||||
const { isIfShow, isShow } = getShow();
|
const { isIfShow, isShow } = getShow();
|
||||||
const values = unref(getValues);
|
const values = unref(getValues);
|
||||||
|
|
|
@ -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);
|
||||||
// 是否根据value加载text
|
// 是否根据value加载text
|
||||||
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),
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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---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 { innerFile, maxCount } = setup;
|
||||||
|
|
||||||
const imgList = computed(() => {
|
const imgList = computed(() => {
|
||||||
|
@ -84,6 +90,7 @@
|
||||||
imgList,
|
imgList,
|
||||||
maxCount,
|
maxCount,
|
||||||
handleClickShowImageError,
|
handleClickShowImageError,
|
||||||
|
clickEvent
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
// 【组件增强】注释详见:JVxeComponent.Enhanced
|
||||||
|
|
|
@ -90,13 +90,21 @@
|
||||||
})
|
})
|
||||||
.map((action) => {
|
.map((action) => {
|
||||||
const { popConfirm } = 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 {
|
return {
|
||||||
getPopupContainer: () => unref((table as any)?.wrapRef.value) ?? document.body,
|
getPopupContainer: () => unref((table as any)?.wrapRef.value) ?? document.body,
|
||||||
type: 'link',
|
type: 'link',
|
||||||
size: 'small',
|
size: 'small',
|
||||||
...action,
|
...action,
|
||||||
...(popConfirm || {}),
|
...(popConfirm || {}),
|
||||||
onConfirm: popConfirm?.confirm,
|
// update-begin--author:liaozhiyang---date:20240108---for:【issues/936】表格操作栏删除当接口失败时,气泡确认框不会消失
|
||||||
|
onConfirm: handelConfirm(popConfirm?.confirm),
|
||||||
|
// update-end--author:liaozhiyang---date:20240108---for:【issues/936】表格操作栏删除当接口失败时,气泡确认框不会消失
|
||||||
onCancel: popConfirm?.cancel,
|
onCancel: popConfirm?.cancel,
|
||||||
enable: !!popConfirm,
|
enable: !!popConfirm,
|
||||||
};
|
};
|
||||||
|
@ -110,17 +118,52 @@
|
||||||
});
|
});
|
||||||
return list.map((action, index) => {
|
return list.map((action, index) => {
|
||||||
const { label, popConfirm } = action;
|
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删除记录时按钮显示错位
|
||||||
|
// update-begin--author:liaozhiyang---date:20240108---for:【issues/936】表格操作栏删除当接口失败时,气泡确认框不会消失
|
||||||
|
if (popConfirm) {
|
||||||
|
popConfirm.confirm = handelConfirm(popConfirm?.confirm);
|
||||||
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20240108---for:【issues/936】表格操作栏删除当接口失败时,气泡确认框不会消失
|
||||||
return {
|
return {
|
||||||
...action,
|
...action,
|
||||||
...popConfirm,
|
...popConfirm,
|
||||||
onConfirm: popConfirm?.confirm,
|
onConfirm: handelConfirm(popConfirm?.confirm),
|
||||||
onCancel: popConfirm?.cancel,
|
onCancel: popConfirm?.cancel,
|
||||||
text: label,
|
text: label,
|
||||||
divider: index < list.length - 1 ? props.divider : false,
|
divider: index < list.length - 1 ? props.divider : false,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
/*
|
||||||
|
2023-01-08
|
||||||
|
liaozhiyang
|
||||||
|
给传进来的函数包一层promise
|
||||||
|
*/
|
||||||
|
const handelConfirm = (fn) => {
|
||||||
|
if (typeof fn !== 'function') return fn;
|
||||||
|
const anyc = () => {
|
||||||
|
return new Promise<void>((resolve) => {
|
||||||
|
const result = fn();
|
||||||
|
if (Object.prototype.toString.call(result) === '[object Promise]') {
|
||||||
|
result
|
||||||
|
.finally(() => {
|
||||||
|
resolve();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return anyc;
|
||||||
|
};
|
||||||
const getDropdownSlotList = computed((): any[] => {
|
const getDropdownSlotList = computed((): any[] => {
|
||||||
return unref(getDropdownList).filter((item) => item.slot);
|
return unref(getDropdownList).filter((item) => item.slot);
|
||||||
});
|
});
|
||||||
|
@ -205,5 +248,10 @@
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-popconfirm {
|
||||||
|
.ant-popconfirm-buttons {
|
||||||
|
min-width: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,5 @@ export interface PopConfirm {
|
||||||
cancel?: Fn;
|
cancel?: Fn;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
placement?: string;
|
placement?: string;
|
||||||
|
overlayClassName?: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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[] = [],
|
||||||
|
|
|
@ -125,3 +125,38 @@ 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】多行文本内容过多时内容会覆盖掉清空按钮
|
||||||
|
|
||||||
|
// update-begin--author:liaozhiyang---date:20230108---for:【QQYUN-7855】table页码同步3.x页面效果
|
||||||
|
.ant-table-pagination.ant-pagination {
|
||||||
|
.ant-pagination-item-active,
|
||||||
|
.ant-pagination-item-active:hover {
|
||||||
|
background-color: @primary-color;
|
||||||
|
border-color: transparent;
|
||||||
|
a {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ant-pagination-item:not(.ant-pagination-item-active) {
|
||||||
|
background-color: transparent !important;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
.ant-pagination-prev,
|
||||||
|
.ant-pagination-next,
|
||||||
|
.ant-pagination-item {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20230108---for:【QQYUN-7855】table页码同步3.x页面效果
|
|
@ -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',
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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---
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单点登录
|
* 单点登录
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -189,6 +189,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;
|
||||||
|
|
|
@ -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 });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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"
|
||||||
>
|
>
|
||||||
|
|
|
@ -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-6822】9.离职交接人选的是自己,完成之后数据没了---
|
//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-end---author:wangshuai---date:2023-10-25---for:【QQYUN-6822】9.离职交接人选的是自己,完成之后数据没了---
|
||||||
//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 for:【QQYUN-5723】4、显示当前登录租户------------
|
//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(()=>{
|
onMounted(()=>{
|
||||||
tenantSaasMessage('租户用户')
|
tenantSaasMessage('租户用户')
|
||||||
})
|
})
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
//关闭弹窗
|
//关闭弹窗
|
||||||
closeModal();
|
closeModal();
|
||||||
//刷新列表
|
//刷新列表
|
||||||
emit('success');
|
emit('success',values.userName);
|
||||||
} finally {
|
} finally {
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
}
|
}
|
||||||
|
|
105
vite.config.ts
105
vite.config.ts
|
@ -87,15 +87,10 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
'antd-vue-vendor': ['ant-design-vue','@ant-design/icons-vue','@ant-design/colors'],
|
'antd-vue-vendor': ['ant-design-vue','@ant-design/icons-vue','@ant-design/colors'],
|
||||||
'vxe-table-vendor': ['vxe-table','vxe-table-plugin-antd','xe-utils'],
|
'vxe-table-vendor': ['vxe-table','vxe-table-plugin-antd','xe-utils'],
|
||||||
'codemirror-vendor': ['codemirror'],
|
'codemirror-vendor': ['codemirror'],
|
||||||
//'emoji-mart-vue-fast': ['emoji-mart-vue-fast'],
|
|
||||||
'jeecg-online-vendor': ['@jeecg/online'],
|
'jeecg-online-vendor': ['@jeecg/online'],
|
||||||
// 将 Lodash 库的代码单独打包
|
|
||||||
'lodash-es-vendor': ['lodash-es'],
|
|
||||||
// vue vue-router合并打包
|
|
||||||
vue: ['vue', 'vue-router'],
|
|
||||||
'cron-parser-vendor': ['cron-parser'],
|
'cron-parser-vendor': ['cron-parser'],
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 关闭brotliSize显示可以稍微减少打包时间
|
// 关闭brotliSize显示可以稍微减少打包时间
|
||||||
reportCompressedSize: false,
|
reportCompressedSize: false,
|
||||||
|
@ -132,104 +127,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
//升级vite4后,需要排除online依赖
|
//升级vite4后,需要排除online依赖
|
||||||
'@jeecg/online',
|
'@jeecg/online',
|
||||||
],
|
],
|
||||||
// 提前预加载依赖,缩短首屏访问时间
|
|
||||||
include: [
|
|
||||||
'@vue/runtime-core',
|
|
||||||
'@vue/shared',
|
|
||||||
'@iconify/iconify',
|
|
||||||
'ant-design-vue/es/locale/zh_CN',
|
|
||||||
'ant-design-vue/es/locale/en_US',
|
|
||||||
'@ant-design/colors',
|
|
||||||
'@ant-design/icons-vue',
|
|
||||||
'@vueuse/core',
|
|
||||||
'@vueuse/shared',
|
|
||||||
'@zxcvbn-ts/core',
|
|
||||||
'ant-design-vue',
|
|
||||||
'axios',
|
|
||||||
'china-area-data',
|
|
||||||
'clipboard',
|
|
||||||
'codemirror',
|
|
||||||
'codemirror/addon/fold/brace-fold.js',
|
|
||||||
'codemirror/addon/fold/comment-fold.js',
|
|
||||||
'codemirror/addon/fold/foldcode.js',
|
|
||||||
'codemirror/addon/fold/foldgutter.js',
|
|
||||||
'codemirror/addon/fold/indent-fold.js',
|
|
||||||
'codemirror/addon/hint/anyword-hint.js',
|
|
||||||
'codemirror/addon/hint/show-hint.js',
|
|
||||||
'codemirror/addon/selection/active-line.js',
|
|
||||||
'codemirror/mode/clike/clike.js',
|
|
||||||
'codemirror/mode/css/css.js',
|
|
||||||
'codemirror/mode/javascript/javascript.js',
|
|
||||||
'codemirror/mode/markdown/markdown.js',
|
|
||||||
'codemirror/mode/python/python.js',
|
|
||||||
'codemirror/mode/r/r.js',
|
|
||||||
'codemirror/mode/shell/shell.js',
|
|
||||||
'codemirror/mode/sql/sql.js',
|
|
||||||
'codemirror/mode/swift/swift.js',
|
|
||||||
'codemirror/mode/vue/vue.js',
|
|
||||||
'codemirror/mode/xml/xml.js',
|
|
||||||
'cron-parser',
|
|
||||||
'cropperjs',
|
|
||||||
'crypto-js/aes',
|
|
||||||
'crypto-js/enc-base64',
|
|
||||||
'crypto-js/enc-utf8',
|
|
||||||
'crypto-js/md5',
|
|
||||||
'crypto-js/mode-ecb',
|
|
||||||
'crypto-js/pad-pkcs7',
|
|
||||||
'dom-align',
|
|
||||||
'echarts',
|
|
||||||
'echarts/charts',
|
|
||||||
'echarts/components',
|
|
||||||
'echarts/core',
|
|
||||||
'echarts/renderers',
|
|
||||||
'emoji-mart-vue-fast/src',
|
|
||||||
'intro.js',
|
|
||||||
'lodash-es',
|
|
||||||
'md5',
|
|
||||||
'path-to-regexp',
|
|
||||||
'pinia',
|
|
||||||
'print-js',
|
|
||||||
'qrcode',
|
|
||||||
'qs',
|
|
||||||
'resize-observer-polyfill',
|
|
||||||
'showdown',
|
|
||||||
'sortablejs',
|
|
||||||
'tinymce/icons/default/icons',
|
|
||||||
'tinymce/plugins/advlist',
|
|
||||||
'tinymce/plugins/anchor',
|
|
||||||
'tinymce/plugins/autolink',
|
|
||||||
'tinymce/plugins/autosave',
|
|
||||||
'tinymce/plugins/code',
|
|
||||||
'tinymce/plugins/codesample',
|
|
||||||
'tinymce/plugins/directionality',
|
|
||||||
'tinymce/plugins/fullscreen',
|
|
||||||
'tinymce/plugins/image',
|
|
||||||
'tinymce/plugins/insertdatetime',
|
|
||||||
'tinymce/plugins/link',
|
|
||||||
'tinymce/plugins/lists',
|
|
||||||
'tinymce/plugins/media',
|
|
||||||
'tinymce/plugins/nonbreaking',
|
|
||||||
'tinymce/plugins/pagebreak',
|
|
||||||
'tinymce/plugins/preview',
|
|
||||||
'tinymce/plugins/save',
|
|
||||||
'tinymce/plugins/searchreplace',
|
|
||||||
'tinymce/plugins/table',
|
|
||||||
'tinymce/plugins/template',
|
|
||||||
'tinymce/plugins/visualchars',
|
|
||||||
'tinymce/plugins/wordcount',
|
|
||||||
'tinymce/themes/silver',
|
|
||||||
'tinymce/tinymce',
|
|
||||||
'vditor',
|
|
||||||
'vue',
|
|
||||||
'vue-i18n',
|
|
||||||
'vue-print-nb-jeecg/src/printarea',
|
|
||||||
'vue-router',
|
|
||||||
'vue-types',
|
|
||||||
'vxe-table',
|
|
||||||
'vxe-table-plugin-antd',
|
|
||||||
'xe-utils',
|
|
||||||
'xss',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue