diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 122841a..355245b 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -184,3 +184,10 @@ aside { margin-bottom: 10px; } } + +.plus { + color: red; +} +.subtract { + color: green; +} diff --git a/src/components/Business/ArticleClassify/ArticleClassifyTreeSelect.vue b/src/components/Business/ArticleClassify/ArticleClassifyTreeSelect.vue new file mode 100644 index 0000000..611c939 --- /dev/null +++ b/src/components/Business/ArticleClassify/ArticleClassifyTreeSelect.vue @@ -0,0 +1,80 @@ + + + diff --git a/src/components/Business/Dept/DeptTreeSelect.vue b/src/components/Business/Dept/DeptTreeSelect.vue new file mode 100644 index 0000000..f1a64f3 --- /dev/null +++ b/src/components/Business/Dept/DeptTreeSelect.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/utils/constants.js b/src/utils/constants.js index b703d33..efb2372 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -3,6 +3,7 @@ import { exp } from 'qrcode/lib/core/galois-field' export const views = { user: 'user', // 用户 + mch: 'mch', // 商户 device: 'device', // 设备 store: 'store', // 店铺 transfer: 'transfer', // 转账 @@ -123,3 +124,15 @@ export const RechargeStatus = { DEPOSIT_WAIT_PAY: "8", // 押金待支付 DEPOSIT_SUCCESS: "9", // 押金已支付 } + +// 时长/电量变化类型 +export const RecordTimeType = { + TIME: '1', // 时间 + ELE: '2' // 电量 +} + +// 时长/电量变化操作人类型 +export const RecordTimeOperatorType = { + ADMIN: '1', // 管理员 + USER: '2', // 用户 +} diff --git a/src/utils/date.js b/src/utils/date.js index 5b83535..e2d2016 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -33,3 +33,14 @@ export function toDescriptionFromSecond(data) { desc.text += desc.second + ' 秒'; return desc; } + +// 增加日期 +export function plusDays(date, day) { + let result = new Date(); + if (date instanceof Date) { + result = new Date(date.getTime()); + } else if (date instanceof String) { + result = new Date(date); + } + return result.setDate(result.getDate() + day); +} diff --git a/src/utils/index.js b/src/utils/index.js index 457f727..2b37837 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -401,11 +401,6 @@ export function getTimeArray(start, end, step) { return list; } -// 增加日期 -export function plusDays(date, day) { - return date.setDate(date.getDate() + day); -} - // 深度比较两个对象是否相等 export function isDeepEqual(obj1, obj2) { if (obj1 === obj2) return true; diff --git a/src/utils/mixins.js b/src/utils/mixins.js index 57bd4bc..7e5b288 100644 --- a/src/utils/mixins.js +++ b/src/utils/mixins.js @@ -63,6 +63,26 @@ export const $showColumns = { } } }, + methods: { + hideColumn(columns) { + if (this.columns != null) { + this.columns.filter(item => columns.includes(item.key)) + .forEach(item => { + item.visible = false; + }) + } + }, + removeColumn(columns) { + if (columns != null) { + columns.forEach(column => { + let index = this.columns.findIndex(item => column === item.key); + if (index != null && index > -1) { + this.columns.splice(index, 1); + } + }) + } + } + } } // 充值服务费 diff --git a/src/views/dashboard/BalancePeriodReport.vue b/src/views/dashboard/BalancePeriodReport.vue index 81dda1e..9443f5a 100644 --- a/src/views/dashboard/BalancePeriodReport.vue +++ b/src/views/dashboard/BalancePeriodReport.vue @@ -142,10 +142,10 @@ export default { }, ], legend: { - data: ['expected', 'actual'] + show: true, }, series: [{ - name: '平台总余额', + name: '平台总余额(元)', smooth: true, type: 'line', itemStyle: { @@ -165,7 +165,7 @@ export default { animationDuration: 2800, animationEasing: 'quadraticOut' },{ - name: '用户总余额', + name: '用户总余额(元)', smooth: true, type: 'line', itemStyle: { @@ -185,7 +185,7 @@ export default { animationDuration: 2800, animationEasing: 'quadraticOut' },{ - name: '充值', + name: '充值金额(元)', itemStyle: { normal: { color: '#21CCFF', diff --git a/src/views/dashboard/DailyBillReport.vue b/src/views/dashboard/DailyBillReport.vue index 810b603..923d91f 100644 --- a/src/views/dashboard/DailyBillReport.vue +++ b/src/views/dashboard/DailyBillReport.vue @@ -8,8 +8,6 @@ require('echarts/theme/macarons') // echarts theme import resize from './mixins/resize' import { getTimeArray } from '@/utils' -const animationDuration = 6000 - export default { name: 'dailyBillReport', mixins: [resize], @@ -98,8 +96,11 @@ export default { type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, + legend: { + show: true + }, grid: { - top: 10, + top: 30, left: '2%', right: '2%', bottom: '3%', @@ -122,7 +123,6 @@ export default { name: '充值(元)', type: 'line', data: this.getHourData(this.billData, 'recharge'), - animationDuration, itemStyle: { normal: { color: '#246EFF', @@ -132,10 +132,9 @@ export default { name: '提现(元)', type: 'line', data: this.getHourData(this.billData, 'withdraw'), - animationDuration, itemStyle: { normal: { - color: '#81E2FF', + color: '#31d697', } }, }] diff --git a/src/views/dashboard/DailyProfitReport.vue b/src/views/dashboard/DailyProfitReport.vue index 687d9c9..0c427c5 100644 --- a/src/views/dashboard/DailyProfitReport.vue +++ b/src/views/dashboard/DailyProfitReport.vue @@ -10,8 +10,6 @@ import {getTimeArray} from "@/utils"; import {hourBillCount} from "@/api/system/dashboard"; import {parseTime} from "@/utils/ruoyi"; -const animationDuration = 1000 - export default { name: 'dailyProfitReport', mixins: [resize], @@ -92,7 +90,7 @@ export default { } }, grid: { - top: 10, + top: 30, left: '2%', right: '2%', bottom: '3%', @@ -111,17 +109,11 @@ export default { show: false } }, + legend: { + show: true, + }, series: [{ - name: '月费收入(元)', - type: 'line', - data: this.getChartData(this.billData, 'monthAmount'), - itemStyle: { - normal: { - color: '#246EFF', - } - }, - }, { - name: '服务费收入(元)', + name: '订单服务费收入(元)', type: 'line', data: this.getChartData(this.billData, 'serviceAmount'), itemStyle: { @@ -130,12 +122,30 @@ export default { } }, },{ + name: '提现服务费收入(元)', + type: 'line', + data: this.getChartData(this.billData, 'withdrawServiceAmount'), + itemStyle: { + normal: { + color: '#246EFF', + } + }, + }, { + name: '月费收入(元)', + type: 'line', + data: this.getChartData(this.billData, 'monthAmount'), + itemStyle: { + normal: { + color: '#31d697', + } + }, + }, { name: '渠道成本(元)', type: 'line', data: this.getChartData(this.billData, 'channelCost'), itemStyle: { normal: { - color: '#68bfe4', + color: '#ffb731', } }, }, diff --git a/src/views/dashboard/ServiceIncomeChart.vue b/src/views/dashboard/ServiceIncomeChart.vue index 2dc8f4f..587810b 100644 --- a/src/views/dashboard/ServiceIncomeChart.vue +++ b/src/views/dashboard/ServiceIncomeChart.vue @@ -1,7 +1,8 @@ - + @@ -346,13 +346,21 @@ import ModelDialog from '@/components/Business/Model/modelDialog.vue' import UserLink from '@/components/Business/SmUser/UserLink.vue' import StoreLink from '@/components/Business/Store/StoreLink.vue' import DeviceLink from '@/components/Business/Device/DeviceLink.vue' -import { $serviceType } from '@/utils/mixins' +import { $serviceType, $view } from '@/utils/mixins' export default { name: "Device", - mixins: [$serviceType], + mixins: [$serviceType, $view], components: { DeviceLink, StoreLink, UserLink, ModelDialog, UserInput, StoreInput, SnInput, QrCode, SmUserSelect, ModelSelect}, dicts: ['sm_device_online_status', 'sm_device_status', 'sm_device_outage_way','sm_device_notice_way', 'service_type', 'time_unit'], + props: { + query: { + type: Object, + default: () => { + return {} + } + } + }, data() { return { // 是否展示选择型号弹窗 @@ -380,7 +388,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, storeName: null, deviceName: null, model: null, @@ -427,6 +435,7 @@ export default { created() { this.queryParams = { ...this.queryParams, + ...this.query, ...this.$route.query } this.getList(); diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index 3befe4a..832c8f4 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -250,7 +250,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, dictType: undefined, dictLabel: undefined, status: undefined @@ -399,4 +399,4 @@ export default { } } }; - \ No newline at end of file + diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 6ca5457..7d17f6f 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -218,7 +218,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, dictName: undefined, dictType: undefined, status: undefined @@ -344,4 +344,4 @@ export default { } } }; - \ No newline at end of file + diff --git a/src/views/system/model/index.vue b/src/views/system/model/index.vue index e399a4f..616fdef 100644 --- a/src/views/system/model/index.vue +++ b/src/views/system/model/index.vue @@ -196,7 +196,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, modelName: null, model: null, idCode: null, diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 7982b54..63fcd78 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -198,7 +198,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, noticeTitle: undefined, createBy: undefined, status: undefined diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 444bf63..09c83f2 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -185,7 +185,7 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 20, postCode: undefined, postName: undefined, status: undefined diff --git a/src/views/system/recharge/detail.vue b/src/views/system/recharge/detail.vue index c616266..2acc863 100644 --- a/src/views/system/recharge/detail.vue +++ b/src/views/system/recharge/detail.vue @@ -1,77 +1,80 @@