修复一系列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 Arraypull/474/head
parent
0b53292cfa
commit
0306b8669e
|
@ -81,7 +81,7 @@
|
|||
required: false,
|
||||
},
|
||||
},
|
||||
emits: ['options-change', 'change'],
|
||||
emits: ['options-change', 'change','update:value'],
|
||||
setup(props, { emit, refs }) {
|
||||
const dictOptions = ref<any[]>([]);
|
||||
const attrs = useAttrs();
|
||||
|
@ -164,6 +164,10 @@
|
|||
changeValue = e?.target?.value ?? e;
|
||||
}
|
||||
state.value = changeValue;
|
||||
|
||||
//update-begin---author:wangshuai ---date:20230403 for:【issues/4507】JDictSelectTag组件使用时,浏览器给出警告提示:Expected Function, got Array------------
|
||||
emit('update:value',changeValue)
|
||||
//update-end---author:wangshuai ---date:20230403 for:【issues/4507】JDictSelectTag组件使用时,浏览器给出警告提示:Expected Function, got Array述------------
|
||||
//update-end---author:wangshuai ---date:20230216 for:[QQYUN-4290]公文发文:选择机关代字报错,是因为值改变触发了change事件三次,导致数据发生改变------------
|
||||
|
||||
// nextTick(() => formItemContext.onFieldChange());
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
:placeholder="placeholder"
|
||||
:filterOption="filterOption"
|
||||
:notFoundContent="loading ? undefined : null"
|
||||
:dropdownAlign="{overflow: {adjustY: adjustY }}"
|
||||
@change="handleChange"
|
||||
>
|
||||
<template #notFoundContent>
|
||||
|
@ -64,6 +65,10 @@
|
|||
type: Function,
|
||||
default: (node) => node.parentNode,
|
||||
},
|
||||
//默认开启Y轴溢出位置调整,因此在可视空间不足时下拉框位置会自动上移,导致Select的输入框被遮挡。需要注意的是,默认情况是是可视空间,而不是所拥有的空间
|
||||
//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
|
||||
immediateChange: propTypes.bool.def(false),
|
||||
//update-begin-author:taoyan date:2022-8-15 for: VUEN-1971 【online 专项测试】关联记录和他表字段 1
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
queryParam,
|
||||
dictOptions,
|
||||
},
|
||||
] = usePopBiz(getBindValue);
|
||||
] = usePopBiz(getBindValue,tableRef);
|
||||
|
||||
const showSearchFlag = computed(() => unref(queryInfo) && unref(queryInfo).length > 0);
|
||||
/**
|
||||
|
|
|
@ -138,8 +138,10 @@ export function useSelectBiz(getList, props) {
|
|||
}
|
||||
//删除已选择的信息
|
||||
function handleDeleteSelected(record) {
|
||||
checkedKeys.value = checkedKeys.value.splice(checkedKeys.value.indexOf(record['id']), 1);
|
||||
selectRows.value = selectRows.value.filter((item) => item['id'] !== record['id']);
|
||||
//update-begin---author:wangshuai ---date:20230404 for:【issues/424】开启右侧列表后,在右侧列表中删除用户时,逻辑有问题------------
|
||||
checkedKeys.value = checkedKeys.value.filter((item) => item != record[props.rowKey]);
|
||||
selectRows.value = selectRows.value.filter((item) => item[props.rowKey] !== record[props.rowKey]);
|
||||
//update-end---author:wangshuai ---date:20230404 for:【issues/424】开启右侧列表后,在右侧列表中删除用户时,逻辑有问题------------
|
||||
}
|
||||
//清空选择项
|
||||
function reset() {
|
||||
|
|
|
@ -115,8 +115,31 @@ export function useTreeBiz(treeRef, getList, props) {
|
|||
/**
|
||||
* 勾选全部
|
||||
*/
|
||||
function checkALL(checkAll) {
|
||||
async function 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;
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,15 +56,17 @@ class Area {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
getText(code) {
|
||||
|
||||
//update-begin-author:liusq---date:20230404--for: [issue/382]省市区组件JAreaLinkage数据不回显---
|
||||
getText(code,index=3) {
|
||||
if (!code || code.length == 0) {
|
||||
return '';
|
||||
}
|
||||
let arr = [];
|
||||
this.getAreaBycode(code, arr, 3);
|
||||
this.getAreaBycode(code, arr, index);
|
||||
return arr.join('/');
|
||||
}
|
||||
//update-end-author:liusq---date:20230404--for: [issue/382]省市区组件JAreaLinkage数据不回显---
|
||||
|
||||
getRealCode(code) {
|
||||
let arr = [];
|
||||
|
@ -98,12 +100,14 @@ const jeecgAreaData = new Area();
|
|||
|
||||
// 根据code找文本
|
||||
const getAreaTextByCode = function (code) {
|
||||
let index = 3;
|
||||
//update-begin-author:liusq---date:20220531--for: 判断code是否是多code逗号分割的字符串,是的话,获取最后一位的code ---
|
||||
if (code && code.includes(',')) {
|
||||
index = code.split(",").length;
|
||||
code = code.substr(code.lastIndexOf(',') + 1);
|
||||
}
|
||||
//update-end-author:liusq---date:20220531--for: 判断code是否是多code逗号分割的字符串,是的话,获取最后一位的code ---
|
||||
return jeecgAreaData.getText(code);
|
||||
return jeecgAreaData.getText(code,index);
|
||||
};
|
||||
|
||||
export { getAreaTextByCode };
|
||||
|
|
|
@ -90,11 +90,13 @@
|
|||
onCheck: (v: CheckKeys, e) => {
|
||||
let currentValue = toRaw(state.checkedKeys) as KeyType[];
|
||||
if (isArray(currentValue) && searchState.startSearch) {
|
||||
const { key } = unref(getFieldNames);
|
||||
currentValue = difference(currentValue, getChildrenKeys(e.node.$attrs.node[key]));
|
||||
//update-begin-author:liusq---date:20230404--for: [issue/429]树搜索点击事件失效---
|
||||
const value = e.node.eventKey;
|
||||
currentValue = difference(currentValue, getChildrenKeys(value));
|
||||
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;
|
||||
} else {
|
||||
state.checkedKeys = v;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { filterMultiDictText } from '/@/utils/dict/JDictSelectUtil.js';
|
|||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { OnlineColumn } from '/@/components/jeecg/OnLine/types/onlineConfig';
|
||||
import { h } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { useMethods } from '/@/hooks/system/useMethods';
|
||||
import { importViewsFile } from '/@/utils';
|
||||
|
||||
|
@ -33,6 +33,8 @@ export function usePopBiz(props, tableRef?) {
|
|||
const dataSource = ref<Array<object>>([]);
|
||||
//定义表格信息
|
||||
const columns = ref<Array<object>>([]);
|
||||
// 当前路由
|
||||
const route = useRoute();
|
||||
//定义请求url信息
|
||||
const configUrl = reactive({
|
||||
//列表页加载column和data
|
||||
|
@ -533,6 +535,7 @@ export function usePopBiz(props, tableRef?) {
|
|||
pagination.current = 1;
|
||||
}
|
||||
let params = getQueryParams(); //查询条件
|
||||
params['onlRepUrlParamStr'] = getUrlParamString();
|
||||
console.log('params', params);
|
||||
loading.value = true;
|
||||
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
|
||||
*/
|
||||
|
@ -560,9 +577,11 @@ export function usePopBiz(props, tableRef?) {
|
|||
}
|
||||
dataSource.value = data.records;
|
||||
//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)
|
||||
})
|
||||
//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 在线报表分页有问题
|
||||
} else {
|
||||
pagination.total = 0;
|
||||
|
|
|
@ -41,7 +41,13 @@
|
|||
let values = await validate();
|
||||
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);
|
||||
//关闭弹窗
|
||||
closeModal();
|
||||
|
|
Loading…
Reference in New Issue