{{item.menuName}}
-
+
@@ -45,7 +45,29 @@
+
+
+
+
+
+ {{msgUnreadNum}}
+
+
+
+
+
123
+
@@ -92,7 +114,7 @@ export default {
path:{
type:String,
default:''
- }
+ },
},
data() {
return {
@@ -105,6 +127,9 @@ export default {
};
},
computed: {
+ msgUnreadNum(){
+ return this.$store.state.msgUnreadNum
+ },
nameFlag(){
return this.$store.state.nameFlag
},
@@ -128,20 +153,27 @@ export default {
...mapState({
fontMenu (state) {
let temp = []
- // state.menu.forEach(e => {
- // if(e.dict_group_id=='2cb4f767-fad7-44f2-afa3-f055e15dd2b6'){//font
- // temp.push(e)
- // }
- // });
+ state.menu.forEach(e => {
+ if(e.dict_group_id=='2cb4f767-fad7-44f2-afa3-f055e15dd2b6'){//font
+ temp.push(e)
+ }
+ });
return temp
},
managerMenu(state){
let temp = []
- // state.menu.forEach(e => {
- // if(e.dict_group_id=='64c156e0-bfff-4bfc-a63a-56effe130a25'){//system
- // temp.push(e)
- // }
- // });
+ state.menu.forEach(e => {
+ if(e.dict_group_id=='64c156e0-bfff-4bfc-a63a-56effe130a25'){//system
+
+ // 暂时处理运营管控中心-调用日志,后期规划位置后修改
+ if (e.menuName !== '运营看板') {
+ temp.push(e)
+ }
+
+
+ // temp.push(e)
+ }
+ });
return temp
},
systemMenu(state){
@@ -168,13 +200,13 @@ export default {
// },
},
methods: {
+ openMsg() {
+ this.$emit('openMsg',true)
+ },
...mapMutations(["setCartNum"]),
navAction(path) {
this.$router.push(path);
},
- gotoPage(){
- window.open('/apaas/portal/ui/#/','_blank')
- },
changezz(item){
this.$trace.setOptionValue('appID',item.value)
},
@@ -214,7 +246,7 @@ export default {
//是否有子路由,有则寻找子路由的第一个进行跳转,无则直接进行跳转
//使用childMenuAction是模拟template中,子路径点击跳转使用childMenuAction,
//防止出现层级错误的问题
- if(parent.children&&parent.children.length){
+ if(parent.children&&parent.children.length&&parent.menuType!==1){
this.childMenuAction(parent.children[0],parent)
}else{
this.pathToUrl(n,parent)
@@ -476,9 +508,11 @@ export default {
.font-menu{
height: 100%;
+ display: flex;
}
.manager-menu{
height: 100%;
+ display: flex;
}
.nav-item {
@@ -646,16 +680,32 @@ export default {
height: 100%;
padding-left: 32px;
position: inherit;
+ display: flex;
+ align-items: center;
+ column-gap: 35px;
- // &::before{
- // content:'';
- // width: 1px;
- // height: 24px;
- // background-color: #5c6da4;
- // position: absolute;
- // left: 0;
- // top: 16px;
- // }
+ &::before{
+ content:'';
+ width: 1px;
+ height: 24px;
+ background-color: #5c6da4;
+ position: absolute;
+ left: 0;
+ top: 16px;
+ }
+
+ .message{
+ height: 16px;
+ line-height: 16px;
+ background-color: #d14731;
+ border-radius: 8px;
+ padding: 0 6px;
+ font-size: 12px;
+ color: #ffffff;
+ position: absolute;
+ top: -8px;
+ left: 12px;
+ }
}
// 用户中心
.user-center {
diff --git a/src/main.js b/src/main.js
index cd14cab776e307cce20c081aced5b8c83dcb82f3..3ba5fdd8795979d3b783feef0414e115ea0b72dd 100644
--- a/src/main.js
+++ b/src/main.js
@@ -9,8 +9,8 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import bgui from "@/bg-ui";
import "@/bg-ui/index.scss";
+import msgSdk from './msg-sdk/index.js';
-console.log(bgui,"-=-=-=-=-=-=-=-=-=")
import App from './App.vue'
import router from './router'
@@ -30,6 +30,24 @@ import axios from './request/http.js'
const createVue = createApp(App)
createVue.use(ElementPlus, { locale });
+function getMsgAppid() {
+ axios.get(`/apaas/system/v5/message/account`).then(res => {
+ if (res.data.code == 200) {
+ createVue.use(msgSdk, {
+ requestUrl: 'https://msg.wodcloud.com', // 请求地址
+ appID: decodeURIComponent(escape(window.atob(res.data.data.app_id))), // 应用id
+ secretKey: decodeURIComponent(escape(window.atob(res.data.data.secret_key))), // 应用密钥
+ userId: '',
+ userType: '',
+ roleId: '',
+ organization: '',
+ })
+ }
+ })
+}
+
+getMsgAppid()
+
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
createVue.component(key, component)
}
diff --git a/src/msg-sdk/img/ic_tips.png b/src/msg-sdk/img/ic_tips.png
new file mode 100644
index 0000000000000000000000000000000000000000..0d0325bdd062f6f8ed162e6da1896c08385d0216
Binary files /dev/null and b/src/msg-sdk/img/ic_tips.png differ
diff --git a/src/msg-sdk/img/ic_yidu.png b/src/msg-sdk/img/ic_yidu.png
new file mode 100644
index 0000000000000000000000000000000000000000..f67f95cedee5b567f83c83d098fe0b2997833024
Binary files /dev/null and b/src/msg-sdk/img/ic_yidu.png differ
diff --git a/src/msg-sdk/index.js b/src/msg-sdk/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..216a0659d6319fe4fdd6f39ed0b46d2d7016ef34
--- /dev/null
+++ b/src/msg-sdk/index.js
@@ -0,0 +1,91 @@
+import msg from './lib/msg.vue'
+
+let option = null
+
+const setAppID = (appID)=>{
+ option.appID = appID
+}
+
+const setSecretKey = (secretKey)=>{
+ option.secretKey = secretKey
+}
+
+const setRequestUrl = (requestUrl)=>{
+ option.requestUrl = requestUrl
+}
+
+const setOptionValue = (opt,val)=>{
+ option[opt] = val
+}
+
+const methods = {
+ setAppID,
+ setSecretKey,
+ setRequestUrl,
+ setOptionValue,
+}
+
+const init = (options = {}) => {
+ const _options = {
+ requestUrl: '', // 请求地址
+ appID: '', // 应用id
+ secretKey: '', // 应用密钥
+ userId:'',
+ userType:'',
+ roleId:'',
+ organization:'',
+ };
+
+ // 将传过来的参数转换
+ transitionOptions(_options, options);
+
+ option = _options
+}
+
+const transitionOptions = (_options, options) => {
+ const {
+ requestUrl,
+ appID,
+ secretKey,
+ userId,
+ userType,
+ roleId,
+ organization,
+ } = options;
+
+ if (!requestUrl) throw Error('请传入requestUrl参数');
+ if (!appID) throw Error('请传入appID参数');
+ // if (!secretKey) throw Error('secretKey');
+
+ _options.requestUrl = requestUrl;
+ _options.appID = appID;
+ _options.secretKey = secretKey;
+ _options.userId = userId;
+ _options.userType = userType;
+ _options.roleId = roleId;
+ _options.organization = organization;
+
+}
+
+const install = (Vue, options = {}) => {
+ console.log("执行以下")
+ init(options);
+ if (Vue.prototype) {
+ Vue.prototype.$trace = { ...methods,option };
+ } else {
+ Vue.config.globalProperties.$trace = { ...methods,option };
+ }
+
+ Vue.component('msg', msg);
+}
+
+if (typeof window !== "undefined" && window.Vue) {
+ install(window.Vue);
+}
+
+export default {
+ install,
+ init,
+ ...methods
+};
+export { install, init, methods };
\ No newline at end of file
diff --git a/src/msg-sdk/lib/detail-table2.vue b/src/msg-sdk/lib/detail-table2.vue
new file mode 100644
index 0000000000000000000000000000000000000000..19757d2c791f8bf66616ba116ee5ffe58b75878b
--- /dev/null
+++ b/src/msg-sdk/lib/detail-table2.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
diff --git a/src/msg-sdk/lib/msg.vue b/src/msg-sdk/lib/msg.vue
new file mode 100644
index 0000000000000000000000000000000000000000..a3f3eb47192334c07b004960964a587308e4c7b5
--- /dev/null
+++ b/src/msg-sdk/lib/msg.vue
@@ -0,0 +1,664 @@
+
+
+
+
+
+
+ {{item.label}}
+ {{item.value}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/msg-sdk/lib/tip.vue b/src/msg-sdk/lib/tip.vue
new file mode 100644
index 0000000000000000000000000000000000000000..dbe1b399e0f8de9e9dc43b5befe1bf7f852b4e79
--- /dev/null
+++ b/src/msg-sdk/lib/tip.vue
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+ {{item.desc}}
+
+
+
+
+
+
+
+
+ {{item.fileName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图片链接失效,无法加载
+
+
+
+
+
+
+
+ 消息盒子
+
+
+
+
+
+
+
+ 全部已读
+
+
+
+ 全部
+
+
+
+
+ {{unReadNum}}
+ 未读
+
+
+
+
+
+ {{item.msgTitle}}
+{{megDeal(item)}}
++ {{item.createTime}} + {{item.systemName}} + 查看详情 +
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/store/index.js b/src/store/index.js
index 33ac3d242a84407f3c53225ac77102a68c7d0118..7aa2b53e4b0b7ad582f330e6457a890848619465 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -12,6 +12,7 @@ const store = createStore({
menuObj:{},
treeFlag:false,
registerValid:false,
+ msgUnreadNum: 0
},
getters: {
count(state) {
@@ -45,7 +46,10 @@ const store = createStore({
},
setRegisterValid(state,registerValid){
state.registerValid = registerValid
- }
+ },
+ setUnreadNum(state, num) {
+ state.msgUnreadNum = num
+ },
},
actions: {}
});
diff --git a/yarn.lock b/yarn.lock
index 90f2d699c67f1d46db954c96e49a12c8d7a2833c..fe92f78dbd09a71ec52c48d0145109cd273466b4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -470,6 +470,11 @@ anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"
+argparse@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
+ integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
+
async-validator@^4.2.5:
version "4.2.5"
resolved "https://registry.npmmirror.com/async-validator/-/async-validator-4.2.5.tgz"
@@ -599,6 +604,11 @@ element-plus@^2.2.19:
memoize-one "^6.0.0"
normalize-wheel-es "^1.2.0"
+entities@~3.0.1:
+ version "3.0.1"
+ resolved "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4"
+ integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==
+
es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@~0.10.14:
version "0.10.62"
resolved "https://registry.npmmirror.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5"
@@ -798,6 +808,11 @@ function-bind@^1.1.1:
resolved "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+github-markdown-css@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.npmmirror.com/github-markdown-css/-/github-markdown-css-5.1.0.tgz#a96281cd90a8969e3c13b9d3ca6a733a523a00a6"
+ integrity sha512-QLtORwHHtUHhPMHu7i4GKfP6Vx5CWZn+NKQXe+cBhslY1HEt0CTEkP4d/vSROKV0iIJSpl4UtlQ16AD8C6lMug==
+
glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz"
@@ -895,6 +910,13 @@ is-url@^1.2.4:
resolved "https://registry.npmmirror.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==
+linkify-it@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.npmmirror.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec"
+ integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==
+ dependencies:
+ uc.micro "^1.0.1"
+
lodash-es@^4.17.21:
version "4.17.21"
resolved "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz"
@@ -952,6 +974,22 @@ magic-string@^0.25.7:
dependencies:
sourcemap-codec "^1.4.8"
+markdown-it@^13.0.1:
+ version "13.0.1"
+ resolved "https://registry.npmmirror.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430"
+ integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==
+ dependencies:
+ argparse "^2.0.1"
+ entities "~3.0.1"
+ linkify-it "^4.0.1"
+ mdurl "^1.0.1"
+ uc.micro "^1.0.5"
+
+mdurl@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
+ integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
+
memoize-one@^6.0.0:
version "6.0.0"
resolved "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz"
@@ -1162,6 +1200,11 @@ type@^2.5.0:
resolved "https://registry.npmmirror.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0"
integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==
+uc.micro@^1.0.1, uc.micro@^1.0.5:
+ version "1.0.6"
+ resolved "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
+ integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
+
utrie@^1.0.2:
version "1.0.2"
resolved "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz#d42fe44de9bc0119c25de7f564a6ed1b2c87a645"
+
+ {{title}}
+
+
+
+
+ {{text}}
+
+ 查看详情
+{{time}} {{source}}
+