|
@@ -1,34 +1,11 @@
|
|
|
<template>
|
|
<template>
|
|
|
-
|
|
|
|
|
- <!-- 风险管理 -->
|
|
|
|
|
- <div v-if="isOemByEnum(OemType.manager)">
|
|
|
|
|
- <img src="../../assets/images/logoHeader.png" />
|
|
|
|
|
- <span>{{getCompanyName()}}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 云融 -->
|
|
|
|
|
- <div v-else-if="isOemByEnum(OemType.wrspot)">
|
|
|
|
|
- <img src="../../assets/images/headLogo.jpg" />
|
|
|
|
|
- <span>云融</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- 天津麦顿 -->
|
|
|
|
|
- <div v-else-if="isOemByEnum(OemType.tian_jing_mai_dun)">
|
|
|
|
|
- <img src="../../assets/images/tian_jing_mai_dun.png" />
|
|
|
|
|
- <span>天津麦顿</span>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 千海金 -->
|
|
|
|
|
- <div v-else-if="isOemByEnum(OemType.qinghaijin)">
|
|
|
|
|
- <img src="../../assets/images/qianhaijin_logo.jpg" />
|
|
|
|
|
- <span>{{getCompanyName()}}</span>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <img src="../../../public/logoHead.png" />
|
|
|
|
|
+ <span>{{ getCompanyName() }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div v-else>
|
|
|
|
|
- <img src="../../assets/images/logoHeader.png" />
|
|
|
|
|
- <span>{{getCompanyName()}}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
<div class="m-layout-header-right">
|
|
<div class="m-layout-header-right">
|
|
|
- <div @click="openDrawer">
|
|
|
|
|
|
|
+ <div>
|
|
|
<span>{{ getUserName() }},您好!</span>
|
|
<span>{{ getUserName() }},您好!</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="relative">
|
|
<div class="relative">
|
|
@@ -37,49 +14,44 @@
|
|
|
placeholder="请输入代码/名称"
|
|
placeholder="请输入代码/名称"
|
|
|
@pressEnter="search">
|
|
@pressEnter="search">
|
|
|
readonly
|
|
readonly
|
|
|
- </a-input-search>-->
|
|
|
|
|
|
|
+ </a-input-search>-->
|
|
|
<!-- <a-icon type="search" /> -->
|
|
<!-- <a-icon type="search" /> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)">
|
|
<div v-if="isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)">
|
|
|
- <a-popover trigger="click"
|
|
|
|
|
- placement="bottom"
|
|
|
|
|
- overlayClassName="friendPopover">
|
|
|
|
|
|
|
+ <a-popover trigger="click" placement="bottom" overlayClassName="friendPopover">
|
|
|
<template #content>
|
|
<template #content>
|
|
|
<Friend />
|
|
<Friend />
|
|
|
</template>
|
|
</template>
|
|
|
<span class="friendIcon">
|
|
<span class="friendIcon">
|
|
|
- <svg class="icon svg-icon"
|
|
|
|
|
- aria-hidden="true">
|
|
|
|
|
|
|
+ <svg class="icon svg-icon" aria-hidden="true">
|
|
|
<use xlink:href="#icon-pengyou1" />
|
|
<use xlink:href="#icon-pengyou1" />
|
|
|
</svg>
|
|
</svg>
|
|
|
</span>
|
|
</span>
|
|
|
</a-popover>
|
|
</a-popover>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="news-container">
|
|
<div class="news-container">
|
|
|
- <a-badge @click="openNotice"
|
|
|
|
|
- :dot="getUnReadNoticeLength() > 0">
|
|
|
|
|
- <svg class="icon svg-icon"
|
|
|
|
|
- aria-hidden="true">
|
|
|
|
|
|
|
+ <a-badge @click="openNotice" :dot="getUnReadNoticeLength() > 0">
|
|
|
|
|
+ <svg class="icon svg-icon" aria-hidden="true">
|
|
|
<use xlink:href="#icon-xiaoxi" />
|
|
<use xlink:href="#icon-xiaoxi" />
|
|
|
</svg>
|
|
</svg>
|
|
|
</a-badge>
|
|
</a-badge>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <a-popover v-model:visible="visible"
|
|
|
|
|
- trigger="click"
|
|
|
|
|
- placement="bottomRight">
|
|
|
|
|
|
|
+ <a-popover v-model:visible="visible" trigger="click" placement="bottomRight">
|
|
|
<template #content>
|
|
<template #content>
|
|
|
- <div v-for="item in setMenu"
|
|
|
|
|
- class="popItem"
|
|
|
|
|
- @click="chooseSetMenu(item.path)"
|
|
|
|
|
- :key="item.path">{{ item.name }}</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="item in setMenu"
|
|
|
|
|
+ class="popItem"
|
|
|
|
|
+ @click="chooseSetMenu(item.path)"
|
|
|
|
|
+ :key="item.path"
|
|
|
|
|
+ >{{ item.name }}</div>
|
|
|
</template>
|
|
</template>
|
|
|
<a-avatar :size="24">
|
|
<a-avatar :size="24">
|
|
|
<template #icon>
|
|
<template #icon>
|
|
|
<SettingFilled />
|
|
<SettingFilled />
|
|
|
<!-- <svg class="icon svg-icon" aria-hidden="true">
|
|
<!-- <svg class="icon svg-icon" aria-hidden="true">
|
|
|
<use xlink:href="#icon-yonghu1" />
|
|
<use xlink:href="#icon-yonghu1" />
|
|
|
- </svg>-->
|
|
|
|
|
|
|
+ </svg>-->
|
|
|
</template>
|
|
</template>
|
|
|
</a-avatar>
|
|
</a-avatar>
|
|
|
</a-popover>
|
|
</a-popover>
|
|
@@ -89,101 +61,101 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { defineComponent, ref, provide } from 'vue';
|
|
|
|
|
-import { openModal } from '@/common/setup/modal/index';
|
|
|
|
|
-import { UserOutlined, SettingFilled } from '@ant-design/icons-vue';
|
|
|
|
|
-import Setting from '@/views/setting/index.vue';
|
|
|
|
|
-import { getUserName, getCompanyName } from '@/services/bus/user';
|
|
|
|
|
-import { logout } from '@/services/bus/login';
|
|
|
|
|
-import APP from '@/services';
|
|
|
|
|
-import Router from '@/router';
|
|
|
|
|
-import { handleNotice } from '@/views/setting/notice/setup';
|
|
|
|
|
import { isOemByEnum, OemType } from '@/common/config/projectName';
|
|
import { isOemByEnum, OemType } from '@/common/config/projectName';
|
|
|
import { changeTheme, ThemeEnum } from '@/common/config/theme';
|
|
import { changeTheme, ThemeEnum } from '@/common/config/theme';
|
|
|
import { initData } from '@/common/methods';
|
|
import { initData } from '@/common/methods';
|
|
|
|
|
+import { openModal } from '@/common/setup/modal/index';
|
|
|
|
|
+import Router from '@/router';
|
|
|
|
|
+import APP from '@/services';
|
|
|
|
|
+import { logout } from '@/services/bus/login';
|
|
|
|
|
+import { getCompanyName, getUserName } from '@/services/bus/user';
|
|
|
import Friend from '@/views/setting/friends/index.vue';
|
|
import Friend from '@/views/setting/friends/index.vue';
|
|
|
|
|
+import Setting from '@/views/setting/index.vue';
|
|
|
|
|
+import { handleNotice } from '@/views/setting/notice/setup';
|
|
|
|
|
+import { SettingFilled, UserOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
+import { defineComponent, provide, ref } from 'vue';
|
|
|
|
|
|
|
|
// 设置
|
|
// 设置
|
|
|
const setFn = () => {
|
|
const setFn = () => {
|
|
|
- const visible = ref<boolean>(false);
|
|
|
|
|
- const chooseSetupItem = ref<string>('');
|
|
|
|
|
- provide('ControlModal', chooseSetupItem);
|
|
|
|
|
- const setMenu = ref([{ name: '退出', path: 'logout' }]);
|
|
|
|
|
- // const setMenu = [
|
|
|
|
|
- // // { name: '修改密码', path: 'password' },
|
|
|
|
|
- // // { name: '收货地址', path: 'addresss' },
|
|
|
|
|
- // // // {name: '发票', path: 'setup-password'},
|
|
|
|
|
- // // { name: '手机号码绑定/解绑', path: 'phone' },
|
|
|
|
|
- // // { name: '关于我们', path: 'aboutUs' },
|
|
|
|
|
- // { name: '白主题', path: ThemeEnum.light },
|
|
|
|
|
- // { name: '黑主题', path: ThemeEnum.dark },
|
|
|
|
|
- // { name: '退出', path: 'logout' },
|
|
|
|
|
- // ];
|
|
|
|
|
- initData(() => {
|
|
|
|
|
- if (isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)) {
|
|
|
|
|
- const theme = [
|
|
|
|
|
- { name: '白主题', path: ThemeEnum.light },
|
|
|
|
|
- { name: '黑主题', path: ThemeEnum.dark },
|
|
|
|
|
- ];
|
|
|
|
|
- setMenu.value = [...theme, ...setMenu.value];
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- const { openAction } = openModal('logout');
|
|
|
|
|
- function chooseSetMenu(path: string) {
|
|
|
|
|
- if (path === 'logout') {
|
|
|
|
|
- logout();
|
|
|
|
|
- APP.closeServer();
|
|
|
|
|
- Router.replace('/login');
|
|
|
|
|
- } else {
|
|
|
|
|
- changeTheme(path as ThemeEnum);
|
|
|
|
|
- // openAction();
|
|
|
|
|
- }
|
|
|
|
|
- visible.value = false;
|
|
|
|
|
|
|
+ const visible = ref<boolean>(false);
|
|
|
|
|
+ const chooseSetupItem = ref<string>('');
|
|
|
|
|
+ provide('ControlModal', chooseSetupItem);
|
|
|
|
|
+ const setMenu = ref([{ name: '退出', path: 'logout' }]);
|
|
|
|
|
+ // const setMenu = [
|
|
|
|
|
+ // // { name: '修改密码', path: 'password' },
|
|
|
|
|
+ // // { name: '收货地址', path: 'addresss' },
|
|
|
|
|
+ // // // {name: '发票', path: 'setup-password'},
|
|
|
|
|
+ // // { name: '手机号码绑定/解绑', path: 'phone' },
|
|
|
|
|
+ // // { name: '关于我们', path: 'aboutUs' },
|
|
|
|
|
+ // { name: '白主题', path: ThemeEnum.light },
|
|
|
|
|
+ // { name: '黑主题', path: ThemeEnum.dark },
|
|
|
|
|
+ // { name: '退出', path: 'logout' },
|
|
|
|
|
+ // ];
|
|
|
|
|
+ initData(() => {
|
|
|
|
|
+ if (isOemByEnum(OemType.wrspot) || isOemByEnum(OemType.tian_jing_mai_dun)) {
|
|
|
|
|
+ const theme = [
|
|
|
|
|
+ { name: '白主题', path: ThemeEnum.light },
|
|
|
|
|
+ { name: '黑主题', path: ThemeEnum.dark },
|
|
|
|
|
+ ];
|
|
|
|
|
+ setMenu.value = [...theme, ...setMenu.value];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ const { openAction } = openModal('logout');
|
|
|
|
|
+ function chooseSetMenu(path: string) {
|
|
|
|
|
+ if (path === 'logout') {
|
|
|
|
|
+ logout();
|
|
|
|
|
+ APP.closeServer();
|
|
|
|
|
+ Router.replace('/login');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ changeTheme(path as ThemeEnum);
|
|
|
|
|
+ // openAction();
|
|
|
}
|
|
}
|
|
|
|
|
+ visible.value = false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return { visible, setMenu, chooseSetMenu };
|
|
|
|
|
|
|
+ return { visible, setMenu, chooseSetMenu };
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 搜索
|
|
// 搜索
|
|
|
const onSearch = () => {
|
|
const onSearch = () => {
|
|
|
- function search(value: string) {}
|
|
|
|
|
- return { search };
|
|
|
|
|
|
|
+ function search(value: string) { }
|
|
|
|
|
+ return { search };
|
|
|
};
|
|
};
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- components: {
|
|
|
|
|
- UserOutlined,
|
|
|
|
|
- Setting,
|
|
|
|
|
- Friend,
|
|
|
|
|
- SettingFilled,
|
|
|
|
|
- },
|
|
|
|
|
- props: {
|
|
|
|
|
- collapsed: {
|
|
|
|
|
- default: true,
|
|
|
|
|
- type: Boolean,
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- setup() {
|
|
|
|
|
- const { openAction: openNotice } = openModal('notice');
|
|
|
|
|
- const { getUnReadNoticeLength } = handleNotice();
|
|
|
|
|
- return {
|
|
|
|
|
- openNotice,
|
|
|
|
|
- getUserName,
|
|
|
|
|
- getUnReadNoticeLength,
|
|
|
|
|
- ...setFn(),
|
|
|
|
|
- ...onSearch(),
|
|
|
|
|
- isOemByEnum,
|
|
|
|
|
- OemType,
|
|
|
|
|
- getCompanyName,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ components: {
|
|
|
|
|
+ UserOutlined,
|
|
|
|
|
+ Setting,
|
|
|
|
|
+ Friend,
|
|
|
|
|
+ SettingFilled,
|
|
|
|
|
+ },
|
|
|
|
|
+ props: {
|
|
|
|
|
+ collapsed: {
|
|
|
|
|
+ default: true,
|
|
|
|
|
+ type: Boolean,
|
|
|
},
|
|
},
|
|
|
|
|
+ },
|
|
|
|
|
+ setup() {
|
|
|
|
|
+ const { openAction: openNotice } = openModal('notice');
|
|
|
|
|
+ const { getUnReadNoticeLength } = handleNotice();
|
|
|
|
|
+ return {
|
|
|
|
|
+ openNotice,
|
|
|
|
|
+ getUserName,
|
|
|
|
|
+ getUnReadNoticeLength,
|
|
|
|
|
+ ...setFn(),
|
|
|
|
|
+ ...onSearch(),
|
|
|
|
|
+ isOemByEnum,
|
|
|
|
|
+ OemType,
|
|
|
|
|
+ getCompanyName,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
.friendIcon {
|
|
.friendIcon {
|
|
|
- .icon {
|
|
|
|
|
- font-size: 20px;
|
|
|
|
|
- line-height: 32px;
|
|
|
|
|
- margin: 6px 5px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .icon {
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ margin: 6px 5px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|