From 2f5159e93f42609d22d0c565ad730560ee5ee21f Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期五, 03 一月 2025 16:39:16 +0800 Subject: [PATCH] 更新PDA --- 代码管理/淮安PDA/pages/index/index.vue | 46 +++++++++++++++++++++++++++++----------------- 1 files changed, 29 insertions(+), 17 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" index b48b3ba..b562ab4 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" @@ -2,12 +2,14 @@ <!-- <u-card :title="title" > --> <view class="" slot="body"> <!-- <view v-for="(item,index) in tree" :key="item.id"> --> - <u-grid :col="3"> - <u-grid-item @tap="clickCoupon(item.url)" v-for="(item) in tree" :key="item.id"> - <u-icon name="coupon" :size="50"></u-icon> - <view class="grid-text">{{item.name}}</view> - </u-grid-item> - </u-grid> + <u-grid :col="2"> + <u-grid-item @tap="clickCoupon(item.url,item.menuId,item.description,item.menuName)" v-for="(item) in tree" + :key="item.menuId"> + <u-icon :name="item.icon" custom-prefix="custom-icon" size="50" + color="#888888"></u-icon> + <view class="grid-text">{{item.menuName}}</view> + </u-grid-item> + </u-grid> <!-- </view> --> <u-toast ref="uToast" /> </view> @@ -16,14 +18,16 @@ </template> <script> - import { config } from '../../common/config.js' + import { + config + } from '../../common/config.js' export default { data() { return { // title: '鎿嶄綔鍔熻兘' datas: [], tree: [], - version:"" + version: "" } }, onShow() { @@ -42,7 +46,7 @@ this.getCurrentTree(); }, mounted() { - + }, methods: { AndroidCheckUpdate: function() { @@ -53,14 +57,15 @@ data: {}, success: res => { if (res.data.data) { - + uni.showToast({ title: '鏈夋柊鐨勭増鏈彂甯冿紝妫�娴嬪埌鎮ㄧ洰鍓嶄负Wifi杩炴帴锛岀▼搴忓凡鍚姩鑷姩鏇存柊銆傛柊鐗堟湰涓嬭浇瀹屾垚鍚庡皢鑷姩寮瑰嚭瀹夎绋嬪簭銆�', mask: false, duration: 5000, icon: "none" }); - var dtask = plus.downloader.createDownload("http://10.1.211.101:9004/api/PDA/DownLoadApp", {}, + var dtask = plus.downloader.createDownload( + "http://10.1.211.101:9004/api/PDA/DownLoadApp", {}, function(d, status) { // 涓嬭浇瀹屾垚 if (status == 200) { @@ -89,9 +94,9 @@ complete: () => {} }); }, - getCurrentTree() { - this.$u.post('/api/Sys_Menu/getTreeMenu', {}).then(result => { - this.tree = result; + getCurrentTree(ParentId) { + this.$u.post('/api/Sys_Menu/GetTreeMenuPDAStash?ParentId=' + ParentId, {}).then(result => { + this.tree = result; }) }, getTree(id, data, isRootId) { @@ -111,10 +116,17 @@ // return true; return this.datas.find(x => x.text == text); }, - clickCoupon(url) { + clickCoupon(url, menuid, warehouseid, menuname) { // console.log("clickCoupon") if (this.hasLogin()) { - this.$u.route(url) + this.$u.route({ + url: url, + params: { + menuId: menuid, + warehouseId: warehouseid, + menuName: menuname + } + }) } else { this.$t.message.loading('鐧诲綍澶辨晥璇烽噸鏂扮櫥褰�') uni.reLaunch({ @@ -153,4 +165,4 @@ margin-top: 4rpx; color: $u-type-info; } -</style> +</style> \ No newline at end of file -- Gitblit v1.9.3