no message

master
Chopper 2021-07-26 16:03:39 +08:00
commit 30fbe6ca83
123 changed files with 2097 additions and 9068 deletions

View File

@ -5,7 +5,7 @@
<div>
<div class="coupon-title">
<router-link to="/">
<img src="../assets/images/logo1.png" width="120" alt="">
<img src="../assets/images/logo.png" width="120" alt="">
</router-link>
<p>领券中心</p>
<Input search style="width:400px" @on-search='search' enter-button="" placeholder="搜索优惠券" />

View File

@ -52,10 +52,6 @@ export const afterSaleStatusList = [
name: '买家退货,待卖家收货',
status: 'BUYER_RETURN'
},
{
name: '商家换货/补发',
status: 'SELLER_RE_DELIVERY'
},
{
name: '卖家确认收货',
status: 'SELLER_CONFIRM'

View File

@ -91,11 +91,15 @@
</TabPane>
<TabPane label="提现记录" name="log">
<Table stripe :columns="logColumns" :data="logData.records">
<template slot-scope="{ row }" slot="sn">
<span>{{row.sn}}</span>
</template>
<template slot-scope="{ row }" slot="time">
<span>{{row.createTime}}</span>
</template>
<template slot-scope="{ row }" slot="price">
<span> +{{ row.price | unitPrice }}</span>
<span v-if="row.distributionCashStatus == 'REFUSE'" style="color: green"> +{{ row.price | unitPrice }}</span>
<span v-else style="color: red"> -{{ row.price | unitPrice }}</span>
</template>
<template slot-scope="{ row }" slot="status">
<span> {{row.distributionCashStatus == "APPLY" ? "待处理" : row.distributionCashStatus == "PASS" ? "通过" : "拒绝"}}</span>
@ -186,6 +190,7 @@ export default {
{title: '操作', slot: 'action', width: 120}
],
logColumns: [ //
{title: '编号', slot: 'sn'},
{title: '申请时间', slot: 'time'},
{title: '提现金额', slot: 'price'},
{title: '提现状态', slot: 'status'}
@ -298,7 +303,7 @@ export default {
},
getLog () { //
distCashHistory(this.logParams).then(res => {
if (res.success) this.goodsData = res.result
if (res.success) this.logData = res.result
})
},
distribution () { //

View File

@ -8,8 +8,11 @@
<div class="goodsImg hover-pointer" v-if="params.type === 'GOODS'">
<img :src="item.image" />
</div>
<div class="goodsTitle hover-pointer">
{{params.type === 'GOODS'? item.goodsName : item.storeName}}
<div class="goodsTitle hover-color" v-if="params.type === 'GOODS'" @click="buynow(item.skuId, item.goodsId)">
{{item.goodsName}}
</div>
<div v-else class="goodsTitle hover-pointer">
{{item.storeName}}
</div>
<div class="goodsPrice">
<span v-if="params.type === 'GOODS'">{{item.price | unitPrice('')}}</span>
@ -26,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>
@ -91,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',

View File

@ -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>
<!-- 分页 -->

View File

@ -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>

View File

@ -339,7 +339,7 @@ export default {
} else if (params.row.applyStatus === 'VIA_AUDITING') {
return h('div', [h('span', {}, '提现成功')]);
} else {
return h('div', [h('span', {}, '审核未通过')]);
return h('div', [h('span', {}, '审核拒绝')]);
}
}
},
@ -350,7 +350,8 @@ export default {
},
{
title: '审核备注',
key: 'inspectRemark'
key: 'inspectRemark',
tooltip: true
}
],

View File

@ -26,7 +26,6 @@
"pinyin": "^2.9.0",
"print-js": "^1.0.63",
"qrcodejs2": "0.0.2",
"quill": "^1.3.7",
"sass-loader": "^8.0.2",
"sockjs-client": "^1.4.0",
"stompjs": "^2.3.3",

View File

@ -29,8 +29,6 @@
<script src="https://cdn.jsdelivr.net/npm/gitalk@1.5.0/dist/gitalk.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/wangeditor@3.1.1/release/wangEditor.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/quill@1.3.7/dist/quill.snow.css">
<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.8.4/Sortable.min.js"></script>

View File

@ -304,11 +304,6 @@ export const deleteMessageSend = (ids, params) => {
return deleteRequest(`/manager/messageSend/delByIds/${ids}`, params);
};
// 通过id获取子地区
export const getRegion = (id) => {
return getRequest(`/region/item/${id}`);
};
// 分页获取文件数据
export const getFileListData = (params) => {
return getRequest("/file", params);
@ -389,11 +384,6 @@ export const delRegion = (ids) => {
return deleteRequest(`/region/${ids}`);
};
// 通过id获取地区详情
export const getRegionDetail = (id) => {
return getRequest(`/region/${id}`);
};
// 更新地区
export const updateRegion = (id, params) => {
return putRequest(`/region/${id}`, params);

View File

@ -117,16 +117,10 @@ export const getAfterSaleOrderPage = (params) => {
export const getAfterSaleOrderDetail = (sn) => {
return getRequest(`/afterSale/get/${sn}`)
}
//售后单查询物流
export const getSellerDeliveryTraces = (sn, params) => {
return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params)
export const getAfterSaleTraces = (sn) => {
return getRequest(`/afterSale/getDeliveryTraces/${sn}`)
}
//售后单查询物流
export const getAfterSaleTraces = (sn, params) => {
return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params)
}
// 获取商家选中的物流公司
export const getLogisticsChecked = () => {
return getRequest(`/logistics/getChecked`)
@ -157,6 +151,11 @@ export const refundLog = (params) => {
return getRequest(`/refundLog`, params)
}
//售后单商家收货信息
export const storeAddress = (sn) => {
return getRequest(`/afterSale/getStoreAfterSaleAddress/${sn}`)
}

View File

@ -21,7 +21,10 @@ export default {
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
// common: 'http://192.168.0.101:8890',
// buyer: 'http://192.168.0.101:8888',
// seller: 'http://192.168.0.101:8889',
// manager: 'http://192.168.0.101:8887'
},
api_prod: {
common: "https://common-api.pickmall.cn",

View File

@ -103,6 +103,7 @@ service.interceptors.response.use(
} else {
// 其他错误处理
console.log(error.response.data);
Message.error(error.response.data.message)
}
}

View File

@ -331,7 +331,6 @@ util.initRouter = function (vm) { // 初始化路由
getCurrentPermissionList().then(res => {
if (!res.success) return false;
let menuData = res.result;
// let menuData = result
// 格式化数据,设置 空children 为 null
for(let i =0;i<menuData.length;i++){
@ -340,6 +339,8 @@ util.initRouter = function (vm) { // 初始化路由
let tt = t[k].children;
for(let z = 0;z<tt.length;z++){
tt[z].children = null
// 给所有三级路由添加字段显示一级菜单name方便点击页签时的选中筛选
tt[z].firstRouterName = menuData[i].name
}
}
}
@ -395,8 +396,7 @@ util.initMenuData = function (vm, data) {
menuData.forEach(e => {
let nav = {
name: e.name,
title: e.title,
icon: e.icon
title: e.title
}
navList.push(nav);
})
@ -460,6 +460,7 @@ util.initRouterNode = function (routers, data) { // data为所有子菜单数
meta.permTypes = menu.permTypes ? menu.permTypes : null;
meta.title = menu.title ? menu.title + " - lilishop 运营后台" : null;
meta.url = menu.url ? menu.url : null;
meta.firstRouterName = item.firstRouterName
menu.meta = meta;
routers.push(menu);

View File

@ -36,12 +36,6 @@ export const otherRouter = {
name: "change_password",
component: () => import("@/views/change-password/change-password.vue")
},
{
path: "message",
title: "消息中心",
name: "message_index",
component: () => import("@/views/message/message.vue")
},
{
path: "category",
title: "类型列表",
@ -72,26 +66,6 @@ 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: "结算单详情",

View File

@ -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,
},

View File

@ -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) => {

View File

@ -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="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();

View File

@ -149,12 +149,8 @@ export default {
this.previewGoodsPicture = url;
this.goodsPictureVisible = true;
}
,
}
,
}
;
</script>
<style lang="scss" soped>

View File

@ -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) {

View File

@ -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>
@ -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();

View File

@ -170,8 +170,6 @@ h4 {
.flow-box-splice:nth-last-of-type(1) {
margin-right: 0;
}
.flow-splice {
}
.flow-box-splice,
.flow-member,

View File

@ -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;

View File

@ -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>

View File

@ -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 = "";

View File

@ -11,7 +11,7 @@
</template>
<script>
import * as API_Setup from "@/api/index.js";
import * as API_Setup from "@/api/common.js";
export default {
data() {
return {
@ -27,6 +27,7 @@ export default {
props: ['addressId'],
methods: {
//
change(val, selectedData) {
/**
* @returns [regionId,region]
@ -44,9 +45,10 @@ export default {
handleChangeOnSelect(value) {
this.changeOnSelect = value;
},
//
loadData(item, callback) {
item.loading = true;
API_Setup.getRegion(item.value).then((res) => {
API_Setup.getChildRegion(item.value).then((res) => {
if (res.result.length <= 0) {
item.loading = false;
this.selected = item;
@ -83,8 +85,9 @@ export default {
}
});
},
//
init() {
API_Setup.getRegion(this.id).then((res) => {
API_Setup.getChildRegion(this.id).then((res) => {
let way = [];
res.result.forEach((item) => {
@ -105,7 +108,6 @@ export default {
}
way.push(data);
});
this.data = way;
});
},

View File

@ -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"; //goodspc 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>

View File

@ -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) => {

View File

@ -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;
},

View File

@ -2,18 +2,21 @@
width: 100%;
height: 100%;
display: flex;
.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;
@ -23,33 +26,41 @@
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;
}
.wap-item:hover {
background: #ededed;
}
@ -65,14 +76,17 @@
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;
@ -82,12 +96,14 @@
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;
}

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>更多&gt;</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>

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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]

View File

@ -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;

View File

@ -58,7 +58,7 @@ export default {
if (res.success) {
this.$Message.success("保存模板成功");
} else {
this.$Message.error(res.message);
// this.$Message.error(res.message);
}
});
},
@ -86,9 +86,6 @@ export default {
this.modelForm = { list: [] };
}
}
// this.$refs.modelForm.topAdvert = {};
// this.$refs.modelForm.navList = {}
});
},
},

View File

@ -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)
},
},
};

View File

@ -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)
},
},
};

View File

@ -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(() => {

View File

@ -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;

View File

@ -18,17 +18,12 @@ export default {
layout, //
name: "index", //
};
},
mounted() {
},
methods: {
selected(val) {
selected(val) { //
this.name = val;
},
},
}
}
};
</script>
<style scoped lang="scss">

View File

@ -20,9 +20,6 @@ export default {
},
deep: true
}
},
mounted() {
console.log(this.res);
}
};
</script>

View File

@ -14,9 +14,6 @@
export default {
title: "两张横图",
props: ["res"],
mounted () {
}
};
</script>
<style lang="scss" scoped>

View File

@ -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;

View File

@ -29,7 +29,7 @@
</template>
<script>
export default {
props: ["res"],
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -29,7 +29,7 @@
</template>
<script>
export default {
props: ["res"],
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -29,7 +29,7 @@
</template>
<script>
export default {
props: ["res"],
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -18,10 +18,7 @@
<script>
export default {
title: "左一右二",
props: ["res"],
mounted() {
}
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -18,10 +18,7 @@
<script>
export default {
title: "左二右一",
props: ["res"],
mounted() {
console.log(this.res);
},
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -29,7 +29,7 @@
</template>
<script>
export default {
props: ["res"],
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -35,10 +35,7 @@
<script>
export default {
title: "文字图片模板",
props: ["res"],
mounted() {
console.log(this.res);
}
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -11,10 +11,7 @@
<script>
export default {
title: "标题栏",
props: ["res"],
mounted() {
console.log(this.res);
},
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -18,10 +18,7 @@
<script>
export default {
title: "上一下二",
props: ["res"],
mounted() {
console.log(this.res);
}
props: ["res"]
};
</script>
<style lang="scss" scoped>

View File

@ -18,9 +18,6 @@
export default {
title: "上二下一",
props: ["res"],
mounted() {
console.log(this.res);
}
};
</script>
<style lang="scss" scoped>

View File

@ -3,9 +3,6 @@
</template>
<script>
export default {
destroyed(){
}
}
</script>
<style scoped lang="scss">

View File

@ -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) => {

View File

@ -24,9 +24,6 @@
</Row>
<!-- 拼图验证码 -->
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
<div v-if="socialLogining">
<RectLoading />
</div>
<Footer />
</Col>
<!-- <LangSwitch /> -->
@ -40,15 +37,11 @@ import Cookies from "js-cookie";
import Header from "@/views/main-components/header";
import Footer from "@/views/main-components/footer";
import LangSwitch from "@/views/main-components/lang-switch";
import RectLoading from "@/views/my-components/lili/rect-loading";
import CountDownButton from "@/views/my-components/lili/count-down-button";
import util from "@/libs/util.js";
import verify from "@/views/my-components/verify";
export default {
components: {
CountDownButton,
RectLoading,
LangSwitch,
Header,
Footer,

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -28,7 +28,6 @@
<DropdownItem v-if="res.waitPayBill" @click.native="navigateTo('accountStatementBill')">
<Badge :count="res.waitPayBill">待与商家对账</Badge>
</DropdownItem>
<div></div>
</DropdownMenu>
</Dropdown>

View File

@ -27,6 +27,7 @@
<script>
import util from "@/libs/util.js";
export default {
name: "shrinkableMenu",
computed: {
@ -45,6 +46,9 @@ export default {
$route: {
handler: function (val, oldVal) {
console.log(val);
if (val.meta.firstRouterName && val.meta.firstRouterName !== this.currNav) {
this.selectNav(val.meta.firstRouterName)
}
}
}
},
@ -58,10 +62,38 @@ export default {
this.$store.commit("setCurrNav", name);
this.setStore("currNav", name);
util.initRouter(this);
this.$nextTick(()=>{
this.$refs.childrenMenu.updateActiveName()
})
},
}
};
</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>

View File

@ -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;
}

View File

@ -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) {

View File

@ -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,58 +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;
if (res.success) {

View File

@ -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>
@ -59,24 +59,27 @@
<Modal :title="modalTitle" v-model="queryModalVisible" :mask-closable="false" :width="500">
<Form :label-width="80">
<FormItem label="申请编号">
<FormItem label="申请编号">
<span>{{showList.sn}}</span>
</FormItem>
<FormItem label="用户名称">
<FormItem label="用户名称">
<span>{{showList.memberName}}</span>
</FormItem>
<FormItem label="申请金额">
<FormItem label="申请金额">
<span>{{showList.applyMoney}}</span>
</FormItem>
<FormItem label="提现状态">
<FormItem label="提现状态">
<span>{{showList.applyStatus | paramTypeFilter}}</span>
</FormItem>
<FormItem label="申请时间">
<FormItem label="申请时间">
<span>{{showList.createTime}}</span>
</FormItem>
<FormItem label="审核时间">
<FormItem label="审核时间">
<span>{{showList.inspectTime}}</span>
</FormItem>
<FormItem label="审核备注:">
<span>{{showList.inspectRemark}}</span>
</FormItem>
</Form>
<div slot="footer" v-if="showList.applyStatus == 'APPLY'">
@ -202,6 +205,7 @@ export default {
this.showList = {};
this.roleModalVisible = true;
this.showList = params.row;
this.audit =""
},
},
},

View File

@ -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() {
@ -487,7 +468,7 @@ export default {
this.$Message.success("禁用成功");
this.getData();
} else {
this.$Message.error(res.message);
// this.$Message.error(res.message);
}
});
},
@ -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,

View File

@ -119,6 +119,3 @@
line-height: 16px;
}
}
.point-data{
}

View File

@ -64,13 +64,13 @@
</div>
</Card>
<Card>
<Card class="mt_10">
<Tabs type="point" @on-click="memberInfoChange">
<TabPane label="TA的积分" name="point">
<div class="pointsTitle" style="justify-content: flex-start; text-align: left;">
<div style="width: 120px;">
<div class="points-top-title">
积分余额
剩余积分
</div>
<div class="points-top-text">
{{memberInfo.point?memberInfo.point:0}}
@ -83,9 +83,8 @@
border
:columns="pointsColumns"
:data="pointData"
class="mt_10"
ref="table"
sortable="custom"
@on-sort-change="pointChangeSort"
>
</Table>
@ -172,8 +171,7 @@
:columns="orderColumns"
:data="orderData"
ref="table"
sortable="custom"
@on-sort-change="orderChangeSort"
class="mt_10"
>
</Table>
@ -203,6 +201,7 @@
:columns="addressColumns"
:data="addressData"
ref="table"
class="mt_10"
sortable="custom"
@on-sort-change="addressChangeSort"
>
@ -249,8 +248,7 @@
:columns="walletColumns"
:data="walletData"
ref="table"
sortable="custom"
@on-sort-change="walletChangeSort"
class="mt_10"
>
</Table>
@ -289,9 +287,8 @@
border
:columns="receiptRecordColumns"
:data="receiptRecordData"
class="mt_10"
ref="table"
sortable="custom"
@on-sort-change="walletChangeSort"
>
<template slot="orderSnSlot" slot-scope="scope">
@ -365,7 +362,7 @@
import * as API_Order from "@/api/order.js";
export default {
name: "member",
name: "memberDetail",
components: {
region,
ossManage,
@ -423,7 +420,7 @@
key: "point",
width: 150,
render: (h, params) => {
if (params.row.pointType == 1) {
if (params.row.pointType == 'INCREASE') {
return h('div', [
h('span', {
style: {
@ -1074,6 +1071,7 @@
,
//
pointChangePageSize(v) {
this.pointSearchForm.pageNumber = 1;
this.pointSearchForm.pageSize = v;
this.getPointData();
}
@ -1086,6 +1084,7 @@
,
//
addressChangePageSize(v) {
this.addressSearchForm.pageNumber = 1;
this.addressSearchForm.pageSize = v;
this.getPointData();
},
@ -1098,6 +1097,7 @@
,
//
walletChangePageSize(v) {
this.walletSearchForm.pageNumber = 1;
this.walletSearchForm.pageSize = v;
this.getDepositLogData();
},
@ -1110,31 +1110,11 @@
,
//
orderChangePageSize(v) {
this.orderSearchForm.pageNumber = 1;
this.orderSearchForm.pageSize = v;
this.getOrderData();
},
orderChangeSort(e) {
this.orderSearchForm.sort = e.key;
this.orderSearchForm.order = e.order;
this.getOrderData();
},
addressChangeSort(e) {
this.addressSearchForm.sort = e.key;
this.addressSearchForm.order = e.order;
this.getPointData();
}
,
walletChangeSort(e) {
this.walletSearchForm.sort = e.key;
this.walletSearchForm.order = e.order;
this.getDepositLogData();
},
pointChangeSort(e) {
this.pointSearchForm.sort = e.key;
this.pointSearchForm.order = e.order;
this.getPointData();
},
//
selectDateRange(v) {
if (v) {
this.orderSearchForm.startDate = v[0];

View File

@ -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 } });
@ -447,7 +409,7 @@
this.$Message.success('禁用成功');
this.getData()
} else {
this.$Message.error(res.message);
// this.$Message.error(res.message);
}
});
}

View File

@ -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>

View File

@ -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>

View File

@ -1,5 +0,0 @@
.wangEditor {
.ivu-form-item-content {
line-height: unset !important;
}
}

View File

@ -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>

View File

@ -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>

View File

@ -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();
},

View File

@ -1,211 +0,0 @@
<style lang="scss" scoped>
@import "../message-manage/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="title">
<Input v-model="form.title" style="width:600px" />
</FormItem>
<FormItem label="内容" prop="content" class="wangEditor">
<editor v-model="form.content"></editor>
</FormItem>
<div v-if="type==0">
<FormItem label="发送范围">
<RadioGroup type="button" button-style="solid" v-model="form.sendType" >
<Radio label="ALL">全部会员</Radio>
<Radio label="SELECT">指定会员</Radio>
</RadioGroup>
</FormItem>
<div>
<FormItem label="选择用户" v-if="form.sendType==='SELECT'">
<member-choose text="选择发送用户" @on-change="handleSelectUser"></member-choose>
</FormItem>
</div>
</div>
<Form-item class="br">
<Button
type="primary"
:loading="submitLoading"
@click="handleSubmit"
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 editor from "@/views/my-components/lili/editor";
import memberChoose from "@/views/my-components/lili/member-choose";
export default {
name: "add_message",
components: {
memberChoose,
editor
},
data() {
return {
type: 0, // 0 1
loading: false, //
selectUsers: [], //
modalTitle: "", //
form: {
//
title: "",
content: "",
sendType: "ALL",
memberIds: ""
},
formValidate: {
//
title: [{ required: true, message: "标题不能为空", trigger: "blur" }],
content: [{ required: true, message: "内容不能为空", trigger: "blur" }]
},
submitLoading: false, //
backRoute: "" // back
};
},
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;
}
});
},
handleSubmit() {
this.$refs.form.validate(valid => {
let ids = [];
this.selectUsers.forEach(e => {
ids += e.id + ",";
});
if (ids.length > 0) {
ids = ids.substring(0, ids.length - 1);
}
this.form.memberIds = ids;
if (valid) {
this.submitLoading = true;
if (this.modalType === 0) {
// id
this.postRequest("/memberNoticeSenter/insertOrUpdate", this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.modalVisible = false;
}
});
} else {
//
this.postRequest("/memberNoticeSenter/insertOrUpdate", this.form).then(res => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("操作成功");
this.modalVisible = false;
}
});
}
}
});
},
handelSubmit() {
console.log()
this.$refs.form.validate(valid => {
if (valid) {
this.submitLoading = true;
if (this.type == 0) {
// id
delete this.form.id;
// id
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_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 == "member-notice-sender") {
this.type = this.$route.query.type;
if (this.type == 1) {
this.form.id = this.$route.query.id;
this.getData();
}
}
}
}
};
</script>

View File

@ -1,370 +0,0 @@
<template>
<div class="search">
<Card>
<Row @keydown.enter.native="handleSearch">
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="70"
class="search-form"
>
<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="sendType">
<Select
v-model="searchForm.sendType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="ALL">全站会员</Option>
<Option value="SELECT">指定会员</Option>
</Select>
</Form-item>
<Form-item label="创建人" prop="createBy">
<Input
type="text"
v-model="searchForm.createBy"
placeholder="请输入创建人"
clearable
style="width: 200px"
/>
</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>
</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="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>
export default {
name: "member-notice-sender",
components: {},
data() {
return {
openSearch: true, //
openTip: true, //
loading: true, //
modalType: 0, //
modalVisible: false, //
modalTitle: "", //
drop: false, //
dropDownContent: "展开", // drop
dropDownIcon: "ios-arrow-down", // drop
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
submitLoading: false, //
selectList: [], //
selectCount: 0, //
columns: [
//
{
type: "selection",
width: 60,
align: "center",
},
{
type: "index",
width: 60,
align: "center",
},
{
title: "标题",
key: "title",
minWidth: 120,
sortable: false,
},
{
title: "发送类型",
key: "sendType",
minWidth: 120,
sortable: false,
render: (h, params) => {
if (params.row.sendType == "ALL") {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "全部会员",
},
}),
]);
} else {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "指定会员",
},
}),
]);
}
},
},
{
title: "创建人",
key: "createBy",
minWidth: 120,
sortable: false,
},
{
title: "创建时间",
key: "createTime",
minWidth: 120,
sortable: true,
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "error",
size: "small",
icon: "md-trash",
},
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
]);
},
},
],
data: [], //
total: 0, //
};
},
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;
},
dropDown() {
if (this.drop) {
this.dropDownContent = "展开";
this.dropDownIcon = "ios-arrow-down";
} else {
this.dropDownContent = "收起";
this.dropDownIcon = "ios-arrow-up";
}
this.drop = !this.drop;
},
getDataList() {
this.loading = true;
//
this.getRequest("/memberNoticeSenter/getByPage", this.searchForm).then(
(res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
this.total = res.result.total;
}
}
);
//
//this.data = [
//];
this.total = this.data.length;
this.loading = false;
},
add() {
let query = { type: 0, backRoute: this.$route.name };
this.$router.push({
name: "add_message",
query: query,
});
},
edit(v) {
this.modalType = 1;
this.modalTitle = "编辑";
this.$refs.form.resetFields();
// null""
for (let attr in v) {
if (v[attr] === null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true;
},
remove(v) {
this.$Modal.confirm({
title: "确认删除",
//
content: "您确认要删除么?",
loading: true,
onOk: () => {
//
this.deleteRequest("/memberNoticeSenter/delByIds/" + v.id).then(
(res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
}
);
//
//this.$Message.success("");
//this.$Modal.remove();
//this.getDataList();
},
});
},
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("/memberNoticeSenter/delByIds/" + ids).then(
(res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.clearSelectAll();
this.getDataList();
}
}
);
//
//this.$Message.success("");
//this.$Modal.remove();
//this.clearSelectAll();
//this.getDataList();
},
});
},
},
mounted() {
this.init();
},
};
</script>

View File

@ -1,12 +1,12 @@
<template>
<div class="search">
<Row>
<Card>
<Row @keydown.enter.native="handleSearch">
<Card style="padding:0 10px 10px 0">
<Form
@keydown.enter.native="handleSearch"
ref="searchForm"
:model="searchForm"
inline
style="margin-top:10px"
:label-width="70"
class="search-form"
>
@ -21,16 +21,13 @@
</Form-item>
<Button @click="handleSearch" class="search-btn" type="primary" 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"
class="mt_10"
>
</Table>
<Row type="flex" justify="end" class="mt_10">
@ -48,8 +45,6 @@
></Page>
</Row>
</Card>
</Row>
</div>
</template>
@ -57,9 +52,9 @@
import region from "@/views/lili-components/region";
import * as API_Member from "@/api/member.js";
import ossManage from "@/views/sys/oss-manage/ossManage";
import * as RegExp from '@/libs/RegExp.js';
export default {
//
name: "point",
components: {
region,
@ -67,14 +62,11 @@
},
data() {
return {
descFlag: false, //
loading: true, //
searchForm: { //
pageNumber: 1,
pageSize: 10,
},
selectList: [], //
selectCount: 0, //
columns: [
{
title: "会员名称",
@ -141,41 +133,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];
}
},
//
getData() {
this.loading = true;

View File

@ -1,161 +0,0 @@
.message {
&-main-con {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
}
&-mainlist-con {
position: absolute;
left: 0;
top: 10px;
width: 300px;
bottom: 0;
padding: 10px 0;
div {
padding: 10px;
margin: 0 20px;
border-bottom: 1px dashed #d2d3d2;
&:last-child {
border: none;
}
.mes-wrap {
display: flex;
align-items: center;
justify-content: center;
}
.message-count-badge-outer {
margin-left: 5px;
}
.message-count-badge {
background: #d2d3d2;
}
.message-count-badge-red {
background: #ed3f14;
}
.mes-type-btn-text {
margin-left: 10px;
}
}
}
&-content-con {
position: absolute;
top: 10px;
right: 10px;
bottom: 10px;
left: 300px;
background: white;
border-radius: 3px;
box-shadow: 2px 2px 10px 2px rgba(0, 0, 0, .1);
overflow: auto;
.message-title-list-con {
width: 100%;
height: 100%;
}
.message-content-top-bar {
height: 40px;
width: 100%;
background: white;
position: absolute;
left: 0;
top: 0;
border-bottom: 1px solid #dededb;
.mes-back-btn-con {
position: absolute;
width: 70px;
height: 30px;
left: 0;
top: 5px;
}
.mes-title {
position: absolute;
top: 0;
right: 70px;
bottom: 0;
left: 70px;
line-height: 40px;
padding: 0 30px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
}
}
.mes-time-con {
position: absolute;
width: 100%;
top: 40px;
left: 0;
padding: 20px 0;
text-align: center;
font-size: 14px;
color: #b7b7b5;
}
.message-content-body {
position: absolute;
top: 90px;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
.message-content {
padding: 10px 20px;
}
}
}
}
.page-fix {
position: fixed;
right: 2vw;
bottom: 3vh;
}
.back-message-list-enter,
.back-message-list-leave-to {
opacity: 0;
}
.back-message-list-enter-active,
.back-message-list-leave-active {
transition: all .5s;
}
.back-message-list-enter-to,
.back-message-list-leave {
opacity: 1;
}
.view-message-enter,
.view-message-leave-to {
opacity: 0;
}
.view-message-enter-active,
.view-message-leave-active {
transition: all .5s;
}
.view-message-enter-to,
.view-message-leave {
opacity: 1;
}
.mes-current-type-btn-enter,
.mes-current-type-btn-leave-to {
opacity: 0;
width: 0;
}
.mes-current-type-btn-enter-active,
.mes-current-type-btn-leave-active {
transition: all .3s;
}
.mes-current-type-btn-enter-to,
.mes-current-type-btn-leave {
opacity: 1;
width: 12px;
}

View File

@ -1,464 +0,0 @@
<style lang="scss" scoped>
@import "./message.scss";
</style>
<template>
<div class="message-main-con">
<div class="message-mainlist-con">
<div>
<Button @click="setCurrentMesType('unread')" size="large" long type="text">
<div class="mes-wrap">
<transition name="mes-current-type-btn">
<Icon v-show="currentMessageType == 'unread'" type="md-checkmark"></Icon>
</transition>
<span class="mes-type-btn-text">未读消息</span>
<Badge
class="message-count-badge-outer"
class-name="message-count-badge-red"
:count="unreadCount"
></Badge>
</div>
</Button>
</div>
<div>
<Button @click="setCurrentMesType('hasread')" size="large" long type="text">
<div class="mes-wrap">
<transition name="mes-current-type-btn">
<Icon v-show="currentMessageType == 'hasread'" type="md-checkmark"></Icon>
</transition>
<span class="mes-type-btn-text">已读消息</span>
<Badge
class="message-count-badge-outer"
class-name="message-count-badge"
:count="hasreadCount"
></Badge>
</div>
</Button>
</div>
<div>
<Button @click="setCurrentMesType('recyclebin')" size="large" long type="text">
<div class="mes-wrap">
<transition name="mes-current-type-btn">
<Icon v-show="currentMessageType == 'recyclebin'" type="md-checkmark"></Icon>
</transition>
<span class="mes-type-btn-text">回收站</span>
<Badge
class="message-count-badge-outer"
class-name="message-count-badge"
:count="recyclebinCount"
></Badge>
</div>
</Button>
</div>
</div>
<div class="message-content-con">
<transition name="view-message">
<div v-if="showMesTitleList" class="message-title-list-con">
<Table
ref="messageList"
:loading="loading"
:columns="mesTitleColumns"
:data="currentMesList"
:no-data-text="noDataText"
></Table>
<Page
:current="params.pageNumber"
:total="total"
:page-size="params.pageSize"
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[5,10]"
size="small"
show-total
show-elevator
show-sizer
class="page-fix"
></Page>
</div>
</transition>
<transition name="back-message-list">
<div v-if="!showMesTitleList" class="message-view-content-con">
<div class="message-content-top-bar">
<span class="mes-back-btn-con">
<Button type="text" @click="backMesTitleList">
<Icon type="ios-arrow-back"></Icon>&nbsp;&nbsp;返回
</Button>
</span>
<h3 class="mes-title">{{ mes.title }}</h3>
</div>
<p class="mes-time-con">
<Icon type="android-time"></Icon>
&nbsp;&nbsp;{{ mes.time }}
</p>
<div class="message-content-body">
<p class="message-content" v-html="mes.content">{{ mes.content }}</p>
</div>
</div>
</transition>
</div>
</div>
</template>
<script>
import Cookies from "js-cookie";
import {
getMessageSendData,
editMessageSend,
deleteMessageSend
} from "@/api/index";
export default {
name: "message_index",
data() {
const markAsreadBtn = (h, params) => {
return h(
"Button",
{
props: {
icon: "md-eye-off",
size: "small"
},
on: {
click: () => {
//
let v = params.row;
// null""
for (let attr in v) {
if (v[attr] == null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
data.status = 1;
this.loading = true;
editMessageSend(data).then(res => {
this.loading = false;
if (res.success) {
this.$Message.success("操作成功");
this.unreadCount -= 1;
this.hasreadCount += 1;
this.$store.commit("setMessageCount", this.unreadCount);
this.refreshMessage();
}
});
}
}
},
"标为已读"
);
};
const deleteMesBtn = (h, params) => {
return h(
"Button",
{
props: {
icon: "md-trash",
size: "small",
type: "error"
},
on: {
click: () => {
//
let v = params.row;
// null""
for (let attr in v) {
if (v[attr] == null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
data.status = 2;
this.loading = true;
editMessageSend(data).then(res => {
this.loading = false;
if (res.success) {
this.$Message.success("操作成功");
this.hasreadCount -= 1;
this.recyclebinCount += 1;
this.refreshMessage();
}
});
}
}
},
"删除"
);
};
const restoreBtn = (h, params) => {
return h(
"Button",
{
props: {
icon: "md-redo",
size: "small"
},
style: {
margin: "0 5px 0 0"
},
on: {
click: () => {
//
let v = params.row;
// null""
for (let attr in v) {
if (v[attr] == null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
data.status = 1;
this.loading = true;
editMessageSend(data).then(res => {
this.loading = false;
if (res.success) {
this.$Message.success("操作成功");
this.recyclebinCount -= 1;
this.hasreadCount += 1;
this.refreshMessage();
}
});
}
}
},
"还原"
);
};
const deleteRealBtn = (h, params) => {
return h(
"Button",
{
props: {
icon: "md-trash",
size: "small",
type: "error"
},
on: {
click: () => {
//
let v = params.row;
this.loading = true;
deleteMessageSend(v.id).then(res => {
this.loading = false;
if (res.success) {
this.$Message.success("操作成功");
this.recyclebinCount -= 1;
this.refreshMessage();
}
});
}
}
},
"彻底删除"
);
};
return {
loading: true, //
params: { //
userId: JSON.parse(Cookies.get("userInfo")).id,
status: 0,
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc" //
},
total: 0, //
totalUnread: 0, //
totalRead: 0, //
totalRemove: 0, //
currentMesList: [], //
unreadMesList: [], //
hasreadMesList: [], //
recyclebinList: [], //
currentMessageType: "unread", //
showMesTitleList: true, //
unreadCount: 0, //
hasreadCount: 0, //
recyclebinCount: 0, //
noDataText: "暂无未读消息", //
mes: { //
title: "",
time: "",
content: ""
},
mesTitleColumns: [
{
type: "index",
width: 50,
align: "center"
},
{
title: " ",
key: "title",
align: "left",
ellipsis: true,
render: (h, params) => {
return h("span", [
h(
"a",
{
style: {
margin: "0 30px 0 0"
},
on: {
click: () => {
this.showMesTitleList = false;
this.mes.title = params.row.title;
this.mes.time = params.row.createTime;
this.getContent(params.row);
}
}
},
"【" + params.row.type + "】 " + params.row.title
)
]);
}
},
{
title: " ",
key: "time",
align: "center",
width: 190,
render: (h, params) => {
return h("span", [
h("Icon", {
props: {
type: "md-time",
size: 16
},
style: {
margin: "0 5px 3px 0"
}
}),
h("span", params.row.createTime)
]);
}
},
{
title: " ",
key: "asread",
align: "center",
width: 210,
render: (h, params) => {
if (this.currentMessageType == "unread") {
return h("div", [markAsreadBtn(h, params)]);
} else if (this.currentMessageType == "hasread") {
return h("div", [deleteMesBtn(h, params)]);
} else {
return h("div", [
restoreBtn(h, params),
deleteRealBtn(h, params)
]);
}
}
}
]
};
},
methods: {
changePage(v) {
this.params.pageNumber = v;
this.refreshMessage();
},
changePageSize(v) {
this.params.pageSize = v;
this.refreshMessage();
},
refreshMessage() {
let status = 0;
let type = this.currentMessageType;
if (type == "unread") {
status = 0;
} else if (type == "hasread") {
status = 1;
} else {
status = 2;
}
this.params.status = status;
this.loading = true;
getMessageSendData(this.params).then(res => {
this.loading = false;
if (res.success) {
this.currentMesList = res.result.records;
this.total = res.result.total;
}
});
},
initMessage() {
this.params.status = 0;
getMessageSendData(this.params).then(res => {
if (res.success) {
this.unreadCount = res.result.total;
this.initReadMessage();
}
});
},
initReadMessage() {
this.params.status = 1;
getMessageSendData(this.params).then(res => {
if (res.success) {
this.hasreadCount = res.result.total;
this.initRemoveMessage();
}
});
},
initRemoveMessage() {
this.params.status = 2;
getMessageSendData(this.params).then(res => {
if (res.success) {
this.recyclebinCount = res.result.total;
this.setCurrentMesType("unread");
}
});
},
editMessage(status) {
editMessageSend().then(res => {
if (res.success) {
this.$Message.success("操作成功");
}
});
},
deleteMessage(id) {
deleteMessageSend(id).then(res => {
if (res.success) {
this.$Message.success("删除成功");
}
});
},
backMesTitleList() {
this.showMesTitleList = true;
},
setCurrentMesType(type) {
if (this.currentMessageType !== type) {
this.showMesTitleList = true;
}
this.currentMessageType = type;
if (type == "unread") {
this.noDataText = "暂无未读消息";
} else if (type == "hasread") {
this.noDataText = "暂无已读消息";
} else {
this.noDataText = "回收站无消息";
}
this.params.pageNumber = 1;
this.refreshMessage();
},
getContent(v) {
this.mes.content = v.content;
}
},
mounted() {
this.initMessage();
},
watch: {
// id
$route(to, from) {
if (to.name == "message_index") {
this.initMessage();
}
}
}
};
</script>

View File

@ -1,633 +0,0 @@
<template>
<Collapse v-model="open_panel">
<Panel name="1">
规格名称
<div slot="content" class="sku-item-content">
<Form :model="skuForm" @submit.native.prevent style="width:100%;">
<div v-for="(item, $index) in skuInfo" :key="$index" class="sku_value">
<Card :bordered="true" style="margin: 15px 0;">
<FormItem label="规格名:" class="sku-item-content-name">
<AutoComplete
style="width: 150px;"
v-model="item.name"
:maxlength="30"
:data="skuKey"
placeholder="请输入规格项名称"
:filter-method="filterMethod"
@on-change="skuItemChange(item.name,$index)"
@keyup.enter.native="editSkuItem(item, $index)"
>
<!-- @on-focus="getActiveSkuItem(index, $index ,item, val)"
@on-blur="editSkuItem(item, $index)"
on-change 变更
on-focus 聚焦时触发 event
on-blur 失焦时触发
keyup.enter.native 回车时 -->
</AutoComplete>
<Button
type="error"
style="margin-left: 10px;"
@click="handleCloseSkuItem($index)"
>删除</Button>
<Checkbox
v-if="$index === 0"
style="padding: 0px 0px 0px 30px;"
v-model="checkedImage"
@on-change="handleChangeImage"
>规格图片</Checkbox>
</FormItem>
<FormItem label="规格值:" class="sku-item-content-value">
<!--规格值文本列表-->
<div
v-for="(val, index) in item.spec_values"
:key="index"
style="padding: 0px 20px 10px 0px;float: left"
>
<div style="display:inline-block;">
<AutoComplete
style="width: 150px; float: left"
v-model="val.value"
:maxlength="30"
:data="skuValue"
placeholder="请输入规格值名称"
:filter-method="filterMethod"
@on-change="skuValueChange(val.value,$index)"
@on-focus="editSkuIValue($index)"
@keyup.enter.native="editSkuIValue(item, val, $index, index)"
></AutoComplete>
<Button
type="error"
style="float: left;margin-left: 10px"
@click="handleCloseSkuValue($index, index)"
>删除</Button>
</div>
<div>
<upload-pic-thumb
style="text-align: left;"
v-show="$index === 0 && checkedImage"
v-model="val.spec_image" v-on:change="thumbChange" :multiple="false" v-on:uploadchange="uploadchange"
/>
</div>
</div>
<div style="float: left">
<Button type="primary" @click="addSpec($index, item)">添加规格值</Button>
</div>
</FormItem>
</Card>
</div>
</Form>
<Button type="primary" size="mini" @click="addSkuItem"></Button>
</div>
</Panel>
<Panel name="2">
规格详细
<div slot="content">
<div slot="content">
<Table
:columns="skuTableColumn"
:data="skuTableData"
style="width: 100%;.ivu-table-overflowX{ overflow-x: hidden;}"
:span-method="handleSpan"
>
<template slot-scope="{ row }" slot="sn">
<Input
v-model="row.sn"
placeholder="请输入货号"
@on-change="updateSkuTable(row,'sn')"
@on-focus="updateSkuTable(row,'sn')"
@on-blur="updateSkuTable(row,'sn')"
/>
</template>
<template slot-scope="{ row }" slot="weight">
<Input
v-model="row.weight"
placeholder="请输入重量"
@on-change="updateSkuTable(row,'weight')"
/>
</template>
<template slot-scope="{ row }" slot="quantity">
<Input
v-model="row.quantity"
placeholder="请输入库存"
@on-change="updateSkuTable(row,'quantity')"
/>
</template>
<template slot-scope="{ row }" slot="cost">
<Input
v-model="row.cost"
placeholder="请输入成本价"
@on-change="updateSkuTable(row,'cost')"
/>
</template>
<template slot-scope="{ row }" slot="price">
<Input
v-model="row.price"
placeholder="请输入成本价"
@on-change="updateSkuTable(row,'price')"
/>
</template>
</Table>
</div>
</div>
</Panel>
</Collapse>
</template>
<script>
import { regular } from "@/utils";
import uploadPicThumb from "../lili/upload-pic-thumb.vue";
import cloneObj from "@/utils/index";
export default {
name: "goodsSku",
components: {
uploadPicThumb
},
props: {
open_panel: {
type: [String, Number],
default: false
},
/** 是否自动生成货号 */
productSn: {
type: Boolean,
default: false
},
/** 当前商品编号 */
goodsSn: {
type: [String, Number],
default: ['', 0]
}
},
data() {
return {
/** 请求数据*/
skuData: [],
/** 当前可选择的 规格名称*/
skuKey: [],
/** 当前可选择的 规格值*/
skuValue: [],
/** 表单数据*/
skuForm: {},
/** 表格头 */
skuTableColumn: [],
/** 表格数据 */
skuTableData: [
{
sn: '',
weight: '',
quantity: '',
cost: '',
price: ''
}
],
/** 要提交的规格数据*/
skuInfo: [],
/** 当前规格项下的规格值列表*/
specList: [],
/** 当前规格项索引 */
activeSkuItemIndex: 0,
/** 当前规格项 */
activeSkuItem: {},
/** 规格图片 */
images: [],
/** 当前规格值索引 */
activeSkuValIndex: 0,
/** 当前规格值 */
activeSkuVal: {},
/** 存储未通过校验的单元格位置 */
validateError: [],
//
checkedImage:false
};
},
mounted(){
},
watch: {
/** 自动生成货号 */
productSn() {
if (this.productSn && this.skuTableData.length > 0) {
let count = 1
this.skuTableData.forEach(key => {
key.sn = this.goodsSn + '-00000' + count
count++
})
/** 异步更新skuTableData数据 */
this.$emit("getTableData", this.skuTableData);
}
}
},
methods: {
uploadchange(url){
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 添加规格项 */
addSkuItem() {
//
this.$set(this.skuInfo, this.skuInfo.length, {
spec_values: []
});
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 移除当前规格项 进行数据变化*/
handleCloseSkuItem($index) {
this.skuInfo.splice($index, 1);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 规格变更 */
skuItemChange(value, $index) {
this.activeSkuItemIndex = $index;
//
let item = this.findSpec(value);
/** 更新skuInfo数据 */
this.$set(this.skuInfo[this.activeSkuItemIndex], "name", item.name);
this.$set(this.skuInfo[this.activeSkuItemIndex], "spec_values", []);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/**
* 根据规格项名称搜索对应的规格对象如果是服务器设置过的话
*/
findSpec(name) {
let spec = { name: name };
this.skuData.forEach(item => {
if (item.name === name) {
spec = item;
}
});
return spec;
},
/** 选中/不选中 添加规格图片 是否显示上传组件*/
handleChangeImage(val) {
this.$set(this.skuInfo, this.skuInfo.length, {});
this.skuInfo.splice(this.skuInfo.length - 1, 1);
this.checkedImage = val;
/** 如果 图片按钮不显示 则置空图片列表中的所有图片数据 并且spec_type设置为0 */
if (!val) {
this.skuInfo.forEach(key => {
if (key.spec_values) {
key.spec_values.forEach(item => {
item.spec_image = "";
});
}
});
}
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 规格值 */
/** 添加当前规格项的规格值*/
addSpec($index, item) {
this.activeSkuItemIndex = $index;
this.$set(
this.skuInfo[$index].spec_values,
this.skuInfo[$index].spec_values.length,
{
name: item.name
}
);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 移除当前规格值 */
handleCloseSkuValue($index, index) {
this.skuInfo[$index].spec_values.splice(index, 1);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 选择规格值时触发 */
skuValueChange(val) {
/** 更新skuInfo数据 */
let _arr = cloneObj(this.skuInfo[this.activeSkuItemIndex]);
this.$set(_arr.spec_values[this.activeSkuValIndex], "name", _arr.name);
this.$set(this.skuInfo, this.activeSkuItemIndex, _arr);
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 编辑规格值时触发 */
editSkuIValue($index) {
if (this.skuInfo.length >= $index) {
let data = this.findSpec(this.skuInfo[$index].name);
this.skuValue = data.value;
}
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/** 获取编辑时的skuInfo信息 */
getSkuInfo() {
/** 下拉列表数据(skuData)存在时 检测productSkuInfo中对应的规格(spec_id)项 并且赋值于skuInfo中对应的规格项信息描述 + 名称) */
if (this.categoryId) {
API_spec.getSpecValuesListData(this.categoryId, {}).then(response => {
this.skuData = response;
if (
this.skuData.length > 0 &&
Array.isArray(this.productSkuInfo) &&
this.productSkuInfo.length > 0
) {
this.skuInfo = cloneObj(this.productSkuInfo);
if (this.skuInfo.length > 0) {
this.skuInfo.forEach(key => {
this.skuData.forEach(item => {
if (key.spec_id === item.spec_id) {
key.name = item.name;
key.spec_memo = item.spec_memo;
}
});
});
}
/** 如果存在图片则进行显示 */
if (this.skuInfo[0].spec_values[0].spec_type === 1) {
this.checkedImage = true;
}
/** 触发一次数据转换(规格选择数据=> 规格表格数据) */
}
});
}
/**
* 渲染规格详细表格
*/
this.renderTableData();
},
/**
* 渲染table所需要的column data
*/
renderTableData() {
this.skuTableColumn = [];
this.skuTableData = [];
//
this.skuInfo.forEach(sku => {
//
let columnName = sku.name;
this.skuTableColumn.push({
title: columnName,
key: columnName
});
});
this.skuTableColumn.push(
{
title: "货号",
slot: "sn"
},
{
title: "重量",
slot: "weight"
},
{
title: "库存",
slot: "quantity"
},
{
title: "成本价",
slot: "cost"
},
{
title: "价格",
slot: "price"
}
);
//
let cloneTemp = cloneObj(this.skuInfo);
//
this.skuTableData = [];
//
if (cloneTemp[0]) {
//
let result = [];
// key
// sku
if(this.checkedImage===false){
cloneTemp[0].spec_values.forEach(specItem => {
result.push({
[specItem.name]: specItem.value
});
});
}else{
cloneTemp[0].spec_values.forEach(specItem => {
result.push({
[specItem.name]: specItem.value,
images: specItem.spec_image
});
});
}
cloneTemp.splice(0, 1);
result = this.specIterator(result, cloneTemp);
result = this.defaultParams(result);
this.skuTableData = result;
}
this.$emit("getTableData", this.skuTableData);
},
/** 自动完成表单所需方法*/
filterMethod(value, option) {
return option.toUpperCase().indexOf(value.toUpperCase()) !== -1;
},
/** 根据分类id获取系统设置规格信息*/
Get_SkuInfoByCategory() {
if (this.baseInfoForm.categoryId) {
getGoodsSpecInfo(this.baseInfoForm.categoryId, {}).then(response => {
this.skuData = response;
if (this.skuData.length > 0) {
this.skuData.forEach(spec => {
this.skuKey.push(spec.name);
});
}
});
}
},
/** 检测是否未通过0-99999999之间的数字校验 */
isValidate(index, scope) {
return this.validateError.some(key => {
return key[0] === index && key[1] === scope.$index
})
},
/** 数据改变之后 抛出数据 */
updateSkuTable(row, item) {
let index = row._index;
this.skuTableData[index][item] = row[item];
/** 进行自定义校验 判断是否是数字(小数也能通过)重量 */
if (
(!/^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/.test(row[item]) &&
item === "weight") ||
parseInt(row[item]) < 0 ||
parseInt(row[item]) > 99999999
) {
this.$Message.error("请输入0~99999999之间的数字值");
return;
} else if (
(item === "quantity" && !/^[0-9]\d*$/.test(row[item])) ||
parseInt(row[item]) < 0 ||
parseInt(row[item]) > 99999999
) {
//
this.$Message.error("请输入0~99999999之间的整数");
return;
} else if (
((item === "cost" || item === "price") &&
!regular.money.test(row[item])) ||
parseInt(row[item]) < 0 ||
parseInt(row[item]) > 99999999
) {
//
this.$Message.error("请输入0~99999999之间的价格");
return;
}
this.skuTableData[index][item] = row[item];
this.$emit("getTableData", this.skuTableData);
// console.log(999, this.skuTableData)
},
/**
* 迭代属性形成表格
* result 渲染的数据
* array spec数据
*/
specIterator(result, cloneTemp) {
//
if (cloneTemp.length > 0) {
let table = [];
result.forEach(resItem => {
let tableItem = [];
cloneTemp[0].spec_values.forEach(valItem => {
let obj = cloneObj(resItem);
obj[valItem.name] = valItem.value;
table.push(obj);
});
});
result = [];
table.forEach(t => {
result.push(t);
});
//
cloneTemp.splice(0, 1);
} else {
return result;
}
return this.specIterator(result, cloneTemp);
},
showData() {
// console.log(JSON.stringify(this.skuTableData));
// console.warn(this.specList);
},
/**
* 添加固有属性
*/
defaultParams(tableData) {
return tableData;
},
handleSpan({ row, column, rowIndex, columnIndex }) {},
thumbChange(){
this.$emit("getTableData", this.skuTableData);
}
},
};
</script>
<style lang="scss" scoped>
.layout {
margin-bottom: 20px;
.sku-item-content {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
width: 100%;
.sku-item-content-name {
margin-top: 24px;
display: flex;
align-items: flex-start;
width: 100%;
}
}
.demo-upload-list{
display: inline-block;
width: 60px;
height: 60px;
text-align: center;
line-height: 60px;
border: 1px solid transparent;
border-radius: 4px;
overflow: hidden;
background: #fff;
position: relative;
box-shadow: 0 1px 1px rgba(0,0,0,.2);
margin-right: 4px;
}
.demo-upload-list img{
width: 100%;
height: 100%;
}
.demo-upload-list-cover{
display: none;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0,0,0,.6);
}
.demo-upload-list:hover .demo-upload-list-cover{
display: block;
}
.demo-upload-list-cover i{
color: #fff;
font-size: 20px;
cursor: pointer;
margin: 0 2px;
}
}
</style>

View File

@ -1,114 +0,0 @@
<template>
<div>
<Button
:countTime="countTime"
:loading="loading"
:type="type"
:size="size"
:ghost="ghost"
:disabled="disabled||clicked"
:icon="icon"
:shape="shape"
:long="long"
@click="handleClick"
>{{buttonText}}</Button>
</div>
</template>
<script>
export default {
name: "iconChoose",
props: {
text: {
type: String,
default: "提交"
},
autoCountDown: {
type: Boolean,
default: true
},
countTime: {
type: [Number, String],
default: 60
},
suffixText: {
type: String,
default: "后重试"
},
type: String,
size: String,
loading: {
type: Boolean,
default: false
},
ghost: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
icon: String,
shape: String,
long: {
type: Boolean,
default: false
}
},
data() {
return {
buttonText: this.text, //
count: Number(this.countTime), //
clicked: false //
};
},
methods: {
init() {},
handleClick() {
if (this.autoCountDown) {
this.clicked = true;
this.countDown();
}
this.$emit("on-click", true);
},
startCountDown() {
this.clicked = true;
this.countDown();
},
countDown() {
let that = this;
if (this.count == 0) {
this.clicked = false;
this.count = this.countTime;
this.buttonText = this.text;
return;
} else {
this.buttonText = this.count + " 秒" + this.suffixText;
this.count--;
}
setTimeout(function() {
that.countDown();
}, 1000);
},
setText(value) {
if (value === this.buttonText) {
return;
}
this.buttonText = value;
},
},
watch: {
text(val) {
this.setText(val);
}
},
mounted() {
this.init();
}
};
</script>
<style lang="scss">
</style>

View File

@ -1,346 +0,0 @@
<template>
<div class="sku-choose">
<Button @click="showDrawer=true" :icon="icon">{{ text }}</Button>
<span @click="clearSelectData" class="clear">清空已选</span>
<Collapse simple class="collapse">
<Panel name="1">
已选择
<span class="select-count">{{ selectObj.length }}</span>
<p slot="content">
<Tag
v-for="(item, i) in selectObj"
:key="i"
:name="item.id"
color="default"
closable
@on-close="handleCancelObj"
>{{ createName(item) }}
</Tag>
</p>
</Panel>
</Collapse>
<Drawer title="选择活动优惠券" closable v-model="showDrawer" :width="width" draggable>
<Table
:loading="showLoading"
border
:columns="tableColumns"
:data="tableData"
:height="height"
ref="tableData"
></Table>
<Row type="flex" justify="end" style="margin: 10px 0;">
<Page
:current="searchForm.pageNumber"
:total="tableTotal"
:page-size="searchForm.pageSize"
@on-change="changeDataPage"
@on-page-size-change="changeDataPageSize"
:page-size-opts="[10,20,50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
<div class="my-drawer-footer">
已选择
<span class="select-count">{{ selectObj.length }}</span>
<Button @click="clearSelectData" style="margin-left:10px">清空已选</Button>
<Button @click="showDrawer=false" type="primary" style="margin-left:10px">关闭</Button>
</div>
</Drawer>
</div>
</template>
<script>
import {
getPlatformCouponList
} from "@/api/promotion";
export default {
name: "userChoose",
props: {
text: {
type: String,
default: "选择SKU"
},
icon: {
type: String,
default: "md-basket"
},
initData: {
type: Array,
default: []
},
createName: {
type: Function,
default: function (item) {
return item.goodsName
}
}
},
mounted() {
this.selectObj = this.initData
console.log(JSON.stringify(this.initData))
},
data() {
return {
//
height: 500,
width: 500,
//
showLoading: true,
//
showDrawer: false,
selectObj: [], //
searchForm: { //
getType: "ACTIVITY",//
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc", //
},
tableColumns: [ //
{
type: "index",
width: 60,
align: "center"
},
{
title: "商品名称",
key: "goodsName",
minWidth: 140
},
{
title: "规格",
key: "specName",
minWidth: 140,
},
{
title: "图片",
key: "thumbnail",
width: 80,
align: "center",
render: (h, params) => {
return h("Avatar", {
props: {
src: params.row.face
}
});
}
},
{
title: "状态",
key: "status",
align: "center",
width: 120,
render: (h, params) => {
if (params.row.delFlag == 0) {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "正常"
}
})
]);
} else if (params.row.delFlag == -1) {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
}
}
},
{
title: "创建时间",
key: "createTime",
sortable: true,
sortType: "desc",
width: 170
},
{
title: "操作",
key: "action",
width: 130,
align: "center",
fixed: "right",
render: (h, params) => {
let select;
this.selectObj.forEach(item => {
if (item.id === params.row.id) {
select = params.row
}
});
if (select) {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseCancel(params.row);
}
}
},
"取消选择"
)
]);
} else {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseObj(params.row);
}
}
},
"选择"
)
]);
}
}
}
],
tableData: [], //
tableTotal: 0 //
};
},
methods: {
changeDataPage(v) {
this.searchForm.pageNumber = v;
this.searchData();
},
changeDataPageSize(v) {
this.searchForm.pageSize = v;
this.searchData();
},
searchData() {
this.showLoading = true;
getPlatformCouponList(this.searchForm).then(res => {
this.showLoading = false;
if (res.success) {
this.tableData = res.result.records;
this.tableTotal = res.result.total;
}
});
},
handleSearchData() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchData();
},
handleResetObj() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 9;
this.searchForm.departmentId = "";
//
this.searchData();
},
setData(v) {
this.selectObj = v;
this.$emit("on-change", this.selectObj);
},
chooseCancel(v) {
let _index;
this.selectObj.forEach((e, index) => {
if (v.id == e.id) {
_index = index;
}
});
if (_index || _index == 0) {
this.selectObj.splice(_index, 1);
this.$emit("on-change", this.selectObj);
}
},
chooseObj(v) {
//
let that = this;
let flag = true;
this.selectObj.forEach(e => {
if (v.id == e.id) {
flag = false;
}
});
if (flag) {
this.selectObj.push(v);
this.$emit("on-change", this.selectObj);
}
},
clearSelectData() {
this.selectObj = [];
this.$emit("on-change", this.selectObj);
},
handleCancelObj(e, id) {
//
let newArray = [];
this.selectObj.forEach(e => {
if (id != e.id) {
newArray.push(e);
}
});
this.selectObj = newArray;
this.$emit("on-change", this.selectObj);
}
},
created() {
//
this.height = Number(document.documentElement.clientHeight - 230);
this.width = Number(document.documentElement.clientWidth / 2) > 900 ? 900 : Number(document.documentElement.clientWidth / 2)
this.searchData();
}
};
</script>
<style lang="scss" scoped>
.sku-choose {
.clear {
font-size: 12px;
margin-left: 15px;
color: #40a9ff;
cursor: pointer;
}
.collapse {
font-size: 12px;
margin-top: 15px;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
}
.my-drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
</style>

View File

@ -14,7 +14,7 @@
</template>
<script>
import { initDepartment, loadDepartment } from "@/api/index";
import { initDepartment } from "@/api/index";
export default {
name: "departmentChoose",
props: {
@ -27,50 +27,13 @@ export default {
};
},
methods: {
//
initDepartmentData() {
initDepartment().then(res => {
if (res.success) {
res.result.forEach(function(e) {
if (e.isParent) {
e.value = e.id;
e.label = e.title;
e.loading = false;
e.children = [];
} else {
e.value = e.id;
e.label = e.title;
}
if (e.status == -1) {
e.label = "[已禁用] " + e.label;
e.disabled = true;
}
});
this.department = res.result;
}
});
},
loadData(item, callback) {
item.loading = true;
loadDepartment(item.value).then(res => {
item.loading = false;
if (res.success) {
res.result.forEach(function(e) {
if (e.isParent) {
e.value = e.id;
e.label = e.title;
e.loading = false;
e.children = [];
} else {
e.value = e.id;
e.label = e.title;
}
if (e.status == -1) {
e.label = "[已禁用] " + e.label;
e.disabled = true;
}
});
item.children = res.result;
callback();
const arr = res.result;
this.filterData(arr)
this.department = arr
}
});
},
@ -82,8 +45,21 @@ export default {
}
this.$emit("on-change", departmentId);
},
//
clearSelect() {
this.selectDep = [];
},
//
filterData (data) {
data.forEach(e => {
e.value = e.id;
e.label = e.title;
if (e.children) {
this.filterData(e.children)
} else {
return
}
})
}
},
created() {

View File

@ -22,7 +22,6 @@
<div class="dep-tree-bar">
<Tree
:data="dataDep"
:load-data="loadData"
@on-select-change="selectTree"
></Tree>
<Spin size="large" fix v-if="depLoading"></Spin>
@ -34,7 +33,7 @@
</template>
<script>
import {initDepartment, loadDepartment, searchDepartment} from "@/api/index";
import {initDepartment, searchDepartment} from "@/api/index";
export default {
name: "departmentTreeChoose",
@ -63,40 +62,14 @@ export default {
};
},
methods: {
//
initDepartmentData() {
initDepartment().then(res => {
if (res.success) {
res.result.forEach(function (e) {
if (e.isParent) {
e.loading = false;
e.children = [];
}
if (e.status == -1) {
e.title = "[已禁用] " + e.title;
e.disabled = true;
}
});
this.dataDep = res.result;
}
});
},
loadData(item, callback) {
loadDepartment(item.id).then(res => {
if (res.success) {
res.result.forEach(function (e) {
if (e.isParent) {
e.loading = false;
e.children = [];
}
if (e.status == -1) {
e.title = "[已禁用] " + e.title;
e.disabled = true;
}
});
callback(res.result);
}
});
},
searchDep() {
//
if (this.searchKey) {
@ -117,6 +90,7 @@ export default {
this.initDepartmentData();
}
},
//
selectTree(v) {
if (v.length === 0) {
this.$emit("on-change", null);
@ -132,6 +106,7 @@ export default {
}
this.$emit("on-change", department);
},
//
clearSelect() {
this.departmentId = [];
this.departmentTitle = "";
@ -143,6 +118,7 @@ export default {
}
this.$emit("on-clear");
},
//
setData(ids, title) {
this.departmentTitle = title;
if (this.multiple) {
@ -151,7 +127,6 @@ export default {
this.departmentId = [];
this.departmentId.push(ids);
}
// this.$emit("on-change", this.departmentId);
}
},
created() {

View File

@ -159,16 +159,19 @@ export default {
}
}
},
// html
editHTML() {
this.dataEdit = this.data;
this.showHTMLModal = true;
},
//
editHTMLOk() {
editor.txt.html(this.dataEdit);
this.$emit("input", this.data);
this.$emit("on-change", this.data);
this.showHTMLModal = false;
},
//
clear() {
this.$Modal.confirm({
title: "确认清空",
@ -181,6 +184,7 @@ export default {
},
});
},
//
setData(value) {
if (!editor) {
this.initEditor();

View File

@ -1,346 +0,0 @@
<template>
<div class="member-choose">
<Button @click="userModalVisible=true" :icon="icon">{{text}}</Button>
<span @click="clearSelectData" class="clear">清空已选</span>
<Collapse simple class="collapse">
<Panel name="1">
已选择
<span class="select-count">{{selectUsers.length}}</span>
<p slot="content">
<Tag
v-for="(item, i) in selectUsers"
:key="i"
:name="item.id"
color="default"
closable
@on-close="handleCancelUser"
>{{item.username}}
</Tag>
</p>
</Panel>
</Collapse>
<Drawer title="选择用户" closable v-model="userModalVisible" width="800" draggable>
<Form ref="searchUserForm" :model="searchUserForm" inline :label-width="55">
<Form-item label="用户名" prop="username">
<Input
type="text"
v-model="searchUserForm.username"
clearable
placeholder="请输入用户名"
style="width: 200px"
/>
</Form-item>
<Form-item style="margin-left:-35px;" class="br">
<Button @click="handleSearchUser" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleResetUser"></Button>
</Form-item>
</Form>
<Table
:loading="userLoading"
border
:columns="userColumns"
:data="userData"
:height="height"
ref="userTable"
></Table>
<Row type="flex" justify="end" style="margin: 10px 0;">
<Page
:current="searchUserForm.pageNumber"
:total="totalUser"
:page-size="searchUserForm.pageSize"
@on-change="changeUserPage"
@on-page-size-change="changeUserPageSize"
:page-size-opts="[10,20,50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
<div class="my-drawer-footer">
已选择
<span class="select-count">{{selectUsers.length}}</span>
<Button @click="clearSelectData" style="margin-left:10px">清空已选</Button>
<Button @click="userModalVisible=false" type="primary" style="margin-left:10px">关闭</Button>
</div>
</Drawer>
</div>
</template>
<script>
import {getMember} from "@/api/member";
export default {
name: "userChoose",
props: {
text: {
type: String,
default: "选择会员"
},
icon: {
type: String,
default: "md-person-add"
}
},
data() {
return {
height: 500, //
userLoading: true, //
userModalVisible: false, // modal
selectUsers: [], //
searchUserForm: { //
username: "",
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc" //
},
userColumns: [ //
{
type: "index",
width: 60,
align: "center"
},
{
title: "用户名",
key: "username",
minWidth: 140,
sortable: true
},
{
title: "头像",
key: "face",
width: 80,
align: "center",
render: (h, params) => {
return h("Avatar", {
props: {
src: params.row.face
}
});
}
},
{
title: "手机",
key: "mobile",
width: 125,
sortable: true
},
{
title: "状态",
key: "status",
align: "center",
width: 120,
render: (h, params) => {
if (params.row.delFlag == 0) {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "正常启用"
}
})
]);
} else if (params.row.delFlag == -1) {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
}
}
},
{
title: "创建时间",
key: "createTime",
sortable: true,
sortType: "desc",
width: 170
},
{
title: "操作",
key: "action",
width: 130,
align: "center",
fixed: "right",
render: (h, params) => {
let select;
this.selectUsers.forEach(item => {
if (item.id === params.row.id) {
select = params.row
}
});
if (select) {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseCancel(params.row);
}
}
},
"取消选择"
)
]);
} else {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseUser(params.row);
}
}
},
"选择"
)
]);
}
}
}
],
userData: [], //
totalUser: 0 //
};
},
methods: {
changeUserPage(v) {
this.searchUserForm.pageNumber = v;
this.getUserDataList();
},
changeUserPageSize(v) {
this.searchUserForm.pageSize = v;
this.getUserDataList();
},
getUserDataList() {
this.userLoading = true;
getMember(this.searchUserForm).then(res => {
this.userLoading = false;
if (res.success) {
this.userData = res.result.records;
this.totalUser = res.result.total;
}
});
},
handleSearchUser() {
this.searchUserForm.pageNumber = 1;
this.searchUserForm.pageSize = 10;
this.getUserDataList();
},
handleResetUser() {
this.$refs.searchUserForm.resetFields();
this.searchUserForm.pageNumber = 1;
this.searchUserForm.pageSize = 9;
this.$refs.dep.clearSelect();
this.searchUserForm.departmentId = "";
//
this.getUserDataList();
},
setData(v) {
this.selectUsers = v;
this.$emit("on-change", this.selectUsers);
},
chooseCancel(v){
let _index;
this.selectUsers.forEach((e,index) => {
if (v.id == e.id) {
_index = index;
}
});
if(_index||_index==0){
this.selectUsers.splice(_index,1);
this.$emit("on-change", this.selectUsers);
}
},
chooseUser(v) {
//
let that = this;
let flag = true;
this.selectUsers.forEach(e => {
if (v.id == e.id) {
flag = false;
}
});
if (flag) {
let u = {
id: v.id,
username: v.username
};
this.selectUsers.push(u);
this.$emit("on-change", this.selectUsers);
}
},
clearSelectData() {
this.selectUsers = [];
this.$emit("on-change", this.selectUsers);
},
handleCancelUser(e, id) {
//
let newArray = [];
this.selectUsers.forEach(e => {
if (id != e.id) {
newArray.push(e);
}
});
this.selectUsers = newArray;
this.$emit("on-change", this.selectUsers);
this.$Message.success("删除所选用户成功");
}
},
created() {
//
this.height = Number(document.documentElement.clientHeight - 230);
this.getUserDataList();
}
};
</script>
<style lang="scss" scoped>
.member-choose {
.clear {
font-size: 12px;
margin-left: 15px;
color: #40a9ff;
cursor: pointer;
}
.collapse {
font-size: 12px;
margin-top: 15px;
width: 500px;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
}
.my-drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
</style>

View File

@ -1,284 +0,0 @@
<template>
<div>
<div id="toolbar">
<button class="ql-bold" title="粗体"></button>
<button class="ql-italic" title="斜体"></button>
<button class="ql-underline" title="下划线"></button>
<button class="ql-strike" title="删除线"></button>
<select class="ql-size" title="字体大小">
<option value="small"></option>
<option selected></option>
<option value="large"></option>
<option value="huge"></option>
</select>
<select class="ql-header" title="标题大小">
<option value="1"></option>
<option value="2"></option>
<option value="3"></option>
<option value="4"></option>
<option value="5"></option>
<option value="6"></option>
<option selected></option>
</select>
<select class="ql-font" title="字体"></select>
<select class="ql-align" title="对齐方式"></select>
<select class="ql-color" title="字体颜色"></select>
<select class="ql-background" title="背景颜色"></select>
<button class="ql-blockquote" title="引用"></button>
<button class="ql-code-block" title="代码块"></button>
<button class="ql-list" value="ordered" title="数字列表"></button>
<button class="ql-list" value="bullet" title="点列表"></button>
<button class="ql-script" value="sub" title="右下标"></button>
<button class="ql-script" value="super" title="右上标"></button>
<button class="ql-indent" value="-1" title="向左缩进"></button>
<button class="ql-indent" value="+1" title="向右缩进"></button>
<button class="ql-clean" title="清空样式"></button>
<button class="ql-link" title="链接"></button>
<button class="ql-image" title="插入图片" v-if="base64"></button>
<div class="q-menu" title="插入图片" v-if="!base64">
<Upload
:action="uploadFileUrl"
:headers="accessToken"
:on-success="handleSuccess"
:on-error="handleError"
:format="['jpg','jpeg','png','gif','bmp']"
accept=".jpg, .jpeg, .png, .gif, .bmp"
:max-size="5120"
:on-format-error="handleFormatError"
:on-exceeded-size="handleMaxSize"
:before-upload="beforeUpload"
:show-upload-list="false"
ref="qup"
>
<Icon type="md-images" size="20" />
</Upload>
</div>
<button class="ql-video" title="插入视频链接"></button>
<div class="q-menu" title="编辑HTML代码" @click="editHTML" v-if="expandHtml">
<Icon type="md-code-working" size="22" />
</div>
<div class="q-menu" title="预览" @click="fullscreenModal=true" v-if="expandPreview">
<Icon type="ios-eye" size="24" />
</div>
<div class="q-menu q-trash" title="清空" @click="clear" v-if="expandClear">
<Icon type="md-trash" size="18" style="display: block;" />
</div>
</div>
<div :id="id" :style="{minHeight: minHeight}"></div>
<Modal
title="编辑html代码"
v-model="showHTMLModal"
:mask-closable="false"
:width="900"
:fullscreen="full"
>
<Input
v-if="!full"
v-model="dataEdit"
:rows="15"
type="textarea"
style="max-height:60vh;overflow:auto;"
/>
<Input v-if="full" v-model="dataEdit" :rows="32" type="textarea" />
<div slot="footer">
<Button @click="full=!full" icon="md-expand">全屏开/</Button>
<Button @click="editHTMLOk" type="primary" icon="md-checkmark-circle-outline">确定保存</Button>
</div>
</Modal>
<Modal title="预览" v-model="fullscreenModal" fullscreen>
<div v-html="data">{{data}}</div>
<div slot="footer">
<Button @click="fullscreenModal=false"></Button>
</div>
</Modal>
</div>
</template>
<script>
import { uploadFile } from "@/api/index";
import Quill from "quill";
import "quill/dist/quill.snow.css";
import xss from "xss";
var editor = null;
export default {
name: "editor",
props: {
id: {
type: String,
default: "quill"
},
value: String,
base64: {
type: Boolean,
default: false
},
minHeight: {
type: String,
default: "300px"
},
expandHtml: {
type: Boolean,
default: true
},
expandPreview: {
type: Boolean,
default: true
},
expandClear: {
type: Boolean,
default: true
},
openXss: {
type: Boolean,
default: false
}
},
data() {
return {
accessToken: {}, // token
uploadFileUrl: uploadFile, //
editor: null, //
options: { //
theme: "snow",
modules: {
toolbar: "#toolbar"
},
placeholder: "在这输入内容 ..."
},
data: this.value, //
dataEdit: "", //
showHTMLModal: false, // html
full: false, // html
fullscreenModal: false //
};
},
methods: {
initEditor() {
this.accessToken = {
accessToken: this.getStore("accessToken")
};
editor = new Quill(`#${this.id}`, this.options);
let that = this;
if (this.value) {
editor.pasteHTML(this.value);
}
editor.on("text-change", function(delta, oldDelta, source) {
let html = editor.container.firstChild.innerHTML;
if (that.openXss) {
that.data = xss(html);
} else {
that.data = html;
}
that.$emit("input", that.data);
that.$emit("on-change", that.data);
});
},
handleFormatError(file) {
this.$Notice.warning({
title: "不支持的文件格式",
desc:
"所选文件‘ " +
file.name +
" ’格式不正确, 请选择 .jpg .jpeg .png .gif .bmp格式文件"
});
},
handleMaxSize(file) {
this.$Notice.warning({
title: "文件大小过大",
desc: "所选文件‘ " + file.name + " ’大小过大, 不得超过 5M."
});
},
beforeUpload() {
return true;
},
handleSuccess(res, file) {
if (res.success) {
let url = res.result;
//
let range = editor.getSelection(true);
//
let delta = editor.getContents().length;
let index;
if (range) {
index = range.index;
} else {
index = delta;
}
//
editor.insertEmbed(index, "image", url);
editor.setSelection(index + 1, 0);
} else {
this.$Message.error(res.message);
}
},
handleError(error, file, fileList) {
this.$Message.error(error.toString());
},
editHTML() {
this.dataEdit = this.data;
this.showHTMLModal = true;
},
editHTMLOk() {
editor.pasteHTML(this.dataEdit);
this.$emit("input", this.data);
this.$emit("on-change", this.data);
this.showHTMLModal = false;
},
clear() {
this.$Modal.confirm({
title: "确认清空",
content: "确认要清空编辑器内容?清空后不能撤回",
onOk: () => {
this.data = "";
editor.pasteHTML(this.data);
this.$emit("input", this.data);
this.$emit("on-change", this.data);
}
});
},
setData(value) {
if (!editor) {
this.initEditor();
}
if (value && value != this.data) {
this.data = value;
let index = editor.selection.savedRange.index;
editor.pasteHTML(this.data);
editor.setSelection(index, 0);
this.$emit("input", this.data);
this.$emit("on-change", this.data);
}
}
},
watch: {
value(val) {
this.setData(val);
}
},
mounted() {
this.initEditor();
}
};
</script>
<style lang="scss" scoped>
.q-menu {
margin: 0 3px;
display: inline-block;
cursor: pointer;
color: #444;
:hover {
color: #06c;
}
}
.q-trash {
margin-bottom: 3px;
}
.ql-tooltip {
left: 30% !important;
}
</style>

View File

@ -1,81 +0,0 @@
<template>
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
</template>
<script>
export default {
name: "rectLoading"
};
</script>
<style lang="scss" scoped>
.spinner {
margin-top: 20vh;
margin-bottom: 30vh;
height: 60px;
text-align: center;
font-size: 10px;
span {
display: block;
font-size: 12px;
color: rgba(0, 0, 0, 0.45);
margin-top: 1vh;
}
div {
margin-right: 4px;
background-color: #4e9ff5;
height: 100%;
width: 6px;
display: inline-block;
-webkit-animation: stretchdelay 1.2s infinite ease-in-out;
animation: stretchdelay 1.2s infinite ease-in-out;
}
.rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.rect3 {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
.rect4 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.rect5 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
}
@-webkit-keyframes stretchdelay {
0%,
40%,
100% {
-webkit-transform: scaleY(0.4);
}
20% {
-webkit-transform: scaleY(1);
}
}
@keyframes stretchdelay {
0%,
40%,
100% {
transform: scaleY(0.4);
-webkit-transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
-webkit-transform: scaleY(1);
}
}
</style>

View File

@ -108,11 +108,13 @@ export default {
this.strengthValue = 100;
}
},
//
handleChange(v) {
this.strengthChange();
this.$emit("input", this.currentValue);
this.$emit("on-change", this.currentValue, this.grade, this.strength);
},
//
setCurrentValue(value) {
if (value === this.currentValue) {
return;

View File

@ -1,358 +0,0 @@
<template>
<div class="sku-choose">
<Button @click="showDrawer=true" :icon="icon">{{text}}</Button>
<span @click="clearSelectData" class="clear">清空已选</span>
<Collapse simple class="collapse">
<Panel name="1">
已选择
<span class="select-count">{{selectObj.length}}</span>
<p slot="content">
<Tag
v-for="(item, i) in selectObj"
:key="i"
:name="item.id"
color="default"
closable
@on-close="handleCancelObj"
>{{createName(item)}}
</Tag>
</p>
</Panel>
</Collapse>
<Drawer title="选择SKU" closable v-model="showDrawer" :width="width" draggable>
<Form ref="searchForm" :model="searchForm" inline :label-width="55">
<Form-item label="名称" prop="goodsName">
<Input
type="text"
v-model="searchForm.goodsName"
clearable
placeholder="输入商品名称"
style="width: 200px"
/>
</Form-item>
<Form-item style="margin-left:-35px;" class="br">
<Button @click="handleSearchData" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleResetObj"></Button>
</Form-item>
</Form>
<Table
:loading="showLoading"
border
:columns="tableColumns"
:data="tableData"
:height="height"
ref="tableData"
></Table>
<Row type="flex" justify="end" style="margin: 10px 0;">
<Page
:current="searchForm.pageNumber"
:total="tableTotal"
:page-size="searchForm.pageSize"
@on-change="changeDataPage"
@on-page-size-change="changeDataPageSize"
:page-size-opts="[10,20,50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
<div class="my-drawer-footer">
已选择
<span class="select-count">{{selectObj.length}}</span>
<Button @click="clearSelectData" style="margin-left:10px">清空已选</Button>
<Button @click="showDrawer=false" type="primary" style="margin-left:10px">关闭</Button>
</div>
</Drawer>
</div>
</template>
<script>
import {getSkuPage} from "@/api/goods";
export default {
name: "userChoose",
props: {
text: {
type: String,
default: "选择SKU"
},
icon: {
type: String,
default: "md-basket"
},
initData: {
type: Array,
default: []
},
createName: {
type: Function,
default: function (item) {
return item.goodsName
}
}
},
mounted(){
this.selectObj = this.initData
console.log(JSON.stringify(this.initData))
},
data() {
return {
//
height: 500,
width: 500,
//
showLoading: true,
//
showDrawer: false,
selectObj: [], //
searchForm: { //
goodsName: "",
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc" //
},
tableColumns: [ //
{
type: "index",
width: 60,
align: "center"
},
{
title: "商品名称",
key: "goodsName",
minWidth: 140
},
{
title: "规格",
key: "specName",
minWidth: 140,
},
{
title: "图片",
key: "thumbnail",
width: 80,
align: "center",
render: (h, params) => {
return h("Avatar", {
props: {
src: params.row.face
}
});
}
},
{
title: "状态",
key: "status",
align: "center",
width: 120,
render: (h, params) => {
if (params.row.delFlag == 0) {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "正常"
}
})
]);
} else if (params.row.delFlag == -1) {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
}
}
},
{
title: "创建时间",
key: "createTime",
sortable: true,
sortType: "desc",
width: 170
},
{
title: "操作",
key: "action",
width: 130,
align: "center",
fixed: "right",
render: (h, params) => {
let select;
this.selectObj.forEach(item => {
if (item.id === params.row.id) {
select = params.row
}
});
if (select) {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseCancel(params.row);
}
}
},
"取消选择"
)
]);
} else {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseObj(params.row);
}
}
},
"选择"
)
]);
}
}
}
],
tableData: [], //
tableTotal: 0 //
};
},
methods: {
changeDataPage(v) {
this.searchForm.pageNumber = v;
this.searchData();
},
changeDataPageSize(v) {
this.searchForm.pageSize = v;
this.searchData();
},
searchData() {
this.showLoading = true;
getSkuPage(this.searchForm).then(res => {
this.showLoading = false;
if (res.success) {
this.tableData = res.result.records;
this.tableTotal = res.result.total;
}
});
},
handleSearchData() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.searchData();
},
handleResetObj() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 9;
this.searchForm.departmentId = "";
//
this.searchData();
},
setData(v) {
this.selectObj = v;
this.$emit("on-change", this.selectObj);
},
chooseCancel(v) {
let _index;
this.selectObj.forEach((e, index) => {
if (v.id == e.id) {
_index = index;
}
});
if (_index || _index == 0) {
this.selectObj.splice(_index, 1);
this.$emit("on-change", this.selectObj);
}
},
chooseObj(v) {
//
let that = this;
let flag = true;
this.selectObj.forEach(e => {
if (v.id == e.id) {
flag = false;
}
});
if (flag) {
this.selectObj.push(v);
this.$emit("on-change", this.selectObj);
}
},
clearSelectData() {
this.selectObj = [];
this.$emit("on-change", this.selectObj);
},
handleCancelObj(e, id) {
//
let newArray = [];
this.selectObj.forEach(e => {
if (id != e.id) {
newArray.push(e);
}
});
this.selectObj = newArray;
this.$emit("on-change", this.selectObj);
}
},
created() {
//
this.height = Number(document.documentElement.clientHeight - 230);
this.width = Number(document.documentElement.clientWidth/2)>900?900:Number(document.documentElement.clientWidth/2)
this.searchData();
}
};
</script>
<style lang="scss" scoped>
.sku-choose {
.clear {
font-size: 12px;
margin-left: 15px;
color: #40a9ff;
cursor: pointer;
}
.collapse {
font-size: 12px;
margin-top: 15px;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
}
.my-drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
</style>

View File

@ -132,7 +132,7 @@ export default {
this.$emit("input", this.currentValue);
this.$emit("on-change", this.currentValue);
} else {
this.$Message.error(res.message);
// this.$Message.error(res.message);
}
},
//

View File

@ -91,27 +91,30 @@ export default {
};
},
methods: {
//
onEnd() {
this.returnValue();
},
//
init() {
this.setData(this.value, true);
this.accessToken = {
accessToken: this.getStore("accessToken")
};
},
//
handleView(imgUrl) {
this.imgUrl = imgUrl;
this.viewImage = true;
},
//
handleRemove(file) {
this.uploadList = this.uploadList.filter(i => i.url !== file.url);
this.returnValue();
},
//
handleSuccess(res, file) {
if (res.success) {
file.url = res.result;
//
if (!this.multiple && this.uploadList.length > 0) {
@ -125,9 +128,11 @@ export default {
this.$Message.error(res.message);
}
},
//
handleError(error, file, fileList) {
this.$Message.error(error.toString());
},
//
handleFormatError(file) {
this.$Notice.warning({
title: "不支持的文件格式",
@ -137,6 +142,7 @@ export default {
" ’格式不正确, 请选择 .jpg .jpeg .png .gif图片格式文件"
});
},
//
handleMaxSize(file) {
this.$Notice.warning({
title: "文件大小过大",
@ -148,6 +154,7 @@ export default {
"M."
});
},
//
handleBeforeUpload() {
if (this.multiple && this.uploadList.length >= this.limit) {
this.$Message.warning("最多只能上传" + this.limit + "张图片");
@ -155,6 +162,7 @@ export default {
}
return true;
},
//
returnValue() {
if (!this.uploadList || this.uploadList.length < 1) {
if (!this.multiple) {
@ -180,6 +188,7 @@ export default {
this.$emit("on-change", v);
}
},
//
setData(v, init) {
if (typeof v == "string") {
//

View File

@ -1,352 +0,0 @@
<template>
<div class="user-choose">
<Button @click="userModalVisible=true" :icon="icon">{{text}}</Button>
<span @click="clearSelectData" class="clear">清空已选</span>
<Collapse simple class="collapse">
<Panel name="1">
已选择
<span class="select-count">{{selectUsers.length}}</span>
<p slot="content">
<Tag
v-for="(item, i) in selectUsers"
:key="i"
:name="item.id"
color="default"
closable
@on-close="handleCancelUser"
>{{item.username}}</Tag>
</p>
</Panel>
</Collapse>
<Drawer title="选择用户" closable v-model="userModalVisible" width="800" draggable>
<Form ref="searchUserForm" :model="searchUserForm" inline :label-width="55">
<Form-item label="用户名" prop="username">
<Input
type="text"
v-model="searchUserForm.username"
clearable
placeholder="请输入用户名"
style="width: 200px"
/>
</Form-item>
<Form-item label="部门" prop="department">
<department-choose @on-change="handleSelectDep" style="width: 200px" ref="dep"></department-choose>
</Form-item>
<Form-item style="margin-left:-35px;" class="br">
<Button @click="handleSearchUser" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleResetUser"></Button>
</Form-item>
</Form>
<Table
:loading="userLoading"
border
:columns="userColumns"
:data="userData"
:height="height"
ref="userTable"
></Table>
<Row type="flex" justify="end" style="margin: 10px 0;">
<Page
:current="searchUserForm.pageNumber"
:total="totalUser"
:page-size="searchUserForm.pageSize"
@on-change="changeUserPage"
@on-page-size-change="changeUserPageSize"
:page-size-opts="[10,20,50]"
size="small"
show-total
show-elevator
show-sizer
></Page>
</Row>
<div class="my-drawer-footer">
已选择
<span class="select-count">{{selectUsers.length}}</span>
<Button @click="clearSelectData" style="margin-left:10px">清空已选</Button>
<Button @click="userModalVisible=false" type="primary" style="margin-left:10px">关闭</Button>
</div>
</Drawer>
</div>
</template>
<script>
import { getUserListData } from "@/api/index";
import departmentChoose from "./department-choose";
export default {
name: "userChoose",
components: {
departmentChoose
},
props: {
text: {
type: String,
default: "选择用户"
},
icon: {
type: String,
default: "md-person-add"
}
},
data() {
return {
//
height: 500,
//
userLoading: true,
//
userModalVisible: false,
//
selectUsers: [],
//
searchUserForm: {
username: "",
type: "",
status: "",
pageNumber: 1, //
pageSize: 10, //
sort: "createTime", //
order: "desc" //
},
userColumns: [
{
type: "index",
width: 60,
align: "center"
},
{
title: "用户名",
key: "username",
minWidth: 140,
sortable: true
},
{
title: "头像",
key: "avatar",
width: 80,
align: "center",
render: (h, params) => {
return h("Avatar", {
props: {
src: params.row.avatar
}
});
}
},
{
title: "所属部门",
key: "departmentTitle",
width: 120
},
{
title: "手机",
key: "mobile",
width: 125,
sortable: true
},
{
title: "邮箱",
key: "email",
width: 180,
sortable: true
},
{
title: "性别",
key: "sex",
width: 70,
align: "center"
},
{
title: "用户类型",
key: "type",
align: "center",
width: 100,
render: (h, params) => {
let re = "";
if (params.row.type == 1) {
re = "管理员";
} else if (params.row.type == 0) {
re = "普通用户";
}
return h("div", re);
}
},
{
title: "状态",
key: "status",
align: "center",
width: 120,
render: (h, params) => {
if (params.row.status == 0) {
return h("div", [
h("Badge", {
props: {
status: "success",
text: "正常启用"
}
})
]);
} else if (params.row.status == -1) {
return h("div", [
h("Badge", {
props: {
status: "error",
text: "禁用"
}
})
]);
}
}
},
{
title: "创建时间",
key: "createTime",
sortable: true,
sortType: "desc",
width: 170
},
{
title: "操作",
key: "action",
width: 130,
align: "center",
fixed: "right",
render: (h, params) => {
return h("div", [
h(
"Button",
{
props: {
type: "info",
size: "small"
},
on: {
click: () => {
this.chooseUser(params.row);
}
}
},
"添加该用户"
)
]);
}
}
],
userData: [], //
totalUser: 0 //
};
},
methods: {
handleSelectDep(v) {
this.searchUserForm.departmentId = v;
},
changeUserPage(v) {
this.searchUserForm.pageNumber = v;
this.getUserDataList();
},
changeUserPageSize(v) {
this.searchUserForm.pageSize = v;
this.getUserDataList();
},
getUserDataList() {
this.userLoading = true;
getUserListData(this.searchUserForm).then(res => {
this.userLoading = false;
if (res.success) {
this.userData = res.result.records;
this.totalUser = res.result.total;
}
});
},
handleSearchUser() {
this.searchUserForm.pageNumber = 1;
this.searchUserForm.pageSize = 9;
this.getUserDataList();
},
handleResetUser() {
this.$refs.searchUserForm.resetFields();
this.searchUserForm.pageNumber = 1;
this.searchUserForm.pageSize = 9;
this.$refs.dep.clearSelect();
this.searchUserForm.departmentId = "";
//
this.getUserDataList();
},
setData(v) {
this.selectUsers = v;
this.$emit("on-change", this.selectUsers);
},
chooseUser(v) {
//
let that = this;
let flag = true;
this.selectUsers.forEach(e => {
if (v.id == e.id) {
that.$Message.warning("已经添加过啦,请勿重复选择");
flag = false;
}
});
if (flag) {
let u = {
id: v.id,
username: v.username
};
this.selectUsers.push(u);
this.$emit("on-change", this.selectUsers);
this.$Message.success(`添加用户 ${v.username} 成功`);
}
},
clearSelectData() {
this.selectUsers = [];
this.$emit("on-change", this.selectUsers);
},
handleCancelUser(e, id) {
//
let newArray = [];
this.selectUsers.forEach(e => {
if (id != e.id) {
newArray.push(e);
}
});
this.selectUsers = newArray;
this.$emit("on-change", this.selectUsers);
this.$Message.success("删除所选用户成功");
}
},
created() {
//
this.height = Number(document.documentElement.clientHeight - 230);
this.getUserDataList();
}
};
</script>
<style lang="scss" scoped>
.user-choose {
.clear {
font-size: 12px;
margin-left: 15px;
color: #40a9ff;
cursor: pointer;
}
.collapse {
font-size: 12px;
margin-top: 15px;
width: 500px;
}
.select-count {
font-weight: 600;
color: #40a9ff;
}
}
.my-drawer-footer {
z-index: 10;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
background: #fff;
}
</style>

View File

@ -1,17 +1,21 @@
<template>
<div class="map">
<Modal
v-model="showMap"
title="选择地址"
width="800"
>
<Modal v-model="showMap" title="选择地址" width="800">
<div class="address">{{ addrContent.address }}</div>
<div id="map-container"></div>
<div class="search-con">
<Input placeholder="输入关键字搜索" id="input-map" v-model="mapSearch"/>
<Input
placeholder="输入关键字搜索"
id="input-map"
v-model="mapSearch"
/>
<ul>
<li v-for="(tip, index) in tips" :key="index" @click="selectAddr(tip.location)">
<li
v-for="(tip, index) in tips"
:key="index"
@click="selectAddr(tip.location)"
>
<p>{{ tip.name }}</p>
<p>{{ tip.district + tip.address }}</p>
</li>
@ -25,14 +29,14 @@
</div>
</template>
<script>
import AMapLoader from '@amap/amap-jsapi-loader';
import {getRegion} from '@/api/common.js'
import AMapLoader from "@amap/amap-jsapi-loader";
import { getRegion } from "@/api/common.js";
export default {
name:'map',
name: "map",
data() {
return {
showMap: false, // modal
mapSearch:'', //
mapSearch: "", //
map: null, //
autoComplete: null, //
geocoder: null, //
@ -44,31 +48,28 @@ data() {
},
watch: {
mapSearch: function (val) {
this.searchOfMap(val)
}
this.searchOfMap(val);
},
},
methods: {
ok(){ //
this.loading = true
const codeObj = {}
ok() {
//
this.loading = true;
const params = {
cityCode: this.addrContent.regeocode.addressComponent.citycode,
townName: this.addrContent.regeocode.addressComponent.township
}
getRegion(params).then(res=>{
townName: this.addrContent.regeocode.addressComponent.township,
};
getRegion(params).then((res) => {
if (res.success) {
this.addrContent.addr = res.result.name.replace(/,/g," ")
this.addrContent.addrId = res.result.id
this.loading = false
this.addrContent.addr = res.result.name.replace(/,/g, " ");
this.addrContent.addrId = res.result.id;
this.loading = false;
this.showMap = false;
this.$emit('getAddress',this.addrContent);
this.$emit("getAddress", this.addrContent);
}
})
});
},
//
init() {
AMapLoader.load({
key: "b440952723253aa9fe483e698057bf7d", // WebKey load
@ -78,17 +79,17 @@ methods: {
"AMap.Autocomplete",
"AMap.PlaceSearch",
"AMap.Geolocation",
'AMap.Geocoder'
"AMap.Geocoder",
], // 使'AMap.Scale'
"AMapUI": { // AMapUI
"version": '1.1', // AMapUI 1.1
"plugins":['misc/PositionPicker'], // AMapUI ui
AMapUI: {
// AMapUI
version: "1.1", // AMapUI 1.1
plugins: ["misc/PositionPicker"], // AMapUI ui
},
})
.then((AMap) => {
}).then((AMap) => {
let that = this;
this.map = new AMap.Map("map-container", {
zoom:12
zoom: 12,
});
that.map.addControl(new AMap.ToolBar());
that.map.addControl(new AMap.Autocomplete());
@ -97,53 +98,52 @@ methods: {
// Autocomplete
let autoOptions = {
city: "全国"
city: "全国",
};
that.autoComplete = new AMap.Autocomplete(autoOptions); //
that.geocoder = new AMap.Geocoder(autoOptions)
that.geocoder = new AMap.Geocoder(autoOptions);
that.positionPicker = new AMapUI.PositionPicker({ //
mode: 'dragMap',
map:that.map
that.positionPicker = new AMapUI.PositionPicker({
//
mode: "dragMap",
map: that.map,
});
that.positionPicker.start()
that.positionPicker.start();
/**
*
* 所有回显数据都在positionResult里面
* 需要字段可以查找
*
*/
that.positionPicker.on('success', function(positionResult) {
that.positionPicker.on("success", function (positionResult) {
that.addrContent = positionResult;
});
})
.catch((e) => {});
}).catch((e) => {});
},
searchOfMap(val) { //
searchOfMap(val) {
//
let that = this;
this.autoComplete.search(val, function (status, result) {
// result
if(status == 'complete' && result.info == 'OK'){
if (status == "complete" && result.info == "OK") {
that.tips = result.tips;
} else {
that.tips = []
that.tips = [];
}
});
},
selectAddr(location) { //
selectAddr(location) {
//
if (!location) {
this.$Message.warning('请选择正确点位')
this.$Message.warning("请选择正确点位");
return false;
}
const lnglat = [location.lng,location.lat]
this.positionPicker.start(lnglat)
}
const lnglat = [location.lng, location.lat];
this.positionPicker.start(lnglat);
},
},
mounted() {
this.init()
this.init();
},
};
</script>

Some files were not shown because too many files have changed in this diff Show More