快递列表查询

main
xuechunyuan 3 years ago
parent a7e890ae9d
commit 8000ab007c
  1. 1
      package.json
  2. 18
      src/api/sjApi.js
  3. 5
      src/assets/js/rem.js
  4. 2
      src/main.js
  5. 8
      src/router/index.js
  6. 11
      src/util/axios.js
  7. 559
      src/views/dashboard/home.vue
  8. 215
      src/views/expresslist/index.vue
  9. 18
      vue.config.js

@ -14,6 +14,7 @@
"element-ui": "^2.15.12",
"highcharts": "^9.3.3",
"js-cookie": "^3.0.1",
"js-md5": "^0.7.3",
"postcss-pxtorem": "^6.0.0",
"screenfull": "^5.2.0",
"swiper": "^5.4.5",

@ -0,0 +1,18 @@
import request from '@/util/axios'
//列表
export const queryExpressList = (param) => request({
url: '/sjapi/list',
method: 'post',
data: param
});
//列表
export const queryExpressDetail = (param) => request({
url: '/pollapi/poll/query.do',
method: 'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
params: param
});

@ -4,7 +4,10 @@
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
if (clientWidth >= 1920) {
if(location.href.indexOf('express') > -1){
docEl.style.fontSize = '';
}
else if (clientWidth >= 1920) {
docEl.style.fontSize = '100px'; //1rem = 100px
} else {
docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';

@ -15,4 +15,4 @@ new Vue({
router,
store,
render: (h) => h(App),
}).$mount("#app");
}).$mount("#app");

@ -3,6 +3,7 @@ import VueRouter from "vue-router";
import DashBoard from "../views/dashboard/dashboard.vue";
import HomePage from "../views/dashboard/homepage.vue";
import home from "../views/dashboard/home.vue";
import Express from "../views/expresslist/index.vue";
Vue.use(VueRouter);
@ -22,10 +23,15 @@ const routes = [
name: "home",
component: home,
},
{
path: "/express",
name: "express",
component: Express,
},
];
const router = new VueRouter({
mode: "history",
mode: "hash",
base: process.env.BASE_URL,
routes,
});

@ -11,7 +11,12 @@ axios.defaults.validateStatus = function (status) {
//HTTP Request拦截
axios.interceptors.request.use(
(config) => {
config.headers["Content-Type"] = "application/json";
if(config.headers["Content-Type"] != undefined){
config.headers["Content-Type"] = "application/x-www-form-urlencoded";
}
else{
config.headers["Content-Type"] = "application/json";
}
return config;
},
(error) => {
@ -23,9 +28,9 @@ axios.interceptors.request.use(
//HTTP Response拦截
axios.interceptors.response.use(
(res) => {
const ok = res.data.Success || false,
const ok = res.data.Success || res.data.status == '200' || false,
status = res.status || 200,
message = res.data.AllMessages || "Internal Server Error!";
message = res.data.AllMessages || res.data.errorMessage || res.data.message || "Internal Server Error!";
if (!ok && !status) {
return Promise.reject(new Error(message));

@ -6,10 +6,9 @@
<div class="time_text">{{ time }}</div>
<div class="bittom_left">
<div class="week_txt">
<span>{{ date }}</span
><span style="margin-left: 0.1rem">{{ week }}</span>
<span>{{ date }}</span><span style="margin-left: 0.1rem">{{ week }}</span>
</div>
<div class="uodate_time">数据更新时间:<span class="time_txt">{{updateTime}}</span></div>
<div class="uodate_time">数据更新时间:<span class="time_txt">{{ updateTime }}</span></div>
</div>
</div>
</div>
@ -67,12 +66,7 @@
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in slideList" :key="index">
<div class="table_con">
<div
class="table_line"
v-for="item1 in item.arr"
:key="item1.no"
:class="item1.no <= 3 ? 'ac_no' : ''"
>
<div class="table_line" v-for="item1 in item.arr" :key="item1.no" :class="item1.no <= 3 ? 'ac_no' : ''">
<div class="table_item">{{ item1.no }}</div>
<div class="table_item">{{ item1.name }}</div>
<div class="table_item">{{ item1.count }}</div>
@ -126,36 +120,14 @@
<div class="data_txt">
<span class="hb_txt">环比</span>
<span class="hb_data">{{ item.huanbi }}</span>
<img
v-show="item.name == '收件量' && item.huanbi > 0"
src="~@/assets/img/up1.png"
alt=""
/>
<img
v-show="item.name == '收件量' && item.huanbi < 0"
src="~@/assets/img/down1.png"
alt=""
/>
<img
v-show="item.name == '发件量' && item.huanbi > 0"
src="~@/assets/img/up2.png"
alt=""
/>
<img
v-show="item.name == '发件量' && item.huanbi < 0"
src="~@/assets/img/down2.png"
alt=""
/>
<img
v-show="item.name !== '收件量' && item.name !== '发件量' && item.huanbi > 0"
src="~@/assets/img/up3.png"
alt=""
/>
<img
v-show="item.name !== '收件量' && item.name !== '发件量' && item.huanbi < 0"
src="~@/assets/img/down3.png"
alt=""
/>
<img v-show="item.name == '收件量' && item.huanbi > 0" src="~@/assets/img/up1.png" alt="" />
<img v-show="item.name == '收件量' && item.huanbi < 0" src="~@/assets/img/down1.png" alt="" />
<img v-show="item.name == '发件量' && item.huanbi > 0" src="~@/assets/img/up2.png" alt="" />
<img v-show="item.name == '发件量' && item.huanbi < 0" src="~@/assets/img/down2.png" alt="" />
<img v-show="item.name !== '收件量' && item.name !== '发件量' && item.huanbi > 0" src="~@/assets/img/up3.png"
alt="" />
<img v-show="item.name !== '收件量' && item.name !== '发件量' && item.huanbi < 0" src="~@/assets/img/down3.png"
alt="" />
</div>
</div>
</div>
@ -167,27 +139,21 @@
<div class="center_bottom">
<div class="charts_box map-box">
<ShowMap :mapData="mapData" :datas="datas" v-if="mapData && datas && isMap"></ShowMap>
<!-- <div id="chart_map" class="map_box"></div> -->
<!-- <div id="chart_map" class="map_box"></div> -->
</div>
<div class="charts_box">
<div id="trendChart" class="trend_box"></div>
</div>
</div>
<div class="map_wrap">
<a
@click="backMap"
href="javascript:;"
class="toback"
style="
position: absolute;
right: 10px;
top: 10px;
color: #fff;
font-size: 0.16rem;
z-index: 99;
"
>回到原点</a
>
<a @click="backMap" href="javascript:;" class="toback" style="
position: absolute;
right: 10px;
top: 10px;
color: #fff;
font-size: 0.16rem;
z-index: 99;
">回到原点</a>
<PathMap ref="pathMap"></PathMap>
</div>
<div class="right_box">
@ -196,6 +162,7 @@
<div class="left_tit">
<span class="txt_name">派件入库量占比</span>
<span class="name">PROPORTION</span>
<div style="flex:1;text-align:right;"><router-link class="express_btn" target="_blank" :to="{ path: '/express' }">更多</router-link></div>
</div>
</div>
<div class="pie_box" id="pieChart"></div>
@ -220,7 +187,7 @@
<CarWarn></CarWarn>
</div>
</div>
</div>
</div>
</template>
<script>
@ -260,7 +227,7 @@ export default {
week: "",
isFullFlag: false,
isSupport: false,
mapChart:null,
mapChart: null,
dayData: [],
monthData: [],
totalData: [],
@ -271,7 +238,7 @@ export default {
villageData: [],
villList: [],
mySwiper: null,
mySwiper1:null,
mySwiper1: null,
temp: "",
weather: "",
slideList: [
@ -348,8 +315,8 @@ export default {
小店镇: [118.81007, 35.422484],
夏庄镇: [118.700674, 35.419525],
},
isMap:false,
updateTime:''
isMap: false,
updateTime: ''
};
},
created() {
@ -370,11 +337,11 @@ export default {
this.$refs.pathMap.backMap();
},
//echarts
fontSize(res){
const clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
fontSize(res) {
const clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (!clientWidth) return;
let fontSize = clientWidth / 1920;
return res*fontSize;
return res * fontSize;
},
//
doMap(item) {
@ -434,10 +401,10 @@ export default {
{ name: "签件量", data: content1[0][0].月总签件量, huanbi: content1[0][0].签件量月总环比 }
);
this.totalData = this.dayData;
this.updateTime = this.formatDate(content1[0][0].日期,'/');
this.updateTime = this.formatDate(content1[0][0].日期, '/');
content1[1].map((item) => {
// item..substring(item..length - 5).replace(".", "-")
this.xData.unshift(this.formatDate(item.日期,'-').substring(this.formatDate(item.日期,'-').length - 5).replace(".", "-"));
this.xData.unshift(this.formatDate(item.日期, '-').substring(this.formatDate(item.日期, '-').length - 5).replace(".", "-"));
this.yData1.push(item.到件量);
this.yData2.push(item.派件量);
});
@ -486,11 +453,11 @@ export default {
pieArr = pieArr.sort(function (a, b) {
return a.y - b.y;
});
pieArr.map((item,index) =>{
pieArr.map((item, index) => {
this.pieData.push({
name: item.name,
y: item.y,
h:index + 1
h: index + 1
})
})
this.shouData.map((item, index) => {
@ -519,13 +486,13 @@ export default {
if (fromCoord && toCoord) {
res.push(
{
fromName: dataItem[1].name,
toName: dataItem[0].name,
coords: [
toCoord,
fromCoord,
fromName: dataItem[1].name,
toName: dataItem[0].name,
coords: [
toCoord,
fromCoord,
],
],
visualMap: false,
},
);
@ -542,9 +509,9 @@ export default {
this.mapData = this.mapData.sort(function (a, b) {
return b.value - a.value;
});
this.mapData.map((item,index) =>{
if(index > 2){
this.mapData[index].label = {show:false}
this.mapData.map((item, index) => {
if (index > 2) {
this.mapData[index].label = { show: false }
}
})
this.mapChart = this.$echarts.init(document.getElementById("chart_map"));
@ -552,7 +519,7 @@ export default {
let option = {
// backgroundColor: '#000f1e',
visualMap: {
visualMap: {
min: 0,
max: yMax,
text: ["高", "低"],
@ -569,142 +536,142 @@ export default {
},
},
geo3D: {
map: '莒县',
show: false,
zlevel: -10,
top: -30,
boxWidth: 200,
boxHeight: 4, //4:bar. 30:bar,bar30
regionHeight: 15,
shading: 'lambert',
viewControl: {
projection: 'perspective',
autoRotate: false,
damping: 0,
rotateSensitivity: 2, //
rotateMouseButton: 'left', //使
zoomSensitivity: 2, //
panSensitivity: 2, //
panMouseButton: 'right', //使
distance: 350, //
alpha: 40, //
beta: 10, //
center: [0, 0, 0],
animation: true,
animationDurationUpdate: 1000,
animationEasingUpdate: 'cubicInOut'
},
},
series: [
{
type: 'map3D',
map: '莒县',
show: false,
zlevel: -10,
top:-30,
show: true,
zlevel: 1,
top: -30,
boxWidth: 200,
boxHeight: 4, //4:bar. 30:bar,bar30
//boxHeight: 4, //4:bar. 30:bar,bar30
regionHeight: 15,
shading: 'lambert',
viewControl: {
projection: 'perspective',
autoRotate: false,
damping: 0,
rotateSensitivity: 2, //
rotateMouseButton: 'left', //使
zoomSensitivity: 2, //
panSensitivity: 2, //
panMouseButton: 'right', //使
distance: 350, //
alpha: 40, //
beta: 10, //
center: [0, 0, 0],
animation: true,
animationDurationUpdate: 1000,
animationEasingUpdate: 'cubicInOut'
label: { //
show: true,
textStyle: {
color: '#fff',//
}
},
},
series: [
{
type: 'map3D',
map: '莒县',
show: true,
zlevel: 1,
top:-30,
boxWidth: 200,
//boxHeight: 4, //4:bar. 30:bar,bar30
regionHeight: 15,
shading: 'lambert',
label: { //
show: true,
textStyle: {
color: '#fff',//
}
},
itemStyle: {
color: '#025894',
areaColor: '#025894',
opacity: 1,
borderWidth: 1,
borderColor: '#1cccff'
},
emphasis: {
label: {
show: false,
textStyle: {
color: '#fff',
fontSize: 14,
backgroundColor: 'transparent' //
}
},
borderColor: '#333',
borderWidth: 5,
itemStyle: {
color: '#025894',
areaColor: '#025894',
}
},
light: {
main: {
shadow: true,
shadowQuality: 'ultra',
},
},
viewControl: {
projection: 'perspective',
autoRotate: false,
damping: 0,
rotateSensitivity: 2, //
rotateMouseButton: 'left', //使
zoomSensitivity: 2, //
panSensitivity: 2, //
panMouseButton: 'right', //使
distance: 350, //
alpha: 40, //
beta: 10, //
center: [0, 0, 0],
animation: true,
animationDurationUpdate: 1000,
animationEasingUpdate: 'cubicInOut'
},
data:this.mapData
itemStyle: {
color: '#025894',
areaColor: '#025894',
opacity: 1,
borderWidth: 1,
borderColor: '#1cccff'
},
emphasis: {
label: {
show: false,
textStyle: {
color: '#fff',
fontSize: 14,
backgroundColor: 'transparent' //
}
},
borderColor: '#333',
borderWidth: 5,
itemStyle: {
color: '#025894',
areaColor: '#025894',
}
},
light: {
main: {
shadow: true,
shadowQuality: 'ultra',
},
},
// 线
{
type: 'lines3D',
coordinateSystem: 'geo3D',
zlevel: 2, //线
polyline: false,
effect: {
show: true,
period: 10,
trailLength: 0.1,
trailColor: '#ffd419',
color: '#fff', //
symbol: 'arrow',
symbolSize: 6
},
lineStyle: {
normal: {
color: '#ffd419', //线
width: 2,
curveness: 0.5,
shadowColor: '#fff',
}
},
blendMode: 'lighter',
data: convertData(this.datas),
viewControl: {
projection: 'perspective',
autoRotate: false,
damping: 0,
rotateSensitivity: 2, //
rotateMouseButton: 'left', //使
zoomSensitivity: 2, //
panSensitivity: 2, //
panMouseButton: 'right', //使
distance: 350, //
alpha: 40, //
beta: 10, //
center: [0, 0, 0],
animation: true,
animationDurationUpdate: 1000,
animationEasingUpdate: 'cubicInOut'
},
data: this.mapData
},
// 线
{
type: 'lines3D',
coordinateSystem: 'geo3D',
zlevel: 2, //线
polyline: false,
effect: {
show: true,
period: 10,
trailLength: 0.1,
trailColor: '#ffd419',
color: '#fff', //
symbol: 'arrow',
symbolSize: 6
},
lineStyle: {
normal: {
color: '#ffd419', //线
width: 2,
curveness: 0.5,
shadowColor: '#fff',
}
},
blendMode: 'lighter',
data: convertData(this.datas),
},
]
};
};
this.mapChart.setOption(option);
},
@ -727,7 +694,7 @@ export default {
data: ["到件量", "派件量"],
textStyle: {
color: "#fff",
fontSize:this.fontSize(12)
fontSize: this.fontSize(12)
},
top: 0,
right: "2%",
@ -757,7 +724,7 @@ export default {
},
axisLabel: {
color: "rgba(255, 255, 255, .7)",
fontSize:this.fontSize(12)
fontSize: this.fontSize(12)
},
},
yAxis: {
@ -765,7 +732,7 @@ export default {
axisLabel: {
show: true,
color: "#fff",
fontSize:this.fontSize(12)
fontSize: this.fontSize(12)
},
splitLine: {
lineStyle: {
@ -841,7 +808,7 @@ export default {
return ret;
});
})(Highcharts);
var option = {
var option = {
chart: {
type: "pie",
animation: false,
@ -870,7 +837,7 @@ export default {
backgroundColor: null,
marginTop: -10,
},
colors: ["#00bdff", "#52f4c1", "#00dbec","#ff56a1","#ffa04b","#8f58ff","#00c056","#ff3661","#ff3661"],
colors: ["#00bdff", "#52f4c1", "#00dbec", "#ff56a1", "#ffa04b", "#8f58ff", "#00c056", "#ff3661", "#ff3661"],
title: {
text: "",
},
@ -897,16 +864,14 @@ export default {
},
formatter: function (params) {
//this console.log(this)
return `<span class="my-class" style="color:#e39054;font-size:0.14rem">${
this.key
}:</span>
return `<span class="my-class" style="color:#e39054;font-size:0.14rem">${this.key
}:</span>
<span style="color:#e39054;font-size:0.12rem;">${(
(this.y / this.total) *
100
).toFixed(2)}%</span><br />
<span style="font-size:0.12rem;color:#fff;line-height: 0.12rem;font-family: 'FZSK';">${
this.y
}</span>`;
(this.y / this.total) *
100
).toFixed(2)}%</span><br />
<span style="font-size:0.12rem;color:#fff;line-height: 0.12rem;font-family: 'FZSK';">${this.y
}</span>`;
},
},
},
@ -927,7 +892,7 @@ export default {
window.addEventListener("resize", () => {
Highcharts.chart("pieChart", option).reflow()
});
},
//
changeData(val) {
@ -1055,6 +1020,7 @@ export default {
<style lang="scss" scoped>
@import "~@/assets/font/font.css";
.container_box {
width: 100%;
height: 100%;
@ -1116,6 +1082,7 @@ export default {
box-shadow: -1px 2px 3px 0px rgb(64 49 49 / 60%);
opacity: 0.8;
color: #fff;
.time_txt {
font-size: 0.16rem;
font-family: "04B";
@ -1159,6 +1126,7 @@ export default {
.left {
display: flex;
align-items: flex-end;
img {
width: 0.13rem;
height: 0.16rem;
@ -1176,10 +1144,12 @@ export default {
display: flex;
align-items: center;
margin-right: 0.38rem;
img {
width: 0.8rem;
height: 0.8rem;
}
div {
height: 100%;
font-family: "FZSK";
@ -1191,6 +1161,7 @@ export default {
}
}
}
div {
font-size: 0.16rem;
color: #fff;
@ -1332,6 +1303,7 @@ export default {
.table_con {
height: 100%;
}
.table_line {
width: 100%;
height: 8.6%;
@ -1347,40 +1319,45 @@ export default {
font-family: "FZSK";
font-size: 0.18rem;
letter-spacing: 0px;
background-image: linear-gradient(
to bottom,
#fceece,
#e39054
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#fceece,
#e39054);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
&:nth-child(2) {
background: url(~@/assets/img/tab2.png);
background-size: 100% 100%;
div {
background-image: linear-gradient(
to bottom,
#cefce7,
#16da85
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#cefce7,
#16da85);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
}
&:nth-child(3) {
background: url(~@/assets/img/tab3.png);
background-size: 100% 100%;
div {
background-image: linear-gradient(
to bottom,
#cef6fc,
#1ca4f2
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#cef6fc,
#1ca4f2);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
}
}
@ -1402,6 +1379,7 @@ export default {
// }
}
}
.left_bottom {
width: 100%;
height: 38%;
@ -1440,6 +1418,7 @@ export default {
.tab_con {
height: 55%;
}
.table_line1 {
width: 100%;
height: 0.38rem;
@ -1510,48 +1489,52 @@ export default {
&:first-child {
.data_text {
background-image: linear-gradient(
to bottom,
#fceece,
#e39054
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#fceece,
#e39054);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
.data_txt {
.hb_data {
background-image: linear-gradient(
to bottom,
#fceece,
#e39054
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#fceece,
#e39054);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
}
}
&:nth-child(2) {
.data_text {
background-image: linear-gradient(
to bottom,
#cefce7,
#16da85
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#cefce7,
#16da85);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
.data_txt {
.hb_data {
background-image: linear-gradient(
to bottom,
#cefce7,
#16da85
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#cefce7,
#16da85);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
}
}
@ -1560,6 +1543,7 @@ export default {
font-size: 0.16rem;
color: #fff;
color: #ffffff;
.hb_txt {
font-size: 0.14rem;
color: #ffffff;
@ -1569,13 +1553,14 @@ export default {
.hb_data {
margin-left: 0.1rem;
font-size: 0.14rem;
background-image: linear-gradient(
to bottom,
#76e4ff,
#1c77f2
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#76e4ff,
#1c77f2);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
}
@ -1584,13 +1569,14 @@ export default {
font-size: 0.26rem;
line-height: 0.5rem;
background-image: linear-gradient(
to bottom,
#76e4ff,
#1c77f2
); /* 线性渐变背景,方向向上 */
-webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
background-image: linear-gradient(to bottom,
#76e4ff,
#1c77f2);
/* 线性渐变背景,方向向上 */
-webkit-background-clip: text;
/* 背景被裁剪成文字的前景色 */
-webkit-text-fill-color: transparent;
/* 文字填充颜色变透明 */
}
}
}
@ -1650,7 +1636,7 @@ export default {
height: 100%;
}
.map_box{
.map_box {
width: 100%;
height: 100%;
}
@ -1663,6 +1649,7 @@ export default {
box-shadow: -5px 5px 3px 1px rgba(0, 0, 0, 0.4);
}
}
.right_box {
width: 24%;
height: 80%;
@ -1760,6 +1747,7 @@ export default {
width: 100%;
height: 33%;
}
.right_bottom {
width: 100%;
height: 33%;
@ -1791,5 +1779,18 @@ export default {
z-index: 99;
}
}
.express_btn {
display: inline-block;
width: 0.6rem;
color: #ffffff;
font-size: 0.14rem;
font-style: italic;
line-height: 0.2rem;
text-align: center;
border-radius: 0.1rem 0.08rem 0.1rem 0.08rem;
text-decoration: none;
background-color: #16da85;
}
}
</style>

@ -0,0 +1,215 @@
<template>
<div class="container_box">
<el-form :inline="true" :model="queryForm" class="demo-form-inline" size="small">
<el-form-item label="快递单号">
<el-input v-model="queryForm.courierNumber" placeholder="快递单号" clearable></el-input>
</el-form-item>
<el-form-item label="下单时间">
<el-date-picker @change="changeSearchDate" v-model="queryForm.dateRange" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="快递类型">
<el-select v-model="queryForm.expressType" placeholder="快递类型">
<el-option label="全部" value=""></el-option>
<el-option :key="value" v-for="(key, value) in expressTypeList" :label="value" :value="value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit"> </el-button>
</el-form-item>
<el-form-item>
<el-upload ref="upload" class="upload-demo" action="/sjapi/send" :show-file-list="false" :on-success="uploadSuccess"
:on-error="uploadError" :limit="1">
<el-button size="small"> </el-button>
</el-upload>
</el-form-item>
</el-form>
<el-table :data="expressData" size="small" border style="width: 100%">
<el-table-column prop="orderTime" label="下单时间" width="180">
<template slot-scope="scope">
{{ dateFormatter(scope.row.orderTime) }}
</template>
</el-table-column>
<el-table-column prop="courierNumber" label="快递单号">
<template slot-scope="scope">
<el-button @click="queryExpressDetail(scope.row)" type="text">{{ scope.row.courierNumber }}</el-button>
</template>
</el-table-column>
<el-table-column prop="expressType" label="快递类型">
</el-table-column>
<el-table-column prop="placeOfOrigin" label="发件地">
</el-table-column>
<el-table-column prop="destination" label="收件地">
</el-table-column>
<el-table-column prop="addressee" label="收件人">
</el-table-column>
<el-table-column prop="cellphoneNumber" label="收件人手机号">
</el-table-column>
</el-table>
<div style="margin-top:20px;">
<el-pagination background :page-sizes="[10, 20, 50]" @size-change="handleSizeChange"
@current-change="handleCurrentChange" :current-page="pagination.page"
layout="total, sizes,prev, pager, next, jumper" :total="total">
</el-pagination>
</div>
<!-- 快递100物流跟踪记录 -->
<el-dialog title="物流进度" :visible.sync="dialogVisible" :close-on-click-moda="false">
<div style="height:400px;overflow-y:auto;font-size:12px;line-height:18px;text-align:left;">
<div style="display:flex;margin-bottom:10px;" v-for="(item, index) in expressRecord" :key="'record' + index">
<div style="width:120px;">{{ item.ftime }}</div>
<div style="flex:1;">{{ item.context }}</div>
</div>
</div>
<div slot="footer" class="dialog-footer" style="text-align:center;">
<el-button size="small" @click="dialogVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { queryExpressList, queryExpressDetail } from "@/api/sjApi";
import { dateFormat } from "@/util/date";
import md5 from "js-md5";
export default {
data() {
return {
queryForm: {
courierNumber: '',
expressType: '',
dateRange: '',
},
pagination: {
page: 1,
size: 10
},
total: 0,
expressData: [],//
expressTypeList: {
'圆通速递': 'yuantong',
'韵达快递': 'yunda',
'中通快递': 'zhongtong',
'申通快递': 'shentong',
'极兔速递': 'jtexpress',
'邮政快递包裹': 'youzhengguonei',
'顺丰速运': 'shunfeng',
'EMS': 'ems',
'京东物流': 'jd',
},//
dialogVisible: false,
expressRecord: [], //
};
},
mounted() {
this.queryList();
},
methods: {
//
changeSearchDate(date) {
if (date == null) {
this.queryForm.dateRange = '';
}
},
//
queryList() {
let param = JSON.parse(JSON.stringify(this.queryForm));
if (this.queryForm.dateRange) {
param.startTime = dateFormat(new Date(this.queryForm.dateRange[0]), 'yyyy-MM-dd hh:mm:ss');
param.endTime = dateFormat(new Date(this.queryForm.dateRange[1]), 'yyyy-MM-dd') + ' 23:59:59';
}
param.page = this.pagination.page;
param.size = this.pagination.size;
let _param = {};
Object.keys(param).map(item => {
if (param[item] && item) {
_param[item] = param[item];
}
})
queryExpressList(_param).then(res => {
if (res.code == 200) {
this.total = res.total;
this.expressData = res.data;
}
})
},
//
handleSizeChange(val) {
//size
this.pagination.size = val;
this.pagination.page = 1;
this.queryList();
},
handleCurrentChange(val) {
this.pagination.page = val;
this.queryList();
},
//
onSubmit() {
this.pagination.page = 1;
this.queryList();
},
//excel
uploadSuccess(response, file, fileList) {
if(response.code == 200) {
this.$message.success('导入成功');
this.$refs.upload.clearFiles();
this.pagination.page = 1;
this.queryList();
}
},
uploadError(err, file, fileList) {
console.log('导入失败', err)
},
//100
queryExpressDetail(row) {
let param = {
customer: "15A684C85BB850280B92FC3F5FBD4585",
sign: "",
param: JSON.stringify({
"com": this.expressTypeList[row.expressType],
"num": row.courierNumber,
"phone": row.cellphoneNumber,
"from": "",
"to": "",
"resultv2": "4",
"show": "0",
"order": "desc"
})
}
param.sign = md5(param.param + 'vERvNXiK9181' + param.customer).toUpperCase();
queryExpressDetail(param).then(res => {
this.expressRecord = res.data;
this.dialogVisible = true;
})
},
//
dateFormatter(date) {
return dateFormat(new Date(date), 'yyyy/MM/dd hh:mm:ss')
}
},
};
</script>
<style lang="scss" scoped>
.container_box {
font-size: 12px;
height: 100%;
background: #fff;
padding: 20px;
.demo-form-inline {
text-align: left;
.el-form-item {
margin-bottom: 20px !important;
}
}
::v-deep .el-form-item__label {
float: left;
font-size: 12px;
}
}
</style>

@ -2,7 +2,7 @@ const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: true,
publicPath: './',
publicPath: '/',
lintOnSave: true,
productionSourceMap: false,
devServer: {
@ -29,6 +29,22 @@ module.exports = defineConfig({
changeOrigin: true,
ws: true,
},
'/sjapi': {
target: 'http://192.168.1.38:8210',
changeOrigin: true,
ws: true,
pathRewrite: {
'/sjapi': ''
}
},
'/pollapi': {
target: 'https://poll.kuaidi100.com',
changeOrigin: true,
ws: true,
pathRewrite: {
'/pollapi': ''
}
},
}
}
});

Loading…
Cancel
Save