Commit 4b0525f7 by 姜雷

Merge branch 'develop' into 'test'

Develop See merge request !51
parents 1a74a09d 7290b389
......@@ -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
......
......@@ -73,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 class="g2-legend-price">${obj.count.toFixed(2)}</span>
<span class="g2-legend-price">${price}</span>
</li>
`;
},
......
......@@ -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,
......
......@@ -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}"
......@@ -67,7 +68,7 @@ export default {
style="display:inline-block;margin-right:10px;background-color:${color};"
></i>
<span class="g2-legend-text">${value}: </span>
<span class="g2-legend-price">${obj.count.toFixed(2)}</span>
<span class="g2-legend-price">${price}</span>
</li>
`;
},
......
......@@ -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;
......
......@@ -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;
}
......@@ -358,8 +357,9 @@ export const formatterMoneyToDouble = val => {
export const formatPrice = price => {
var result = [],
counter = 0;
price = (price || 0).toString().split('');
for (var i = price.length - 1; i >= 0; i--) {
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) {
......
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