提交
This commit is contained in:
parent
e323a010c3
commit
088763ba9b
|
@ -73,3 +73,14 @@ export function getBillDailyAmount(params) {
|
|||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 按商户统计分成
|
||||
*/
|
||||
export function getBonusGroupByMch(params) {
|
||||
return request({
|
||||
url: '/system/dashboard/bonusGroupByMch',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
|
@ -132,4 +132,4 @@ export function deptTreeSelect() {
|
|||
url: '/system/user/deptTree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
106
src/views/ss/dashboard/components/BonusDashboard.vue
Normal file
106
src/views/ss/dashboard/components/BonusDashboard.vue
Normal file
|
@ -0,0 +1,106 @@
|
|||
<template>
|
||||
<div v-loading="loading">
|
||||
<!-- 搜索区域 -->
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
||||
<el-form-item label="日期范围">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="mini"
|
||||
:clearable="true">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery" size="mini">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery" size="mini">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
border>
|
||||
<el-table-column
|
||||
prop="arrivalName"
|
||||
label="名称"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.arrivalName || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="totalAmount"
|
||||
label="总金额"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.totalAmount.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getBonusGroupByMch } from '@/api/system/dashboard.js'
|
||||
|
||||
export default {
|
||||
name: "BonusDashboard",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
orderByColumn: "totalAmount",
|
||||
isAsc: "desc",
|
||||
payDateStart: null,
|
||||
payDateEnd: null
|
||||
},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dateRange: {
|
||||
get() {
|
||||
if (!this.queryParams.payDateStart || !this.queryParams.payDateEnd) {
|
||||
return [];
|
||||
}
|
||||
return [this.queryParams.payDateStart, this.queryParams.payDateEnd];
|
||||
},
|
||||
set(val) {
|
||||
this.queryParams.payDateStart = val[0];
|
||||
this.queryParams.payDateEnd = val[0];
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getBonusGroupByMch(this.queryParams).then(res => {
|
||||
this.list = res.rows;
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetQuery() {
|
||||
this.handleQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
35
src/views/ss/dashboard/index.vue
Normal file
35
src/views/ss/dashboard/index.vue
Normal file
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs>
|
||||
<el-tab-pane label="收入统计" lazy>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<BonusDashboard />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- TODO 套餐统计-->
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- TODO 设备统计-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="店铺地图" lazy>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BonusDashboard from '@/views/ss/dashboard/components/BonusDashboard.vue'
|
||||
export default {
|
||||
name: "Dashboard",
|
||||
components: {
|
||||
BonusDashboard
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
|
@ -1,123 +1,123 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="classifyName"
|
||||
placeholder="请输入分类名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="classifyOptions"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:article:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:article:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:article:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="文章id" align="center" prop="articleId" width="100"/>
|
||||
<el-table-column label="分类" align="center" key="classifyName" prop="classify.classifyName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="标题" align="center" prop="title" />
|
||||
<el-table-column label="简介" align="center" prop="introduction" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="作者" align="center" prop="author"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime"/>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:article:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:article:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="分类" prop="classifyId">-->
|
||||
<!-- <article-classify-tree-select v-model="queryParams.classifyId"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:article:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:article:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:article:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:article:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="文章id" align="center" prop="articleId" width="100"/>
|
||||
<el-table-column label="分类" align="center" key="classifyName" prop="classify.classifyName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="分类" align="center" prop="classifyName">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.article_classify" :value="scope.row.classify"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="标题" align="center" prop="title" />
|
||||
<!-- <el-table-column label="logo" align="center" prop="logo" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.logo" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="主图地址" align="center" prop="masterPicture" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.masterPicture" :width="50" :height="50"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="标签" align="center" prop="tag" />-->
|
||||
<el-table-column label="简介" align="center" prop="introduction" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="作者" align="center" prop="author"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime"/>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:article:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:article:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改文章对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
|
@ -208,6 +208,8 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
orderByColumn: "createTime",
|
||||
isAsc: "desc",
|
||||
classify: null,
|
||||
title: null,
|
||||
},
|
||||
|
@ -221,14 +223,35 @@ export default {
|
|||
title: [
|
||||
{ required: true, message: "标题不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
},
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
classifyName: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选分类树
|
||||
classifyName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getClassifyTree();
|
||||
},
|
||||
methods: {
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.classifyAncestorId = data.id;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
/** 查询文章列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -57,6 +57,12 @@
|
|||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column prop="classifyName" label="分类名称" min-width="260"></el-table-column>
|
||||
<el-table-column prop="classifyId" label="ID" min-width="80"></el-table-column>
|
||||
<el-table-column prop="picture" label="分类图片" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.picture" :width="32" :height="32"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderNum" label="排序" width="200" align="center"></el-table-column>
|
||||
<el-table-column prop="builtSystem" label="是否系统内置" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
@ -104,6 +110,13 @@
|
|||
<!-- 添加或修改分类对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分类图片" prop="picture">
|
||||
<image-upload v-model="form.picture" :limit="1"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="form.parentId !== 0">
|
||||
<el-form-item label="上级分类" prop="parentId">
|
||||
|
|
|
@ -67,6 +67,12 @@
|
|||
<form-col :span="span" label="签名Key" prop="channelConfig.signKey">
|
||||
<el-input v-model="form.channelConfig.signKey" placeholder="请输入签名Key" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="请求主机" prop="channelConfig.httpUrl">
|
||||
<el-input v-model="form.channelConfig.httpUrl" placeholder="请输入请求主机" />
|
||||
</form-col>
|
||||
<form-col :span="span" label="SN" prop="channelConfig.sn">
|
||||
<el-input v-model="form.channelConfig.sn" placeholder="请输入SN" />
|
||||
</form-col>
|
||||
</template>
|
||||
|
||||
<!-- 国通星驿配置 -->
|
||||
|
|
|
@ -270,9 +270,6 @@ export default {
|
|||
{ required: true, message: "型号标签不能为空", trigger: "blur" },
|
||||
{ min: 1, type: 'array', message: "型号标签不能为空", trigger: "blur" }
|
||||
],
|
||||
productId: [
|
||||
{ required: true, message: "OneNet产品ID不能为空", trigger: "blur" }
|
||||
],
|
||||
sort: [
|
||||
{ required: true, message: "排序不允许为空", trigger: "blur" }
|
||||
],
|
||||
|
|
|
@ -44,17 +44,6 @@
|
|||
v-hasPermi="['system:notice:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:notice:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
|
|
|
@ -17,6 +17,14 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用名称" prop="appName">
|
||||
<el-input
|
||||
v-model="queryParams.appName"
|
||||
placeholder="请输入应用名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
|
|
Loading…
Reference in New Issue
Block a user