Merge branch 'dev-sugx-20250721' into 'dev'
若干问题修改(同步最近在数字新能源项目中修改的问题) See merge request itc-framework/ma/2024/front!100
This commit is contained in:
@ -7,6 +7,7 @@
|
|||||||
:selectedKeys="selectedKeys"
|
:selectedKeys="selectedKeys"
|
||||||
@menu-event="handleMenuEvent"
|
@menu-event="handleMenuEvent"
|
||||||
overlayClassName="app-locale-picker-overlay"
|
overlayClassName="app-locale-picker-overlay"
|
||||||
|
maxTextWidth=200
|
||||||
>
|
>
|
||||||
<span class="cursor-pointer flex items-center" style="margin-left: 10px;">
|
<span class="cursor-pointer flex items-center" style="margin-left: 10px;">
|
||||||
<Icon icon="ant-design:apartment-outlined" size="18" style="color:#222222"/>
|
<Icon icon="ant-design:apartment-outlined" size="18" style="color:#222222"/>
|
||||||
@ -59,6 +60,9 @@
|
|||||||
formInfo.value.tenants.forEach((o) => {
|
formInfo.value.tenants.forEach((o) => {
|
||||||
o.text = o.name;
|
o.text = o.name;
|
||||||
o.event = o.code;
|
o.event = o.code;
|
||||||
|
if(formInfo.value.tenantCode==o.code){
|
||||||
|
o.icon="ant-design:check-outlined";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,7 +105,11 @@
|
|||||||
generatorConfig.menuConfig!.sortCode = formData.sortCode;
|
generatorConfig.menuConfig!.sortCode = formData.sortCode;
|
||||||
generatorConfig.menuConfig!.icon = formData.icon;
|
generatorConfig.menuConfig!.icon = formData.icon;
|
||||||
}
|
}
|
||||||
defineExpose({ validateStep, getFormData });
|
|
||||||
|
function initStep(){
|
||||||
|
setFieldsValue(generatorConfig.menuConfig);
|
||||||
|
}
|
||||||
|
defineExpose({ validateStep, getFormData,initStep });
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
:deep(.ant-input-number) {
|
:deep(.ant-input-number) {
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<Icon :icon="item.icon" v-if="item.icon" />
|
<Icon :icon="item.icon" v-if="item.icon" />
|
||||||
<span class="ml-1">{{ item.text }}</span>
|
<span class="ml-1" :style="getStyle">{{ item.text }}</span>
|
||||||
</template>
|
</template>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-divider v-if="item.divider" :key="`d-${item.event}`" />
|
<a-menu-divider v-if="item.divider" :key="`d-${item.event}`" />
|
||||||
@ -70,6 +70,9 @@
|
|||||||
type: Array as PropType<string[]>,
|
type: Array as PropType<string[]>,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
maxTextWidth:{
|
||||||
|
type: [Number, String]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['menuEvent']);
|
const emit = defineEmits(['menuEvent']);
|
||||||
@ -93,4 +96,12 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const getAttr = (key: string | number) => ({ key });
|
const getAttr = (key: string | number) => ({ key });
|
||||||
|
|
||||||
|
const getStyle = computed(() => {
|
||||||
|
if(props.maxTextWidth){
|
||||||
|
return { maxWidth: `${props.maxTextWidth}`.replace(/px/, '') + 'px',display:'inline-block',overflow: 'hidden', textOverflow:'ellipsis', whiteSpace: 'nowrap',lineHeight:'100%'};
|
||||||
|
}else{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -19,6 +19,8 @@
|
|||||||
keyword.value = '';
|
keyword.value = '';
|
||||||
emits('search', keyword.value);
|
emits('search', keyword.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({ search });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@ -11,7 +11,11 @@
|
|||||||
>
|
>
|
||||||
<!-- 已选 -->
|
<!-- 已选 -->
|
||||||
<Selected type="role" :list="data.selectedList" @abolish="abolishChecked" />
|
<Selected type="role" :list="data.selectedList" @abolish="abolishChecked" />
|
||||||
<SearchBox @search="search" />
|
|
||||||
|
<!-- 搜索栏 -->
|
||||||
|
<SearchBox @search="search" ref="searchBox" style="display: inline-block"/>
|
||||||
|
<SelectTenant @change="handleTenantChange" v-if="getAppEnvConfig().VITE_GLOB_TENANT_ENABLED" style="display:inline-block"/>
|
||||||
|
|
||||||
<div class="list-page-box" v-if="data.list.length > 0">
|
<div class="list-page-box" v-if="data.list.length > 0">
|
||||||
<RoleCard
|
<RoleCard
|
||||||
:class="data.selectedIds && data.selectedIds.includes(item.id) ? 'picked' : 'not-picked'"
|
:class="data.selectedIds && data.selectedIds.includes(item.id) ? 'picked' : 'not-picked'"
|
||||||
@ -34,9 +38,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive } from 'vue';
|
import { ref,reactive } from 'vue';
|
||||||
import RoleCard from './card/RoleCard.vue';
|
import RoleCard from './card/RoleCard.vue';
|
||||||
import Selected from './Selected.vue';
|
import Selected from './Selected.vue';
|
||||||
|
import SelectTenant from './SelectTenant.vue';
|
||||||
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
import { ModalPanel, EmptyBox, SearchBox } from '/@/components/ModalPanel/index';
|
import { ModalPanel, EmptyBox, SearchBox } from '/@/components/ModalPanel/index';
|
||||||
|
|
||||||
import { getRoleList, getRoleMulti } from '/@/api/system/role';
|
import { getRoleList, getRoleMulti } from '/@/api/system/role';
|
||||||
@ -78,6 +84,14 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const searchBox = ref();
|
||||||
|
const tenantId=ref();
|
||||||
|
|
||||||
|
function handleTenantChange(value:Number){
|
||||||
|
tenantId.value=value;
|
||||||
|
searchBox.value.search();
|
||||||
|
}
|
||||||
|
|
||||||
async function show() {
|
async function show() {
|
||||||
if (props.selectedIds && Array.isArray(props.selectedIds)) data.selectedIds = props.selectedIds;
|
if (props.selectedIds && Array.isArray(props.selectedIds)) data.selectedIds = props.selectedIds;
|
||||||
await getList();
|
await getList();
|
||||||
@ -123,6 +137,7 @@
|
|||||||
data.list = [];
|
data.list = [];
|
||||||
let params = {
|
let params = {
|
||||||
keyword: data.searchConfig.keyword,
|
keyword: data.searchConfig.keyword,
|
||||||
|
tenantId:tenantId.value
|
||||||
};
|
};
|
||||||
let list = await getRoleList(params);
|
let list = await getRoleList(params);
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
@ -132,6 +147,7 @@
|
|||||||
id: ele.id,
|
id: ele.id,
|
||||||
code: ele.code,
|
code: ele.code,
|
||||||
count: ele.count, //角色人数
|
count: ele.count, //角色人数
|
||||||
|
tenantName:ele.tenantName
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -149,6 +165,7 @@
|
|||||||
id: ele.id,
|
id: ele.id,
|
||||||
code: ele.code,
|
code: ele.code,
|
||||||
count: ele.count, //角色人数
|
count: ele.count, //角色人数
|
||||||
|
tenantName:ele.tenantName
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
47
src/components/SelectOrganizational/src/SelectTenant.vue
Normal file
47
src/components/SelectOrganizational/src/SelectTenant.vue
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<label>租户:</label>
|
||||||
|
<a-select
|
||||||
|
v-model:value="selectedId"
|
||||||
|
style="width:300px;heiht:32px;padding: 10px 0px;margin-left: 10px"
|
||||||
|
:options="tenantOptions"
|
||||||
|
@change="changeTenant"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref,reactive,unref,onMounted} from 'vue';
|
||||||
|
import { getTenantAllList} from '/@/api/system/tenant';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const { userInfo } = storeToRefs(userStore);
|
||||||
|
|
||||||
|
const emits = defineEmits(['change']);
|
||||||
|
|
||||||
|
let selectedId=userInfo.value.tenantId;
|
||||||
|
|
||||||
|
const tenantOptions = reactive([]);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
/* let list=await getTenantAllList();
|
||||||
|
userInfo.te
|
||||||
|
if(list.length>0){
|
||||||
|
list.forEach((item)=>{
|
||||||
|
tenantOptions.push({
|
||||||
|
value:item.id,
|
||||||
|
label:item.name
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}*/
|
||||||
|
userInfo.value.tenants.forEach((o) => {
|
||||||
|
tenantOptions.push({
|
||||||
|
value:o.id,
|
||||||
|
label:o.name
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
function changeTenant(value:Number) {
|
||||||
|
emits('change', value);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -22,6 +22,7 @@
|
|||||||
class="picked"
|
class="picked"
|
||||||
:key="index"
|
:key="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
|
:showTenant="true"
|
||||||
@click="abolish(item.id)"
|
@click="abolish(item.id)"
|
||||||
:disabled="props.disabledIds && props.disabledIds.includes(item.id) ? true : false"
|
:disabled="props.disabledIds && props.disabledIds.includes(item.id) ? true : false"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -117,7 +117,10 @@ export function useFormConfig() {
|
|||||||
async function queryConfig(formId:String,configName:String){
|
async function queryConfig(formId:String,configName:String){
|
||||||
const formTemplate = await getFormTemplateUsingCache(formId);
|
const formTemplate = await getFormTemplateUsingCache(formId);
|
||||||
const renderConfig=formTemplate.renderConfig;
|
const renderConfig=formTemplate.renderConfig;
|
||||||
const exportMatches = renderConfig.matchAll(/export\s+const\s+(\w+)\s*(?::\s*\w+(?:\[\])?)?\s*=\s*([\s\S]*?)(?=\n\s*export\s+const|\n\s*const|\n\s*export\s+function|\n\s*function|$)/g);
|
if(renderConfig==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const exportMatches = renderConfig.matchAll(/export\s+const\s+(\w+)\s*(?::\s*\w+(?:\[\])?)?\s*=\s*([\s\S]*?)(?=\n\s*export\s+const|\n\s*export\s+function|\n\s*function|$)/g);
|
||||||
for (const match of exportMatches) {
|
for (const match of exportMatches) {
|
||||||
const varName = match[1];
|
const varName = match[1];
|
||||||
const valueCode = match[2].trim();
|
const valueCode = match[2].trim();
|
||||||
|
|||||||
@ -131,6 +131,10 @@
|
|||||||
padding:0px 10px!important;
|
padding:0px 10px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.ant-tabs-content){
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
// :deep(.ant-col-15) {
|
// :deep(.ant-col-15) {
|
||||||
// flex: 0 0 calc(100% - 185px);
|
// flex: 0 0 calc(100% - 185px);
|
||||||
// max-width: initial;
|
// max-width: initial;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display:flex;background-color:white">
|
<div style="display:flex;background-color:white;height: 100%">
|
||||||
<div
|
<div
|
||||||
class="w-1/3 xl:w-1/4 overflow-hidden bg-white h-full"
|
class="w-1/3 xl:w-1/4 overflow-hidden bg-white h-full"
|
||||||
:style="{ 'border-right': '1px solid #e5e7eb' }"
|
:style="{ 'border-right': '1px solid #e5e7eb' }"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display:flex;background-color:white">
|
<div style="display:flex;background-color:white;height: 100%">
|
||||||
<div
|
<div
|
||||||
class="w-1/3 xl:w-1/4 overflow-hidden bg-white h-full"
|
class="w-1/3 xl:w-1/4 overflow-hidden bg-white h-full"
|
||||||
:style="{ 'border-right': '1px solid #e5e7eb' }"
|
:style="{ 'border-right': '1px solid #e5e7eb' }"
|
||||||
|
|||||||
@ -233,6 +233,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
current.value++;
|
current.value++;
|
||||||
|
|
||||||
|
if (current.value === 5) {
|
||||||
|
menuConfigStepRef.value.initStep();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleSaveDraft() {
|
async function handleSaveDraft() {
|
||||||
|
|||||||
@ -229,6 +229,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
current.value++;
|
current.value++;
|
||||||
|
|
||||||
|
if (current.value === 5) {
|
||||||
|
menuConfigStep.value.initStep();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleSaveDraft() {
|
async function handleSaveDraft() {
|
||||||
|
|||||||
@ -232,6 +232,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
current.value++;
|
current.value++;
|
||||||
|
|
||||||
|
if (current.value === 5) {
|
||||||
|
menuConfigStepRef.value.initStep();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleSaveDraft() {
|
async function handleSaveDraft() {
|
||||||
|
|||||||
@ -58,7 +58,7 @@
|
|||||||
<flow-history :items="getTaskRecords()"></flow-history>
|
<flow-history :items="getTaskRecords()"></flow-history>
|
||||||
<opinion-dialog ref="opinionDlg" />
|
<opinion-dialog ref="opinionDlg" />
|
||||||
<transfer-dialog ref="transferDlg" />
|
<transfer-dialog ref="transferDlg" />
|
||||||
<a-modal :closable="false" :visible="showFlowChart" centered class="geg" title="流程图" width="1200px" @cancel="closeFlowChart">
|
<a-modal :closable="false" v-if="showFlowChart" centered class="geg" title="流程图" width="1200px" @cancel="closeFlowChart">
|
||||||
<process-information :process-id="processId" :xml="data.xml"
|
<process-information :process-id="processId" :xml="data.xml"
|
||||||
:currentTaskInfo="data.currentTaskInfo"
|
:currentTaskInfo="data.currentTaskInfo"
|
||||||
:currentTaskAssigneeNames="data.currentTaskAssigneeNames"
|
:currentTaskAssigneeNames="data.currentTaskAssigneeNames"
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-table :dataSource="props.memberList" :columns="configColumns" :pagination="false">
|
<a-table :dataSource="props.memberList" :columns="getConfigColumns()" :pagination="false">
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
<template v-if="column.key === 'memberType'">
|
<template v-if="column.key === 'memberType'">
|
||||||
{{ getMemberType(record.memberType) }}
|
{{ getMemberType(record.memberType) }}
|
||||||
@ -36,6 +36,7 @@
|
|||||||
import Posts from '/@bpmn/components/member/Posts.vue';
|
import Posts from '/@bpmn/components/member/Posts.vue';
|
||||||
import Roles from '/@bpmn/components/member/Roles.vue';
|
import Roles from '/@bpmn/components/member/Roles.vue';
|
||||||
// import Users from '/@bpmn/components/member/Users.vue';
|
// import Users from '/@bpmn/components/member/Users.vue';
|
||||||
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
|
|
||||||
import SelectUserV2 from './SelectUserV2.vue';
|
import SelectUserV2 from './SelectUserV2.vue';
|
||||||
import NodeApprover from '/@bpmn/components/member/NodeApprover.vue';
|
import NodeApprover from '/@bpmn/components/member/NodeApprover.vue';
|
||||||
@ -86,6 +87,21 @@
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
function getConfigColumns(){
|
||||||
|
const arr=configColumns;
|
||||||
|
if(getAppEnvConfig().VITE_GLOB_TENANT_ENABLED){
|
||||||
|
arr.splice(2, 0,
|
||||||
|
{
|
||||||
|
title: t('租户'),
|
||||||
|
dataIndex: 'tenantName',
|
||||||
|
key: 'tenantName',
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return arr;
|
||||||
|
}
|
||||||
|
|
||||||
const allComponentList = computed(() => {
|
const allComponentList = computed(() => {
|
||||||
return [
|
return [
|
||||||
{ name: t('添加岗位'), component: Posts, show: true },
|
{ name: t('添加岗位'), component: Posts, show: true },
|
||||||
|
|||||||
@ -59,6 +59,7 @@
|
|||||||
name: ele.name,
|
name: ele.name,
|
||||||
id: ele.id,
|
id: ele.id,
|
||||||
memberType: MemberType.ROLE,
|
memberType: MemberType.ROLE,
|
||||||
|
tenantName: ele.tenantName
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user