Browse Source

优化文档部分功能

master
ltlzx 4 years ago
parent
commit
7f856bb6cf
  1. 8
      src/api/index.js
  2. 8
      src/components/orderDetails/index.vue
  3. 39
      src/components/page/Home/index.vue
  4. 36
      src/components/page/classification/DataQuery.vue
  5. 3
      src/utils/request.js

8
src/api/index.js

@ -152,3 +152,11 @@ export const home = query => {
data: query data: query
}); });
}; };
//手动获取
export const manualGetGoods = query => {
return request({
url: '/admin/goods.Goods/manualGetGoods',
method: 'get',
params: query
});
};

8
src/components/orderDetails/index.vue

@ -1,7 +1,13 @@
<template> <template>
<div> <div>
<a-modal v-model="newVisible" title="订单详情" :afterClose="onClose" width="1194px" :bodyStyle="modeStyle"> <a-modal v-model="newVisible" title="订单详情" :afterClose="onClose" width="1194px" :bodyStyle="modeStyle">
<p>订单当前状态等待购买方付款</p> <p>订单当前状态
<span v-if="order.status==1">等待购买方付款</span>
<span v-else-if="order.status==2">等待买卖双方交付</span>
<span v-else-if="order.status==3">正在结算中</span>
<span v-else-if="order.status==4">订单已完成</span>
<span v-else-if="order.status==5">订单已关闭</span>
</p>
<div class="steps_body"> <div class="steps_body">
<a-steps :current="order.status" class="steps"> <a-steps :current="order.status" class="steps">
<a-step> <a-step>

39
src/components/page/Home/index.vue

@ -30,9 +30,9 @@
<div class="extra-item"> <div class="extra-item">
<!-- <a>今日</a> <!-- <a>今日</a>
<a>本周</a> --> <a>本周</a> -->
<a :class="active=='day'?'active':''" @click="changeTiem('day',0)">按日</a> <a :class="active=='day'?'active1':''" @click="changeTiem('day',0)">按日</a>
<a :class="active=='month'?'active':''" @click="changeTiem('month',0)">按月</a> <a :class="active=='month'?'active1':''" @click="changeTiem('month',0)">按月</a>
<a :class="active=='year'?'active':''" @click="changeTiem('year',0)">按年</a> <a :class="active=='year'?'active1':''" @click="changeTiem('year',0)">按年</a>
</div> </div>
<!-- <a-range-picker class="picker"/> --> <!-- <a-range-picker class="picker"/> -->
</div> </div>
@ -54,13 +54,13 @@
<div class="extra-item"> <div class="extra-item">
<!-- <a>今日</a> <!-- <a>今日</a>
<a>本周</a> --> <a>本周</a> -->
<a :class="active1=='day'?'active':''" @click="changeTiem('day',1)">按日</a> <a :class="active1=='day'?'active1':''" @click="changeTiem('day',1)">按日</a>
<a :class="active1=='month'?'active':''" @click="changeTiem('month',1)">按月</a> <a :class="active1=='month'?'active1':''" @click="changeTiem('month',1)">按月</a>
<a :class="active1=='year'?'active':''" @click="changeTiem('year',1)">按年</a> <a :class="active1=='year'?'active1':''" @click="changeTiem('year',1)">按年</a>
</div> </div>
<!-- <a-range-picker :style="{width: '256px'}" /> --> <!-- <a-range-picker :style="{width: '256px'}" /> -->
</div> </div>
<a-tab-pane tab="销售量" key="1"> <a-tab-pane tab="访问量" key="1">
<a-row> <a-row>
<a-col> <a-col>
<div class="rank"> <div class="rank">
@ -75,6 +75,21 @@
</a-col> </a-col>
</a-row> </a-row>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="销售量" key="2">
<a-row>
<a-col>
<div class="rank">
<ul class="list">
<li :key="index" v-for="(item, index) in rankList1">
<span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
<span>{{ item.username }}</span>
<span>{{ item.count }}</span>
</li>
</ul>
</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
</a-card> </a-card>
@ -108,12 +123,14 @@ export default {
], ],
query:{ query:{
leftDate:'year', leftDate:'year',
rightDate:'year' rightDate:'year',
saleRankingDate:'year'
}, },
loading: false, loading: false,
barData:[], barData:[],
barData2:[], barData2:[],
rankList:[], rankList:[],
rankList1:[],
active:'year', active:'year',
active1:'year', active1:'year',
options1: { options1: {
@ -150,6 +167,7 @@ export default {
changeTiem(time,type){ changeTiem(time,type){
if(type==1){ if(type==1){
this.query.rightDate=time this.query.rightDate=time
this.query.saleRankingDate=time
this.active1=time this.active1=time
}else{ }else{
this.query.leftDate=time this.query.leftDate=time
@ -176,6 +194,7 @@ export default {
}) })
} }
this.rankList=res.data.entrust_ranking this.rankList=res.data.entrust_ranking
this.rankList1=res.data.entrust_sale_ranking
this.options1.datasets=res.data.treeMap this.options1.datasets=res.data.treeMap
this.options1.labels=res.data.label this.options1.labels=res.data.label
}else{ }else{
@ -250,7 +269,7 @@ export default {
color: #3A3A3A; color: #3A3A3A;
margin-left: 24px; margin-left: 24px;
} }
.active{ .active1{
color: #1890FF !important; color: #1890FF !important;
} }
@ -283,7 +302,7 @@ export default {
text-align: center; text-align: center;
} }
.list li span.active { .list li span.active {
background-color: #314659; background-color: #1890FF;
color: #fff; color: #fff;
} }
.list li span:last-child { .list li span:last-child {

36
src/components/page/classification/DataQuery.vue

@ -47,11 +47,21 @@
<a-select-option value="2">授权</a-select-option> <a-select-option value="2">授权</a-select-option>
</a-select> </a-select>
</a-col> </a-col>
<a-col :span="5" class="query_item">
<span>委托状态</span>
<a-select default-value="" >
<a-select-option value="">全部</a-select-option>
<a-select-option value="1">委托中</a-select-option>
<a-select-option value="2">撤销中</a-select-option>
<a-select-option value="2">撤销失败</a-select-option>
<a-select-option value="2">撤销成功</a-select-option>
</a-select>
</a-col>
<a-col :span="5" class="query_item query_item2"> <a-col :span="5" class="query_item query_item2">
<span>创建时间</span> <span>创建时间</span>
<a-range-picker v-model="query.createtime" valueFormat="YYYY-MM-DD"/> <a-range-picker v-model="query.createtime" valueFormat="YYYY-MM-DD"/>
</a-col> </a-col>
<a-col :span="14" class="query_item query_item1"> <a-col :span="9" class="query_item query_item1">
<a-space :size="21"> <a-space :size="21">
<a-button type="primary" class="query_button" @click="getAllDate"> </a-button> <a-button type="primary" class="query_button" @click="getAllDate"> </a-button>
<a-button class="query_button" @click="resetQurey"> </a-button> <a-button class="query_button" @click="resetQurey"> </a-button>
@ -62,7 +72,7 @@
<div class="table"> <div class="table">
<div class="table_title"> <div class="table_title">
<span >查询结果</span> <span >查询结果</span>
<a-button type="primary" class="query_button"> </a-button> <a-button type="primary" class="query_button" @click="getGoods"> </a-button>
</div> </div>
<a-table :columns="columns" :data-source="data" bordered :pagination="false"> <a-table :columns="columns" :data-source="data" bordered :pagination="false">
<template slot="goods_status" slot-scope="goods_status"> <template slot="goods_status" slot-scope="goods_status">
@ -103,7 +113,7 @@
import Operation from '../../Operation.vue' import Operation from '../../Operation.vue'
import dataSelect from '../../dateSelect/index.vue' import dataSelect from '../../dateSelect/index.vue'
import operationRecords from '../../operationRecords/index.vue' import operationRecords from '../../operationRecords/index.vue'
import {getAllDate,getLog} from '../../../api/index' import {getAllDate,getLog,manualGetGoods} from '../../../api/index'
export default { export default {
data() { data() {
return{ return{
@ -167,6 +177,12 @@ export default {
scopedSlots:{customRender:'goods_status'}, scopedSlots:{customRender:'goods_status'},
align:'center' align:'center'
}, },
{
title: '委托状态',
dataIndex: '',
// scopedSlots:{customRender:'goods_status'},
align:'center'
},
{ {
title: '操作', title: '操作',
scopedSlots: { customRender: 'operation' }, scopedSlots: { customRender: 'operation' },
@ -184,6 +200,20 @@ export default {
this.getAllDate() this.getAllDate()
}, },
methods:{ methods:{
getGoods(){
manualGetGoods().then(res=>{
if(res.code==200){
if(res.data.count==0){
this.$message.success('无新增委托数据');
}else{
this.$message.success('成功获取'+res.data.count+'个委托数据!');
this.getAllDate()
}
}else{
this.$message.error(res.msg);
}
})
},
// query // query
resetQurey(){ resetQurey(){
Object.assign(this.query, this.$options.data().query) Object.assign(this.query, this.$options.data().query)

3
src/utils/request.js

@ -3,7 +3,8 @@ import axios from 'axios';
const service = axios.create({ const service = axios.create({
// process.env.NODE_ENV === 'development' 来判断是否开发环境 // process.env.NODE_ENV === 'development' 来判断是否开发环境
// baseURL:process.env.NODE_ENV == 'production' ? 'https://yztapi.xingtongworld.com' : '/api/', // baseURL:process.env.NODE_ENV == 'production' ? 'https://yztapi.xingtongworld.com' : '/api/',
baseURL:'http://jiao.api.alpha.xingtongworld.com', // baseURL:'http://jiao.api.alpha.xingtongworld.com',
baseURL:'http://192.168.66.254:8080',
timeout: 5000, timeout: 5000,
}); });

Loading…
Cancel
Save