修复一系列bug

[issue/289]新增通知公告提交指定用户参数有undefined
[issue/382]省市区组件JAreaLinkage数据不回显
[issue/397]在表单中使用v-model:value绑定JSelectDept组件时无法清除已选择的数据
[issue/286]下拉搜索框问题
[issue/426]引入的回归错误 JPopupOnlReportModal.vue 中未修改
[issue/429]树搜索点击事件失效
【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后,点击确认按钮,部门信息丢失
【issues/424】开启右侧列表后,在右侧列表中删除用户时,逻辑有问题
【issues/4507】JDictSelectTag组件使用时,浏览器给出警告提示:Expected Function, got Array
pull/474/head
zhangdaiscott 2023-04-05 11:51:09 +08:00
parent 0b53292cfa
commit 0306b8669e
9 changed files with 80 additions and 15 deletions

View File

@ -81,7 +81,7 @@
required: false, required: false,
}, },
}, },
emits: ['options-change', 'change'], emits: ['options-change', 'change','update:value'],
setup(props, { emit, refs }) { setup(props, { emit, refs }) {
const dictOptions = ref<any[]>([]); const dictOptions = ref<any[]>([]);
const attrs = useAttrs(); const attrs = useAttrs();
@ -164,6 +164,10 @@
changeValue = e?.target?.value ?? e; changeValue = e?.target?.value ?? e;
} }
state.value = changeValue; state.value = changeValue;
//update-begin---author:wangshuai ---date:20230403 forissues/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------------ //update-end---author:wangshuai ---date:20230216 for[QQYUN-4290],change------------
// nextTick(() => formItemContext.onFieldChange()); // nextTick(() => formItemContext.onFieldChange());

View File

@ -29,6 +29,7 @@
:placeholder="placeholder" :placeholder="placeholder"
:filterOption="filterOption" :filterOption="filterOption"
:notFoundContent="loading ? undefined : null" :notFoundContent="loading ? undefined : null"
:dropdownAlign="{overflow: {adjustY: adjustY }}"
@change="handleChange" @change="handleChange"
> >
<template #notFoundContent> <template #notFoundContent>
@ -64,6 +65,10 @@
type: Function, type: Function,
default: (node) => node.parentNode, default: (node) => node.parentNode,
}, },
//YSelect
//update-begin-author:liusq date:2023-04-04 for:[issue/286]
adjustY:propTypes.bool.def(true),
//update-end-author:liusq date:2023-04-04 for:[issue/286]
//change //change
immediateChange: propTypes.bool.def(false), immediateChange: propTypes.bool.def(false),
//update-begin-author:taoyan date:2022-8-15 for: VUEN-1971 online 1 //update-begin-author:taoyan date:2022-8-15 for: VUEN-1971 online 1

View File

@ -129,7 +129,7 @@
queryParam, queryParam,
dictOptions, dictOptions,
}, },
] = usePopBiz(getBindValue); ] = usePopBiz(getBindValue,tableRef);
const showSearchFlag = computed(() => unref(queryInfo) && unref(queryInfo).length > 0); const showSearchFlag = computed(() => unref(queryInfo) && unref(queryInfo).length > 0);
/** /**

View File

@ -138,8 +138,10 @@ export function useSelectBiz(getList, props) {
} }
//删除已选择的信息 //删除已选择的信息
function handleDeleteSelected(record) { function handleDeleteSelected(record) {
checkedKeys.value = checkedKeys.value.splice(checkedKeys.value.indexOf(record['id']), 1); //update-begin---author:wangshuai ---date:20230404 for【issues/424】开启右侧列表后在右侧列表中删除用户时逻辑有问题------------
selectRows.value = selectRows.value.filter((item) => item['id'] !== record['id']); checkedKeys.value = checkedKeys.value.filter((item) => item != record[props.rowKey]);
selectRows.value = selectRows.value.filter((item) => item[props.rowKey] !== record[props.rowKey]);
//update-end---author:wangshuai ---date:20230404 for【issues/424】开启右侧列表后在右侧列表中删除用户时逻辑有问题------------
} }
//清空选择项 //清空选择项
function reset() { function reset() {

View File

@ -115,8 +115,31 @@ export function useTreeBiz(treeRef, getList, props) {
/** /**
* *
*/ */
function checkALL(checkAll) { async function checkALL(checkAll) {
getTree().checkAll(checkAll); getTree().checkAll(checkAll);
//update-begin---author:wangshuai ---date:20230403 for【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后点击确认按钮部门信息丢失------------
await nextTick();
checkedKeys.value = getTree().getCheckedKeys();
if(checkAll){
getTreeRow();
}else{
selectRows.value = [];
}
//update-end---author:wangshuai ---date:20230403 for【issues/394】所属部门树操作全部勾选不生效/【issues/4646】部门全部勾选后点击确认按钮部门信息丢失------------
}
/**
*
* @param res
*/
function getTreeRow() {
let ids = "";
if(unref(checkedKeys).length>0){
ids = checkedKeys.value.join(",");
}
getList({ids:ids}).then((res) =>{
selectRows.value = res;
})
} }
/** /**

View File

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

View File

@ -90,11 +90,13 @@
onCheck: (v: CheckKeys, e) => { onCheck: (v: CheckKeys, e) => {
let currentValue = toRaw(state.checkedKeys) as KeyType[]; let currentValue = toRaw(state.checkedKeys) as KeyType[];
if (isArray(currentValue) && searchState.startSearch) { if (isArray(currentValue) && searchState.startSearch) {
const { key } = unref(getFieldNames); //update-begin-author:liusq---date:20230404--for: [issue/429]---
currentValue = difference(currentValue, getChildrenKeys(e.node.$attrs.node[key])); const value = e.node.eventKey;
currentValue = difference(currentValue, getChildrenKeys(value));
if (e.checked) { if (e.checked) {
currentValue.push(e.node.$attrs.node[key]); currentValue.push(value);
} }
//update-begin-author:liusq---date:20230404--for: [issue/429]---
state.checkedKeys = currentValue; state.checkedKeys = currentValue;
} else { } else {
state.checkedKeys = v; state.checkedKeys = v;

View File

@ -5,7 +5,7 @@ import { filterMultiDictText } from '/@/utils/dict/JDictSelectUtil.js';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { OnlineColumn } from '/@/components/jeecg/OnLine/types/onlineConfig'; import { OnlineColumn } from '/@/components/jeecg/OnLine/types/onlineConfig';
import { h } from 'vue'; import { h } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter, useRoute } from 'vue-router';
import { useMethods } from '/@/hooks/system/useMethods'; import { useMethods } from '/@/hooks/system/useMethods';
import { importViewsFile } from '/@/utils'; import { importViewsFile } from '/@/utils';
@ -33,6 +33,8 @@ export function usePopBiz(props, tableRef?) {
const dataSource = ref<Array<object>>([]); const dataSource = ref<Array<object>>([]);
//定义表格信息 //定义表格信息
const columns = ref<Array<object>>([]); const columns = ref<Array<object>>([]);
// 当前路由
const route = useRoute();
//定义请求url信息 //定义请求url信息
const configUrl = reactive({ const configUrl = reactive({
//列表页加载column和data //列表页加载column和data
@ -533,6 +535,7 @@ export function usePopBiz(props, tableRef?) {
pagination.current = 1; pagination.current = 1;
} }
let params = getQueryParams(); //查询条件 let params = getQueryParams(); //查询条件
params['onlRepUrlParamStr'] = getUrlParamString();
console.log('params', params); console.log('params', params);
loading.value = true; loading.value = true;
let url = `${configUrl.getData}${unref(cgRpConfigId)}`; let url = `${configUrl.getData}${unref(cgRpConfigId)}`;
@ -546,6 +549,20 @@ export function usePopBiz(props, tableRef?) {
}); });
} }
/**
*
*/
function getUrlParamString() {
let query = route.query;
let arr:any[] = []
if(query && Object.keys(query).length>0){
Object.keys(query).map(k=>{
arr.push(`${k}=${query[k]}`)
})
}
return arr.join('&')
}
/** /**
* dataSource * dataSource
*/ */
@ -560,9 +577,11 @@ export function usePopBiz(props, tableRef?) {
} }
dataSource.value = data.records; dataSource.value = data.records;
//update-begin-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题 //update-begin-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题
tableRef.value && tableRef.value.setPagination({ //update-begin-author:liusq date:2023-4-04 for:issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改
tableRef?.value && tableRef?.value?.setPagination({
total: Number(data.total) total: Number(data.total)
}) })
//update-end-author:liusq date:2023-4-04 for:issues/426 修复356时候引入的回归错误 JPopupOnlReportModal.vue 中未修改
//update-end-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题 //update-end-author:taoyan date:2023-2-11 for:issues/356 在线报表分页有问题
} else { } else {
pagination.total = 0; pagination.total = 0;

View File

@ -41,7 +41,13 @@
let values = await validate(); let values = await validate();
setModalProps({ confirmLoading: true }); setModalProps({ confirmLoading: true });
// //
values.userIds += ','; //update-begin-author:liusq---date:20230404--for: [issue#429]undefined ---
if(values.msgType==='ALL'){
values.userIds = '';
}else{
values.userIds += ',';
}
//update-end-author:liusq---date:20230404--for: [issue#429]undefined ---
await saveOrUpdate(values, isUpdate.value); await saveOrUpdate(values, isUpdate.value);
// //
closeModal(); closeModal();