merge
This commit is contained in:
1
src/assets/approve.svg
Normal file
1
src/assets/approve.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1769737022317" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3450" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 928H128c-17.6 0-32-14.4-32-32s14.4-32 32-32h768c17.6 0 32 14.4 32 32s-14.4 32-32 32z m0-128H128c-17.6 0-32-14.4-32-32V608c0-52.8 43.2-96 96-96h204.8c-6.4-38.4-25.6-75.2-52.8-107.2-36.8-41.6-56-94.4-56-148.8 0-60.8 24-118.4 68.8-161.6 44.8-43.2 102.4-64 164.8-62.4C636.8 36.8 734.4 136 736 251.2c1.6 57.6-20.8 113.6-59.2 156.8-27.2 28.8-43.2 64-49.6 104H832c52.8 0 96 43.2 96 96v160c0 17.6-14.4 32-32 32z m-736-64h704V608c0-17.6-14.4-32-32-32H592c-17.6 0-32-14.4-32-32 0-67.2 24-131.2 68.8-179.2 28.8-30.4 43.2-70.4 43.2-112-1.6-83.2-70.4-153.6-153.6-156.8-44.8-1.6-86.4 14.4-116.8 44.8-32 30.4-49.6 72-49.6 115.2 0 38.4 14.4 76.8 40 105.6 46.4 52.8 72 116.8 72 182.4 0 17.6-14.4 32-32 32H192c-17.6 0-32 14.4-32 32v128z" fill="#515151" p-id="3451"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,3 +1,5 @@
|
||||
import { title } from 'process';
|
||||
|
||||
export default {
|
||||
user: {
|
||||
title0: 'Component Size',
|
||||
@@ -7,6 +9,7 @@ export default {
|
||||
title4: 'News',
|
||||
title5: 'Full Screen On',
|
||||
title6: 'Full Screen Off',
|
||||
title7: 'Approve',
|
||||
titleApp: 'Client',
|
||||
dropdownLarge: 'Large',
|
||||
dropdownDefault: 'Default',
|
||||
@@ -34,7 +37,7 @@ export default {
|
||||
fullscreen: 'Fullscreen',
|
||||
closeFullscreen: 'Close Fullscreen',
|
||||
favorite: 'Favorite',
|
||||
favoriteMax: 'The number of shortcut navigation exceeds the upper limit. Please remove some shortcuts'
|
||||
favoriteMax: 'The number of shortcut navigation exceeds the upper limit. Please remove some shortcuts',
|
||||
},
|
||||
notFound: {
|
||||
foundTitle: 'Wrong Address Input, Please Re-enter the Address~',
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { title } from 'process';
|
||||
|
||||
// 定义内容
|
||||
export default {
|
||||
user: {
|
||||
@@ -8,6 +10,7 @@ export default {
|
||||
title4: '消息',
|
||||
title5: '开全屏',
|
||||
title6: '关全屏',
|
||||
title7: '审批',
|
||||
titleApp: '客户端',
|
||||
dropdownLarge: '大型',
|
||||
dropdownDefault: '默认',
|
||||
@@ -35,7 +38,7 @@ export default {
|
||||
fullscreen: '当前页全屏',
|
||||
closeFullscreen: '关闭全屏',
|
||||
favorite: '收藏',
|
||||
favoriteMax: '快捷导航数量超过上限,请移除部分'
|
||||
favoriteMax: '快捷导航数量超过上限,请移除部分',
|
||||
},
|
||||
notFound: {
|
||||
foundTitle: '地址输入错误,请重新输入地址~',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="layout-navbars-breadcrumb-user pr15" :style="{flex: layoutUserFlexNum}">
|
||||
<div class="layout-navbars-breadcrumb-user pr15" :style="{ flex: layoutUserFlexNum }">
|
||||
<!-- SPDM CODE -->
|
||||
<!-- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onDownloadClient">
|
||||
<div class="layout-navbars-breadcrumb-user-icon" :title="$t('user.titleApp')">
|
||||
@@ -65,6 +65,9 @@
|
||||
</template>
|
||||
</el-popover> -->
|
||||
</div>
|
||||
<div class="layout-navbars-breadcrumb-user-icon" @click="gotoApprove" :title="$t('user.title7')">
|
||||
<img src="/@/assets/approve.svg" class="approve-img" />
|
||||
</div>
|
||||
<div
|
||||
class="layout-navbars-breadcrumb-user-icon mr10"
|
||||
@click="onScreenfullClick"
|
||||
@@ -101,21 +104,22 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="layoutBreadcrumbUser">
|
||||
import {logout} from '/@/api/login';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import { logout } from '/@/api/login';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import screenfull from 'screenfull';
|
||||
import {useUserInfo} from '/@/stores/userInfo';
|
||||
import {useThemeConfig} from '/@/stores/themeConfig';
|
||||
import other, {downloadUrlFile} from '/@/utils/other';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
import { useThemeConfig } from '/@/stores/themeConfig';
|
||||
import other, { downloadUrlFile } from '/@/utils/other';
|
||||
import mittBus from '/@/utils/mitt';
|
||||
import {Local, Session, Token} from '/@/utils/storage';
|
||||
import {formatAxis} from '/@/utils/formatTime';
|
||||
import { Local, Session, Token } from '/@/utils/storage';
|
||||
import { formatAxis } from '/@/utils/formatTime';
|
||||
import dayjs from '/@/utils/dayjs';
|
||||
import {useMsg} from '/@/stores/msg';
|
||||
import {PDM_LOGIN_PATH} from '/@/config/constant';
|
||||
import { useMsg } from '/@/stores/msg';
|
||||
import { PDM_LOGIN_PATH } from '/@/config/constant';
|
||||
import pdmIco from '/@/assets/pdm.ico';
|
||||
import clientCid from '/@/assets/client-cid.svg';
|
||||
import WujieVue from 'wujie-vue3';
|
||||
import { queryMineTask } from '/@/api/flow/task';
|
||||
|
||||
const { bus } = WujieVue;
|
||||
// import {fetchUserMessageList} from '/@/api/admin/message';
|
||||
@@ -129,12 +133,12 @@ const PersonalDrawer = defineAsyncComponent(() => import('/@/views/admin/system/
|
||||
const NewsLists = defineAsyncComponent(() => import('/@/views/message/components/list.vue'));
|
||||
|
||||
// 定义变量内容
|
||||
const {locale, t} = useI18n();
|
||||
const { locale, t } = useI18n();
|
||||
const router = useRouter();
|
||||
const stores = useUserInfo();
|
||||
const storesThemeConfig = useThemeConfig();
|
||||
const {userInfos, userName} = storeToRefs(stores);
|
||||
const {themeConfig} = storeToRefs(storesThemeConfig);
|
||||
const { userInfos, userName } = storeToRefs(stores);
|
||||
const { themeConfig } = storeToRefs(storesThemeConfig);
|
||||
const searchRef = ref();
|
||||
const tenantRef = ref();
|
||||
// const newsRef = ref();
|
||||
@@ -164,7 +168,7 @@ const websocketEnable = ref(import.meta.env.VITE_WEBSOCKET_ENABLE === 'true');
|
||||
// 设置分割样式
|
||||
const layoutUserFlexNum = computed(() => {
|
||||
let num: string | number = '';
|
||||
const {layout, isClassicSplitMenu} = themeConfig.value;
|
||||
const { layout, isClassicSplitMenu } = themeConfig.value;
|
||||
const layoutArr: string[] = ['defaults', 'columns'];
|
||||
if (layoutArr.includes(layout) || (layout === 'classic' && !isClassicSplitMenu)) num = '1';
|
||||
else num = '';
|
||||
@@ -218,7 +222,7 @@ const onHandleCommandClick = (path: string) => {
|
||||
})
|
||||
.then(async () => {
|
||||
// 关闭全部的标签页
|
||||
mittBus.emit('onCurrentContextmenuClick', Object.assign({}, {contextMenuClickId: 3, ...router}));
|
||||
mittBus.emit('onCurrentContextmenuClick', Object.assign({}, { contextMenuClickId: 3, ...router }));
|
||||
// 调用后台接口
|
||||
await logout({
|
||||
token: Token.get(),
|
||||
@@ -241,6 +245,9 @@ const onHandleCommandClick = (path: string) => {
|
||||
router.push(path);
|
||||
}
|
||||
};
|
||||
const gotoApprove = () => {
|
||||
router.push('/task/pending');
|
||||
};
|
||||
// 菜单搜索点击
|
||||
const onSearchClick = () => {
|
||||
searchRef.value.openSearch();
|
||||
@@ -285,7 +292,7 @@ const initI18nOrSize = (value: string, attr: string) => {
|
||||
|
||||
// 获取到消息
|
||||
const rollback = (msg: string) => {
|
||||
useMsg().setMsg({label: 'websocket消息', value: msg, time: formatAxis(new Date())});
|
||||
useMsg().setMsg({ label: 'websocket消息', value: msg, time: formatAxis(new Date()) });
|
||||
};
|
||||
|
||||
// // 获取是否显示未读
|
||||
@@ -371,4 +378,8 @@ onMounted(() => {
|
||||
top: 12px;
|
||||
}
|
||||
}
|
||||
.approve-img {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -92,9 +92,9 @@ watchEffect(() => {
|
||||
|
||||
const router = useRouter();
|
||||
const handleClick = (item: any) => {
|
||||
// if(['todayTmrTasks', 'inProgress', 'postponed'].includes(item.key)) {
|
||||
// localStorage.setItem('SPDM_JUMP_TASK_TYPE', item.key);
|
||||
// }
|
||||
if (['todayTmrTasks', 'inProgress', 'postponed'].includes(item.key)) {
|
||||
localStorage.setItem('home_taskParams', item.key);
|
||||
}
|
||||
router.push(item.path);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
<div v-if="nowComponentList.length <= 0" class="no-widgets">
|
||||
<el-empty :description="$t('widgets.index.0910663-2')" :image-size="280"></el-empty>
|
||||
</div>
|
||||
<el-row :gutter="16">
|
||||
<!-- 默认布局 SPDM CODE -->
|
||||
<el-row v-if="isDefaultLayout" :gutter="16">
|
||||
<!-- 第一列 -->
|
||||
<el-col :md="8" :xs="24">
|
||||
<draggable
|
||||
v-model="grid.copmsList[0]"
|
||||
@@ -46,8 +48,9 @@
|
||||
</template>
|
||||
</draggable>
|
||||
</el-col>
|
||||
<!-- SPDM CODE -->
|
||||
<!-- 第二列 要分两块-->
|
||||
<el-col :md="16" :xs="24">
|
||||
<!-- 第一行 分成左右两块 -->
|
||||
<el-row :gutter="16">
|
||||
<el-col :md="16" :xs="24">
|
||||
<draggable
|
||||
@@ -106,6 +109,7 @@
|
||||
</draggable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 第二行 -->
|
||||
<el-row :gutter="16">
|
||||
<el-col :md="24" :xs="24">
|
||||
<draggable
|
||||
@@ -138,6 +142,37 @@
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 自定义布局 -->
|
||||
<el-row v-else :gutter="16">
|
||||
<el-col v-for="(item, index) in grid.layout" v-bind:key="index" :gutter="16" :md="item" :xs="24">
|
||||
<draggable
|
||||
v-model="grid.copmsList[index]"
|
||||
animation="200"
|
||||
handle=".customize-overlay"
|
||||
group="people"
|
||||
item-key="com"
|
||||
dragClass="aaaaa"
|
||||
force-fallback
|
||||
fallbackOnBody
|
||||
class="draggable-box"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div class="widgets-item" :class="{ 'inline-flex': allComps[element]?.isInline }">
|
||||
<component :is="allComps[element]"></component>
|
||||
<div v-if="customizing" class="customize-overlay">
|
||||
<el-button class="close" type="danger" plain icon="Close" size="small" @click="remove(element)"></el-button>
|
||||
<label>
|
||||
<el-icon>
|
||||
<component :is="allComps[element].icon" />
|
||||
</el-icon>
|
||||
{{ $t(allComps[element].title) }}</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -165,13 +200,13 @@
|
||||
<el-col :span="8"><span></span></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="selectLayout-item item03" :class="{ active: grid.layout.join(',') === '24' }" @click="setLayout([24])">
|
||||
<!-- <div class="selectLayout-item item03" :class="{ active: grid.layout.join(',') === '24' }" @click="setLayout([24])">
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="24"><span></span></el-col>
|
||||
<el-col :span="24"><span></span></el-col>
|
||||
<el-col :span="24"><span></span></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
@@ -231,6 +266,9 @@ const customizing = ref(false);
|
||||
const widgets = ref();
|
||||
const widgetsKey = ref('widgets');
|
||||
const grid = ref(cloneDeep(toValue(defaultGrid)));
|
||||
// 默认布局是4组
|
||||
// const isDefaultLayout = ref(true);
|
||||
const isDefaultLayout = ref(grid.value.copmsList.length === 4);
|
||||
|
||||
const allComponentList = computed(() => {
|
||||
const list = [];
|
||||
@@ -294,15 +332,21 @@ const custom = () => {
|
||||
|
||||
const setLayout = (layout: Array<number>) => {
|
||||
grid.value.layout = layout;
|
||||
if (layout.join(',') === '24') {
|
||||
if (grid.value.copmsList[1]) {
|
||||
grid.value.copmsList[0].push(...grid.value.copmsList[1]);
|
||||
}
|
||||
if (grid.value.copmsList[2]) {
|
||||
grid.value.copmsList[0].push(...grid.value.copmsList[2]);
|
||||
}
|
||||
grid.value.copmsList.splice(1, 2);
|
||||
// 默认布局是4组,非默认布局是3组,所以要合并,不然会丢组件
|
||||
if (isDefaultLayout.value && grid.value.copmsList.length === 4) {
|
||||
grid.value.copmsList[1] = [...grid.value.copmsList[1], ...grid.value.copmsList[3]];
|
||||
grid.value.copmsList.splice(3, 1);
|
||||
}
|
||||
isDefaultLayout.value = false;
|
||||
// if (layout.join(',') === '24') {
|
||||
// if (grid.value.copmsList[1]) {
|
||||
// grid.value.copmsList[0].push(...grid.value.copmsList[1]);
|
||||
// }
|
||||
// if (grid.value.copmsList[2]) {
|
||||
// grid.value.copmsList[0].push(...grid.value.copmsList[2]);
|
||||
// }
|
||||
// grid.value.copmsList.splice(1, 2);
|
||||
// }
|
||||
};
|
||||
|
||||
const push = (item: any) => {
|
||||
@@ -320,6 +364,7 @@ const save = () => {
|
||||
};
|
||||
|
||||
const backDefault = () => {
|
||||
isDefaultLayout.value = true;
|
||||
customizing.value = false;
|
||||
widgets.value.style.removeProperty('transform');
|
||||
grid.value = cloneDeep(toValue(defaultGrid));
|
||||
|
||||
Reference in New Issue
Block a user