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