From 6b7d54a60f36e89dc87892e67dec41caab070389 Mon Sep 17 00:00:00 2001
From: dytyqx <1342948614@qq.com>
Date: 星期三, 25 三月 2026 16:23:50 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/index/tab3.vue | 288 ++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 233 insertions(+), 55 deletions(-)
diff --git a/pages/index/tab3.vue b/pages/index/tab3.vue
index ed9c2dc..0f1f1d2 100644
--- a/pages/index/tab3.vue
+++ b/pages/index/tab3.vue
@@ -8,7 +8,16 @@
<view class="mains">
<view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData"
:key="index" @tap="toUrl(item)">
- <image :src="item.img" mode=""></image>
+ <template v-if="item.corner">
+ <uni-badge :text="item.cornerCount" style="z-index: 99 !important;" type="error" :max-num="99" size="normal"
+ absolute="rightTop"
+ :offset="[7, 7]">
+ <image :src="item.img" mode=""></image>
+ </uni-badge>
+ </template>
+ <template v-else>
+ <image :src="item.img" mode=""></image>
+ </template>
<view class="texts">
{{item.text}}
</view>
@@ -42,22 +51,23 @@
updateCount: 0,
menuListName: 'tab3',
canEdit: false,
+ initFinished: false,
serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
itemData: [{
+ img: '../../static/icon/icon8.png',
+ text: '妯″叿妗f鏌ヨ',
+ url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`,
+ id: 1,
+ hidden: false,
+ },
+ {
img: '../../static/icon/icon6.png',
text: '妯″叿鐘舵�佸垎鏋�',
tip: '鏌ョ湅璇︽儏',
url: '/pages/mujvzhuangtai/mujvzhuangtai',
- id: 1,
- hidden: false,
-
- },
- {
- img: '../../static/icon/icon8.png',
- text: '妯″叿妗f鏌ヨ',
- url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`,
id: 2,
hidden: false,
+
},
{
img: '../../static/icon/icon16.png',
@@ -66,11 +76,53 @@
id: 3,
hidden: false,
},
+ // {
+ // "img": "../../static/icon/icon13.png",
+ // "text": "妯″叿鏁呴殰鐧昏鍗�",
+ // "url": "/pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill?operationType=1",
+ // "id": 4,
+ // "hidden": false
+ // },
{
- "img": "../../static/icon/icon13.png",
- "text": "妯″叿鏁呴殰鐧昏鍗�",
- "url": "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1",
- "id": 4,
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧淇濆吇浠诲姟",
+ "url": "/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport",
+ "id": 24,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "妯″叿淇濆吇浠诲姟",
+ "url": "/pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport",
+ "id": 25,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧缁翠慨浠诲姟",
+ "url": "/pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport",
+ "id": 26,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "妯″叿缁翠慨浠诲姟",
+ "url": "/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport",
+ "id": 27,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧寰呯偣妫�浠诲姟",
+ "url": "/pages/MJGL/Sb_EquipDotCheckTaskReport/Sb_EquipDotCheckTaskReport",
+ "id": 29,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "妯″叿寰呯偣妫�浠诲姟",
+ "url": "/pages/MJGL/Sc_MouldDotCheckTaskReport/Sc_MouldDotCheckTaskReport",
+ "id": 30,
"hidden": false
},
{
@@ -83,7 +135,7 @@
{
"img": "../../static/icon/icon13.png",
"text": "妯″叿缁翠慨璁板綍鍗�",
- "url": "/pages/weixiujilu/mouldRepairRecordBill",
+ "url": "/pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill",
"id": 6,
"hidden": false
},
@@ -122,20 +174,20 @@
"id": 11,
"hidden": false
},
- {
- img: '../../static/icon/icon8.png',
- text: '涓婃ā鍗�',
- url: `/pages/MJGL/shangmudan/MouldUpperBill`,
- id: 12,
- hidden: false,
- },
- {
- img: '../../static/icon/icon8.png',
- text: '涓嬫ā鍗�',
- url: `/pages/MJGL/xiamodan/MouldLowerBill`,
- id: 13,
- hidden: false,
- },
+ // {
+ // img: '../../static/icon/icon8.png',
+ // text: '涓婃ā鍗�',
+ // url: `/pages/MJGL/shangmudan/MouldUpperBill`,
+ // id: 12,
+ // hidden: false,
+ // },
+ // {
+ // img: '../../static/icon/icon8.png',
+ // text: '涓嬫ā鍗�',
+ // url: `/pages/MJGL/xiamodan/MouldLowerBill`,
+ // id: 13,
+ // hidden: false,
+ // },
{
"img": "../../static/icon/icon8.png",
"text": "妯″叿鎶ュ簾鍑哄簱鍗�",
@@ -167,13 +219,13 @@
id: 17,
hidden: true,
},
- {
- "img": "../../static/icon/icon8.png",
- "text": "璁惧鐐规璁板綍鍗�",
- "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill",
- "id": 18,
- "hidden": false
- },
+ // {
+ // "img": "../../static/icon/icon8.png",
+ // "text": "璁惧鐐规璁板綍鍗�",
+ // "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill",
+ // "id": 18,
+ // "hidden": false
+ // },
{
"img": "../../static/icon/icon8.png",
"text": "璁惧淇濆吇璁板綍鍗�",
@@ -181,6 +233,13 @@
"id": 19,
"hidden": false
},
+ // {
+ // "img": "../../static/icon/icon8.png",
+ // "text": "璁惧鏁呴殰鐧昏鍗�",
+ // "url": "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill?operationType=1",
+ // "id": 20,
+ // "hidden": false
+ // },
{
"img": "../../static/icon/icon8.png",
"text": "璁惧缁翠慨娲惧伐鍗�",
@@ -190,44 +249,99 @@
},
{
"img": "../../static/icon/icon8.png",
+ "text": "璁惧缁翠慨璁板綍鍗�",
+ "url": "/pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBill",
+ "id": 22,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
"text": "璁惧缁翠慨楠屾敹鍗�",
"url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill",
- "id": 23,
- "hidden": false
- },
- {
- "img": "../../static/icon/icon8.png",
- "text": "璁惧淇濆吇浠诲姟",
- "url": "/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport",
- "id": 24,
+ "id": 28,
"hidden": false
},
{
"img": "../../static/icon/icon8.png",
- "text": "妯″叿淇濆吇浠诲姟",
- "url": "/pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport",
- "id": 25,
+ "text": "璁惧鏁呴殰鐧昏璺熻釜",
+ "url": "/pages/MJGL/Sb_EquipRepairCheckTaskReport/Sb_EquipRepairCheckTaskReport",
+ "id": 31,
"hidden": false
},
{
"img": "../../static/icon/icon8.png",
- "text": "璁惧缁翠慨浠诲姟",
- "url": "/pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport",
- "id": 26,
+ "text": "妯″叿鏁呴殰鐧昏璺熻釜",
+ "url": "/pages/MJGL/Sc_MouldRepairCheckTaskReport/Sc_MouldRepairCheckTaskReport",
+ "id": 32,
"hidden": false
},
{
"img": "../../static/icon/icon8.png",
- "text": "妯″叿缁翠慨浠诲姟",
- "url": "/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport",
- "id": 27,
+ "text": "寰呬笂妯℃煡璇�",
+ "url": "/pages/MJGL/Sc_MouldUpperAwaitQuery/Sc_MouldUpperAwaitQuery",
+ "id": 33,
"hidden": false
},
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "寰呭紑宸ユ煡璇�",
+ "url": "/pages/Cj_StationInBillAwaitQuery/Cj_StationInBillAwaitQuery",
+ "id": 34,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "寰呬笅妯℃煡璇�",
+ "url": "/pages/MJGL/Sc_MouldLowerBillAwaitQuery/Sc_MouldLowerBillAwaitQuery",
+ "id": 35,
+ "hidden": false
+ }
]
}
},
onLoad() {
this.getHiddenItem()
+ },
+ async onShow() {
+ if (this.initFinished) {
+ let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName)
+ if (MessageIdentifier.code == 0) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: MessageIdentifier.msg
+ })
+
+ return
+ }
+ this.itemData.forEach((e, index) => {
+ if (MessageIdentifier.data[e.text] != undefined) {
+ this.itemData[index]["corner"] = true
+ this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text]
+ }
+ })
+
+ this.$forceUpdate()
+ }
+ },
+ async onReady() {
+ let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName)
+ if (MessageIdentifier.code == 0) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: MessageIdentifier.msg
+ })
+
+ return
+ }
+
+ this.itemData.forEach((e, index) => {
+ if (MessageIdentifier.data[e.text] != undefined) {
+ this.itemData[index]["corner"] = true
+ this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text]
+ }
+ })
+
+ this.$forceUpdate()
},
methods: {
judgeHidden() {
@@ -237,10 +351,74 @@
let data = await getMenuList({
menuName: this.menuListName
})
- Array.from(data).forEach(e => {
- this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"])
- this.itemData[e["HIndex"]].id = e["HEntryID"]; //id涓�0寮哄埗闅愯棌
+
+ Array.from(data).forEach((e, index) => {
+ if (index < this.itemData.length) {
+ this.itemData[e["HIndex"]]["hidden"] = !CommonUtils.stringToBoolean(e[
+ "HShowMode"] || false)
+ this.itemData[e["HIndex"]].id = e["HEntryID"]; //id涓�0寮哄埗闅愯棌
+ }
})
+
+ let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName)
+ if (MessageIdentifier.code == 0) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: MessageIdentifier.msg
+ })
+
+ return
+ }
+
+ Array.from(data).forEach((e, index) => {
+ if (index < this.itemData.length) {
+ if (MessageIdentifier.data[this.itemData[e["HIndex"]].text]) {
+ // 浣跨敤$set 娣诲姞鍝嶅簲寮忔暟鎹�
+ this.$set(this.itemData[e["HIndex"]], "corner", true)
+ this.$set(this.itemData[e["HIndex"]], "cornerCount", MessageIdentifier.data[this.itemData[e["HIndex"]].text])
+
+ }
+ }
+ })
+ this.initFinished = true
+ this.$forceUpdate()
+ },
+ // 鏍规嵁妯″潡鑾峰彇鏈鐞嗘秷鎭潯鏁�
+ async getMessageIdentifierCount(menuListName) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Web/getMessageIdentified',
+ data: {
+ user: getUserInfo()["HEmpName"],
+ moduleName: menuListName
+ }
+ })
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ let retVal = Array.from(data).reduce((acc, item) => {
+ acc[item['moduleName']] = item.count
+ return acc
+ }, {})
+
+ return {
+ code: 1,
+ msg: Message,
+ data: retVal
+ }
+ } else {
+ return {
+ code: 0,
+ msg: Message,
+ data: []
+ }
+ }
+ } catch (err) {
+
+ }
},
switchHidden(index) {
this.updateCount++;
--
Gitblit v1.9.1