v3.9.0 里程碑版本发布

This commit is contained in:
JEECG
2025-11-26 11:25:35 +08:00
parent 1f73837b7d
commit 9919ae2bc5
380 changed files with 11450 additions and 4555 deletions

View File

@ -1,9 +1,9 @@
import { generate } from '@ant-design/colors';
import setting from '/@/settings/projectSetting';
export const primaryColor = '#1890FF';
export const darkMode = 'light';
// 代码逻辑说明: 【JHHB-579】去掉写死的主题色根据导航栏模式确定主题色
export const primaryColor = setting.themeColor;
export const darkMode = setting.themeMode;
type Fn = (...arg: any) => any;
type GenerateTheme = 'default' | 'dark';

View File

@ -36,14 +36,12 @@ function createConfig(params: CreateConfigParams) {
console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - configuration file is build successfully:`);
console.log(colors.gray(OUTPUT_DIR + '/' + colors.green(configFileName)) + '\n');
// update-begin--author:sunjianlei---date:20250423---for【QQYUN-9685】构建 electron 桌面应用
// 如果是 Electron 环境,还需要将配置文件写入到 JSON 文件中
if (config.VITE_GLOB_RUN_PLATFORM === 'electron') {
writeFileSync(getRootPath(`${OUTPUT_DIR}/electron/env.json`), JSON.stringify(config));
console.log(colors.cyan(`✨ [${pkg.name}]`) + ` - electron env file is build successfully:`);
console.log(colors.gray(OUTPUT_DIR + '/' + colors.green('electron/env.json')) + '\n');
}
// update-end----author:sunjianlei---date:20250423---for【QQYUN-9685】构建 electron 桌面应用
} catch (error) {
console.log(colors.red('configuration file configuration file failed to package:\n' + error));

View File

@ -51,17 +51,15 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
*/
function getConfFiles() {
// update-begin--author:sunjianlei---date:20250411---for【QQYUN-9685】构建 electron 桌面应用
// 代码逻辑说明: 【QQYUN-9685】构建 electron 桌面应用
const {VITE_GLOB_RUN_PLATFORM} = process.env
if (VITE_GLOB_RUN_PLATFORM === 'electron') {
return ['.env', '.env.prod_electron'];
}
// update-end----author:sunjianlei---date:20250411---for【QQYUN-9685】构建 electron 桌面应用
const script = process.env.npm_lifecycle_script;
// update-begin--author:liaozhiyang---date:20240326---for【QQYUN-8690】修正获取当前环境下的文件名
// 代码逻辑说明: 【QQYUN-8690】修正获取当前环境下的文件名
const reg = new RegExp('NODE_ENV=([a-z_\\d]+)');
// update-end--author:liaozhiyang---date:20240326---for【QQYUN-8690】修正获取当前环境下的文件名
const result = reg.exec(script as string) as any;
if (result) {
const mode = result[1] as string;

View File

@ -72,7 +72,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunM
}
// // electron plugin
// const isElectron = viteEnv.VITE_GLOB_RUN_PLATFORM === 'electron';
const isElectron = viteEnv.VITE_GLOB_RUN_PLATFORM === 'electron';
// if (isElectron) {
// vitePlugins.push(configElectronPlugin(viteEnv, isBuild))
// }
@ -82,8 +82,11 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean, isQiankunM
// rollup-plugin-gzip
vitePlugins.push(configCompressPlugin(VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE));
// vite-plugin-pwa (PWA 插件注册)
vitePlugins.push(configPwaPlugin(isBuild));
if (!isElectron) {
vitePlugins.push(configPwaPlugin(isBuild));
}
}
// //vite-plugin-theme【预编译加载插件解决vite首次打开界面加载慢问题】

View File

@ -1,6 +1,5 @@
/**
* PWA 插件配置
* 适配按需加载:只预缓存关键资源,按需加载的 chunk 使用运行时缓存
* PWA 插件配置 - 适配按需加载
*/
import { VitePWA } from 'vite-plugin-pwa';
import type { VitePWAOptions } from 'vite-plugin-pwa';
@ -34,27 +33,25 @@ export function configPwaPlugin(isBuild: boolean): PluginOption | PluginOption[]
],
},
workbox: {
// 增加文件大小限制到 10MB
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10 MB
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10MB
cleanupOutdatedCaches: true,
// 预缓存策略:只缓存关键资源,按需加载的 chunk 通过运行时缓存
// 预缓存入口文件、CSS 和静态资源,以及核心 JS入口和 vendor
// 预缓存:只缓存关键资源,不预缓存路由组件 CSS/JS避免登录页加载全部资源
globPatterns: [
'index.html',
'index.html', // 必须预缓存(避免 non-precached-url 错误)
'manifest.webmanifest',
'**/*.css',
'**/*.{ico,png,svg,woff2}',
// 预缓存入口 JS 和核心 vendor chunk
'assets/index-*.css', // 仅入口 CSS
'favicon.ico',
'logo.png',
'js/index-*.js',
'js/*-vendor-*.js',
],
// 注意:不预缓存按需加载的路由组件 chunk
// 这些 chunk 将通过运行时缓存策略按需加载和缓存
// 运行时缓存策略:处理按需加载的资源
// 不使用导航回退功能
navigateFallback: undefined,
// 运行时缓存:按需加载的资源
runtimeCaching: [
// 按需加载的 JS chunk优先网络失败后使用缓存
{
urlPattern: /\/js\/.*\.js$/i,
handler: 'NetworkFirst',
@ -70,9 +67,8 @@ export function configPwaPlugin(isBuild: boolean): PluginOption | PluginOption[]
},
},
},
// CSS 文件:优先缓存
{
urlPattern: /\/css\/.*\.css$/i,
urlPattern: /\/assets\/.*\.css$/i,
handler: 'CacheFirst',
options: {
cacheName: 'css-cache',
@ -129,8 +125,9 @@ export function configPwaPlugin(isBuild: boolean): PluginOption | PluginOption[]
},
},
],
skipWaiting: false,
clientsClaim: false,
// 启用立即更新:新 SW 立即激活并接管页面
skipWaiting: true,
clientsClaim: true,
},
devOptions: {
enabled: false,

View File

@ -1,8 +1,7 @@
import { app, BrowserWindow, Menu, ipcMain } from 'electron';
import { app, BrowserWindow, Menu } from 'electron';
import { isDev } from './env';
import { createMainWindow, createIndexWindow } from './utils/window';
import { getAppInfo } from './utils';
import { ElectronEnum } from '../src/enums/jeecgEnum';
import './ipc';
// 隐藏所有菜单
@ -12,14 +11,13 @@ let mainWindow: BrowserWindow | null = null;
function main() {
mainWindow = createMainWindow();
// update-begin--author:liaozhiyang---date:20250725---for【JHHB-13】桌面应用消息通知
// 代码逻辑说明: 【JHHB-13】桌面应用消息通知
mainWindow.on('focus', () => {
// 清除任务栏闪烁
if (process.platform === 'win32') {
mainWindow!.flashFrame(false);
}
});
// update-end--author:liaozhiyang---date:20250725---for【JHHB-13】桌面应用消息通知
return mainWindow;
}

View File

@ -6,13 +6,12 @@ import {_PATHS} from '../paths';
import {$env, isDev} from '../env';
const TrayIcons = {
// update-begin--author:liaozhiyang---date:20250725---for【JHHB-13】桌面应用消息通知
// 代码逻辑说明: 【JHHB-13】桌面应用消息通知
normal: nativeImage.createFromPath(
process.platform === 'win32'
? path.join(_PATHS.publicRoot, 'logo.png')
: path.join(_PATHS.electronRoot, './icons/mac/tray-icon.png').replace(/[\\/]dist[\\/]/, '/')
),
// update-end--author:liaozhiyang---date:20250725---for【JHHB-13】桌面应用消息通知
empty: nativeImage.createEmpty(),
};

View File

@ -5,9 +5,9 @@ import {_PATHS} from '../paths';
import {$env, isDev} from '../env';
import {createTray} from './tray';
// 创建窗口
export function createBrowserWindow(options?: BrowserWindowConstructorOptions) {
const win = new BrowserWindow({
// 获取公共窗口选项
export function getBrowserWindowOptions(options?: BrowserWindowConstructorOptions): BrowserWindowConstructorOptions {
return {
width: 1200,
height: 800,
webPreferences: {
@ -18,20 +18,26 @@ export function createBrowserWindow(options?: BrowserWindowConstructorOptions) {
// 应用图标
icon: isDev ? _PATHS.appIcon : void 0,
...options,
});
// update-begin--author:liaozhiyang---date:20250725---for【JHHB-13】桌面应用消息通知
}
}
// 创建窗口
export function createBrowserWindow(options?: BrowserWindowConstructorOptions) {
const win = new BrowserWindow(getBrowserWindowOptions(options));
// 代码逻辑说明: 【JHHB-13】桌面应用消息通知
if (process.platform === 'darwin') { // 仅 macOS 生效
if (app.dock) {
app.dock.setIcon(path.join(_PATHS.electronRoot, './icons/mac/dock.png').replace(/[\\/]dist[\\/]/, '/'));
}
}
// update-end--author:liaozhiyang---date:20250725---for【JHHB-13】桌面应用消息通知
// 设置窗口打开处理器
win.webContents.setWindowOpenHandler(({url}) => {
const win = createBrowserWindow();
win.loadURL(url);
// 阻止创建新窗口,因为已经被接管
return {action: 'deny'};
win.webContents.setWindowOpenHandler(() => {
return {
action: 'allow',
// 覆写新窗口的选项用于调整默认尺寸和加载preload脚本等
overrideBrowserWindowOptions: getBrowserWindowOptions(),
}
});
// 当 beforeunload 阻止窗口关闭时触发
@ -80,7 +86,10 @@ export function createIndexWindow() {
// 开发环境加载Vite服务生产加载打包文件
if (isDev) {
win.loadURL($env.VITE_DEV_SERVER_URL!)
let serverUrl = $env.VITE_DEV_SERVER_URL! as string;
// 【JHHB-936】由于wps预览不能使用localhost访问所以把localhost替换为127.0.0.1
serverUrl = serverUrl.replace('localhost', '127.0.0.1');
win.loadURL(serverUrl)
// 开发环境下,自动打开调试工具
// win.webContents.openDevTools()
} else {

View File

@ -48,10 +48,9 @@ export default [
method: 'get',
response: ({ query }) => {
const { page = 1, pageSize = 20 } = query;
// update-begin--author:liaozhiyang---date:20240730---for【issues/6943】mock翻页之后数据id和图片没自动刷新
// 代码逻辑说明: 【issues/6943】mock翻页之后数据id和图片没自动刷新
const pageNo = +(query.pageNo ?? page);
return resultPageSuccess(pageNo, +pageSize, demoList);
// update-end--author:liaozhiyang---date:20240730---for【issues/6943】mock翻页之后数据id和图片没自动刷新
},
},
] as MockMethod[];

View File

@ -1,6 +1,6 @@
{
"name": "jeecgboot-vue3",
"version": "3.8.3",
"version": "3.9.0",
"author": {
"name": "北京国炬信息技术有限公司",
"email": "jeecgos@163.com",
@ -23,31 +23,31 @@
"husky:install": "husky install"
},
"dependencies": {
"@jeecg/online": "3.8.2-beta",
"@jeecg/aiflow": "1.1.1",
"@jeecg/online": "3.9.0-beta",
"@jeecg/aiflow": "3.9.0-beta",
"@logicflow/core": "^2.0.10",
"@logicflow/extension": "^2.0.14",
"@logicflow/vue-node-registry": "^1.0.12",
"@iconify/iconify": "^3.1.1",
"@ant-design/colors": "^7.2.0",
"@ant-design/colors": "^7.2.1",
"@ant-design/icons-vue": "^7.0.1",
"@vue/shared": "^3.5.13",
"@vue/shared": "^3.5.22",
"@vueuse/core": "^10.11.1",
"@tinymce/tinymce-vue": "4.0.7",
"@zxcvbn-ts/core": "^3.0.4",
"ant-design-vue": "^4.2.6",
"axios": "^1.7.9",
"axios": "^1.12.2",
"china-area-data": "^5.0.1",
"@vant/area-data": "^1.5.2",
"clipboard": "^2.0.11",
"codemirror": "^5.65.18",
"codemirror": "^5.65.20",
"cron-parser": "^4.9.0",
"cropperjs": "^1.6.2",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"dayjs": "^1.11.18",
"dom-align": "^1.12.4",
"echarts": "^5.6.0",
"emoji-mart-vue-fast": "^15.0.3",
"emoji-mart-vue-fast": "^15.0.5",
"enquire.js": "^2.1.6",
"intro.js": "^7.2.0",
"lodash-es": "^4.17.21",
@ -63,21 +63,22 @@
"path-to-regexp": "^6.3.0",
"pinia": "2.1.7",
"print-js": "^1.6.0",
"qs": "^6.13.1",
"pinyin-pro": "^3.27.0",
"qs": "^6.14.0",
"qrcode": "^1.5.4",
"resize-observer-polyfill": "^1.5.1",
"showdown": "^2.1.0",
"sortablejs": "^1.15.6",
"swagger-ui-dist": "^5.21.0",
"swagger-ui-dist": "^5.29.3",
"tinymce": "6.6.2",
"vditor": "^3.10.8",
"vue": "^3.5.13",
"vditor": "^3.11.2",
"vue": "^3.5.22",
"vue-cropper": "^0.6.5",
"vue-cropperjs": "^5.0.0",
"vue-i18n": "^9.14.2",
"vue-i18n": "^9.14.5",
"vue-infinite-scroll": "^2.0.2",
"vue-print-nb-jeecg": "^1.0.12",
"vue-router": "^4.5.0",
"vue-router": "^4.5.1",
"vue-types": "^5.1.3",
"vuedraggable": "^4.1.0",
"vxe-table": "4.13.31",
@ -89,73 +90,73 @@
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@iconify/json": "^2.2.292",
"@iconify/json": "^2.2.394",
"@purge-icons/generated": "^0.10.0",
"@types/codemirror": "^5.60.15",
"@types/codemirror": "^5.60.16",
"@types/crypto-js": "^4.2.2",
"@types/fs-extra": "^11.0.4",
"@types/inquirer": "^9.0.7",
"@types/inquirer": "^9.0.9",
"@types/intro.js": "^5.1.5",
"@types/jest": "^29.5.14",
"@types/lodash-es": "^4.17.12",
"@types/mockjs": "^1.0.10",
"@types/node": "^20.17.12",
"@types/node": "^20.19.20",
"@types/nprogress": "^0.2.3",
"@types/qrcode": "^1.5.5",
"@types/qs": "^6.9.17",
"@types/qs": "^6.14.0",
"@types/showdown": "^2.0.6",
"@types/sortablejs": "^1.15.8",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-vue": "5.2.1",
"@vitejs/plugin-vue": "5.2.4",
"@vitejs/plugin-vue-jsx": "4.1.1",
"@vue/compiler-sfc": "^3.5.13",
"@vue/compiler-sfc": "^3.5.22",
"@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.20",
"autoprefixer": "^10.4.21",
"commitizen": "^4.3.1",
"conventional-changelog-cli": "^4.1.0",
"cross-env": "^7.0.3",
"cz-git": "^1.11.0",
"czg": "^1.11.0",
"dotenv": "^16.4.7",
"cz-git": "^1.12.0",
"czg": "^1.12.0",
"dotenv": "^16.6.1",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^9.1.2",
"eslint-define-config": "^2.1.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.32.0",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-vue": "^9.33.0",
"esno": "^4.8.0",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.2",
"http-server": "^14.1.1",
"husky": "^8.0.3",
"inquirer": "^9.3.7",
"inquirer": "^9.3.8",
"is-ci": "^3.0.1",
"jest": "^29.7.0",
"less": "^4.2.1",
"less": "^4.4.2",
"lint-staged": "15.2.2",
"npm-run-all": "^4.1.5",
"picocolors": "^1.1.1",
"postcss": "^8.4.49",
"postcss-html": "^1.7.0",
"postcss": "^8.5.6",
"postcss-html": "^1.8.0",
"postcss-less": "^6.0.0",
"prettier": "^3.4.2",
"pretty-quick": "^4.0.0",
"prettier": "^3.6.2",
"pretty-quick": "^4.2.2",
"rimraf": "^5.0.10",
"rollup": "4.52.5",
"rollup": "4.52.4",
"rollup-plugin-visualizer": "5.14.0",
"stylelint": "^16.12.0",
"stylelint": "^16.25.0",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recommended": "^14.0.1",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-recommended-vue": "^1.6.1",
"stylelint-config-standard": "^36.0.1",
"stylelint-order": "^6.0.4",
"ts-jest": "^29.2.5",
"ts-jest": "^29.4.4",
"ts-node": "^10.9.2",
"typescript": "^4.9.5",
"vite": "^6.0.7",
"typescript": "^5.9.3",
"vite": "^6.3.6",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.2",
"vite-plugin-mkcert": "^1.17.6",
"vite-plugin-mkcert": "^1.17.9",
"vite-plugin-mock": "^2.9.8",
"vite-plugin-optimize-persist": "^0.1.2",
"vite-plugin-package-config": "^0.1.1",
@ -166,10 +167,10 @@
"vite-plugin-qiankun": "^1.0.15",
"@rys-fe/vite-plugin-theme": "^0.8.6",
"vite-plugin-vue-setup-extend-plus": "^0.1.0",
"unocss": "^0.58.9",
"unocss": "^66.5.2",
"vue-eslint-parser": "^9.4.3",
"vue-tsc": "^1.8.27",
"dingtalk-jsapi": "^3.0.42",
"dingtalk-jsapi": "^3.2.0",
"big.js": "^6.2.2"
},
"repository": {

File diff suppressed because it is too large Load Diff

View File

@ -44,7 +44,7 @@
}
}
};
// update-begin--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
// 代码逻辑说明: 【QQYUN-6366】升级到antd4.x
const appTheme: any = ref({});
const { getDarkMode } = useRootSetting();
watch(
@ -54,11 +54,10 @@
if (newValue === ThemeEnum.DARK) {
appTheme.value.algorithm = theme.darkAlgorithm;
}
// update-begin--author:liaozhiyang---date:20240322---for【QQYUN-8570】生产环境暗黑模式下主题色不生效
// 代码逻辑说明: 【QQYUN-8570】生产环境暗黑模式下主题色不生效
if (import.meta.env.PROD) {
changeTheme(appStore.getProjectConfig.themeColor);
}
// update-end--author:liaozhiyang---date:20240322---for【QQYUN-8570】生产环境暗黑模式下主题色不生效
modeAction(appTheme.value);
appTheme.value = {
...appTheme.value,
@ -98,13 +97,11 @@
setTimeout(() => {
appStore.getProjectConfig?.themeColor && changeTheme(appStore.getProjectConfig.themeColor);
}, 300);
// update-end--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
</script>
<style lang="less">
// update-begin--author:liaozhiyang---date:20230803---for【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
// 代码逻辑说明: 【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
img {
display: inline-block;
}
// update-end--author:liaozhiyang---date:20230803---for【QQYUN-5839】windi会影响到html2canvas绘制的图片样式
</style>

View File

@ -10,7 +10,7 @@ enum Api {
queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync',
queryTreeList = '/sys/sysDepart/queryTreeList',
loadTreeData = '/sys/category/loadTreeData',
loadDictItem = '/sys/category/loadDictItem/',
loadDictItem = '/sys/category/loadDictItem',
getDictItems = '/sys/dict/getDictItems/',
getTableList = '/sys/user/queryUserComponentData',
getCategoryData = '/sys/category/loadAllData',

View File

@ -34,8 +34,9 @@ export const getMenuList = () => {
*/
export function getBackMenuAndPerms() {
return defHttp.get({ url: Api.GetMenuList }).catch((e) => {
console.log('接口 getBackMenuAndPerms 异常错误信息:', e);
// Token过期失效直接跳转登录页面 2025-09-08 scott
if (e && (e.message.includes('timeout') || e.message.includes('401'))) {
if (e && (e.message.includes('timeout') || e.message.includes('401') || e.message.includes('500'))) {
const userStore = useUserStoreWithOut();
userStore.setToken('');
setAuthCache(TOKEN_KEY, null);
@ -53,10 +54,8 @@ export function getBackMenuAndPerms() {
/**
* 切换成vue3菜单
*/
// update-begin--author:liaozhiyang---date:20240313---for【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码
// export const switchVue3Menu = () => {
// return new Promise((resolve) => {
// defHttp.get({ url: Api.SwitchVue3Menu });
// });
// };
// update-end--author:liaozhiyang---date:20240313---for【QQYUN-8487】注释掉判断菜单是否vue2版本逻辑代码

View File

@ -80,7 +80,6 @@ export function phoneLoginApi(params: LoginParams, mode: ErrorMessageMode = 'mod
*/
export function getUserInfo() {
return defHttp.get<GetUserInfoModel>({ url: Api.GetUserInfo }, {}).catch((e) => {
// update-begin--author:zyf---date:20220425---for:【VUEN-76】捕获接口超时异常,跳转到登录界面
// Token过期失效直接跳转登录页面
if (e && (e.message.includes('timeout') || e.message.includes('401'))) {
//接口不通时跳转到登录界面
@ -95,7 +94,6 @@ export function getUserInfo() {
}
});
}
// update-end--author:zyf---date:20220425---for:【VUEN-76】捕获接口超时异常,跳转到登录界面
});
}
@ -121,13 +119,12 @@ export function getCaptcha(params) {
if (res.success) {
resolve(true);
} else {
//update-begin---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP1分钟超过5次短信则提示需要验证码---
// 代码逻辑说明: 【QQYUN-9005】同一个IP1分钟超过5次短信则提示需要验证码---
if(res.code != ExceptionEnum.PHONE_SMS_FAIL_CODE){
createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
reject();
}
reject(res);
//update-end---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP1分钟超过5次短信则提示需要验证码---
}
}).catch((res)=>{
createErrorModal({ title: '错误提示', content: res.message || '未知问题' });

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -363,7 +363,10 @@
.icon-password {
background-image: url(../icon/icon-password.png);
}
.icon-depart {
top: 5px !important;
background-image: url(../icon/icon-depart.png);
}
.icon-code {
background-image: url(../icon/icon-code.png);
}

View File

@ -153,16 +153,14 @@ export function useMenuSearch(refs: Ref<HTMLElement[]>, scrollWrap: Ref<ElRef>,
handleClose();
await nextTick();
// update-begin--author:liaozhiyang---date:20230803---for【QQYUN-8369】搜索区分大小写外部链接新页打开
// 代码逻辑说明: 【QQYUN-8369】搜索区分大小写外部链接新页打开
if (to.internalOrExternal) {
// update-begin--author:liaozhiyang---date:20240402---for:【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开
// 代码逻辑说明: 【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开
const path = to.path.replace(URL_HASH_TAB, '#');
window.open(path, '_blank');
// update-end--author:liaozhiyang---date:20240402---for:【QQYUN-8773】配置外部网址在顶部菜单模式和搜索打不开
} else {
go(to.path);
}
// update-end--author:liaozhiyang---date:20230803---for【QQYUN-8369】搜索区分大小写外部链接新页打开
}
// close search modal

View File

@ -59,9 +59,8 @@
*/
lazyTime: { type: Number, default: 0 },
});
// update-begin-author:liaozhiyang---date:2024-11-11--for:【issues/7402】CollapseContainer组件增加默认不展开属性
// 代码逻辑说明: 【issues/7402】CollapseContainer组件增加默认不展开属性
const show = ref(props.defaultExpan);
// update-begin-author:liaozhiyang---date:2024-11-11--for:【issues/7402】CollapseContainer组件增加默认不展开属性
const { prefixCls } = useDesign('collapse-container');

View File

@ -138,9 +138,8 @@
.item-style() {
li {
display: inline-block;
//update-begin---author:wangshuai---date:2024-06-24---for:【TV360X-1576】右键样式选中缺少了一块---
// 代码逻辑说明: 【TV360X-1576】右键样式选中缺少了一块---
width: 100% !important;
//update-end---author:wangshuai---date:2024-06-24---for:【TV360X-1576】右键样式选中缺少了一块---
height: @default-height;
margin: 0 !important;
line-height: @default-height;

View File

@ -52,13 +52,12 @@
if (beforeStartFunc && isFunction(beforeStartFunc)) {
loading.value = true;
try {
//update-begin---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP1分钟超过5次短信则提示需要验证码---
// 代码逻辑说明: 【QQYUN-9005】同一个IP1分钟超过5次短信则提示需要验证码---
const canStart = await beforeStartFunc().catch((res) =>{
if(res.code === ExceptionEnum.PHONE_SMS_FAIL_CODE){
openCaptchaModal(true, {});
}
});
//update-end---author:wangshuai---date:2024-04-18---for:【QQYUN-9005】同一个IP1分钟超过5次短信则提示需要验证码---
canStart && start();
} finally {
loading.value = false;

View File

@ -60,20 +60,18 @@
instance && emit('register', drawerInstance, instance.uid);
const getMergeProps = computed((): DrawerProps => {
// update-begin--author:liaozhiyang---date:20240320---for【QQYUN-8389】vue3.4以上版本导致角色抽屉隐藏footer逻辑错误toRaw改成cloneDeep否则props的变化不会触发computed
// 代码逻辑说明: 【QQYUN-8389】vue3.4以上版本导致角色抽屉隐藏footer逻辑错误toRaw改成cloneDeep否则props的变化不会触发computed
return { ...deepMerge(cloneDeep(props), unref(propsRef)) };
// update-end--author:liaozhiyang---date:20240320---for【QQYUN-8389】vue3.4以上版本导致角色抽屉隐藏footer逻辑错误toRaw改成cloneDeep否则props的变化不会触发computed
});
const getProps = computed((): DrawerProps => {
// update-begin--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
// 代码逻辑说明: 【QQYUN-6366】升级到antd4.x
const opt = {
placement: 'right',
...unref(attrs),
...unref(getMergeProps),
open: unref(visibleRef),
};
// update-end--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
opt.title = undefined;
let { isDetail, width, wrapClassName, getContainer } = opt;
if (isDetail) {

View File

@ -63,11 +63,10 @@ export function useDrawer(): UseDrawerReturnType {
}),
openDrawer: <T = any>(visible = true, data?: T, openOnSet = true): void => {
// update-begin--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
// 代码逻辑说明: 【QQYUN-6366】升级到antd4.x
getInstance()?.setDrawerProps({
open: visible,
});
// update-end--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
if (!data) return;
if (openOnSet) {
@ -81,9 +80,8 @@ export function useDrawer(): UseDrawerReturnType {
}
},
closeDrawer: () => {
// update-begin--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
// 代码逻辑说明: 【QQYUN-6366】升级到antd4.x
getInstance()?.setDrawerProps({ open: false });
// update-end--author:liaozhiyang---date:20231218---for【QQYUN-6366】升级到antd4.x
},
};

View File

@ -13,9 +13,7 @@
:disabled="item.disabled"
:class="[{ 'is-pop-confirm': item.popConfirm }, item.class ?? []]"
>
<!-- update-begin--author:liaozhiyang---date:20231110---forissues/839BasicTable表格的更多操作按钮禁用还能点击弹出气泡框 -->
<a-popconfirm :disabled="item.disabled" v-if="popconfirm && item.popConfirm" v-bind="getPopConfirmAttrs(item.popConfirm)">
<!-- update-end--author:liaozhiyang---date:20231110---forissues/839BasicTable表格的更多操作按钮禁用还能点击弹出气泡框 -->
<template #icon v-if="item.popConfirm.icon">
<Icon v-if="item.iconColor" :icon="item.popConfirm.icon" :color="item.iconColor" />
<Icon v-else :icon="item.popConfirm.icon" />
@ -107,7 +105,7 @@
@prefix-cls: ~'@{namespace}-basic-dropdown';
.@{prefix-cls} {
// update-begin--author:sunjianlei---date:20220322---for: 【VUEN-180】更多下拉菜单只有点到字上才有效点到空白处什么都不会发生体验不好
// 代码逻辑说明: 【VUEN-180】更多下拉菜单只有点到字上才有效点到空白处什么都不会发生体验不好
&-menu .ant-dropdown-menu-item.is-pop-confirm {
padding: 0;
@ -115,6 +113,5 @@
padding: 5px 12px;
}
}
// update-end--author:sunjianlei---date:20220322---for: 【VUEN-180】更多下拉菜单只有点到字上才有效点到空白处什么都不会发生体验不好
}
</style>

View File

@ -91,12 +91,11 @@
// Get the basic configuration of the form
const getProps = computed((): FormProps => {
let mergeProps = { ...props, ...unref(propsRef) } as FormProps;
//update-begin-author:sunjianlei date:20220923 for: 如果用户设置了labelWidth则使labelCol失效解决labelWidth设置无效的问题
// 代码逻辑说明: 如果用户设置了labelWidth则使labelCol失效解决labelWidth设置无效的问题
if (mergeProps.labelWidth) {
mergeProps.labelCol = undefined;
}
//update-end-author:sunjianlei date:20220923 for: 如果用户设置了labelWidth则使labelCol失效解决labelWidth设置无效的问题
// update-begin--author:liaozhiyang---date:20231017---for【QQYUN-6566】BasicForm支持一行显示(inline)
// 代码逻辑说明: 【QQYUN-6566】BasicForm支持一行显示(inline)
if (mergeProps.layout === 'inline') {
if (mergeProps.labelCol === componentSetting.form.labelCol) {
mergeProps.labelCol = undefined;
@ -105,7 +104,6 @@
mergeProps.wrapperCol = undefined;
}
}
// update-end--author:liaozhiyang---date:20231017---for【QQYUN-6566】BasicForm支持一行显示(inline)
return mergeProps;
});
@ -130,11 +128,10 @@
const getBindValue = computed(() => {
const bindValue = { ...attrs, ...props, ...unref(getProps) } as Recordable;
// update-begin--author:liaozhiyang---date:20250630---for【issues/8484】分类字典中的新增弹窗的label点击会触发查询区域的input
// 代码逻辑说明: 【issues/8484】分类字典中的新增弹窗的label点击会触发查询区域的input
if (bindValue.name === undefined && bindValue.source === 'table-query') {
bindValue.name = 'top-query-form';
}
// update-end--author:liaozhiyang---date:20250630---for【issues/8484】分类字典中的新增弹窗的label点击会触发查询区域的input
return bindValue;
});
@ -144,9 +141,9 @@
const { defaultValue, component, componentProps } = schema;
// handle date type
if (defaultValue && dateItemType.includes(component)) {
//update-begin---author:wangshuai ---date:20230410 for【issues/435】代码生成的日期控件赋默认值报错------------
// 代码逻辑说明: 【issues/435】代码生成的日期控件赋默认值报错------------
let valueFormat:string = "";
// update-begin--author:liaozhiyang---date:20250818---for【issues/8683】DatePicker组件的componentProps使用函数形式时初始值获取不对
// 代码逻辑说明: 【issues/8683】DatePicker组件的componentProps使用函数形式时初始值获取不对
if(isObject(componentProps)) {
valueFormat = componentProps?.valueFormat;
} else if (isFunction(componentProps)) {
@ -160,36 +157,30 @@
if(!valueFormat){
console.warn("未配置valueFormat,可能导致格式化错误!");
}
//update-end---author:wangshuai ---date:20230410 for【issues/435】代码生成的日期控件赋默认值报错------------
if (!Array.isArray(defaultValue)) {
//update-begin---author:wangshuai ---date:20221124 for[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
// 代码逻辑说明: [issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
if(valueFormat){
// schema.defaultValue = dateUtil(defaultValue).format(valueFormat);
// update-begin--author:liaozhiyang---date:20240529---for【TV360X-346 】时间组件填写默认值有问题
// 代码逻辑说明: 【TV360X-346 】时间组件填写默认值有问题
schema.defaultValue = dateUtil(defaultValue, valueFormat).format(valueFormat);
// update-end--author:liaozhiyang---date:20240529---for【TV360X-346 】时间组件填写默认值有问题
}else{
schema.defaultValue = dateUtil(defaultValue);
}
//update-end---author:wangshuai ---date:20221124 for[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
} else {
const def: dayjs.Dayjs[] = [];
defaultValue.forEach((item) => {
//update-begin---author:wangshuai ---date:20221124 for[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
// 代码逻辑说明: [issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
if(valueFormat){
// update-begin--author:liaozhiyang---date:20240529---for【TV360X-346 】时间组件填写默认值有问题
// 代码逻辑说明: 【TV360X-346 】时间组件填写默认值有问题
def.push(dateUtil(item, valueFormat).format(valueFormat));
// update-end--author:liaozhiyang---date:20240529---for【TV360X-346 】时间组件填写默认值有问题
}else{
def.push(dateUtil(item));
}
//update-end---author:wangshuai ---date:20221124 for[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
});
// update-begin--author:liaozhiyang---date:20240328---for【issues/1114】rangepicker等时间控件报错vue3.4以上版本有问题)
// 代码逻辑说明: 【issues/1114】rangepicker等时间控件报错vue3.4以上版本有问题)
def.forEach((item, index) => {
defaultValue[index] = item;
});
// update-end--author:liaozhiyang---date:20240328---for【issues/1114】rangepicker等时间控件报错vue3.4以上版本有问题)
}
}
}
@ -293,21 +284,18 @@
propsRef.value = deepMerge(unref(propsRef) || {}, formProps);
}
//update-begin-author:taoyan date:2022-11-28 for: QQYUN-3121 【优化】表单视图问题#scott测试 8、此功能未实现
// 代码逻辑说明: QQYUN-3121 【优化】表单视图问题#scott测试 8、此功能未实现
const onFormSubmitWhenChange = useDebounceFn(handleSubmit, 300);
function setFormModel(key: string, value: any) {
formModel[key] = value;
// update-begin--author:liaozhiyang---date:20230922---for【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
// const { validateTrigger } = unref(getBindValue);
// if (!validateTrigger || validateTrigger === 'change') {
// validateFields([key]).catch((_) => {});
// }
// update-end--author:liaozhiyang---date:20230922---for【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
if(props.autoSearch === true){
onFormSubmitWhenChange();
}
}
//update-end-author:taoyan date:2022-11-28 for: QQYUN-3121 【优化】表单视图问题#scott测试 8、此功能未实现
function handleEnterPress(e: KeyboardEvent) {
const { autoSubmitOnEnter } = unref(getProps);
@ -392,16 +380,13 @@
&-with-help {
margin-bottom: 0;
}
// update-begin--author:liaozhiyang---date:20240514---for【QQYUN-9241】form表单上下间距大点
//&:not(.ant-form-item-with-help) {
// margin-bottom: 24px;
//}
// update-begin--author:liaozhiyang---date:20240514---for【QQYUN-9241】form表单上下间距大点
// update-begin--author:liaozhiyang---date:20240620---for【TV360X-1420】校验时闪动
// 代码逻辑说明: 【TV360X-1420】校验时闪动
&-has-error {
margin-bottom: 24px;
}
// update-end--author:liaozhiyang---date:20240620---for【TV360X-1420】校验时闪动
// 表单组件中间件样式
.j-form-item-middleware {
@ -460,12 +445,11 @@
margin-bottom: 8px !important;
}
}
// update-begin--author:liaozhiyang---date:20231017---for【QQYUN-6566】BasicForm支持一行显示(inline)
// 代码逻辑说明: 【QQYUN-6566】BasicForm支持一行显示(inline)
&.ant-form-inline {
& > .ant-row {
.ant-col { width:auto !important; }
}
}
// update-end--author:liaozhiyang---date:20231017---for【QQYUN-6566】BasicForm支持一行显示(inline)
}
</style>

View File

@ -53,9 +53,8 @@ import JSelectInput from './jeecg/components/JSelectInput.vue';
import JCategorySelect from './jeecg/components/JCategorySelect.vue';
import JSelectMultiple from './jeecg/components/JSelectMultiple.vue';
import JPopup from './jeecg/components/JPopup.vue';
// update-begin--author:liaozhiyang---date:20240130---for【QQYUN-7961】popupDict字典
// 代码逻辑说明: 【QQYUN-7961】popupDict字典
import JPopupDict from './jeecg/components/JPopupDict.vue';
// update-end--author:liaozhiyang---date:20240130---for【QQYUN-7961】popupDict字典
import JSwitch from './jeecg/components/JSwitch.vue';
import JTreeDict from './jeecg/components/JTreeDict.vue';
import JInputPop from './jeecg/components/JInputPop.vue';
@ -79,6 +78,7 @@ import JRangeTime from './jeecg/components/JRangeTime.vue'
import JInputSelect from './jeecg/components/JInputSelect.vue'
import RoleSelectInput from './jeecg/components/roleSelect/RoleSelectInput.vue';
import JSelectUserByDeptPost from './jeecg/components/JSelectUserByDeptPost.vue';
import JDatePickerMultiple from './jeecg/components/JDatePickerMultiple.vue';
import {DatePickerInFilter, CascaderPcaInFilter} from "@/components/InFilter";
const componentMap = new Map<ComponentType, Component>();
@ -112,6 +112,7 @@ componentMap.set('RangePicker', DatePicker.RangePicker);
componentMap.set('WeekPicker', DatePicker.WeekPicker);
componentMap.set('TimePicker', TimePicker);
componentMap.set('DatePickerInFilter', DatePickerInFilter);
componentMap.set('JDatePickerMultiple', JDatePickerMultiple);
componentMap.set('StrengthMeter', StrengthMeter);
componentMap.set('IconPicker', IconPicker);
componentMap.set('InputCountDown', CountdownInput);
@ -150,9 +151,8 @@ componentMap.set(
componentMap.set('JCategorySelect', JCategorySelect);
componentMap.set('JSelectMultiple', JSelectMultiple);
componentMap.set('JPopup', JPopup);
// update-begin--author:liaozhiyang---date:20240130---for【QQYUN-7961】popupDict字典
// 代码逻辑说明: 【QQYUN-7961】popupDict字典
componentMap.set('JPopupDict', JPopupDict);
// update-end--author:liaozhiyang---date:20240130---for【QQYUN-7961】popupDict字典
componentMap.set('JSwitch', JSwitch);
componentMap.set('JTreeDict', JTreeDict);
componentMap.set('JInputPop', JInputPop);

View File

@ -75,7 +75,7 @@
const emitData = ref<any[]>([]);
const attrs = useAttrs();
const { t } = useI18n();
// update-begin--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
// 代码逻辑说明: 【QQYUN-11831】ApiSelect 分页下拉方案 #7883
const hasMore = ref(true);
const pagination = ref({
pageNo: 1,
@ -86,7 +86,7 @@
// update-end--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
// Embedded in the form, just use the hook binding to perform form verification
const [state, setState] = useRuleFormItem(props, 'value', 'change', emitData);
// update-begin--author:liaozhiyang---date:20230830---for【QQYUN-6308】解决警告
// 代码逻辑说明: 【QQYUN-6308】解决警告
let vModalValue: any;
const attrs_ = computed(() => {
let obj: any = unref(attrs) || {};
@ -94,9 +94,9 @@
vModalValue = obj['onUpdate:value'];
delete obj['onUpdate:value'];
}
// update-begin--author:liaozhiyang---date:20231017---for【issues/5467】ApiSelect修复覆盖了用户传递的方法
// 代码逻辑说明: 【issues/5467】ApiSelect修复覆盖了用户传递的方法
if (obj['filterOption'] === undefined) {
// update-begin--author:liaozhiyang---date:20230904---for【issues/5305】无法按照预期进行搜索
// 代码逻辑说明: 【issues/5305】无法按照预期进行搜索
obj['filterOption'] = (inputValue, option) => {
if (typeof option['label'] === 'string') {
return option['label'].toLowerCase().indexOf(inputValue.toLowerCase()) != -1;
@ -104,12 +104,10 @@
return true;
}
};
// update-end--author:liaozhiyang---date:20230904---for【issues/5305】无法按照预期进行搜索
}
// update-end--author:liaozhiyang---date:20231017---for【issues/5467】ApiSelect修复覆盖了用户传递的方法
return obj;
});
// update-begin--author:liaozhiyang---date:20230830---for【QQYUN-6308】解决警告
// 代码逻辑说明: 【QQYUN-6308】解决警告
const getOptions = computed(() => {
const { labelField, valueField, numberToString } = props;
return unref(options).reduce((prev, next: Recordable) => {
@ -124,8 +122,7 @@
return prev;
}, [] as OptionsItem[]);
});
// update-begin--author:liaozhiyang---date:20240823---for【issues/6999】ApiSelect联动更新字段不生效(代码还原)
// update-begin--author:liaozhiyang---date:20250707---for:【issues/8527】apiSelect分页加载重复请求
// 代码逻辑说明: 【issues/8527】apiSelect分页加载重复请求
watch(
() => props.immediate,
() => {
@ -140,8 +137,6 @@
},
{ deep: true }
);
// update-end--author:liaozhiyang---date:20250707---for:【issues/8527】apiSelect分页加载重复请求
// update-end--author:liaozhiyang---date:20240823---for【issues/6999】ApiSelect联动更新字段不生效代码还原
watch(
() => props.params,
@ -165,7 +160,7 @@
async function fetch() {
const api = props.api;
if (!api || !isFunction(api)) return;
// update-begin--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
// 代码逻辑说明: 【QQYUN-11831】ApiSelect 分页下拉方案 #7883
if (!props.pageConfig.isPage || pagination.value.pageNo == 1) {
options.value = [];
}
@ -175,14 +170,12 @@
let params = isPage
? { ...props.params, [pageField]: pagination.value.pageNo, [pageSizeField]: pagination.value.pageSize }
: { ...props.params };
// update-end--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
const res = await api(params);
if (isPage) {
// update-begin--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
// 代码逻辑说明: 【QQYUN-11831】ApiSelect 分页下拉方案 #7883
options.value = [...options.value, ...res[listField]];
pagination.value.total = res[totalField] || 0;
hasMore.value = res[totalField] ? options.value.length < res[totalField] : res[listField] < pagination.value.pageSize;
// update-end--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
} else {
if (Array.isArray(res)) {
options.value = res;
@ -198,19 +191,14 @@
console.warn(error);
} finally {
loading.value = false;
//--@updateBy-begin----author:liusq---date:20210914------for:判断选择模式multiple多选情况下的value值空的情况下需要设置为数组------
['multiple', 'tags'].includes(unref(attrs).mode) && !Array.isArray(unref(state)) && setState([]);
//--@updateBy-end----author:liusq---date:20210914------for:判断选择模式multiple多选情况下的value值空的情况下需要设置为数组------
//update-begin---author:wangshuai ---date:20230505 for初始化value值如果是多选字符串的情况下显示不出来------------
initValue();
//update-end---author:wangshuai ---date:20230505 for初始化value值如果是多选字符串的情况下显示不出来------------
}
}
function initValue() {
let value = props.value;
// update-begin--author:liaozhiyang---date:20250407---for【issues/8037】初始化值单选的值被错误地写入数组值
// 代码逻辑说明: 【issues/8037】初始化值单选的值被错误地写入数组值
if (['multiple', 'tags'].includes(unref(attrs).mode)) {
if (value && typeof value === 'string' && value != 'null' && value != 'undefined') {
state.value = value.split(',');
@ -220,7 +208,6 @@
} else {
state.value = value;
}
// update-end--author:liaozhiyang---date:20250407---for【issues/8037】初始化值单选的值被错误地写入数组值
}
async function handleFetch() {
@ -238,7 +225,6 @@
vModalValue && vModalValue(_);
emitData.value = args;
}
// update-begin--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
// 滚动加载更多
function handlePopupScroll(e) {
const { scrollTop, scrollHeight, clientHeight } = e.target;
@ -248,7 +234,6 @@
fetch();
}
}
// update-end--author:liusq---date:20250407---for【QQYUN-11831】ApiSelect 分页下拉方案 #7883
return { state, attrs_, attrs, getOptions, loading, t, handleFetch, handleChange, handlePopupScroll,filterOption };
},
});

View File

@ -44,9 +44,8 @@
watch(
() => props.params,
() => {
//update-begin---author:wangshuai---date:2024-02-28---for:【QQYUN-8346】 ApiTreeSelect组件入参变化时不及时刷新数据 #1054---
// 代码逻辑说明: 【QQYUN-8346】 ApiTreeSelect组件入参变化时不及时刷新数据 #1054---
unref(isFirstLoaded) && fetch();
//update-end---author:wangshuai---date:2024-02-28---for:【QQYUN-8346】 ApiTreeSelect组件入参变化时不及时刷新数据 #1054---
},
{ deep: true }
);

View File

@ -2,7 +2,6 @@
<a-col v-bind="actionColOpt" v-if="showActionButtonGroup">
<div class="btnArea" style="width: 100%" :style="{ textAlign: actionColOpt.style.textAlign }">
<FormItem>
<!-- update-begin-author:zyf Date:20211213 for调换按钮前后位置-->
<slot name="submitBefore"></slot>
<Button type="primary" class="mr-2" v-bind="getSubmitBtnOptions" @click="submitAction" v-if="showSubmitButton">
{{ getSubmitBtnOptions.text }}
@ -12,7 +11,6 @@
<Button type="default" class="mr-2" v-bind="getResetBtnOptions" @click="resetAction" v-if="showResetButton">
{{ getResetBtnOptions.text }}
</Button>
<!-- update-end-author:zyf Date:20211213 for调换按钮前后位置-->
<slot name="advanceBefore"></slot>
<Button type="link" size="small" @click="toggleAdvanced" v-if="showAdvancedButton && !hideAdvanceBtn">
@ -75,9 +73,8 @@
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)
// 代码逻辑说明: 【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,
@ -127,7 +124,7 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240617---for【TV360X-999】在1753px宽度下 流程设计页面查询的展开换行了
// 代码逻辑说明: 【TV360X-999】在1753px宽度下 流程设计页面查询的展开换行了
.btnArea {
:deep(.ant-form-item-control-input-content) {
display: flex;
@ -137,5 +134,4 @@
}
}
}
// update-end--author:liaozhiyang---date:20240617---for【TV360X-999】在1753px宽度下 流程设计页面查询的展开换行了
</style>

View File

@ -54,18 +54,16 @@
formActionType: {
type: Object as PropType<FormActionType>,
},
// update-begin--author:liaozhiyang---date:20240605---for【TV360X-857】解决禁用状态下触发校验
// 代码逻辑说明: 【TV360X-857】解决禁用状态下触发校验
clearValidate: {
type: Function,
default: null,
},
// update-end-author:liaozhiyang---date:20240605---for【TV360X-857】解决禁用状态下触发校验
// update-begin--author:liaozhiyang---date:20240625---for【TV360X-1511】blur不生效
// 代码逻辑说明: 【TV360X-1511】blur不生效
formName: {
type: String,
default: '',
},
// update-end--author:liaozhiyang---date:20240625---for【TV360X-1511】blur不生效
source: {
type: String,
default: '',
@ -103,20 +101,18 @@
componentProps = componentProps({ schema, tableAction, formModel, formActionType }) ?? {};
}
if (schema.component === 'Divider') {
//update-begin---author:wangshuai---date:2023-09-22---for:【QQYUN-6603】分割线标题位置显示不正确---
// 代码逻辑说明: 【QQYUN-6603】分割线标题位置显示不正确---
componentProps = Object.assign({ type: 'horizontal',orientation:'left', plain: true, }, componentProps);
//update-end---author:wangshuai---date:2023-09-22---for:【QQYUN-6603】分割线标题位置显示不正确---
}
return componentProps as Recordable;
});
const getDisable = computed(() => {
const { disabled: globDisabled } = props.formProps;
// update-begin--author:liaozhiyang---date:20240530---for【TV360X-594】表单全局禁用则dynamicDisabled不生效
// 代码逻辑说明: 【TV360X-594】表单全局禁用则dynamicDisabled不生效
if (!!globDisabled) {
return globDisabled;
}
// update-end--author:liaozhiyang---date:20240530---for【TV360X-594】表单全局禁用则dynamicDisabled不生效
const { dynamicDisabled } = props.schema;
const { disabled: itemDisabled = false } = unref(getComponentsProps);
let disabled = !!globDisabled || itemDisabled;
@ -129,7 +125,7 @@
return disabled;
});
// update-begin--author:liaozhiyang---date:20240308---for【QQYUN-8377】formSchema props支持动态修改
// 代码逻辑说明: 【QQYUN-8377】formSchema props支持动态修改
const getDynamicPropsValue = computed(() => {
const { dynamicPropsVal, dynamicPropskey } = props.schema;
if (dynamicPropskey == null) {
@ -143,7 +139,6 @@
}
}
});
// update-end--author:liaozhiyang---date:20240308---for【QQYUN-8377】formSchema props支持动态修改
function getShow(): { isShow: boolean; isIfShow: boolean } {
const { show, ifShow } = props.schema;
@ -168,7 +163,7 @@
isShow = isShow && itemIsAdvanced;
return { isShow, isIfShow };
}
// update-begin--author:liaozhiyang---date:20240530---for【TV360X-434】validator校验执行两次
// 代码逻辑说明: 【TV360X-434】validator校验执行两次
let vSwitchArr: any = [],
prevValidatorArr: any = [];
const hijackValidator = (rules) => {
@ -195,35 +190,30 @@
}
});
};
// update-end--author:liaozhiyang---date:20240530---for【TV360X-434】validator校验执行两次
function handleRules(): ValidationRule[] {
const { rules: defRules = [], component, rulesMessageJoinLabel, label, dynamicRules, required, auth, field } = props.schema;
// update-begin--author:liaozhiyang---date:20240605---for【TV360X-857】解决禁用状态下触发校验
// 代码逻辑说明: 【TV360X-857】解决禁用状态下触发校验
const { disabled: globDisabled } = props.formProps;
const { disabled: itemDisabled = false } = unref(getComponentsProps);
if (!!globDisabled || !!itemDisabled) {
props.clearValidate(field);
return [];
}
// update-end--author:liaozhiyang---date:20240605---for【TV360X-857】解决禁用状态下触发校验
// update-begin--author:liaozhiyang---date:20240531---for【TV360X-842】必填项v-auth、show隐藏的情况下表单无法提交
// 代码逻辑说明: 【TV360X-842】必填项v-auth、show隐藏的情况下表单无法提交
const { hasPermission } = usePermission();
const { isShow } = getShow();
if ((auth && !hasPermission(auth)) || !isShow) {
return [];
}
// update-end--author:liaozhiyang---date:20240531---for【TV360X-842】必填项v-auth、show隐藏的情况下表单无法提交
if (isFunction(dynamicRules)) {
// update-begin--author:liaozhiyang---date:20240514---for【issues/1244】标识了必填但是必填标识没显示
// 代码逻辑说明: 【issues/1244】标识了必填但是必填标识没显示
const ruleArr = dynamicRules(unref(getValues)) as ValidationRule[];
if (required) {
ruleArr.unshift({ required: true });
}
// update-begin--author:liaozhiyang---date:20240530---for【TV360X-434】validator校验执行两次
// 代码逻辑说明: 【TV360X-434】validator校验执行两次
hijackValidator(ruleArr);
// update-end--author:liaozhiyang---date:20240530---for【TV360X-434】validator校验执行两次
return ruleArr;
// update-end--author:liaozhiyang---date:20240514---for【issues/1244】标识了必填但是必填标识没显示
}
let rules: ValidationRule[] = cloneDeep(defRules) as ValidationRule[];
@ -273,12 +263,10 @@
rule.required = false;
}
if (component) {
//update-begin---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择---
//https://github.com/vbenjs/vue-vben-admin/pull/3082 github修复原文
/*if (!Reflect.has(rule, 'type')) {
rule.type = component === 'InputNumber' ? 'number' : 'string';
}*/
//update-end---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择---
rule.message = rule.message || defaultMsg;
@ -295,7 +283,7 @@
if (characterInx !== -1 && !rules[characterInx].validator) {
rules[characterInx].message = rules[characterInx].message || t('component.form.maxTip', [rules[characterInx].max] as Recordable);
}
// update-begin--author:liaozhiyang---date:20241226---for【QQYUN-7495】pattern由字符串改成正则传递给antd因使用InputNumber时发现正则无效
// 代码逻辑说明: 【QQYUN-7495】pattern由字符串改成正则传递给antd因使用InputNumber时发现正则无效
rules.forEach((item) => {
if (typeof item.pattern === 'string') {
try {
@ -310,10 +298,8 @@
}
}
});
// update-end--author:liaozhiyang---date:20231226---for【QQYUN-7495】pattern由字符串改成正则传递给antd因使用InputNumber时发现正则无效
// update-begin--author:liaozhiyang---date:20240530---for【TV360X-434】validator校验执行两次
// 代码逻辑说明: 【TV360X-434】validator校验执行两次
hijackValidator(rules);
// update-end--author:liaozhiyang---date:20240530---for【TV360X-434】validator校验执行两次
return rules;
}
@ -321,26 +307,29 @@
const { renderComponentContent, component, field, changeEvent = 'change', valueField, componentProps, dynamicRules, rules:defRules = [] } = props.schema;
const isCheck = component && ['Switch', 'Checkbox'].includes(component);
// update-begin--author:liaozhiyang---date:20231013---for【QQYUN-6679】input去空格
// 代码逻辑说明: 【QQYUN-6679】input去空格
let isTrim = false;
if (component === 'Input' && componentProps && componentProps.trim) {
isTrim = true;
}
// update-end--author:liaozhiyang---date:20231013---for【QQYUN-6679】input去空格
const eventKey = `on${upperFirst(changeEvent)}`;
const getRules = (): ValidationRule[] => {
const dyRules = isFunction(dynamicRules) ? dynamicRules(unref(getValues)) : [];
return [...dyRules, ...defRules];
};
// update-begin--author:liaozhiyang---date:20230922---for【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
// 代码逻辑说明: 【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
const on = {
[eventKey]: (...args: Nullable<Recordable>[]) => {
const [e] = args;
if (propsData[eventKey]) {
propsData[eventKey](...args);
// 代码逻辑说明: 【issues/8791】js增强popup弹框的onlChange()没生效
if (eventKey == 'onPopUpChange') {
return;
}
}
const target = e ? e.target : null;
// update-begin--author:liaozhiyang---date:20231013---for【QQYUN-6679】input去空格
// 代码逻辑说明: 【QQYUN-6679】input去空格
let value;
if (target) {
if (isCheck) {
@ -351,22 +340,18 @@
} else {
value = e;
}
// update-end--author:liaozhiyang---date:20231013---for【QQYUN-6679】input去空格
props.setFormModel(field, value);
// update-begin--author:liaozhiyang---date:20240625---for【TV360X-1511】blur不生效
// 代码逻辑说明: 【TV360X-1511】blur不生效
const findItem = getRules().find((item) => item?.trigger === 'blur');
if (!findItem) {
// update-begin--author:liaozhiyang---date:20240522---for【TV360X-341】有值之后必填校验不消失
// 代码逻辑说明: 【TV360X-341】有值之后必填校验不消失
props.validateFields([field]).catch((_) => {});
// update-end--author:liaozhiyang---date:20240625---for【TV360X-341】有值之后必填校验不消失
}
// update-end--author:liaozhiyang---date:20240625---for【TV360X-1511】blur不生效
},
// onBlur: () => {
// props.validateFields([field], { triggerName: 'blur' }).catch((_) => {});
// },
};
// update-end--author:liaozhiyang---date:20230922---for【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>;
const { autoSetPlaceHolder, size } = props.formProps;
@ -380,27 +365,23 @@
...unref(getComponentsProps),
disabled: unref(getDisable),
};
// update-begin--author:liaozhiyang---date:20240308---for【QQYUN-8377】formSchema props支持动态修改
// 代码逻辑说明: 【QQYUN-8377】formSchema props支持动态修改
const dynamicPropskey = props.schema.dynamicPropskey;
if (dynamicPropskey) {
propsData[dynamicPropskey] = unref(getDynamicPropsValue);
}
// update-end--author:liaozhiyang---date:20240308---for【QQYUN-8377】formSchema props支持动态修改
// update-begin--author:sunjianlei---date:20240725---for【TV360X-972】控件禁用时统一占位内容
// const isCreatePlaceholder = !propsData.disabled && autoSetPlaceHolder;
const isCreatePlaceholder = !!autoSetPlaceHolder;
// update-end----author:sunjianlei---date:20240725---for【TV360X-972】控件禁用时统一占位内容
// RangePicker place是一个数组
if (isCreatePlaceholder && component !== 'RangePicker' && component) {
//自动设置placeholder
// update-begin--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
// 代码逻辑说明: 【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
let label = isFunction(props.schema.label) ? props.schema.label() : props.schema.label;
if (localeStore.getLocale === 'en' && !(/^\s/.test(label))) {
label = ' ' + label;
}
// update-end--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
propsData.placeholder = unref(getComponentsProps)?.placeholder || createPlaceholderMessage(component) + label;
}
propsData.codeField = field;
@ -432,18 +413,15 @@
* @updateBy:zyf
*/
function renderLabelHelpMessage() {
//update-begin-author:taoyan date:2022-9-7 for: VUEN-2061【样式】online表单超出4个 .. 省略显示
//label宽度支持自定义
const { label: itemLabel, helpMessage, helpComponentProps, subLabel, labelLength } = props.schema;
// update-begin--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
// 代码逻辑说明: 【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
const label = isFunction(itemLabel) ? itemLabel() : itemLabel;
// update-end--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
let showLabel: string = label + '';
// update-begin--author:liaozhiyang---date:20240517---for【TV360X-98】label展示的文字必须和labelLength配置一致
// 代码逻辑说明: 【TV360X-98】label展示的文字必须和labelLength配置一致
if (labelLength) {
showLabel = showLabel.substr(0, labelLength);
}
// update-end--author:liaozhiyang---date:20240517---for【TV360X-98】label展示的文字必须和labelLength配置一致
const titleObj = { title: label };
const renderLabel = subLabel ? (
<span>
@ -454,7 +432,6 @@
) : (
label
);
//update-end-author:taoyan date:2022-9-7 for: VUEN-2061【样式】online表单超出4个 .. 省略显示
const getHelpMessage = isFunction(helpMessage) ? helpMessage(unref(getValues)) : helpMessage;
if (!getHelpMessage || (Array.isArray(getHelpMessage) && getHelpMessage.length === 0)) {
return renderLabel;
@ -472,12 +449,11 @@
const { labelCol, wrapperCol } = unref(itemLabelWidthProp);
const { colon } = props.formProps;
// update-begin--author:sunjianlei---date:20250613---foritemProps 属性支持函数形式
// 代码逻辑说明: itemProps 属性支持函数形式
let getItemProps = itemProps;
if (typeof getItemProps === 'function') {
getItemProps = getItemProps(unref(getValues));
}
// update-end--author:sunjianlei---date:20250613---foritemProps 属性支持函数形式
if (component === 'Divider') {
return (
@ -500,9 +476,8 @@
{...(getItemProps as Recordable)}
label={renderLabelHelpMessage()}
rules={handleRules()}
// update-begin--author:liaozhiyang---date:20240514---forissues/1244标识了必填但是必填标识没显示
// 代码逻辑说明: issues/1244标识了必填但是必填标识没显示
validateFirst = { true }
// update-end--author:liaozhiyang---date:20240514---forissues/1244标识了必填但是必填标识没显示
labelCol={labelCol}
wrapperCol={wrapperCol}
>
@ -525,14 +500,13 @@
}
const { baseColProps = {} } = props.formProps;
// update-begin--author:liaozhiyang---date:20230803---for【issues-641】调整表格搜索表单的span配置无效
// 代码逻辑说明: 【issues-641】调整表格搜索表单的span配置无效
const { getIsMobile } = useAppInject();
let realColProps;
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);

View File

@ -6,19 +6,17 @@
<script setup>
import { ref } from 'vue';
// update-begin--author:liaozhiyang---date:20240625---for【TV360X-1511】blur不生效
// 代码逻辑说明: 【TV360X-1511】blur不生效
const formItemId = ref(null);
const props = defineProps(['formName', 'fieldName', 'source']);
if (props.formName && props.fieldName && props.source !== 'table-query') {
formItemId.value = `${props.formName}_${props.fieldName}`;
}
// update-end--author:liaozhiyang---date:20240625---for【TV360X-1511】blur不生效
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240617---for【TV360X-1253】代码生成查询区域和新增组件没撑满
// 代码逻辑说明: 【TV360X-1253】代码生成查询区域和新增组件没撑满
div > :deep(.ant-picker) {
width: 100%;
}
// update-end--author:liaozhiyang---date:20240617---for【TV360X-1253】代码生成查询区域和新增组件没撑满
</style>

View File

@ -39,7 +39,7 @@
</script>
<style scoped lang="less">
// update-begin--author:liaozhiyang---date:20240719---for【TV360X-1090】表单label超长省略显示
// 代码逻辑说明: 【TV360X-1090】表单label超长省略显示
.jeecg-and-modal-form {
:deep(.ant-form-item-label) {
overflow: hidden;
@ -195,7 +195,7 @@
}
}
// end antdv 禁用样式
// update-begin--author:liaozhiyang---date:20240605---for【TV360X-857】online代码生成详情样式调整
// 代码逻辑说明: 【TV360X-857】online代码生成详情样式调整
.jeecg-form-container-disabled :deep(.ant-upload-select) {
cursor: grabbing;
}

View File

@ -36,12 +36,10 @@ function genType() {
}
export function setComponentRuleType(rule: ValidationRule, component: ComponentType, valueFormat: string) {
//update-begin---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择---
//https://github.com/vbenjs/vue-vben-admin/pull/3082 github修复原文
if (Reflect.has(rule, 'type')) {
return;
}
//update-end---author:wangshuai---date:2024-02-01---for:【QQYUN-8176】编辑表单中,校验必填时,如果组件是ApiSelect,打开编辑页面时,即使该字段有值,也会提示请选择---
if (['DatePicker', 'MonthPicker', 'WeekPicker', 'TimePicker'].includes(component)) {
rule.type = valueFormat ? 'string' : 'object';
} else if (['RangePicker', 'Upload', 'CheckboxGroup', 'TimePicker'].includes(component)) {
@ -74,11 +72,10 @@ export function handleInputNumberValue(component?: ComponentType, val?: any) {
*/
export function handleInputStringValue(component?: ComponentType, val?: any) {
if (!component) return val;
// update-begin--author:liaozhiyang---date:20240517---for【TV360X-13】InputNumber设置精确3位小数传入''变成了0.00
// 代码逻辑说明: 【TV360X-13】InputNumber设置精确3位小数传入''变成了0.00
if (['InputNumber'].includes(component) && typeof val === 'string' && val != '') {
return Number(val);
}
// update-end--author:liaozhiyang---date:20240517---for【TV360X-13】InputNumber设置精确3位小数传入''变成了0.00
return val;
}

View File

@ -77,29 +77,25 @@ export default function ({ advanceState, emit, getProps, getSchema, formModel, d
if (isLastAction) {
advanceState.hideAdvanceBtn = unref(getSchema).length <= autoAdvancedCol;
// update-begin--author:sunjianlei---date:20211108---for: 注释掉该逻辑使小于等于2行时也显示展开收起按钮
// 代码逻辑说明: 注释掉该逻辑使小于等于2行时也显示展开收起按钮
/* if (itemColSum <= BASIC_COL_LEN * 2) {
// 小于等于2行时不显示折叠和展开按钮
advanceState.hideAdvanceBtn = true;
advanceState.isAdvanced = true;
} else */
// update-end--author:sunjianlei---date:20211108---for: 注释掉该逻辑使小于等于2行时也显示展开收起按钮
// update-begin--author:liaozhiyang---date:202401009---for【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
/*if (itemColSum > BASIC_COL_LEN * 2 && itemColSum <= BASIC_COL_LEN * (unref(getProps).autoAdvancedLine || 3)) {
advanceState.hideAdvanceBtn = false;
// 默认超过 3 行折叠
} else*/
// update-end--author:liaozhiyang---date:202401009---for【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
if (!advanceState.isLoad) {
advanceState.isLoad = true;
advanceState.isAdvanced = !advanceState.isAdvanced;
// update-begin--author:sunjianlei---date:20211108---for: 如果总列数大于 autoAdvancedCol就默认折叠
// 代码逻辑说明: 如果总列数大于 autoAdvancedCol就默认折叠
if (unref(getSchema).length > autoAdvancedCol) {
advanceState.hideAdvanceBtn = false;
advanceState.isAdvanced = false;
}
// update-end--author:sunjianlei---date:20211108---for: 如果总列数大于 autoAdvancedCol就默认折叠
}
return { isAdvanced: advanceState.isAdvanced, itemColSum };
}

View File

@ -92,22 +92,20 @@ export function useForm(props?: Props): UseFormReturnType {
// TODO promisify
getFieldsValue: <T>() => {
//update-begin-author:taoyan date:2022-7-5 for: VUEN-1341【流程】编码方式 流程节点编辑表单时,填写数据报错 包括用户组件、部门组件、省市区
// 代码逻辑说明: VUEN-1341【流程】编码方式 流程节点编辑表单时,填写数据报错 包括用户组件、部门组件、省市区
let values = unref(formRef)?.getFieldsValue() as T;
if(values){
Object.keys(values).map(key=>{
if (values[key] instanceof Array) {
// update-begin-author:sunjianlei date:20221205 for: 【issues/4330】判断如果是对象数组则不拼接
// 代码逻辑说明: 【issues/4330】判断如果是对象数组则不拼接
let isObject = typeof (values[key][0] || '') === 'object';
if (!isObject) {
values[key] = values[key].join(',');
}
// update-end-author:sunjianlei date:20221205 for: 【issues/4330】判断如果是对象数组则不拼接
}
});
}
return values;
//update-end-author:taoyan date:2022-7-5 for: VUEN-1341【流程】编码方式 流程节点编辑表单时,填写数据报错 包括用户组件、部门组件、省市区
},
setFieldsValue: async <T>(values: T) => {

View File

@ -65,9 +65,8 @@ export function useFormEvents({
const hasKey = Reflect.has(values, key);
value = handleInputNumberValue(schema?.component, value);
// update-begin--author:liaozhiyang---date:20231226---for【QQYUN-7535】popup回填字段inputNumber组件验证错误
// 代码逻辑说明: 【QQYUN-7535】popup回填字段inputNumber组件验证错误
value = handleInputStringValue(schema?.component, value);
// update-end--author:liaozhiyang---date:20231226---for【QQYUN-7535】popup回填字段inputNumber组件验证错误
// 0| '' is allow
if (hasKey && fields.includes(key)) {
// time type
@ -257,8 +256,7 @@ export function useFormEvents({
if (!formEl) return;
try {
const values = await validate();
//update-begin---author:zhangdaihao Date:20140212 for[bug号]树机构调整------------
//--updateBy-begin----author:zyf---date:20211206------for:对查询表单提交的数组处理成字符串------
//代码逻辑说明: 对查询表单提交的数组处理成字符串------
for (let key in values) {
if (values[key] instanceof Array) {
let valueType = getValueType(getProps, key);
@ -267,15 +265,13 @@ export function useFormEvents({
}
}
}
//--updateBy-end----author:zyf---date:20211206------for:对查询表单提交的数组处理成字符串------
const res = handleFormValues(values);
emit('submit', res);
} catch (error) {
//update-begin-author:taoyan date:2022-11-4 for: 列表查询表单会触发校验错误导致重置失败,原因不明
// 代码逻辑说明: 列表查询表单会触发校验错误导致重置失败,原因不明
emit('submit', {});
console.error('query form validate error, please ignore!', error)
//throw new Error(error);
//update-end-author:taoyan date:2022-11-4 for: 列表查询表单会触发校验错误导致重置失败,原因不明
}
}

View File

@ -12,11 +12,10 @@ export function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsRef: Ref<
const { labelWidth: globalLabelWidth, labelCol: globalLabelCol, wrapperCol: globWrapperCol,layout } = unref(propsRef);
// update-begin--author:sunjianlei---date:20211104---for: 禁用全局 labelWidth不自动设置 textAlign --------
// 代码逻辑说明: 禁用全局 labelWidth不自动设置 textAlign --------
if (disabledLabelWidth) {
return { labelCol, wrapperCol };
}
// update-begin--author:sunjianlei---date:20211104---for: 禁用全局 labelWidth不自动设置 textAlign --------
// If labelWidth is set globally, all items setting
if (!globalLabelWidth && !labelWidth && !globalLabelCol) {
@ -31,9 +30,8 @@ export function useItemLabelWidth(schemaItemRef: Ref<FormSchema>, propsRef: Ref<
if (width) {
width = isNumber(width) ? `${width}px` : width;
// update-begin--author:liaozhiyang---date:20240717---for【issues/6865】配置单个的labelWidth不生效
// 代码逻辑说明: 【issues/6865】配置单个的labelWidth不生效
col = {};
// update-end--author:liaozhiyang---date:20240717---for【issues/6865】配置单个的labelWidth不生效
}
return {

View File

@ -31,10 +31,8 @@
name: 'JAddInput',
props: {
value: propTypes.string.def(''),
//update-begin---author:wangshuai ---date:20220516 for[VUEN-1043]系统编码规则,最后一个输入框不能删除------------
//自定义删除按钮多少才会显示
min: propTypes.integer.def(1),
//update-end---author:wangshuai ---date:20220516 for[VUEN-1043]系统编码规则,最后一个输入框不能删除--------------
},
emits: ['change', 'update:value'],
setup(props, { emit }) {

View File

@ -49,13 +49,12 @@
* 监听value变化
*/
watchEffect(() => {
// update-begin--author:liaozhiyang---date:20240612--for【TV360X-1223】省市区换新组件
// 代码逻辑说明: 【TV360X-1223】省市区换新组件
if (props.value) {
initValue();
} else {
cascaderValue.value = [];
}
// update-end--author:liaozhiyang---date:20240612---for【TV360X-1223】省市区换新组件
});
/**
@ -63,7 +62,7 @@
*/
function initValue() {
let value = props.value ? props.value : [];
// update-begin--author:liaozhiyang---date:20240607---for【TV360X-501】省市区换新组件
// 代码逻辑说明: 【TV360X-501】省市区换新组件
if (value && typeof value === 'string' && value != 'null' && value != 'undefined') {
const arr = value.split(',');
cascaderValue.value = transform(arr);
@ -74,7 +73,6 @@
cascaderValue.value = [];
}
}
// update-end--author:liaozhiyang---date:20240607---for【TV360X-501】省市区换新组件
}
function transform(arr) {
let result: any = [];
@ -112,7 +110,7 @@
};
function handleChange(arr, ...args) {
// update-begin--author:liaozhiyang---date:20240607---for【TV360X-501】省市区换新组件
// 代码逻辑说明: 【TV360X-501】省市区换新组件
if (arr?.length) {
let result: any = [];
if (props.saveCode === 'region') {
@ -129,12 +127,9 @@
} else {
send(arr);
}
// update-end--author:liaozhiyang---date:20240607---for【TV360X-501】省市区换新组件
// emitData.value = args;
//update-begin-author:taoyan date:2022-6-27 for: VUEN-1424【vue3】树表、单表、jvxe、erp 、内嵌子表省市县 选择不上
// 上面改的v-model:value导致选中数据没有显示
// state.value = result;
//update-end-author:taoyan date:2022-6-27 for: VUEN-1424【vue3】树表、单表、jvxe、erp 、内嵌子表省市县 选择不上
}
return {

View File

@ -85,9 +85,8 @@
() => {
loadItemByCode();
},
//update-begin---author:wangshuai---date:2024-06-17---for:【TV360X-480】封装表单和原生表单默认值生成有问题的字段分类字典树附默认值不生效---
// 代码逻辑说明: 【TV360X-480】封装表单和原生表单默认值生成有问题的字段分类字典树附默认值不生效---
{ deep: true, immediate: true }
//update-end---author:wangshuai---date:2024-06-17---for:【TV360X-480】封装表单和原生表单默认值生成有问题的字段分类字典树附默认值不生效---
);
watch(
() => props.pcode,
@ -222,11 +221,10 @@
backValue(value.value, value.label);
treeValue.value = value;
}
// update-begin--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
// 代码逻辑说明: 【QQYUN-9110】组件有值校验没消失
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
}
function getCurrTreeData() {

View File

@ -34,7 +34,7 @@
* 监听value
*/
watchEffect(() => {
//update-begin-author:taoyan date:2022-7-4 for:issues/I5E7YX AUTO在线表单进入功能测试之后一直卡在功能测试界面
// 代码逻辑说明: issues/I5E7YX AUTO在线表单进入功能测试之后一直卡在功能测试界面
let temp = props.value;
if(!temp && temp!==0){
checkboxArray.value = []
@ -42,12 +42,10 @@
temp = temp + '';
checkboxArray.value = temp.split(',')
}
//update-end-author:taoyan date:2022-7-4 for:issues/I5E7YX AUTO在线表单进入功能测试之后一直卡在功能测试界面
//update-begin-author:taoyan date:20220401 for: 调用表单的 resetFields不会清空当前信息界面显示上一次的数据
// 代码逻辑说明: 调用表单的 resetFields不会清空当前信息界面显示上一次的数据
if (props.value === '' || props.value === undefined) {
checkboxArray.value = [];
}
//update-end-author:taoyan date:20220401 for: 调用表单的 resetFields不会清空当前信息界面显示上一次的数据
});
/**
* 监听字典code
@ -73,13 +71,12 @@
// 根据字典code查询字典项
function loadDictOptions() {
//update-begin-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
// 代码逻辑说明: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
let temp = props.dictCode || '';
if (temp.indexOf(',') > 0 && temp.indexOf(' ') > 0) {
// 编码后 是不包含空格的
temp = encodeURI(temp);
}
//update-end-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
getDictItems(temp).then((res) => {
if (res) {
checkOptions.value = res.map((item) => ({value: item.value, label: item.text, color: item.color}));
@ -113,7 +110,7 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20230110---for【QQYUN-7799】字典组件原生组件除外加上颜色配置
// 代码逻辑说明: 【QQYUN-7799】字典组件原生组件除外加上颜色配置
.colorText {
display: inline-block;
height: 20px;
@ -124,5 +121,4 @@
color: #fff;
font-size: 12px;
}
// update-begin--author:liaozhiyang---date:20230110---for【QQYUN-7799】字典组件原生组件除外加上颜色配置
</style>

View File

@ -90,9 +90,8 @@
// 缩进格式
tabSize: 2,
// 主题,对应主题库 JS 需要提前引入
// update-begin--author:liaozhiyang---date:20240327---for【QQYUN-8639】暗黑主题适配
// 代码逻辑说明: 【QQYUN-8639】暗黑主题适配
theme: getDarkMode.value == ThemeEnum.DARK ? 'monokai' : props.theme,
// update-end--author:liaozhiyang---date:20240327---for【QQYUN-8639】暗黑主题适配
smartIndent: true, // 是否智能缩进
// 显示行号
lineNumbers: true,
@ -104,12 +103,10 @@
// 启用代码折叠相关功能:结束
// 光标行高亮
styleActiveLine: true,
// update-begin--author:liaozhiyang---date:20231201---for【issues/869】JCodeEditor组件初始化时没有设置mode
// 代码逻辑说明: 【issues/869】JCodeEditor组件初始化时没有设置mode
mode: props.language,
// update-begin--author:liaozhiyang---date:20231201---for【issues/869】JCodeEditor组件初始化时没有设置mode
// update-begin--author:liaozhiyang---date:20240603---for【TV360X-898】代码生成之后的预览改成只读
// 代码逻辑说明: 【TV360X-898】代码生成之后的预览改成只读
readOnly: props.disabled,
// update-end--author:liaozhiyang---date:20240603---for【TV360X-898】代码生成之后的预览改成只读
// 匹配括号
matchBrackets: true,
extraKeys: {
@ -145,10 +142,9 @@
}
return _props;
});
// update-begin--author:liaozhiyang---date:20230904---for【QQYUN-5955】online js增强加入代码提示
// 代码逻辑说明: 【QQYUN-5955】online js增强加入代码提示
const { codeHintingMount, codeHintingRegistry } = useCodeHinting(CodeMirror, props.keywords, props.language);
codeHintingRegistry();
// update-end--author:liaozhiyang---date:20230904---for【QQYUN-5955】online js增强加入代码提示
/**
* 监听组件值
*/
@ -162,11 +158,10 @@
);
onMounted(() => {
initialize();
// update-begin--author:liaozhiyang---date:20240318---for【QQYUN-8473】代码编辑器首次加载会有遮挡
// 代码逻辑说明: 【QQYUN-8473】代码编辑器首次加载会有遮挡
setTimeout(() => {
refresh();
}, 150);
// update-end--author:liaozhiyang---date:20240318---for【QQYUN-8473】代码编辑器首次加载会有遮挡
});
/**
@ -181,7 +176,7 @@
coder?.setValue(value ?? '');
innerValue = value;
trigger && emitChange(innerValue);
// update-begin--author:liaozhiyang---date:20240510---for【QQYUN-9231】代码编辑器有遮挡
// 代码逻辑说明: 【QQYUN-9231】代码编辑器有遮挡
setTimeout(() => {
refresh();
// 再次刷下防止小概率下遮挡问题
@ -189,7 +184,6 @@
refresh();
}, 600);
}, 400);
// update-end--author:liaozhiyang---date:20240510---for【QQYUN-9231】代码编辑器有遮挡
}
//编辑器值修改事件
@ -213,9 +207,8 @@
coder.on('change', onChange);
// 初始化成功时赋值一次
setValue(innerValue, false);
// update-begin--author:liaozhiyang---date:20230904---for【QQYUN-5955】online js增强加入代码提示
// 代码逻辑说明: 【QQYUN-5955】online js增强加入代码提示
codeHintingMount(coder);
// update-end--author:liaozhiyang---date:20230904---for【QQYUN-5955】online js增强加入代码提示
}
// 切换全屏状态
@ -223,7 +216,7 @@
isFullScreen.value = !isFullScreen.value;
}
//update-begin-author:taoyan date:2022-5-9 for: codeEditor禁用功能
// 代码逻辑说明: codeEditor禁用功能
watch(
() => props.disabled,
(val) => {
@ -232,7 +225,6 @@
}
}
);
//update-end-author:taoyan date:2022-5-9 for: codeEditor禁用功能
// 支持动态设置语言
watch(()=>props.language, (val)=>{
@ -243,13 +235,12 @@
const getBindValue = Object.assign({}, unref(props), unref(attrs));
//update-begin-author:taoyan date:2022-10-18 for: VUEN-2480【严重bug】online vue3测试的问题 8、online js增强样式问题
// 代码逻辑说明: VUEN-2480【严重bug】online vue3测试的问题 8、online js增强样式问题
function refresh(){
if(coder){
coder.refresh();
}
}
//update-end-author:taoyan date:2022-10-18 for: VUEN-2480【严重bug】online vue3测试的问题 8、online js增强样式问题
/**
* 2024-04-01
@ -370,7 +361,7 @@
max-width: 600px;
max-height: 300px;
}
// update-begin--author:liaozhiyang---date:20240327---for【QQYUN-8639】暗黑主题适配
// 代码逻辑说明: 【QQYUN-8639】暗黑主题适配
html[data-theme='dark'] {
.@{prefix-cls} {
.CodeMirror {
@ -378,5 +369,4 @@
}
}
}
// update-end--author:liaozhiyang---date:20240327---for【QQYUN-8639】暗黑主题适配
</style>

View File

@ -0,0 +1,222 @@
<!-- 多选日期 -->
<template>
<div class="j-date-multiple" ref="wrapperRef">
<!-- 显示选中项使用 ASelect 多选标签模式禁止自身下拉仅作展示与清空/删除入口 -->
<a-select
:value="displayValues"
mode="multiple"
:placeholder="placeholder"
:disabled="disabled"
allowClear
:open="false"
:getPopupContainer="getParentContainer"
v-bind="attrs"
@change="onSelectChange"
@click="openPanel"
/>
<!-- 隐形触发器仅用于承载弹出层与月份切换面板受控打开 -->
<a-date-picker
ref="pickerRef"
:value="void 0"
:open="open"
:getPopupContainer="getParentContainer"
:inputReadOnly="true"
:allowClear="false"
:disabledDate="disabledDate"
:format="format"
:showToday="false"
@openChange="onOpenChange"
class="hidden-picker"
popupClassName="j-date-multiple-popup"
>
<template #dateRender="{ current }">
<div
class="ant-picker-cell-inner jdm-cell"
:class="{ 'is-selected': isSelected(current) }"
@click.stop.prevent="onCellClick(current)"
>
{{ current.date() }}
</div>
</template>
</a-date-picker>
</div>
</template>
<script setup lang="ts">
import {computed, nextTick, onMounted, ref, watch} from 'vue';
import dayjs, {Dayjs} from 'dayjs';
import {propTypes} from '/@/utils/propTypes';
import {useAttrs} from '/@/hooks/core/useAttrs';
import {useRuleFormItem} from '/@/hooks/component/useFormItem';
import {setPopContainer} from '/@/utils';
const props = defineProps({
value: propTypes.string.def(''), // 多个日期用分隔符拼接
placeholder: propTypes.string.def('请选择日期'),
separator: propTypes.string.def(','),
format: propTypes.string.def('YYYY-MM-DD'), // 展示格式
valueFormat: propTypes.string.def('YYYY-MM-DD'), // 存储格式
disabled: propTypes.bool.def(false),
popContainer: propTypes.string.def(''),
// 透传给 DatePicker 的禁用规则
disabledDate: {
type: Function as unknown as () => (current: Dayjs) => boolean,
default: undefined,
},
});
const emit = defineEmits(['change', 'update:value']);
// attrs 透传到 ASelect 以复用大小/样式等
const attrs = useAttrs();
// 与表单校验联动
const emitData = ref<any[]>([]);
const [, , , formItemContext] = useRuleFormItem(props as any, 'value', 'change', emitData);
const wrapperRef = ref<HTMLElement | null>(null);
const pickerRef = ref();
const open = ref(false);
// 内部选中列表(存储格式字符串数组)
const selectedValueStrings = ref<string[]>([]);
// 从外部 value 初始化/同步内部选中
watch(
() => props.value,
(val) => {
if (!val) {
selectedValueStrings.value = [];
} else {
const arr = String(val)
.split(props.separator)
.map((s) => s && s.trim())
.filter((s) => !!s) as string[];
// 去重
const set = new Set(arr);
selectedValueStrings.value = Array.from(set);
}
},
{immediate: true}
);
// 展示值(格式化为 format
const displayValues = computed<string[]>(() => {
return selectedValueStrings.value.map((sv) => {
const d = dayjs(sv, props.valueFormat);
if (d.isValid()) {
return d.format(props.format);
} else {
return sv;
}
});
});
// 选择器容器:优先 popContainer其次使用本组件包裹元素
function getParentContainer(node: HTMLElement) {
if (!props.popContainer) {
return wrapperRef.value ?? node?.parentNode;
} else {
return setPopContainer(node, props.popContainer);
}
}
function openPanel() {
if (props.disabled) {
return;
}
open.value = true;
}
function onOpenChange(val: boolean) {
// 仅在外部点击时关闭;日期点击由我们拦截,不会触发默认关闭
open.value = val;
}
function isSelected(current: Dayjs) {
const key = current.format(props.valueFormat);
return selectedValueStrings.value.includes(key);
}
function onCellClick(current: Dayjs) {
if (props.disabled) {
return;
}
if (props.disabledDate && props.disabledDate(current)) {
return;
}
const key = current.format(props.valueFormat);
const idx = selectedValueStrings.value.indexOf(key);
if (idx >= 0) {
selectedValueStrings.value.splice(idx, 1);
} else {
selectedValueStrings.value.push(key);
}
triggerChange();
// 保持面板开启
nextTick(() => {
open.value = true;
});
}
function onSelectChange(nextDisplayValues: string[]) {
// 从展示值还原为存储格式
const nextStoreValues: string[] = [];
for (const dv of nextDisplayValues) {
const d = dayjs(dv, props.format);
if (d.isValid()) {
nextStoreValues.push(d.format(props.valueFormat));
}
}
// 去重
const set = new Set(nextStoreValues);
selectedValueStrings.value = Array.from(set);
triggerChange();
}
function triggerChange() {
const joined = selectedValueStrings.value.join(props.separator);
emit('change', joined);
emit('update:value', joined);
nextTick(() => {
if (formItemContext && formItemContext.onFieldChange) {
formItemContext.onFieldChange();
}
});
}
onMounted(() => {
// nothing now
});
</script>
<style lang="less">
.j-date-multiple {
position: relative;
width: 100%;
.hidden-picker {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 32px;
opacity: 0;
pointer-events: none;
}
}
.j-date-multiple-popup.ant-picker-dropdown {
.ant-picker-cell {
.ant-picker-cell-inner.jdm-cell {
&.is-selected {
color: #fff !important;
// noinspection LessUnresolvedVariable
background-color: @primary-color !important;
}
}
}
}
</style>

View File

@ -125,7 +125,6 @@
//update-end-author:taoyan date: 如果没有提供dictCode 可以走options的配置--
});
//update-begin-author:taoyan date:20220404 for: 使用useRuleFormItem定义的value会有一个问题如果不是操作设置的值而是代码设置的控件值而不能触发change事件
// 此处添加空值的change事件,即当组件调用地代码设置value为''也能触发change事件
watch(
() => props.value,
@ -136,7 +135,6 @@
}
}
);
//update-end-author:taoyan date:20220404 for: 使用useRuleFormItem定义的value会有一个问题如果不是操作设置的值而是代码设置的控件值而不能触发change事件
async function initDictData() {
let { dictCode, stringToNumber } = props;
@ -161,7 +159,6 @@
let changeValue:any;
// 兼容多选模式
//update-begin---author:wangshuai ---date:20230216 for[QQYUN-4290]公文发文:选择机关代字报错,是因为值改变触发了change事件三次导致数据发生改变------------
//采用一个值不然的话state值变换触发多个change
if (mode === 'multiple') {
changeValue = e?.target?.value ?? e;
@ -177,10 +174,8 @@
}
state.value = changeValue;
//update-begin---author:wangshuai ---date:20230403 for【issues/4507】JDictSelectTag组件使用时浏览器给出警告提示Expected Function, got Array------------
// 代码逻辑说明: 【issues/4507】JDictSelectTag组件使用时浏览器给出警告提示Expected Function, got Array------------
emit('update:value',changeValue)
//update-end---author:wangshuai ---date:20230403 for【issues/4507】JDictSelectTag组件使用时浏览器给出警告提示Expected Function, got Array述------------
//update-end---author:wangshuai ---date:20230216 for[QQYUN-4290]公文发文:选择机关代字报错,是因为值改变触发了change事件三次导致数据发生改变------------
// nextTick(() => formItemContext.onFieldChange());
}
@ -188,14 +183,13 @@
/** 单选radio的值变化事件 */
function handleChangeRadio(e) {
state.value = e?.target?.value ?? e;
//update-begin---author:wangshuai ---date:20230504 for【issues/506】JDictSelectTag 组件 type="radio" 没有返回值------------
// 代码逻辑说明: 【issues/506】JDictSelectTag 组件 type="radio" 没有返回值------------
emit('update:value',e?.target?.value ?? e)
//update-end---author:wangshuai ---date:20230504 for【issues/506】JDictSelectTag 组件 type="radio" 没有返回值------------
}
/** 用于搜索下拉框中的内容 */
function handleFilterOption(input, option) {
// update-begin--author:liaozhiyang---date:20230914---for【QQYUN-6514】 配置的时候Y轴不能输入多个字段了控制台报错
// 代码逻辑说明: 【QQYUN-6514】 配置的时候Y轴不能输入多个字段了控制台报错
if (typeof option.children === 'function') {
// 在 label 中搜索
let labelIf = option.children()[0]?.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
@ -203,7 +197,6 @@
return true;
}
}
// update-end--author:liaozhiyang---date:20230914---for【QQYUN-6514】 配置的时候Y轴不能输入多个字段了控制台报错
if (props.onlySearchByLabel) {
// 如果开启了只在 label 中搜索就不继续往下搜索value了
return false;
@ -228,7 +221,7 @@
});
</script>
<style scoped lang="less">
// update-begin--author:liaozhiyang---date:20230110---for【QQYUN-7799】字典组件原生组件除外加上颜色配置
// 代码逻辑说明: 【QQYUN-7799】字典组件原生组件除外加上颜色配置
.colorText {
display: inline-block;
height: 20px;
@ -239,5 +232,5 @@
color: #fff;
font-size: 12px;
}
// update-begin--author:liaozhiyang---date:20230110---for【QQYUN-7799】字典组件原生组件除外加上颜色配置
// 代码逻辑说明: 【QQYUN-7799】字典组件原生组件除外加上颜色配置
</style>

View File

@ -29,11 +29,10 @@
function onChange(value) {
emit('change', value);
emit('update:value', value);
// update-begin--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
// 代码逻辑说明: 【QQYUN-9110】组件有值校验没消失
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
}
return {

View File

@ -134,7 +134,7 @@
watch(
() => props.value,
(val, prevCount) => {
//update-begin---author:liusq ---date:20230601 for【issues/556】JImageUpload组件value赋初始值没显示图片------------
// 代码逻辑说明: 【issues/556】JImageUpload组件value赋初始值没显示图片------------
if (val && val instanceof Array) {
val = val.join(',');
}
@ -143,7 +143,6 @@
}
},
{ immediate: true }
//update-end---author:liusq ---date:20230601 for【issues/556】JImageUpload组件value赋初始值没显示图片------------
);
/**
@ -187,12 +186,11 @@
*/
function handleChange({ file, fileList, event }) {
initTag.value = false;
// update-begin--author:liaozhiyang---date:20231116---for【issues/846】上传多个列表只显示一个
// uploadFileList.value = fileList;
if (file.status === 'error') {
createMessage.error(`${file.name} 上传失败.`);
}
// update-begin--author:liaozhiyang---date:20240704---for【TV360X-1640】上传图片大小超出限制显示优化
// 代码逻辑说明: 【TV360X-1640】上传图片大小超出限制显示优化
if (file.status === 'done' && file.response.success === false) {
const failIndex = uploadFileList.value.findIndex((item) => item.uid === file.uid);
if (failIndex != -1) {
@ -201,7 +199,6 @@
createMessage.warning(file.response.message);
return;
}
// update-end--author:liaozhiyang---date:20240704---for【TV360X-1640】上传图片大小超出限制显示优化
let fileUrls = [];
let noUploadingFileCount = 0;
if (file.status != 'uploading') {
@ -219,14 +216,12 @@
if (noUploadingFileCount == fileList.length) {
state.value = fileUrls.join(',');
emit('update:value', fileUrls.join(','));
// update-begin---author:wangshuai ---date:20221121 for[issues/248]原生表单内使用图片组件,关闭弹窗图片组件值不会被清空------------
// 代码逻辑说明: [issues/248]原生表单内使用图片组件,关闭弹窗图片组件值不会被清空------------
nextTick(() => {
initTag.value = true;
});
// update-end---author:wangshuai ---date:20221121 for[issues/248]原生表单内使用图片组件,关闭弹窗图片组件值不会被清空------------
}
}
// update-end--author:liaozhiyang---date:20231116---for【issues/846】上传多个列表只显示一个
}
/**

View File

@ -82,10 +82,9 @@
//关闭方法
function handleClose() {
// update-begin--author:liaozhiyang---date:20231226---for【QQYUN-7477】关闭弹窗清空内容之前上传失败关闭后不会清除
// 代码逻辑说明: 【QQYUN-7477】关闭弹窗清空内容之前上传失败关闭后不会清除
closeModal();
reset();
// update-end--author:liaozhiyang---date:20231226---for【QQYUN-7477】关闭弹窗清空内容之前上传失败关闭后不会清除
}
//校验状态切换
@ -117,11 +116,10 @@
if (unref(foreignKeys) && unref(foreignKeys).length > 0) {
formData.append('foreignKeys', unref(foreignKeys));
}
// update-begin--author:liaozhiyang---date:20240429---for【issues/6124】当用户没有【Online表单开发】页面的权限时用户无权导入从表数据
// 代码逻辑说明: 【issues/6124】当用户没有【Online表单开发】页面的权限时用户无权导入从表数据
if (isObject(foreignKeys.value)) {
formData.append('foreignKeys', JSON.stringify(foreignKeys.value));
}
// update-end--author:liaozhiyang---date:20240429---for【issues/6124】当用户没有【Online表单开发】页面的权限时用户无权导入从表数据
if (!!online) {
formData.append('validateStatus', unref(validateStatus));
}

View File

@ -23,12 +23,10 @@
const attrs = useAttrs();
//表单值
const showText = ref('');
// update-begin--author:liaozhiyang---date:20231026---for【issues/803】JIput updateSchema不生效
//绑定属性
const getBindValue = computed(() => {
return omit(Object.assign({}, unref(props), unref(attrs)), ['value']);
});
// update-end--author:liaozhiyang---date:20231026---for【issues/803】JIput updateSchema不生效
//监听类型变化
watch(
() => props.type,

View File

@ -104,11 +104,10 @@
.@{prefix-cls} {
&-popover {
// update-begin--author:liaozhiyang---date:20240520---for【TV360X-144】jVxetable中的多行文本组件当title没有时去掉多余的线
// 代码逻辑说明: 【TV360X-144】jVxetable中的多行文本组件当title没有时去掉多余的线
.ant-popover-title:has(.emptyTitle) {
border-bottom: none;
}
// update-end--author:liaozhiyang---date:20240520---for【TV360X-144】jVxetable中的多行文本组件当title没有时去掉多余的线
}
&-input {

View File

@ -147,17 +147,15 @@
function handleAddRecord(e) {
prevent(e);
openListModal(true, {
// update-begin--author:liaozhiyang---date:20240517---for【TV360X-43】修复关联记录可以添加重复数据
// 代码逻辑说明: 【TV360X-43】修复关联记录可以添加重复数据
selectedRowKeys: selectRecords.value.map((item) => item.id),
selectedRows: [...selectRecords.value],
// update-end--author:liaozhiyang---date:20240517---for【TV360X-43】修复关联记录可以添加重复数据
});
}
function addCard(data) {
// update-begin--author:liaozhiyang---date:20240517---for【TV360X-43】修复关联记录可以添加重复数据
// 代码逻辑说明: 【TV360X-43】修复关联记录可以添加重复数据
let arr = [];
// update-end--author:liaozhiyang---date:20240517---for【TV360X-43】修复关联记录可以添加重复数据
for (let item of data) {
let temp = { ...item };
transData(temp);
@ -230,17 +228,15 @@
);
onMounted(() => {
// update-begin--author:liaozhiyang---date:20240522---for【TV360X-281】分辨率小时关联记录文字被图片挤没了
// 代码逻辑说明: 【TV360X-281】分辨率小时关联记录文字被图片挤没了
if (tableLinkCardRef.value.offsetWidth < 250) {
fixedSpan.value = 24;
}
// update-end--author:liaozhiyang---date:20240522---for【TV360X-281】分辨率小时关联记录文字被图片挤没了
});
// update-begin--author:liaozhiyang---date:20240529---for【TV360X-389】下拉和卡片关联记录图裂开给个默认图片
// 代码逻辑说明: 【TV360X-389】下拉和卡片关联记录图裂开给个默认图片
const handleImageError = (event) => {
event.target.src = placeholderImage;
};
// update-end--author:liaozhiyang---date:20240529---for【TV360X-389】下拉和卡片关联记录图裂开给个默认图片
return {
popTableName,

View File

@ -13,11 +13,9 @@
</template>
<BasicTable ref="tableRef" @register="registerTable" :rowSelection="rowSelection">
<!-- update-begin-author:taoyan date:2023-7-11 for: issues/4992 online表单开发 字段控件类型是关联记录 新增的时候选择列表可以添加查询么 -->
<template #tableTitle>
<a-input-search v-model:value="searchText" @search="onSearch" placeholder="请输入关键词,按回车搜索" style="width: 240px" />
</template>
<!-- update-end-author:taoyan date:2023-7-11 for: issues/4992 online表单开发 字段控件类型是关联记录 新增的时候选择列表可以添加查询么 -->
<!--操作栏-->
<template #action="{ record }">
@ -275,9 +273,8 @@
// modal数据新增完成 直接关闭list将新增的数据带回表单
function handleDataSave(data) {
console.log('handleDateSave', data);
// update-begin--author:liaozhiyang---date:20250429---for【issues/8163】关联记录新增丢失
// 代码逻辑说明: 【issues/8163】关联记录新增丢失
let arr = [data, ...selectedRows.value];
// update-end--author:liaozhiyang---date:20250429---for【issues/8163】关联记录新增丢失
emit('success', arr);
closeModal();
//reload();

View File

@ -146,9 +146,8 @@ export function useLinkTable(props) {
}
}
//添加一个空对象 为add操作占位
// update-begin--author:liaozhiyang---date:20240607---for【TV360X-1095】高级查询关联记录去掉编辑按钮及去掉记录按钮
// 代码逻辑说明: 【TV360X-1095】高级查询关联记录去掉编辑按钮及去掉记录按钮
props.editBtnShow && dataList.push({});
// update-end--author:liaozhiyang---date:20240607---for【TV360X-1095】高级查询关联记录去掉编辑按钮及去掉记录按钮
selectOptions.value = dataList;
}
@ -289,12 +288,11 @@ export function useLinkTable(props) {
function getImageSrc(item) {
if (props.imageField) {
let url = item[props.imageField];
// update-begin--author:liaozhiyang---date:20250517---for【TV360X-38】关联记录空间被关联数据优多个图片时封面图片不展示
// 代码逻辑说明: 【TV360X-38】关联记录空间被关联数据优多个图片时封面图片不展示
if (typeof url === 'string') {
// 有多张图时默认取第一张
url = url.split(',')[0];
}
// update-end--author:liaozhiyang---date:20250517---for【TV360X-38】关联记录空间被关联数据优多个图片时封面图片不展示
return getFileAccessHttpUrl(url);
}
return '';

View File

@ -42,11 +42,10 @@
function onChange(value) {
emit('change', value);
emit('update:value', value);
// update-begin--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
// 代码逻辑说明: 【QQYUN-9110】组件有值校验没消失
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
}
return {

View File

@ -6,13 +6,10 @@
<template #prefix>
<Icon icon="ant-design:cluster-outlined"></Icon>
</template>
<!-- update-begin-author:taoyan date:2022-5-31 for: VUEN-1157 popup 选中后有两个清除图标后边这个清除只是把输入框中数据清除实际值并没有清除 -->
<!-- <template #suffix>
<Icon icon="ant-design:close-circle-outlined" @click="handleEmpty" title="清空" v-if="showText"></Icon>
</template>-->
<!-- update-begin-author:taoyan date:2022-5-31 for: VUEN-1157 popup 选中后有两个清除图标后边这个清除只是把输入框中数据清除实际值并没有清除 -->
</a-input>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item>
<!--popup弹窗-->
<JPopupOnlReportModal
@ -28,7 +25,6 @@
@ok="callBack"
></JPopupOnlReportModal>
</a-form-item>
<!-- update-end--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
</div>
</template>
<script lang="ts">
@ -79,10 +75,8 @@
const [regModal, { openModal }] = useModal();
//表单值
let {code, fieldConfig } = props;
// update-begin--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新
//唯一分组groupId
const uniqGroupId = computed(() => (props.groupId ? `${props.groupId}_${code}_${fieldConfig[0]['source']}_${fieldConfig[0]['target']}` : ''));
// update-begin--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新
/**
* 判断popup配置项是否正确
*/
@ -108,9 +102,8 @@
*/
function handleOpen() {
emit('focus');
// update-begin--author:liaozhiyang---date:20240528---for【TV360X-317】禁用后JPopup和JPopupdic还可以点击出弹窗
// 代码逻辑说明: 【TV360X-317】禁用后JPopup和JPopupdic还可以点击出弹窗
!attrs.value.disabled && openModal(true);
// update-end--author:liaozhiyang---date:20240528---for【TV360X-317】禁用后JPopup和JPopupdic还可以点击出弹窗
}
/**
@ -130,9 +123,8 @@
let labels = []
for (let item of fieldConfig) {
let val = rows.map((row) => row[item.source]);
// update-begin--author:liaozhiyang---date:20230831---for【QQYUN-7535】数组只有一个且是number类型join会改变值的类型为string
// 代码逻辑说明: 【QQYUN-7535】数组只有一个且是number类型join会改变值的类型为string
val = val.length == 1 ? val[0] : val.join(',');
// update-begin--author:liaozhiyang---date:20230831---for【QQYUN-7535】数组只有一个且是number类型join会改变值的类型为string
item.target.split(',').forEach((target) => {
values[target] = val;
});
@ -154,11 +146,8 @@
props.formElRef && props.formElRef.setFieldsValue(values);
//传入赋值方法方式赋值
props.setFieldsValue && props.setFieldsValue(values);
// update-begin--author:liaozhiyang---date:20230831---for【issues/5288】popup弹框无法将选择的数据填充到自身
// update-begin--author:liaozhiyang---date:20230811---for【issues/5213】JPopup抛出change事件
// 代码逻辑说明: 【issues/5213】JPopup抛出change事件
emit('popUpChange', values);
// update-end--author:liaozhiyang---date:20230811---for【issues/5213】JPopup抛出change事件
// update-begin--author:liaozhiyang---date:20230831---for【issues/5288】popup弹框无法将选择的数据填充到自身
}
return {
@ -176,13 +165,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
// 代码逻辑说明: 【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.JPopup {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.components-input-demo-presuffix .anticon-close-circle {
cursor: pointer;
color: #ccc;

View File

@ -5,7 +5,6 @@
<a-select v-model:value="showText" v-bind="attrs" :mode="multi ? 'multiple' : ''" @click="handleOpen" readOnly :loading="loading">
<a-select-option v-for="item in options" :value="item.value">{{ item.text }}</a-select-option>
</a-select>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item>
<!--popup弹窗-->
<JPopupOnlReportModal
@ -23,7 +22,6 @@
@ok="callBack"
/>
</a-form-item>
<!-- update-end--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
</div>
</template>
<script lang="ts">
@ -85,9 +83,8 @@
* 打开pop弹出框
*/
function handleOpen() {
// update-begin--author:liaozhiyang---date:20240528---for【TV360X-317】禁用后JPopup和JPopupdic还可以点击出弹窗
// 代码逻辑说明: 【TV360X-317】禁用后JPopup和JPopupdic还可以点击出弹窗
!attrs.value.disabled && openModal(true);
// update-end--author:liaozhiyang---date:20240528---for【TV360X-317】禁用后JPopup和JPopupdic还可以点击出弹窗
}
/**
* 监听value数值
@ -211,13 +208,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
// 代码逻辑说明: 【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.JPopupDict {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.components-input-demo-presuffix {
:deep(.ant-select-dropdown) {
display: none !important;

View File

@ -42,9 +42,8 @@
function handleChange(arr){
let str = ''
if(arr && arr.length>0){
// update-begin--author:liaozhiyang---date:20240710---for[issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
// 代码逻辑说明: [issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
str = arr.join(',')
// update-end--author:liaozhiyang---date:20240710---for[issues/6368] rangeDate去掉判断允许起始项或结束项为空兼容allowEmpty
}
emit('change', str);
emit('update:value', str);

View File

@ -39,10 +39,9 @@
function emitArray() {
let arr = [];
// update-begin--author:liaozhiyang---date:20240704---for【TV360X-1749】数量0输入不了输入清空了
// 代码逻辑说明: 【TV360X-1749】数量0输入不了输入清空了
let begin = beginValue.value ?? '';
let end = endValue.value ?? '';
// update-end--author:liaozhiyang---date:20240704---for【TV360X-1749】数量0输入不了输入清空了
arr.push(begin);
arr.push(end);
emit('change', arr);
@ -75,7 +74,7 @@
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240607---for【TV360X-214】范围查询控件没有根据配置格式化
// 代码逻辑说明: 【TV360X-214】范围查询控件没有根据配置格式化
.ant-input-group {
display: flex;
.ant-input-number {
@ -89,5 +88,4 @@
}
}
}
// update-end--author:liaozhiyang---date:20240607---for【TV360X-214】范围查询控件没有根据配置格式化
</style>

View File

@ -77,33 +77,27 @@
default: (node) => node?.parentNode,
},
//默认开启Y轴溢出位置调整因此在可视空间不足时下拉框位置会自动上移导致Select的输入框被遮挡。需要注意的是默认情况是是可视空间而不是所拥有的空间
//update-begin-author:liusq date:2023-04-04 for:[issue/286]下拉搜索框遮挡问题
// 代码逻辑说明: [issue/286]下拉搜索框遮挡问题
adjustY:propTypes.bool.def(true),
//update-end-author:liusq date:2023-04-04 for:[issue/286]下拉搜索框遮挡问题
//是否在有值后立即触发change
immediateChange: propTypes.bool.def(false),
//update-begin-author:taoyan date:2022-8-15 for: VUEN-1971 【online 专项测试】关联记录和他表字段 1
//支持传入查询参数,如排序信息
params:{
type: Object,
default: ()=>{}
},
//update-end-author:taoyan date:2022-8-15 for: VUEN-1971 【online 专项测试】关联记录和他表字段 1
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
//是否为多选
multiple:{
type: Boolean,
default: false
},
//update-end---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
},
emits: ['change', 'update:value'],
setup(props, { emit, refs }) {
const options = ref<any[]>([]);
const loading = ref(false);
// update-begin--author:liaozhiyang---date:20231205---for【issues/897】JSearchSelect组件添加class/style样式不生效
// 代码逻辑说明: 【issues/897】JSearchSelect组件添加class/style样式不生效
const attrs = useAttrs({'excludeDefaultKeys': false});
// update-end--author:liaozhiyang---date:20231205---for【issues/897】JSearchSelect组件添加class/style样式不生效
const selectedValue = ref([]);
const selectedAsyncValue = ref([]);
const lastLoad = ref(0);
@ -171,20 +165,18 @@
if (!isDictTable.value) {
return;
}
// update-begin--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
// 代码逻辑说明: 【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
pageNo = 1;
isHasData = true;
searchKeyword = value;
// update-end--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
lastLoad.value += 1;
const currentLoad = unref(lastLoad);
options.value = [];
loading.value = true;
let keywordInfo = getKeywordParam(value);
//update-begin---author:chenrui ---date:2024/4/7 for[QQYUN-8800]JSearchSelect的search事件在中文输入还没拼字成功时会触发导致后端SQL注入 #6049------------
// 代码逻辑说明: [QQYUN-8800]JSearchSelect的search事件在中文输入还没拼字成功时会触发导致后端SQL注入 #6049------------
keywordInfo = keywordInfo.replaceAll("'", '');
//update-end---author:chenrui ---date:2024/4/7 for[QQYUN-8800]JSearchSelect的search事件在中文输入还没拼字成功时会触发导致后端SQL注入 #6049------------
// 字典code格式table,text,code
defHttp
.get({
@ -198,13 +190,11 @@
return;
}
options.value = res;
// update-begin--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
// 代码逻辑说明: 【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
pageNo++;
// update-end--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
} else {
// update-begin--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
// 代码逻辑说明: 【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
pageNo == 1 && (isHasData = false);
// update-end--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
}
});
}, 300);
@ -212,18 +202,16 @@
* 初始化value
*/
function initSelectValue() {
//update-begin-author:taoyan date:2022-4-24 for: 下拉搜索组件每次选中值会触发value的监听事件触发此方法但是实际不需要
// 代码逻辑说明: 下拉搜索组件每次选中值会触发value的监听事件触发此方法但是实际不需要
if (loadSelectText.value === false) {
loadSelectText.value = true;
return;
}
//update-end-author:taoyan date:2022-4-24 for: 下拉搜索组件每次选中值会触发value的监听事件触发此方法但是实际不需要
let { async, value, dict } = props;
if (async) {
if (!selectedAsyncValue || !selectedAsyncValue.key || selectedAsyncValue.key !== value) {
defHttp.get({ url: `/sys/dict/loadDictItem/${dict}`, params: { key: value } }).then((res) => {
if (res && res.length > 0) {
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
//判断组件是否为多选
if(props.multiple){
if(value){
@ -248,30 +236,25 @@
if (props.value == value) {
selectedAsyncValue.value = { ...obj };
}
//update-begin-author:taoyan date:2022-8-11 for: 值改变触发change事件--用于online关联记录配置页面
// 代码逻辑说明: 值改变触发change事件--用于online关联记录配置页面
if(props.immediateChange == true){
emit('change', props.value);
}
//update-end-author:taoyan date:2022-8-11 for: 值改变触发change事件--用于online关联记录配置页面
//update-end---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
}
}
});
}
} else {
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
// 代码逻辑说明: 【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
if(!props.multiple){
selectedValue.value = value.toString();
//update-begin-author:taoyan date:2022-8-11 for: 值改变触发change事件--用于online他表字段配置界面
if(props.immediateChange == true){
emit('change', value.toString());
}
//update-end-author:taoyan date:2022-8-11 for: 值改变触发change事件--用于online他表字段配置界面
}else{
//多选的情况下需要转成数组
selectedValue.value = value.toString().split(',');
}
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
}
}
@ -304,11 +287,10 @@
if (!dict) {
console.error('搜索组件未配置字典项');
} else {
// update-begin--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
// 代码逻辑说明: 【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
pageNo = 1;
isHasData = true;
searchKeyword = '';
// update-end--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
//异步一开始也加载一点数据
loading.value = true;
@ -322,13 +304,11 @@
loading.value = false;
if (res && res.length > 0) {
options.value = res;
// update-begin--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
// 代码逻辑说明: 【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
pageNo++;
// update-end--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
} else {
// update-begin--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
// 代码逻辑说明: 【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
pageNo == 1 && (isHasData = false);
// update-end--author:liaozhiyang---date:20240731---for【TV360X-1898】JsearchSelect组件传入字典表格式则支持滚动加载
}
});
}
@ -346,19 +326,16 @@
* 同步改变事件
* */
function handleChange(value) {
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
//多选也会触发change事件需要判断如果时多选不需要赋值
if(!props.multiple){
selectedValue.value = value;
callback();
}
//update-end---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
}
/**
* 异步改变事件
* */
function handleAsyncChange(selectedObj) {
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
// 单选情况下使用change事件
if(!props.multiple){
if (selectedObj) {
@ -371,15 +348,11 @@
loadData('');
}
callback();
// update-begin--author:liaozhiyang---date:20240524---for【TV360X-426】下拉搜索设置了默认值把查询条件删掉再点击重置没附上值
// 点x清空时需要把loadSelectText设置true
selectedObj ?? (loadSelectText.value = true);
// update-end--author:liaozhiyang---date:20240524---for【TV360X-426】下拉搜索设置了默认值把查询条件删掉再点击重置没附上值
}
//update-end---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
}
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
/**
* 异步值选中事件
* @param selectedObj
@ -422,14 +395,12 @@
callback();
}
}
//update-end---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
/**
*回调方法
* */
function callback() {
loadSelectText.value = false;
//update-begin---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
//单选直接走更新值操作
if(!props.multiple){
emit('change', unref(selectedValue));
@ -439,13 +410,12 @@
emit('change', unref(selectedValue).join(","));
emit('update:value', unref(selectedValue).join(","));
}
//update-end---author:wangshuai---date:2025-04-17---for:【issues/8101】前端dict组件导致内存溢出问题搜索组件支持多选---
}
/**
* 过滤选中option
*/
function filterOption(input, option) {
//update-begin-author:taoyan date:2022-11-8 for: issues/218 所有功能表单的下拉搜索框搜索无效
// 代码逻辑说明: issues/218 所有功能表单的下拉搜索框搜索无效
let value = '', label = '';
try {
value = option.value;
@ -455,15 +425,13 @@
}
let str = input.toLowerCase();
return value.toLowerCase().indexOf(str) >= 0 || label.toLowerCase().indexOf(str) >= 0;
//update-end-author:taoyan date:2022-11-8 for: issues/218 所有功能表单的下拉搜索框搜索无效
}
function getParentContainer(node) {
// update-begin-author:taoyan date:20220407 for: getPopupContainer一直有值 导致popContainer的逻辑永远走不进去把它挪到前面判断
// 代码逻辑说明: getPopupContainer一直有值 导致popContainer的逻辑永远走不进去把它挪到前面判断
if (props.popContainer) {
// update-begin--author:liaozhiyang---date:20240517---for【QQYUN-9339】有多个modal弹窗内都有下拉字典多选和下拉搜索组件时打开另一个modal时组件的options不展示
// 代码逻辑说明: 【QQYUN-9339】有多个modal弹窗内都有下拉字典多选和下拉搜索组件时打开另一个modal时组件的options不展示
return setPopContainer(node, props.popContainer);
// update-end--author:liaozhiyang---date:20240517---for【QQYUN-9339】有多个modal弹窗内都有下拉字典多选和下拉搜索组件时打开另一个modal时组件的options不展示
} else {
if (typeof props.getPopupContainer === 'function') {
return props.getPopupContainer(node);
@ -471,46 +439,39 @@
return node?.parentNode;
}
}
// update-end-author:taoyan date:20220407 for: getPopupContainer一直有值 导致popContainer的逻辑永远走不进去把它挪到前面判断
}
//update-begin-author:taoyan date:2022-8-15 for: VUEN-1971 【online 专项测试】关联记录和他表字段 1
//获取关键词参数 支持设置排序信息
function getKeywordParam(text){
// 如果设定了排序信息,需要写入排序信息,在关键词后加 [orderby:create_time,desc]
if(props.params && props.params.column && props.params.order){
let temp = text||''
//update-begin-author:taoyan date:2023-5-22 for: /issues/4905 表单生成器字段配置时,选择关联字段,在进行高级配置时,无法加载数据库列表,提示 Sgin签名校验错误 #4905
// 代码逻辑说明: /issues/4905 表单生成器字段配置时,选择关联字段,在进行高级配置时,无法加载数据库列表,提示 Sgin签名校验错误 #4905
temp = temp+'[orderby:'+props.params.column+','+props.params.order+']'
return encodeURI(temp);
//update-end-author:taoyan date:2023-5-22 for: /issues/4905 表单生成器字段配置时,选择关联字段,在进行高级配置时,无法加载数据库列表,提示 Sgin签名校验错误 #4905
}else{
return text;
}
}
//update-end-author:taoyan date:2022-8-15 for: VUEN-1971 【online 专项测试】关联记录和他表字段 1
// update-begin--author:liaozhiyang---date:20240523---for【TV360X-26】下拉搜索控件选中选项后再次点击下拉应该显示初始的下拉选项而不是只展示选中结果
// 代码逻辑说明: 【TV360X-26】下拉搜索控件选中选项后再次点击下拉应该显示初始的下拉选项而不是只展示选中结果
const handleAsyncFocus = () => {
// update-begin--author:liaozhiyang---date:20240709---for【issues/6681】异步查询不生效
// 代码逻辑说明: 【issues/6681】异步查询不生效
if ((isObject(selectedAsyncValue.value) || selectedAsyncValue.value?.length) && isDictTable.value && props.async) {
// update-begin--author:liaozhiyang---date:20240809---for【TV360X-2062】下拉搜索选择第二页数据后第一次点击时(得到焦点)滚动条没复原到初始位置且数据会加载第二页数据(应该只加载第一页数据)
// 代码逻辑说明: 【TV360X-2062】下拉搜索选择第二页数据后第一次点击时(得到焦点)滚动条没复原到初始位置且数据会加载第二页数据(应该只加载第一页数据)
options.value = [];
// update-end--author:liaozhiyang---date:20240809---for【TV360X-2062】下拉搜索选择第二页数据后第一次点击时(得到焦点)滚动条没复原到初始位置且数据会加载第二页数据(应该只加载第一页数据)
initDictTableData();
}
// update-begin--author:liaozhiyang---date:20240919---for【TV360X-2348】得到焦点时options选项显示第一页内容解决新增时显示非第一页内容
// 代码逻辑说明: 【TV360X-2348】得到焦点时options选项显示第一页内容解决新增时显示非第一页内容
if (Array.isArray(selectedAsyncValue.value) && selectedAsyncValue.value.length === 0 && isDictTable.value && props.async) {
if (pageNo > 2) {
options.value = [];
initDictTableData();
}
}
// update-end--author:liaozhiyang---date:20240919---for【TV360X-2348】得到焦点时options选项显示第一页内容解决新增时显示非第一页内容
attrs.onFocus?.();
};
// update-end--author:liaozhiyang---date:20240523---for【TV360X-26】下拉搜索控件选中选项后再次点击下拉应该显示初始的下拉选项而不是只展示选中结果
/**
* 2024-07-30

View File

@ -3,7 +3,7 @@
<div class="JSelectDepartPost">
<JSelectBiz @change="handleSelectChange" @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs" :isCustomRenderTag="isCustomRenderTag" :rowKey="getBindValue?.rowKey"/>
<a-form-item>
<DeptSelectModal @register="regModal" @getSelectResult="setValue" modalTitle="部门岗位选择" v-bind="getBindValue" :multiple="multiple" @close="handleClose" />
<DeptSelectModal @register="regModal" @getSelectResult="setValue" modalTitle="部门岗位选择" v-bind="getBindValue" :multiple="multiple" @close="handleClose" :izShowDepPath="izShowDepPath"/>
</a-form-item>
</div>
</template>
@ -32,6 +32,8 @@
izOnlySelectDepartPost: propTypes.bool.def(true),
// 自定义渲染tag
isCustomRenderTag: propTypes.bool.def(true),
//是否显示部门路径(用户部门选择主岗位和兼职岗位需要显示全路径)
izShowDepPath: propTypes.bool.def(false),
},
emits: ['options-change', 'change', 'select', 'update:value'],
setup(props, { emit, refs }) {

View File

@ -2,11 +2,9 @@
<template>
<div class="JSelectDept">
<JSelectBiz @change="handleSelectChange" @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs" :isCustomRenderTag="isCustomRenderTag" :rowKey="getBindValue?.rowKey"/>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item>
<DeptSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue" :multiple="multiple" @close="handleClose"/>
</a-form-item>
<!-- update-end--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
</div>
</template>
<script lang="ts">
@ -65,32 +63,26 @@
* 监听组件值
*/
watchEffect(() => {
// update-begin--author:liaozhiyang---date:20240611---for【TV360X-576】已选中了数据再次选择打开弹窗点击取消数据清空了同步JSelectDept改法
//update-begin-author:liusq---date:2024-06-03--for: [TV360X-840]用户授权,没有选择,点取消,也会回显一个选过的用户
// 代码逻辑说明: [TV360X-840]用户授权,没有选择,点取消,也会回显一个选过的用户
tempSave = [];
//update-end-author:liusq---date:2024-06-03--for:[TV360X-840]用户授权,没有选择,点取消,也会回显一个选过的用户
// update-end--author:liaozhiyang---date:20240611---for【TV360X-576】已选中了数据再次选择打开弹窗点击取消数据清空了同步JSelectDept改法
props.value && initValue();
});
//update-begin-author:liusq---date:20220609--for: 为了解决弹窗form初始化赋值问题 ---
// 代码逻辑说明: 为了解决弹窗form初始化赋值问题 ---
watch(
() => props.value,
() => {
initValue();
}
);
//update-end-author:liusq---date:20220609--for: 为了解决弹窗form初始化赋值问题 ---
/**
* 监听selectValues变化
*/
// update-begin--author:liaozhiyang---date:20240527---for【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
// watch(selectValues, () => {
// if (selectValues) {
// state.value = selectValues.value;
// }
// });
// update-end--author:liaozhiyang---date:20240527---for【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
/**
* 监听selectOptions变化
*/
@ -138,7 +130,7 @@
}
const getBindValue = Object.assign({}, unref(props), unref(attrs));
// update-begin--author:liaozhiyang---date:20240527---for【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
// 代码逻辑说明: 【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
const handleClose = () => {
if (tempSave.length) {
selectValues.value = cloneDeep(tempSave);
@ -154,13 +146,11 @@
let result = typeof props.value == 'string' ? values.join(',') : values;
emit('update:value', result);
emit('change', result);
// update-begin--author:liaozhiyang---date:20240627---for【TV360X-1648】用户编辑界面“所属部门”与“负责部门”联动出错同步之前丢的代码
// 代码逻辑说明: 【TV360X-1648】用户编辑界面“所属部门”与“负责部门”联动出错同步之前丢的代码
if (!values || values.length == 0) {
emit('select', null, null);
}
// update-end--author:liaozhiyang---date:20240627---for【TV360X-1648】用户编辑界面“所属部门”与“负责部门”联动出错同步之前丢的代码
};
// update-end--author:liaozhiyang---date:20240527---for【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
return {
// state,
@ -180,13 +170,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
// 代码逻辑说明: 【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.JSelectDept {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.j-select-row {
@width: 82px;

View File

@ -130,32 +130,29 @@
emit('input', selectedValue.join(props.spliter));
emit('update:value', selectedValue.join(props.spliter));
}
// update-begin--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
// 代码逻辑说明: 【QQYUN-9110】组件有值校验没消失
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---for【QQYUN-9110】组件有值校验没消失
}
function getParentContainer(node) {
if (!props.popContainer) {
return node?.parentNode;
} else {
// update-begin--author:liaozhiyang---date:20240517---for【QQYUN-9339】有多个modal弹窗内都有下拉字典多选和下拉搜索组件时打开另一个modal时组件的options不展示
// 代码逻辑说明: 【QQYUN-9339】有多个modal弹窗内都有下拉字典多选和下拉搜索组件时打开另一个modal时组件的options不展示
return setPopContainer(node, props.popContainer);
// update-end--author:liaozhiyang---date:20240517---for【QQYUN-9339】有多个modal弹窗内都有下拉字典多选和下拉搜索组件时打开另一个modal时组件的options不展示
}
}
// 根据字典code查询字典项
function loadDictOptions() {
//update-begin-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
// 代码逻辑说明: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
let temp = props.dictCode || '';
if (temp.indexOf(',') > 0 && temp.indexOf(' ') > 0) {
// 编码后 是不包含空格的
temp = encodeURI(temp);
}
//update-end-author:taoyan date:2022-6-21 for: 字典数据请求前将参数编码处理,但是不能直接编码,因为可能之前已经编码过了
getDictItems(temp).then((res) => {
if (res) {
dictOptions.value = res.map((item) => ({ value: item.value, label: item.text, color:item.color }));
@ -167,11 +164,10 @@
});
}
//update-begin-author:taoyan date:2022-5-31 for: VUEN-1145 下拉多选,搜索时,查不到数据
// 代码逻辑说明: VUEN-1145 下拉多选,搜索时,查不到数据
function filterOption(input, option) {
return option.children()[0].children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}
//update-end-author:taoyan date:2022-5-31 for: VUEN-1145 下拉多选,搜索时,查不到数据
return {
state,

View File

@ -2,11 +2,9 @@
<template>
<div class="JSelectPosition">
<JSelectBiz @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs" @change="(changeValue) => $emit('update:value', changeValue)"></JSelectBiz>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item>
<PositionSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue"></PositionSelectModal>
</a-form-item>
<!-- update-end--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
</div>
</template>
<script lang="ts">
@ -70,23 +68,21 @@
/**
* 监听组件值
*/
// update-begin--author:liaozhiyang---date:20250423---for【pull/8014】插槽方式弹窗中取消该数据checkbox的选中状态需要点击第二次才生效。
// 代码逻辑说明: 【pull/8014】插槽方式弹窗中取消该数据checkbox的选中状态需要点击第二次才生效。
watch(
() => props.value,
() => {
if (props.value) {
initValue();
} else {
// update-begin--author:liaozhiyang---date:20250604---for【issues/8233】resetFields时无法重置
// 代码逻辑说明: 【issues/8233】resetFields时无法重置
if (selectValues.value?.length) {
selectValues.value = [];
}
// update-end--author:liaozhiyang---date:20250604---for【issues/8233】resetFields时无法重置
}
},
{ deep: true, immediate: true }
);
// update-end--author:liaozhiyang---date:20250423---for【pull/8014】插槽方式弹窗中取消该数据checkbox的选中状态需要点击第二次才生效。
/**
* 监听selectValues变化
@ -126,9 +122,8 @@
//emitData.value = values.join(",");
state.value = values;
selectValues.value = values;
//update-begin-author:liusq date:20230517 for:选择职务组件v-model方式绑定值不生效
// 代码逻辑说明: 选择职务组件v-model方式绑定值不生效
emit('update:value', values.join(','));
//update-begin-author:liusq date:20230517 for:选择职务组件v-model方式绑定值不生效
}
@ -149,13 +144,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
// 代码逻辑说明: 【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.JSelectPosition {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.j-select-row {
@width: 82px;

View File

@ -2,11 +2,9 @@
<template>
<div class="JSelectRole">
<JSelectBiz @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs"></JSelectBiz>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item>
<RoleSelectModal @register="regModal" @getSelectResult="setValue" v-bind="getBindValue"></RoleSelectModal>
</a-form-item>
<!-- update-end--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
</div>
</template>
<script lang="ts">
@ -118,9 +116,8 @@
//emitData.value = values.join(",");
state.value = values;
selectValues.value = values;
// update-begin--author:liaozhiyang---date:20250318---for【issues/7948】修复JselectRole组件不支持双向绑定
// 代码逻辑说明: 【issues/7948】修复JselectRole组件不支持双向绑定
emit('update:value', values);
// update-end--author:liaozhiyang---date:20250318---for【issues/7948】修复JselectRole组件不支持双向绑定
}
const getBindValue = Object.assign({}, unref(props), unref(attrs));
return {
@ -139,13 +136,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
// 代码逻辑说明: 【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.JSelectRole {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.j-select-row {
@width: 82px;

View File

@ -2,7 +2,6 @@
<template>
<div class="JselectUser">
<JSelectBiz @change="handleSelectChange" @handleOpen="handleOpen" :loading="loadingEcho" v-bind="attrs"></JSelectBiz>
<!-- update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
<a-form-item>
<UserSelectModal
:rowKey="rowKey"
@ -13,7 +12,6 @@
@close="handleClose"
/>
</a-form-item>
<!-- update-end--author:liaozhiyang---date:20240515---forQQYUN-9260必填模式下会影响到弹窗内antd组件的样式 -->
</div>
</template>
<script lang="ts">
@ -48,13 +46,11 @@
type: Object,
default: () => {},
},
//update-begin---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
//排除用户id的集合
excludeUserIdList:{
type: Array,
default: () => [],
}
//update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
},
emits: ['options-change', 'change', 'update:value'],
setup(props, { emit }) {
@ -87,11 +83,8 @@
* 监听组件值
*/
watchEffect(() => {
// update-begin--author:liaozhiyang---date:20240611---for【TV360X-576】已选中了数据再次选择打开弹窗点击取消数据清空了
//update-begin-author:liusq---date:2024-06-03--for: [TV360X-840]用户授权,没有选择,点取消,也会回显一个选过的用户
// 代码逻辑说明: [TV360X-840]用户授权,没有选择,点取消,也会回显一个选过的用户
tempSave = [];
//update-end-author:liusq---date:2024-06-03--for:[TV360X-840]用户授权,没有选择,点取消,也会回显一个选过的用户
// update-end--author:liaozhiyang---date:20240611---for【TV360X-576】已选中了数据再次选择打开弹窗点击取消数据清空了
props.value && initValue();
// 查询条件重置的时候 界面显示未清空
if (!props.value) {
@ -108,7 +101,7 @@
// }
// });
//update-begin---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
// 代码逻辑说明: 【QQYUN-5685】5、离职人员可以选自己------------
const excludeUserIdList = ref<any>([]);
/**
@ -117,7 +110,6 @@
watch(()=>props.excludeUserIdList,(data)=>{
excludeUserIdList.value = data;
},{ immediate: true })
//update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
/**
* 打卡弹出框
@ -156,7 +148,7 @@
send(values);
}
const getBindValue = Object.assign({}, unref(props), unref(attrs));
// update-begin--author:liaozhiyang---date:20240517---for【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
// 代码逻辑说明: 【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
const handleClose = () => {
if (tempSave.length) {
selectValues.value = cloneDeep(tempSave);
@ -173,7 +165,6 @@
emit('update:value', result);
emit('change', result);
};
// update-end--author:liaozhiyang---date:20240517---for【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
return {
// state,
attrs,
@ -193,13 +184,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
// 代码逻辑说明: 【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.JselectUser {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---for【QQYUN-9260】必填模式下会影响到弹窗内antd组件的样式
.j-select-row {
@width: 82px;

View File

@ -71,11 +71,10 @@
*/
watch(selectValues, () => {
if (selectValues) {
// update-begin--author:liaozhiyang---date:20250616---for【QQYUN-12869】通过部门选择用户组件必填状态下选择用户后点击重置后会出校验信息
// 代码逻辑说明: 【QQYUN-12869】通过部门选择用户组件必填状态下选择用户后点击重置后会出校验信息
if (props.value === undefined && selectValues.value?.length == 0) {
return;
}
// update-end--author:liaozhiyang---date:20250616---for【QQYUN-12869】通过部门选择用户组件必填状态下选择用户后点击重置后会出校验信息
state.value = selectValues.value;
}
});

View File

@ -71,11 +71,10 @@
*/
watch(selectValues, () => {
if (selectValues) {
// update-begin--author:liaozhiyang---date:20250616---for【QQYUN-12869】通过部门选择用户组件必填状态下选择用户后点击重置后会出校验信息
// 代码逻辑说明: 【QQYUN-12869】通过部门选择用户组件必填状态下选择用户后点击重置后会出校验信息
if (props.value === undefined && selectValues.value?.length == 0) {
return;
}
// update-end--author:liaozhiyang---date:20250616---for【QQYUN-12869】通过部门选择用户组件必填状态下选择用户后点击重置后会出校验信息
state.value = selectValues.value;
}
});

View File

@ -41,14 +41,13 @@
() => props.value,
(val) => {
if (!props.query) {
// update-begin--author:liaozhiyang---date:20231226---for【QQYUN-7473】options使用[0,1],导致开关无法切换
// 代码逻辑说明: 【QQYUN-7473】options使用[0,1],导致开关无法切换
if (!val && !props.options.includes(val)) {
checked.value = false;
emitValue(props.options[1]);
} else {
checked.value = props.options[0] == val;
}
// update-end--author:liaozhiyang---date:20231226---for【QQYUN-7473】options使用[0,1],导致开关无法切换
}
},
{ immediate: true }

View File

@ -46,28 +46,22 @@
dict: propTypes.string.def('id'),
parentCode: propTypes.string.def(''),
pidField: propTypes.string.def('pid'),
//update-begin---author:wangshuai ---date:20220620 forJTreeSelect组件pidValue还原成空否则会影响自定义组件树示例------------
// 代码逻辑说明: JTreeSelect组件pidValue还原成空否则会影响自定义组件树示例------------
pidValue: propTypes.string.def(''),
//update-end---author:wangshuai ---date:20220620 forJTreeSelect组件pidValue还原成空否则会影响自定义组件树示例--------------
hasChildField: propTypes.string.def(''),
converIsLeafVal: propTypes.integer.def(1),
condition: propTypes.string.def(''),
multiple: propTypes.bool.def(false),
loadTriggleChange: propTypes.bool.def(false),
reload: propTypes.number.def(1),
//update-begin-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelect控件changeOptions方法未生效
// 代码逻辑说明: issues/4173 Online JTreeSelect控件changeOptions方法未生效
url: propTypes.string.def(''),
params: propTypes.object.def({}),
//update-end-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelect控件changeOptions方法未生效
//update-begin---author:wangshuai date: 20230202 for: 新增是否有复选框
//默认没有选择框
treeCheckAble: propTypes.bool.def(false),
//update-end---author:wangshuai date: 20230202 for: 新增是否有复选框
hiddenNodeKey: propTypes.string.def(''),
//update-begin---author:wangshuai---date:2025-09-06---for: 多选时渲染tag文本为空不渲染不支持单选---
//多选时渲染tag文本
tagRender: propTypes.func,
//update-end---author:wangshuai---date:2025-09-06---for:多选时渲染tag文本为空不渲染不支持单选---
});
const attrs = useAttrs();
const { t } = useI18n();
@ -93,7 +87,7 @@
/**
* 监听dict变化
*/
// update-begin--author:liaozhiyang---date:20240612---for【issues/1283】JtreeSelect组件初始调用了两次接口
// 代码逻辑说明: 【issues/1283】JtreeSelect组件初始调用了两次接口
watch(
() => props.dict,
() => {
@ -101,8 +95,7 @@
loadRoot();
}
);
// update-end--author:liaozhiyang---date:20240612---for【issues/1283】JtreeSelect组件初始调用了两次接口
// update-begin--author:liaozhiyang---date:20240529---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
// 代码逻辑说明: 【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
watch(
() => props.hiddenNodeKey,
() => {
@ -112,26 +105,23 @@
}
}
);
// update-end--author:liaozhiyang---date:20240529---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
//update-begin-author:taoyan date:2022-5-25 for: VUEN-1056 15、严重——online树表单添加的时候父亲节点是空的
// 代码逻辑说明: VUEN-1056 15、严重——online树表单添加的时候父亲节点是空的
watch(
() => props.reload,
async () => {
treeData.value = [];
// update-begin--author:liaozhiyang---date:20240524---for【TV360X-88】online树表重复新增时父节点数据加载不全且已开的子节点不重新加载
// 代码逻辑说明: 【TV360X-88】online树表重复新增时父节点数据加载不全且已开的子节点不重新加载
show.value = false;
nextTick(() => {
show.value = true;
});
// update-end--author:liaozhiyang---date:20240524---for【TV360X-88】online树表重复新增时父节点数据加载不全且已开的子节点不重新加载
await loadRoot();
},
{
immediate: false,
}
);
//update-end-author:taoyan date:2022-5-25 for: VUEN-1056 15、严重——online树表单添加的时候父亲节点是空的
/**
* 根据code获取下拉数据并回显
@ -144,11 +134,11 @@
treeValue.value = { label: null, value: null };
}
} else {
//update-begin-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelect控件changeOptions方法未生效
// 代码逻辑说明: issues/4173 Online JTreeSelect控件changeOptions方法未生效
if(props.url){
getItemFromTreeData();
}else{
// update-begin--author:liaozhiyang---date:20250423---for【issues/8093】选择节点后会先变成编码再显示label文字
// 代码逻辑说明: 【issues/8093】选择节点后会先变成编码再显示label文字
if (props.value) {
if (isArray(treeValue.value)) {
let isNotRequestTransform = false;
@ -164,11 +154,9 @@
}
}
}
// update-end--author:liaozhiyang---date:20250423---for【issues/8093】选择节点后会先变成编码再显示label文字
let params = { key: props.value };
let result = await defHttp.get({ url: `${Api.view}${props.dict}`, params }, { isTransformResponse: false });
if (result.success) {
//update-start-author:liaozhiyang date:2023-7-17 for:【issues/5141】使用JtreeSelect 组件 控制台报错
if(props.multiple){
let values = props.value.split(',');
treeValue.value = result.result.map((item, index) => ({
@ -179,11 +167,9 @@
}else{
treeValue.value = { key: props.value, value: props.value, label: translateTitle(result.result[0]) };
}
//update-end-author:liaozhiyang date:2023-7-17 for:【issues/5141】使用JtreeSelect 组件 控制台报错
onLoadTriggleChange(result.result[0]);
}
}
//update-end-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelect控件changeOptions方法未生效
}
}
@ -225,9 +211,8 @@
i.value = i.key;
i.isLeaf = !!i.leaf;
}
// update-begin--author:liaozhiyang---date:20240523---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
// 代码逻辑说明: 【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
handleHiddenNode(res.result);
// update-end--author:liaozhiyang---date:20240523---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
treeData.value = [...res.result];
} else {
console.log('数根节点查询结果异常', res);
@ -272,9 +257,8 @@
i.value = i.key;
i.isLeaf = !!i.leaf;
}
// update-begin--author:liaozhiyang---date:20240523---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
// 代码逻辑说明: 【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
handleHiddenNode(res.result);
// update-end--author:liaozhiyang---date:20240523---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
//添加子节点
addChildren(pid, res.result, treeData.value);
treeData.value = [...treeData.value];
@ -313,7 +297,7 @@
} else {
emitValue(value.value);
}
// update-begin--author:liaozhiyang---date:20250423---for【issues/8093】删除后会先变成编码再显示label文字
// 代码逻辑说明: 【issues/8093】删除后会先变成编码再显示label文字
if (isArray(value)) {
// 编辑删除时有选中的值是异步第二级以上的会不显示label
value.forEach((item) => {
@ -328,7 +312,6 @@
} else {
treeValue.value = value;
}
// update-end--author:liaozhiyang---date:20250423---for【issues/8093】删除后会先变成编码再显示label文字
}
function emitValue(value) {
@ -368,7 +351,7 @@
});
}
//update-begin-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelect控件changeOptions方法未生效
// 代码逻辑说明: issues/4173 Online JTreeSelect控件changeOptions方法未生效
watch(()=>props.url, async (val)=>{
if(val){
await loadRootByUrl();
@ -388,9 +371,8 @@
i.key = i.value;
i.isLeaf = !!i.leaf;
}
// update-begin--author:liaozhiyang---date:20240523---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
// 代码逻辑说明: 【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
handleHiddenNode(res.result);
// update-end--author:liaozhiyang---date:20240523---for【TV360X-87】树表编辑时不可选自己及子孙节点当父节点
treeData.value = [...res.result];
} else {
console.log('数根节点查询结果异常', res);
@ -431,7 +413,6 @@
}
}
}
//update-end-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelect控件changeOptions方法未生效
/**
* 2024-05-23

View File

@ -97,19 +97,17 @@
});
// 合并 props 和 attrs
const bindProps = computed(() => {
//update-begin-author:liusq date:20220411 for: [issue/455]上传组件传入accept限制上传文件类型无效
// 代码逻辑说明: [issue/455]上传组件传入accept限制上传文件类型无效
const bind: any = Object.assign({}, props, unref(attrs));
//update-end-author:liusq date:20220411 for: [issue/455]上传组件传入accept限制上传文件类型无效
bind.name = 'file';
bind.listType = isImageMode.value ? 'picture-card' : 'text';
bind.class = [bind.class, { 'upload-disabled': props.disabled }];
bind.data = { biz: props.bizPath, ...bind.data };
//update-begin-author:taoyan date:20220407 for: 自定义beforeUpload return false并不能中断上传过程
// 代码逻辑说明: 自定义beforeUpload return false并不能中断上传过程
if (!bind.beforeUpload) {
bind.beforeUpload = onBeforeUpload;
}
//update-end-author:taoyan date:20220407 for: 自定义beforeUpload return false并不能中断上传过程
// 如果当前是图片上传模式,就只能上传图片
if (isImageMode.value && !bind.accept) {
bind.accept = 'image/*';
@ -127,13 +125,12 @@
parseArrayValue(val);
}
} else {
//update-begin---author:liusq ---date:20230914 for[issues/5327]Upload组件returnUrl为false时上传的字段值返回了一个'[object Object]' ------------
// 代码逻辑说明: [issues/5327]Upload组件returnUrl为false时上传的字段值返回了一个'[object Object]' ------------
if (props.returnUrl) {
parsePathsValue(val);
} else {
val && parseArrayValue(JSON.parse(val));
}
//update-end---author:liusq ---date:20230914 for[issues/5327]Upload组件returnUrl为false时上传的字段值返回了一个'[object Object]' ------------
}
},
{ immediate: true }
@ -202,9 +199,8 @@
return;
}
let list: any[] = [];
// update-begin--author:liaozhiyang---date:20250325---for【issues/7990】图片参数中包含逗号会错误的识别成多张图
// 代码逻辑说明: 【issues/7990】图片参数中包含逗号会错误的识别成多张图
const result = split(paths);
// update-end--author:liaozhiyang---date:20250325---for【issues/7990】图片参数中包含逗号会错误的识别成多张图
for (const item of result) {
let url = getFileAccessHttpUrl(item);
list.push({
@ -309,10 +305,8 @@
} else if (info.file.status === 'error') {
createMessage.error(`${info.file.name} 上传失败.`);
}
// update-begin--author:liaozhiyang---date:20240628---for【issues/1273】上传组件JUpload配置beforeUpload阻止了上传前端页面中还是显示缩略图
// beforeUpload 返回false则没有status
info.file.status && (fileList.value = fileListTemp);
// update-end--author:liaozhiyang---date:20240628---for【issues/1273】上传组件JUpload配置beforeUpload阻止了上传前端页面中还是显示缩略图
if (info.file.status === 'done' || info.file.status === 'removed') {
//returnUrl为true时仅返回文件路径
if (props.returnUrl) {
@ -332,9 +326,8 @@
return;
}
}
//update-begin---author:liusq ---date:20230914 for[issues/5327]Upload组件returnUrl为false时上传的字段值返回了一个'[object Object]' ------------
// 代码逻辑说明: [issues/5327]Upload组件returnUrl为false时上传的字段值返回了一个'[object Object]' ------------
emitValue(JSON.stringify(newFileList));
//update-end---author:liusq ---date:20230914 for[issues/5327]Upload组件returnUrl为false时上传的字段值返回了一个'[object Object]' ------------
}
}
}

View File

@ -27,8 +27,8 @@
v-bind="attrs"
>
<template v-if="isCustomRenderTag" #tagRender="{ label, value, option}">
<a-tag class="ant-select-selection-item">
<span class="ant-select-selection-item-content" style="font-size: 14px;max-width: 300px" :title="tagRender(label, value, option)">{{ tagRender(label, value, option) }}</span>
<a-tag class="ant-select-selection-item" style="margin-right: 4px">
<span class="ant-select-selection-item-content" style="font-size: 14px;max-width: 300px" :title="tagRender(label, value, false)">{{ tagRender(label, value, true) }}</span>
<span class="ant-select-selection-item-remove">
<Icon icon="ant-design:close-outlined" size="12" @click="handleRemoveClick(value)"></Icon>
</span>
@ -79,11 +79,9 @@
buttonIcon: propTypes.string.def(''),
// 【TV360X-1002】是否是详情模式
isDetailsMode: propTypes.bool.def(false),
//update-begin---author:wangshuai---date:2025-09-06---for: 多选时是否自定义渲染tag文本为空不渲染不支持单选---
//是否自定义渲染tag
isCustomRenderTag: propTypes.bool.def(false),
rowKey: propTypes.string.def('id'),
//update-end---author:wangshuai---date:2025-09-06---for:多选时是否自定义渲染tag文本为空不渲染不支持单选---
},
emits: ['handleOpen', 'change'],
setup(props, { emit, refs }) {

View File

@ -17,8 +17,8 @@
:checkStrictly="getCheckStrictly"
:key="reloadKey"
>
<template #title="{ orgCategory, title }">
<TreeIcon :orgCategory="orgCategory" :title="title"></TreeIcon>
<template #title="{ orgCategory, title, orgCode }">
<TreeIcon :orgCategory="orgCategory" :title="getTitle(orgCategory, title, orgCode)"></TreeIcon>
</template>
</BasicTree>
<!--树操作部分-->
@ -30,6 +30,8 @@
<a-menu-item v-if="multiple" key="2" @click="checkALL(false)">取消全选</a-menu-item>
<a-menu-item key="3" @click="expandAll(true)">展开全部</a-menu-item>
<a-menu-item key="4" @click="expandAll(false)">折叠全部</a-menu-item>
<a-menu-item v-if="multiple" key="5" @click="toggleCheckStrictly(false)">层级关联</a-menu-item>
<a-menu-item v-if="multiple" key="6" @click="toggleCheckStrictly(true)">层级独立</a-menu-item>
</a-menu>
</template>
<a-button style="float: left"> 树操作 <Icon icon="ant-design:up-outlined" /> </a-button>
@ -39,7 +41,7 @@
</div>
</template>
<script lang="ts">
import { defineComponent, ref, unref } from 'vue';
import { defineComponent, ref, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { queryDepartTreeSync, queryTreeList, queryDepartAndPostTreeSync } from '/@/api/common/api';
import { useAttrs } from '/@/hooks/core/useAttrs';
@ -49,6 +51,7 @@
import {propTypes} from "/@/utils/propTypes";
import { omit } from 'lodash-es';
import TreeIcon from '@/components/Form/src/jeecg/components/TreeIcon/TreeIcon.vue';
import { getDepartPathNameByOrgCode } from "@/utils/common/compUtils";
export default defineComponent({
name: 'DeptSelectModal',
@ -64,18 +67,22 @@
type: String,
default: '部门选择',
},
// update-begin--author:liaozhiyang---date:20231220---for【QQYUN-7678】部门组件内容过多没有滚动条给一个默认最大高
// 代码逻辑说明: 【QQYUN-7678】部门组件内容过多没有滚动条给一个默认最大高
maxHeight: {
type: Number,
default: 500,
},
// update-end--author:liaozhiyang---date:20231220---for【QQYUN-7678】部门组件内容过多没有滚动条给一个默认最大高
value: propTypes.oneOfType([propTypes.string, propTypes.array]),
//查询参数
params: {
type: Object,
default: () => ({}),
},
//是否显示部门路径(用户部门选择主岗位和兼职岗位需要显示全路径)
izShowDepPath: {
type: Boolean,
default: false,
},
},
emits: ['register', 'getSelectResult', 'close'],
setup(props, { emit }) {
@ -86,20 +93,18 @@
//加载树key
const reloadKey = ref<number>(Math.random());
//update-begin-author:taoyan date:2022-10-28 for: 部门选择警告类型不匹配
// 代码逻辑说明: 部门选择警告类型不匹配
let propValue = props.value === ''?[]:props.value;
// 确保传递给BasicTree的value是数组格式
if (propValue && typeof propValue === 'string') {
propValue = propValue.split(',');
}
//update-begin-author:liusq date:2023-05-26 for: [issues/538]JSelectDept组件受 dynamicDisabled 影响
// 代码逻辑说明: [issues/538]JSelectDept组件受 dynamicDisabled 影响
let temp = Object.assign({}, unref(props), unref(attrs), {value: propValue},{disabled: false});
const getBindValue = omit(temp, 'multiple');
//update-end-author:liusq date:2023-05-26 for: [issues/538]JSelectDept组件受 dynamicDisabled 影响
//update-end-author:taoyan date:2022-10-28 for: 部门选择警告类型不匹配
const queryUrl = getQueryUrl();
const [{ visibleChange, checkedKeys, getCheckStrictly, getSelectTreeData, onCheck, onLoadData, treeData, checkALL, expandAll, onSelect, onSearch, expandedKeys }] =
const [{ visibleChange, checkedKeys, getCheckStrictly, getSelectTreeData, onCheck, onLoadData, treeData, checkALL, expandAll, onSelect, onSearch, expandedKeys, checkStrictly }] =
useTreeBiz(treeRef, queryUrl, getBindValue, props, emit);
const searchInfo = ref(props.params || {});
const tree = ref([]);
@ -123,9 +128,8 @@
/** 获取查询数据方法 */
function getQueryUrl() {
let queryFn = props.izOnlySelectDepartPost ? queryDepartAndPostTreeSync :props.sync ? queryDepartTreeSync : queryTreeList;
//update-begin-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑查看数据应该显示部门名称不是部门代码
// 代码逻辑说明: issues/I5F3P4 online配置部门选择后编辑查看数据应该显示部门名称不是部门代码
return (params) => queryFn(Object.assign({}, params, { primaryKey: props.rowKey }));
//update-end-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑查看数据应该显示部门名称不是部门代码
}
/**
@ -137,6 +141,44 @@
reloadKey.value = Math.random();
}
}
/**
* 设置层级关联和层级独立
*
* @param value
*/
function toggleCheckStrictly(value) {
checkStrictly.value = value;
}
//标题缓存
const titleCache = reactive<Record<string, string>>({});
/**
* 获取标题
* @param orgCategory
* @param title
* @param orgCode
*/
function getTitle(orgCategory, title, orgCode) {
if(props.izShowDepPath && orgCategory === '2'){
const cached = titleCache[orgCode];
if (cached){
return cached;
}
getDepartPathNameByOrgCode(orgCode,title,"").then(res=>{
if(res){
titleCache[orgCode] = title + "(" + res.substring(0, res.lastIndexOf('/')) + ")";
}else{
titleCache[orgCode] = title;
}
});
return title;
} else {
return title;
}
}
return {
tree,
handleOk,
@ -158,6 +200,8 @@
onSearch,
reloadKey,
handelSearchChange,
toggleCheckStrictly,
getTitle,
};
},
});

View File

@ -109,11 +109,10 @@
const toggleSearchStatus = ref(false);
const attrs = useAttrs();
const tableScroll = ref({ x: true });
// update-begin--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新
// 代码逻辑说明: 【issues/675】子表字段Popup弹框数据不更新
const getBindValue = computed(() => {
return Object.assign({}, unref(props), unref(attrs));
});
// update-end--author:liaozhiyang---date:20230811---for【issues/675】子表字段Popup弹框数据不更新
const [
{
visibleChange,
@ -159,12 +158,11 @@
watch(
() => props.param,
() => {
// update-begin--author:liaozhiyang---date:20231213---for【issues/901】JPopup组件配置param参数后异常
// 代码逻辑说明: 【issues/901】JPopup组件配置param参数后异常
if (visible.value) {
dynamicParamHandler();
loadData();
}
// update-end--author:liaozhiyang---date:20231213---for【issues/901】JPopup组件配置param参数后异常
}
);
/**
@ -189,7 +187,7 @@
}
});
//update-begin-author:taoyan date:2022-5-31 for: VUEN-1156 popup 多数据有分页时选中其他页关闭popup 再点开,分页仍然选中上一次点击的分页,但数据是第一页的数据 未刷新
// 代码逻辑说明: VUEN-1156 popup 多数据有分页时选中其他页关闭popup 再点开,分页仍然选中上一次点击的分页,但数据是第一页的数据 未刷新
watch(
() => pagination.current,
(current) => {
@ -200,7 +198,6 @@
}
}
);
//update-end-author:taoyan date:2022-5-31 for: VUEN-1156 popup 多数据有分页时选中其他页关闭popup 再点开,分页仍然选中上一次点击的分页,但数据是第一页的数据 未刷新
function handleToggleSearch() {
toggleSearchStatus.value = !unref(toggleSearchStatus);
@ -212,9 +209,8 @@
closeModal();
checkedKeys.value = [];
selectRows.value = [];
// update-begin--author:liaozhiyang---date:20230908---for【issues/742】选择后删除默认仍然存在
// 代码逻辑说明: 【issues/742】选择后删除默认仍然存在
tableRef.value.clearSelectedRowKeys();
// update-end--author:liaozhiyang---date:20230908---for【issues/742】选择后删除默认仍然存在
}
/**
@ -230,10 +226,9 @@
createMessage.warning('至少选择一条记录');
return false;
}
//update-begin-author:taoyan date:2022-5-31 for: VUEN-1155 popup 选择数据时,会选择多条重复数据
// 代码逻辑说明: VUEN-1155 popup 选择数据时,会选择多条重复数据
let rows = getOkSelectRows!();
emit('ok', rows);
//update-end-author:taoyan date:2022-5-31 for: VUEN-1155 popup 选择数据时,会选择多条重复数据
handleCancel();
}
@ -284,7 +279,7 @@
createImgPreview({ imageList: imgList });
}
}
// update-begin--author:liaozhiyang---date:20250415--for【issues/3656】popupdict回显
// 代码逻辑说明: 【issues/3656】popupdict回显
watchEffect(() => {
if (props.selected && props.rowkey) {
const selected = props.multi ? props.selected : [props.selected];
@ -292,7 +287,6 @@
selectRows!.value = selected;
}
});
// update-end--author:liaozhiyang---date:20250415--for【issues/3656】popupdict回显
return {
attrs,
register,

View File

@ -47,7 +47,7 @@
<template v-for="item in searchResult.depart" :key="item.id">
<div class="search-depart-item" @click="handleSearchDepartClick(item)">
<a-checkbox v-model:checked="item.checked" @click.stop @change="($event) => handleSearchDepartCheck($event, item)" />
<div class="search-depart-item-name">{{ item.departName }}</div>
<div class="search-depart-item-name">{{ getDepartName(item.departName, item.departNameAbbr) }}</div>
<RightOutlined />
</div>
</template>
@ -62,16 +62,18 @@
</template>
</template>
<template v-else>
<a-breadcrumb v-if="breadcrumb.length">
<a-breadcrumb-item @click="handleBreadcrumbClick()">
<HomeOutlined />
</a-breadcrumb-item>
<template v-for="item in breadcrumb" :key="item?.id">
<a-breadcrumb-item @click="handleBreadcrumbClick(item)">
<span>{{ item.departName }}</span>
<div ref="breadcrumbBoxRef">
<a-breadcrumb v-if="breadcrumb.length">
<a-breadcrumb-item @click="handleBreadcrumbClick()">
<HomeOutlined />
</a-breadcrumb-item>
</template>
</a-breadcrumb>
<template v-for="item in breadcrumb" :key="item?.id">
<a-breadcrumb-item @click="handleBreadcrumbClick(item)">
<span>{{ getDepartName(item.departName, item.departNameAbbr) }}</span>
</a-breadcrumb-item>
</template>
</a-breadcrumb>
</div>
<div v-if="currentDepartUsers.length">
<!-- 当前部门用户树 -->
<div class="depart-users-tree">
@ -96,7 +98,7 @@
<template v-for="item in currentDepartTree" :key="item.id">
<div class="depart-tree-item" @click="handleDepartTreeClick(item)">
<a-checkbox v-model:checked="item.checked" @click.stop @change="($event) => handleDepartTreeCheck($event, item)" />
<div class="depart-tree-item-name">{{ item.departName }}</div>
<div class="depart-tree-item-name">{{ getDepartName(item.departName, item.departNameAbbr) }}</div>
<RightOutlined />
</div>
</template>
@ -130,7 +132,7 @@
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { ref, reactive, watch } from 'vue';
import { RightOutlined, HomeOutlined, CloseOutlined } from '@ant-design/icons-vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { queryTreeList, getTableList as getTableListOrigin } from '/@/api/common/api';
@ -164,6 +166,11 @@
type: Object,
default: () => {},
},
// 是否启用公司简称
useCompanyShortName: {
type: Boolean,
default: true,
},
//最大选择数量
maxSelectCount: {
type: Number,
@ -198,6 +205,8 @@
depart: [],
user: [],
});
// 面包屑框
const breadcrumbBoxRef = ref();
// 映射部门和人员的关系
const cacheDepartUser = {};
//注册弹框
@ -361,7 +370,7 @@
}
});
}
currentDepartUsers.value = result;
currentDepartUsers.value = result.sort((a, b) => a.sort - b.sort );
});
} else {
// 没有子节点,则显示用户
@ -382,7 +391,7 @@
}
});
currentDepartAllUsers.value = checked;
currentDepartUsers.value = res.records;
currentDepartUsers.value = res.records.sort((a, b) => a.sort - b.sort );
}
});
}
@ -467,6 +476,17 @@
const result = currentDepartUsers.value.every((item: any) => !!item.checked);
currentDepartAllUsers.value = result;
};
watch(breadcrumb, () => {
setTimeout(() => {
breadcrumbScrollToRight();
}, 0);
});
const breadcrumbScrollToRight = () => {
const olEle = breadcrumbBoxRef.value?.querySelector('ol');
if (olEle) {
olEle.scrollLeft = 30000;
}
};
// 解析参数
const parseParams = (params) => {
if (props?.params) {
@ -542,7 +562,7 @@
const result: any[] = [];
const search = (nodes: any[]) => {
for (const node of nodes) {
if (node.departName?.toLowerCase().includes(name.toLowerCase())) {
if (getDepartName(node.departName, node.departNameAbbr)?.toLowerCase().includes(name.toLowerCase())) {
result.push(node);
}
if (node.children?.length) {
@ -568,6 +588,13 @@
}
return null;
};
// 获取部门名称(如果启用公司简称且公司简称不为空,则返回公司简称)
function getDepartName(departName, departNameAbbr) {
if (props.useCompanyShortName && departNameAbbr) {
return departNameAbbr;
}
return departName;
}
</script>
<style lang="less">
.JSelectUserByDepartmentModal {
@ -603,9 +630,34 @@
:deep(.ant-breadcrumb) {
font-size: 12px;
margin-left: 16px;
margin-right: 16px;
color: inherit;
cursor: pointer;
ol {
flex-wrap: nowrap;
overflow-x: auto;
/* 美化滚动条 */
&::-webkit-scrollbar {
width: 4px;
height: 3px;
background: #f5f5f5;
border-radius: 2px;
}
&::-webkit-scrollbar-thumb {
background: #bfbfbf;
border-radius: 3px;
transition: background-color 0.2s ease;
&:hover {
background: #999;
}
}
&::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 3px;
}
}
li {
flex: none;
.ant-breadcrumb-link {
cursor: pointer;
&:hover {
@ -777,7 +829,7 @@
}
.selected-users {
flex: 1;
overflow-y: auto;
overflow: hidden auto;
}
.content {
display: grid;

View File

@ -100,7 +100,7 @@
xl: 10,
xxl: 10,
},
//update-begin-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
// 代码逻辑说明: [issues/5514]组件页面显示错位
actionColOptions: {
xs: 24,
sm: 8,
@ -109,7 +109,6 @@
xl: 8,
xxl: 8,
},
//update-end-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
schemas: [
{
label: '职务名称',

View File

@ -67,7 +67,7 @@
xl: 14,
xxl: 14,
},
//update-begin-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
// 代码逻辑说明: [issues/5514]组件页面显示错位
actionColOptions: {
xs: 24,
sm: 8,
@ -76,7 +76,6 @@
xl: 8,
xxl: 8,
},
//update-end-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
schemas: [
{
label: '角色名称',

View File

@ -25,7 +25,7 @@
<a-col :md="17" :sm="24">
<a-card :style="{ minHeight: '613px', overflow: 'auto' }">
<!--用户列表-->
<BasicTable ref="tableRef" v-bind="getBindValue" :searchInfo="searchInfo" :api="getTableList" :rowSelection="rowSelection"></BasicTable>
<BasicTable ref="tableRef" v-bind="getBindValue" :searchInfo="searchInfo" :api="getTableList" :rowSelection="rowSelection" :defSort="{ column: '', order: '' }"></BasicTable>
</a-card>
</a-col>
</a-row>
@ -97,6 +97,12 @@
{
title: '手机号码',
dataIndex: 'phone',
customRender:( { record, text })=>{
if(record.izHideContact && record.izHideContact === '1'){
return '/';
}
return text;
}
// width: 50,
},
],
@ -116,7 +122,7 @@
xl: 6,
xxl: 8,
},
//update-begin-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
// 代码逻辑说明: [issues/5514]组件页面显示错位
actionColOptions: {
xs: 24,
sm: 12,
@ -125,7 +131,6 @@
xl: 8,
xxl: 8,
},
//update-end-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
schemas: [
{
label: '账号',

View File

@ -103,6 +103,12 @@
{
title: '手机号码',
dataIndex: 'phone',
customRender:( { record, text })=>{
if(record.izHideContact && record.izHideContact === '1'){
return '/';
}
return text;
}
},
],
useSearchForm: true,
@ -121,7 +127,7 @@
xl: 6,
xxl: 10,
},
//update-begin-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
// 代码逻辑说明: [issues/5514]组件页面显示错位
actionColOptions: {
xs: 24,
sm: 12,
@ -130,7 +136,6 @@
xl: 8,
xxl: 8,
},
//update-end-author:liusq date:2023-10-30 for: [issues/5514]组件页面显示错位
schemas: [
{
label: '账号',

View File

@ -6,7 +6,7 @@
@register="register"
:title="modalTitle"
:width="showSelected ? '1200px' : '900px'"
wrapClassName="j-user-select-modal"
:wrapClassName="modalWrapClassName"
@ok="handleOk"
@cancel="handleCancel"
:maxHeight="maxHeight"
@ -30,10 +30,9 @@
:indexColumnProps="indexColumnProps"
:afterFetch="afterFetch"
:beforeFetch="beforeFetch"
:defSort="{ column: '', order: '' }"
>
<!-- update-begin-author:taoyan date:2022-5-25 for: VUEN-1112一对多 用户选择 未显示选择条数及清空 -->
<template #tableTitle></template>
<!-- update-end-author:taoyan date:2022-5-25 for: VUEN-1112一对多 用户选择 未显示选择条数及清空 -->
</BasicTable>
</a-col>
<a-col :span="showSelected ? 6 : 0">
@ -78,22 +77,29 @@
type: String,
default: '选择用户',
},
//update-begin---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
//排除用户id的集合
excludeUserIdList: {
type: Array,
default: [],
},
//update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
// wrap类名
modalWrapClassName: {
type: String,
default: 'j-user-select-modal',
},
// 查询table数据使用的自定义接口
customListApi: {type: Function},
// 自定义接口的查询条件是否使用 JInput
customApiJInput: {type: Boolean, default: true},
// 自定义表单配置条件
customFormConfig: {type: Object},
// 自定义表格列
customTableColumns: {type: Array},
},
emits: ['register', 'getSelectResult', 'close'],
setup(props, { emit, refs }) {
// update-begin-author:taoyan date:2022-5-24 for: VUEN-1086 【移动端】用户选择 查询按钮 效果不好 列表展示没有滚动条
// 代码逻辑说明: VUEN-1086 【移动端】用户选择 查询按钮 效果不好 列表展示没有滚动条
const tableScroll = ref<any>({ x: false });
const tableRef = ref();
const maxHeight = ref(600);
@ -107,15 +113,13 @@
} else {
tableScroll.value = { x: false };
}
//update-begin-author:taoyan date:2022-6-2 for: VUEN-1112 一对多 用户选择 未显示选择条数,及清空
// 代码逻辑说明: VUEN-1112 一对多 用户选择 未显示选择条数,及清空
setTimeout(() => {
if (tableRef.value) {
tableRef.value.setSelectedRowKeys(selectValues['value'] || []);
}
}, 800);
//update-end-author:taoyan date:2022-6-2 for: VUEN-1112 一对多 用户选择 未显示选择条数,及清空
});
// update-end-author:taoyan date:2022-5-24 for: VUEN-1086 【移动端】用户选择 查询按钮 效果不好 列表展示没有滚动条
const attrs = useAttrs();
//表格配置
const config = {
@ -130,15 +134,13 @@
emit
);
const searchInfo = ref(props.params);
// update-begin--author:liaozhiyang---date:20230811---for【issues/657】右侧选中列表删除无效
// 代码逻辑说明: 【issues/657】右侧选中列表删除无效
watch(rowSelection.selectedRowKeys, (newVal) => {
//update-begin---author:wangshuai ---date: 20230829 fornull指针异常导致控制台报错页面不显示------------
// 代码逻辑说明: null指针异常导致控制台报错页面不显示------------
if(tableRef.value){
tableRef.value.setSelectedRowKeys(newVal);
}
//update-end---author:wangshuai ---date: 20230829 fornull指针异常导致控制台报错页面不显示------------
});
// update-end--author:liaozhiyang---date:20230811---for【issues/657】右侧选中列表删除无效
//查询form
const formConfig = {
baseColProps: {
@ -149,7 +151,7 @@
xl: 6,
xxl: 6,
},
//update-begin-author:taoyan date:2022-5-24 for: VUEN-1086 【移动端】用户选择 查询按钮 效果不好 列表展示没有滚动条---查询表单按钮的栅格布局和表单的保持一致
// 代码逻辑说明: VUEN-1086 【移动端】用户选择 查询按钮 效果不好 列表展示没有滚动条---查询表单按钮的栅格布局和表单的保持一致
actionColOptions: {
xs: 24,
sm: 8,
@ -158,7 +160,6 @@
xl: 8,
xxl: 8,
},
//update-end-author:taoyan date:2022-5-24 for: VUEN-1086 【移动端】用户选择 查询按钮 效果不好 列表展示没有滚动条---查询表单按钮的栅格布局和表单的保持一致
schemas: [
{
label: '账号',
@ -171,10 +172,12 @@
component: (hasCustomApi.value && !props.customApiJInput) ? 'Input' : 'JInput',
},
],
autoSubmitOnEnter: true
autoSubmitOnEnter: true,
...props.customFormConfig,
};
//定义表格列
const columns = [
const columns = props.customTableColumns?.length ? props.customTableColumns : [
{
title: '用户账号',
dataIndex: 'username',
@ -195,10 +198,22 @@
title: '手机号码',
dataIndex: 'phone',
width: 120,
customRender:( { record, text })=>{
if(record.izHideContact && record.izHideContact === '1'){
return '/';
}
return text;
}
},
{
title: '邮箱',
dataIndex: 'email',
customRender:( { record, text })=>{
if(record.izHideContact && record.izHideContact === '1'){
return text?'/':'';
}
return text;
}
// width: 40,
},
{
@ -243,7 +258,6 @@
});
}
//update-begin---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
/**
* 用户返回结果逻辑查询
*/
@ -264,19 +278,15 @@
}
return record;
}
// update-begin--author:liaozhiyang---date:20240517---forQQYUN-9366用户选择组件取消和关闭会把选择数据带入
// 代码逻辑说明: QQYUN-9366用户选择组件取消和关闭会把选择数据带入
const handleCancel = () => {
emit('close');
};
// update-end--author:liaozhiyang---date:20240517---for【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
//update-end---author:wangshuai ---date:20230703 for【QQYUN-5685】5、离职人员可以选自己------------
// update-begin--author:liaozhiyang---date:20240607---for【TV360X-305】小屏幕展示10条
// 代码逻辑说明: 【TV360X-305】小屏幕展示10条
const clientHeight = document.documentElement.clientHeight * 200;
maxHeight.value = clientHeight > 600 ? 600 : clientHeight;
// update-end--author:liaozhiyang---date:20240607---for【TV360X-305】小屏幕展示10条
//update-begin---author:wangshuai---date:2024-07-03---for:【TV360X-1629】用户选择组件不是根据创建时间正序排序的---
/**
* 请求之前根据创建时间排序
*
@ -285,7 +295,6 @@
function beforeFetch(params) {
return Object.assign({ column: 'createTime', order: 'desc' }, params);
}
//update-end---author:wangshuai---date:2024-07-03---for:【TV360X-1629】用户选择组件不是根据创建时间正序排序的---
return {
//config,

View File

@ -39,12 +39,11 @@
type: Boolean,
default: false,
},
// update-begin--author:liaozhiyang---date:20250414--for【issues/8078】角色选择组件点击文字部分会一直选中
// 代码逻辑说明: 【issues/8078】角色选择组件点击文字部分会一直选中
maxSelectCount: {
type: Number,
default: 2,
},
// update-end--author:liaozhiyang---date:20250414--for【issues/8078】角色选择组件点击文字部分会一直选中
store: {
type: String,
default: 'id',

View File

@ -156,11 +156,10 @@
if(!list || list.length ==0 ){
return;
}
// update-begin--author:liaozhiyang---date:20250414--for【issues/8078】角色选择组件点击文字部分会一直选中
// 代码逻辑说明: 【issues/8078】角色选择组件点击文字部分会一直选中
let findItem = list.find((item) => item.id == id);
findItem.checked = false;
selectedKeys.value = selectedKeys.value.filter((key) => key != id);
// update-end--author:liaozhiyang---date:20250414--for【issues/8078】角色选择组件点击文字部分会一直选中
}
async function loadDataList() {
@ -195,7 +194,6 @@
function onSelect(e, item) {
prevent(e);
// update-begin--author:liaozhiyang---date:20250414--for【issues/8078】角色选择组件点击文字部分会一直选中
// 单选模式下,先清除所有选中状态
if (!props.multi) {
dataList.value.forEach(dataItem => {
@ -216,7 +214,6 @@
} else {
selectedKeys.value = selectedKeys.value.filter(key => key !== item.id);
}
// update-end--author:liaozhiyang---date:20250414--for【issues/8078】角色选择组件点击文字部分会一直选中
}
function prevent(e) {

View File

@ -0,0 +1,448 @@
<template>
<BasicModal
@register="register"
:getContainer="getContainer"
:canFullscreen="false"
destroyOnClose
title="会签人员选择"
:width="600"
wrapClassName="j-filtered-user-select-modal"
>
<!-- 节点说明 -->
<a-select
value="系统角色会签,请筛选参与人员"
disabled
style="width: 100%"
class="node-label-select"
>
<a-select-option value="系统角色会签,请筛选参与人员">
系统角色会签请筛选参与人员
</a-select-option>
</a-select>
<div class="modal-content">
<!-- 搜索框 -->
<div :class="['search-wrapper', { 'search-expanded': searchInputStatus }]">
<span v-show="!searchInputStatus" class="search-icon" @click="showSearchInput">
<SearchOutlined />
</span>
<div v-show="searchInputStatus" class="search-input">
<a-input
v-model:value="searchText"
placeholder="请输入用户名按回车搜索"
@pressEnter="onSearchUser"
>
<template #prefix>
<SearchOutlined />
</template>
<template #suffix>
<CloseOutlined title="退出搜索" @click="clearSearch" />
</template>
</a-input>
</div>
</div>
<!-- 用户列表 -->
<div class="user-list-wrapper">
<user-list
:multi="multi"
:dataList="userDataList"
:selectedIdList="selectedIdList"
@selected="onSelectUser"
@unSelect="unSelectUser"
/>
</div>
<!-- 已选用户标签 -->
<div v-if="selectedUserList.length > 0" class="selected-users">
<SelectedUserItem
v-for="item in selectedUserList"
:key="item.id"
:info="item"
@unSelect="unSelectUser"
/>
</div>
</div>
<template #footer>
<div class="modal-footer">
<div class="pagination-wrapper">
<a-pagination
v-model:current="pageNo"
size="small"
:total="totalRecord"
:pageSize="PAGE_SIZE"
show-quick-jumper
@change="onPageChange"
/>
</div>
<a-button
type="primary"
:disabled="!hasSelectedUser"
@click="handleOk"
>
确认提交
</a-button>
</div>
</template>
</BasicModal>
</template>
<script lang="ts">
import { defineComponent, computed, ref, toRaw, PropType } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import { SearchOutlined, CloseOutlined } from '@ant-design/icons-vue';
import { Pagination } from 'ant-design-vue';
import { defHttp } from '/@/utils/http/axios';
import UserList from './UserList.vue';
import SelectedUserItem from './SelectedUserItem.vue';
// 用户数据接口
interface UserInfo {
id: string;
username: string;
realname: string;
[key: string]: any;
}
// 弹窗打开参数接口
interface ModalData {
usernames?: string[];
list?: UserInfo[];
}
// 常量定义
const PAGE_SIZE = 10;
const API_URL = '/sys/user/selectUserList';
export default defineComponent({
name: 'FilteredUserSelectModal',
components: {
BasicModal,
SearchOutlined,
CloseOutlined,
SelectedUserItem,
UserList,
APagination: Pagination,
},
props: {
// 是否多选
multi: {
type: Boolean,
default: true,
},
// 容器函数
getContainer: {
type: Function as PropType<() => HTMLElement>,
default: undefined,
},
// 传入的用户账号列表(用于过滤)
usernames: {
type: Array as PropType<string[]>,
default: () => [],
},
},
emits: ['selected', 'register'],
setup(props, { emit }) {
// ==================== 状态定义 ====================
const selectedUserList = ref<UserInfo[]>([]);
const actualUsernames = ref<string[]>([]);
const searchInputStatus = ref(false);
const searchText = ref('');
const pageNo = ref(1);
const totalRecord = ref(0);
const userDataList = ref<UserInfo[]>([]);
// ==================== 计算属性 ====================
const selectedIdList = computed(() =>
selectedUserList.value.map((item) => item.id)
);
const hasSelectedUser = computed(() =>
selectedUserList.value.length > 0
);
// ==================== 弹窗事件 ====================
const [register] = useModalInner((data: ModalData) => {
initUsernames(data);
initSelectedUsers(data);
resetSearchState();
loadUserList();
});
/**
* 初始化用户名列表
*/
function initUsernames(data: ModalData) {
if (data?.usernames?.length) {
actualUsernames.value = [...data.usernames];
} else if (props.usernames?.length) {
actualUsernames.value = [...props.usernames];
} else {
actualUsernames.value = [];
}
}
/**
* 初始化已选用户
*/
function initSelectedUsers(data: ModalData) {
selectedUserList.value = data?.list?.length ? [...data.list] : [];
}
/**
* 重置搜索状态
*/
function resetSearchState() {
searchText.value = '';
searchInputStatus.value = false;
pageNo.value = 1;
}
// ==================== 用户操作 ====================
/**
* 确认选择
*/
function handleOk() {
if (!hasSelectedUser.value) return;
emit('selected', toRaw(selectedUserList.value));
}
/**
* 选中用户
*/
function onSelectUser(info: UserInfo) {
if (!props.multi) {
selectedUserList.value = [{ ...info }];
return;
}
if (!selectedIdList.value.includes(info.id)) {
selectedUserList.value.push({ ...info });
}
}
/**
* 取消选中用户
*/
function unSelectUser(id: string) {
const index = selectedUserList.value.findIndex((item) => item.id === id);
if (index >= 0) {
selectedUserList.value.splice(index, 1);
}
}
// ==================== 搜索功能 ====================
/**
* 显示搜索框
*/
function showSearchInput(e?: Event) {
e?.preventDefault();
e?.stopPropagation();
searchInputStatus.value = true;
}
/**
* 执行搜索
*/
function onSearchUser() {
pageNo.value = 1;
loadUserList();
}
/**
* 清除搜索
*/
function clearSearch(e?: Event) {
e?.preventDefault();
e?.stopPropagation();
searchText.value = '';
searchInputStatus.value = false;
pageNo.value = 1;
loadUserList();
}
// ==================== 分页功能 ====================
/**
* 翻页处理
*/
function onPageChange() {
loadUserList();
}
// ==================== 数据加载 ====================
/**
* 加载用户列表
*/
async function loadUserList() {
if (!actualUsernames.value?.length) {
userDataList.value = [];
totalRecord.value = 0;
return;
}
try {
const params: Record<string, any> = {
pageNo: pageNo.value,
pageSize: PAGE_SIZE,
includeUsernameList: actualUsernames.value.join(','),
};
if (searchText.value.trim()) {
params.keyword = searchText.value.trim();
}
const { success, result } = await defHttp.get(
{ url: API_URL, params },
{ isTransformResponse: false }
);
if (success && result) {
userDataList.value = result.records || [];
totalRecord.value = result.total || 0;
} else {
resetUserData();
}
} catch (error) {
console.error('加载用户列表失败:', error);
resetUserData();
}
}
/**
* 重置用户数据
*/
function resetUserData() {
userDataList.value = [];
totalRecord.value = 0;
}
// ==================== 返回值 ====================
return {
PAGE_SIZE,
register,
handleOk,
searchText,
searchInputStatus,
showSearchInput,
onSearchUser,
clearSearch,
pageNo,
totalRecord,
onPageChange,
userDataList,
selectedUserList,
selectedIdList,
hasSelectedUser,
onSelectUser,
unSelectUser,
};
},
});
</script>
<style lang="less" scoped>
.j-filtered-user-select-modal {
// 节点说明标签
.node-label-select {
margin-bottom: 10px;
:deep(.ant-select-selector) {
color: #fff !important;
background-color: #409eff !important;
border-radius: 5px !important;
cursor: not-allowed !important;
}
:deep(.ant-select-selection-item),
:deep(.ant-select-arrow) {
color: #fff !important;
}
}
// 弹窗内容区
.modal-content {
position: relative;
min-height: 350px;
}
// 搜索框容器
.search-wrapper {
position: absolute;
top: 14px;
z-index: 1;
&.search-expanded {
width: 100%;
}
.search-icon {
margin-left: 10px;
color: #c0c0c0;
cursor: pointer;
transition: color 0.3s;
&:hover {
color: #0a8fe9;
}
}
.search-input {
width: 100%;
:deep(.anticon) {
color: #c0c0c0;
cursor: pointer;
transition: color 0.3s;
&:hover {
color: #0a8fe9;
}
}
}
}
// 用户列表
.user-list-wrapper {
padding-top: 50px;
}
// 已选用户标签
.selected-users {
display: flex;
flex-wrap: wrap;
gap: 8px;
padding-top: 15px;
width: 100%;
overflow-x: hidden;
}
// 底部容器
.modal-footer {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
gap: 16px;
.pagination-wrapper {
flex: 1;
min-width: 0;
:deep(.ant-pagination) {
display: flex;
justify-content: flex-start;
}
}
.ant-btn {
flex-shrink: 0;
}
}
// 滚动容器优化
:deep(.scroll-container) {
padding-bottom: 0 !important;
}
}
</style>

View File

@ -137,7 +137,7 @@
e.preventDefault();
e.stopPropagation();
}
//update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
//代码逻辑说明: 【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
/* function records2DataList() {
let arr:any[] = [];
let excludeList = props.excludeUserIdList;
@ -157,7 +157,6 @@
if(excludeList && excludeList.length>0){
return records2DataList();
}*/
//update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
return props.dataList;
});

View File

@ -76,6 +76,7 @@
const data = await loadDepartTree();
if (data.success) {
let arr = data.result;
fillTitles(arr);
treeData.value = arr;
emitDepartOptions(arr);
} else {
@ -121,6 +122,7 @@
if (data.success) {
let arr = data.result;
treeNode.dataRef.children = [...arr];
fillTitles(treeData.value);
treeData.value = [...treeData.value];
} else {
console.error(data.message);
@ -128,11 +130,12 @@
}
const maxHeight = ref(300);
maxHeight.value = window.innerHeight - 300;
maxHeight.value = window.innerHeight - 500;
const containerStyle = computed(() => {
return {
'overflow-y': 'auto',
'max-height': maxHeight.value + 'px',
// 代码逻辑说明: JHHB-911 【用户选择】用户选择组件 有滚动条时 不好用 没有显示简称
'max-height': (maxHeight.value>=300?maxHeight.value:300) + 'px',
};
});
@ -149,11 +152,10 @@
if (selectedDepartId.value) {
params['departId'] = selectedDepartId.value;
}
//update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
// 代码逻辑说明: 【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
if(props.excludeUserIdList && props.excludeUserIdList.length>0){
params['excludeUserIdList'] = props.excludeUserIdList.join(",");
}
//update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
const data = await defHttp.get({ url, params }, { isTransformResponse: false });
if (data.success) {
const { records } = data.result;
@ -176,7 +178,18 @@
function unSelectUser(id) {
emit('unSelect', id);
}
// 递归将 departNameAbbr 赋给 title并递归处理 children
function fillTitles(nodes: any[] = []) {
for (const node of nodes) {
if (!node) continue;
if (node?.departNameAbbr) {
node.title = node.departNameAbbr;
}
if (Array.isArray(node.children) && node.children.length) {
fillTitles(node.children);
}
}
}
return {
containerStyle,
treeData,

View File

@ -98,11 +98,10 @@
if (selectedRoleId.value) {
params['roleId'] = selectedRoleId.value;
}
//update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
// 代码逻辑说明: 【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
if(props.excludeUserIdList && props.excludeUserIdList.length>0){
params['excludeUserIdList'] = props.excludeUserIdList.join(",");
}
//update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
const data = await defHttp.get({ url, params }, { isTransformResponse: false });
if (data.success) {
const { records } = data.result;

View File

@ -3,8 +3,9 @@
@register="register"
:getContainer="getContainer"
:canFullscreen="false"
destroyOnClose
title="选择用户"
:width="600"
:width="800"
wrapClassName="j-user-select-modal2"
>
<!-- 部门下拉框 -->
@ -228,11 +229,10 @@
params['departId'] = selectedDepart.value;
}
//update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
// 代码逻辑说明: 【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
if(unref(excludeUserIdList) && unref(excludeUserIdList).length>0){
params['excludeUserIdList'] = excludeUserIdList.value.join(",");
}
//update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色添加用户 返回2页数据实际只显示一页---
const data = await defHttp.get({ url, params }, { isTransformResponse: false });
if (data.success) {

View File

@ -161,7 +161,7 @@
let idList = [];
selectedUserList.value = [];
if(ids){
// update-begin-author:sunjianlei date:20230330 for: 修复用户选择器逗号分割回显不生效的问题
// 代码逻辑说明: 修复用户选择器逗号分割回显不生效的问题
let tempArray = ids.split(',').map(s => s.trim()).filter(s => s != '');
if (tempArray.includes(mySelfExpress)) {
hasUserExpress = true;
@ -169,7 +169,6 @@
} else {
idList = tempArray;
}
// update-end-author:sunjianlei date:20230330 for: 修复用户选择器逗号分割回显不生效的问题
}
if(idList.length>0){

View File

@ -109,7 +109,7 @@ export const useCodeHinting = (CodeMirror, keywords, language) => {
from: CodeMirror.Pos(cur.line, start),
to: CodeMirror.Pos(cur.line, end),
});
// update-begin--author:liaozhiyang---date:20240429---for【QQYUN-8865】js增强加上鼠标移入提示
// 代码逻辑说明: 【QQYUN-8865】js增强加上鼠标移入提示
const item = currentKeywords[0];
if (item?.desc) {
setTimeout(() => {
@ -126,7 +126,6 @@ export const useCodeHinting = (CodeMirror, keywords, language) => {
}
}, 0);
}
// update-end--author:liaozhiyang---date:20240429---for【QQYUN-8865】js增强加上鼠标移入提示
} else {
}
}

View File

@ -26,16 +26,11 @@ export function useSelectBiz(getList, props, emit?) {
watch(
selectValues,
() => {
//update-begin-author:liusq---date:2023-10-19--for: [issues/788]判断有设置数值才去加载
//if (selectValues['change'] == false && !isEmpty(selectValues['value'])) {
if (selectValues['change'] == false && !isEmpty(selectValues['value'])) {
//update-end-author:liusq---date:2023-10-19--for: [issues/788]判断有设置数值才去加载
//update-begin---author:wangshuai ---date:20220412 for[VUEN-672]发文草稿箱编辑时拟稿人显示用户名------------
// update-begin-author:liaozhiyang---date:2024-11-11--for:【issues/7405】部门选择用户同时全部选择两页用户回显到父页面。第二页用户显示的不是真是姓名
// 代码逻辑说明: issues/7405】部门选择用户同时全部选择两页用户回显到父页面。第二页用户显示的不是真是姓名
let params = { isMultiTranslate: 'true', pageSize: selectValues.value?.length };
// update-end-author:liaozhiyang---date:2024-10-11--for:【issues/7405】部门选择用户同时全部选择两页用户回显到父页面。第二页用户显示的不是真是姓名
params[props.rowKey] = selectValues['value'].join(',');
//update-end---author:wangshuai ---date:20220412 for[VUEN-672]发文草稿箱编辑时拟稿人显示用户名--------------
loadingEcho.value = isFirstLoadEcho;
isFirstLoadEcho = false;
getDataSource(params, true)
@ -45,9 +40,8 @@ export function useSelectBiz(getList, props, emit?) {
});
}
//设置列表默认选中
// update-begin--author:liaozhiyang---date:20250423---for【QQYUN-12155】弹窗中勾选再点取消值被选中了
// 代码逻辑说明: 【QQYUN-12155】弹窗中勾选再点取消值被选中了
checkedKeys['value'] = [...selectValues['value']];
// update-end--author:liaozhiyang---date:20250423---for【QQYUN-12155】弹窗中勾选再点取消值被选中了
},
{ immediate: true }
);
@ -70,16 +64,13 @@ export function useSelectBiz(getList, props, emit?) {
* 选择列配置
*/
const rowSelection = {
//update-begin-author:liusq---date:20220517--for: 动态设置rowSelection的type值,默认是'checkbox' ---
// 代码逻辑说明: 动态设置rowSelection的type值,默认是'checkbox' ---
type: props.isRadioSelection ? 'radio' : 'checkbox',
//update-end-author:liusq---date:20220517--for: 动态设置rowSelection的type值,默认是'checkbox' ---
columnWidth: 20,
selectedRowKeys: checkedKeys,
onChange: onSelectChange,
//update-begin-author:wangshuai---date:20221102--for: [VUEN-2562]用户选择,跨页选择后,只有当前页人员 ---
//table4.4.0新增属性选中之后是否清空上一页下一页的数据默认false
preserveSelectedRowKeys:true,
//update-end-author:wangshuai---date:20221102--for: [VUEN-2562]用户选择,跨页选择后,只有当前页人员 ---
};
/**
@ -111,9 +102,8 @@ export function useSelectBiz(getList, props, emit?) {
code: selectValues['value'].join(','),
pageSize: selectValues['value'].length,
});
// update-begin--author:liaozhiyang---date:20250423---for【QQYUN-12155】弹窗中勾选再点取消值被选中了
// 代码逻辑说明: 【QQYUN-12155】弹窗中勾选再点取消值被选中了
checkedKeys['value'] = [...selectValues['value']];
// update-end--author:liaozhiyang---date:20250423---for【QQYUN-12155】弹窗中勾选再点取消值被选中了
selectRows['value'] = records;
}
@ -122,15 +112,13 @@ export function useSelectBiz(getList, props, emit?) {
*/
async function visibleChange(visible) {
if (visible) {
// update-begin--author:liaozhiyang---date:20250423---for【QQYUN-12179】弹窗勾选了值点击取消再次打开弹窗遗留了上次的勾选的值
// 代码逻辑说明: 【QQYUN-12179】弹窗勾选了值点击取消再次打开弹窗遗留了上次的勾选的值
checkedKeys['value'] = [...selectValues['value']];
// update-begin--author:liaozhiyang---date:20250423---for【QQYUN-12179】弹窗勾选了值点击取消再次打开弹窗遗留了上次的勾选的值
//设置列表默认选中
props.showSelected && initSelectRows();
} else {
// update-begin--author:liaozhiyang---date:20240517---for【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
// 代码逻辑说明: 【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
emit?.('close');
// update-end--author:liaozhiyang---date:20240517---for【QQYUN-9366】用户选择组件取消和关闭会把选择数据带入
}
}
@ -155,10 +143,9 @@ export function useSelectBiz(getList, props, emit?) {
}
//删除已选择的信息
function handleDeleteSelected(record) {
//update-begin---author:wangshuai ---date:20230404 for【issues/424】开启右侧列表后在右侧列表中删除用户时逻辑有问题------------
// 代码逻辑说明: 【issues/424】开启右侧列表后在右侧列表中删除用户时逻辑有问题------------
checkedKeys.value = checkedKeys.value.filter((item) => item != record[props.rowKey]);
selectRows.value = selectRows.value.filter((item) => item[props.rowKey] !== record[props.rowKey]);
//update-end---author:wangshuai ---date:20230404 for【issues/424】开启右侧列表后在右侧列表中删除用户时逻辑有问题------------
}
//清空选择项
function reset() {

View File

@ -21,8 +21,10 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
const selectRows = ref<Array<object>>([]);
//是否是打开弹框模式
const openModal = ref(false);
//是否层级关联
const checkStrictly = ref<boolean>(realProps.multiple ? props.checkStrictly : true);
// 是否开启父子关联,如果不可以多选,就始终取消父子关联
const getCheckStrictly = computed(() => (realProps.multiple ? props.checkStrictly : true));
const getCheckStrictly = computed(() => checkStrictly.value);
// 是否是首次加载回显,只有首次加载,才会显示 loading
let isFirstLoadEcho = true;
let prevSelectValues = [];
@ -39,7 +41,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
if(!values){
return;
}
// update-begin--author:liaozhiyang---date:20250604---for【issues/8232】代码设置JSelectDept组件值没翻译
// 代码逻辑说明: 【issues/8232】代码设置JSelectDept组件值没翻译
if (values.length > 0) {
// 防止多次请求
if (isEqual(values, prevSelectValues)) return;
@ -49,7 +51,6 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
onLoadData(null, values.join(',')).finally(() => {
loadingEcho.value = false;
});
// update-end--author:liaozhiyang---date:20250604---for【issues/8232】代码设置JSelectDept组件值没翻译
}
},
{ immediate: true }
@ -148,23 +149,26 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
* 树节点选择
*/
function onCheck(keys, info) {
if(!info){
return;
}
if (props.checkable == true) {
// 如果不能多选,就只保留最后一个选中的
if (!realProps.multiple) {
if (info.checked) {
//update-begin-author:taoyan date:20220408 for: 单选模式下设定rowKey无法选中数据-
// 代码逻辑说明: 单选模式下设定rowKey无法选中数据-
checkedKeys.value = [info.node.eventKey];
let rowKey = props.rowKey;
let temp = info.checkedNodes.find((n) => n[rowKey] === info.node.eventKey);
selectRows.value = [temp];
//update-end-author:taoyan date:20220408 for: 单选模式下设定rowKey无法选中数据-
} else {
checkedKeys.value = [];
selectRows.value = [];
}
return;
}
checkedKeys.value = props.checkStrictly ? keys.checked : keys;
// 代码逻辑说明: 【JHHB-250】选择部门加一个层级关联/独立的配置,现在是点击就全勾选了---
checkedKeys.value = checkStrictly.value ? keys.checked : keys;
const { checkedNodes } = info;
let rows = <any[]>[];
checkedNodes.forEach((item) => {
@ -179,7 +183,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
*/
async function checkALL(checkAll) {
getTree().checkAll(checkAll);
//update-begin---author:wangshuai ---date:20230403 for【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后点击确认按钮部门信息丢失------------
// 代码逻辑说明: 【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后点击确认按钮部门信息丢失------------
await nextTick();
checkedKeys.value = getTree().getCheckedKeys();
if(checkAll){
@ -187,7 +191,6 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
}else{
selectRows.value = [];
}
//update-end---author:wangshuai ---date:20230403 for【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后点击确认按钮部门信息丢失------------
}
/**
@ -219,9 +222,8 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
let startPid = '';
if (treeNode) {
startPid = treeNode.eventKey;
//update-begin---author:wangshuai ---date:20220407 forrowkey不设置成idsync开启异步的时候点击上级下级不显示------------
// 代码逻辑说明: rowkey不设置成idsync开启异步的时候点击上级下级不显示------------
params['pid'] = treeNode.value;
//update-end---author:wangshuai ---date:20220407 forrowkey不设置成idsync开启异步的时候点击上级下级不显示------------
}
if (ids) {
startPid = '';
@ -272,9 +274,8 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
} else {
const options = <any[]>[];
optionData.forEach((item) => {
//update-begin-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑查看数据应该显示部门名称不是部门代码
// 代码逻辑说明: issues/I5F3P4 online配置部门选择后编辑查看数据应该显示部门名称不是部门代码
options.push({ label: item[props.labelKey], value: item[props.rowKey] });
//update-end-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑查看数据应该显示部门名称不是部门代码
});
selectOptions.value = options;
}
@ -385,9 +386,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
}
} else {
openModal.value = false;
// update-begin--author:liaozhiyang---date:20240527---for【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
emit?.('close');
// update-end--author:liaozhiyang---date:20240527---for【TV360X-414】部门设置了默认值查询重置变成空了(同步JSelectUser组件改法)
}
}
@ -448,6 +447,7 @@ export function useTreeBiz(treeRef, getList, props, realProps, emit) {
getSelectTreeData,
onSearch,
expandedKeys,
checkStrictly,
},
];
}

View File

@ -5,9 +5,8 @@ export const selectProps = {
//是否多选
isRadioSelection: {
type: Boolean,
//update-begin---author:wangshuai ---date:20220527 for部门用户组件默认应该单选,否则其他地方有问题------------
// 代码逻辑说明: 部门用户组件默认应该单选,否则其他地方有问题------------
default: false,
//update-end---author:wangshuai ---date:20220527 for部门用户组件默认应该单选否则其他地方有问题--------------
},
//回传value字段名
rowKey: {

View File

@ -67,10 +67,8 @@ export const basicProps = {
rulesMessageJoinLabel: propTypes.bool.def(true),
// 【jeecg】超过3列自动折叠
autoAdvancedCol: propTypes.number.def(3),
// update-begin--author:liaozhiyang---date:202401009---for【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
// 超过3行自动折叠
// autoAdvancedLine: propTypes.number.def(3),
// update-end--author:liaozhiyang---date:202401009---for【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
// 不受折叠影响的行数
alwaysShowLines: propTypes.number.def(1),

View File

@ -100,9 +100,8 @@ export interface FormProps {
// 【jeecg】如果 showAdvancedButton 为 true超过指定列数默认折叠默认为3
autoAdvancedCol?: number;
// 如果 showAdvancedButton 为 true超过指定行数行默认折叠
// update-begin--author:liaozhiyang---date:202401009---for【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
// 代码逻辑说明: 【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
// autoAdvancedLine?: number;
// update-end--author:liaozhiyang---date:202401009---for【issues/7261】表格上方查询项autoAdvancedLine配置没有效果删除autoAdvancedLine
// 折叠时始终保持显示的行数
alwaysShowLines?: number;
// Whether to show the operation button
@ -135,9 +134,8 @@ export interface FormSchema {
// Variable name bound to v-model Default value
valueField?: string;
// Label name
// update-begin--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
// 代码逻辑说明: 【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
label: string | VNode | Fn;
// update-end--author:liaozhiyang---date:20240724---for【issues/6908】多语言无刷新切换时BasicColumn和FormSchema里面的值不能正常切换
// Auxiliary text
subLabel?: string;
// Help text on the right side of the text
@ -200,11 +198,9 @@ export interface FormSchema {
dynamicDisabled?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean);
dynamicRules?: (renderCallbackParams: RenderCallbackParams) => Rule[];
// update-begin--author:liaozhiyang---date:20240308---for【QQYUN-8377】formSchema props支持动态修改
// 设置组件props的key
dynamicPropskey?: string;
dynamicPropsVal?: ((renderCallbackParams: RenderCallbackParams) => any);
// update-end--author:liaozhiyang---date:20240308---for【QQYUN-8377】formSchema props支持动态修改
// 这个属性自定义的 用于自定义的业务 比如在表单打开的时候修改表单的禁用状态但是又不能重写componentProps因为他的内容太多了所以使用dynamicDisabled和buss实现
buss?: any;

View File

@ -106,6 +106,7 @@ export type ComponentType =
| 'WeekPicker'
| 'TimePicker'
| 'DatePickerInFilter'
| 'JDatePickerMultiple'
| 'Switch'
| 'StrengthMeter'
| 'Upload'

View File

@ -57,7 +57,7 @@ class Area {
}
}
//update-begin-author:liusq---date:20230404--for: [issue/382]省市区组件JAreaLinkage数据不回显---
// 代码逻辑说明: [issue/382]省市区组件JAreaLinkage数据不回显---
getText(code,index=3) {
if (!code || code.length == 0) {
return '';
@ -66,7 +66,6 @@ class Area {
this.getAreaBycode(code, arr, index);
return arr.join('/');
}
//update-end-author:liusq---date:20230404--for: [issue/382]省市区组件JAreaLinkage数据不回显---
getRealCode(code) {
let arr = [];
@ -101,12 +100,11 @@ const jeecgAreaData = new Area();
// 根据code找文本
const getAreaTextByCode = function (code) {
let index = 3;
//update-begin-author:liusq---date:20220531--for: 判断code是否是多code逗号分割的字符串是的话获取最后一位的code ---
// 代码逻辑说明: 判断code是否是多code逗号分割的字符串是的话获取最后一位的code ---
if (code && code.includes(',')) {
index = code.split(",").length;
code = code.substr(code.lastIndexOf(',') + 1);
}
//update-end-author:liusq---date:20220531--for: 判断code是否是多code逗号分割的字符串是的话获取最后一位的code ---
return jeecgAreaData.getText(code,index);
};

View File

@ -36,10 +36,9 @@ export function handleRangeTimeValue(props, values) {
timeValue = timeValue.split(',');
}
const [startTime, endTime]: string[] = timeValue;
//update-begin---author:wangshuai---date:2024-10-08---for:【issues/7216】当RangePicker组件值允许开始/结束为空时,表单的fieldMapToTime处理异常---
// 代码逻辑说明: 【issues/7216】当RangePicker组件值允许开始/结束为空时,表单的fieldMapToTime处理异常---
startTime && (values[startTimeKey] = dateUtil(startTime).format(format));
endTime && (values[endTimeKey] = dateUtil(endTime).format(format));
//update-end---author:wangshuai---date:2024-10-08---for:【issues/7216】当RangePicker组件值允许开始/结束为空时,表单的fieldMapToTime处理异常---
Reflect.deleteProperty(values, field);
}
return values;
@ -60,13 +59,12 @@ export function handleRangeNumberValue(props, values) {
if (!field || !startNumberKey || !endNumberKey || !values[field]) {
continue;
}
//update-begin-author:taoyan date:2022-5-10 for: 用于数值的范围查询 数组格式的中间转换不知道哪里出了问题,这里会变成字符串,需要再强制转成数组
// 代码逻辑说明: 用于数值的范围查询 数组格式的中间转换不知道哪里出了问题,这里会变成字符串,需要再强制转成数组
let temp = values[field];
if (typeof temp === 'string') {
temp = temp.split(',');
}
const [startNumber, endNumber]: number[] = temp;
//update-end-author:taoyan date:2022-5-10 for: 用于数值的范围查询 数组格式的中间转换不知道哪里出了问题,这里会变成字符串,需要再强制转成数组
values[startNumberKey] = startNumber;
values[endNumberKey] = endNumber;
Reflect.deleteProperty(values, field);

View File

@ -88,10 +88,9 @@
function handleSearchChange(e: ChangeEvent) {
const value = e.target.value;
console.log("value::::",value)
//update-begin---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效------------
// 代码逻辑说明: 【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效------------
setCurrentPage(1);
current.value = 1;
//update-end---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无述------------
if (!value) {
currentList.value = props.currentList;
return;
@ -99,7 +98,6 @@
currentList.value = props.currentList.filter((item) => item.includes(value));
}
//update-begin---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效输入框后面的图标点击之后清空数据------------
/**
* 图标点击重置页数
*/
@ -111,14 +109,12 @@
currentList.value = props.currentList;
searchIconValue.value = '';
}
//update-end---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效输入框后面的图标点击之后清空数据------------
function handlePageChange(page: number, size: number) {
//update-begin---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效------------
// 代码逻辑说明: 【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效------------
current.value = page;
pageSize.value = size;
setPageSize(size);
//update-end---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效------------
setCurrentPage(page);
}

View File

@ -122,7 +122,7 @@
const { t } = useI18n();
const { prefixCls } = useDesign('icon-picker');
//update-begin---author:wangshuai---date:2024-05-08---for:【QQYUN-8924】图标库选择组件不如vue2的方便---
// 代码逻辑说明: 【QQYUN-8924】图标库选择组件不如vue2的方便---
const iconOpen = ref<boolean>(false);
//方向性图标
const directionIcons = ['ant-design:step-backward-outlined', 'ant-design:step-forward-outlined', 'ant-design:fast-backward-outlined', 'ant-design:fast-forward-outlined', 'ant-design:shrink-outlined', 'ant-design:arrows-alt-outlined', 'ant-design:down-outlined', 'ant-design:up-outlined', 'ant-design:left-outlined', 'ant-design:right-outlined', 'ant-design:caret-up-outlined', 'ant-design:caret-down-outlined', 'ant-design:caret-left-outlined', 'ant-design:caret-right-outlined', 'ant-design:up-circle-outlined', 'ant-design:down-circle-outlined', 'ant-design:left-circle-outlined', 'ant-design:right-circle-outlined', 'ant-design:double-right-outlined', 'ant-design:double-left-outlined', 'ant-design:vertical-left-outlined', 'ant-design:vertical-right-outlined', 'ant-design:forward-outlined', 'ant-design:backward-outlined', 'ant-design:rollback-outlined', 'ant-design:enter-outlined', 'ant-design:retweet-outlined', 'ant-design:swap-outlined', 'ant-design:swap-left-outlined', 'ant-design:swap-right-outlined', 'ant-design:arrow-up-outlined', 'ant-design:arrow-down-outlined', 'ant-design:arrow-left-outlined', 'ant-design:arrow-right-outlined', 'ant-design:play-circle-outlined', 'ant-design:up-square-outlined', 'ant-design:down-square-outlined', 'ant-design:left-square-outlined', 'ant-design:right-square-outlined', 'ant-design:login-outlined', 'ant-design:logout-outlined', 'ant-design:menu-fold-outlined', 'ant-design:menu-unfold-outlined', 'ant-design:border-bottom-outlined', 'ant-design:border-horizontal-outlined', 'ant-design:border-inner-outlined', 'ant-design:border-left-outlined', 'ant-design:border-right-outlined', 'ant-design:border-top-outlined', 'ant-design:border-verticle-outlined', 'ant-design:pic-center-outlined', 'ant-design:pic-left-outlined', 'ant-design:pic-right-outlined', 'ant-design:radius-bottomleft-outlined', 'ant-design:radius-bottomright-outlined', 'ant-design:radius-upleft-outlined', 'ant-design:radius-upright-outlined', 'ant-design:fullscreen-outlined', 'ant-design:fullscreen-exit-outlined']
@ -138,35 +138,30 @@
const logoIcons = ['ant-design:android-outlined', 'ant-design:apple-outlined', 'ant-design:windows-outlined', 'ant-design:ie-outlined', 'ant-design:chrome-outlined', 'ant-design:github-outlined', 'ant-design:aliwangwang-outlined', 'ant-design:dingding-outlined', 'ant-design:weibo-square-outlined', 'ant-design:weibo-circle-outlined', 'ant-design:taobao-circle-outlined', 'ant-design:html5-outlined', 'ant-design:weibo-outlined', 'ant-design:twitter-outlined', 'ant-design:wechat-outlined', 'ant-design:youtube-outlined', 'ant-design:alipay-circle-outlined', 'ant-design:taobao-outlined', 'ant-design:skype-outlined', 'ant-design:qq-outlined', 'ant-design:medium-workmark-outlined', 'ant-design:gitlab-outlined', 'ant-design:medium-outlined', 'ant-design:linkedin-outlined', 'ant-design:google-plus-outlined', 'ant-design:dropbox-outlined', 'ant-design:facebook-outlined', 'ant-design:codepen-outlined', 'ant-design:amazon-outlined', 'ant-design:google-outlined', 'ant-design:codepen-circle-outlined', 'ant-design:alipay-outlined', 'ant-design:ant-design-outlined', 'ant-design:aliyun-outlined', 'ant-design:zhihu-outlined', 'ant-design:slack-outlined', 'ant-design:slack-square-outlined', 'ant-design:behance-outlined', 'ant-design:behance-square-outlined', 'ant-design:dribbble-outlined', 'ant-design:dribbble-square-outlined', 'ant-design:instagram-outlined', 'ant-design:yuque-outlined', 'ant-design:alibaba-outlined', 'ant-design:yahoo-outlined']
//其他
const otherIcons = ref<any>([]);
//update-end---author:wangshuai---date:2024-05-08---for:【QQYUN-8924】图标库选择组件不如vue2的方便---
watchEffect(() => {
// update-begin--author:liaozhiyang---date:20240528---for【TV360X-136】按钮图标改成图标组件选择
// 代码逻辑说明: 【TV360X-136】按钮图标改成图标组件选择
let value = props.value;
if (!props.iconPrefixSave && value) {
value = `ant-design:${value}`;
}
// update-end--author:liaozhiyang---date:20240528---for【TV360X-136】按钮图标改成图标组件选择
currentSelect.value = value;
});
watch(
() => currentSelect.value,
(v) => {
// update-begin--author:liaozhiyang---date:20240528---for【TV360X-136】按钮图标改成图标组件选择
// 代码逻辑说明: 【TV360X-136】按钮图标改成图标组件选择
let value = v;
if (!props.iconPrefixSave && value) {
value = value.split('ant-design:')[1];
}
// update-end--author:liaozhiyang---date:20240528---for【TV360X-136】按钮图标改成图标组件选择
emit('update:value', value);
return emit('change', value);
}
);
//update-begin---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效输入框后面的图标点击之后清空数据------------
//update-begin---author:wangshuai---date:2024-05-08---for:【QQYUN-8924】图标库选择组件不如vue2的方便---
/**
* 图标点击重置页数
*/
@ -179,7 +174,6 @@
iconListRef.value.currentSelectClick();
},100)
}
//update-begin---author:wangshuai ---date:20230522 for【issues/4947】菜单编辑页面菜单图标选择模板每页显示数量切换无效输入框后面的图标点击之后清空数据------------
function initOtherIcon() {
otherIcons.value = icons.filter(item => {
@ -210,7 +204,6 @@
//初始化加载图标
initOtherIcon();
})
//update-end---author:wangshuai---date:2024-05-08---for:【QQYUN-8924】图标库选择组件不如vue2的方便---
</script>
<style lang="less">
@prefix-cls: ~'@{namespace}-icon-picker';

View File

@ -100,9 +100,8 @@ watch(innerValue, (val) => {
}
emit('change', val)
emit('update:value', val)
// update-begin--author:liaozhiyang---date:20240509---for【QQYUN-9227】日期校验没清空
// 代码逻辑说明: 【QQYUN-9227】日期校验没清空
formItemContext?.onFieldChange();
// update-end--author:liaozhiyang---date:20240509---for【QQYUN-9227】日期校验没清空
})
watch(() => props.allowSelectRange, (allow) => {

View File

@ -24,10 +24,9 @@ export async function registerJVxeCustom() {
await registerAsyncComponent(JVxeTypes.departSelect, import('./src/components/JVxeDepartSelectCell.vue'));
// 注册【省市区选择】组件
// await registerAsyncComponent(JVxeTypes.pca, import('./src/components/JVxePcaCell.vue'));
// update-begin--author:liaozhiyang---date:20240308---for【QQYUN-8241】为避免首次加载china-area-dataJVxePcaCell组件需异步加载
// 代码逻辑说明: 【QQYUN-8241】为避免首次加载china-area-dataJVxePcaCell组件需异步加载
registerASyncComponentReal(
JVxeTypes.pca,
createAsyncComponent(() => import('./src/components/JVxePcaCell.vue'))
);
// update-end--author:liaozhiyang---date:20240308---for【QQYUN-8241】为避免首次加载china-area-dataJVxePcaCell组件需异步加载
}

Some files were not shown because too many files have changed in this diff Show More