添加注释,修改分销设置提交方式,左侧菜单无法选中问题
parent
ae329419a6
commit
9130485631
|
@ -29,14 +29,6 @@
|
|||
<Spin size="large" fix v-if="spinShow"></Spin>
|
||||
</div>
|
||||
<empty v-else />
|
||||
<!-- 分页 -->
|
||||
<!-- <div class="page-size mt_10" v-if="paging">
|
||||
<Page :total="total" @on-change="changePageNum"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer>
|
||||
</Page>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -94,15 +86,6 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
changePageNum (val) { // 修改页码
|
||||
this.params.pageNumber = val;
|
||||
this.getList()
|
||||
},
|
||||
changePageSize (val) { // 修改页数
|
||||
this.pageNumber = 1;
|
||||
this.params.pageSize = val;
|
||||
this.getList()
|
||||
},
|
||||
buynow (skuId, goodsId) { // 跳转详情
|
||||
let url = this.$router.resolve({
|
||||
path: '/goodsDetail',
|
||||
|
|
|
@ -19,10 +19,7 @@
|
|||
<empty v-if="orderList.length === 0" />
|
||||
<div class="order-content" v-else>
|
||||
<template v-for="(order, onderIndex) in orderList">
|
||||
<div
|
||||
class="order-list"
|
||||
:key="onderIndex"
|
||||
>
|
||||
<div class="order-list" :key="onderIndex">
|
||||
<div class="order-header">
|
||||
<div>
|
||||
<div v-if="order.serviceStatus">{{filterOrderStatus(order.serviceStatus)}}</div>
|
||||
|
@ -32,7 +29,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ order.applyRefundPrice | unitPrice("¥") }}</span>
|
||||
<span>申请退款金额:<span class="global_color">{{ order.applyRefundPrice | unitPrice("¥") }}</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-body">
|
||||
|
@ -57,12 +54,11 @@
|
|||
<Button @click="goDetail(order.sn)" size="small">售后详情</Button>
|
||||
<Button @click="openModal(order)" v-if="order.serviceStatus == 'PASS' &&
|
||||
order.serviceType != 'RETURN_MONEY'" size="small">提交物流</Button>
|
||||
|
||||
<Button @click="cancel(order.sn)" v-if="order.afterSaleAllowOperationVO.cancel" size="small">取消售后</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>+
|
||||
</template>
|
||||
<Spin size="large" fix v-if="spinShow"></Spin>
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
|
|
|
@ -34,7 +34,10 @@
|
|||
<td>退款方式</td><td>{{afterSale.refundWay == 'ORIGINAL' ? '原路退回' : '账号退款'}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>退款金额</td><td>{{afterSale.actualRefundPrice | unitPrice('¥')}}</td>
|
||||
<td>申请退款金额</td><td>{{afterSale.applyRefundPrice | unitPrice('¥')}}</td>
|
||||
</tr>
|
||||
<tr v-if="afterSale.actualRefundPrice">
|
||||
<td>实际退款金额</td><td>{{afterSale.actualRefundPrice | unitPrice('¥')}}</td>
|
||||
</tr>
|
||||
<template v-if="afterSale.refundWay === 'OFFLINE'">
|
||||
<tr>
|
||||
|
|
|
@ -72,26 +72,12 @@ export const otherRouter = {
|
|||
name: "shop-detail",
|
||||
component: () => import("@/views/seller/shop/shopDetail.vue")
|
||||
},
|
||||
{
|
||||
path: "add-edit-message",
|
||||
title: "消息详情",
|
||||
name: "add_edit_message",
|
||||
component: () =>
|
||||
import("@/views/member/message-manage/addOrEditMessage.vue")
|
||||
},
|
||||
{
|
||||
path: "add_message",
|
||||
title: "会员站内信",
|
||||
name: "add_message",
|
||||
component: () => import("@/views/member/notice/addMessage.vue")
|
||||
},
|
||||
{
|
||||
path: "message-send-detail",
|
||||
title: "消息发送详情",
|
||||
name: "message_send_detail",
|
||||
component: () =>
|
||||
import("@/views/member/message-manage/messageSendDetail.vue")
|
||||
},
|
||||
{
|
||||
path: "bill-detail",
|
||||
title: "结算单详情",
|
||||
|
|
|
@ -57,8 +57,6 @@
|
|||
<script>
|
||||
import shrinkableMenu from "./main-components/shrinkable-menu/shrinkable-menu.vue";
|
||||
import tagsPageOpened from "./main-components/tags-page-opened.vue";
|
||||
import breadcrumbNav from "./main-components/breadcrumb-nav.vue";
|
||||
import fullScreen from "./main-components/fullscreen.vue";
|
||||
import messageTip from "./main-components/message-tip.vue";
|
||||
import circleLoading from "@/views/my-components/lili/circle-loading.vue";
|
||||
import Cookies from "js-cookie";
|
||||
|
@ -70,8 +68,6 @@ export default {
|
|||
components: {
|
||||
shrinkableMenu,
|
||||
tagsPageOpened,
|
||||
breadcrumbNav,
|
||||
fullScreen,
|
||||
messageTip,
|
||||
circleLoading,
|
||||
},
|
||||
|
|
|
@ -5,16 +5,19 @@
|
|||
|
||||
<Divider orientation="left">分销设置</Divider>
|
||||
<FormItem label="是否开启分销" prop="distribution">
|
||||
<i-switch size="large" v-model="form.isOpen" :true-value="true" :false-value="false" @on-change="handleSubmit">
|
||||
<i-switch size="large" v-model="form.isOpen" :true-value="true" :false-value="false">
|
||||
<span slot="open">开启</span>
|
||||
<span slot="close">关闭</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
<FormItem label="分销关系绑定天数" prop="distributionDay">
|
||||
<InputNumber :min="1" style="width:100px;" v-model="form.distributionDay" @on-change="handleSubmit"></InputNumber>
|
||||
<InputNumber :min="1" style="width:100px;" v-model="form.distributionDay"></InputNumber>
|
||||
</FormItem>
|
||||
<FormItem label="分销结算天数" prop="cashDay">
|
||||
<InputNumber :min="1" style="width:100px;" v-model="form.cashDay" @on-change="handleSubmit "></InputNumber>
|
||||
<InputNumber :min="1" style="width:100px;" v-model="form.cashDay"></InputNumber>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button type="primary" @click="submit">保存</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
</div>
|
||||
|
@ -36,22 +39,18 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取分销设置数据
|
||||
getDataList() {
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getSetting("DISTRIBUTION_SETTING").then((res) => {
|
||||
if (res.success) {
|
||||
this.form = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 提交数据
|
||||
handleSubmit() {
|
||||
this.$options.filters.debounce(this.submit(), 1500);
|
||||
},
|
||||
// 提交api
|
||||
submit() {
|
||||
setSetting("DISTRIBUTION_SETTING", this.form).then((res) => {
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row @keydown.enter.native="handleSearch"> </Row>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" >添加</Button>
|
||||
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Table
|
||||
|
@ -58,15 +56,13 @@ import {
|
|||
addGoodsUnit,
|
||||
getGoodsUnitPage,
|
||||
updateGoodsUnit,
|
||||
delGoodsUnit, delSensitive,
|
||||
delGoodsUnit
|
||||
} from "@/api/index";
|
||||
export default {
|
||||
name: "bill",
|
||||
components: {},
|
||||
name: "goods-unit",
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
|
@ -141,7 +137,7 @@ export default {
|
|||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
this.edit(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -174,46 +170,37 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
// 清除选中
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
// 选中回调
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
|
@ -227,12 +214,13 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
// 修改后提交
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
|
||||
if (this.modalType == 0) {
|
||||
if (this.modalTitle == "添加") {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
addGoodsUnit(this.form).then((res) => {
|
||||
|
@ -257,21 +245,22 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
this.form = {};
|
||||
this.$refs.form.resetFields();
|
||||
|
||||
this.modalVisible = true;
|
||||
},
|
||||
detail(v) {
|
||||
this.modalType = 1;
|
||||
// 编辑
|
||||
edit(v) {
|
||||
this.id = v.id;
|
||||
this.modalTitle = "修改";
|
||||
this.modalVisible = true;
|
||||
this.form.name = v.name;
|
||||
},
|
||||
// 删除
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
|
@ -290,6 +279,7 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
// 全部删除
|
||||
delAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
|
@ -314,9 +304,9 @@ export default {
|
|||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
|
|
@ -78,10 +78,7 @@
|
|||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveSpec"
|
||||
>提交
|
||||
</Button
|
||||
>
|
||||
<Button type="primary" :loading="submitLoading" @click="saveSpec">提交</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
|
@ -318,7 +315,6 @@ export default {
|
|||
content: "您确认要删除 " + v.specName + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delSpec(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
|
@ -345,7 +341,6 @@ export default {
|
|||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
delSpec(ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
<Button @click="handleSearch" type="primary" class="search-btn" icon="ios-search">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
||||
@on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" class="mt_10">
|
||||
<!-- 页面展示 -->
|
||||
<template slot="shopDisableSlot" slot-scope="scope">
|
||||
<div>
|
||||
|
@ -39,7 +38,7 @@
|
|||
<div class="show">
|
||||
<label>页面展示:</label>
|
||||
<i-switch size="large" true-value="OPEN" false-value="CLOSE" v-model="infoData.status"
|
||||
@on-change="changeRadio" style="margin-top: 3px">
|
||||
@on-change="changeSwitchView" style="margin-top: 3px">
|
||||
<span slot="open">展示</span>
|
||||
<span slot="close">隐藏</span>
|
||||
</i-switch>
|
||||
|
@ -56,7 +55,7 @@
|
|||
<List>
|
||||
<ListItem>
|
||||
<ListItemMeta :avatar="infoData.memberProfile" :title="infoData.memberName"
|
||||
:description="infoData.content"/>
|
||||
:description="infoData.content"/>
|
||||
</ListItem>
|
||||
<div class="" v-if="infoData.haveImage">
|
||||
评价图
|
||||
|
@ -98,11 +97,10 @@
|
|||
import * as API_Member from "@/api/member";
|
||||
|
||||
export default {
|
||||
name: "shop",
|
||||
components: {},
|
||||
name: "goods-review", // 会员评价
|
||||
data() {
|
||||
return {
|
||||
infoData: "", // 商品信息
|
||||
infoData: {}, // 商品信息
|
||||
infoFlag: false, // 评价展示
|
||||
infoTitle: "", // modal名称
|
||||
loading: true, // 表单加载状态
|
||||
|
@ -115,9 +113,6 @@ export default {
|
|||
startDate: "", // 起始时间
|
||||
endDate: "", // 终止时间
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
|
@ -223,7 +218,8 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
changeRadio(val) {
|
||||
// 切换查看switch
|
||||
changeSwitchView(val) {
|
||||
let status = val;
|
||||
API_Member.updateMemberReview(this.infoData.id, {status}).then(
|
||||
(res) => {
|
||||
|
@ -232,45 +228,27 @@ export default {
|
|||
}
|
||||
);
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
//列表直接选择页面是否展示
|
||||
changeSwitch(v) {
|
||||
let status = v.status;
|
||||
|
@ -278,9 +256,9 @@ export default {
|
|||
this.init();
|
||||
});
|
||||
},
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
API_Member.getMemberReview(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
|
@ -301,11 +279,10 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 删除评论
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除会员" + v.memberName + "的评论?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
|
@ -316,33 +293,6 @@ export default {
|
|||
},
|
||||
});
|
||||
},
|
||||
delAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
content: "您确认要删除所选的 " + this.selectCount + " 条数据?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function (e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
this.deleteRequest("/shop/delByIds/" + ids).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.clearSelectAll();
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
|
|
@ -170,8 +170,6 @@ h4 {
|
|||
.flow-box-splice:nth-last-of-type(1) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.flow-splice {
|
||||
}
|
||||
|
||||
.flow-box-splice,
|
||||
.flow-member,
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- 统计 -->
|
||||
|
||||
<div class="card">
|
||||
<h4>
|
||||
|
||||
基本信息
|
||||
</h4>
|
||||
<div class="count-list flex">
|
||||
|
@ -16,7 +14,6 @@
|
|||
<div class="counts">{{homeData.goodsNum ||0}}</div>
|
||||
<div>商品数量</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="count-item" @click="navigateTo('memberList')">
|
||||
<div>
|
||||
|
@ -52,7 +49,6 @@
|
|||
</div>
|
||||
|
||||
<!-- 今日待办 -->
|
||||
|
||||
<div class="card">
|
||||
<h4>今日待办</h4>
|
||||
<div class="todo-list flex">
|
||||
|
@ -88,10 +84,7 @@
|
|||
<div class="flow-list flex">
|
||||
<div class="flow-item ">
|
||||
<div class="flow-member">
|
||||
<div>
|
||||
|
||||
当前在线人数
|
||||
</div>
|
||||
<div>当前在线人数</div>
|
||||
<span>
|
||||
{{homeData.currentNumberPeopleOnline || 0}}
|
||||
</span>
|
||||
|
@ -149,7 +142,6 @@
|
|||
</div>
|
||||
<div class="today-item">
|
||||
<div>今日交易额</div>
|
||||
|
||||
<span>¥{{homeData.todayOrderPrice ? (homeData.todayOrderPrice | unitPrice) : 0}}</span>
|
||||
</div>
|
||||
<div class="today-item">
|
||||
|
@ -209,15 +201,11 @@
|
|||
|
||||
<script>
|
||||
import { homeStatistics, hotGoods, hotShops, getNoticePage } from "@/api/index";
|
||||
import show from "./show.vue";
|
||||
import * as API_Goods from "@/api/goods";
|
||||
import { Chart } from "@antv/g2";
|
||||
import * as API_Member from "@/api/member";
|
||||
export default {
|
||||
name: "home",
|
||||
components: {
|
||||
show,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tophotShopsColumns: [ // 表格表头
|
||||
|
@ -298,16 +286,8 @@ export default {
|
|||
},
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
currNav() {
|
||||
return this.$store.state.app.currNav;
|
||||
},
|
||||
avatarPath() {
|
||||
return localStorage.avatorImgPath;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 路由跳转
|
||||
navigateTo(name) {
|
||||
this.$router.push({
|
||||
name,
|
||||
|
@ -366,7 +346,7 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
|
||||
// 订单表
|
||||
initOrderChart() {
|
||||
// 默认已经加载 legend-filter 交互
|
||||
let data = this.chartList;
|
||||
|
@ -402,9 +382,6 @@ export default {
|
|||
this.orderChart.render();
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 浏览量统计图
|
||||
initPvChart() {
|
||||
let uv = [];
|
||||
|
@ -477,7 +454,8 @@ export default {
|
|||
this.initPvChart();
|
||||
}
|
||||
});
|
||||
}, // 实例化会员流量图表
|
||||
},
|
||||
// 实例化会员流量图表
|
||||
async initHistoryMemberChartList() {
|
||||
const res = await API_Member.historyMemberChartList();
|
||||
if (res.success) {
|
||||
|
@ -495,6 +473,7 @@ export default {
|
|||
this.initHistoryMemberChart();
|
||||
}
|
||||
},
|
||||
// 历史在线人数
|
||||
initHistoryMemberChart(){
|
||||
// 默认已经加载 legend-filter 交互
|
||||
let data = this.chartList;
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<Card>
|
||||
<Row>
|
||||
<Form
|
||||
ref="searchForm"
|
||||
inline
|
||||
:label-width="70"
|
||||
|
||||
@keydown.enter.native="handleGo"
|
||||
>
|
||||
<Form-item label="链接地址" prop="url">
|
||||
<Input type="text" v-model="url" placeholder="http://" clearable style="width: 350px" />
|
||||
</Form-item>
|
||||
<Form-item style="margin-left:-50px;">
|
||||
<Button @click="handleGo" type="primary" icon="ios-send" style="margin-right:5px">前往</Button>
|
||||
<Button @click="handleOpen" icon="md-open">新窗口中打开</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Divider style="margin-top:-10px;margin-bottom:0px;" />
|
||||
<Row>
|
||||
<div style="position:relative;">
|
||||
<iframe
|
||||
id="iframe"
|
||||
:src="go"
|
||||
frameborder="0"
|
||||
width="100%"
|
||||
:height="height"
|
||||
scrolling="auto"
|
||||
></iframe>
|
||||
<Spin fix size="large" v-if="loading"></Spin>
|
||||
</div>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "show",
|
||||
data() {
|
||||
return {
|
||||
loading: false, // 加载状态
|
||||
go: "", // 跳转地址
|
||||
url: "", // 链接地址
|
||||
height: "525px" // iframe高度
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currNav() {
|
||||
return this.$store.state.app.currNav;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initUrl() {
|
||||
let url;
|
||||
if (this.currNav == "doc") {
|
||||
url = "https://www.kancloud.cn/lili/lili/content";
|
||||
}
|
||||
if (url) {
|
||||
this.url = url;
|
||||
this.go = url;
|
||||
}
|
||||
},
|
||||
handleGo() {
|
||||
this.go = this.url;
|
||||
},
|
||||
handleOpen() {
|
||||
window.open(this.url);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currNav(v, oldV) {
|
||||
this.initUrl();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 计算高度
|
||||
let height = document.documentElement.clientHeight;
|
||||
this.height = Number(height - 217) + "px";
|
||||
this.initUrl();
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -3,11 +3,8 @@
|
|||
<div class="breadcrumb">
|
||||
<span @click="clickBreadcrumb(item,index)" :class="{'active':item.selected}" v-for="(item,index) in dateList" :key="index"> {{item.title}}</span>
|
||||
<div class="date-picker">
|
||||
|
||||
<Select @on-change="changeSelect(selectedWay)" v-model="month" placeholder="年月查询" style="width:200px;margin-left:10px;">
|
||||
|
||||
<Option v-for="(item,index) in dates" :value="item.year+'-'+item.month" :key="index">{{ item.year+'年'+item.month+'月' }}</Option>
|
||||
|
||||
</Select>
|
||||
</div>
|
||||
<div class="shop-list" v-if="!closeShop">
|
||||
|
@ -72,6 +69,7 @@ export default {
|
|||
this.getShopList();
|
||||
},
|
||||
methods: {
|
||||
// 页面触底
|
||||
handleReachBottom() {
|
||||
setTimeout(() => {
|
||||
if (this.params.pageNumber * this.params.pageSize <= this.total) {
|
||||
|
@ -80,6 +78,7 @@ export default {
|
|||
}
|
||||
}, 1500);
|
||||
},
|
||||
// 查询店铺列表
|
||||
getShopList() {
|
||||
getShopListData(this.params).then((res) => {
|
||||
if (res.success) {
|
||||
|
@ -92,6 +91,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 变更店铺
|
||||
changeshop(val) {
|
||||
this.selectedWay.storeId = this.storeId;
|
||||
this.$emit("selected", this.selectedWay);
|
||||
|
@ -118,7 +118,7 @@ export default {
|
|||
}
|
||||
this.dates = dates.reverse();
|
||||
},
|
||||
|
||||
// 改变已选店铺
|
||||
changeSelect() {
|
||||
console.log(this.month);
|
||||
if (this.month) {
|
||||
|
@ -130,11 +130,10 @@ export default {
|
|||
this.selectedWay.searchType = "";
|
||||
|
||||
this.$emit("selected", this.selectedWay);
|
||||
// console.log(this.$emit("selected", this.selectedWay));
|
||||
} else {
|
||||
}
|
||||
},
|
||||
|
||||
// 变更时间
|
||||
clickBreadcrumb(item) {
|
||||
this.dateList.forEach((res) => {
|
||||
res.selected = false;
|
||||
|
@ -148,7 +147,6 @@ export default {
|
|||
}
|
||||
|
||||
this.selectedWay = item;
|
||||
// this.month = "";
|
||||
this.selectedWay.year = new Date().getFullYear();
|
||||
this.selectedWay.month = "";
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ export default {
|
|||
|
||||
props: ['addressId'],
|
||||
methods: {
|
||||
// 选择地区回调
|
||||
change(val, selectedData) {
|
||||
/**
|
||||
* @returns [regionId,region]
|
||||
|
@ -44,6 +45,7 @@ export default {
|
|||
handleChangeOnSelect(value) {
|
||||
this.changeOnSelect = value;
|
||||
},
|
||||
// 加载地区数据
|
||||
loadData(item, callback) {
|
||||
item.loading = true;
|
||||
API_Setup.getChildRegion(item.value).then((res) => {
|
||||
|
@ -83,6 +85,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 初始化
|
||||
init() {
|
||||
API_Setup.getChildRegion(this.id).then((res) => {
|
||||
let way = [];
|
||||
|
@ -105,7 +108,6 @@ export default {
|
|||
}
|
||||
way.push(data);
|
||||
});
|
||||
|
||||
this.data = way;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,246 +0,0 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="wap-content">
|
||||
<div class="query-wrapper">
|
||||
<div class="query-item">
|
||||
<div>搜索范围</div>
|
||||
<Input placeholder="商品名称" @on-clear="goodsData=[]; goodsParams.goodsName=''; goodsParams.pageNumber = 1; getQueryGoodsList()" @on-enter="()=>{goodsData=[];goodsParams.pageNumber =1; getQueryGoodsList();}" icon="ios-search" clearable
|
||||
style="width: 150px" v-model="goodsParams.goodsName" />
|
||||
</div>
|
||||
<div class="query-item">
|
||||
<Cascader v-model="category" placeholder="请选择商品分类" style="width: 250px" :data="skuList"></Cascader>
|
||||
</div>
|
||||
<div class="query-item">
|
||||
<Button type="primary" @click="goodsData=[]; getQueryGoodsList();" icon="ios-search">搜索</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="positon:retavle;">
|
||||
<Scroll class="wap-content-list" :on-reach-bottom="handleReachBottom" :distance-to-edge="[3,3]">
|
||||
<div class="wap-content-item" :class="{ active: item.selected }" @click="checkedGoods(item, index)" v-for="(item, index) in goodsData" :key="index">
|
||||
<div>
|
||||
<img :src="item.thumbnail" alt="" />
|
||||
</div>
|
||||
<div class="wap-content-desc">
|
||||
<div class="wap-content-desc-title">{{ item.goodsName }}</div>
|
||||
<div class="wap-sku">{{ item.goodsUnit }}</div>
|
||||
<div class="wap-content-desc-bottom">
|
||||
<div>¥{{ item.price | unitPrice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Spin size="large" fix v-if="loading"></Spin>
|
||||
|
||||
<div v-if="empty" class="empty">暂无商品信息</div>
|
||||
</Scroll>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as API_Goods from "@/api/goods";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: "multiple", //单选或者多选 single multiple
|
||||
|
||||
skuList: [], // 商品sku列表
|
||||
total: "", // 商品总数
|
||||
goodsParams: { // 商品请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 18,
|
||||
order: "desc",
|
||||
goodsName: "",
|
||||
sn: "",
|
||||
categoryPath: "",
|
||||
marketEnable: "UPPER",
|
||||
isAuth: "PASS",
|
||||
},
|
||||
category: [], // 分类
|
||||
goodsData: [], // 商品数据
|
||||
empty: false, // 空数据
|
||||
loading: false, // 加载状态
|
||||
};
|
||||
},
|
||||
props: {
|
||||
selectedWay: {
|
||||
type: Array,
|
||||
default: new Array()
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
category(val) {
|
||||
this.goodsParams.categoryPath = val[0];
|
||||
},
|
||||
selectedWay: {
|
||||
handler() {
|
||||
this.$emit("selected", this.selectedWay);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
|
||||
"goodsParams.categoryPath": {
|
||||
handler: function () {
|
||||
this.goodsData = [];
|
||||
(this.goodsParams.pageNumber = 0), this.getQueryGoodsList();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
handleReachBottom() {
|
||||
setTimeout(() => {
|
||||
if (
|
||||
this.goodsParams.pageNumber * this.goodsParams.pageSize <=
|
||||
this.total
|
||||
) {
|
||||
this.goodsParams.pageNumber++;
|
||||
this.getQueryGoodsList();
|
||||
}
|
||||
}, 1500);
|
||||
},
|
||||
getQueryGoodsList() {
|
||||
API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
|
||||
this.initGoods(res);
|
||||
});
|
||||
},
|
||||
|
||||
initGoods(res) {
|
||||
if (res.result.records.length !=0) {
|
||||
res.result.records.forEach((item) => {
|
||||
item.selected = false;
|
||||
item.___type = "goods"; //设置为goods让pc wap知道标识
|
||||
|
||||
this.selectedWay.forEach(e => {
|
||||
if (e.id === item.id) {
|
||||
item.selected = true
|
||||
}
|
||||
})
|
||||
});
|
||||
/**
|
||||
* 解决数据请求中,滚动栏会一直上下跳动
|
||||
*/
|
||||
this.total = res.result.total;
|
||||
this.goodsData.push(...res.result.records);
|
||||
|
||||
} else {
|
||||
this.empty = true;
|
||||
}
|
||||
},
|
||||
// 查询商品
|
||||
init() {
|
||||
API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
|
||||
// 商品
|
||||
this.initGoods(res);
|
||||
});
|
||||
if (localStorage.getItem('category')) {
|
||||
this.deepGroup(JSON.parse(localStorage.getItem('category')))
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.deepGroup(JSON.parse(localStorage.getItem('category')))
|
||||
},3000)
|
||||
}
|
||||
},
|
||||
|
||||
deepGroup(val) {
|
||||
val.forEach((item) => {
|
||||
let childWay = []; //第二级
|
||||
// 第二层
|
||||
if (item.children) {
|
||||
item.children.forEach((child) => {
|
||||
// // 第三层
|
||||
if (child.children) {
|
||||
child.children.forEach((grandson, index, arr) => {
|
||||
arr[index] = {
|
||||
value: grandson.id,
|
||||
label: grandson.name,
|
||||
children: "",
|
||||
};
|
||||
});
|
||||
}
|
||||
let children = {
|
||||
value: child.id,
|
||||
label: child.name,
|
||||
children: child.children,
|
||||
};
|
||||
childWay.push(children);
|
||||
});
|
||||
}
|
||||
// 第一层
|
||||
let way = {
|
||||
value: item.id,
|
||||
label: item.name,
|
||||
children: childWay,
|
||||
};
|
||||
|
||||
this.skuList.push(way);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 点击商品
|
||||
*/
|
||||
checkedGoods(val, index) {
|
||||
// 如果单选的话
|
||||
if (this.type != "multiple") {
|
||||
this.goodsData.forEach((item) => {
|
||||
item.selected = false;
|
||||
});
|
||||
this.selectedWay = [];
|
||||
val.selected = true;
|
||||
this.selectedWay.push(val);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (val.selected == false) {
|
||||
val.selected = true;
|
||||
this.selectedWay.push(val);
|
||||
} else {
|
||||
val.selected = false;
|
||||
for (let i = 0; i<this.selectedWay.length; i++ ) {
|
||||
if (this.selectedWay[i].id===val.id) {
|
||||
this.selectedWay.splice(i,1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "./style.scss";
|
||||
.wap-content {
|
||||
width: 100%;
|
||||
}
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 8px 0;
|
||||
width: 100%;
|
||||
}
|
||||
.wap-content {
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
}
|
||||
.wap-content-list {
|
||||
position: relative;
|
||||
}
|
||||
.wap-content-item {
|
||||
width: 210px;
|
||||
margin: 10px 7px;
|
||||
padding: 6px 0;
|
||||
}
|
||||
// .wap-content-item{
|
||||
|
||||
// }
|
||||
.active {
|
||||
background: url("../../assets/selected.png") no-repeat;
|
||||
background-position: right;
|
||||
background-size: 10%;
|
||||
}
|
||||
</style>
|
|
@ -45,7 +45,7 @@ export default {
|
|||
type: "multiple", //单选或者多选 single multiple
|
||||
|
||||
skuList: [], // 商品sku列表
|
||||
total: "", // 商品总数
|
||||
total: 0, // 商品总数
|
||||
goodsParams: { // 商品请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 18,
|
||||
|
@ -79,7 +79,6 @@ export default {
|
|||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
|
||||
"goodsParams.categoryPath": {
|
||||
handler: function () {
|
||||
this.goodsData = [];
|
||||
|
@ -92,6 +91,7 @@ export default {
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 触底加载更多方法
|
||||
handleReachBottom() {
|
||||
setTimeout(() => {
|
||||
if (
|
||||
|
@ -103,12 +103,13 @@ export default {
|
|||
}
|
||||
}, 1500);
|
||||
},
|
||||
// 获取商品列表
|
||||
getQueryGoodsList() {
|
||||
API_Goods.getGoodsSkuData(this.goodsParams).then((res) => {
|
||||
this.initGoods(res);
|
||||
});
|
||||
},
|
||||
|
||||
// 获取列表方法
|
||||
initGoods(res) {
|
||||
if (res.result.records.length !=0) {
|
||||
res.result.records.forEach((item) => {
|
||||
|
|
|
@ -14,12 +14,10 @@
|
|||
<script>
|
||||
import goodsDialog from "./goods-dialog";
|
||||
import linkDialog from "./link-dialog";
|
||||
import couponDialog from "./coupon-dialog";
|
||||
export default {
|
||||
components: {
|
||||
goodsDialog,
|
||||
linkDialog,
|
||||
couponDialog,
|
||||
linkDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -44,6 +42,7 @@ export default {
|
|||
}
|
||||
}, 100);
|
||||
},
|
||||
// 点击确认
|
||||
clickOK() {
|
||||
if (this.goodsFlag) {
|
||||
this.$emit("selectedGoodsData", this.goodsData);
|
||||
|
@ -52,6 +51,7 @@ export default {
|
|||
}
|
||||
this.clickClose();
|
||||
},
|
||||
// 打开组件方法
|
||||
open(type, mutiple) {
|
||||
this.flag = true;
|
||||
if (type == "goods") {
|
||||
|
@ -64,6 +64,7 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
// 关闭组件
|
||||
close() {
|
||||
this.flag = false;
|
||||
},
|
||||
|
|
|
@ -1,96 +1,112 @@
|
|||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.wap-list {
|
||||
flex: 2;
|
||||
text-align: center;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
> .wap-list,
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
.wap-content {
|
||||
flex: 8;
|
||||
}
|
||||
}
|
||||
.wap-sku {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-wrapper {
|
||||
display: flex;
|
||||
margin: 8px 0;
|
||||
> .query-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
/deep/ .ivu-scroll-container {
|
||||
width: 100% !important;
|
||||
height: 400px !important;
|
||||
}
|
||||
/deep/ .ivu-scroll-content {
|
||||
/* */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.wap-content-list {
|
||||
.wap-list {
|
||||
flex: 2;
|
||||
text-align: center;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
>.wap-list,
|
||||
|
||||
.wap-content {
|
||||
flex: 8;
|
||||
}
|
||||
}
|
||||
|
||||
.wap-sku {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.query-wrapper {
|
||||
display: flex;
|
||||
margin: 8px 0;
|
||||
|
||||
>.query-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
>* {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .ivu-scroll-container {
|
||||
width: 100% !important;
|
||||
height: 400px !important;
|
||||
}
|
||||
|
||||
/deep/ .ivu-scroll-content {
|
||||
/* */
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wap-content-list {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.wap-item {
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wap-item:hover {
|
||||
background: #ededed;
|
||||
background: #ededed;
|
||||
}
|
||||
|
||||
|
||||
.wap-content-item {
|
||||
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
|
||||
display: flex;
|
||||
height: 80px;
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
margin: 10px ;
|
||||
/deep/ img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
.wap-content-desc {
|
||||
width: 180px;
|
||||
padding: 8px;
|
||||
> .wap-content-desc-title {
|
||||
display: -webkit-box;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
display: flex;
|
||||
height: 80px;
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
margin: 10px;
|
||||
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
> .wap-content-desc-bottom {
|
||||
font-size: 12px;
|
||||
padding: 4px 0;
|
||||
color: #999;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
> div:nth-of-type(1) {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
/deep/ img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wap-content-desc {
|
||||
width: 180px;
|
||||
padding: 8px;
|
||||
|
||||
>.wap-content-desc-title {
|
||||
display: -webkit-box;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
>.wap-content-desc-bottom {
|
||||
font-size: 12px;
|
||||
padding: 4px 0;
|
||||
color: #999;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
>div:nth-of-type(1) {
|
||||
color: $theme_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<template>
|
||||
<div class="empty">
|
||||
<img src="../../assets/empty.png" alt="">
|
||||
暂无数据
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.empty{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
>img{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -175,7 +175,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 删除模板
|
||||
delTemplate(id) {
|
||||
API_floor.removePageHome(id).then((res) => {
|
||||
if (res.success) {
|
||||
|
@ -184,8 +184,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -25,13 +25,6 @@
|
|||
<i-input v-model="searchData" size="large" placeholder="输入你想查找的商品">
|
||||
<Button slot="append">搜索</Button>
|
||||
</i-input>
|
||||
<!-- <Tag
|
||||
v-for="(item, index) in promotionTags"
|
||||
:key="index"
|
||||
class="mt_10"
|
||||
>
|
||||
{{item}}
|
||||
</Tag> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-con">
|
||||
|
@ -185,6 +178,7 @@ export default {
|
|||
if(item) this.selectedNav = item;
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
// 已选链接
|
||||
selectedLink(val) {
|
||||
console.log(val);
|
||||
if(this.showModalNav){
|
||||
|
@ -202,9 +196,11 @@ export default {
|
|||
)
|
||||
console.log(this.navList.list)
|
||||
},
|
||||
// 拖动结束回调
|
||||
handleMoveEnd ({newIndex, oldIndex}) {
|
||||
console.log('index', newIndex, oldIndex)
|
||||
},
|
||||
// 修改顶部广告
|
||||
handleModel (type) {
|
||||
if(type == 'topAdvert'){
|
||||
this.showModal = true;
|
||||
|
@ -212,6 +208,7 @@ export default {
|
|||
this.showModalNav = true;
|
||||
}
|
||||
},
|
||||
// 选择图片
|
||||
handleSelectImg() {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
|
@ -236,9 +233,6 @@ export default {
|
|||
model: this.data.list[newIndex].type + '_' + key
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -58,38 +58,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 首页品牌 -->
|
||||
<!-- <template v-if="element.type == 'brand'">
|
||||
<div class="brand">
|
||||
<div class="brand-view">
|
||||
<div class="brand-view-content" v-for="(brand,index) in element.options.brandViewList" :key="index">
|
||||
<div class="brand-view-title">
|
||||
<span><span class="fontsize_18 fw_bold">{{brand.nameCn}}</span> <span class="fw_bold">{{brand.nameEn}}</span></span>
|
||||
<span>更多></span>
|
||||
</div>
|
||||
<div class="brand-view-img">
|
||||
<img :src="brand.img" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="brand-list">
|
||||
<li v-for="(sign,index) in element.options.signList" :key="index">
|
||||
<div class="brand-img">
|
||||
<img :src="sign.img" alt="">
|
||||
</div>
|
||||
<div class="brand-mash">
|
||||
<Icon type="ios-heart-outline" />
|
||||
<div>关注人数:{{ sign.follow }}</div>
|
||||
<div>点击进入</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="refresh">
|
||||
<Icon type="md-refresh" />
|
||||
<div>换一批</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template> -->
|
||||
<!-- 好货推荐 -->
|
||||
<template v-if="element.type == 'recommend'">
|
||||
<recommend :data="element"></recommend>
|
||||
|
@ -188,15 +156,14 @@ export default {
|
|||
selected:{}, // 已选数据
|
||||
picModelFlag: false // 图片选择器
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 编辑模块
|
||||
handleSelectModel (item) {
|
||||
this.selected = item;
|
||||
this.showModal = true
|
||||
},
|
||||
// 删除模块
|
||||
handleModelDelete () {
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
|
@ -212,28 +179,25 @@ export default {
|
|||
handleSelectLink(item,index) { // 调起选择链接弹窗
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
// 确定选择链接
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);;
|
||||
},
|
||||
// 拖动结束回调
|
||||
handleMoveEnd ({newIndex, oldIndex}) {
|
||||
console.log('index', newIndex, oldIndex)
|
||||
},
|
||||
handleEditModel (type) {
|
||||
this.showModal = true;
|
||||
},
|
||||
handleSelectImg(){ // 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
},
|
||||
// 回显图片
|
||||
callbackSelected (val) {
|
||||
this.picModelFlag = false;
|
||||
this.selected.img = val.url;
|
||||
}
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -139,6 +139,7 @@ export default {
|
|||
// 编辑模块
|
||||
this.showModal = true;
|
||||
},
|
||||
// 添加轮播图
|
||||
handleAdd () {
|
||||
this.data.options.list.push({ img: "", url: "" });
|
||||
this.$forceUpdate();
|
||||
|
@ -161,6 +162,7 @@ export default {
|
|||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
console.log(this.selected.url);
|
||||
},
|
||||
// 选择图片
|
||||
handleSelectImg(item) {
|
||||
this.selected = item;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
|
|
|
@ -81,6 +81,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods:{
|
||||
// 打开装修modal
|
||||
handleSelectModel (item,type) {
|
||||
this.selected = item;
|
||||
this.showModal = true
|
||||
|
@ -88,7 +89,7 @@ export default {
|
|||
handleSelectLink(item,index) { // 调起选择链接弹窗
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
|
||||
// 选择链接回调
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);;
|
||||
},
|
||||
|
@ -96,6 +97,7 @@ export default {
|
|||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
},
|
||||
// 选择图片回调
|
||||
callbackSelected (val) {
|
||||
this.picModelFlag = false;
|
||||
this.selected.img = val.url;
|
||||
|
|
|
@ -160,6 +160,7 @@ export default {
|
|||
}
|
||||
},
|
||||
methods:{
|
||||
// 装修modal
|
||||
handleSelectModel (item, type) {
|
||||
this.selected = item;
|
||||
console.warn(item);
|
||||
|
@ -181,9 +182,11 @@ export default {
|
|||
this.$refs.liliDialog.goodsData = [this.selected]
|
||||
}, 500);
|
||||
},
|
||||
// 选择链接回调
|
||||
selectedLink (val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
},
|
||||
// 选择商品回调
|
||||
selectedGoodsData (val) {
|
||||
console.log(val);
|
||||
let goods = val[0]
|
||||
|
@ -193,17 +196,11 @@ export default {
|
|||
this.selected.name = goods.goodsName
|
||||
this.selected.url = `/goodsDetail?skuId=${goods.id}&goodsId=${goods.goodsId}`
|
||||
},
|
||||
|
||||
handleMoveEnd ({newIndex, oldIndex}) {
|
||||
console.log('index', newIndex, oldIndex)
|
||||
},
|
||||
handleEditModel (type) {
|
||||
this.showModal = true;
|
||||
},
|
||||
handleSelectImg(){ // 选择图片
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
},
|
||||
// 选择图片回显
|
||||
callbackSelected (val) {
|
||||
this.picModelFlag = false;
|
||||
this.selected.img = val.url;
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
<tr v-for="(item, index) in conData.options.navList" :key="index">
|
||||
<td><Input v-model="item.title" /></td>
|
||||
<td><Input v-model="item.desc" /></td>
|
||||
<!-- <td><Input v-model="item.sort"/></td> -->
|
||||
<td v-if="index!=0">
|
||||
<Button type="error" size="small" @click="handleDelNav(index)">删除</Button>
|
||||
</td>
|
||||
|
@ -62,7 +61,6 @@
|
|||
<!-- 选择商品。链接 -->
|
||||
<liliDialog
|
||||
ref="liliDialog"
|
||||
@selectedLink="selectedLink"
|
||||
@selectedGoodsData="selectedGoodsData"
|
||||
></liliDialog>
|
||||
</div>
|
||||
|
@ -91,31 +89,25 @@ export default {
|
|||
conData:function(val){
|
||||
this.$emit('content',val)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
// tab点击切换
|
||||
changeCurr(index){
|
||||
this.currentIndex = index;
|
||||
},
|
||||
// 编辑
|
||||
handleSelectModel (item,type) {
|
||||
this.selected = item;
|
||||
this.showModal = true
|
||||
},
|
||||
handleSelectLink(item,index) { // 调起选择链接弹窗
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
handleSelectGoods(item) { // 调起选择链接弹窗
|
||||
handleSelectGoods(item) { // 调起选择商品弹窗
|
||||
if(item) this.selected = item;
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
setTimeout(() => {
|
||||
this.$refs.liliDialog.goodsData = [this.selected]
|
||||
}, 500);
|
||||
},
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
},
|
||||
// 选择商品回调
|
||||
selectedGoodsData(val){
|
||||
console.log(val)
|
||||
let goods = val[0]
|
||||
|
|
|
@ -227,6 +227,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 编辑
|
||||
handleSelectModel(item, type) {
|
||||
this.selected = item;
|
||||
if (type) {
|
||||
|
@ -243,9 +244,11 @@ export default {
|
|||
// 调起选择商品
|
||||
this.$refs.liliDialog.open('goods', 'single')
|
||||
},
|
||||
// 选择链接回调
|
||||
selectedLink(val) {
|
||||
this.selected.url = this.$options.filters.formatLinkType(val);
|
||||
},
|
||||
// 选择商品回调
|
||||
selectedGoodsData(val) {
|
||||
console.log(val);
|
||||
let goods = val[0];
|
||||
|
@ -259,6 +262,7 @@ export default {
|
|||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
},
|
||||
// 选择图片回调
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.selected.img = val.url;
|
||||
|
|
|
@ -86,9 +86,6 @@ export default {
|
|||
this.modelForm = { list: [] };
|
||||
}
|
||||
}
|
||||
|
||||
// this.$refs.modelForm.topAdvert = {};
|
||||
// this.$refs.modelForm.navList = {}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -94,19 +94,12 @@ export default {
|
|||
|
||||
linkType: "", // 选择类型
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 点击链接
|
||||
clickLink(item) {
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
|
||||
|
||||
//点击图片解析成base64
|
||||
changeFile(item, index) {
|
||||
const file = document.getElementById("files" + index).files[0];
|
||||
|
@ -122,7 +115,6 @@ export default {
|
|||
// 点击选择照片
|
||||
handleClickFile(item, index) {
|
||||
document.getElementById("files" + index).click();
|
||||
// console.log(let files = files)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -69,14 +69,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <Button type="primary" @click="addDecorate()" ghost>添加</Button> -->
|
||||
<liliDialog ref="liliDialog" :types="linkType"></liliDialog>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -91,18 +89,12 @@ export default {
|
|||
],
|
||||
linkType: "", // 选择类型
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 点击链接
|
||||
clickLink(item) {
|
||||
this.$refs.liliDialog.open('link')
|
||||
},
|
||||
|
||||
|
||||
//点击图片解析成base64
|
||||
changeFile(item, index) {
|
||||
const file = document.getElementById("files" + index).files[0];
|
||||
|
@ -118,7 +110,6 @@ export default {
|
|||
// 点击选择照片
|
||||
handleClickFile(item, index) {
|
||||
document.getElementById("files" + index).click();
|
||||
// console.log(let files = files)
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -168,20 +168,15 @@ export default {
|
|||
},
|
||||
},
|
||||
props: ["res"],
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 选择风格
|
||||
selectStyle() {
|
||||
this.styleFlag = !this.styleFlag;
|
||||
},
|
||||
|
||||
// 回调选择的链接
|
||||
selectedLink(val) {
|
||||
this.selectedLinks.url = val;
|
||||
|
||||
console.log(this.selectedLinks);
|
||||
},
|
||||
|
||||
// 回调的商品信息
|
||||
selectedGoodsData(val) {
|
||||
if (!val) return false;
|
||||
|
@ -194,10 +189,8 @@ export default {
|
|||
this.res.options.list[0].listWay = this.res.options.list[0].listWay.concat(
|
||||
val
|
||||
);
|
||||
|
||||
this.linkType = "";
|
||||
},
|
||||
|
||||
// 绑定商品
|
||||
bindGoodsId(val) {
|
||||
this.selectedGoods = val;
|
||||
|
@ -208,7 +201,7 @@ export default {
|
|||
this.$emit("handleDrawer", item);
|
||||
this.styleFlag = false;
|
||||
},
|
||||
|
||||
// 打开图片选择器
|
||||
liliDialogFlag(flag) {
|
||||
this.$refs.liliDialog.goodsFlag = flag;
|
||||
this.$refs.liliDialog.flag = true;
|
||||
|
@ -216,14 +209,9 @@ export default {
|
|||
|
||||
// 点击链接赋值一个唯一值,并将当前选择的模块赋值
|
||||
clickLink(val, index) {
|
||||
// this.selectedLinkIndex = index
|
||||
// val.___only = new Date().getTime(), //赋值当前时间戳 唯一
|
||||
this.selectedLinks = val;
|
||||
|
||||
console.log(this.selectedLinks);
|
||||
this.liliDialogFlag(false);
|
||||
},
|
||||
|
||||
//点击图片解析成base64
|
||||
changeFile(item, index) {
|
||||
const file = document.getElementById("files" + index).files[0];
|
||||
|
@ -247,21 +235,17 @@ export default {
|
|||
};
|
||||
this.res.options.list.push(way);
|
||||
},
|
||||
|
||||
// 图片选择器回显
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.selectedGoods.img = val.url;
|
||||
},
|
||||
|
||||
// 点击选择照片
|
||||
// 点击选择图片
|
||||
handleClickFile(item, index) {
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.selectedGoods = item;
|
||||
this.picModelFlag = true;
|
||||
|
||||
// console.log(let files = files)
|
||||
},
|
||||
|
||||
// 关闭
|
||||
closeDecorate(index) {
|
||||
this.$nextTick(() => {
|
||||
|
|
|
@ -108,6 +108,7 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
if (!this.$route.query.id) return false;
|
||||
API_Other.getHomeData(this.$route.query.id).then(res=>{
|
||||
|
@ -117,12 +118,6 @@ export default {
|
|||
this.handleComponent( this.contentData.list[0], 0)
|
||||
})
|
||||
},
|
||||
handleSpinShow() {
|
||||
this.$Spin.show();
|
||||
setTimeout(() => {
|
||||
this.$Spin.hide();
|
||||
}, 3000);
|
||||
},
|
||||
|
||||
// 中间组件拖动,右侧数据绑定不变
|
||||
handleContentlEnd(evt) {
|
||||
|
@ -159,7 +154,7 @@ export default {
|
|||
this.selected = index;
|
||||
this.$set(this, "decorateData", val);
|
||||
},
|
||||
|
||||
// 右侧栏回调
|
||||
handleDrawer(val) {
|
||||
let newIndex = this.selected;
|
||||
|
||||
|
|
|
@ -18,17 +18,12 @@ export default {
|
|||
layout, // 装修模块
|
||||
name: "index", // 装修的页面
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
selected(val) {
|
||||
selected(val) { // 顶部栏点击切换
|
||||
this.name = val;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -20,9 +20,6 @@ export default {
|
|||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.res);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
export default {
|
||||
title: "两张横图",
|
||||
props: ["res"],
|
||||
mounted () {
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -52,11 +52,12 @@ export default {
|
|||
};
|
||||
},
|
||||
props: ["res"],
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 删除商品
|
||||
closeGoods(val, index) {
|
||||
this.res.list[0].listWay.splice(index,1)
|
||||
},
|
||||
// 切换商品列表
|
||||
handleClickTitle(val, index) {
|
||||
this.selected.index = index;
|
||||
this.selected.val = val.title;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ["res"],
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ["res"],
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ["res"],
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -18,10 +18,7 @@
|
|||
<script>
|
||||
export default {
|
||||
title: "左一右二",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
|
||||
}
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -18,10 +18,7 @@
|
|||
<script>
|
||||
export default {
|
||||
title: "左二右一",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
console.log(this.res);
|
||||
},
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ["res"],
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -35,10 +35,7 @@
|
|||
<script>
|
||||
export default {
|
||||
title: "文字图片模板",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
console.log(this.res);
|
||||
}
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -11,10 +11,7 @@
|
|||
<script>
|
||||
export default {
|
||||
title: "标题栏",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
console.log(this.res);
|
||||
},
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -18,10 +18,7 @@
|
|||
<script>
|
||||
export default {
|
||||
title: "上一下二",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
console.log(this.res);
|
||||
}
|
||||
props: ["res"]
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
export default {
|
||||
title: "上二下一",
|
||||
props: ["res"],
|
||||
mounted() {
|
||||
console.log(this.res);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
</template>
|
||||
<script>
|
||||
export default {
|
||||
destroyed(){
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -96,11 +96,13 @@ export default {
|
|||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 切换tab
|
||||
clickType(val,index) {
|
||||
this.params.pageNumber = 1
|
||||
this.selectedIndex = index
|
||||
this.params.pageType = val;
|
||||
},
|
||||
// 是否发布
|
||||
changeSwitch(item) {
|
||||
this.loading = true;
|
||||
API_Other.releasePageHome(item.id).then((res) => {
|
||||
|
@ -115,6 +117,7 @@ export default {
|
|||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.loading = true;
|
||||
API_Other.getHomeList(this.params).then((res) => {
|
||||
|
@ -132,20 +135,20 @@ export default {
|
|||
this.total = res.result.total;
|
||||
});
|
||||
},
|
||||
|
||||
// 装修楼层
|
||||
handleEdit(val) {
|
||||
this.$router.push({
|
||||
path: "/floorList/main",
|
||||
query: { id: val.id, name: val.name, type: val.pageShow },
|
||||
});
|
||||
},
|
||||
|
||||
// 添加模板
|
||||
handleAdd() {
|
||||
this.$router.push({
|
||||
path: "/floorList/main",
|
||||
});
|
||||
},
|
||||
|
||||
// 删除模板
|
||||
handleDel(val) {
|
||||
this.loading = true;
|
||||
API_Other.removePageHome(val.id).then((res) => {
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<!-- 页面展示 -->
|
||||
<template slot="disableSlot" slot-scope="{row}">
|
||||
|
@ -90,13 +87,12 @@
|
|||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalType: 0, // 添加或编辑标识
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
name: "",
|
||||
|
@ -245,7 +241,7 @@
|
|||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
this.form.disabled = this.form.disabled == true ? "OPEN" : "CLOSE"
|
||||
if (this.modalType == 0) {
|
||||
if (this.modalTitle == "添加") {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
|
||||
|
@ -276,7 +272,6 @@
|
|||
},
|
||||
// 添加信息
|
||||
add() {
|
||||
this.modalType = 0;
|
||||
this.modalTitle = "添加";
|
||||
this.form = {};
|
||||
this.$refs.form.resetFields();
|
||||
|
@ -285,7 +280,6 @@
|
|||
},
|
||||
// 编辑
|
||||
detail(v) {
|
||||
this.modalType = 1;
|
||||
this.id = v.id;
|
||||
this.modalTitle = "修改";
|
||||
this.modalVisible = true;
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<template>
|
||||
<Breadcrumb>
|
||||
<BreadcrumbItem
|
||||
v-for="item in currentPath"
|
||||
:to="item.path"
|
||||
:key="item.name"
|
||||
>{{ itemTitle(item) }}</BreadcrumbItem>
|
||||
</Breadcrumb>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'breadcrumbNav',
|
||||
props: {
|
||||
currentPath: Array
|
||||
},
|
||||
methods: {
|
||||
itemTitle (item) {
|
||||
if (typeof item.title == 'object') {
|
||||
return this.$t(item.title.i18n);
|
||||
} else {
|
||||
return item.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
<template>
|
||||
<div @click="handleChange" v-if="showFullScreenBtn" class="full-screen-btn-con">
|
||||
<Tooltip :content="value ? '退出全屏' : '全屏'" placement="bottom">
|
||||
<Icon :type="value ? 'ios-contract' : 'ios-expand'" :size="24"></Icon>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "fullScreen",
|
||||
props: {
|
||||
value: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showFullScreenBtn() {
|
||||
return window.navigator.userAgent.indexOf("MSIE") < 0;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleFullscreen() {
|
||||
let main = document.body;
|
||||
if (this.value) {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
document.webkitCancelFullScreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
}
|
||||
} else {
|
||||
if (main.requestFullscreen) {
|
||||
main.requestFullscreen();
|
||||
} else if (main.mozRequestFullScreen) {
|
||||
main.mozRequestFullScreen();
|
||||
} else if (main.webkitRequestFullScreen) {
|
||||
main.webkitRequestFullScreen();
|
||||
} else if (main.msRequestFullscreen) {
|
||||
main.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
},
|
||||
handleChange() {
|
||||
this.handleFullscreen();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let isFullscreen =
|
||||
document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.fullScreen ||
|
||||
document.mozFullScreen ||
|
||||
document.webkitIsFullScreen;
|
||||
isFullscreen = !!isFullscreen;
|
||||
document.addEventListener("fullscreenchange", () => {
|
||||
this.$emit("input", !this.value);
|
||||
this.$emit("on-change", !this.value);
|
||||
});
|
||||
document.addEventListener("mozfullscreenchange", () => {
|
||||
this.$emit("input", !this.value);
|
||||
this.$emit("on-change", !this.value);
|
||||
});
|
||||
document.addEventListener("webkitfullscreenchange", () => {
|
||||
this.$emit("input", !this.value);
|
||||
this.$emit("on-change", !this.value);
|
||||
});
|
||||
document.addEventListener("msfullscreenchange", () => {
|
||||
this.$emit("input", !this.value);
|
||||
this.$emit("on-change", !this.value);
|
||||
});
|
||||
this.$emit("input", isFullscreen);
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -70,5 +70,30 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./styles/menu.scss";
|
||||
.ivu-shrinkable-menu{
|
||||
height: calc(100% - 60px);
|
||||
width: 180px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ivu-btn-text:hover {
|
||||
background-color: rgba(255,255,255,.2) !important;
|
||||
}
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
background-color: #fff;
|
||||
&:hover{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
.ivu-menu-vertical{
|
||||
overflow-y: auto;
|
||||
}
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
color: #ed3f14;
|
||||
}
|
||||
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
.ivu-shrinkable-menu{
|
||||
height: calc(100% - 60px);
|
||||
width: 180px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ivu-btn-text:hover {
|
||||
background-color: rgba(255,255,255,.2) !important;
|
||||
}
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
background-color: #fff;
|
||||
&:hover{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
.ivu-menu-vertical{
|
||||
overflow-y: auto;
|
||||
}
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
color: #ed3f14;
|
||||
}
|
||||
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 20px;
|
||||
}
|
|
@ -47,9 +47,7 @@
|
|||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
class="mt_10"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
|
@ -75,7 +73,6 @@
|
|||
} from "@/api/member";
|
||||
export default {
|
||||
name: "recharge",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
|
@ -90,9 +87,6 @@
|
|||
memberName:""
|
||||
},
|
||||
selectDate: null, // 选择区间时间
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "会员名称",
|
||||
|
@ -168,58 +162,37 @@
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.selectDate = null;
|
||||
this.searchForm.startDate = "";
|
||||
this.searchForm.endDate = "";
|
||||
this.searchForm.memberName = "";
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
// 时间段赋值
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getUserRecharge(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||
</Form>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table"></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||
size="small" show-total show-elevator show-sizer></Page>
|
||||
|
@ -26,7 +26,6 @@
|
|||
import { getUserWallet } from "@/api/member";
|
||||
export default {
|
||||
name: "walletLog",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
|
@ -41,10 +40,6 @@ export default {
|
|||
memberName: "",
|
||||
},
|
||||
selectDate: null, // 选择时间段
|
||||
// 表单验证规则
|
||||
formValidate: {},
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
|
@ -120,57 +115,36 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.selectDate = null;
|
||||
this.searchForm.startDate = "";
|
||||
this.searchForm.endDate = "";
|
||||
this.searchForm.memberName = "";
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
// 时间段赋值
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
// 获取列表数据
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据 请自行修改接口
|
||||
getUserWallet(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
show-total show-elevator show-sizer></Page>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<Button @click="addMember" type="primary">添加会员</Button>
|
||||
</Row>
|
||||
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small"
|
||||
|
@ -56,9 +56,9 @@
|
|||
|
||||
<!-- 修改模态框 -->
|
||||
<Modal v-model="descFlag" :title="descTitle" @on-ok="handleSubmitModal" width="500">
|
||||
<Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80">
|
||||
<Form ref="form" :model="form" :rules="ruleValidate" :label-width="80">
|
||||
<FormItem label="头像">
|
||||
<img :src="formValidate.face" class="face" />
|
||||
<img :src="form.face" class="face" />
|
||||
<Button type="text" class="upload" @click="
|
||||
() => {
|
||||
this.picModelFlag = true;
|
||||
|
@ -69,13 +69,13 @@
|
|||
<input type="file" style="display: none" id="file" />
|
||||
</FormItem>
|
||||
<FormItem label="用户名" prop="name">
|
||||
<Input v-model="formValidate.username" style="width: 200px" disabled />
|
||||
<Input v-model="form.username" style="width: 200px" disabled />
|
||||
</FormItem>
|
||||
<FormItem label="用户昵称" prop="name">
|
||||
<Input v-model="formValidate.nickName" style="width: 200px" />
|
||||
<Input v-model="form.nickName" style="width: 200px" />
|
||||
</FormItem>
|
||||
<FormItem label="性别" prop="sex">
|
||||
<RadioGroup type="button" button-style="solid" v-model="formValidate.sex">
|
||||
<RadioGroup type="button" button-style="solid" v-model="form.sex">
|
||||
<Radio :label="1">
|
||||
<span>男</span>
|
||||
</Radio>
|
||||
|
@ -85,14 +85,14 @@
|
|||
</RadioGroup>
|
||||
</FormItem>
|
||||
<FormItem label="修改密码" prop="password">
|
||||
<Input type="password" style="width: 220px" password v-model="formValidate.newPassword" />
|
||||
<Input type="password" style="width: 220px" password v-model="form.newPassword" />
|
||||
</FormItem>
|
||||
<FormItem label="生日" prop="birthday">
|
||||
<DatePicker type="date" format="yyyy-MM-dd" v-model="formValidate.birthday" style="width: 220px"></DatePicker>
|
||||
<DatePicker type="date" format="yyyy-MM-dd" v-model="form.birthday" style="width: 220px"></DatePicker>
|
||||
</FormItem>
|
||||
<FormItem label="所在地" prop="mail">
|
||||
<div class="form-item" v-if="!updateRegion">
|
||||
<Input disabled style="width: 250px" :value="formValidate.region" />
|
||||
<Input disabled style="width: 250px" :value="form.region" />
|
||||
<Button type="text" @click="
|
||||
() => {
|
||||
this.updateRegion = !this.updateRegion;
|
||||
|
@ -122,14 +122,13 @@ export default {
|
|||
name: "member",
|
||||
components: {
|
||||
region,
|
||||
ossManage,
|
||||
ossManage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectedMember: false, //是否是其他组件调用
|
||||
descTitle: "", // modal标题
|
||||
descFlag: false, //编辑查看框
|
||||
openSearch: true, // 显示搜索
|
||||
loading: true, // 表单加载状态
|
||||
addFlag: false, // modal显隐控制
|
||||
updateRegion: false, // 地区
|
||||
|
@ -149,7 +148,7 @@ export default {
|
|||
disabled: "OPEN",
|
||||
},
|
||||
picModelFlag: false, // 选择图片
|
||||
formValidate: {}, // 表单数据
|
||||
form: {}, // 表单数据
|
||||
addRule: {
|
||||
// 验证规则
|
||||
mobile: [
|
||||
|
@ -163,9 +162,6 @@ export default {
|
|||
password: [{ required: true, message: "请输入密码" }],
|
||||
},
|
||||
ruleValidate: {}, //修改验证
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "会员名称",
|
||||
|
@ -373,6 +369,7 @@ export default {
|
|||
});
|
||||
this.data = data;
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
// 此处如果是父子级传值的时候需要做一下处理
|
||||
|
@ -380,34 +377,18 @@ export default {
|
|||
|
||||
this.getData();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.getData();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
//查看详情修改
|
||||
editPerm(val) {
|
||||
this.descTitle = `查看用户 ${val.username}`;
|
||||
|
@ -425,7 +406,7 @@ export default {
|
|||
getMemberInfo(id) {
|
||||
API_Member.getMemberInfoData(id).then((res) => {
|
||||
if (res.result) {
|
||||
this.$set(this, "formValidate", res.result);
|
||||
this.$set(this, "form", res.result);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -443,7 +424,7 @@ export default {
|
|||
// 选中的图片
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.formValidate.face = val.url;
|
||||
this.form.face = val.url;
|
||||
},
|
||||
//添加会员提交
|
||||
addMemberSubmit() {
|
||||
|
@ -496,13 +477,13 @@ export default {
|
|||
|
||||
// 提交修改数据
|
||||
handleSubmitModal() {
|
||||
const { nickName, sex, username, face, newPassword } = this.formValidate;
|
||||
let time = new Date(this.formValidate.birthday);
|
||||
const { nickName, sex, username, face, newPassword } = this.form;
|
||||
let time = new Date(this.form.birthday);
|
||||
let birthday =
|
||||
time.getFullYear() + "-" + (time.getMonth() + 1) + "-" + time.getDate();
|
||||
let submit = {
|
||||
regionId: this.formValidate.regionId,
|
||||
region: this.formValidate.region,
|
||||
regionId: this.form.regionId,
|
||||
region: this.form.region,
|
||||
nickName,
|
||||
username,
|
||||
sex,
|
||||
|
|
|
@ -119,6 +119,3 @@
|
|||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
.point-data{
|
||||
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
border
|
||||
:columns="pointsColumns"
|
||||
:data="pointData"
|
||||
class="mt_10"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="pointChangeSort"
|
||||
|
@ -172,6 +173,7 @@
|
|||
:columns="orderColumns"
|
||||
:data="orderData"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
sortable="custom"
|
||||
@on-sort-change="orderChangeSort"
|
||||
>
|
||||
|
@ -203,6 +205,7 @@
|
|||
:columns="addressColumns"
|
||||
:data="addressData"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
sortable="custom"
|
||||
@on-sort-change="addressChangeSort"
|
||||
>
|
||||
|
@ -249,6 +252,7 @@
|
|||
:columns="walletColumns"
|
||||
:data="walletData"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
sortable="custom"
|
||||
@on-sort-change="walletChangeSort"
|
||||
>
|
||||
|
@ -289,6 +293,7 @@
|
|||
border
|
||||
:columns="receiptRecordColumns"
|
||||
:data="receiptRecordData"
|
||||
class="mt_10"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="walletChangeSort"
|
||||
|
@ -365,7 +370,7 @@
|
|||
import * as API_Order from "@/api/order.js";
|
||||
|
||||
export default {
|
||||
name: "member",
|
||||
name: "memberDetail",
|
||||
components: {
|
||||
region,
|
||||
ossManage,
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
class="mt_10"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
|
@ -181,9 +182,6 @@
|
|||
picModelFlag: false, // 选择图片
|
||||
formValidate: {}, // 表单数据
|
||||
ruleValidate: {}, //修改验证
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
{
|
||||
title: "会员名称",
|
||||
|
@ -332,41 +330,27 @@
|
|||
callback(val) {
|
||||
this.$emit("callback", val);
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getData();
|
||||
},
|
||||
// 分页 修改页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getData();
|
||||
},
|
||||
// 分页 修改页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getData();
|
||||
},
|
||||
// 搜索
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
//查看详情修改
|
||||
editPerm(val) {
|
||||
this.descTitle = `查看用户 ${val.username}`;
|
||||
|
@ -406,28 +390,6 @@
|
|||
this.regionId = val[0];
|
||||
},
|
||||
|
||||
|
||||
//禁用会员
|
||||
disabled(v) {
|
||||
let params = {
|
||||
memberIds: [v.id],
|
||||
disabled: "CLOSE"
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: '提示',
|
||||
content: '<p>确认禁用此会员?</p>',
|
||||
onOk: () => {
|
||||
API_Member.updateMemberStatus(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$Message.success('禁用成功');
|
||||
this.getData()
|
||||
} else {
|
||||
// this.$Message.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//详细
|
||||
detail(row){
|
||||
this.$router.push({ name: "member-detail", query: { id: row.id } });
|
||||
|
|
|
@ -1,201 +0,0 @@
|
|||
<style lang="scss">
|
||||
@import "./messageManage.scss";
|
||||
</style>
|
||||
<template>
|
||||
<div>
|
||||
<Card>
|
||||
<p slot="title">
|
||||
<span v-if="type==0">发送新消息</span>
|
||||
<span v-else>编辑消息</span>
|
||||
</p>
|
||||
<Row>
|
||||
<Form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:label-width="90"
|
||||
:rules="formValidate"
|
||||
style="position:relative"
|
||||
>
|
||||
<FormItem label="消息类型" prop="type">
|
||||
<Select v-model="form.type" placeholder="请选择" style="width:250px">
|
||||
<Option
|
||||
v-for="(item, i) in dictMessageType"
|
||||
:key="i"
|
||||
:value="item.value"
|
||||
>{{item.title}}</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem label="标题" prop="title">
|
||||
<Input v-model="form.title" style="width:600px" />
|
||||
</FormItem>
|
||||
<FormItem label="内容" prop="content" class="wangEditor">
|
||||
<editor v-model="form.content"></editor>
|
||||
</FormItem>
|
||||
<FormItem label="新创建账号也推送" prop="createSend">
|
||||
<i-switch size="large" v-model="form.createSend">
|
||||
<span slot="open">开启</span>
|
||||
<span slot="close">关闭</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
<div v-if="type==0">
|
||||
<FormItem label="发送范围">
|
||||
<RadioGroup type="button" button-style="solid" v-model="form.range">
|
||||
<Radio :label="0">全体用户</Radio>
|
||||
<Radio :label="1">指定用户成员</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
<div>
|
||||
<FormItem label="选择用户" v-if="form.range==1">
|
||||
<user-choose text="选择发送用户" @on-change="handleSelectUser" ref="user"></user-choose>
|
||||
</FormItem>
|
||||
</div>
|
||||
</div>
|
||||
<Form-item class="br">
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="submitLoading"
|
||||
@click="handelSubmit"
|
||||
style="width:100px"
|
||||
>提交</Button>
|
||||
<Button @click="handelCancel">取消</Button>
|
||||
</Form-item>
|
||||
<Spin size="large" fix v-if="loading"></Spin>
|
||||
</Form>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMessageDataById, addMessage, editMessage } from "@/api/index";
|
||||
import editor from "@/views/my-components/lili/editor";
|
||||
import userChoose from "@/views/my-components/lili/user-choose";
|
||||
export default {
|
||||
name: "add_edit_message",
|
||||
components: {
|
||||
userChoose,
|
||||
editor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: 0, // 消息类型
|
||||
loading: false, // 表单加载状态
|
||||
selectUsers: [], // 已选用户
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
form: { // 表单
|
||||
// 添加或编辑表单对象初始化数据
|
||||
title: "",
|
||||
content: "",
|
||||
type: "",
|
||||
range: 0
|
||||
},
|
||||
formValidate: {
|
||||
// 表单验证规则
|
||||
/* type: [
|
||||
{ required: true, message: "消息类型不能为空", trigger: "blur" }
|
||||
],*/
|
||||
title: [{ required: true, message: "标题不能为空", trigger: "blur" }],
|
||||
content: [{ required: true, message: "内容不能为空", trigger: "blur" }]
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
dictMessageType: this.$store.state.dict.messageType, // 消息类型
|
||||
backRoute: "" // 上一个页面路由
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.type = this.$route.query.type;
|
||||
this.backRoute = this.$route.query.backRoute;
|
||||
if (this.type == 1) {
|
||||
this.form.id = this.$route.query.id;
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
this.loading = true;
|
||||
getMessageDataById(this.form.id).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
// 转换null为""
|
||||
let v = res.result;
|
||||
for (let attr in v) {
|
||||
if (v[attr] == null) {
|
||||
v[attr] = "";
|
||||
}
|
||||
}
|
||||
let str = JSON.stringify(v);
|
||||
let data = JSON.parse(str);
|
||||
this.form = data;
|
||||
}
|
||||
});
|
||||
},
|
||||
handelSubmit() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
if (this.type == 0) {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
// 用户id数据
|
||||
let ids = [];
|
||||
this.selectUsers.forEach(e => {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
if (ids.length > 0) {
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
}
|
||||
this.form.userIds = ids;
|
||||
addMessage(this.form).then(res => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.closeCurrentPage();
|
||||
}
|
||||
});
|
||||
} else if (this.type == 1) {
|
||||
// 编辑
|
||||
editMessage(this.form).then(res => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.closeCurrentPage();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSelectUser(v) {
|
||||
this.selectUsers = v;
|
||||
},
|
||||
handelCancel() {
|
||||
this.closeCurrentPage();
|
||||
},
|
||||
// 关闭当前页面
|
||||
closeCurrentPage() {
|
||||
this.$store.commit("removeTag", "add_edit_message");
|
||||
localStorage.pageOpenedList = JSON.stringify(
|
||||
this.$store.state.app.pageOpenedList
|
||||
);
|
||||
this.$router.push({
|
||||
name: this.backRoute
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
watch: {
|
||||
// 监听路由变化
|
||||
$route(to, from) {
|
||||
if (to.name == "add_edit_message") {
|
||||
this.type = this.$route.query.type;
|
||||
if (this.type == 1) {
|
||||
this.form.id = this.$route.query.id;
|
||||
this.getData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,719 +0,0 @@
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<!--短信-->
|
||||
<Modal v-model="smsModal" width="530">
|
||||
<p slot="header">
|
||||
<Icon type="edit"></Icon>
|
||||
<span>短信设置</span>
|
||||
</p>
|
||||
<div>
|
||||
<Form ref="smsFormData" :model="smsFormData" label-position="left" :label-width="100" :rules="smsFormValidate">
|
||||
<FormItem label="模板名称" prop="templateName">
|
||||
<Input v-model="templateName" size="large" maxlength="9" disabled></Input>
|
||||
</FormItem>
|
||||
<FormItem label="模板代码" prop="smsCode">
|
||||
<Input v-model="smsFormData.smsCode" size="large" maxlength="30"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="模板名称" prop="smsContent">
|
||||
<Input class='textarea' :rows="5" :autosize="{maxRows:5,minRows: 5}" v-model="smsFormData.smsContent" type="textarea" maxlength="150"/>
|
||||
</FormItem>
|
||||
<FormItem label="是否开启" prop="smsState">
|
||||
<i-switch v-model="smsFormData.smsState" size="large" :value="smsFormData.smsState">
|
||||
<span slot="open">开启</span>
|
||||
<span slot="close">关闭</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
</Form>
|
||||
|
||||
</div>
|
||||
<div slot="footer" style="text-align: right">
|
||||
<Button type="success" size="large" @click="smsFormDataEdit">设置</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<!--站内信-->
|
||||
<Modal v-model="noticeModal" width="530">
|
||||
<p slot="header">
|
||||
<Icon type="edit"></Icon>
|
||||
<span>站内信设置</span>
|
||||
</p>
|
||||
<div>
|
||||
<Form ref="noticeFormData" :model="noticeFormData" label-position="left" :label-width="100" :rules="noticeFormValidate">
|
||||
<FormItem label="模板名称" prop="templateName">
|
||||
<Input v-model="templateName" size="large" maxlength="9" disabled></Input>
|
||||
</FormItem>
|
||||
<FormItem label="模板名称" prop="smsContent">
|
||||
<Input class='textarea' :rows="5" :autosize="{maxRows:5,minRows: 5}" v-model="noticeFormData.noticeContent" type="textarea" maxlength="150"/>
|
||||
</FormItem>
|
||||
</Form>
|
||||
|
||||
</div>
|
||||
<div slot="footer" style="text-align: right">
|
||||
<Button type="success" size="large" @click="noticeFormDataEdit">设置</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
<!--微信模板-->
|
||||
<Modal v-model="wechatModal" width="530">
|
||||
<p slot="header">
|
||||
<Icon type="edit"></Icon>
|
||||
<span>微信设置</span>
|
||||
</p>
|
||||
<div>
|
||||
<Form ref="wechatFormData" :model="wechatFormData" label-position="left" :label-width="100" :rules="wechatFormValidate">
|
||||
<FormItem label="模板名称" prop="templateName">
|
||||
<Input v-model="templateName" size="large" maxlength="9" disabled></Input>
|
||||
</FormItem>
|
||||
<FormItem label="头部信息" prop="first">
|
||||
<Input v-model="wechatFormData.first" size="large" maxlength="50"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="备注" prop="remark">
|
||||
<Input class='textarea' :rows="5" :autosize="{maxRows:5,minRows: 5}" v-model="wechatFormData.remark" type="textarea" maxlength="150"/>
|
||||
</FormItem>
|
||||
<FormItem label="是否开启" prop="enable">
|
||||
<i-switch v-model="wechatFormData.enable" size="large" :value="smsFormData.enable">
|
||||
<span slot="open">开启</span>
|
||||
<span slot="close">关闭</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
</Form>
|
||||
|
||||
</div>
|
||||
<div slot="footer" style="text-align: right">
|
||||
<Button type="success" size="large" @click="wechatFormDataEdit">设置</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<Tabs value="log" @on-click="tabPaneChange" v-model="tab">
|
||||
<TabPane label="会员消息" name="MEMBER">
|
||||
<div class="search">
|
||||
<Card>
|
||||
|
||||
<Row class="operation">
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择
|
||||
<span class="select-count">{{selectCount}}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="showSelect"
|
||||
ref="memberTable"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10,20,50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</TabPane>
|
||||
<TabPane label="店铺消息" name="SHOP">
|
||||
<div class="search">
|
||||
<Card>
|
||||
|
||||
<Row class="operation">
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择
|
||||
<span class="select-count">{{selectCount}}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="showSelect"
|
||||
ref="shopTable"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10,20,50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</TabPane>
|
||||
|
||||
<TabPane label="微信消息" name="WECHAT">
|
||||
<div class="search">
|
||||
<Card>
|
||||
|
||||
<Row class="operation">
|
||||
<Button @click="weChatSync" type="primary" icon="md-add">同步微信消息</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择
|
||||
<span class="select-count">{{selectCount}}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="weChatColumns"
|
||||
:data="weChatData"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="showSelect"
|
||||
ref="weChatTable"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="weChatSearchForm.pageNumber"
|
||||
:total="weChatTotal"
|
||||
:page-size="weChatSearchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10,20,50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</TabPane>
|
||||
|
||||
<TabPane label="其他消息" name="OTHER">
|
||||
<div class="search">
|
||||
<Card>
|
||||
|
||||
<Row class="operation">
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择
|
||||
<span class="select-count">{{selectCount}}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="showSelect"
|
||||
ref="otherTable"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10,20,50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMessageData,
|
||||
editSmsMessageTemplate,
|
||||
editNoticeMessage,
|
||||
wechatMessageSync,
|
||||
getWechatMessagePage,
|
||||
editWechatMessageTemplate,
|
||||
delWechatMessageTemplate
|
||||
} from "@/api/setting";
|
||||
|
||||
export default {
|
||||
title: "message-manage",
|
||||
data() {
|
||||
return {
|
||||
messageTemplate:'',// 当前消息模板
|
||||
messageTemplateId:'', // 当前消息模板id
|
||||
templateName:'', // 模板名称
|
||||
smsModal: false,//短信
|
||||
smsFormData:{ // 模板表单数据
|
||||
smsState:'',
|
||||
smsContent:'',
|
||||
smsCode: ''
|
||||
},
|
||||
smsFormValidate:{ // 验证规则
|
||||
smsCode: [{ required: true, message: '请输入短信编码'}],
|
||||
smsContent: [{ required: true, message: '请输入短信内容'}],
|
||||
},
|
||||
noticeModal: false, // 站内信
|
||||
noticeFormData:{ // 站内信表单
|
||||
noticeContent:''
|
||||
},
|
||||
noticeFormValidate:{ // 验证规则
|
||||
noticeContent: [{ required: true, message: '请输入站内信内容'}],
|
||||
},
|
||||
wechatModal:false,//微信消息
|
||||
wechatFormData:{ // 微信表单
|
||||
remark:'',
|
||||
first:'',
|
||||
enable:'',
|
||||
},
|
||||
wechatFormValidate:{ // 验证规则
|
||||
remark: [{ required: true, message: '请输入站内信内容'}],
|
||||
first: [{ required: true, message: '请输入头部文字信息'}],
|
||||
},
|
||||
tab: "MEMBER", // tabName
|
||||
openTip: true, // 提示展示
|
||||
loading: true, // 表单加载状态
|
||||
selectCount: 0, // 多选计数
|
||||
selectList: [], // 多选数据
|
||||
drop: false, // 更多搜索项
|
||||
dropDownContent: "展开", // drop显示内容
|
||||
dropDownIcon: "ios-arrow-down", // drop图标
|
||||
searchForm: {
|
||||
// 搜索框对应data对象
|
||||
type: "MEMBER",
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "" // 终止时间
|
||||
},
|
||||
//微信消息查询
|
||||
weChatSearchForm: {
|
||||
// 搜索框对应data对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
selectDate: null, // 选择日期绑定modal
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "ID",
|
||||
key: "id",
|
||||
width: 180,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "模板名称",
|
||||
key: "name",
|
||||
width: 300,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
sortable: true,
|
||||
sortType: "desc"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
width: 280,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.smsSettingAlert(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"短信设置"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.noticeSettingAlert(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"站内信设置"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
weChatColumns: [
|
||||
// 表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "模板编号",
|
||||
key: "code",
|
||||
width: 500,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "是否开启",
|
||||
key: "enable",
|
||||
sortable: true,
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
if (params.row.enable == true) {
|
||||
return h('div', [
|
||||
h('span', {
|
||||
}, '开启'),
|
||||
]);
|
||||
} else {
|
||||
return h('div', [
|
||||
h('span', {
|
||||
}, '关闭'),
|
||||
]);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "模板名称",
|
||||
key: "name",
|
||||
width: 200,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
sortable: true,
|
||||
sortType: "desc",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
width: 200,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.wechatSettingAlert(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.delWeChat(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
],
|
||||
weChatData: [], // 表单数据
|
||||
weChatTotal: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
this.dropDownIcon = "ios-arrow-down";
|
||||
} else {
|
||||
this.dropDownContent = "收起";
|
||||
this.dropDownIcon = "ios-arrow-up";
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.type = this.tab;
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.type = this.tab;
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
//短信设置弹出框
|
||||
smsSettingAlert(v){
|
||||
this.smsFormData.smsState = v.smsState == 'OPEN' ? true:false
|
||||
this.smsFormData.smsContent = v.smsContent
|
||||
this.smsFormData.smsCode = v.smsCode
|
||||
this.templateName = v.name
|
||||
this.messageTemplateId = v.id
|
||||
this.smsModal = true
|
||||
},
|
||||
//站内信弹出框
|
||||
noticeSettingAlert(v){
|
||||
this.noticeFormData.noticeContent = v.noticeContent
|
||||
this.templateName = v.name
|
||||
this.messageTemplateId = v.id
|
||||
this.noticeModal = true
|
||||
},
|
||||
//微信弹出框
|
||||
wechatSettingAlert(v){
|
||||
this.wechatFormData.remark = v.remark
|
||||
this.wechatFormData.first = v.first
|
||||
this.wechatFormData.enable = v.enable
|
||||
this.templateName = v.name
|
||||
this.messageTemplateId = v.id
|
||||
this.wechatModal = true
|
||||
},
|
||||
//短信设置保存
|
||||
smsFormDataEdit(){
|
||||
this.$refs['smsFormData'].validate((valid) => {
|
||||
if (valid) {
|
||||
if(this.smsFormData.smsState){
|
||||
this.smsFormData.smsState = "OPEN"
|
||||
}else{
|
||||
this.smsFormData.smsState = "CLOSE"
|
||||
}
|
||||
editSmsMessageTemplate(this.messageTemplateId,this.smsFormData).then(res => {
|
||||
if(res.message === 'success') {
|
||||
this.$Message.success('短信模板修改成功');
|
||||
this.smsModal = false;
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
//微信设置保存
|
||||
wechatFormDataEdit(){
|
||||
this.$refs['wechatFormData'].validate((valid) => {
|
||||
if (valid) {
|
||||
editWechatMessageTemplate(this.messageTemplateId,this.wechatFormData).then(res => {
|
||||
if(res.message === 'success') {
|
||||
this.$Message.success('微信模板修改成功');
|
||||
this.wechatModal = false;
|
||||
this.getWechatMessagePage();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
//站内信设置保存
|
||||
noticeFormDataEdit(){
|
||||
this.$refs['noticeFormData'].validate((valid) => {
|
||||
if (valid) {
|
||||
editNoticeMessage(this.messageTemplateId,this.noticeFormData).then(res => {
|
||||
if(res.message === 'success') {
|
||||
this.$Message.success('站内信修改成功');
|
||||
this.noticeModal = false;
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
//同步微信消息
|
||||
weChatSync(){
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
// 记得确认修改此处
|
||||
content: "确认要同步微信消息模板?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 同步微信消息模板
|
||||
wechatMessageSync().then(res => {
|
||||
this.$Modal.remove();
|
||||
if(res.success) {
|
||||
this.$Message.success('微信消息模板同步成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
//删除微信模消息
|
||||
delWeChat(v){
|
||||
this.$Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定删除此模板?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除微信消息模板
|
||||
delWechatMessageTemplate(v.id).then(res => {
|
||||
if(res.success) {
|
||||
this.$Modal.remove();
|
||||
this.$Message.success('微信模板删除成功');
|
||||
this.getWechatMessagePage()
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
getMessageData(this.searchForm).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//分页获取微信消息
|
||||
getWechatMessagePage(){
|
||||
getWechatMessagePage(this.weChatSearchForm).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.weChatData = res.result.records;
|
||||
this.weChatTotal = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
//tab切换事件
|
||||
tabPaneChange(v) {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.searchForm.type = v;
|
||||
//如果是微信消息则走单独的接口
|
||||
if(v === "WECHAT"){
|
||||
this.getWechatMessagePage();
|
||||
}else{
|
||||
this.getDataList();
|
||||
}
|
||||
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.selectDate = null;
|
||||
this.searchForm.startDate = "";
|
||||
this.searchForm.endDate = "";
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order == "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
showSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.memberTable.selectAll(false);
|
||||
this.$refs.weChatTable.selectAll(false);
|
||||
this.$refs.shopTable.selectAll(false);
|
||||
this.$refs.otherTable.selectAll(false);
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,412 +0,0 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70">
|
||||
<Form-item label="消息标题" prop="title">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.title"
|
||||
placeholder="请输入消息标题"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="消息内容" prop="content">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="searchForm.content"
|
||||
placeholder="请输入消息内容"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<span v-if="drop">
|
||||
<Form-item label="消息类型" prop="type">
|
||||
<Select
|
||||
v-model="searchForm.type"
|
||||
placeholder="请选择消息类型"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<Option
|
||||
v-for="(item, i) in dictMessageType"
|
||||
:key="i"
|
||||
:value="item.value"
|
||||
>{{item.title}}</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item label="创建时间">
|
||||
<DatePicker
|
||||
v-model="selectDate"
|
||||
type="daterange"
|
||||
format="yyyy-MM-dd"
|
||||
clearable
|
||||
@on-change="selectDateRange"
|
||||
placeholder="选择起始时间"
|
||||
style="width: 200px"
|
||||
></DatePicker>
|
||||
</Form-item>
|
||||
</span>
|
||||
<Form-item style="margin-left:-35px;" class="br">
|
||||
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
|
||||
<Button @click="handleReset">重置</Button>
|
||||
<a class="drop-down" @click="dropDown">
|
||||
{{dropDownContent}}
|
||||
<Icon :type="dropDownIcon"></Icon>
|
||||
</a>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation">
|
||||
<Button @click="add" type="primary" icon="md-add">发送新消息</Button>
|
||||
<Button @click="delAll" icon="md-trash">批量删除撤回</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openSearch=!openSearch">{{openSearch ? "关闭搜索" : "开启搜索"}}</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择
|
||||
<span class="select-count">{{selectCount}}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="showSelect"
|
||||
ref="table"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10,20,50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMessageData,
|
||||
addMessage,
|
||||
editMessage,
|
||||
deleteMessage
|
||||
} from "@/api/index";
|
||||
export default {
|
||||
title: "message-manage",
|
||||
data() {
|
||||
return {
|
||||
openSearch: true, // 显示搜索
|
||||
openTip: true, // 显示提示
|
||||
loading: true, // 表单加载状态
|
||||
userLoading: true,
|
||||
selectCount: 0, // 多选计数
|
||||
selectList: [], // 多选数据
|
||||
drop: false, // 展开搜索
|
||||
dropDownContent: "展开",
|
||||
dropDownIcon: "ios-arrow-down",
|
||||
searchForm: {
|
||||
// 搜索框对应data对象
|
||||
title: "",
|
||||
content: "",
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
startDate: "", // 起始时间
|
||||
endDate: "" // 终止时间
|
||||
},
|
||||
selectDate: null, // 选择日期绑定modal
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
type: "index",
|
||||
width: 60,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "消息标题",
|
||||
key: "title",
|
||||
width: 200,
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "消息内容",
|
||||
key: "content",
|
||||
minWidth: 275,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
key: "type",
|
||||
width: 120,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "新创建账号推送",
|
||||
key: "createSend",
|
||||
align: "center",
|
||||
width: 135,
|
||||
render: (h, params) => {
|
||||
if (params.row.createSend) {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "blue"
|
||||
}
|
||||
},
|
||||
"开启"
|
||||
)
|
||||
]);
|
||||
} else {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "default"
|
||||
}
|
||||
},
|
||||
"关闭"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
width: 180,
|
||||
sortable: true,
|
||||
sortType: "desc"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
width: 280,
|
||||
align: "center",
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
size: "small"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.edit(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"编辑"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small"
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.sendDetail(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"查看发送详情"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"删除撤回"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
dictMessageType: this.$store.state.dict.messageType
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
dropDown() {
|
||||
if (this.drop) {
|
||||
this.dropDownContent = "展开";
|
||||
this.dropDownIcon = "ios-arrow-down";
|
||||
} else {
|
||||
this.dropDownContent = "收起";
|
||||
this.dropDownIcon = "ios-arrow-up";
|
||||
}
|
||||
this.drop = !this.drop;
|
||||
},
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
selectDateRange(v) {
|
||||
if (v) {
|
||||
this.searchForm.startDate = v[0];
|
||||
this.searchForm.endDate = v[1];
|
||||
}
|
||||
},
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
getMessageData(this.searchForm).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.searchForm.resetFields();
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.selectDate = null;
|
||||
this.searchForm.startDate = "";
|
||||
this.searchForm.endDate = "";
|
||||
// 重新加载数据
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order == "normal") {
|
||||
this.searchForm.order = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
add() {
|
||||
let query = { type: 0, backRoute: this.$route.name };
|
||||
this.$router.push({
|
||||
name: "add_edit_message",
|
||||
query: query
|
||||
});
|
||||
},
|
||||
edit(v) {
|
||||
let query = { type: 1, id: v.id, backRoute: this.$route.name };
|
||||
this.$router.push({
|
||||
name: "add_edit_message",
|
||||
query: query
|
||||
});
|
||||
},
|
||||
sendDetail(v) {
|
||||
let query = { id: v.id };
|
||||
this.$router.push({
|
||||
name: "message_send_detail",
|
||||
query: query
|
||||
});
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.title + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
deleteMessage(v.id).then(res => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
showSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
delAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
content: "您确认要删除所选的 " + this.selectCount + " 条数据?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
deleteMessage(ids).then(res => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.clearSelectAll();
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -1,322 +0,0 @@
|
|||
<template>
|
||||
<div class="search">
|
||||
<Card>
|
||||
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
|
||||
<Form ref="searchForm" inline :label-width="90">
|
||||
<Form-item label="发送用户ID" prop="userId">
|
||||
<Input
|
||||
type="text"
|
||||
v-model="userId"
|
||||
placeholder="请输入发送用户完整ID"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
/>
|
||||
</Form-item>
|
||||
<Form-item label="发送状态" prop="status">
|
||||
<Select v-model="status" placeholder="请选择" style="width: 200px" clearable>
|
||||
<Option value="0">未读</Option>
|
||||
<Option value="1">已读</Option>
|
||||
<Option value="2">回收站</Option>
|
||||
</Select>
|
||||
</Form-item>
|
||||
<Form-item style="margin-left:-35px;" class="br">
|
||||
<Button @click="getDataList" type="primary" icon="ios-search">搜索</Button>
|
||||
<Button @click="handleReset">重置</Button>
|
||||
</Form-item>
|
||||
</Form>
|
||||
</Row>
|
||||
<Row class="operation">
|
||||
<Button v-hasRole="'ROLE_ADMIN'" @click="delAll" icon="md-trash">批量删除</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openSearch=!openSearch">{{openSearch ? "关闭搜索" : "开启搜索"}}</Button>
|
||||
<Button type="dashed" @click="openTip=!openTip">{{openTip ? "关闭提示" : "开启提示"}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip">
|
||||
<Alert show-icon>
|
||||
已选择
|
||||
<span class="select-count">{{selectCount}}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="pageNumber"
|
||||
:total="total"
|
||||
:page-size="pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10,20,50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMessageSendData, deleteMessageSend } from "@/api/index";
|
||||
export default {
|
||||
name: "message_send_detail",
|
||||
data() {
|
||||
return {
|
||||
openSearch: true, // 显示搜索项
|
||||
openTip: true, // 显示提示
|
||||
loading: true, // 表单加载状态
|
||||
messageId: "", // 信息id
|
||||
sortColumn: "createTime", // 排序字段
|
||||
sortType: "desc", // 排序方式
|
||||
status: "", // 发送状态
|
||||
selectList: [], // 多选数据
|
||||
selectCount: 0, // 多选计数
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
type: "selection",
|
||||
width: 60,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
type: "index",
|
||||
width: 60,
|
||||
align: "center"
|
||||
},
|
||||
{
|
||||
title: "发送消息标题",
|
||||
key: "title"
|
||||
},
|
||||
{
|
||||
title: "发送用户",
|
||||
key: "username",
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "status",
|
||||
align: "center",
|
||||
sortable: true,
|
||||
render: (h, params) => {
|
||||
if (params.row.status == 0) {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "default"
|
||||
}
|
||||
},
|
||||
"未读"
|
||||
)
|
||||
]);
|
||||
} else if (params.row.status == 1) {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "green"
|
||||
}
|
||||
},
|
||||
"已读"
|
||||
)
|
||||
]);
|
||||
} else if (params.row.status == 2) {
|
||||
return h("div", [
|
||||
h(
|
||||
"Tag",
|
||||
{
|
||||
props: {
|
||||
color: "orange"
|
||||
}
|
||||
},
|
||||
"回收站"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
sortable: true,
|
||||
sortType: "desc"
|
||||
},
|
||||
{
|
||||
title: "更新时间",
|
||||
key: "updateTime",
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
icon: "md-trash"
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
"删除"
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
],
|
||||
data: [], // 表单数据
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 10, // 页面大小
|
||||
total: 0, // 表单数据总数
|
||||
userId: ""
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.messageId = this.$route.query.id;
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
this.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
this.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
this.sortColumn = e.key;
|
||||
this.sortType = e.order;
|
||||
if (e.order == "normal") {
|
||||
this.sortType = "";
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
getDataList(v) {
|
||||
this.loading = true;
|
||||
if (v == 0) {
|
||||
this.userId = "";
|
||||
}
|
||||
let params = {
|
||||
pageNumber: this.pageNumber,
|
||||
pageSize: this.pageSize,
|
||||
sort: this.sortColumn,
|
||||
order: this.sortType,
|
||||
messageId: this.messageId,
|
||||
status: this.status,
|
||||
userId: this.userId
|
||||
};
|
||||
// 避免后台默认值
|
||||
if (!params.status) {
|
||||
params.status = "";
|
||||
}
|
||||
getMessageSendData(params).then(res => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
this.data = res.result.records;
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
handleReset() {
|
||||
this.userId = "";
|
||||
this.status = "";
|
||||
this.getDataList();
|
||||
},
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除该条数据?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
deleteMessageSend(v.id).then(res => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
clearSelectAll() {
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
delAll() {
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
content: "您确认要删除所选的 " + this.selectCount + " 条数据?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
let ids = "";
|
||||
this.selectList.forEach(function(e) {
|
||||
ids += e.id + ",";
|
||||
});
|
||||
ids = ids.substring(0, ids.length - 1);
|
||||
// 批量删除
|
||||
deleteMessageSend(ids).then(res => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.clearSelectAll();
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听路由变化通过id获取数据
|
||||
$route(to, from) {
|
||||
if (to.name == "message_send_detail") {
|
||||
this.messageId = this.$route.query.id;
|
||||
this.getDataList();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
this.$Modal.info({
|
||||
title: "提示",
|
||||
content: "该页面已根据用户角色隐藏操作按钮"
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -40,7 +40,7 @@
|
|||
<div class="search">
|
||||
<Card>
|
||||
|
||||
<Row class="operation">
|
||||
<Row class="operation mt_10">
|
||||
<Button @click="weChatSync" type="primary">同步微信消息</Button>
|
||||
</Row>
|
||||
<Table
|
||||
|
@ -69,7 +69,7 @@
|
|||
<div class="search">
|
||||
<Card>
|
||||
|
||||
<Row class="operation">
|
||||
<Row class="operation mt_10">
|
||||
<Button @click="weChatSync('mp')" type="primary">同步微信小程序订阅消息</Button>
|
||||
</Row>
|
||||
<Table
|
||||
|
@ -120,7 +120,6 @@ export default {
|
|||
|
||||
wechatModal: false,// modal展示
|
||||
wechatFormData: {}, // 微信数据
|
||||
wechatMPModal: false,//微信消息
|
||||
wechatMPFormData: {}, // 微信订阅消息
|
||||
tab: "WECHAT", // tab栏分类
|
||||
searchForm: { // 请求参数
|
||||
|
@ -128,8 +127,6 @@ export default {
|
|||
},
|
||||
loading: true, // 表单加载状态
|
||||
id: '', // 模板id
|
||||
selectCount: 0, // 多选计数
|
||||
selectList: [], // 多选数据
|
||||
//微信消息查询
|
||||
weChatSearchForm: {
|
||||
// 搜索框对应data对象
|
||||
|
@ -232,6 +229,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
|
|
|
@ -166,13 +166,12 @@
|
|||
<script>
|
||||
import * as API_Goods from "@/api/goods";
|
||||
import { Chart } from "@antv/g2";
|
||||
import empty from "@/views/lili-empty";
|
||||
import orderRow from "./order/orderDetail";
|
||||
import refundRow from "./order/refundOrder";
|
||||
import affixTime from "@/views/lili-components/affix-time";
|
||||
|
||||
export default {
|
||||
components: { empty, orderRow, refundRow, affixTime },
|
||||
components: { orderRow, refundRow, affixTime },
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue