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---forQQYUN-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---forQQYUN-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---forQQYUN-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---forQQYUN-9685 electron
const script = process.env.npm_lifecycle_script;
// update-begin--author:liaozhiyang---date:20240326---forQQYUN-8690
// : QQYUN-8690
const reg = new RegExp('NODE_ENV=([a-z_\\d]+)');
// update-end--author:liaozhiyang---date:20240326---forQQYUN-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-themevite

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---forJHHB-13
// : JHHB-13
mainWindow.on('focus', () => {
//
if (process.platform === 'win32') {
mainWindow!.flashFrame(false);
}
});
// update-end--author:liaozhiyang---date:20250725---forJHHB-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---forJHHB-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---forJHHB-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---forJHHB-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---forJHHB-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-936wps使localhost访localhost127.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---forissues/6943mockid
// : issues/6943mockid
const pageNo = +(query.pageNo ?? page);
return resultPageSuccess(pageNo, +pageSize, demoList);
// update-end--author:liaozhiyang---date:20240730---forissues/6943mockid
},
},
] 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---forQQYUN-6366antd4.x
// : QQYUN-6366antd4.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---forQQYUN-8570
// : QQYUN-8570
if (import.meta.env.PROD) {
changeTheme(appStore.getProjectConfig.themeColor);
}
// update-end--author:liaozhiyang---date:20240322---forQQYUN-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---forQQYUN-6366antd4.x
</script>
<style lang="less">
// update-begin--author:liaozhiyang---date:20230803---forQQYUN-5839windihtml2canvas
// : QQYUN-5839windihtml2canvas
img {
display: inline-block;
}
// update-end--author:liaozhiyang---date:20230803---forQQYUN-5839windihtml2canvas
</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---forQQYUN-8487vue2
// export const switchVue3Menu = () => {
// return new Promise((resolve) => {
// defHttp.get({ url: Api.SwitchVue3Menu });
// });
// };
// update-end--author:liaozhiyang---date:20240313---forQQYUN-8487vue2

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-9005IP15---
// : QQYUN-9005IP15---
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-9005IP15---
}
}).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---forQQYUN-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---forQQYUN-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/7402CollapseContainer
// : issues/7402CollapseContainer
const show = ref(props.defaultExpan);
// update-begin-author:liaozhiyang---date:2024-11-11--for:issues/7402CollapseContainer
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-9005IP15---
// : QQYUN-9005IP15---
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-9005IP15---
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---forQQYUN-8389vue3.4footertoRawcloneDeeppropscomputed
// : QQYUN-8389vue3.4footertoRawcloneDeeppropscomputed
return { ...deepMerge(cloneDeep(props), unref(propsRef)) };
// update-end--author:liaozhiyang---date:20240320---forQQYUN-8389vue3.4footertoRawcloneDeeppropscomputed
});
const getProps = computed((): DrawerProps => {
// update-begin--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.x
// : QQYUN-6366antd4.x
const opt = {
placement: 'right',
...unref(attrs),
...unref(getMergeProps),
open: unref(visibleRef),
};
// update-end--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.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---forQQYUN-6366antd4.x
// : QQYUN-6366antd4.x
getInstance()?.setDrawerProps({
open: visible,
});
// update-end--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.x
if (!data) return;
if (openOnSet) {
@ -81,9 +80,8 @@ export function useDrawer(): UseDrawerReturnType {
}
},
closeDrawer: () => {
// update-begin--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.x
// : QQYUN-6366antd4.x
getInstance()?.setDrawerProps({ open: false });
// update-end--author:liaozhiyang---date:20231218---forQQYUN-6366antd4.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使labelCollabelWidth
// : labelWidth使labelCollabelWidth
if (mergeProps.labelWidth) {
mergeProps.labelCol = undefined;
}
//update-end-author:sunjianlei date:20220923 for: labelWidth使labelCollabelWidth
// update-begin--author:liaozhiyang---date:20231017---forQQYUN-6566BasicForm(inline)
// : QQYUN-6566BasicForm(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---forQQYUN-6566BasicForm(inline)
return mergeProps;
});
@ -130,11 +128,10 @@
const getBindValue = computed(() => {
const bindValue = { ...attrs, ...props, ...unref(getProps) } as Recordable;
// update-begin--author:liaozhiyang---date:20250630---forissues/8484labelinput
// : issues/8484labelinput
if (bindValue.name === undefined && bindValue.source === 'table-query') {
bindValue.name = 'top-query-form';
}
// update-end--author:liaozhiyang---date:20250630---forissues/8484labelinput
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 forissues/435------------
// : issues/435------------
let valueFormat:string = "";
// update-begin--author:liaozhiyang---date:20250818---forissues/8683DatePickercomponentProps使
// : issues/8683DatePickercomponentProps使
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 forissues/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---forTV360X-346
// : TV360X-346
schema.defaultValue = dateUtil(defaultValue, valueFormat).format(valueFormat);
// update-end--author:liaozhiyang---date:20240529---forTV360X-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---forTV360X-346
// : TV360X-346
def.push(dateUtil(item, valueFormat).format(valueFormat));
// update-end--author:liaozhiyang---date:20240529---forTV360X-346
}else{
def.push(dateUtil(item));
}
//update-end---author:wangshuai ---date:20221124 for[issues/215]------------
});
// update-begin--author:liaozhiyang---date:20240328---forissues/1114rangepickervue3.4
// : issues/1114rangepickervue3.4
def.forEach((item, index) => {
defaultValue[index] = item;
});
// update-end--author:liaozhiyang---date:20240328---forissues/1114rangepickervue3.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---forissues/752dynamicRules 使 trigger: 'blur'
// const { validateTrigger } = unref(getBindValue);
// if (!validateTrigger || validateTrigger === 'change') {
// validateFields([key]).catch((_) => {});
// }
// update-end--author:liaozhiyang---date:20230922---forissues/752dynamicRules 使 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---forQQYUN-9241form
//&:not(.ant-form-item-with-help) {
// margin-bottom: 24px;
//}
// update-begin--author:liaozhiyang---date:20240514---forQQYUN-9241form
// update-begin--author:liaozhiyang---date:20240620---forTV360X-1420
// : TV360X-1420
&-has-error {
margin-bottom: 24px;
}
// update-end--author:liaozhiyang---date:20240620---forTV360X-1420
//
.j-form-item-middleware {
@ -460,12 +445,11 @@
margin-bottom: 8px !important;
}
}
// update-begin--author:liaozhiyang---date:20231017---forQQYUN-6566BasicForm(inline)
// : QQYUN-6566BasicForm(inline)
&.ant-form-inline {
& > .ant-row {
.ant-col { width:auto !important; }
}
}
// update-end--author:liaozhiyang---date:20231017---forQQYUN-6566BasicForm(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---forQQYUN-7961popupDict
// : QQYUN-7961popupDict
import JPopupDict from './jeecg/components/JPopupDict.vue';
// update-end--author:liaozhiyang---date:20240130---forQQYUN-7961popupDict
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---forQQYUN-7961popupDict
// : QQYUN-7961popupDict
componentMap.set('JPopupDict', JPopupDict);
// update-end--author:liaozhiyang---date:20240130---forQQYUN-7961popupDict
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---forQQYUN-11831ApiSelect #7883
// : QQYUN-11831ApiSelect #7883
const hasMore = ref(true);
const pagination = ref({
pageNo: 1,
@ -86,7 +86,7 @@
// update-end--author:liusq---date:20250407---forQQYUN-11831ApiSelect #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---forQQYUN-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---forissues/5467ApiSelect
// : issues/5467ApiSelect
if (obj['filterOption'] === undefined) {
// update-begin--author:liaozhiyang---date:20230904---forissues/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---forissues/5305
}
// update-end--author:liaozhiyang---date:20231017---forissues/5467ApiSelect
return obj;
});
// update-begin--author:liaozhiyang---date:20230830---forQQYUN-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---forissues/6999ApiSelect
// update-begin--author:liaozhiyang---date:20250707---for:issues/8527apiSelect
// : issues/8527apiSelect
watch(
() => props.immediate,
() => {
@ -140,8 +137,6 @@
},
{ deep: true }
);
// update-end--author:liaozhiyang---date:20250707---for:issues/8527apiSelect
// update-end--author:liaozhiyang---date:20240823---forissues/6999ApiSelect
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---forQQYUN-11831ApiSelect #7883
// : QQYUN-11831ApiSelect #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---forQQYUN-11831ApiSelect #7883
const res = await api(params);
if (isPage) {
// update-begin--author:liusq---date:20250407---forQQYUN-11831ApiSelect #7883
// : QQYUN-11831ApiSelect #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---forQQYUN-11831ApiSelect #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:multiplevalue------
['multiple', 'tags'].includes(unref(attrs).mode) && !Array.isArray(unref(state)) && setState([]);
//--@updateBy-end----author:liusq---date:20210914------for:multiplevalue------
//update-begin---author:wangshuai ---date:20230505 forvalue------------
initValue();
//update-end---author:wangshuai ---date:20230505 forvalue------------
}
}
function initValue() {
let value = props.value;
// update-begin--author:liaozhiyang---date:20250407---forissues/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---forissues/8037
}
async function handleFetch() {
@ -238,7 +225,6 @@
vModalValue && vModalValue(_);
emitData.value = args;
}
// update-begin--author:liusq---date:20250407---forQQYUN-11831ApiSelect #7883
//
function handlePopupScroll(e) {
const { scrollTop, scrollHeight, clientHeight } = e.target;
@ -248,7 +234,6 @@
fetch();
}
}
// update-end--author:liusq---date:20250407---forQQYUN-11831ApiSelect #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---forQQYUN-6566BasicForm(inline)
// : QQYUN-6566BasicForm(inline)
const defaultSpan = props.layout == 'inline' ? {} : { span: showAdvancedButton ? 6 : 4 };
// update-end--author:liaozhiyang---date:20240105---forQQYUN-6566BasicForm(inline)
const actionColOpt: Partial<ColEx> = {
style: { textAlign: 'right' },
...defaultSpan,
@ -127,7 +124,7 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240617---forTV360X-9991753px
// : TV360X-9991753px
.btnArea {
:deep(.ant-form-item-control-input-content) {
display: flex;
@ -137,5 +134,4 @@
}
}
}
// update-end--author:liaozhiyang---date:20240617---forTV360X-9991753px
</style>

View File

@ -54,18 +54,16 @@
formActionType: {
type: Object as PropType<FormActionType>,
},
// update-begin--author:liaozhiyang---date:20240605---forTV360X-857
// : TV360X-857
clearValidate: {
type: Function,
default: null,
},
// update-end-author:liaozhiyang---date:20240605---forTV360X-857
// update-begin--author:liaozhiyang---date:20240625---forTV360X-1511blur
// : TV360X-1511blur
formName: {
type: String,
default: '',
},
// update-end--author:liaozhiyang---date:20240625---forTV360X-1511blur
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---forTV360X-594dynamicDisabled
// : TV360X-594dynamicDisabled
if (!!globDisabled) {
return globDisabled;
}
// update-end--author:liaozhiyang---date:20240530---forTV360X-594dynamicDisabled
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---forQQYUN-8377formSchema props
// : QQYUN-8377formSchema props
const getDynamicPropsValue = computed(() => {
const { dynamicPropsVal, dynamicPropskey } = props.schema;
if (dynamicPropskey == null) {
@ -143,7 +139,6 @@
}
}
});
// update-end--author:liaozhiyang---date:20240308---forQQYUN-8377formSchema 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---forTV360X-434validator
// : TV360X-434validator
let vSwitchArr: any = [],
prevValidatorArr: any = [];
const hijackValidator = (rules) => {
@ -195,35 +190,30 @@
}
});
};
// update-end--author:liaozhiyang---date:20240530---forTV360X-434validator
function handleRules(): ValidationRule[] {
const { rules: defRules = [], component, rulesMessageJoinLabel, label, dynamicRules, required, auth, field } = props.schema;
// update-begin--author:liaozhiyang---date:20240605---forTV360X-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---forTV360X-857
// update-begin--author:liaozhiyang---date:20240531---forTV360X-842v-authshow
// : TV360X-842v-authshow
const { hasPermission } = usePermission();
const { isShow } = getShow();
if ((auth && !hasPermission(auth)) || !isShow) {
return [];
}
// update-end--author:liaozhiyang---date:20240531---forTV360X-842v-authshow
if (isFunction(dynamicRules)) {
// update-begin--author:liaozhiyang---date:20240514---forissues/1244
// : issues/1244
const ruleArr = dynamicRules(unref(getValues)) as ValidationRule[];
if (required) {
ruleArr.unshift({ required: true });
}
// update-begin--author:liaozhiyang---date:20240530---forTV360X-434validator
// : TV360X-434validator
hijackValidator(ruleArr);
// update-end--author:liaozhiyang---date:20240530---forTV360X-434validator
return ruleArr;
// update-end--author:liaozhiyang---date:20240514---forissues/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---forQQYUN-7495patternantd使InputNumber
// : QQYUN-7495patternantd使InputNumber
rules.forEach((item) => {
if (typeof item.pattern === 'string') {
try {
@ -310,10 +298,8 @@
}
}
});
// update-end--author:liaozhiyang---date:20231226---forQQYUN-7495patternantd使InputNumber
// update-begin--author:liaozhiyang---date:20240530---forTV360X-434validator
// : TV360X-434validator
hijackValidator(rules);
// update-end--author:liaozhiyang---date:20240530---forTV360X-434validator
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---forQQYUN-6679input
// : QQYUN-6679input
let isTrim = false;
if (component === 'Input' && componentProps && componentProps.trim) {
isTrim = true;
}
// update-end--author:liaozhiyang---date:20231013---forQQYUN-6679input
const eventKey = `on${upperFirst(changeEvent)}`;
const getRules = (): ValidationRule[] => {
const dyRules = isFunction(dynamicRules) ? dynamicRules(unref(getValues)) : [];
return [...dyRules, ...defRules];
};
// update-begin--author:liaozhiyang---date:20230922---forissues/752dynamicRules 使 trigger: 'blur'
// : issues/752dynamicRules 使 trigger: 'blur'
const on = {
[eventKey]: (...args: Nullable<Recordable>[]) => {
const [e] = args;
if (propsData[eventKey]) {
propsData[eventKey](...args);
// : issues/8791jspopuponlChange()
if (eventKey == 'onPopUpChange') {
return;
}
}
const target = e ? e.target : null;
// update-begin--author:liaozhiyang---date:20231013---forQQYUN-6679input
// : QQYUN-6679input
let value;
if (target) {
if (isCheck) {
@ -351,22 +340,18 @@
} else {
value = e;
}
// update-end--author:liaozhiyang---date:20231013---forQQYUN-6679input
props.setFormModel(field, value);
// update-begin--author:liaozhiyang---date:20240625---forTV360X-1511blur
// : TV360X-1511blur
const findItem = getRules().find((item) => item?.trigger === 'blur');
if (!findItem) {
// update-begin--author:liaozhiyang---date:20240522---forTV360X-341
// : TV360X-341
props.validateFields([field]).catch((_) => {});
// update-end--author:liaozhiyang---date:20240625---forTV360X-341
}
// update-end--author:liaozhiyang---date:20240625---forTV360X-1511blur
},
// onBlur: () => {
// props.validateFields([field], { triggerName: 'blur' }).catch((_) => {});
// },
};
// update-end--author:liaozhiyang---date:20230922---forissues/752dynamicRules 使 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---forQQYUN-8377formSchema props
// : QQYUN-8377formSchema props
const dynamicPropskey = props.schema.dynamicPropskey;
if (dynamicPropskey) {
propsData[dynamicPropskey] = unref(getDynamicPropsValue);
}
// update-end--author:liaozhiyang---date:20240308---forQQYUN-8377formSchema props
// update-begin--author:sunjianlei---date:20240725---forTV360X-972
// const isCreatePlaceholder = !propsData.disabled && autoSetPlaceHolder;
const isCreatePlaceholder = !!autoSetPlaceHolder;
// update-end----author:sunjianlei---date:20240725---forTV360X-972
// RangePicker place
if (isCreatePlaceholder && component !== 'RangePicker' && component) {
//placeholder
// update-begin--author:liaozhiyang---date:20240724---forissues/6908BasicColumnFormSchema
// : issues/6908BasicColumnFormSchema
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---forissues/6908BasicColumnFormSchema
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-2061online4 ..
//label
const { label: itemLabel, helpMessage, helpComponentProps, subLabel, labelLength } = props.schema;
// update-begin--author:liaozhiyang---date:20240724---forissues/6908BasicColumnFormSchema
// : issues/6908BasicColumnFormSchema
const label = isFunction(itemLabel) ? itemLabel() : itemLabel;
// update-end--author:liaozhiyang---date:20240724---forissues/6908BasicColumnFormSchema
let showLabel: string = label + '';
// update-begin--author:liaozhiyang---date:20240517---forTV360X-98labellabelLength
// : TV360X-98labellabelLength
if (labelLength) {
showLabel = showLabel.substr(0, labelLength);
}
// update-end--author:liaozhiyang---date:20240517---forTV360X-98labellabelLength
const titleObj = { title: label };
const renderLabel = subLabel ? (
<span>
@ -454,7 +432,6 @@
) : (
label
);
//update-end-author:taoyan date:2022-9-7 for: VUEN-2061online4 ..
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---forissues-641span
// : issues-641span
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---forissues-641span
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---forTV360X-1511blur
// : TV360X-1511blur
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---forTV360X-1511blur
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240617---forTV360X-1253
// : TV360X-1253
div > :deep(.ant-picker) {
width: 100%;
}
// update-end--author:liaozhiyang---date:20240617---forTV360X-1253
</style>

View File

@ -39,7 +39,7 @@
</script>
<style scoped lang="less">
// update-begin--author:liaozhiyang---date:20240719---forTV360X-1090label
// : TV360X-1090label
.jeecg-and-modal-form {
:deep(.ant-form-item-label) {
overflow: hidden;
@ -195,7 +195,7 @@
}
}
// end antdv
// update-begin--author:liaozhiyang---date:20240605---forTV360X-857online
// : TV360X-857online
.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---forTV360X-13InputNumber3''0.00
// : TV360X-13InputNumber3''0.00
if (['InputNumber'].includes(component) && typeof val === 'string' && val != '') {
return Number(val);
}
// update-end--author:liaozhiyang---date:20240517---forTV360X-13InputNumber3''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---forissues/7261autoAdvancedLineautoAdvancedLine
/*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---forissues/7261autoAdvancedLineautoAdvancedLine
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---forQQYUN-7535popupinputNumber
// : QQYUN-7535popupinputNumber
value = handleInputStringValue(schema?.component, value);
// update-end--author:liaozhiyang---date:20231226---forQQYUN-7535popupinputNumber
// 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---forissues/6865labelWidth
// : issues/6865labelWidth
col = {};
// update-end--author:liaozhiyang---date:20240717---forissues/6865labelWidth
}
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--forTV360X-1223
// : TV360X-1223
if (props.value) {
initValue();
} else {
cascaderValue.value = [];
}
// update-end--author:liaozhiyang---date:20240612---forTV360X-1223
});
/**
@ -63,7 +62,7 @@
*/
function initValue() {
let value = props.value ? props.value : [];
// update-begin--author:liaozhiyang---date:20240607---forTV360X-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---forTV360X-501
}
function transform(arr) {
let result: any = [];
@ -112,7 +110,7 @@
};
function handleChange(arr, ...args) {
// update-begin--author:liaozhiyang---date:20240607---forTV360X-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---forTV360X-501
// emitData.value = args;
//update-begin-author:taoyan date:2022-6-27 for: VUEN-1424vue3jvxeerp
// v-model:value
// state.value = result;
//update-end-author:taoyan date:2022-6-27 for: VUEN-1424vue3jvxeerp
}
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---forQQYUN-9110
// : QQYUN-9110
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---forQQYUN-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---forQQYUN-7799
// : QQYUN-7799
.colorText {
display: inline-block;
height: 20px;
@ -124,5 +121,4 @@
color: #fff;
font-size: 12px;
}
// update-begin--author:liaozhiyang---date:20230110---forQQYUN-7799
</style>

View File

@ -90,9 +90,8 @@
//
tabSize: 2,
// JS
// update-begin--author:liaozhiyang---date:20240327---forQQYUN-8639
// : QQYUN-8639
theme: getDarkMode.value == ThemeEnum.DARK ? 'monokai' : props.theme,
// update-end--author:liaozhiyang---date:20240327---forQQYUN-8639
smartIndent: true, //
//
lineNumbers: true,
@ -104,12 +103,10 @@
// :
//
styleActiveLine: true,
// update-begin--author:liaozhiyang---date:20231201---forissues/869JCodeEditormode
// : issues/869JCodeEditormode
mode: props.language,
// update-begin--author:liaozhiyang---date:20231201---forissues/869JCodeEditormode
// update-begin--author:liaozhiyang---date:20240603---forTV360X-898
// : TV360X-898
readOnly: props.disabled,
// update-end--author:liaozhiyang---date:20240603---forTV360X-898
//
matchBrackets: true,
extraKeys: {
@ -145,10 +142,9 @@
}
return _props;
});
// update-begin--author:liaozhiyang---date:20230904---forQQYUN-5955online js
// : QQYUN-5955online js
const { codeHintingMount, codeHintingRegistry } = useCodeHinting(CodeMirror, props.keywords, props.language);
codeHintingRegistry();
// update-end--author:liaozhiyang---date:20230904---forQQYUN-5955online js
/**
* 监听组件值
*/
@ -162,11 +158,10 @@
);
onMounted(() => {
initialize();
// update-begin--author:liaozhiyang---date:20240318---forQQYUN-8473
// : QQYUN-8473
setTimeout(() => {
refresh();
}, 150);
// update-end--author:liaozhiyang---date:20240318---forQQYUN-8473
});
/**
@ -181,7 +176,7 @@
coder?.setValue(value ?? '');
innerValue = value;
trigger && emitChange(innerValue);
// update-begin--author:liaozhiyang---date:20240510---forQQYUN-9231
// : QQYUN-9231
setTimeout(() => {
refresh();
//
@ -189,7 +184,6 @@
refresh();
}, 600);
}, 400);
// update-end--author:liaozhiyang---date:20240510---forQQYUN-9231
}
//
@ -213,9 +207,8 @@
coder.on('change', onChange);
//
setValue(innerValue, false);
// update-begin--author:liaozhiyang---date:20230904---forQQYUN-5955online js
// : QQYUN-5955online js
codeHintingMount(coder);
// update-end--author:liaozhiyang---date:20230904---forQQYUN-5955online 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-2480bugonline vue3 8online js
// : VUEN-2480bugonline vue3 8online js
function refresh(){
if(coder){
coder.refresh();
}
}
//update-end-author:taoyan date:2022-10-18 for: VUEN-2480bugonline vue3 8online js
/**
* 2024-04-01
@ -370,7 +361,7 @@
max-width: 600px;
max-height: 300px;
}
// update-begin--author:liaozhiyang---date:20240327---forQQYUN-8639
// : QQYUN-8639
html[data-theme='dark'] {
.@{prefix-cls} {
.CodeMirror {
@ -378,5 +369,4 @@
}
}
}
// update-end--author:liaozhiyang---date:20240327---forQQYUN-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: 使useRuleFormItemvaluechange
// change,value''change
watch(
() => props.value,
@ -136,7 +135,6 @@
}
}
);
//update-end-author:taoyan date:20220404 for: 使useRuleFormItemvaluechange
async function initDictData() {
let { dictCode, stringToNumber } = props;
@ -161,7 +159,6 @@
let changeValue:any;
//
//update-begin---author:wangshuai ---date:20230216 for[QQYUN-4290],change------------
//statechange
if (mode === 'multiple') {
changeValue = e?.target?.value ?? e;
@ -177,10 +174,8 @@
}
state.value = changeValue;
//update-begin---author:wangshuai ---date:20230403 forissues/4507JDictSelectTag使Expected Function, got Array------------
// : issues/4507JDictSelectTag使Expected Function, got Array------------
emit('update:value',changeValue)
//update-end---author:wangshuai ---date:20230403 forissues/4507JDictSelectTag使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 forissues/506JDictSelectTag type="radio" ------------
// : issues/506JDictSelectTag type="radio" ------------
emit('update:value',e?.target?.value ?? e)
//update-end---author:wangshuai ---date:20230504 forissues/506JDictSelectTag type="radio" ------------
}
/** 用于搜索下拉框中的内容 */
function handleFilterOption(input, option) {
// update-begin--author:liaozhiyang---date:20230914---forQQYUN-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---forQQYUN-6514 Y
if (props.onlySearchByLabel) {
// label value
return false;
@ -228,7 +221,7 @@
});
</script>
<style scoped lang="less">
// update-begin--author:liaozhiyang---date:20230110---forQQYUN-7799
// : QQYUN-7799
.colorText {
display: inline-block;
height: 20px;
@ -239,5 +232,5 @@
color: #fff;
font-size: 12px;
}
// update-begin--author:liaozhiyang---date:20230110---forQQYUN-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---forQQYUN-9110
// : QQYUN-9110
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---forQQYUN-9110
}
return {

View File

@ -134,7 +134,7 @@
watch(
() => props.value,
(val, prevCount) => {
//update-begin---author:liusq ---date:20230601 forissues/556JImageUploadvalue------------
// : issues/556JImageUploadvalue------------
if (val && val instanceof Array) {
val = val.join(',');
}
@ -143,7 +143,6 @@
}
},
{ immediate: true }
//update-end---author:liusq ---date:20230601 forissues/556JImageUploadvalue------------
);
/**
@ -187,12 +186,11 @@
*/
function handleChange({ file, fileList, event }) {
initTag.value = false;
// update-begin--author:liaozhiyang---date:20231116---forissues/846
// uploadFileList.value = fileList;
if (file.status === 'error') {
createMessage.error(`${file.name} 上传失败.`);
}
// update-begin--author:liaozhiyang---date:20240704---forTV360X-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---forTV360X-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---forissues/846
}
/**

View File

@ -82,10 +82,9 @@
//
function handleClose() {
// update-begin--author:liaozhiyang---date:20231226---forQQYUN-7477
// : QQYUN-7477
closeModal();
reset();
// update-end--author:liaozhiyang---date:20231226---forQQYUN-7477
}
//
@ -117,11 +116,10 @@
if (unref(foreignKeys) && unref(foreignKeys).length > 0) {
formData.append('foreignKeys', unref(foreignKeys));
}
// update-begin--author:liaozhiyang---date:20240429---forissues/6124Online
// : issues/6124Online
if (isObject(foreignKeys.value)) {
formData.append('foreignKeys', JSON.stringify(foreignKeys.value));
}
// update-end--author:liaozhiyang---date:20240429---forissues/6124Online
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---forissues/803JIput updateSchema
//
const getBindValue = computed(() => {
return omit(Object.assign({}, unref(props), unref(attrs)), ['value']);
});
// update-end--author:liaozhiyang---date:20231026---forissues/803JIput updateSchema
//
watch(
() => props.type,

View File

@ -104,11 +104,10 @@
.@{prefix-cls} {
&-popover {
// update-begin--author:liaozhiyang---date:20240520---forTV360X-144jVxetabletitle线
// : TV360X-144jVxetabletitle线
.ant-popover-title:has(.emptyTitle) {
border-bottom: none;
}
// update-end--author:liaozhiyang---date:20240520---forTV360X-144jVxetabletitle线
}
&-input {

View File

@ -147,17 +147,15 @@
function handleAddRecord(e) {
prevent(e);
openListModal(true, {
// update-begin--author:liaozhiyang---date:20240517---forTV360X-43
// : TV360X-43
selectedRowKeys: selectRecords.value.map((item) => item.id),
selectedRows: [...selectRecords.value],
// update-end--author:liaozhiyang---date:20240517---forTV360X-43
});
}
function addCard(data) {
// update-begin--author:liaozhiyang---date:20240517---forTV360X-43
// : TV360X-43
let arr = [];
// update-end--author:liaozhiyang---date:20240517---forTV360X-43
for (let item of data) {
let temp = { ...item };
transData(temp);
@ -230,17 +228,15 @@
);
onMounted(() => {
// update-begin--author:liaozhiyang---date:20240522---forTV360X-281
// : TV360X-281
if (tableLinkCardRef.value.offsetWidth < 250) {
fixedSpan.value = 24;
}
// update-end--author:liaozhiyang---date:20240522---forTV360X-281
});
// update-begin--author:liaozhiyang---date:20240529---forTV360X-389
// : TV360X-389
const handleImageError = (event) => {
event.target.src = placeholderImage;
};
// update-end--author:liaozhiyang---date:20240529---forTV360X-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---forissues/8163
// : issues/8163
let arr = [data, ...selectedRows.value];
// update-end--author:liaozhiyang---date:20250429---forissues/8163
emit('success', arr);
closeModal();
//reload();

View File

@ -146,9 +146,8 @@ export function useLinkTable(props) {
}
}
// add
// update-begin--author:liaozhiyang---date:20240607---forTV360X-1095
// : TV360X-1095
props.editBtnShow && dataList.push({});
// update-end--author:liaozhiyang---date:20240607---forTV360X-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---forTV360X-38
// : TV360X-38
if (typeof url === 'string') {
//
url = url.split(',')[0];
}
// update-end--author:liaozhiyang---date:20250517---forTV360X-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---forQQYUN-9110
// : QQYUN-9110
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---forQQYUN-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---forissues/675Popup
//groupId
const uniqGroupId = computed(() => (props.groupId ? `${props.groupId}_${code}_${fieldConfig[0]['source']}_${fieldConfig[0]['target']}` : ''));
// update-begin--author:liaozhiyang---date:20230811---forissues/675Popup
/**
* 判断popup配置项是否正确
*/
@ -108,9 +102,8 @@
*/
function handleOpen() {
emit('focus');
// update-begin--author:liaozhiyang---date:20240528---forTV360X-317JPopupJPopupdic
// : TV360X-317JPopupJPopupdic
!attrs.value.disabled && openModal(true);
// update-end--author:liaozhiyang---date:20240528---forTV360X-317JPopupJPopupdic
}
/**
@ -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---forQQYUN-7535numberjoinstring
// : QQYUN-7535numberjoinstring
val = val.length == 1 ? val[0] : val.join(',');
// update-begin--author:liaozhiyang---date:20230831---forQQYUN-7535numberjoinstring
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---forissues/5288popup
// update-begin--author:liaozhiyang---date:20230811---forissues/5213JPopupchange
// : issues/5213JPopupchange
emit('popUpChange', values);
// update-end--author:liaozhiyang---date:20230811---forissues/5213JPopupchange
// update-begin--author:liaozhiyang---date:20230831---forissues/5288popup
}
return {
@ -176,13 +165,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260antd
// : QQYUN-9260antd
.JPopup {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---forQQYUN-9260antd
.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---forTV360X-317JPopupJPopupdic
// : TV360X-317JPopupJPopupdic
!attrs.value.disabled && openModal(true);
// update-end--author:liaozhiyang---date:20240528---forTV360X-317JPopupJPopupdic
}
/**
* 监听value数值
@ -211,13 +208,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260antd
// : QQYUN-9260antd
.JPopupDict {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---forQQYUN-9260antd
.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] rangeDateallowEmpty
// : [issues/6368] rangeDateallowEmpty
str = arr.join(',')
// update-end--author:liaozhiyang---date:20240710---for[issues/6368] rangeDateallowEmpty
}
emit('change', str);
emit('update:value', str);

View File

@ -39,10 +39,9 @@
function emitArray() {
let arr = [];
// update-begin--author:liaozhiyang---date:20240704---forTV360X-17490
// : TV360X-17490
let begin = beginValue.value ?? '';
let end = endValue.value ?? '';
// update-end--author:liaozhiyang---date:20240704---forTV360X-17490
arr.push(begin);
arr.push(end);
emit('change', arr);
@ -75,7 +74,7 @@
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240607---forTV360X-214
// : TV360X-214
.ant-input-group {
display: flex;
.ant-input-number {
@ -89,5 +88,4 @@
}
}
}
// update-end--author:liaozhiyang---date:20240607---forTV360X-214
</style>

View File

@ -77,33 +77,27 @@
default: (node) => node?.parentNode,
},
//YSelect
//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/8101dict---
//
multiple:{
type: Boolean,
default: false
},
//update-end---author:wangshuai---date:2025-04-17---for:issues/8101dict---
},
emits: ['change', 'update:value'],
setup(props, { emit, refs }) {
const options = ref<any[]>([]);
const loading = ref(false);
// update-begin--author:liaozhiyang---date:20231205---forissues/897JSearchSelectclass/style
// : issues/897JSearchSelectclass/style
const attrs = useAttrs({'excludeDefaultKeys': false});
// update-end--author:liaozhiyang---date:20231205---forissues/897JSearchSelectclass/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---forTV360X-1898JsearchSelect
// : TV360X-1898JsearchSelect
pageNo = 1;
isHasData = true;
searchKeyword = value;
// update-end--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
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]JSearchSelectsearchSQL #6049------------
// : [QQYUN-8800]JSearchSelectsearchSQL #6049------------
keywordInfo = keywordInfo.replaceAll("'", '');
//update-end---author:chenrui ---date:2024/4/7 for[QQYUN-8800]JSearchSelectsearchSQL #6049------------
// codetable,text,code
defHttp
.get({
@ -198,13 +190,11 @@
return;
}
options.value = res;
// update-begin--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
// : TV360X-1898JsearchSelect
pageNo++;
// update-end--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
} else {
// update-begin--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
// : TV360X-1898JsearchSelect
pageNo == 1 && (isHasData = false);
// update-end--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
}
});
}, 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/8101dict---
//
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/8101dict---
}
}
});
}
} else {
//update-begin---author:wangshuai---date:2025-04-17---for:issues/8101dict---
// : issues/8101dict---
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/8101dict---
}
}
@ -304,11 +287,10 @@
if (!dict) {
console.error('搜索组件未配置字典项');
} else {
// update-begin--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
// : TV360X-1898JsearchSelect
pageNo = 1;
isHasData = true;
searchKeyword = '';
// update-end--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
//
loading.value = true;
@ -322,13 +304,11 @@
loading.value = false;
if (res && res.length > 0) {
options.value = res;
// update-begin--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
// : TV360X-1898JsearchSelect
pageNo++;
// update-end--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
} else {
// update-begin--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
// : TV360X-1898JsearchSelect
pageNo == 1 && (isHasData = false);
// update-end--author:liaozhiyang---date:20240731---forTV360X-1898JsearchSelect
}
});
}
@ -346,19 +326,16 @@
* 同步改变事件
* */
function handleChange(value) {
//update-begin---author:wangshuai---date:2025-04-17---for:issues/8101dict---
//change
if(!props.multiple){
selectedValue.value = value;
callback();
}
//update-end---author:wangshuai---date:2025-04-17---for:issues/8101dict---
}
/**
* 异步改变事件
* */
function handleAsyncChange(selectedObj) {
//update-begin---author:wangshuai---date:2025-04-17---for:issues/8101dict---
// 使change
if(!props.multiple){
if (selectedObj) {
@ -371,15 +348,11 @@
loadData('');
}
callback();
// update-begin--author:liaozhiyang---date:20240524---forTV360X-426
// xloadSelectTexttrue
selectedObj ?? (loadSelectText.value = true);
// update-end--author:liaozhiyang---date:20240524---forTV360X-426
}
//update-end---author:wangshuai---date:2025-04-17---for:issues/8101dict---
}
//update-begin---author:wangshuai---date:2025-04-17---for:issues/8101dict---
/**
* 异步值选中事件
* @param selectedObj
@ -422,14 +395,12 @@
callback();
}
}
//update-end---author:wangshuai---date:2025-04-17---for:issues/8101dict---
/**
*回调方法
* */
function callback() {
loadSelectText.value = false;
//update-begin---author:wangshuai---date:2025-04-17---for:issues/8101dict---
//
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/8101dict---
}
/**
* 过滤选中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---forQQYUN-9339modalmodaloptions
// : QQYUN-9339modalmodaloptions
return setPopContainer(node, props.popContainer);
// update-end--author:liaozhiyang---date:20240517---forQQYUN-9339modalmodaloptions
} 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---forTV360X-26
// : TV360X-26
const handleAsyncFocus = () => {
// update-begin--author:liaozhiyang---date:20240709---forissues/6681
// : issues/6681
if ((isObject(selectedAsyncValue.value) || selectedAsyncValue.value?.length) && isDictTable.value && props.async) {
// update-begin--author:liaozhiyang---date:20240809---forTV360X-2062()()
// : TV360X-2062()()
options.value = [];
// update-end--author:liaozhiyang---date:20240809---forTV360X-2062()()
initDictTableData();
}
// update-begin--author:liaozhiyang---date:20240919---forTV360X-2348options
// : TV360X-2348options
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---forTV360X-2348options
attrs.onFocus?.();
};
// update-end--author:liaozhiyang---date:20240523---forTV360X-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---forTV360X-576JSelectDept
//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---forTV360X-576JSelectDept
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---forTV360X-414(JSelectUser)
// watch(selectValues, () => {
// if (selectValues) {
// state.value = selectValues.value;
// }
// });
// update-end--author:liaozhiyang---date:20240527---forTV360X-414(JSelectUser)
/**
* 监听selectOptions变化
*/
@ -138,7 +130,7 @@
}
const getBindValue = Object.assign({}, unref(props), unref(attrs));
// update-begin--author:liaozhiyang---date:20240527---forTV360X-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---forTV360X-1648
// : TV360X-1648
if (!values || values.length == 0) {
emit('select', null, null);
}
// update-end--author:liaozhiyang---date:20240627---forTV360X-1648
};
// update-end--author:liaozhiyang---date:20240527---forTV360X-414(JSelectUser)
return {
// state,
@ -180,13 +170,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260antd
// : QQYUN-9260antd
.JSelectDept {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---forQQYUN-9260antd
.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---forQQYUN-9110
// : QQYUN-9110
nextTick(() => {
formItemContext?.onFieldChange();
});
// update-end--author:liaozhiyang---date:20240429---forQQYUN-9110
}
function getParentContainer(node) {
if (!props.popContainer) {
return node?.parentNode;
} else {
// update-begin--author:liaozhiyang---date:20240517---forQQYUN-9339modalmodaloptions
// : QQYUN-9339modalmodaloptions
return setPopContainer(node, props.popContainer);
// update-end--author:liaozhiyang---date:20240517---forQQYUN-9339modalmodaloptions
}
}
// 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---forpull/8014checkbox
// : pull/8014checkbox
watch(
() => props.value,
() => {
if (props.value) {
initValue();
} else {
// update-begin--author:liaozhiyang---date:20250604---forissues/8233resetFields
// : issues/8233resetFields
if (selectValues.value?.length) {
selectValues.value = [];
}
// update-end--author:liaozhiyang---date:20250604---forissues/8233resetFields
}
},
{ deep: true, immediate: true }
);
// update-end--author:liaozhiyang---date:20250423---forpull/8014checkbox
/**
* 监听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---forQQYUN-9260antd
// : QQYUN-9260antd
.JSelectPosition {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---forQQYUN-9260antd
.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---forissues/7948JselectRole
// : issues/7948JselectRole
emit('update:value', values);
// update-end--author:liaozhiyang---date:20250318---forissues/7948JselectRole
}
const getBindValue = Object.assign({}, unref(props), unref(attrs));
return {
@ -139,13 +136,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260antd
// : QQYUN-9260antd
.JSelectRole {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---forQQYUN-9260antd
.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 forQQYUN-56855------------
//id
excludeUserIdList:{
type: Array,
default: () => [],
}
//update-end---author:wangshuai ---date:20230703 forQQYUN-56855------------
},
emits: ['options-change', 'change', 'update:value'],
setup(props, { emit }) {
@ -87,11 +83,8 @@
* 监听组件值
*/
watchEffect(() => {
// update-begin--author:liaozhiyang---date:20240611---forTV360X-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---forTV360X-576
props.value && initValue();
//
if (!props.value) {
@ -108,7 +101,7 @@
// }
// });
//update-begin---author:wangshuai ---date:20230703 forQQYUN-56855------------
// : QQYUN-56855------------
const excludeUserIdList = ref<any>([]);
/**
@ -117,7 +110,6 @@
watch(()=>props.excludeUserIdList,(data)=>{
excludeUserIdList.value = data;
},{ immediate: true })
//update-end---author:wangshuai ---date:20230703 forQQYUN-56855------------
/**
* 打卡弹出框
@ -156,7 +148,7 @@
send(values);
}
const getBindValue = Object.assign({}, unref(props), unref(attrs));
// update-begin--author:liaozhiyang---date:20240517---forQQYUN-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---forQQYUN-9366
return {
// state,
attrs,
@ -193,13 +184,12 @@
});
</script>
<style lang="less" scoped>
// update-begin--author:liaozhiyang---date:20240515---forQQYUN-9260antd
// : QQYUN-9260antd
.JselectUser {
> .ant-form-item {
display: none;
}
}
// update-end--author:liaozhiyang---date:20240515---forQQYUN-9260antd
.j-select-row {
@width: 82px;

View File

@ -71,11 +71,10 @@
*/
watch(selectValues, () => {
if (selectValues) {
// update-begin--author:liaozhiyang---date:20250616---forQQYUN-12869
// : QQYUN-12869
if (props.value === undefined && selectValues.value?.length == 0) {
return;
}
// update-end--author:liaozhiyang---date:20250616---forQQYUN-12869
state.value = selectValues.value;
}
});

View File

@ -71,11 +71,10 @@
*/
watch(selectValues, () => {
if (selectValues) {
// update-begin--author:liaozhiyang---date:20250616---forQQYUN-12869
// : QQYUN-12869
if (props.value === undefined && selectValues.value?.length == 0) {
return;
}
// update-end--author:liaozhiyang---date:20250616---forQQYUN-12869
state.value = selectValues.value;
}
});

View File

@ -41,14 +41,13 @@
() => props.value,
(val) => {
if (!props.query) {
// update-begin--author:liaozhiyang---date:20231226---forQQYUN-7473options使[0,1]
// : QQYUN-7473options使[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---forQQYUN-7473options使[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 forJTreeSelectpidValue------------
// : JTreeSelectpidValue------------
pidValue: propTypes.string.def(''),
//update-end---author:wangshuai ---date:20220620 forJTreeSelectpidValue--------------
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 JTreeSelectchangeOptions
// : issues/4173 Online JTreeSelectchangeOptions
url: propTypes.string.def(''),
params: propTypes.object.def({}),
//update-end-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelectchangeOptions
//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---forissues/1283JtreeSelect
// : issues/1283JtreeSelect
watch(
() => props.dict,
() => {
@ -101,8 +95,7 @@
loadRoot();
}
);
// update-end--author:liaozhiyang---date:20240612---forissues/1283JtreeSelect
// update-begin--author:liaozhiyang---date:20240529---forTV360X-87
// : TV360X-87
watch(
() => props.hiddenNodeKey,
() => {
@ -112,26 +105,23 @@
}
}
);
// update-end--author:liaozhiyang---date:20240529---forTV360X-87
//update-begin-author:taoyan date:2022-5-25 for: VUEN-1056 15online
// : VUEN-1056 15online
watch(
() => props.reload,
async () => {
treeData.value = [];
// update-begin--author:liaozhiyang---date:20240524---forTV360X-88online
// : TV360X-88online
show.value = false;
nextTick(() => {
show.value = true;
});
// update-end--author:liaozhiyang---date:20240524---forTV360X-88online
await loadRoot();
},
{
immediate: false,
}
);
//update-end-author:taoyan date:2022-5-25 for: VUEN-1056 15online
/**
* 根据code获取下拉数据并回显
@ -144,11 +134,11 @@
treeValue.value = { label: null, value: null };
}
} else {
//update-begin-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelectchangeOptions
// : issues/4173 Online JTreeSelectchangeOptions
if(props.url){
getItemFromTreeData();
}else{
// update-begin--author:liaozhiyang---date:20250423---forissues/8093label
// : issues/8093label
if (props.value) {
if (isArray(treeValue.value)) {
let isNotRequestTransform = false;
@ -164,11 +154,9 @@
}
}
}
// update-end--author:liaozhiyang---date:20250423---forissues/8093label
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 JTreeSelectchangeOptions
}
}
@ -225,9 +211,8 @@
i.value = i.key;
i.isLeaf = !!i.leaf;
}
// update-begin--author:liaozhiyang---date:20240523---forTV360X-87
// : TV360X-87
handleHiddenNode(res.result);
// update-end--author:liaozhiyang---date:20240523---forTV360X-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---forTV360X-87
// : TV360X-87
handleHiddenNode(res.result);
// update-end--author:liaozhiyang---date:20240523---forTV360X-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---forissues/8093label
// : issues/8093label
if (isArray(value)) {
// label
value.forEach((item) => {
@ -328,7 +312,6 @@
} else {
treeValue.value = value;
}
// update-end--author:liaozhiyang---date:20250423---forissues/8093label
}
function emitValue(value) {
@ -368,7 +351,7 @@
});
}
//update-begin-author:taoyan date:2022-11-8 for: issues/4173 Online JTreeSelectchangeOptions
// : issues/4173 Online JTreeSelectchangeOptions
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---forTV360X-87
// : TV360X-87
handleHiddenNode(res.result);
// update-end--author:liaozhiyang---date:20240523---forTV360X-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 JTreeSelectchangeOptions
/**
* 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]UploadreturnUrlfalse'[object Object]' ------------
// : [issues/5327]UploadreturnUrlfalse'[object Object]' ------------
if (props.returnUrl) {
parsePathsValue(val);
} else {
val && parseArrayValue(JSON.parse(val));
}
//update-end---author:liusq ---date:20230914 for[issues/5327]UploadreturnUrlfalse'[object Object]' ------------
}
},
{ immediate: true }
@ -202,9 +199,8 @@
return;
}
let list: any[] = [];
// update-begin--author:liaozhiyang---date:20250325---forissues/7990
// : issues/7990
const result = split(paths);
// update-end--author:liaozhiyang---date:20250325---forissues/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---forissues/1273JUploadbeforeUpload
// beforeUpload falsestatus
info.file.status && (fileList.value = fileListTemp);
// update-end--author:liaozhiyang---date:20240628---forissues/1273JUploadbeforeUpload
if (info.file.status === 'done' || info.file.status === 'removed') {
//returnUrltrue
if (props.returnUrl) {
@ -332,9 +326,8 @@
return;
}
}
//update-begin---author:liusq ---date:20230914 for[issues/5327]UploadreturnUrlfalse'[object Object]' ------------
// : [issues/5327]UploadreturnUrlfalse'[object Object]' ------------
emitValue(JSON.stringify(newFileList));
//update-end---author:liusq ---date:20230914 for[issues/5327]UploadreturnUrlfalse'[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---forQQYUN-7678
// : QQYUN-7678
maxHeight: {
type: Number,
default: 500,
},
// update-end--author:liaozhiyang---date:20231220---forQQYUN-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;
// BasicTreevalue
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---forissues/675Popup
// : issues/675Popup
const getBindValue = computed(() => {
return Object.assign({}, unref(props), unref(attrs));
});
// update-end--author:liaozhiyang---date:20230811---forissues/675Popup
const [
{
visibleChange,
@ -159,12 +158,11 @@
watch(
() => props.param,
() => {
// update-begin--author:liaozhiyang---date:20231213---forissues/901JPopupparam
// : issues/901JPopupparam
if (visible.value) {
dynamicParamHandler();
loadData();
}
// update-end--author:liaozhiyang---date:20231213---forissues/901JPopupparam
}
);
/**
@ -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---forissues/742
// : issues/742
tableRef.value.clearSelectedRowKeys();
// update-end--author:liaozhiyang---date:20230908---forissues/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--forissues/3656popupdict
// : issues/3656popupdict
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--forissues/3656popupdict
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 forQQYUN-56855------------
//id
excludeUserIdList: {
type: Array,
default: [],
},
//update-end---author:wangshuai ---date:20230703 forQQYUN-56855------------
// 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---forissues/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---forissues/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 forQQYUN-56855------------
/**
* 用户返回结果逻辑查询
*/
@ -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---forQQYUN-9366
//update-end---author:wangshuai ---date:20230703 forQQYUN-56855------------
// update-begin--author:liaozhiyang---date:20240607---forTV360X-30510
// : TV360X-30510
const clientHeight = document.documentElement.clientHeight * 200;
maxHeight.value = clientHeight > 600 ? 600 : clientHeight;
// update-end--author:liaozhiyang---date:20240607---forTV360X-30510
//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--forissues/8078
// : issues/8078
maxSelectCount: {
type: Number,
default: 2,
},
// update-end--author:liaozhiyang---date:20250414--forissues/8078
store: {
type: String,
default: 'id',

View File

@ -156,11 +156,10 @@
if(!list || list.length ==0 ){
return;
}
// update-begin--author:liaozhiyang---date:20250414--forissues/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--forissues/8078
}
async function loadDataList() {
@ -195,7 +194,6 @@
function onSelect(e, item) {
prevent(e);
// update-begin--author:liaozhiyang---date:20250414--forissues/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--forissues/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---forQQYUN-8865js
// : QQYUN-8865js
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---forQQYUN-8865js
} 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---forQQYUN-12155
// : QQYUN-12155
checkedKeys['value'] = [...selectValues['value']];
// update-end--author:liaozhiyang---date:20250423---forQQYUN-12155
},
{ immediate: true }
);
@ -70,16 +64,13 @@ export function useSelectBiz(getList, props, emit?) {
* 选择列配置
*/
const rowSelection = {
//update-begin-author:liusq---date:20220517--for: rowSelectiontype,'checkbox' ---
// : rowSelectiontype,'checkbox' ---
type: props.isRadioSelection ? 'radio' : 'checkbox',
//update-end-author:liusq---date:20220517--for: rowSelectiontype,'checkbox' ---
columnWidth: 20,
selectedRowKeys: checkedKeys,
onChange: onSelectChange,
//update-begin-author:wangshuai---date:20221102--for: [VUEN-2562] ---
//table4.4.0false
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---forQQYUN-12155
// : QQYUN-12155
checkedKeys['value'] = [...selectValues['value']];
// update-end--author:liaozhiyang---date:20250423---forQQYUN-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---forQQYUN-12179
// : QQYUN-12179
checkedKeys['value'] = [...selectValues['value']];
// update-begin--author:liaozhiyang---date:20250423---forQQYUN-12179
//
props.showSelected && initSelectRows();
} else {
// update-begin--author:liaozhiyang---date:20240517---forQQYUN-9366
// : QQYUN-9366
emit?.('close');
// update-end--author:liaozhiyang---date:20240517---forQQYUN-9366
}
}
@ -155,10 +143,9 @@ export function useSelectBiz(getList, props, emit?) {
}
//
function handleDeleteSelected(record) {
//update-begin---author:wangshuai ---date:20230404 forissues/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 forissues/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---forissues/8232JSelectDept
// : issues/8232JSelectDept
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---forissues/8232JSelectDept
}
},
{ 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 forissues/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 forissues/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 forrowkeyidsync------------
// : rowkeyidsync------------
params['pid'] = treeNode.value;
//update-end---author:wangshuai ---date:20220407 forrowkeyidsync------------
}
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---forTV360X-414(JSelectUser)
emit?.('close');
// update-end--author:liaozhiyang---date:20240527---forTV360X-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),
// jeecg3
autoAdvancedCol: propTypes.number.def(3),
// update-begin--author:liaozhiyang---date:202401009---forissues/7261autoAdvancedLineautoAdvancedLine
// 3
// autoAdvancedLine: propTypes.number.def(3),
// update-end--author:liaozhiyang---date:202401009---forissues/7261autoAdvancedLineautoAdvancedLine
//
alwaysShowLines: propTypes.number.def(1),

View File

@ -100,9 +100,8 @@ export interface FormProps {
// jeecg showAdvancedButton true3
autoAdvancedCol?: number;
// showAdvancedButton true
// update-begin--author:liaozhiyang---date:202401009---forissues/7261autoAdvancedLineautoAdvancedLine
// : issues/7261autoAdvancedLineautoAdvancedLine
// autoAdvancedLine?: number;
// update-end--author:liaozhiyang---date:202401009---forissues/7261autoAdvancedLineautoAdvancedLine
//
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---forissues/6908BasicColumnFormSchema
// : issues/6908BasicColumnFormSchema
label: string | VNode | Fn;
// update-end--author:liaozhiyang---date:20240724---forissues/6908BasicColumnFormSchema
// 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---forQQYUN-8377formSchema props
// propskey
dynamicPropskey?: string;
dynamicPropsVal?: ((renderCallbackParams: RenderCallbackParams) => any);
// update-end--author:liaozhiyang---date:20240308---forQQYUN-8377formSchema props
// componentProps使dynamicDisabledbuss
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: codecodecode ---
// : codecodecode ---
if (code && code.includes(',')) {
index = code.split(",").length;
code = code.substr(code.lastIndexOf(',') + 1);
}
//update-end-author:liusq---date:20220531--for: codecodecode ---
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/7216RangePicker/,fieldMapToTime---
// : issues/7216RangePicker/,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/7216RangePicker/,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 forissues/4947------------
// : issues/4947------------
setCurrentPage(1);
current.value = 1;
//update-end---author:wangshuai ---date:20230522 forissues/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 forissues/4947------------
/**
* 图标点击重置页数
*/
@ -111,14 +109,12 @@
currentList.value = props.currentList;
searchIconValue.value = '';
}
//update-end---author:wangshuai ---date:20230522 forissues/4947------------
function handlePageChange(page: number, size: number) {
//update-begin---author:wangshuai ---date:20230522 forissues/4947------------
// : issues/4947------------
current.value = page;
pageSize.value = size;
setPageSize(size);
//update-end---author:wangshuai ---date:20230522 forissues/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-8924vue2便---
// : QQYUN-8924vue2便---
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-8924vue2便---
watchEffect(() => {
// update-begin--author:liaozhiyang---date:20240528---forTV360X-136
// : TV360X-136
let value = props.value;
if (!props.iconPrefixSave && value) {
value = `ant-design:${value}`;
}
// update-end--author:liaozhiyang---date:20240528---forTV360X-136
currentSelect.value = value;
});
watch(
() => currentSelect.value,
(v) => {
// update-begin--author:liaozhiyang---date:20240528---forTV360X-136
// : TV360X-136
let value = v;
if (!props.iconPrefixSave && value) {
value = value.split('ant-design:')[1];
}
// update-end--author:liaozhiyang---date:20240528---forTV360X-136
emit('update:value', value);
return emit('change', value);
}
);
//update-begin---author:wangshuai ---date:20230522 forissues/4947------------
//update-begin---author:wangshuai---date:2024-05-08---for:QQYUN-8924vue2便---
/**
* 图标点击重置页数
*/
@ -179,7 +174,6 @@
iconListRef.value.currentSelectClick();
},100)
}
//update-begin---author:wangshuai ---date:20230522 forissues/4947------------
function initOtherIcon() {
otherIcons.value = icons.filter(item => {
@ -210,7 +204,6 @@
//
initOtherIcon();
})
//update-end---author:wangshuai---date:2024-05-08---for:QQYUN-8924vue2便---
</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---forQQYUN-9227
// : QQYUN-9227
formItemContext?.onFieldChange();
// update-end--author:liaozhiyang---date:20240509---forQQYUN-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---forQQYUN-8241china-area-dataJVxePcaCell
// : QQYUN-8241china-area-dataJVxePcaCell
registerASyncComponentReal(
JVxeTypes.pca,
createAsyncComponent(() => import('./src/components/JVxePcaCell.vue'))
);
// update-end--author:liaozhiyang---date:20240308---forQQYUN-8241china-area-dataJVxePcaCell
}

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