|
@@ -1,512 +1,38 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <!-- <back :title="titlename"></back> -->
|
|
|
- <div class="content">
|
|
|
- <div class="sm">
|
|
|
- <van-search v-model="value" @search="onSearch" placeholder="点击搜索单号" />
|
|
|
- <img @click="wxScanCode()" src="../assets/user/u4.png" alt="">
|
|
|
- </div>
|
|
|
- <!-- table切换 -->
|
|
|
- <!-- <div class="tab">
|
|
|
- <div>
|
|
|
- <p @click="tab(1)" :class="[index == 1 ? 'active' : '']">收件</p>
|
|
|
- <p @click="tab(2)" :class="[index == 2 ? 'active' : '']">寄件</p>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
- <!-- 显示 -->
|
|
|
-
|
|
|
- <div id="aaaa" style="width: 100%;height: 200px;"></div>
|
|
|
-
|
|
|
- <!-- 图标 -->
|
|
|
- <div class="icon">
|
|
|
- <div class="icon-box">
|
|
|
- <router-link to="Sjdj">
|
|
|
- <div style="">
|
|
|
- <img src="../assets/user/u32.png" alt="">
|
|
|
- </div>
|
|
|
- <p>快件入库</p>
|
|
|
- </router-link>
|
|
|
- </div>
|
|
|
- <div class="icon-box">
|
|
|
- <router-link to="Pjpc">
|
|
|
- <div style="">
|
|
|
- <img src="../assets/user/u35.png" alt="">
|
|
|
- </div>
|
|
|
- <p>快件出库</p>
|
|
|
- </router-link>
|
|
|
- </div>
|
|
|
- <div class="icon-box">
|
|
|
- <router-link to="Box">
|
|
|
- <div style="">
|
|
|
- <img src="../assets/user/u38.png" alt="">
|
|
|
- </div>
|
|
|
- <p>派件查询</p>
|
|
|
- </router-link>
|
|
|
- </div>
|
|
|
- <div class="icon-box">
|
|
|
- <router-link to="Kjsearch">
|
|
|
- <div style="">
|
|
|
- <img src="../assets/user/u41.png" alt="">
|
|
|
- </div>
|
|
|
- <p>派件签收</p>
|
|
|
- </router-link>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <!-- <div class="tab">
|
|
|
- <div>
|
|
|
- <p @click="tab(1)" :class="[index == 1 ? 'active' : '']"><router-link to="/">首页</router-link></p>
|
|
|
- <p @click="tab(2)" :class="[index == 2 ? 'active' : '']">我的</p>
|
|
|
- <P @click="tab(2)" :class="[index == 2 ? 'active' : '']"><router-link to="my">我的</router-link></P>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
- <van-tabbar v-model="active" active-color="#1f1f1f" inactive-color="inactive-color"
|
|
|
- style="background-color: #aaaaaa; ">
|
|
|
- <van-tabbar-item>首页</van-tabbar-item>
|
|
|
- <van-tabbar-item>我的</van-tabbar-item>
|
|
|
- </van-tabbar>
|
|
|
+ <van-tabbar v-model="active" active-color="#1f1f1f" inactive-color="inactive-color"
|
|
|
+ style="background-color: #aaaaaa; ">
|
|
|
+ <van-tabbar-item>首页</van-tabbar-item>
|
|
|
+ <van-tabbar-item>我的</van-tabbar-item>
|
|
|
+ </van-tabbar>
|
|
|
+
|
|
|
+ <div v-if="this.active === 0">
|
|
|
+ <HomePage></HomePage>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <My></My>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- Toast,
|
|
|
- Dialog
|
|
|
-} from 'vant'
|
|
|
-// vue 专用版本JS-SDK
|
|
|
-import wx from "weixin-jsapi";
|
|
|
+
|
|
|
+import HomePage from './components/HomePage.vue'
|
|
|
+import My from './components/My.vue'
|
|
|
export default {
|
|
|
+ name: 'email',
|
|
|
+ components: {
|
|
|
+ HomePage,
|
|
|
+ My
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
active: 0,
|
|
|
- titlename: "邮件收发室",
|
|
|
- value: "",
|
|
|
- index: 1,
|
|
|
- total: 0,
|
|
|
- title: "今日累计收件",
|
|
|
- data: [{
|
|
|
- value: 0,
|
|
|
- name: '签收成功'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 0,
|
|
|
- name: '待签收'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 0,
|
|
|
- name: '问题件'
|
|
|
- },
|
|
|
- ],
|
|
|
- expressMap: {}, //收件
|
|
|
- mailMap: {} //寄件
|
|
|
}
|
|
|
},
|
|
|
- created: function () {
|
|
|
- //this.getOpenid("");
|
|
|
- this.isLogin();
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- // 页面加载完成唤醒微信扫一扫
|
|
|
- //本地 注释 服务器 放开
|
|
|
- this.wxScanCode();
|
|
|
-
|
|
|
- let myChart = this.$echarts.init(document.getElementById('aaaa'))
|
|
|
- var option = {
|
|
|
- tooltip: {
|
|
|
- trigger: 'item'
|
|
|
- },
|
|
|
- legend: {
|
|
|
- top: '60%',
|
|
|
- right: '5%',
|
|
|
- orient: 'vertical',
|
|
|
- icon: 'circle',
|
|
|
- textStyle:{
|
|
|
- fontSize: 10,
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- series: [{
|
|
|
- name: '数据',
|
|
|
- type: 'pie',
|
|
|
- center: ["50%", "30%"],
|
|
|
- radius: ['40%', '70%'],
|
|
|
- avoidLabelOverlap: false,
|
|
|
- label: {
|
|
|
- normal: {
|
|
|
- show: true,
|
|
|
- position: 'center',
|
|
|
- color: '#4c4a4a',
|
|
|
- formatter: '{active|' + this.title + '}' + '\n\r' + '{total|' + this.total +
|
|
|
- '}',
|
|
|
- rich: {
|
|
|
- total: {
|
|
|
- fontSize: 12,
|
|
|
- fontWeight: 'bold',
|
|
|
- color: '#454c5c'
|
|
|
- },
|
|
|
- active: {
|
|
|
- fontSize: 10,
|
|
|
- color: '#6c7a89',
|
|
|
- lineHeight: 30,
|
|
|
- },
|
|
|
- }
|
|
|
- },
|
|
|
- emphasis: { //中间文字显示
|
|
|
- show: true,
|
|
|
- }
|
|
|
- },
|
|
|
- color: ['#07daf9', '#f98407', '#f9df07', '#079bf9'],
|
|
|
- // emphasis: {
|
|
|
- // label: {
|
|
|
- // show: false,
|
|
|
- // fontSize: '40',
|
|
|
- // fontWeight: 'bold'
|
|
|
- // }
|
|
|
- // },
|
|
|
- labelLine: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- data: [{
|
|
|
- value: 123,
|
|
|
- name: '签收成功'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 444,
|
|
|
- name: '待签收'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 222,
|
|
|
- name: '问题件'
|
|
|
- },
|
|
|
- ]
|
|
|
- }]
|
|
|
- }
|
|
|
- option = {
|
|
|
- tooltip: {
|
|
|
- trigger: 'item'
|
|
|
- },
|
|
|
- legend: {
|
|
|
- top: '5%',
|
|
|
- left: 'center'
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: 'Access From',
|
|
|
- type: 'pie',
|
|
|
- radius: ['40%', '70%'],
|
|
|
- avoidLabelOverlap: false,
|
|
|
- itemStyle: {
|
|
|
- borderRadius: 10,
|
|
|
- borderColor: '#fff',
|
|
|
- borderWidth: 2
|
|
|
- },
|
|
|
- label: {
|
|
|
- show: false,
|
|
|
- position: 'center'
|
|
|
- },
|
|
|
- emphasis: {
|
|
|
- label: {
|
|
|
- show: true,
|
|
|
- fontSize: 40,
|
|
|
- fontWeight: 'bold'
|
|
|
- }
|
|
|
- },
|
|
|
- labelLine: {
|
|
|
- show: false
|
|
|
- },
|
|
|
- data: [
|
|
|
- { value: 1048, name: 'Search Engine' },
|
|
|
- { value: 735, name: 'Direct' },
|
|
|
- { value: 580, name: 'Email' },
|
|
|
- { value: 484, name: 'Union Ads' },
|
|
|
- { value: 300, name: 'Video Ads' }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]
|
|
|
-}
|
|
|
- myChart.setOption(option)
|
|
|
-
|
|
|
- },
|
|
|
- methods: {//encodeURI(window.location.href.split('#')[0])
|
|
|
- wxScanCode() {
|
|
|
- let purl = /(Android)/i.test(navigator.userAgent) ? window.location.href.split('#')[0] : encodeURI(window.location.href.split('#')[0]);
|
|
|
- let dataForm = {
|
|
|
- 'url': purl
|
|
|
- }
|
|
|
- //alert(url)
|
|
|
- this.$http.post(this.$store.state.host + "/weixin/getWxConfig", {
|
|
|
- url: window.location.href.split('#')[0]
|
|
|
- }, {
|
|
|
- emulateJSON: true
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- //发送成功
|
|
|
- var timestamp = res.body.wxConfig.timestamp;
|
|
|
- var noncestr = res.body.wxConfig.nonceStr;
|
|
|
- var signature = res.body.wxConfig.signature;
|
|
|
- var appId = res.body.wxConfig.appId;
|
|
|
- wx.config({
|
|
|
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
- // debug : true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
- appId: appId, // 必填,公众号的唯一标识
|
|
|
- timestamp: timestamp, // 必填,生成签名的时间戳
|
|
|
- nonceStr: noncestr, // 必填,生成签名的随机串
|
|
|
- signature: signature, // 必填,签名,见附录1
|
|
|
- jsApiList: [
|
|
|
- "scanQRCode",
|
|
|
- ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
|
|
- });
|
|
|
- wx.ready(() => {
|
|
|
- wx.scanQRCode({
|
|
|
- needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
|
|
|
- scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
|
|
|
- success: (res) => {
|
|
|
- //alert(res)
|
|
|
- var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
|
|
|
- if (result.indexOf(",") != -1) {
|
|
|
- let result1 = res.resultStr.split(",");
|
|
|
- result = result1[result1.length - 1];
|
|
|
- }
|
|
|
- this.onSearch(result)
|
|
|
- },
|
|
|
- error: function (res) {
|
|
|
- console.log(res);
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- });
|
|
|
- }, res => {
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- sys() {
|
|
|
-
|
|
|
- },
|
|
|
- //打印面单
|
|
|
- print() {
|
|
|
- Toast('该功能正在开发中,敬请期待!');
|
|
|
- },
|
|
|
- //单号搜索
|
|
|
- onSearch(val) {
|
|
|
- this.$router.push({
|
|
|
- path: '/Sysearch',
|
|
|
- query: {
|
|
|
- expressNo: val,
|
|
|
- searchType: "1" //1.搜索全部 2.搜索快件 3.搜索寄件
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //后端获取数据
|
|
|
- getData() {
|
|
|
- Toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- });
|
|
|
-
|
|
|
- this.$http.post(this.$store.state.host + "/solic/solicHomePage.do", {
|
|
|
- mailRoomId: localStorage.getItem('roomId')
|
|
|
- }, {
|
|
|
- emulateJSON: true
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- //发送成功
|
|
|
- if (res.body.msg == 'success') {
|
|
|
- this.expressMap = res.body.expressMap
|
|
|
- this.data[0].value = this.expressMap.successNum
|
|
|
- this.data[1].value = this.expressMap.waitNum
|
|
|
- this.data[2].value = this.expressMap.problemNum
|
|
|
- this.mailMap = res.body.mailMap
|
|
|
- console.log(this.mailMap, '=======================mailMap')
|
|
|
- console.log(this.expressMap, '=======================expressMap')
|
|
|
- //this.echart1(this.data)
|
|
|
- }
|
|
|
- }, res => {
|
|
|
- //发送失败
|
|
|
- Toast("网络错误!")
|
|
|
- })
|
|
|
- Toast.clear()
|
|
|
- },
|
|
|
- tab(obj) {
|
|
|
- this.getData()
|
|
|
- this.index = obj
|
|
|
- // if (this.index == 1) {
|
|
|
- // this.title = "今日累计收件"
|
|
|
- // this.total = this.expressMap.receiveNum
|
|
|
- // this.data = [{
|
|
|
- // value: this.expressMap.successNum,
|
|
|
- // name: '签收成功'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // value: this.expressMap.waitNum,
|
|
|
- // name: '待签收'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // value: this.expressMap.problemNum,
|
|
|
- // name: '问题件'
|
|
|
- // },
|
|
|
- // ]
|
|
|
- // this.echart1(this.data)
|
|
|
- // }
|
|
|
- // if (this.index == 2) {
|
|
|
- // this.title = "今日累计下单"
|
|
|
- // this.total = this.mailMap.sendNum
|
|
|
- // //alert(this.mailMap.waitLsNum)
|
|
|
- // this.data = [{
|
|
|
- // value: this.mailMap.succesLsNum,
|
|
|
- // name: '揽收成功'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // value: this.mailMap.waitLsNum,
|
|
|
- // name: '待揽收'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // value: this.mailMap.alreadyLsNum,
|
|
|
- // name: '已寄出'
|
|
|
- // },
|
|
|
- // {
|
|
|
- // value: this.mailMap.problemLsNum,
|
|
|
- // name: '问题件'
|
|
|
- // },
|
|
|
- // ]
|
|
|
- // this.echart1(this.data)
|
|
|
- // }
|
|
|
- },
|
|
|
- echart1(obj) {
|
|
|
- console.log("图表数据:" + JSON.stringify(obj))
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
-.content {
|
|
|
- padding: 0.25rem .37rem;
|
|
|
-
|
|
|
- .sm {
|
|
|
- display: flex;
|
|
|
- margin-bottom: .2rem;
|
|
|
- justify-content: space-between;
|
|
|
-
|
|
|
- /deep/.van-search {
|
|
|
- width: 100%;
|
|
|
- height: .76rem;
|
|
|
- border-radius: 25px;
|
|
|
- overflow: hidden;
|
|
|
- padding: 0rem;
|
|
|
- background-color: white;
|
|
|
-
|
|
|
- .van-search__content {
|
|
|
- background-color: white;
|
|
|
- }
|
|
|
-
|
|
|
- input {
|
|
|
- background-color: white;
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- img {
|
|
|
- width: .4rem;
|
|
|
- height: .4rem;
|
|
|
- position: relative;
|
|
|
- top: .18rem;
|
|
|
- margin-left: .1rem;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .tab {
|
|
|
- position: fixed;
|
|
|
- bottom: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 1.3rem;
|
|
|
- font-size: .32rem;
|
|
|
- color: #333;
|
|
|
- background: #aaaaaa;
|
|
|
- border-radius: .05rem;
|
|
|
-
|
|
|
- div {
|
|
|
- display: flex;
|
|
|
- height: 1.3rem;
|
|
|
- text-align: center;
|
|
|
- line-height: 1rem;
|
|
|
-
|
|
|
- p {
|
|
|
- flex: 1;
|
|
|
- padding: .2rem 0rem;
|
|
|
- border-top-left-radius: .05rem;
|
|
|
- border-top-right-radius: .05rem;
|
|
|
- overflow: hidden;
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- p.active {
|
|
|
- background: white;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .echarts1 {
|
|
|
- width: 100%;
|
|
|
- height: 4.2rem;
|
|
|
- background: white;
|
|
|
-
|
|
|
- #myChart1 {
|
|
|
- width: 100%;
|
|
|
- height: 200px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .icon {
|
|
|
- font-size: .26rem;
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- background: white;
|
|
|
- padding: .4rem .6rem 0rem;
|
|
|
- margin-top: .3rem;
|
|
|
- border-radius: .05rem;
|
|
|
-
|
|
|
- &-box {
|
|
|
- width: 35%;
|
|
|
- text-align: center;
|
|
|
- display: block;
|
|
|
- margin-bottom: .5rem;
|
|
|
- color: #333;
|
|
|
-
|
|
|
- a {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- flex-direction: column;
|
|
|
-
|
|
|
- div {
|
|
|
- background-color: #169bd5;
|
|
|
- width: 2rem;
|
|
|
- height: 2rem;
|
|
|
- border-radius: 50%;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- img {
|
|
|
- width: 1.15rem;
|
|
|
- height: 1.15rem;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|