前端
This commit is contained in:
parent
db0c92e6a5
commit
7239471a95
37
fuintAdmin_zt/src/api/setting/message.js
Normal file
37
fuintAdmin_zt/src/api/setting/message.js
Normal file
@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 分页查询所有的订单信息
|
||||
export function getListApi(query) {
|
||||
return request({
|
||||
url: 'messageTemplate',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//
|
||||
export function deleteApi(ids) {
|
||||
return request({
|
||||
url: 'messageTemplate?idList=' + ids,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//
|
||||
export function saveApi(data) {
|
||||
return request({
|
||||
url: 'messageTemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 保存修改信息
|
||||
export function updateApi(data) {
|
||||
return request({
|
||||
url: 'messageTemplate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,8 @@
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="setting = true">
|
||||
<span>布局设置</span>
|
||||
<el-dropdown-item @click.native="prsswrod()">
|
||||
<span>修改密码</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
<span>退出登录</span>
|
||||
@ -59,6 +59,7 @@ import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import FuintDoc from '@/components/Fuint/Doc'
|
||||
import confirmLog from "@/views/coupon/confirmLog/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -95,6 +96,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
prsswrod(){
|
||||
console.log('方法')
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
|
@ -758,7 +758,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="用户名" prop="accountName">
|
||||
<el-input v-model="form.accountName" placeholder="请输入用户名" maxlength="50" autocomplete="off" />
|
||||
<el-input v-model="form.accountName" placeholder="请输入用户名" onkeyup="value=value.replace(/[^\x00-\xff]/g, '')" maxlength="50" autocomplete="off" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -593,8 +593,8 @@ export default {
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
left: '3%',
|
||||
right: '3%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
@ -387,7 +387,6 @@ export default {
|
||||
};
|
||||
|
||||
const option3 = {
|
||||
color: ['#FF9655', '#0DC291', '#409EFF'],
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
@ -399,25 +398,13 @@ export default {
|
||||
},
|
||||
|
||||
legend: {
|
||||
data: ['交易金额', '交易笔数', '活跃油站数']
|
||||
data: ['Evaporation','油品交易额','非油品交易额', '会员充值金额','会员消费金额', '会员余额']
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [
|
||||
'00:00',
|
||||
'02:00',
|
||||
'04:00',
|
||||
'06:00',
|
||||
'08:00',
|
||||
'10:00',
|
||||
'12:00',
|
||||
'14:00',
|
||||
'16:00',
|
||||
'18:00',
|
||||
'20:00',
|
||||
'22:00'
|
||||
],
|
||||
// data: ['中建锦绣广场1站', '中建锦绣广场2站', '中建锦绣广场3站', '中建锦绣广场4站', '中建锦绣广场5站', '中建锦绣广场6站', '中建锦绣广场7站'],
|
||||
data: storeNameList,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
@ -427,76 +414,133 @@ export default {
|
||||
{
|
||||
type: 'value',
|
||||
name: '金额(元)',
|
||||
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
name: '笔数',
|
||||
min: 0,
|
||||
max: 25,
|
||||
interval: 5,
|
||||
// min: 0,
|
||||
// max: 10000,
|
||||
// interval: 2000,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
}
|
||||
}
|
||||
// {
|
||||
// type: 'value',
|
||||
// name: '',
|
||||
// min: 0,
|
||||
// max: 25,
|
||||
// interval: 5,
|
||||
// axisLabel: {
|
||||
// formatter: '{value} '
|
||||
// }
|
||||
// }
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '活跃油站数',
|
||||
name: '油品交易额',
|
||||
color: '#FF9655',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' ml';
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
//这里设置柱形图圆角 5左上角,右上角,右下角,左下角]
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
data: [
|
||||
30.0, 31.9, 71.0, 23.2, 41.6, 31.7, 21.6, 30.0, 31.9, 71.0, 23.2, 41.6
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: '交易金额',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
}
|
||||
},
|
||||
data: [3.0, 3.9, 7.0, 2.2, 4.6, 3.7, 2.6, 3.0, 3.9, 7.0, 3.2, 4.6]
|
||||
barGap: '60%',
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: oilAmountList
|
||||
},
|
||||
{
|
||||
name: '交易笔数',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
name: '非油品交易额',
|
||||
color: '#55F3FF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' °C';
|
||||
return value;
|
||||
}
|
||||
},
|
||||
data: [2.0, 3.9, 4.0, 5.2, 4.6, 6.7, 7.6, 6.0, 5.9, 4.0, 4.2, 2.6]
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: noOilAmountList
|
||||
},
|
||||
{
|
||||
name: '会员充值金额',
|
||||
color: '#0DC291',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: rechargeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员消费金额',
|
||||
color: '#409EFF',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
// ]
|
||||
data: consumeBalanceList
|
||||
},
|
||||
{
|
||||
name: '会员余额',
|
||||
color: '#D55F5F',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value;
|
||||
}
|
||||
},
|
||||
barWidth: 13,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
barBorderRadius: [50, 50, 0, 0]
|
||||
}
|
||||
},
|
||||
// data: [
|
||||
// 2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
// ]
|
||||
data: userBalanceList
|
||||
}
|
||||
],
|
||||
grid: {
|
||||
left: '1%',
|
||||
right: '1%',
|
||||
left: '3%',
|
||||
right: '3%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
chart.setOption(option)
|
||||
|
@ -16,7 +16,7 @@ import shopowner from "@/views/homeComponents/shopowner.vue"
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
power:3
|
||||
power:2
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="90px">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="180px">
|
||||
<el-form-item label="" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
@ -41,28 +41,30 @@
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
>新增商品</el-button>
|
||||
>新增短信模板</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="name" label="商品名称"></el-table-column>
|
||||
<el-table-column prop="categoryName" label="商品分类"></el-table-column>
|
||||
<el-table-column prop="image" label="商品图片">
|
||||
<template slot-scope="scope">
|
||||
<ImagePreview :src="scope.row.image"></ImagePreview>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="formStore" label="采购商家"></el-table-column>
|
||||
<el-table-column prop="content" label="商品介绍"></el-table-column>
|
||||
<el-table-column prop="status" label="商品状态">
|
||||
<el-table-column prop="messageId" label="短信模板ID"></el-table-column>
|
||||
<el-table-column prop="name" label="短信名称"></el-table-column>
|
||||
<el-table-column prop="content" label="短信模板内容"></el-table-column>
|
||||
<!-- <el-table-column prop="image" label="短信图片">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <ImagePreview :src="scope.row.image"></ImagePreview>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="deptIds" label="适用范围"></el-table-column>
|
||||
<!-- <el-table-column prop="roleIds" label="接收角色"></el-table-column>-->
|
||||
|
||||
<el-table-column prop="status" label="短信状态">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status==0">
|
||||
未上架
|
||||
停用
|
||||
</div>
|
||||
<div v-else>
|
||||
已上架
|
||||
启用
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -95,31 +97,42 @@
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="80px">
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="35%" append-to-body>
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||
|
||||
<el-form-item label="商品名称" prop="name">
|
||||
<el-form-item label="短信模板ID" prop="messageId">
|
||||
<el-input v-model="form.messageId" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="短信名称" prop="name">
|
||||
<el-input v-model="form.name" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类" prop="categoryName">
|
||||
<el-select v-model="form.categoryName" style="width: 150px" placeholder="全部">
|
||||
<el-form-item label="适用范围" prop="storeId">
|
||||
<el-select v-model="form.deptIds" placeholder="请选择所属机构" style="width: 300px" >
|
||||
<el-option
|
||||
v-for="dict in dict.type.hardware_type"
|
||||
:key="dict.label"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
v-for="item in deptListSelect"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购商家" prop="formStore">
|
||||
<el-input v-model="form.formStore" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="image">
|
||||
<ImageUpload v-model="form.image"></ImageUpload>
|
||||
|
||||
<el-form-item label="即时配送">
|
||||
<el-switch v-model="form.status"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="商品介绍" prop="content">
|
||||
<el-input type="textarea" v-model="form.content"></el-input>
|
||||
<!-- <el-form-item label="适用角色" prop="categoryName">-->
|
||||
<!-- <el-select v-model="form.roleIds" style="width: 300px" placeholder="全部">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.role_ids"-->
|
||||
<!-- :key="dict.label"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.label"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="短信内容" prop="content" >
|
||||
<el-input type="textarea" v-model="form.content" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('form')">提交</el-button>
|
||||
@ -133,18 +146,18 @@
|
||||
|
||||
<script>
|
||||
|
||||
import {deleteApi, getListApi, saveApi, updateApi} from "@/api/setting/hardware";
|
||||
import {deleteApi, getListApi, saveApi, updateApi} from "@/api/setting/message";
|
||||
import { getToken } from '@/utils/auth'
|
||||
import {selectChildByDeptId} from "@/api/system/Site/site";
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
dicts: ['hardware_type','hardware_status'],
|
||||
dicts: ['dept_ids','role_ids'],
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
form: {
|
||||
|
||||
},
|
||||
form: {},
|
||||
deptListSelect:[],
|
||||
systemPositionList:[{
|
||||
value: '首页',
|
||||
label: '首页'
|
||||
@ -178,28 +191,38 @@ export default {
|
||||
hideUpload: false,
|
||||
// 表单校验
|
||||
rules: {
|
||||
messageId: [
|
||||
{ required: true, message: "短信模板id不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "商品名称不能为空", trigger: "blur" }
|
||||
{ required: true, message: "短信名称不能为空", trigger: "blur" }
|
||||
],
|
||||
categoryName: [
|
||||
{ required: true, message: "商品分类不能为空", trigger: "blur" }
|
||||
{ required: true, message: "短信分类不能为空", trigger: "blur" }
|
||||
],
|
||||
formStore: [
|
||||
{ required: true, message: "采购商家不能为空", trigger: "blur" }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: "商品图片不能为空", trigger: "blur" }
|
||||
{ required: true, message: "短信图片不能为空", trigger: "blur" }
|
||||
],
|
||||
content: [
|
||||
{ required: true, message: "商品介绍不能为空", trigger: "blur" }
|
||||
{ required: true, message: "短信介绍不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.selectChildByDeptIdApi()
|
||||
},
|
||||
methods: {
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.deptListSelect = res.data
|
||||
|
||||
})
|
||||
},
|
||||
getList(){
|
||||
getListApi(this.queryParams).then(res=>{
|
||||
this.tableData = res.data.records;
|
||||
@ -226,7 +249,6 @@ export default {
|
||||
this.getList()
|
||||
this.open = false
|
||||
}
|
||||
|
||||
})
|
||||
}else {
|
||||
saveApi(this.form).then(res=>{
|
||||
@ -268,16 +290,16 @@ export default {
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "新增商品"
|
||||
this.title = "新增短信"
|
||||
},
|
||||
edit(e) {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "修改商品"
|
||||
this.title = "修改短信"
|
||||
this.form = e
|
||||
},
|
||||
del(e) {
|
||||
this.$confirm('此操作将永久删除该商品, 是否继续?', '提示', {
|
||||
this.$confirm('此操作将永久删除该短信, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@ -303,7 +325,7 @@ export default {
|
||||
this.form= {
|
||||
id: null, // 自增id
|
||||
bannerName: '', // Banner名称
|
||||
productImage: '', // 商品图片
|
||||
productImage: '', // 短信图片
|
||||
systemPosition: '', // 系统位置
|
||||
sortOrder: null, // 排序号
|
||||
bannerLink: '', // Banner链接
|
||||
|
@ -21,6 +21,8 @@ export default {
|
||||
<div class="tab-box">
|
||||
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
|
||||
</div>
|
||||
|
||||
<div class="tabder-box" ></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -48,5 +50,10 @@ export default {
|
||||
.container{
|
||||
background: #F4F5F9;
|
||||
height: 100vh;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
}
|
||||
.tabder-box{
|
||||
width: 85%;
|
||||
}
|
||||
</style>
|
||||
|
@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.setting.entity.MessageTemplate;
|
||||
import com.fuint.business.setting.service.MessageTemplateService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -60,6 +62,8 @@ public class MessageTemplateController extends BaseController {
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject insert(@RequestBody MessageTemplate messageTemplate) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
messageTemplate.setCreateName(nowAccountInfo.getRealName());
|
||||
return getSuccessResult(this.messageTemplateService.save(messageTemplate));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.fuint.business.setting.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
@ -15,6 +18,7 @@ import java.io.Serializable;
|
||||
@Data
|
||||
public class MessageTemplate extends Model<MessageTemplate> {
|
||||
//主键
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
//短信名称
|
||||
private String name;
|
||||
@ -36,6 +40,8 @@ public class MessageTemplate extends Model<MessageTemplate> {
|
||||
private Date updateTime;
|
||||
//更新人
|
||||
private String updateBy;
|
||||
//短信模板id
|
||||
private Integer messageId;
|
||||
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ const mutations = {
|
||||
}
|
||||
|
||||
const actions = {
|
||||
// 修改布局设置
|
||||
// 修改
|
||||
changeSetting({ commit }, data) {
|
||||
commit('CHANGE_SETTING', data)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user