Commit 613bc9e0 by 姜雷

Merge branch 'test' into 'master'

Test See merge request !58
parents b014a068 4ba778c2
VUE_APP_BASE_URL=/systemManageShell/
VUE_APP_BASE_URL=/
VUE_APP_LIB_BASE_URL=/systemManageShell/
VUE_APP_CUSTOMER_MENU_CODE=0001
VUE_APP_BASE_MENU_CODE=0002
......@@ -6,6 +6,7 @@ VUE_APP_SYSTEM_MENU_CODE=0003
VUE_APP_STATISTICS_MENU_CODE=0044
VUE_APP_DEVICE_MENU_CODE=0048
VUE_APP_DASHBOARD_CODE=0079
VUE_APP_CUSTOMER_OPERATE_CODE=0077
VUE_APP_WHITE_LIST=/login,/404,/401
VUE_APP_LIB_MANAGER=http://ex-dev-dcxy-static.168cad.top
VUE_APP_SYSTEM_SERVER_URL=http://ex-dev-dcxy-system-manage.168cad.top
......
......@@ -34,7 +34,7 @@
"nprogress": "^0.2.0",
"popmotion": "^8.1.22",
"qiniu-js": "^2.2.0",
"rym-element-ui": "^0.1.54",
"rym-element-ui": "^0.1.55",
"vue-qr": "^1.2.8",
"vuedraggable": "^2.16.0",
"wangeditor": "^3.1.1"
......
......@@ -9,7 +9,7 @@
<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %><%= VUE_APP_LIB_BASE_URL %>lib/manageShell.umd.min.js"></script>
<script src="/lib/manageShell.umd.min.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/customerManage/lib/customerManage.umd.min.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/baseManage/lib/baseManage.umd.min.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/systemManage/lib/systemManage.umd.min.js"></script>
......@@ -17,8 +17,8 @@
<script src="<%= VUE_APP_LIB_MANAGER %>/statisticsManage/lib/statisticsManage.umd.min.js"></script>
<script src="<%= VUE_APP_LIB_MANAGER %>/deviceManage/lib/deviceManage.umd.min.js"></script>
<link rel="stylesheet" href="<%= VUE_APP_LIB_MANAGER %><%= VUE_APP_LIB_BASE_URL %>lib/manageShell.css" />
<title>系统管理</title>
<link rel="stylesheet" href="/lib/manageShell.css" />
<title>多彩综合管理系统</title>
</head>
<body>
......
......@@ -5,6 +5,15 @@
:title="title"
>
<div
class="com-logo"
slot="logo"
>
<img
src="@/assets/images/pic_logo.png"
alt="logo"
>
</div>
<div
class="AppTopBar"
slot="title"
>
......
......@@ -60,6 +60,7 @@ export default {
itemTpl: (value, color, checked, index) => {
const obj = this.data[index];
checked = checked ? 'checked' : 'unChecked';
let price = this.$formatPrice(obj.count);
return `
<li
class="g2-legend-list-item item-${index} ${checked}"
......@@ -72,7 +73,7 @@ export default {
style="display:inline-block;margin-right:10px;background-color:${color};"
></i>
<span class="g2-legend-text" title="${value}">${value}: </span>
<span>${obj.count.toFixed(2)}</span>
<span class="g2-legend-price">${price}</span>
</li>
`;
},
......@@ -209,5 +210,10 @@ export default {
white-space: nowrap;
vertical-align: middle;
}
.g2-legend-price {
display: inline-block;
width: 90px;
text-align: right;
}
}
</style>
......@@ -8,14 +8,14 @@
class="CustomerConsumptionChart-tip"
style="color:#333;font-size:14px;text-align: center;"
>
合计消费总金额:<span
消费总金额:<span
class="CustomerConsumption-total"
style="color:#f00;"
>0.00元</span>
合计消费人数:<span
消费笔数:<span
class="CustomerConsumption-count"
style="color:#f00;"
>0</span>
>0</span>
</div>
</div>
<Chart
......
......@@ -48,15 +48,6 @@ export default {
offset: 10,
});
let money =
this.consumeCount && this.consumeCount.payableMoney
? this.consumeCount.payableMoney
: '0.00';
let menCount =
this.consumeCount && this.consumeCount.payMen
? this.consumeCount.payMen
: '0';
this.chart.render();
this.chart.guide().text({
top: true,
......@@ -80,7 +71,7 @@ export default {
? this.consumeCount.payMen
: '0';
this.totalDom.innerHTML = money + '元';
this.countDom.innerHTML = menCount + '';
this.countDom.innerHTML = menCount + '';
}
},
},
......
......@@ -13,8 +13,8 @@
<span
class="CustomerRecharge-tooltip"
style="background-color:#26c9a8;"
></span> 充值数:
<span style="color:#f00;">{{ rechargeCount && rechargeCount.rechargeMen ? rechargeCount.rechargeMen : 0 }}</span>
></span> 充值数:
<span style="color:#f00;">{{ rechargeCount && rechargeCount.rechargeMen ? rechargeCount.rechargeMen : 0 }}</span>
</div>
</div>
<Chart :data="rechargeList" />
......
......@@ -156,7 +156,7 @@ export default {
alias: '充值金额',
},
rechargeMen: {
alias: '充值数',
alias: '充值数',
},
});
......@@ -191,7 +191,7 @@ export default {
this.chart.guide().text({
top: true,
position: ['100%', '0%'],
content: '()',
content: '()',
offsetX: 30,
offsetY: -8,
});
......@@ -313,7 +313,7 @@ export default {
this.updateSlider();
this.updateData();
console.log(this.chart.getYScales());
// console.log(this.chart.getYScales());
} else {
this.initData();
this.initSlider();
......
......@@ -55,6 +55,7 @@ export default {
itemTpl: (value, color, checked, index) => {
const obj = this.data[index];
checked = checked ? 'checked' : 'unChecked';
let price = this.$formatPrice(obj.count);
return `
<li
class="g2-legend-list-item item-${index} ${checked}"
......@@ -66,8 +67,8 @@ export default {
class="g2-legend-marker"
style="display:inline-block;margin-right:10px;background-color:${color};"
></i>
<span class="g2-legend-text">${value}: </span>
<span>${obj.count}</span>
<span class="g2-legend-text" title="${value}">${value}: </span>
<span class="g2-legend-price">${price}</span>
</li>
`;
},
......@@ -143,6 +144,14 @@ export default {
<style lang="scss">
@import '@/assets/styles/variables.scss';
#SeviceRatio {
.g2-legend-text {
display: inline-block;
width: 46px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: middle;
}
.SeviceRatio-centerText {
color: #333;
font-size: 20px;
......@@ -151,6 +160,11 @@ export default {
.SeviceRatio-serviceName {
font-size: 16px;
}
.g2-legend-price {
display: inline-block;
width: 72px;
text-align: right;
}
}
@media screen and (max-width: $bigScreenWidth) {
#SeviceRatio {
......
......@@ -74,6 +74,17 @@
src="@/assets/images/layout/icon_shebei.png"
/>
</MenuItem>
<MenuItem
v-if="customerOperate && customerOperate.length"
menuName="运营管理"
:menuList="customerOperate[0].children"
:selectRouteMenu="selectRouteMenu"
>
<img
slot="icon"
src="@/assets/images/layout/icon_yunying.png"
/>
</MenuItem>
<div @click="() => toggleFastLink(false)">
<MenuItem menuName="全业态">
<img
......@@ -181,6 +192,12 @@ export default {
);
return item ? formatRouteLink([item]) : null;
},
customerOperate() {
let item = this.routers.find(
menu => menu.menuCode === process.env.VUE_APP_CUSTOMER_OPERATE_CODE
);
return item ? formatRouteLink([item]) : null;
},
// collectRouteList() {
// let list = this.collectList.map(item => {
// let id = item.menuId;
......@@ -253,6 +270,7 @@ export default {
margin-left: 60px;
}
.DashboardButton {
cursor: pointer;
height: 44px;
width: 44px;
}
......
......@@ -523,7 +523,7 @@ export default {
display: flex;
align-items: center;
line-height: 20px;
font-size: 16px;
font-size: 14px;
.avatar-name-icon {
position: relative;
margin-left: 6px;
......
......@@ -9,7 +9,7 @@
<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script>
<title>系统管理</title>
<title>多彩综合管理系统</title>
</head>
<body>
......
import Cookies from 'js-cookie';
import { TOKEN_KEY } from '@/config/index';
const TokenKey = TOKEN_KEY;
export function getToken() {
return Cookies.get(TokenKey);
return sessionStorage.getItem(TokenKey);
}
export function setToken(token, expires) {
return Cookies.set(TokenKey, token, { expires: expires });
return sessionStorage.setItem(TokenKey, token);
}
export function removeToken() {
return Cookies.remove(TOKEN_KEY);
return sessionStorage.removeItem(TOKEN_KEY);
}
......@@ -5,6 +5,7 @@ import {
formatePhone,
allowLetterNumber,
formatterMoneyToDouble,
formatPrice,
} from '@/utils/index';
import rymUi from 'rym-element-ui';
import 'rym-element-ui/lib/rymUi.css';
......@@ -31,6 +32,7 @@ const extendVue = Vue => {
Vue.prototype.$getFilters = getFilters;
Vue.prototype.$allowLetterNumber = allowLetterNumber;
Vue.prototype.$formatterMoneyToDouble = formatterMoneyToDouble;
Vue.prototype.$formatPrice = formatPrice;
Vue.component('UserCard', UserCard);
Vue.component('UserInfo', UserInfo);
......
......@@ -21,8 +21,7 @@ export function parseTime(time, cFormat) {
};
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key];
if (key === 'a')
return ['一', '二', '三', '四', '五', '六', '日'][value - 1];
if (key === 'a') return ['日', '一', '二', '三', '四', '五', '六'][value];
if (result.length > 0 && value < 10) {
value = '0' + value;
}
......@@ -355,3 +354,17 @@ export const allowLetterNumber = value => {
export const formatterMoneyToDouble = val => {
return val ? Number(val).toFixed(2) : Number(0).toFixed(2);
};
export const formatPrice = price => {
var result = [],
counter = 0;
price = (price || 0).toFixed(2).split('');
result.push(price.slice(-3).join(''));
for (var i = price.length - 4; i >= 0; i--) {
counter++;
result.unshift(price[i]);
if (!(counter % 3) && i != 0) {
result.unshift(',');
}
}
return result.join('');
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment