【3.6.3版本发布】代码更新
parent
4d710e058c
commit
ee7ad588e4
|
@ -5,6 +5,7 @@ import purgeIcons from 'vite-plugin-purge-icons';
|
|||
import UnoCSS from 'unocss/vite';
|
||||
import { presetTypography, presetUno } from 'unocss';
|
||||
|
||||
// 本地调试https配置方法
|
||||
import VitePluginCertificate from 'vite-plugin-mkcert';
|
||||
//[issues/555]开发环境,vscode断点调试,文件或行数对不上
|
||||
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
|
||||
|
|
|
@ -6,10 +6,19 @@ const demoList = (keyword, count = 20) => {
|
|||
list: [] as any[],
|
||||
};
|
||||
for (let index = 0; index < count; index++) {
|
||||
result.list.push({
|
||||
name: `${keyword ?? ''}选项${index}`,
|
||||
id: `${index}`,
|
||||
});
|
||||
//根据搜索关键词做一下匹配
|
||||
let name = `选项${index}`;
|
||||
if(keyword && name.indexOf(keyword)!=-1){
|
||||
result.list.push({
|
||||
name: `选项${index}`,
|
||||
id: `${index}`,
|
||||
});
|
||||
}else if(!keyword){
|
||||
result.list.push({
|
||||
name: `选项${index}`,
|
||||
id: `${index}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
|
|
@ -23,6 +23,13 @@ export const getMenuList = () => {
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @description: 获取后台菜单权限和按钮权限
|
||||
*/
|
||||
export function getBackMenuAndPerms() {
|
||||
return defHttp.get({ url: Api.GetMenuList });
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换成vue3菜单
|
||||
*/
|
||||
|
|
|
@ -126,6 +126,9 @@ export function getCaptcha(params) {
|
|||
createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
|
||||
reject();
|
||||
}
|
||||
}).catch((res)=>{
|
||||
createErrorModal({ title: '错误提示', content: res.message || '未知问题' });
|
||||
reject();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -44,6 +44,9 @@ import JCodeEditor from './jeecg/components/JCodeEditor.vue';
|
|||
import JCategorySelect from './jeecg/components/JCategorySelect.vue';
|
||||
import JSelectMultiple from './jeecg/components/JSelectMultiple.vue';
|
||||
import JPopup from './jeecg/components/JPopup.vue';
|
||||
// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典
|
||||
import JPopupDict from './jeecg/components/JPopupDict.vue';
|
||||
// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典
|
||||
import JSwitch from './jeecg/components/JSwitch.vue';
|
||||
import JTreeDict from './jeecg/components/JTreeDict.vue';
|
||||
import JInputPop from './jeecg/components/JInputPop.vue';
|
||||
|
@ -116,6 +119,9 @@ componentMap.set('JCodeEditor', JCodeEditor);
|
|||
componentMap.set('JCategorySelect', JCategorySelect);
|
||||
componentMap.set('JSelectMultiple', JSelectMultiple);
|
||||
componentMap.set('JPopup', JPopup);
|
||||
// update-begin--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典
|
||||
componentMap.set('JPopupDict', JPopupDict);
|
||||
// update-end--author:liaozhiyang---date:20240130---for:【QQYUN-7961】popupDict字典
|
||||
componentMap.set('JSwitch', JSwitch);
|
||||
componentMap.set('JTreeDict', JTreeDict);
|
||||
componentMap.set('JInputPop', JInputPop);
|
||||
|
|
|
@ -44,7 +44,9 @@
|
|||
watch(
|
||||
() => props.params,
|
||||
() => {
|
||||
!unref(isFirstLoaded) && fetch();
|
||||
//update-begin---author:wangshuai---date:2024-02-28---for:【QQYUN-8346】 ApiTreeSelect组件入参变化时,不及时刷新数据 #1054---
|
||||
unref(isFirstLoaded) && fetch();
|
||||
//update-end---author:wangshuai---date:2024-02-28---for:【QQYUN-8346】 ApiTreeSelect组件入参变化时,不及时刷新数据 #1054---
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
|
|
@ -183,9 +183,12 @@
|
|||
rule.required = false;
|
||||
}
|
||||
if (component) {
|
||||
if (!Reflect.has(rule, 'type')) {
|
||||
//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;
|
||||
|
||||
|
|
|
@ -36,6 +36,12 @@ 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)) {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<a-checkbox-group v-bind="attrs" v-model:value="checkboxArray" :options="checkOptions" @change="handleChange"></a-checkbox-group>
|
||||
<a-checkbox-group v-bind="attrs" v-model:value="checkboxArray" :options="checkOptions" @change="handleChange">
|
||||
<template #label="{label, value}">
|
||||
<span :class="[useDicColor && getDicColor(value) ? 'colorText' : '']" :style="{ backgroundColor: `${getDicColor(value)}` }">{{ label }}</span>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -13,6 +17,7 @@
|
|||
props: {
|
||||
value:propTypes.oneOfType([propTypes.string, propTypes.number]),
|
||||
dictCode: propTypes.string,
|
||||
useDicColor: propTypes.bool.def(false),
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
|
@ -69,6 +74,7 @@
|
|||
prev.push({
|
||||
label: next['text'],
|
||||
value: value,
|
||||
color: next['color'],
|
||||
});
|
||||
}
|
||||
return prev;
|
||||
|
@ -84,8 +90,30 @@
|
|||
emit('update:value', $event.join(','));
|
||||
emit('change', $event.join(','));
|
||||
}
|
||||
|
||||
return { checkboxArray, checkOptions, attrs, handleChange };
|
||||
const getDicColor = (value) => {
|
||||
if (props.useDicColor) {
|
||||
const findItem = checkOptions.value.find((item) => item.value == value);
|
||||
if (findItem) {
|
||||
return findItem.color;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
return { checkboxArray, checkOptions, attrs, handleChange, getDicColor };
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
.colorText {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0 6px;
|
||||
border-radius: 8px;
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
</style>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<a-radio-group v-if="compType === CompTypeEnum.Radio" v-bind="attrs" v-model:value="state" @change="handleChangeRadio">
|
||||
<template v-for="item in dictOptions" :key="`${item.value}`">
|
||||
<a-radio :value="item.value">
|
||||
{{ item.label }}
|
||||
<span :class="[useDicColor && item.color ? 'colorText' : '']" :style="{ backgroundColor: `${useDicColor && item.color}` }">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-radio>
|
||||
</template>
|
||||
</a-radio-group>
|
||||
|
@ -41,7 +43,11 @@
|
|||
<a-select-option v-if="showChooseOption" :value="null">请选择…</a-select-option>
|
||||
<template v-for="item in dictOptions" :key="`${item.value}`">
|
||||
<a-select-option :value="item.value">
|
||||
<span style="display: inline-block; width: 100%" :title="item.label">
|
||||
<span
|
||||
:class="[useDicColor && item.color ? 'colorText' : '']"
|
||||
:style="{ backgroundColor: `${useDicColor && item.color}` }"
|
||||
:title="item.label"
|
||||
>
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
|
@ -69,6 +75,7 @@
|
|||
type: propTypes.string,
|
||||
placeholder: propTypes.string,
|
||||
stringToNumber: propTypes.bool,
|
||||
useDicColor: propTypes.bool.def(false),
|
||||
getPopupContainer: {
|
||||
type: Function,
|
||||
default: (node) => node?.parentNode,
|
||||
|
@ -139,7 +146,8 @@
|
|||
prev.push({
|
||||
label: next['text'] || next['label'],
|
||||
value: stringToNumber ? +value : value,
|
||||
...omit(next, ['text', 'value']),
|
||||
color: next['color'],
|
||||
...omit(next, ['text', 'value', 'color']),
|
||||
});
|
||||
}
|
||||
return prev;
|
||||
|
@ -213,3 +221,17 @@
|
|||
},
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
.colorText {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0 6px;
|
||||
border-radius: 8px;
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
// update-begin--author:liaozhiyang---date:20230110---for:【QQYUN-7799】字典组件(原生组件除外)加上颜色配置
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,217 @@
|
|||
<!--popup组件-->
|
||||
<template>
|
||||
<div class="components-input-demo-presuffix">
|
||||
<!--输入框-->
|
||||
<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>
|
||||
<!--popup弹窗-->
|
||||
<JPopupOnlReportModal
|
||||
@register="regModal"
|
||||
:code="code"
|
||||
:multi="multi"
|
||||
:sorter="sorter"
|
||||
:groupId="''"
|
||||
:param="param"
|
||||
@ok="callBack"
|
||||
:getContainer="getContainer"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import JPopupOnlReportModal from './modal/JPopupOnlReportModal.vue';
|
||||
import { defineComponent, ref, nextTick, watch, reactive, unref } from 'vue';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
//定义请求url信息
|
||||
const configUrl = reactive({
|
||||
getColumns: '/online/cgreport/api/getRpColumns/',
|
||||
getData: '/online/cgreport/api/getData/',
|
||||
});
|
||||
|
||||
export default defineComponent({
|
||||
name: 'JPopupDict',
|
||||
components: {
|
||||
JPopupOnlReportModal,
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
/**
|
||||
* 示例:demo,name,id
|
||||
* demo: online报表编码
|
||||
* name: online报表的字段,用户显示的label
|
||||
* id: online报表的字段,用于存储key
|
||||
*/
|
||||
dictCode: propTypes.string.def(''),
|
||||
value: propTypes.string.def(''),
|
||||
sorter: propTypes.string.def(''),
|
||||
multi: propTypes.bool.def(false),
|
||||
param: propTypes.object.def({}),
|
||||
spliter: propTypes.string.def(','),
|
||||
getContainer: propTypes.func,
|
||||
},
|
||||
emits: ['update:value', 'register', 'change'],
|
||||
setup(props, { emit }) {
|
||||
const { createMessage } = useMessage();
|
||||
const attrs = useAttrs();
|
||||
const showText = ref<any>(props.multi ? [] : '');
|
||||
const options = ref<any>([]);
|
||||
const cgRpConfigId = ref('');
|
||||
const loading = ref(false);
|
||||
const code = props.dictCode.split(',')[0];
|
||||
const labelFiled = props.dictCode.split(',')[1];
|
||||
const valueFiled = props.dictCode.split(',')[2];
|
||||
if (!code || !valueFiled || !labelFiled) {
|
||||
createMessage.error('popupDict参数未正确配置!');
|
||||
}
|
||||
//注册model
|
||||
const [regModal, { openModal }] = useModal();
|
||||
|
||||
/**
|
||||
* 打开pop弹出框
|
||||
*/
|
||||
function handleOpen() {
|
||||
!props.disabled && openModal(true);
|
||||
}
|
||||
/**
|
||||
* 监听value数值
|
||||
*/
|
||||
watch(
|
||||
() => props.value,
|
||||
(val) => {
|
||||
const callBack = () => {
|
||||
if (props.multi) {
|
||||
showText.value = val && val.length > 0 ? val.split(props.spliter) : [];
|
||||
} else {
|
||||
showText.value = val ?? '';
|
||||
}
|
||||
};
|
||||
if (props.value || props.defaultValue) {
|
||||
if (cgRpConfigId.value) {
|
||||
loadData({ callBack });
|
||||
} else {
|
||||
loadColumnsInfo({ callBack });
|
||||
}
|
||||
} else {
|
||||
callBack();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
watch(
|
||||
() => showText.value,
|
||||
(val) => {
|
||||
let result;
|
||||
if (props.multi) {
|
||||
result = val.join(',');
|
||||
} else {
|
||||
result = val;
|
||||
}
|
||||
nextTick(() => {
|
||||
emit('change', result);
|
||||
emit('update:value', result);
|
||||
});
|
||||
}
|
||||
);
|
||||
/**
|
||||
* 加载列信息
|
||||
*/
|
||||
function loadColumnsInfo({ callBack }) {
|
||||
loading.value = true;
|
||||
let url = `${configUrl.getColumns}${code}`;
|
||||
defHttp
|
||||
.get({ url }, { isTransformResponse: false, successMessageMode: 'none' })
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
cgRpConfigId.value = res.result.cgRpConfigId;
|
||||
loadData({ callBack });
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
loading.value = false;
|
||||
callBack?.();
|
||||
});
|
||||
}
|
||||
function loadData({ callBack }) {
|
||||
loading.value = true;
|
||||
let url = `${configUrl.getData}${unref(cgRpConfigId)}`;
|
||||
defHttp
|
||||
.get(
|
||||
{ url, params: { ['force_' + valueFiled]: props.value || props.defaultValue } },
|
||||
{ isTransformResponse: false, successMessageMode: 'none' }
|
||||
)
|
||||
.then((res) => {
|
||||
let data = res.result;
|
||||
if (data.records?.length) {
|
||||
options.value = data.records.map((item) => {
|
||||
return { value: item[valueFiled], text: item[labelFiled] };
|
||||
});
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
callBack?.();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 传值回调
|
||||
*/
|
||||
function callBack(rows) {
|
||||
const dataOptions: any = [];
|
||||
const dataValue: any = [];
|
||||
let result;
|
||||
rows.forEach((item) => {
|
||||
dataOptions.push({ value: item[valueFiled], text: item[labelFiled] });
|
||||
dataValue.push(item[valueFiled]);
|
||||
});
|
||||
options.value = dataOptions;
|
||||
if (props.multi) {
|
||||
showText.value = dataValue;
|
||||
result = dataValue.join(props.spliter);
|
||||
} else {
|
||||
showText.value = dataValue[0];
|
||||
result = dataValue[0];
|
||||
}
|
||||
nextTick(() => {
|
||||
emit('change', result);
|
||||
emit('update:value', result);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
showText,
|
||||
attrs,
|
||||
regModal,
|
||||
handleOpen,
|
||||
callBack,
|
||||
code,
|
||||
options,
|
||||
loading,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.components-input-demo-presuffix {
|
||||
:deep(.ant-select-dropdown) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.components-input-demo-presuffix .anticon-close-circle {
|
||||
cursor: pointer;
|
||||
color: #ccc;
|
||||
transition: color 0.3s;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.components-input-demo-presuffix .anticon-close-circle:hover {
|
||||
color: #f5222d;
|
||||
}
|
||||
|
||||
.components-input-demo-presuffix .anticon-close-circle:active {
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
|
@ -11,7 +11,7 @@
|
|||
:getPopupContainer="getParentContainer"
|
||||
>
|
||||
<a-select-option v-for="(item, index) in dictOptions" :key="index" :getPopupContainer="getParentContainer" :value="item.value">
|
||||
{{ item.text || item.label }}
|
||||
<span :class="[useDicColor && item.color ? 'colorText' : '']" :style="{ backgroundColor: `${useDicColor && item.color}` }">{{ item.text || item.label }}</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
@ -68,6 +68,10 @@
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
useDicColor: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['options-change', 'change', 'input', 'update:value'],
|
||||
setup(props, { emit, refs }) {
|
||||
|
@ -135,7 +139,7 @@
|
|||
//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 }));
|
||||
dictOptions.value = res.map((item) => ({ value: item.value, label: item.text, color:item.color }));
|
||||
//console.info('res', dictOptions.value);
|
||||
} else {
|
||||
console.error('getDictItems error: : ', res);
|
||||
|
@ -162,3 +166,15 @@
|
|||
},
|
||||
});
|
||||
</script>
|
||||
<style scoped lang='less'>
|
||||
.colorText{
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
padding: 0 6px;
|
||||
border-radius: 8px;
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
|
@ -137,8 +137,8 @@
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
function records2DataList() {
|
||||
//update-begin---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页---
|
||||
/* function records2DataList() {
|
||||
let arr:any[] = [];
|
||||
let excludeList = props.excludeUserIdList;
|
||||
let records = props.dataList;
|
||||
|
@ -150,13 +150,14 @@
|
|||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
}*/
|
||||
|
||||
const showDataList = computed(()=>{
|
||||
let excludeList = props.excludeUserIdList;
|
||||
/* let excludeList = props.excludeUserIdList;
|
||||
if(excludeList && excludeList.length>0){
|
||||
return records2DataList();
|
||||
}
|
||||
}*/
|
||||
//update-end---author:wangshuai---date:2024-02-02---for:【QQYUN-8239】用户角色,添加用户 返回2页数据,实际只显示一页---
|
||||
return props.dataList;
|
||||
});
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
const url = '/sys/user/selectUserList';
|
||||
let params = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 99,
|
||||
};
|
||||
if (props.searchText) {
|
||||
params['keyword'] = props.searchText;
|
||||
|
@ -149,6 +149,11 @@
|
|||
if (selectedDepartId.value) {
|
||||
params['departId'] = selectedDepartId.value;
|
||||
}
|
||||
//update-begin---author:wangshuai---date:2024-02-02---for:【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;
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
const url = '/sys/user/selectUserList';
|
||||
let params = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 99,
|
||||
};
|
||||
if (props.searchText) {
|
||||
params['keyword'] = props.searchText;
|
||||
|
@ -98,6 +98,11 @@
|
|||
if (selectedRoleId.value) {
|
||||
params['roleId'] = selectedRoleId.value;
|
||||
}
|
||||
//update-begin---author:wangshuai---date:2024-02-02---for:【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;
|
||||
|
|
|
@ -222,13 +222,16 @@
|
|||
if (selectedDepart.value) {
|
||||
params['departId'] = selectedDepart.value;
|
||||
}
|
||||
|
||||
//update-begin---author:wangshuai---date:2024-02-02---for:【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) {
|
||||
let { records, total } = data.result;
|
||||
//如果排除的用户id的长度不为0,那么需要改变页数
|
||||
if(unref(excludeUserIdList) && unref(excludeUserIdList).length>0){
|
||||
total = total - unref(excludeUserIdList).length;
|
||||
}
|
||||
totalRecord.value = total;
|
||||
initCurrentUserData(records);
|
||||
userDataList.value = records;
|
||||
|
|
|
@ -199,7 +199,7 @@ export function useTreeBiz(treeRef, getList, props, realProps) {
|
|||
const options = <any[]>[];
|
||||
optionData.forEach((item) => {
|
||||
//update-begin-author:taoyan date:2022-7-4 for: issues/I5F3P4 online配置部门选择后编辑,查看数据应该显示部门名称,不是部门代码
|
||||
options.push({ label: item[props.titleKey], value: item[props.rowKey] });
|
||||
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;
|
||||
|
|
|
@ -128,6 +128,7 @@ export type ComponentType =
|
|||
| 'JCategorySelect'
|
||||
| 'JSelectMultiple'
|
||||
| 'JPopup'
|
||||
| 'JPopupDict'
|
||||
| 'JSwitch'
|
||||
| 'JEasyCron'
|
||||
| 'JTreeDict'
|
||||
|
|
|
@ -127,6 +127,14 @@
|
|||
// update-begin--author:sunjianlei---date:20220408---for: 【VUEN-656】配置外部网址打不开,原因是带了#号,需要替换一下
|
||||
return;
|
||||
}
|
||||
// update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-6366】内部路由也可以支持采用新浏览器tab打开
|
||||
const findItem = getMatchingMenu(props.items, key);
|
||||
if (findItem?.internalOrExternal == true) {
|
||||
window.open(location.origin + key);
|
||||
return;
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20240227---for:【QQYUN-6366】内部路由也可以支持采用新浏览器tab打开
|
||||
|
||||
const { beforeClickFn } = props;
|
||||
if (beforeClickFn && isFunction(beforeClickFn)) {
|
||||
const flag = await beforeClickFn(key);
|
||||
|
@ -140,6 +148,26 @@
|
|||
menuState.activeName = key;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2024-02-27
|
||||
* liaozhiyang
|
||||
* 获取菜单中匹配的path所在的项
|
||||
*/
|
||||
const getMatchingMenu = (menus, path) => {
|
||||
for (let i = 0, len = menus.length; i < len; i++) {
|
||||
const item = menus[i];
|
||||
if (item.path === path && !item.redirect && !item.paramPath) {
|
||||
return item;
|
||||
} else if (item.children?.length) {
|
||||
const result = getMatchingMenu(item.children, path);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
return {
|
||||
prefixCls,
|
||||
getBindValues,
|
||||
|
|
|
@ -251,6 +251,11 @@
|
|||
&-popconfirm {
|
||||
.ant-popconfirm-buttons {
|
||||
min-width: 120px;
|
||||
// update-begin--author:liaozhiyang---date:20240124---for:【issues/1019】popConfirm确认框待端后端返回过程中(处理中)样式错乱
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// update-end--author:liaozhiyang---date:20240124---for:【issues/1019】popConfirm确认框待端后端返回过程中(处理中)样式错乱
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,9 @@
|
|||
if (!isFunction(summaryFunc)) {
|
||||
return [];
|
||||
}
|
||||
let dataSource = toRaw(unref(table.getDataSource()));
|
||||
// update-begin--author:liaozhiyang---date:20230227---for:【QQYUN-8172】可编辑单元格编辑完以后不更新合计值
|
||||
let dataSource = cloneDeep(unref(table.getDataSource()));
|
||||
// update-end--author:liaozhiyang---date:20230227---for:【QQYUN-8172】可编辑单元格编辑完以后不更新合计值
|
||||
dataSource = summaryFunc(dataSource);
|
||||
dataSource.forEach((item, i) => {
|
||||
item[props.rowKey] = `${i}`;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Tooltip placement="top" v-bind="getBindProps">
|
||||
<Tooltip placement="top" v-bind="getBindProps" >
|
||||
<template #title>
|
||||
<span>{{ t('component.table.settingColumn') }}</span>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { computed, nextTick, unref, watchEffect } from 'vue';
|
||||
import { router } from '/@/router';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { createLocalStorage } from '/@/utils/cache';
|
||||
import { useTableContext } from './useTableContext';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
@ -12,10 +13,13 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
|
|||
const table = useTableContext();
|
||||
const $ls = createLocalStorage();
|
||||
const { createMessage: $message } = useMessage();
|
||||
const route = useRoute();
|
||||
// 列表配置缓存key
|
||||
const cacheKey = computed(() => {
|
||||
let { fullPath } = router.currentRoute.value;
|
||||
let key = fullPath.replace(/[\/\\]/g, '_');
|
||||
// update-begin--author:liaozhiyang---date:20240226---for:【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题)
|
||||
const path = route.path;
|
||||
let key = path.replace(/[\/\\]/g, '_');
|
||||
// update-end--author:liaozhiyang---date:20240226---for:【QQYUN-8367】online报表配置列展示保存,影响到其他页面的table字段的显示隐藏(开发环境热更新会有此问题,生产环境无问题)
|
||||
let cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
|
||||
if (cacheKey) {
|
||||
key += ':' + cacheKey;
|
||||
|
|
|
@ -248,7 +248,14 @@ export function useDataSource(
|
|||
if (beforeFetch && isFunction(beforeFetch)) {
|
||||
params = (await beforeFetch(params)) || params;
|
||||
}
|
||||
|
||||
// update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-8316】table查询条件,请求剔除空字符串字段
|
||||
for (let item of Object.entries(params)) {
|
||||
const [key, val] = item;
|
||||
if (val === '') {
|
||||
delete params[key];
|
||||
};
|
||||
};
|
||||
// update-end--author:liaozhiyang---date:20240227---for:【QQYUN-8316】table查询条件,请求剔除空字符串字段
|
||||
const res = await api(params);
|
||||
rawDataSourceRef.value = res;
|
||||
|
||||
|
|
|
@ -30,6 +30,17 @@
|
|||
target.selectionStart = selectionStart - 1;
|
||||
target.selectionEnd = selectionStart - 1;
|
||||
}
|
||||
} else {
|
||||
// update-begin--author:liaozhiyang---date:20240227---for:【QQYUN-8347】小数点后大于两位且最后一位是0,输入框不可输入了
|
||||
// 例如:41.1 -> 41.10, 100.1 -> 100.10 不执行handleChangeCommon 函数。
|
||||
if (value.indexOf('.') != -1) {
|
||||
const result = value.split('.').pop();
|
||||
if (result && result.length >= 2 && result.substr(-1) === '0') {
|
||||
change = false;
|
||||
innerValue.value = value;
|
||||
}
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20240227---for:【QQYUN-8347】小数点后大于两位且最后一位是0,输入框不可输入了
|
||||
}
|
||||
}
|
||||
// 触发事件,存储输入的值
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<upload-chunk ref="uploadRef" :visible="uploadVisible" @select="selectFirstFile"></upload-chunk>
|
||||
</div>
|
||||
<UserSelectModal labelKey="realname" rowKey="username" @register="registerModal" @getSelectResult="setValue" isRadioSelection></UserSelectModal>
|
||||
<UserSelectModal rowKey="username" @register="registerModal" @selected="setValue" :multi="false"></UserSelectModal>
|
||||
<a-modal v-model:open="visibleEmoji" :footer="null" wrapClassName="emoji-modal" :closable="false" :width="490">
|
||||
<template #title>
|
||||
<span></span>
|
||||
|
@ -49,7 +49,7 @@
|
|||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { UserAddOutlined, PaperClipOutlined, SmileOutlined } from '@ant-design/icons-vue';
|
||||
import { Tooltip } from 'ant-design-vue';
|
||||
import UserSelectModal from '/@/components/Form/src/jeecg/components/modal/UserSelectModal.vue';
|
||||
import UserSelectModal from '/@/components/Form/src/jeecg/components/userSelect/UserSelectModal.vue';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import UploadChunk from './UploadChunk.vue';
|
||||
import 'emoji-mart-vue-fast/css/emoji-mart.css';
|
||||
|
@ -91,7 +91,7 @@
|
|||
const uploadVisible = ref(false);
|
||||
const uploadRef = ref();
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const [registerModal, { openModal, closeModal }] = useModal();
|
||||
const buttonLoading = ref(false);
|
||||
const myComment = ref<string>('');
|
||||
function sendComment() {
|
||||
|
@ -149,21 +149,27 @@
|
|||
function setValue(options) {
|
||||
console.log('setValue', options);
|
||||
if (options && options.length > 0) {
|
||||
const { label, value } = options[0];
|
||||
if (label && value) {
|
||||
let str = `${label}[${value}]`;
|
||||
const { realname, username } = options[0];
|
||||
if (realname && username) {
|
||||
let str = `${realname}[${username}]`;
|
||||
let temp = myComment.value;
|
||||
if (!temp) {
|
||||
myComment.value = '@' + str;
|
||||
} else {
|
||||
if (temp.endsWith('@')) {
|
||||
myComment.value = temp + str;
|
||||
myComment.value = temp + str +' ';
|
||||
} else {
|
||||
myComment.value = '@' + str + ' ' + temp;
|
||||
myComment.value = '@' + str + ' ' + temp + ' ';
|
||||
}
|
||||
}
|
||||
//update-begin---author:wangshuai---date:2024-01-22---for:【QQYUN-8002】选完人,鼠标应该放到后面并在前面加上空格---
|
||||
showHtml.value = false;
|
||||
commentRef.value.focus();
|
||||
commentActive.value = true;
|
||||
//update-end---author:wangshuai---date:2024-01-22---for:【QQYUN-8002】选完人,鼠标应该放到后面并在前面加上空格---
|
||||
}
|
||||
}
|
||||
closeModal();
|
||||
}
|
||||
|
||||
function handleCommentChange() {
|
||||
|
|
|
@ -57,6 +57,7 @@ import {
|
|||
Skeleton,
|
||||
Cascader,
|
||||
Rate,
|
||||
Progress
|
||||
} from 'ant-design-vue';
|
||||
const compList = [AntButton.Group, Icon, AIcon, JUploadButton];
|
||||
|
||||
|
@ -116,5 +117,7 @@ export function registerGlobComp(app: App) {
|
|||
.use(Popconfirm)
|
||||
.use(Skeleton)
|
||||
.use(Cascader)
|
||||
.use(Rate);
|
||||
.use(Rate)
|
||||
.use(Progress);
|
||||
console.log("---初始化---, 全局注册Antd、仪表盘、流程设计器、online、流程等组件--------------")
|
||||
}
|
||||
|
|
|
@ -21,13 +21,17 @@
|
|||
}
|
||||
|
||||
&-primary {
|
||||
color: @white;
|
||||
background-color: @button-primary-color;
|
||||
// update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确
|
||||
// color: @white;
|
||||
// background-color: @button-primary-color;
|
||||
// update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @white;
|
||||
background-color: @button-primary-hover-color;
|
||||
// update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确
|
||||
// color: @white;
|
||||
// background-color: @button-primary-hover-color;
|
||||
// update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确
|
||||
}
|
||||
//
|
||||
//&[disabled],
|
||||
|
@ -47,16 +51,18 @@
|
|||
//}
|
||||
|
||||
&-default {
|
||||
color: @button-cancel-color;
|
||||
background-color: @button-cancel-bg-color;
|
||||
border-color: @button-cancel-border-color;
|
||||
// update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确
|
||||
// color: @button-cancel-color;
|
||||
// background-color: @button-cancel-bg-color;
|
||||
// border-color: @button-cancel-border-color;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @button-cancel-hover-color;
|
||||
background-color: @button-cancel-hover-bg-color;
|
||||
border-color: @button-cancel-hover-border-color;
|
||||
}
|
||||
// &:hover,
|
||||
// &:focus {
|
||||
// color: @button-cancel-hover-color;
|
||||
// background-color: @button-cancel-hover-bg-color;
|
||||
// border-color: @button-cancel-hover-border-color;
|
||||
// }
|
||||
// update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8327】btn样式显示不正确
|
||||
//
|
||||
//&[disabled],
|
||||
//&[disabled]:hover {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
@import './pagination.less';
|
||||
@import './input.less';
|
||||
//@import './btn.less';
|
||||
// update-begin--author:liaozhiyang---date:20240130---for:【issues/5857】Button color类型颜色失效
|
||||
@import './btn.less';
|
||||
// update-end--author:liaozhiyang---date:20240130---for:【issues/5857】Button color类型颜色失效
|
||||
// @import './table.less';
|
||||
|
||||
// TODO beta.11 fix
|
||||
|
@ -159,4 +161,4 @@ html[data-theme='dark'] .ant-input-affix-wrapper-textarea-with-clear-btn {
|
|||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
// update-end--author:liaozhiyang---date:20230108---for:【QQYUN-7855】table页码同步3.x页面效果
|
||||
// update-end--author:liaozhiyang---date:20230108---for:【QQYUN-7855】table页码同步3.x页面效果
|
||||
|
|
|
@ -38,6 +38,12 @@ export const JEECG_CHAT_UID = 'JEECG_CHAT_UID';
|
|||
// 免登录租户id,与系统分开,避免重复
|
||||
export const OAUTH2_THIRD_LOGIN_TENANT_ID = 'THIRD_LOGIN_TENANT_ID';
|
||||
|
||||
// ai助手标识(退出需要记录一下)
|
||||
export const AIDE_FLAG = 'AIDE_FLAG';
|
||||
|
||||
// ai助手标识(退出需要记录一下)
|
||||
export const JEECG_CHAT_KEY = 'JEECG-CHAT-KEY';
|
||||
|
||||
export enum CacheTypeEnum {
|
||||
SESSION,
|
||||
LOCAL,
|
||||
|
|
|
@ -21,7 +21,9 @@ export function useMethods() {
|
|||
* @param url
|
||||
*/
|
||||
async function exportXls(name, url, params, isXlsx = false) {
|
||||
const data = await defHttp.get({ url: url, params: params, responseType: 'blob' }, { isTransformResponse: false });
|
||||
//update-begin---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点---
|
||||
const data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 60000 }, { isTransformResponse: false });
|
||||
//update-end---author:wangshuai---date:2024-01-25---for:【QQYUN-8118】导出超时时间设置长点---
|
||||
if (!data) {
|
||||
createMessage.warning('文件下载失败');
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { watch, unref } from 'vue';
|
||||
import type {Menu} from "@/router/types";
|
||||
import { ref, watch, unref } from 'vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useTitle as usePageTitle } from '@vueuse/core';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
|
@ -18,9 +19,11 @@ export function useTitle() {
|
|||
|
||||
const pageTitle = usePageTitle();
|
||||
|
||||
const menus = ref<Menu[] | null>(null)
|
||||
|
||||
watch(
|
||||
[() => currentRoute.value.path, () => localeStore.getLocale],
|
||||
() => {
|
||||
async () => {
|
||||
const route = unref(currentRoute);
|
||||
|
||||
if (route.name === REDIRECT_NAME) {
|
||||
|
@ -28,16 +31,17 @@ export function useTitle() {
|
|||
}
|
||||
// update-begin--author:liaozhiyang---date:20231110---for:【QQYUN-6938】online菜单名字和页面title不一致
|
||||
if (route.params && Object.keys(route.params).length) {
|
||||
getMenus().then((menus) => {
|
||||
const getTitle = getMatchingRouterName(menus, route.fullPath);
|
||||
let tTitle = '';
|
||||
if (getTitle) {
|
||||
tTitle = t(getTitle);
|
||||
} else {
|
||||
tTitle = t(route?.meta?.title as string);
|
||||
};
|
||||
pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`;
|
||||
});
|
||||
if (!menus.value) {
|
||||
menus.value = await getMenus();
|
||||
}
|
||||
const getTitle = getMatchingRouterName(menus.value, route.fullPath);
|
||||
let tTitle = '';
|
||||
if (getTitle) {
|
||||
tTitle = t(getTitle);
|
||||
} else {
|
||||
tTitle = t(route?.meta?.title as string);
|
||||
}
|
||||
pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`;
|
||||
} else {
|
||||
const tTitle = t(route?.meta?.title as string);
|
||||
pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" title="修改密码" @ok="handleSubmit" width="600px">
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit" width="600px">
|
||||
<BasicForm @register="registerForm" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
@ -11,43 +11,52 @@
|
|||
import BasicForm from '/@/components/Form/src/BasicForm.vue';
|
||||
import { useForm } from '/@/components/Form/src/hooks/useForm';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useLocaleStore } from '/@/store/modules/locale';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
const localeStore = useLocaleStore();
|
||||
const { t } = useI18n();
|
||||
// 声明Emits
|
||||
const emit = defineEmits(['register']);
|
||||
const $message = useMessage();
|
||||
const formRef = ref();
|
||||
const username = ref('');
|
||||
// update-begin--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
const title = ref(t('layout.changePassword.changePassword'));
|
||||
//表单配置
|
||||
const [registerForm, { resetFields, validate, clearValidate }] = useForm({
|
||||
schemas: [
|
||||
{
|
||||
label: '旧密码',
|
||||
label: t('layout.changePassword.oldPassword'),
|
||||
field: 'oldpassword',
|
||||
component: 'InputPassword',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
label: '新密码',
|
||||
label: t('layout.changePassword.newPassword'),
|
||||
field: 'password',
|
||||
component: 'StrengthMeter',
|
||||
componentProps: {
|
||||
placeholder: '请输入新密码',
|
||||
placeholder: t('layout.changePassword.pleaseEnterNewPassword'),
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入新密码',
|
||||
message: t('layout.changePassword.pleaseEnterNewPassword'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '确认新密码',
|
||||
label: t('layout.changePassword.confirmNewPassword'),
|
||||
field: 'confirmpassword',
|
||||
component: 'InputPassword',
|
||||
dynamicRules: ({ values }) => rules.confirmPassword(values, true),
|
||||
},
|
||||
],
|
||||
showActionButtonGroup: false,
|
||||
wrapperCol: null,
|
||||
labelWidth: localeStore.getLocale == 'zh_CN' ? 100 : 160,
|
||||
});
|
||||
// update-end--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
//表单赋值
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner();
|
||||
|
||||
|
@ -85,6 +94,7 @@
|
|||
}
|
||||
|
||||
defineExpose({
|
||||
title,
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -126,9 +126,13 @@
|
|||
const res = await queryAllDictItems();
|
||||
removeAuthCache(DB_DICT_DATA_KEY);
|
||||
setAuthCache(DB_DICT_DATA_KEY, res.result);
|
||||
createMessage.success('刷新缓存完成!');
|
||||
// update-begin--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
createMessage.success(t('layout.header.refreshCacheComplete'));
|
||||
// update-end--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
} else {
|
||||
createMessage.error('刷新缓存失败!');
|
||||
// update-begin--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
createMessage.error(t('layout.header.refreshCacheFailure'));
|
||||
// update-end--author:liaozhiyang---date:20240124---for:【QQYUN-7970】国际化
|
||||
}
|
||||
}
|
||||
// 切换部门
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/>
|
||||
<LayoutBreadcrumb v-if="getShowContent && getShowBread" :theme="getHeaderTheme" />
|
||||
<!-- 欢迎语 -->
|
||||
<span v-if="getShowContent && getShowBreadTitle && !getIsMobile" :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`,'headerIntroductionClass']"> 欢迎进入 {{ title }} </span>
|
||||
<span v-if="getShowContent && getShowBreadTitle && !getIsMobile" :class="[prefixCls, `${prefixCls}--${getHeaderTheme}`,'headerIntroductionClass']"> {{t('layout.header.welcomeIn')}} {{ title }} </span>
|
||||
</div>
|
||||
<!-- left end -->
|
||||
|
||||
|
@ -38,6 +38,8 @@
|
|||
<UserDropDown :theme="getHeaderTheme" />
|
||||
|
||||
<SettingDrawer v-if="getShowSetting" :class="`${prefixCls}-action__item`" />
|
||||
<!-- ai助手 -->
|
||||
<Aide></Aide>
|
||||
</div>
|
||||
</Header>
|
||||
<LoginSelect ref="loginSelectRef" @success="loginSelectOk"></LoginSelect>
|
||||
|
@ -71,6 +73,9 @@
|
|||
|
||||
import LoginSelect from '/@/views/sys/login/LoginSelect.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import Aide from "@/views/dashboard/ai/components/aide/index.vue"
|
||||
const { t } = useI18n();
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LayoutHeader',
|
||||
|
@ -91,6 +96,7 @@
|
|||
SettingDrawer: createAsyncComponent(() => import('/@/layouts/default/setting/index.vue'), {
|
||||
loading: true,
|
||||
}),
|
||||
Aide
|
||||
},
|
||||
props: {
|
||||
fixed: propTypes.bool,
|
||||
|
@ -208,7 +214,8 @@
|
|||
getUseLockPage,
|
||||
loginSelectOk,
|
||||
loginSelectRef,
|
||||
title
|
||||
title,
|
||||
t
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
@ -17,11 +17,14 @@ export default {
|
|||
tooltipExitFull: 'Exit Full Screen',
|
||||
|
||||
// lock
|
||||
lockScreenPassword: 'Lock screen password',
|
||||
lockScreenPassword: 'Password',
|
||||
lockScreen: 'Lock screen',
|
||||
lockScreenBtn: 'Locking',
|
||||
|
||||
home: 'Home',
|
||||
welcomeIn: 'Welcome in',
|
||||
refreshCacheComplete: 'Refresh cache complete',
|
||||
refreshCacheFailure: 'Refresh cache failure',
|
||||
},
|
||||
multipleTab: {
|
||||
reload: 'Refresh current',
|
||||
|
@ -119,4 +122,11 @@ export default {
|
|||
|
||||
mixSidebarFixed: 'Fixed expanded menu',
|
||||
},
|
||||
changePassword: {
|
||||
changePassword: 'Change password',
|
||||
oldPassword: 'Old password',
|
||||
newPassword: 'New password',
|
||||
confirmNewPassword: 'Confirm new password',
|
||||
pleaseEnterNewPassword: 'Please enter new password',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -23,6 +23,9 @@ export default {
|
|||
lockScreenBtn: '锁定',
|
||||
|
||||
home: '首页',
|
||||
welcomeIn:"欢迎进入",
|
||||
refreshCacheComplete: "刷新缓存完成!",
|
||||
refreshCacheFailure: "刷新缓存失败!",
|
||||
},
|
||||
multipleTab: {
|
||||
reload: '重新加载',
|
||||
|
@ -120,4 +123,11 @@ export default {
|
|||
|
||||
mixSidebarFixed: '固定展开菜单',
|
||||
},
|
||||
changePassword: {
|
||||
changePassword: '修改密码',
|
||||
oldPassword: '旧密码',
|
||||
newPassword: '新密码',
|
||||
confirmNewPassword: '确认新密码',
|
||||
pleaseEnterNewPassword: '请输入新密码',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -162,29 +162,31 @@ export function createPermissionGuard(router: Router) {
|
|||
return;
|
||||
}
|
||||
|
||||
// get userinfo while last fetch time is empty
|
||||
if (userStore.getLastUpdateTime === 0) {
|
||||
try {
|
||||
await userStore.getUserInfoAction();
|
||||
} catch (err) {
|
||||
console.info(err);
|
||||
next();
|
||||
}
|
||||
}
|
||||
//update-begin---author:scott ---date:2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获取用户信息---
|
||||
// // get userinfo while last fetch time is empty
|
||||
// if (userStore.getLastUpdateTime === 0) {
|
||||
// try {
|
||||
// console.log("--LastUpdateTime---getUserInfoAction-----")
|
||||
// await userStore.getUserInfoAction();
|
||||
// } catch (err) {
|
||||
// console.info(err);
|
||||
// next();
|
||||
// }
|
||||
// }
|
||||
//update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】刷新首页,不需要重新获获取用户信息---
|
||||
|
||||
if (permissionStore.getIsDynamicAddedRoute) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
// 构建后台菜单路由
|
||||
const routes = await permissionStore.buildRoutesAction();
|
||||
|
||||
routes.forEach((route) => {
|
||||
router.addRoute(route as unknown as RouteRecordRaw);
|
||||
});
|
||||
|
||||
router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
|
||||
|
||||
permissionStore.setDynamicAddedRoute(true);
|
||||
|
||||
if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
import {store} from '/@/store';
|
||||
import {defineStore} from 'pinia';
|
||||
import {defHttp} from "@/utils/http/axios";
|
||||
|
||||
interface DefIndexState {
|
||||
// 首页url
|
||||
url: string,
|
||||
// 首页组件
|
||||
component: string
|
||||
}
|
||||
|
||||
export const useDefIndexStore = defineStore({
|
||||
id: 'defIndex',
|
||||
state: (): DefIndexState => ({
|
||||
url: '',
|
||||
component: '',
|
||||
}),
|
||||
getters: {},
|
||||
actions: {
|
||||
/**
|
||||
* 查询默认主页配置
|
||||
*/
|
||||
async query() {
|
||||
const config = await defIndexApi.query();
|
||||
this.url = config.url;
|
||||
this.component = config.component;
|
||||
},
|
||||
/**
|
||||
* 更新默认主页配置
|
||||
* @param url 首页url
|
||||
* @param component 首页组件
|
||||
* @param isRoute 是否是路由
|
||||
*/
|
||||
async update(url: string, component: string, isRoute: boolean) {
|
||||
await defIndexApi.update(url, component, isRoute);
|
||||
await this.query()
|
||||
},
|
||||
|
||||
check(url: string) {
|
||||
return url === this.url;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Need to be used outside the setup
|
||||
export function useDefIndexStoreWithOut() {
|
||||
return useDefIndexStore(store);
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认首页配置API
|
||||
*/
|
||||
export const defIndexApi = {
|
||||
/**
|
||||
* 查询默认首页配置
|
||||
*/
|
||||
async query() {
|
||||
const url = '/sys/sysRoleIndex/queryDefIndex'
|
||||
return await defHttp.get({url});
|
||||
},
|
||||
/**
|
||||
* 更新默认首页配置
|
||||
* @param url 首页url
|
||||
* @param component 首页组件
|
||||
* @param isRoute 是否是路由
|
||||
*/
|
||||
async update(url: string, component: string, isRoute: boolean) {
|
||||
let apiUrl = '/sys/sysRoleIndex/updateDefIndex'
|
||||
apiUrl += '?url=' + url
|
||||
apiUrl += '&component=' + component
|
||||
apiUrl += '&isRoute=' + isRoute
|
||||
return await defHttp.put({url: apiUrl});
|
||||
},
|
||||
|
||||
}
|
|
@ -18,8 +18,7 @@ import { ERROR_LOG_ROUTE, PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic';
|
|||
|
||||
import { filter } from '/@/utils/helper/treeHelper';
|
||||
|
||||
import { getMenuList,switchVue3Menu } from '/@/api/sys/menu';
|
||||
import { getPermCode } from '/@/api/sys/user';
|
||||
import { getBackMenuAndPerms, switchVue3Menu } from '/@/api/sys/menu';
|
||||
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { PageEnum } from '/@/enums/pageEnum';
|
||||
|
@ -124,10 +123,14 @@ export const usePermissionStore = defineStore({
|
|||
this.lastBuildMenuTime = 0;
|
||||
},
|
||||
async changePermissionCode() {
|
||||
const systemPermission = await getPermCode();
|
||||
const systemPermission = await getBackMenuAndPerms();
|
||||
const codeList = systemPermission.codeList;
|
||||
this.setPermCodeList(codeList);
|
||||
this.setAuthData(systemPermission);
|
||||
|
||||
//菜单路由
|
||||
const routeList = systemPermission.menu;
|
||||
return routeList;
|
||||
},
|
||||
async buildRoutesAction(): Promise<AppRouteRecordRaw[]> {
|
||||
const { t } = useI18n();
|
||||
|
@ -207,6 +210,7 @@ export const usePermissionStore = defineStore({
|
|||
// 后台菜单构建
|
||||
case PermissionModeEnum.BACK:
|
||||
const { createMessage, createWarningModal } = useMessage();
|
||||
console.log(" --- 构建后台路由菜单 --- ")
|
||||
// 菜单加载提示
|
||||
// createMessage.loading({
|
||||
// content: t('sys.app.menuLoading'),
|
||||
|
@ -217,8 +221,8 @@ export const usePermissionStore = defineStore({
|
|||
// 这个函数可能只需要执行一次,并且实际的项目可以在正确的时间被放置
|
||||
let routeList: AppRouteRecordRaw[] = [];
|
||||
try {
|
||||
this.changePermissionCode();
|
||||
routeList = (await getMenuList()) as AppRouteRecordRaw[];
|
||||
routeList = await this.changePermissionCode();
|
||||
//routeList = (await getMenuList()) as AppRouteRecordRaw[];
|
||||
// update-begin----author:sunjianlei---date:20220315------for: 判断是否是 vue3 版本的菜单 ---
|
||||
let hasIndex: boolean = false;
|
||||
let hasIcon: boolean = false;
|
||||
|
|
|
@ -56,6 +56,9 @@ export const useUserStore = defineStore({
|
|||
}),
|
||||
getters: {
|
||||
getUserInfo(): UserInfo {
|
||||
if(this.userInfo == null){
|
||||
this.userInfo = getAuthCache<UserInfo>(USER_INFO_KEY)!=null ? getAuthCache<UserInfo>(USER_INFO_KEY) : null;
|
||||
}
|
||||
return this.userInfo || getAuthCache<UserInfo>(USER_INFO_KEY) || {};
|
||||
},
|
||||
getLoginInfo(): LoginInfo {
|
||||
|
@ -168,15 +171,19 @@ export const useUserStore = defineStore({
|
|||
if (sessionTimeout) {
|
||||
this.setSessionTimeout(false);
|
||||
} else {
|
||||
const permissionStore = usePermissionStore();
|
||||
if (!permissionStore.isDynamicAddedRoute) {
|
||||
const routes = await permissionStore.buildRoutesAction();
|
||||
routes.forEach((route) => {
|
||||
router.addRoute(route as unknown as RouteRecordRaw);
|
||||
});
|
||||
router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
|
||||
permissionStore.setDynamicAddedRoute(true);
|
||||
}
|
||||
//update-begin---author:scott ---date::2024-02-21 for:【QQYUN-8326】登录不需要构建路由,进入首页有构建---
|
||||
// // 构建后台菜单路由
|
||||
// const permissionStore = usePermissionStore();
|
||||
// if (!permissionStore.isDynamicAddedRoute) {
|
||||
// const routes = await permissionStore.buildRoutesAction();
|
||||
// routes.forEach((route) => {
|
||||
// router.addRoute(route as unknown as RouteRecordRaw);
|
||||
// });
|
||||
// router.addRoute(PAGE_NOT_FOUND_ROUTE as unknown as RouteRecordRaw);
|
||||
// permissionStore.setDynamicAddedRoute(true);
|
||||
// }
|
||||
//update-end---author:scott ---date::2024-02-21 for:【QQYUN-8326】登录不需要构建路由,进入首页有构建---
|
||||
|
||||
await this.setLoginInfo({ ...data, isLogin: true });
|
||||
//update-begin-author:liusq date:2022-5-5 for:登录成功后缓存拖拽模块的接口前缀
|
||||
localStorage.setItem(JDragConfigEnum.DRAG_BASE_URL, useGlobSetting().domainUrl);
|
||||
|
@ -279,6 +286,7 @@ export const useUserStore = defineStore({
|
|||
this.setUserInfo(null);
|
||||
this.setLoginInfo(null);
|
||||
this.setTenant(null);
|
||||
this.setAllDictItems(null);
|
||||
//update-begin-author:liusq date:2022-5-5 for:退出登录后清除拖拽模块的接口前缀
|
||||
localStorage.removeItem(JDragConfigEnum.DRAG_BASE_URL);
|
||||
//update-end-author:liusq date:2022-5-5 for: 退出登录后清除拖拽模块的接口前缀
|
||||
|
|
|
@ -52,7 +52,8 @@ const render = {
|
|||
if (obj.length > 0) {
|
||||
text = obj[0].text;
|
||||
}
|
||||
return isEmpty(text) || !renderTag ? h('span', text) : h(Tag, text);
|
||||
//【jeecgboot-vue3/issues/903】render.renderDict使用tag渲染报警告问题 #903
|
||||
return isEmpty(text) || !renderTag ? h('span', text) : h(Tag, () => text);
|
||||
},
|
||||
/**
|
||||
* 渲染图片
|
||||
|
|
|
@ -91,13 +91,22 @@ const transform: AxiosTransform = {
|
|||
beforeRequestHook: (config, options) => {
|
||||
const { apiUrl, joinPrefix, joinParamsToUrl, formatDate, joinTime = true, urlPrefix } = options;
|
||||
|
||||
if (joinPrefix) {
|
||||
//update-begin---author:scott ---date:2024-02-20 for:以http开头的请求url,不拼加前缀--
|
||||
// http开头的请求url,不加前缀
|
||||
let isStartWithHttp = false;
|
||||
const requestUrl = config.url;
|
||||
if(requestUrl!=null && (requestUrl.startsWith("http:") || requestUrl.startsWith("https:"))){
|
||||
isStartWithHttp = true;
|
||||
}
|
||||
if (!isStartWithHttp && joinPrefix) {
|
||||
config.url = `${urlPrefix}${config.url}`;
|
||||
}
|
||||
|
||||
if (apiUrl && isString(apiUrl)) {
|
||||
if (!isStartWithHttp && apiUrl && isString(apiUrl)) {
|
||||
config.url = `${apiUrl}${config.url}`;
|
||||
}
|
||||
//update-end---author:scott ---date::2024-02-20 for:以http开头的请求url,不拼加前缀--
|
||||
|
||||
const params = config.params || {};
|
||||
const data = config.data || false;
|
||||
formatDate && data && !isString(data) && formatRequestDate(data);
|
||||
|
|
|
@ -104,7 +104,7 @@ export function cloneObject(obj) {
|
|||
}
|
||||
|
||||
export const withInstall = <T>(component: T, alias?: string) => {
|
||||
console.log("---初始化---", component)
|
||||
//console.log("---初始化---", component)
|
||||
|
||||
const comp = component as any;
|
||||
comp.install = (app: App) => {
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入aa',
|
||||
message: '请输入规则',
|
||||
type: 'array',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
labelField="name"
|
||||
valueField="id"
|
||||
@search="onSearch"
|
||||
:params="searchParams"
|
||||
/>
|
||||
</template>
|
||||
</BasicForm>
|
||||
|
|
|
@ -689,4 +689,25 @@ export const schemas: FormSchema[] = [
|
|||
label: '选中值',
|
||||
colProps: { span: 12 },
|
||||
},
|
||||
{
|
||||
field: 'pop2',
|
||||
component: 'JPopupDict',
|
||||
label: 'JPopupDict示例',
|
||||
colProps: {
|
||||
span: 12,
|
||||
},
|
||||
componentProps:{
|
||||
placeholder: '请选择',
|
||||
dictCode: 'report_user,username,id',
|
||||
multi: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'pop2',
|
||||
component: 'JEllipsis',
|
||||
label: '选中值',
|
||||
colProps: {
|
||||
span: 12,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
style: { textAlign: 'left' },
|
||||
},
|
||||
},
|
||||
// 【issues/1064】列设置的 cacheKey
|
||||
tableSetting: { cacheKey: 'depart_user_departInfo' },
|
||||
// 请求之前对参数做处理
|
||||
beforeFetch(params) {
|
||||
params.deptId = departId.value;
|
||||
|
|
|
@ -87,6 +87,8 @@
|
|||
style: { textAlign: 'left' },
|
||||
},
|
||||
},
|
||||
// 【issues/1064】列设置的 cacheKey
|
||||
tableSetting: { cacheKey: 'depart_user_userInfo' },
|
||||
// 请求之前对参数做处理
|
||||
beforeFetch(params) {
|
||||
params.depId = departId.value;
|
||||
|
|
|
@ -38,11 +38,22 @@
|
|||
import DataRuleList from './DataRuleList.vue';
|
||||
import { columns,searchFormSchema } from './menu.data';
|
||||
import { list, deleteMenu, batchDeleteMenu } from './menu.api';
|
||||
import { useDefIndexStore } from "@/store/modules/defIndex";
|
||||
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const showFooter = ref(true);
|
||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||
const [registerDrawer1, { openDrawer: openDataRule }] = useDrawer();
|
||||
|
||||
// 自定义菜单名称列渲染
|
||||
columns[0].customRender = function ({text, record}) {
|
||||
const isDefIndex = checkDefIndex(record)
|
||||
if (isDefIndex) {
|
||||
text += '(默认首页)'
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
// 列表页面公共参数、方法
|
||||
const { prefixCls, tableContext } = useListPage({
|
||||
tableProps: {
|
||||
|
@ -156,6 +167,7 @@
|
|||
*/
|
||||
function handleSuccess() {
|
||||
reload();
|
||||
reloadDefIndex();
|
||||
}
|
||||
|
||||
function onFetchSuccess() {
|
||||
|
@ -163,6 +175,36 @@
|
|||
nextTick(expandAll);
|
||||
}
|
||||
|
||||
// --------------- begin 默认首页配置 ------------
|
||||
|
||||
const defIndexStore = useDefIndexStore()
|
||||
|
||||
// 设置默认主页
|
||||
async function handleSetDefIndex(record: Recordable) {
|
||||
defIndexStore.update(record.url, record.component, record.route)
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否为默认主页
|
||||
* @param record
|
||||
*/
|
||||
function checkDefIndex(record: Recordable) {
|
||||
return defIndexStore.check(record.url)
|
||||
}
|
||||
|
||||
// 重新加载默认首页配置
|
||||
function reloadDefIndex() {
|
||||
try {
|
||||
defIndexStore.query();
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
reloadDefIndex()
|
||||
|
||||
// --------------- end 默认首页配置 ------------
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
|
@ -192,6 +234,11 @@
|
|||
label: '数据规则',
|
||||
onClick: handleDataRule.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '设为默认首页',
|
||||
onClick: handleSetDefIndex.bind(null, record),
|
||||
ifShow: () => !record.internalOrExternal && record.component && !checkDefIndex(record),
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
color: 'error',
|
||||
|
|
|
@ -115,6 +115,11 @@
|
|||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDeletePosition({ ids: selectedRowKeys.value }, reload);
|
||||
await batchDeletePosition({ ids: selectedRowKeys.value }, () => {
|
||||
// update-begin--author:liaozhiyang---date:20240223---for:【QQYUN-8334】批量删除之后,按钮未隐藏,选中记录还在
|
||||
selectedRowKeys.value = [];
|
||||
reload();
|
||||
// update-end--author:liaozhiyang---date:20240223---for:【QQYUN-8334】批量删除之后,按钮未隐藏,选中记录还在
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
</BasicTree>
|
||||
<!--右下角按钮-->
|
||||
<template #footer>
|
||||
<PopConfirmButton title="确定放弃编辑?" @confirm="closeDrawer" okText="确定" cancelText="取消">取消</PopConfirmButton>
|
||||
<!-- <PopConfirmButton title="确定放弃编辑?" @confirm="closeDrawer" okText="确定" cancelText="取消"></PopConfirmButton> -->
|
||||
<a-button @click="closeDrawer">取消</a-button>
|
||||
<a-button @click="handleSubmit(false)" type="primary" :loading="loading" ghost style="margin-right: 0.8rem">仅保存</a-button>
|
||||
<a-button @click="handleSubmit(true)" type="primary" :loading="loading">保存并关闭</a-button>
|
||||
</template>
|
||||
|
@ -52,6 +53,7 @@
|
|||
import { PopConfirmButton } from '/@/components/Button';
|
||||
import RoleDataRuleDrawer from './RoleDataRuleDrawer.vue';
|
||||
import { queryTreeListForRole, queryRolePermission, saveRolePermission } from '../role.api';
|
||||
import { useI18n } from "/@/hooks/web/useI18n";
|
||||
const emit = defineEmits(['register']);
|
||||
//树的信息
|
||||
const treeData = ref<TreeItem[]>([]);
|
||||
|
@ -78,7 +80,9 @@
|
|||
roleId.value = data.roleId;
|
||||
//初始化数据
|
||||
const roleResult = await queryTreeListForRole();
|
||||
treeData.value = roleResult.treeList;
|
||||
// update-begin--author:liaozhiyang---date:20240228---for:【QQYUN-8355】角色权限配置的菜单翻译
|
||||
treeData.value = translateTitle(roleResult.treeList);
|
||||
// update-end--author:liaozhiyang---date:20240228---for:【QQYUN-8355】角色权限配置的菜单翻译
|
||||
allTreeKeys.value = roleResult.ids;
|
||||
expandedKeys.value = roleResult.ids;
|
||||
//初始化角色菜单数据
|
||||
|
@ -87,6 +91,27 @@
|
|||
defaultCheckedKeys.value = permResult;
|
||||
setDrawerProps({ loading: false });
|
||||
});
|
||||
/**
|
||||
* 2024-02-28
|
||||
* liaozhiyang
|
||||
* 翻译菜单名称
|
||||
*/
|
||||
function translateTitle(data) {
|
||||
if (data?.length) {
|
||||
data.forEach((item) => {
|
||||
if (item.slotTitle) {
|
||||
const { t } = useI18n();
|
||||
if (item.slotTitle.includes("t('") && t) {
|
||||
item.slotTitle = new Function('t', `return ${item.slotTitle}`)(t);
|
||||
}
|
||||
}
|
||||
if (item.children?.length) {
|
||||
translateTitle(item.children);
|
||||
}
|
||||
});
|
||||
}
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* 点击选中
|
||||
*/
|
||||
|
|
|
@ -74,7 +74,8 @@
|
|||
clickToRowSelect: false,
|
||||
bordered: true,
|
||||
showIndexColumn: false,
|
||||
tableSetting: { fullScreen: true },
|
||||
// 【issues/1064】列设置的 cacheKey
|
||||
tableSetting: { fullScreen: true, cacheKey: 'role_user_table' },
|
||||
canResize: false,
|
||||
rowKey: 'id',
|
||||
actionColumn: {
|
||||
|
|
|
@ -253,16 +253,12 @@
|
|||
changeOwenUserTenant({ userId:userId, tenantId:unref(tenantId) }).then((res) =>{
|
||||
if(res.success){
|
||||
createMessage.success("交接成功");
|
||||
//update-begin---author:wangshuai ---date:20230721 for:【QQYUN-5847】租户管理员办理交接,不是创建者不需要刷新浏览器------------
|
||||
let username = userStore.userInfo?.username;
|
||||
let username = userStore.getUserInfo?.username;
|
||||
if(username == handOverUserName.value){
|
||||
//update-begin---author:wangshuai ---date:20230724 for:如果登录人和被交接人是一个人,直接退出登录------------
|
||||
userStore.logout(true);
|
||||
//update-end---author:wangshuai ---date:20230724 for:如果登录人和被交接人是一个人,直接退出登录------------
|
||||
}else{
|
||||
reload();
|
||||
}
|
||||
//update-end---author:wangshuai ---date:20230721 for:【QQYUN-5847】租户管理员办理交接,不是创建者不需要刷新浏览器------------
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,8 @@
|
|||
updateSchema([
|
||||
{
|
||||
field: 'password',
|
||||
show: !unref(isUpdate),
|
||||
// 【QQYUN-8324】
|
||||
ifShow: !unref(isUpdate),
|
||||
},
|
||||
{
|
||||
field: 'confirmPassword',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="tenant-padding" :class="[`${prefixCls}`]">
|
||||
<div class="my-tenant">
|
||||
<span style="flex: 1">我的租户</span>
|
||||
<span style="flex: 1">我的组织</span>
|
||||
<span class="invited" @click="invitedClick">我的受邀信息<span class="approved-count" v-if="invitedCount>0">{{invitedCount}}</span></span>
|
||||
</div>
|
||||
<div class="tenant-list" v-if="dataSource.length>0">
|
||||
|
|
|
@ -32,7 +32,7 @@ export const settingList = [
|
|||
},
|
||||
{
|
||||
key: '2',
|
||||
name: '我的租户',
|
||||
name: '我的组织',
|
||||
component: 'TenantSetting',
|
||||
isSlot:false,
|
||||
icon:'ant-design:team-outlined',
|
||||
|
|
|
@ -86,6 +86,11 @@ export default defineComponent({
|
|||
}
|
||||
//update-end---author:wangshuai ---date:20230721 for:【QQYUN-5726】邀请加入租户加个按钮直接跳转过去------------
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
goToMyTeantPage();
|
||||
})
|
||||
|
||||
return {
|
||||
prefixCls,
|
||||
settingList,
|
||||
|
|
Loading…
Reference in New Issue