From e935d5bcd568ab0f91b8f22e2d4feeef74130103 Mon Sep 17 00:00:00 2001 From: mabo Date: Thu, 27 May 2021 18:03:33 +0800 Subject: [PATCH 01/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/addressManage/index.vue | 10 +++++----- buyer/src/components/card/index.vue | 1 - buyer/src/components/coupon/Coupon.vue | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/buyer/src/components/addressManage/index.vue b/buyer/src/components/addressManage/index.vue index a7b2669a..ee0dc4e0 100644 --- a/buyer/src/components/addressManage/index.vue +++ b/buyer/src/components/addressManage/index.vue @@ -57,7 +57,7 @@ import { export default { name: 'addressManage', props: { - id: { + id: { // 传入的地址id defalut: '', type: String } @@ -89,7 +89,7 @@ export default { }; }, methods: { - save () { + save () { // 保存地址 this.$refs.form.validate((valid) => { if (valid) { const params = JSON.parse(JSON.stringify(this.formData)); @@ -138,15 +138,15 @@ export default { this.formData.lat = item.position.lat; this.formData.lon = item.position.lng; }, - show () { + show () { // 地址模态框显示 this.showAddr = true; }, - hide () { + hide () { // 地址模态框隐藏 this.showAddr = false; } }, watch: { - id: { + id: { // 传入的地址id handler: function (v) { if (v) { this.getAddrById(v); diff --git a/buyer/src/components/card/index.vue b/buyer/src/components/card/index.vue index 397eb531..9dfbc055 100644 --- a/buyer/src/components/card/index.vue +++ b/buyer/src/components/card/index.vue @@ -59,7 +59,6 @@ export default { isActive: 0 // 已激活tab栏下标 }; }, - mounted () {}, methods: { // 点击右侧的回调 callBack () { diff --git a/buyer/src/components/coupon/Coupon.vue b/buyer/src/components/coupon/Coupon.vue index bad97edc..f73aabe4 100644 --- a/buyer/src/components/coupon/Coupon.vue +++ b/buyer/src/components/coupon/Coupon.vue @@ -44,7 +44,7 @@ export default { }; }, methods: { - getList () { + getList () { // 获取优惠券列表 this.loading = true memberCouponList(this.params).then(res => { this.loading = false @@ -67,18 +67,18 @@ export default { } }, - changePageNum (val) { + changePageNum (val) { // 分页改变页码 this.params.pageNumber = val; this.getList() }, - changePageSize (val) { + changePageSize (val) { // 分页改变页数 this.pageNumber = 1; this.params.pageSize = val; this.getList() }, - useScope (type, storeName) { + useScope (type, storeName) { // 根据字段返回 优惠券适用范围 let shop = '平台'; let goods = '全部商品' if (storeName !== 'platform') shop = storeName From 6780654aae5c65aaeab218fd84cb71563831796e Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 28 May 2021 17:25:07 +0800 Subject: [PATCH 02/22] =?UTF-8?q?im=E5=AF=B9=E6=8E=A5=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/index.html | 2 +- buyer/src/components/coupon/Coupon.vue | 4 +- .../src/components/goodsDetail/ShowGoods.vue | 30 +------- buyer/src/components/header/ShopHeader.vue | 52 ++----------- buyer/src/components/nav/cateNav.vue | 75 +++++++++---------- buyer/src/config/index.js | 16 ++-- buyer/src/main.js | 4 + buyer/src/pages/GoodsDetail.vue | 35 ++++++--- buyer/src/pages/Merchant.vue | 5 +- seller/src/styles/common.scss | 3 - seller/src/styles/table-common.scss | 3 - seller/src/views/goods/goods-seller/goods.vue | 7 +- 12 files changed, 85 insertions(+), 151 deletions(-) diff --git a/buyer/index.html b/buyer/index.html index 13a70c4d..3b299f1a 100644 --- a/buyer/index.html +++ b/buyer/index.html @@ -4,7 +4,7 @@ - + LILI diff --git a/buyer/src/components/coupon/Coupon.vue b/buyer/src/components/coupon/Coupon.vue index f73aabe4..30055ed6 100644 --- a/buyer/src/components/coupon/Coupon.vue +++ b/buyer/src/components/coupon/Coupon.vue @@ -104,7 +104,7 @@ export default { diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 26cbbab2..871f9ecd 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -20,7 +20,7 @@
{{isCollected?'已收藏':'收藏'}} - +
@@ -60,7 +60,7 @@ :key="index" @click="receiveCoupon(item.id)" > - 满{{ item.consumeThreshold }}减{{item.price | unitPrice}} + 满{{ item.consumeThreshold }}减{{item.price}} 满{{ item.consumeThreshold }}打{{item.couponDiscount}}折

@@ -126,32 +126,6 @@ - - diff --git a/buyer/src/components/header/ShopHeader.vue b/buyer/src/components/header/ShopHeader.vue index 3d7ec3e6..0b2bda67 100644 --- a/buyer/src/components/header/ShopHeader.vue +++ b/buyer/src/components/header/ShopHeader.vue @@ -1,10 +1,10 @@ @@ -86,12 +84,12 @@ export default { } }, computed: { - navList () { + navList () { // 导航列表 return JSON.parse(storage.getItem('navList')) || [] } }, methods: { - getCate () { + getCate () { // 获取分类数据 getCategory(0).then(res => { if (res.success) { this.cateList = res.result; @@ -99,7 +97,7 @@ export default { } }); }, - showDetail (index) { + showDetail (index) { // 展示全部分类 this.panel = true this.panelData = this.cateList[index].children }, @@ -245,9 +243,6 @@ export default { .nav-detail-item span:hover { background-color: $theme_color; } -.detail-item-panel ul { - list-style: none; -} .detail-item-panel li { line-height: 30px; // margin-left: 40px; diff --git a/buyer/src/config/index.js b/buyer/src/config/index.js index a2cfb5f5..89602323 100644 --- a/buyer/src/config/index.js +++ b/buyer/src/config/index.js @@ -17,15 +17,15 @@ export default { * @description api请求基础路径 */ api_dev: { - // common: 'http://192.168.0.103:8890', - // buyer: 'http://192.168.0.103:8888', - // seller: 'http://192.168.0.103:8889', - // manager: 'http://192.168.0.103:8887' + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' - common: 'https://common-api.pickmall.cn', - buyer: 'https://buyer-api.pickmall.cn', - seller: 'https://store-api.pickmall.cn', - manager: 'https://admin-api.pickmall.cn' + // common: 'https://common-api.pickmall.cn', + // buyer: 'https://buyer-api.pickmall.cn', + // seller: 'https://store-api.pickmall.cn', + // manager: 'https://admin-api.pickmall.cn' }, api_prod: { common: 'https://common-api.pickmall.cn', diff --git a/buyer/src/main.js b/buyer/src/main.js index c2274aa3..752532ae 100644 --- a/buyer/src/main.js +++ b/buyer/src/main.js @@ -37,6 +37,10 @@ Vue.prototype.linkTo = function (url) { window.open(url, '_blank') } } +Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') { // 联系客服 + const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign + window.open(url, '_blank') +} Vue.prototype.Cookies = storage /* eslint-disable no-new */ new Vue({ diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 663bd301..773d4b50 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -3,7 +3,7 @@ - +
@@ -11,8 +11,9 @@ {{item.name}}
- {{goodsMsg.data.storeName}} + {{goodsMsg.data.storeName}} {{storeCollected?'已收藏店铺':'收藏店铺'}} + 联系客服
@@ -40,6 +41,7 @@ import ShowGoodsDetail from '@/components/goodsDetail/ShowGoodsDetail'; import ShowLikeGoods from '@/components/like'; import { goodsSkuDetail } from '@/api/goods'; import { cancelCollect, collectGoods, isCollection } from '@/api/member'; +import {getDetailById} from '@/api/shopentry' export default { name: 'GoodsDetail', beforeRouteEnter (to, from, next) { @@ -48,20 +50,15 @@ export default { }, created () { this.getGoodsDetail(); - if (this.Cookies.getItem('userInfo')) { - isCollection('STORE', this.goodsMsg.data.storeId).then(res => { - if (res.success && res.result) { - this.storeCollected = true; - } - }) - } + }, data () { return { goodsMsg: {}, // 商品信息 isLoading: false, // 加载状态 categoryBar: [], // 分类 - storeCollected: false // 商品收藏 + storeCollected: false, // 商品收藏 + storeMsg: {} // 店铺信息 }; }, methods: { @@ -83,6 +80,20 @@ export default { }); this.categoryBar = cateArr; this.goodsMsg = res.result; + // 判断是否收藏 + if (this.Cookies.getItem('userInfo')) { + isCollection('STORE', this.goodsMsg.data.storeId).then(res => { + if (res.success && res.result) { + this.storeCollected = true; + } + }) + } + // 获取店铺信息 + getDetailById(this.goodsMsg.data.storeId).then(res => { + if (res.success) { + this.storeMsg = res.result + } + }) } else { this.$Message.error(res.message) this.$router.push('/') @@ -91,7 +102,7 @@ export default { this.$router.push('/') }); }, - goGoodsList (currIndex) { + goGoodsList (currIndex) { // 跳转商品列表 const arr = [] this.categoryBar.forEach((e, index) => { if (index <= currIndex) { @@ -132,7 +143,6 @@ export default { } }; - From 78bd4021a6d369285bcbd20a15045bc1e1cca81c Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 28 May 2021 18:05:38 +0800 Subject: [PATCH 03/22] =?UTF-8?q?api=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/config/index.js | 16 ++++++++-------- buyer/src/pages/GoodsDetail.vue | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/buyer/src/config/index.js b/buyer/src/config/index.js index 89602323..6fe90b0b 100644 --- a/buyer/src/config/index.js +++ b/buyer/src/config/index.js @@ -17,15 +17,15 @@ export default { * @description api请求基础路径 */ api_dev: { - common: 'http://192.168.0.109:8890', - buyer: 'http://192.168.0.109:8888', - seller: 'http://192.168.0.109:8889', - manager: 'http://192.168.0.109:8887' + // common: 'http://192.168.0.109:8890', + // buyer: 'http://192.168.0.109:8888', + // seller: 'http://192.168.0.109:8889', + // manager: 'http://192.168.0.109:8887' - // common: 'https://common-api.pickmall.cn', - // buyer: 'https://buyer-api.pickmall.cn', - // seller: 'https://store-api.pickmall.cn', - // manager: 'https://admin-api.pickmall.cn' + common: 'https://common-api.pickmall.cn', + buyer: 'https://buyer-api.pickmall.cn', + seller: 'https://store-api.pickmall.cn', + manager: 'https://admin-api.pickmall.cn' }, api_prod: { common: 'https://common-api.pickmall.cn', diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 773d4b50..f065d152 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -13,7 +13,7 @@
{{goodsMsg.data.storeName}} {{storeCollected?'已收藏店铺':'收藏店铺'}} - 联系客服 + 联系客服
From 411f36150b6219b1a84cb630629b7e090d0ade0c Mon Sep 17 00:00:00 2001 From: mabo Date: Mon, 31 May 2021 18:03:48 +0800 Subject: [PATCH 04/22] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E?= =?UTF-8?q?=EF=BC=8C=E7=AB=99=E5=86=85=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/api/member.js | 36 ++++ .../src/components/goodsDetail/ShowGoods.vue | 1 - buyer/src/components/header/Header.vue | 16 +- buyer/src/main.js | 3 +- buyer/src/pages/PointGoods.vue | 171 ++++++++++++++++++ buyer/src/pages/PointMall.vue | 40 +++- buyer/src/pages/ShoppingCart.vue | 27 --- .../pages/home/memberCenter/CommentList.vue | 4 + .../home/memberCenter/memberMsg/MsgDetail.vue | 17 ++ .../home/memberCenter/memberMsg/MsgList.vue | 41 +++++ buyer/src/pages/user/menu.js | 5 + buyer/src/router/index.js | 14 ++ .../promotion/coupon/memberReceiveCoupon.vue | 48 ++--- manager/src/views/sys/message/sms.scss | 4 - 14 files changed, 358 insertions(+), 69 deletions(-) create mode 100644 buyer/src/pages/PointGoods.vue create mode 100644 buyer/src/pages/home/memberCenter/memberMsg/MsgDetail.vue create mode 100644 buyer/src/pages/home/memberCenter/memberMsg/MsgList.vue diff --git a/buyer/src/api/member.js b/buyer/src/api/member.js index 063ccd17..efa6255a 100644 --- a/buyer/src/api/member.js +++ b/buyer/src/api/member.js @@ -441,3 +441,39 @@ export function memberPointHistory (params) { params }); } +/** + * 分页获取会员站内信 + * @param {Object} params 请求参数,包括pageNumber、pageSize、status + */ +export function memberMsgList (params) { + return request({ + url: `/buyer/member/message`, + method: Method.GET, + needToken: true, + params + }); +} +/** + * 设置消息为已读 + * @param {String} messageId 消息id + */ + export function readMemberMsg (params) { + return request({ + url: `/buyer/member/message`, + method: Method.PUT, + needToken: true, + params + }); +} +/** + * 删除会员消息 + * @param {String} messageId 消息id + */ + export function delMemberMsg (params) { + return request({ + url: `/buyer/member/message`, + method: Method.DELETE, + needToken: true, + params + }); +} diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 871f9ecd..cd79acca 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -20,7 +20,6 @@
{{isCollected?'已收藏':'收藏'}} -
diff --git a/buyer/src/components/header/Header.vue b/buyer/src/components/header/Header.vue index 0c621781..8293b17a 100644 --- a/buyer/src/components/header/Header.vue +++ b/buyer/src/components/header/Header.vue @@ -51,16 +51,16 @@ -
  • 我的订单
  • -
  • 我的足迹
  • -
  • +
  • 我的订单
  • +
  • 我的足迹
  • +
  • 我的消息
  • +
  • {{cartNum < 100 ? cartNum : '99'}} 购物车 @@ -260,12 +260,12 @@ export default { float: left; font-size: 14px; line-height: 35px; - margin-right: 15px; + margin-right: 10px; font-weight: bold; } .nav a,.nav-item { text-decoration: none; - padding-left: 15px; + padding-left: 10px; border-left: 1px solid #ccc; color: #999; cursor: pointer; @@ -406,9 +406,7 @@ export default { .sign-out p { font-size: 12px; } -.cart-icon{ - padding: 0 6px; -} + .goods-title:hover { color: $theme_color; } diff --git a/buyer/src/main.js b/buyer/src/main.js index 752532ae..001edee4 100644 --- a/buyer/src/main.js +++ b/buyer/src/main.js @@ -37,7 +37,8 @@ Vue.prototype.linkTo = function (url) { window.open(url, '_blank') } } -Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') { // 联系客服 +// 联系客服 +Vue.prototype.connectCs = function (sign = '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca') { const url = 'https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign window.open(url, '_blank') } diff --git a/buyer/src/pages/PointGoods.vue b/buyer/src/pages/PointGoods.vue new file mode 100644 index 00000000..7a69eff6 --- /dev/null +++ b/buyer/src/pages/PointGoods.vue @@ -0,0 +1,171 @@ + + + + diff --git a/buyer/src/pages/PointMall.vue b/buyer/src/pages/PointMall.vue index 23d3df3e..7cf5ae32 100644 --- a/buyer/src/pages/PointMall.vue +++ b/buyer/src/pages/PointMall.vue @@ -4,7 +4,7 @@
      -
    • {{cate.name}}
    • +
    • {{cate.name}}

    积分商品

    @@ -39,6 +39,13 @@ +
    + + +
    @@ -79,11 +86,27 @@ export default { } }) }, - selectCate (id) { + selectCate (id) { // 选择商品分类 this.params.pointsGoodsCategoryId = id this.getList() this.$router.push({query: {categoryId: id}}) - } + }, + goGoodsDetail (skuId, goodsId) { // 跳转商品详情 + let routerUrl = this.$router.resolve({ + path: '/goodsDetail', + query: {skuId, goodsId} + }) + window.open(routerUrl.href, '_blank') + }, + changePageNum (val) { // 修改页码 + this.params.pageNumber = val; + this.getList() + }, + changePageSize (val) { // 修改页数 + this.pageNumber = 1; + this.params.pageSize = val; + this.getList() + }, } } @@ -104,8 +127,19 @@ export default { margin: 0 10px; &:hover{ cursor: pointer; + color: $theme_color; } } + .selected-cate{ + color: $theme_color; + } + +} +.page-size { + width: 1200px; + margin: 10px auto; + display: flex; + justify-content: flex-end; } .promotion-decorate::before,.promotion-decorate::after{ background-image: url('../../static/sprite@2x.png'); diff --git a/buyer/src/pages/ShoppingCart.vue b/buyer/src/pages/ShoppingCart.vue index cf38d0e5..843fc981 100644 --- a/buyer/src/pages/ShoppingCart.vue +++ b/buyer/src/pages/ShoppingCart.vue @@ -34,33 +34,6 @@ - diff --git a/buyer/src/pages/home/memberCenter/CommentList.vue b/buyer/src/pages/home/memberCenter/CommentList.vue index 661669fe..ad3839c1 100644 --- a/buyer/src/pages/home/memberCenter/CommentList.vue +++ b/buyer/src/pages/home/memberCenter/CommentList.vue @@ -112,6 +112,10 @@ export default { \ No newline at end of file diff --git a/buyer/src/pages/home/memberCenter/memberMsg/MsgList.vue b/buyer/src/pages/home/memberCenter/memberMsg/MsgList.vue new file mode 100644 index 00000000..d36c6927 --- /dev/null +++ b/buyer/src/pages/home/memberCenter/memberMsg/MsgList.vue @@ -0,0 +1,41 @@ + + + \ No newline at end of file diff --git a/buyer/src/pages/user/menu.js b/buyer/src/pages/user/menu.js index 78c3c093..7a9cf9ab 100644 --- a/buyer/src/pages/user/menu.js +++ b/buyer/src/pages/user/menu.js @@ -41,6 +41,11 @@ const member = [{ title: '账户安全', path: 'AccountSafe' }, + { + icon: '', + title: '我的消息', + path: 'MsgList' + }, { icon: '', title: '我的足迹', diff --git a/buyer/src/router/index.js b/buyer/src/router/index.js index 5eb51b0d..e8272c84 100644 --- a/buyer/src/router/index.js +++ b/buyer/src/router/index.js @@ -47,6 +47,8 @@ const ComplainList = resolve => require(['@/pages/home/memberCenter/ComplainList const ComplainDetail = resolve => require(['@/pages/home/memberCenter/ComplainDetail'], resolve); const Invoice = resolve => require(['@/pages/home/memberCenter/Invoice'], resolve); const Point = resolve => require(['@/pages/home/memberCenter/Point'], resolve); +const MsgList = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgList'], resolve); +const MsgDetail = resolve => require(['@/pages/home/memberCenter/memberMsg/MsgDetail'], resolve); /* * 会员中心 @@ -316,6 +318,18 @@ export default new Router({ name: 'AddAddress', component: AddAddress }, + { + path: 'MsgList', + name: 'MsgList', + component: MsgList, + meta: {title: '我的消息'} + }, + { + path: 'MsgDetail', + name: 'MsgDetail', + component: MsgDetail, + meta: {title: '我的消息'} + }, { path: 'MyOrder', name: 'MyOrder', diff --git a/manager/src/views/promotion/coupon/memberReceiveCoupon.vue b/manager/src/views/promotion/coupon/memberReceiveCoupon.vue index 2a5dcd3e..4291c1e3 100644 --- a/manager/src/views/promotion/coupon/memberReceiveCoupon.vue +++ b/manager/src/views/promotion/coupon/memberReceiveCoupon.vue @@ -1,30 +1,30 @@ diff --git a/manager/src/views/live/live.vue b/manager/src/views/live/live.vue new file mode 100644 index 00000000..25614680 --- /dev/null +++ b/manager/src/views/live/live.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/manager/src/views/live/liveDetail.vue b/manager/src/views/live/liveDetail.vue new file mode 100644 index 00000000..e7880dfc --- /dev/null +++ b/manager/src/views/live/liveDetail.vue @@ -0,0 +1,300 @@ + + + + + diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue index a36f93c8..31e6cdbc 100644 --- a/manager/src/views/order/order/orderList.vue +++ b/manager/src/views/order/order/orderList.vue @@ -22,10 +22,17 @@ + + + + + + + @@ -43,12 +50,60 @@ diff --git a/manager/src/views/statistics/traffic.vue b/manager/src/views/statistics/traffic.vue index 6f571a97..f5fbe08d 100644 --- a/manager/src/views/statistics/traffic.vue +++ b/manager/src/views/statistics/traffic.vue @@ -66,7 +66,8 @@ export default { uvs: 0, // 访客数 pvs: 0, // 浏览量 - dateList: [ // 选择项 + dateList: [ + // 选择项 { title: "今天", selected: false, @@ -90,7 +91,8 @@ export default { ], orderChart: "", // 初始化图表 - params: { // 请求参数 + params: { + // 请求参数 searchType: "LAST_SEVEN", year: "", month: "", @@ -117,6 +119,8 @@ export default { watch: { params: { handler(val) { + this.uvs = 0; + this.pvs = 0; this.init(); }, deep: true, diff --git a/node_modules/_downloadjs@1.4.7@downloadjs/LICENSE.md b/node_modules/_downloadjs@1.4.7@downloadjs/LICENSE.md new file mode 100644 index 00000000..19b80ba4 --- /dev/null +++ b/node_modules/_downloadjs@1.4.7@downloadjs/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 dandavis + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/_downloadjs@1.4.7@downloadjs/README.md b/node_modules/_downloadjs@1.4.7@downloadjs/README.md new file mode 100644 index 00000000..67eb6c6a --- /dev/null +++ b/node_modules/_downloadjs@1.4.7@downloadjs/README.md @@ -0,0 +1,123 @@ +# download +======== + +## Summary +--------- +The download() function is used to trigger a file download from JavaScript. + +It specifies the contents and name of a new file placed in the browser's download directory. The input can be a URL, String, Blob, or Typed Array of data, or via a dataURL representing the file's data as base64 or url-encoded string. No matter the input format, download() saves a file using the specified file name and mime information in the same manner as a server using a Content-Disposition HTTP header. + +## Getting and Using +--------- + +### Via NPM/Bower +`npm install downloadjs`
    +`bower install downloadjs` + +`require("downloadjs")(data, strFileName, strMimeType);` + +### Simple global `download` function via ` diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/LICENSE b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/LICENSE new file mode 100755 index 00000000..25f291d4 --- /dev/null +++ b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Pooya Parsa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/README.md b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/README.md new file mode 100755 index 00000000..78c8350f --- /dev/null +++ b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/README.md @@ -0,0 +1,321 @@ +# JSON to Excel for VUE 2 + +Download your JSON data as an Excel file directly from the browser. This component is based on the solution proposed on [this thread](https://stackoverflow.com/questions/17142427/javascript-to-export-html-table-to-excel) + +### Important! Extra prompt in Microsoft Excel + +**The method implemented in this component uses HTML tables to draw the .xls files, Microsoft Excel no longer recognize HTML as native content so a warning message will be displayed before opening the file. The content will be rendered perfectly but the message can't be avoided.** + +## Getting started + +Get the package: + +```bash +npm install vue-json-excel +``` + +Register JsonExcel in your vue app entry point: + +```js +import Vue from "vue"; +import JsonExcel from "vue-json-excel"; + +Vue.component("downloadExcel", JsonExcel); +``` + +In your template + +```html + + Download Data + + +``` + +## Props List + +| Name | Type | Description | Default | +| :--------------------------- | :----------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | +| data | Array | Data to be exported. | +| fields | Object | Fields inside the JSON Object that you want to export. If none provided, all properties in the JSON will be exported. | +| export-fields (exportFields) | Object | Used to fix the problem with other components that use the variable fields, like vee-validate. exportFields works exactly like fields | +| type | string | Mime type [xls, csv] | xls | +| name | string | File name to export. | data.xls | +| header | string/Array | Title(s) for the data. Can be a string (one title) or an array of strings (multiple titles). | +| title(deprecated) | string/Array | same as header, title is maintained for retro-compatibility purposes but its use is not recommended due to the conflict with the HTML5 title attribute. | +| footer | string/Array | Footer(s) for the data. Can be a string (one footer) or an array of strings (multiple footers). | +| default-value (defaultValue) | string | Use as fallback when the row has no field values. | '' | +| worksheet | string | Name of the worksheet tab. | 'Sheet1' | +| fetch | Function | Callback to fetch data before download, if it's set it runs immediately after mouse pressed and before download process.
    IMPORTANT: only works if no data prop is defined. | +| before-generate | Function | Callback to call a method right before the generate / fetch data, eg:show loading progress | +| before-finish | Function | Callback to call a method right before the download box pops out, eg:hide loading progress | +| stringifyLongNum | Boolean | stringify long number and decimal(solve the problem of loss of digital accuracy), default: false | +| escapeCsv | Boolean | This escapes CSV values in order to fix some excel problems with number fields. But this will wrap every csv data with **="** and **"**, to avoid that you have to set this prop to false. default: True | + +## Example + +```js +import Vue from "vue"; +import JsonExcel from "vue-json-excel"; + +Vue.component("downloadExcel", JsonExcel); + +const app = new Vue({ + el: "#app", + data: { + json_fields: { + "Complete name": "name", + City: "city", + Telephone: "phone.mobile", + "Telephone 2": { + field: "phone.landline", + callback: (value) => { + return `Landline Phone - ${value}`; + }, + }, + }, + json_data: [ + { + name: "Tony Peña", + city: "New York", + country: "United States", + birthdate: "1978-03-15", + phone: { + mobile: "1-541-754-3010", + landline: "(541) 754-3010", + }, + }, + { + name: "Thessaloniki", + city: "Athens", + country: "Greece", + birthdate: "1987-11-23", + phone: { + mobile: "+1 855 275 5071", + landline: "(2741) 2621-244", + }, + }, + ], + json_meta: [ + [ + { + key: "charset", + value: "utf-8", + }, + ], + ], + }, +}); +``` + +In your HTML call it like + +```html + + Download Excel (you can customize this with html code!) + +``` + +REQUIRED + +- json_data: Contains the data you want to export. +- json_fields: You can select what fields to export. Specify nested data and assign labels to the fields. The key is the label, the value is the JSON field. This will export the field data 'as is'. If you need to customize the the exported data you can define a callback function. Thanks to @gucastiliao. + +```js +let json_fields = { + // regular field (exported data 'as is') + fieldLabel: attributeName, // nested attribute supported + // callback function for data formatting + anotherFieldLabel: { + field: anotherAttributeName, // nested attribute supported + callback: (value) => { + return `formatted value ${value}`; + }, + }, +}; +``` + +json_fields is a object that represents which columns will be exported. If no object is provided, the component will be use the first object in your data array to extract the keys as columns names. Json field example: + +``` +:export-fields="{ + 'Human friendly name': '_name_field_from_json', + 'user's last name': '_last_name_text' +}" +``` + +## Export CSV + +To export JSON as a CSV file, just add the prop `type` with a value of "csv": + +```html + + Download CSV (you can customize this with html code!) + +``` + +## Multi-line values will appear in a single cell + +A single text value in the data that contains newline characters will appear as a single cell in Excel. This avoids the undesired behavior of multi-line values getting split into multiple cells that must be merged before using data filters and pivot tables. + +For example: + +```html + + +``` + +![Example of Excel showing multi-line cell](example-multi-line.png) + +## Fetch Data on Demand + +In case you need to fetch data from the server, you could use the fetch prop that allows you to define a callback function that is executed when your user click the download button. This function has to return a JSON value containing the data to export. A basic use case is: + +```js + + + + +``` + +## Using callbacks + +when using callback functions in the fields description, you have three option to retrieve data: + +- **field: 'path.to.nested.property'** you can retrieve a specific value using the nested property notation. + +```js + json_fields: { + 'Complete name': 'name', + 'City': 'city', + 'Telephone': 'phone.mobile', + 'Telephone 2' : { + field: 'phone.landline', + callback: (value) => { + return `Landline Phone - ${value}`; + } + }, + }, +``` + +- **field: 'define.nested.object'** you can retrieve a nested object too. + +```js + json_fields: {s + 'Complete name': 'name', + 'City': 'city', + 'Telephone': 'phone.mobile', + 'Telephone 2' : { + field: 'phone', + callback: (value) => { + return `Landline Phone - ${value.landline}`; + } + }, + }, +``` + +- Or **get the whole row** if field is undefined. + +```js + json_fields: { + 'Complete name': 'name', + 'City': 'city', + 'Telephone': 'phone.mobile', + 'Telephone 2' : { + callback: (value) => { + return `Landline Phone - ${value.phone.landline}`; + } + }, + }, +``` + +## License + +MIT + +#### Status + +This project is in an early stage of development. Any contribution is welcome :D diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.cjs.js b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.cjs.js new file mode 100755 index 00000000..48b0d55c --- /dev/null +++ b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.cjs.js @@ -0,0 +1,654 @@ +'use strict'; + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var download = createCommonjsModule(function (module, exports) { +//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage +// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime +// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs +// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling. +// v4 adds AMD/UMD, commonJS, and plain browser support +// v4.1 adds url download capability via solo URL argument (same domain/CORS only) +// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors +// https://github.com/rndme/download + +(function (root, factory) { + { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } +}(commonjsGlobal, function () { + + return function download(data, strFileName, strMimeType) { + + var self = window, // this script is only for browsers anyway... + defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads + mimeType = strMimeType || defaultMime, + payload = data, + url = !strFileName && !strMimeType && payload, + anchor = document.createElement("a"), + toString = function(a){return String(a);}, + myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString), + fileName = strFileName || "download", + blob, + reader; + myBlob= myBlob.call ? myBlob.bind(self) : Blob ; + + if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback + payload=[payload, mimeType]; + mimeType=payload[0]; + payload=payload[1]; + } + + + if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument + fileName = url.split("/").pop().split("?")[0]; + anchor.href = url; // assign href prop to temp anchor + if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path: + var ajax=new XMLHttpRequest(); + ajax.open( "GET", url, true); + ajax.responseType = 'blob'; + ajax.onload= function(e){ + download(e.target.response, fileName, defaultMime); + }; + setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return: + return ajax; + } // end if valid url? + } // end if url? + + + //go ahead and download dataURLs right away + if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){ + + if(payload.length > (1024*1024*1.999) && myBlob !== toString ){ + payload=dataUrlToBlob(payload); + mimeType=payload.type || defaultMime; + }else { + return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs: + navigator.msSaveBlob(dataUrlToBlob(payload), fileName) : + saver(payload) ; // everyone else can save dataURLs un-processed + } + + }else {//not data url, is it a string with special needs? + if(/([\x80-\xff])/.test(payload)){ + var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length; + for(i;i null, + }, + // this prop is used to fix the problem with other components that use the + // variable fields, like vee-validate. exportFields works exactly like fields + exportFields: { + type: Object, + default: () => null, + }, + // Use as fallback when the row has no field values + defaultValue: { + type: String, + required: false, + default: "", + }, + // Title(s) for the data, could be a string or an array of strings (multiple titles) + header: { + default: null, + }, + // Footer(s) for the data, could be a string or an array of strings (multiple footers) + footer: { + default: null, + }, + // filename to export + name: { + type: String, + default: "data.xls", + }, + fetch: { + type: Function, + }, + meta: { + type: Array, + default: () => [], + }, + worksheet: { + type: String, + default: "Sheet1", + }, + //event before generate was called + beforeGenerate: { + type: Function, + }, + //event before download pops up + beforeFinish: { + type: Function, + }, + // Determine if CSV Data should be escaped + escapeCsv: { + type: Boolean, + default: true, + }, + // long number stringify + stringifyLongNum: { + type: Boolean, + default: false, + }, + }, + computed: { + // unique identifier + idName() { + var now = new Date().getTime(); + return "export_" + now; + }, + + downloadFields() { + if (this.fields) return this.fields; + + if (this.exportFields) return this.exportFields; + }, + }, + methods: { + async generate() { + if (typeof this.beforeGenerate === "function") { + await this.beforeGenerate(); + } + let data = this.data; + if (typeof this.fetch === "function" || !data) data = await this.fetch(); + + if (!data || !data.length) { + return; + } + + let json = this.getProcessedJson(data, this.downloadFields); + if (this.type === "html") { + // this is mainly for testing + return this.export( + this.jsonToXLS(json), + this.name.replace(".xls", ".html"), + "text/html" + ); + } else if (this.type === "csv") { + return this.export( + this.jsonToCSV(json), + this.name.replace(".xls", ".csv"), + "application/csv" + ); + } + return this.export( + this.jsonToXLS(json), + this.name, + "application/vnd.ms-excel" + ); + }, + /* + Use downloadjs to generate the download link + */ + export: async function (data, filename, mime) { + let blob = this.base64ToBlob(data, mime); + if (typeof this.beforeFinish === "function") await this.beforeFinish(); + download(blob, filename, mime); + }, + /* + jsonToXLS + --------------- + Transform json data into an xml document with MS Excel format, sadly + it shows a prompt when it opens, that is a default behavior for + Microsoft office and cannot be avoided. It's recommended to use CSV format instead. + */ + jsonToXLS(data) { + let xlsTemp = + ' ${table}
    '; + let xlsData = ""; + const colspan = Object.keys(data[0]).length; + let _self = this; + + //Header + const header = this.header || this.$attrs.title; + if (header) { + xlsData += this.parseExtraData( + header, + '${data}' + ); + } + + //Fields + xlsData += ""; + for (let key in data[0]) { + xlsData += "" + key + ""; + } + xlsData += ""; + xlsData += ""; + + //Data + xlsData += ""; + data.map(function (item, index) { + xlsData += ""; + for (let key in item) { + xlsData += + "" + + _self.preprocessLongNum( + _self.valueReformattedForMultilines(item[key]) + ) + + ""; + } + xlsData += ""; + }); + xlsData += ""; + + //Footer + if (this.footer != null) { + xlsData += ""; + xlsData += this.parseExtraData( + this.footer, + '${data}' + ); + xlsData += ""; + } + + return xlsTemp + .replace("${table}", xlsData) + .replace("${worksheet}", this.worksheet); + }, + /* + jsonToCSV + --------------- + Transform json data into an CSV file. + */ + jsonToCSV(data) { + let _self = this; + var csvData = []; + + //Header + const header = this.header || this.$attrs.title; + if (header) { + csvData.push(this.parseExtraData(header, "${data}\r\n")); + } + + //Fields + for (let key in data[0]) { + csvData.push(key); + csvData.push(","); + } + csvData.pop(); + csvData.push("\r\n"); + //Data + data.map(function (item) { + for (let key in item) { + let escapedCSV = item[key] + ""; + // Escaped CSV data to string to avoid problems with numbers or other types of values + // this is controlled by the prop escapeCsv + if (_self.escapeCsv) { + escapedCSV = '="' + escapedCSV + '"'; // cast Numbers to string + if (escapedCSV.match(/[,"\n]/)) { + escapedCSV = '"' + escapedCSV.replace(/\"/g, '""') + '"'; + } + } + csvData.push(escapedCSV); + csvData.push(","); + } + csvData.pop(); + csvData.push("\r\n"); + }); + //Footer + if (this.footer != null) { + csvData.push(this.parseExtraData(this.footer, "${data}\r\n")); + } + return csvData.join(""); + }, + /* + getProcessedJson + --------------- + Get only the data to export, if no fields are set return all the data + */ + getProcessedJson(data, header) { + let keys = this.getKeys(data, header); + let newData = []; + let _self = this; + data.map(function (item, index) { + let newItem = {}; + for (let label in keys) { + let property = keys[label]; + newItem[label] = _self.getValue(property, item); + } + newData.push(newItem); + }); + + return newData; + }, + getKeys(data, header) { + if (header) { + return header; + } + + let keys = {}; + for (let key in data[0]) { + keys[key] = key; + } + return keys; + }, + /* + parseExtraData + --------------- + Parse title and footer attribute to the csv format + */ + parseExtraData(extraData, format) { + let parseData = ""; + if (Array.isArray(extraData)) { + for (var i = 0; i < extraData.length; i++) { + if (extraData[i]) + parseData += format.replace("${data}", extraData[i]); + } + } else { + parseData += format.replace("${data}", extraData); + } + return parseData; + }, + + getValue(key, item) { + const field = typeof key !== "object" ? key : key.field; + let indexes = typeof field !== "string" ? [] : field.split("."); + let value = this.defaultValue; + + if (!field) value = item; + else if (indexes.length > 1) + value = this.getValueFromNestedItem(item, indexes); + else value = this.parseValue(item[field]); + + if (key.hasOwnProperty("callback")) + value = this.getValueFromCallback(value, key.callback); + + return value; + }, + + /* + convert values with newline \n characters into
    + */ + valueReformattedForMultilines(value) { + if (typeof value == "string") return value.replace(/\n/gi, "
    "); + else return value; + }, + preprocessLongNum(value) { + if (this.stringifyLongNum) { + if (String(value).startsWith("0x")) { + return value; + } + if (!isNaN(value) && value != "") { + if (value > 99999999999 || value < 0.0000000000001) { + return '="' + value + '"'; + } + } + } + return value; + }, + getValueFromNestedItem(item, indexes) { + let nestedItem = item; + for (let index of indexes) { + if (nestedItem) nestedItem = nestedItem[index]; + } + return this.parseValue(nestedItem); + }, + + getValueFromCallback(item, callback) { + if (typeof callback !== "function") return this.defaultValue; + const value = callback(item); + return this.parseValue(value); + }, + parseValue(value) { + return value || value === 0 || typeof value === "boolean" + ? value + : this.defaultValue; + }, + base64ToBlob(data, mime) { + let base64 = window.btoa(window.unescape(encodeURIComponent(data))); + let bstr = atob(base64); + let n = bstr.length; + let u8arr = new Uint8ClampedArray(n); + while (n--) { + u8arr[n] = bstr.charCodeAt(n); + } + return new Blob([u8arr], { type: mime }); + }, + }, // end methods +}; + +function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier +/* server only */ +, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } // Vue.extend constructor export interop. + + + var options = typeof script === 'function' ? script.options : script; // render functions + + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; // functional template + + if (isFunctionalTemplate) { + options.functional = true; + } + } // scopedId + + + if (scopeId) { + options._scopeId = scopeId; + } + + var hook; + + if (moduleIdentifier) { + // server build + hook = function hook(context) { + // 2.3 injection + context = context || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional + // 2.2 with runInNewContext: true + + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } // inject component styles + + + if (style) { + style.call(this, createInjectorSSR(context)); + } // register component module identifier for async chunk inference + + + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; // used by ssr in case component is cached and beforeCreate + // never gets called + + + options._ssrRegister = hook; + } else if (style) { + hook = shadowMode ? function () { + style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); + } : function (context) { + style.call(this, createInjector(context)); + }; + } + + if (hook) { + if (options.functional) { + // register for functional component in vue file + var originalRender = options.render; + + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + + return script; +} + +var normalizeComponent_1 = normalizeComponent; + +/* script */ +const __vue_script__ = script; + +/* template */ +var __vue_render__ = function() { + var _vm = this; + var _h = _vm.$createElement; + var _c = _vm._self._c || _h; + return _c( + "div", + { attrs: { id: _vm.idName }, on: { click: _vm.generate } }, + [_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])], + 2 + ) +}; +var __vue_staticRenderFns__ = []; +__vue_render__._withStripped = true; + + /* style */ + const __vue_inject_styles__ = undefined; + /* scoped */ + const __vue_scope_id__ = undefined; + /* module identifier */ + const __vue_module_identifier__ = undefined; + /* functional template */ + const __vue_is_functional_template__ = false; + /* style inject */ + + /* style inject SSR */ + + + + var JsonExcel = normalizeComponent_1( + { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, + __vue_inject_styles__, + __vue_script__, + __vue_scope_id__, + __vue_is_functional_template__, + __vue_module_identifier__, + undefined, + undefined + ); + +module.exports = JsonExcel; diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.esm.js b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.esm.js new file mode 100755 index 00000000..2d9535d4 --- /dev/null +++ b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.esm.js @@ -0,0 +1,652 @@ +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; +} + +var download = createCommonjsModule(function (module, exports) { +//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage +// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime +// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs +// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling. +// v4 adds AMD/UMD, commonJS, and plain browser support +// v4.1 adds url download capability via solo URL argument (same domain/CORS only) +// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors +// https://github.com/rndme/download + +(function (root, factory) { + { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } +}(commonjsGlobal, function () { + + return function download(data, strFileName, strMimeType) { + + var self = window, // this script is only for browsers anyway... + defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads + mimeType = strMimeType || defaultMime, + payload = data, + url = !strFileName && !strMimeType && payload, + anchor = document.createElement("a"), + toString = function(a){return String(a);}, + myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString), + fileName = strFileName || "download", + blob, + reader; + myBlob= myBlob.call ? myBlob.bind(self) : Blob ; + + if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback + payload=[payload, mimeType]; + mimeType=payload[0]; + payload=payload[1]; + } + + + if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument + fileName = url.split("/").pop().split("?")[0]; + anchor.href = url; // assign href prop to temp anchor + if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path: + var ajax=new XMLHttpRequest(); + ajax.open( "GET", url, true); + ajax.responseType = 'blob'; + ajax.onload= function(e){ + download(e.target.response, fileName, defaultMime); + }; + setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return: + return ajax; + } // end if valid url? + } // end if url? + + + //go ahead and download dataURLs right away + if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){ + + if(payload.length > (1024*1024*1.999) && myBlob !== toString ){ + payload=dataUrlToBlob(payload); + mimeType=payload.type || defaultMime; + }else { + return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs: + navigator.msSaveBlob(dataUrlToBlob(payload), fileName) : + saver(payload) ; // everyone else can save dataURLs un-processed + } + + }else {//not data url, is it a string with special needs? + if(/([\x80-\xff])/.test(payload)){ + var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length; + for(i;i null, + }, + // this prop is used to fix the problem with other components that use the + // variable fields, like vee-validate. exportFields works exactly like fields + exportFields: { + type: Object, + default: () => null, + }, + // Use as fallback when the row has no field values + defaultValue: { + type: String, + required: false, + default: "", + }, + // Title(s) for the data, could be a string or an array of strings (multiple titles) + header: { + default: null, + }, + // Footer(s) for the data, could be a string or an array of strings (multiple footers) + footer: { + default: null, + }, + // filename to export + name: { + type: String, + default: "data.xls", + }, + fetch: { + type: Function, + }, + meta: { + type: Array, + default: () => [], + }, + worksheet: { + type: String, + default: "Sheet1", + }, + //event before generate was called + beforeGenerate: { + type: Function, + }, + //event before download pops up + beforeFinish: { + type: Function, + }, + // Determine if CSV Data should be escaped + escapeCsv: { + type: Boolean, + default: true, + }, + // long number stringify + stringifyLongNum: { + type: Boolean, + default: false, + }, + }, + computed: { + // unique identifier + idName() { + var now = new Date().getTime(); + return "export_" + now; + }, + + downloadFields() { + if (this.fields) return this.fields; + + if (this.exportFields) return this.exportFields; + }, + }, + methods: { + async generate() { + if (typeof this.beforeGenerate === "function") { + await this.beforeGenerate(); + } + let data = this.data; + if (typeof this.fetch === "function" || !data) data = await this.fetch(); + + if (!data || !data.length) { + return; + } + + let json = this.getProcessedJson(data, this.downloadFields); + if (this.type === "html") { + // this is mainly for testing + return this.export( + this.jsonToXLS(json), + this.name.replace(".xls", ".html"), + "text/html" + ); + } else if (this.type === "csv") { + return this.export( + this.jsonToCSV(json), + this.name.replace(".xls", ".csv"), + "application/csv" + ); + } + return this.export( + this.jsonToXLS(json), + this.name, + "application/vnd.ms-excel" + ); + }, + /* + Use downloadjs to generate the download link + */ + export: async function (data, filename, mime) { + let blob = this.base64ToBlob(data, mime); + if (typeof this.beforeFinish === "function") await this.beforeFinish(); + download(blob, filename, mime); + }, + /* + jsonToXLS + --------------- + Transform json data into an xml document with MS Excel format, sadly + it shows a prompt when it opens, that is a default behavior for + Microsoft office and cannot be avoided. It's recommended to use CSV format instead. + */ + jsonToXLS(data) { + let xlsTemp = + ' ${table}
    '; + let xlsData = ""; + const colspan = Object.keys(data[0]).length; + let _self = this; + + //Header + const header = this.header || this.$attrs.title; + if (header) { + xlsData += this.parseExtraData( + header, + '${data}' + ); + } + + //Fields + xlsData += ""; + for (let key in data[0]) { + xlsData += "" + key + ""; + } + xlsData += ""; + xlsData += ""; + + //Data + xlsData += ""; + data.map(function (item, index) { + xlsData += ""; + for (let key in item) { + xlsData += + "" + + _self.preprocessLongNum( + _self.valueReformattedForMultilines(item[key]) + ) + + ""; + } + xlsData += ""; + }); + xlsData += ""; + + //Footer + if (this.footer != null) { + xlsData += ""; + xlsData += this.parseExtraData( + this.footer, + '${data}' + ); + xlsData += ""; + } + + return xlsTemp + .replace("${table}", xlsData) + .replace("${worksheet}", this.worksheet); + }, + /* + jsonToCSV + --------------- + Transform json data into an CSV file. + */ + jsonToCSV(data) { + let _self = this; + var csvData = []; + + //Header + const header = this.header || this.$attrs.title; + if (header) { + csvData.push(this.parseExtraData(header, "${data}\r\n")); + } + + //Fields + for (let key in data[0]) { + csvData.push(key); + csvData.push(","); + } + csvData.pop(); + csvData.push("\r\n"); + //Data + data.map(function (item) { + for (let key in item) { + let escapedCSV = item[key] + ""; + // Escaped CSV data to string to avoid problems with numbers or other types of values + // this is controlled by the prop escapeCsv + if (_self.escapeCsv) { + escapedCSV = '="' + escapedCSV + '"'; // cast Numbers to string + if (escapedCSV.match(/[,"\n]/)) { + escapedCSV = '"' + escapedCSV.replace(/\"/g, '""') + '"'; + } + } + csvData.push(escapedCSV); + csvData.push(","); + } + csvData.pop(); + csvData.push("\r\n"); + }); + //Footer + if (this.footer != null) { + csvData.push(this.parseExtraData(this.footer, "${data}\r\n")); + } + return csvData.join(""); + }, + /* + getProcessedJson + --------------- + Get only the data to export, if no fields are set return all the data + */ + getProcessedJson(data, header) { + let keys = this.getKeys(data, header); + let newData = []; + let _self = this; + data.map(function (item, index) { + let newItem = {}; + for (let label in keys) { + let property = keys[label]; + newItem[label] = _self.getValue(property, item); + } + newData.push(newItem); + }); + + return newData; + }, + getKeys(data, header) { + if (header) { + return header; + } + + let keys = {}; + for (let key in data[0]) { + keys[key] = key; + } + return keys; + }, + /* + parseExtraData + --------------- + Parse title and footer attribute to the csv format + */ + parseExtraData(extraData, format) { + let parseData = ""; + if (Array.isArray(extraData)) { + for (var i = 0; i < extraData.length; i++) { + if (extraData[i]) + parseData += format.replace("${data}", extraData[i]); + } + } else { + parseData += format.replace("${data}", extraData); + } + return parseData; + }, + + getValue(key, item) { + const field = typeof key !== "object" ? key : key.field; + let indexes = typeof field !== "string" ? [] : field.split("."); + let value = this.defaultValue; + + if (!field) value = item; + else if (indexes.length > 1) + value = this.getValueFromNestedItem(item, indexes); + else value = this.parseValue(item[field]); + + if (key.hasOwnProperty("callback")) + value = this.getValueFromCallback(value, key.callback); + + return value; + }, + + /* + convert values with newline \n characters into
    + */ + valueReformattedForMultilines(value) { + if (typeof value == "string") return value.replace(/\n/gi, "
    "); + else return value; + }, + preprocessLongNum(value) { + if (this.stringifyLongNum) { + if (String(value).startsWith("0x")) { + return value; + } + if (!isNaN(value) && value != "") { + if (value > 99999999999 || value < 0.0000000000001) { + return '="' + value + '"'; + } + } + } + return value; + }, + getValueFromNestedItem(item, indexes) { + let nestedItem = item; + for (let index of indexes) { + if (nestedItem) nestedItem = nestedItem[index]; + } + return this.parseValue(nestedItem); + }, + + getValueFromCallback(item, callback) { + if (typeof callback !== "function") return this.defaultValue; + const value = callback(item); + return this.parseValue(value); + }, + parseValue(value) { + return value || value === 0 || typeof value === "boolean" + ? value + : this.defaultValue; + }, + base64ToBlob(data, mime) { + let base64 = window.btoa(window.unescape(encodeURIComponent(data))); + let bstr = atob(base64); + let n = bstr.length; + let u8arr = new Uint8ClampedArray(n); + while (n--) { + u8arr[n] = bstr.charCodeAt(n); + } + return new Blob([u8arr], { type: mime }); + }, + }, // end methods +}; + +function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier +/* server only */ +, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } // Vue.extend constructor export interop. + + + var options = typeof script === 'function' ? script.options : script; // render functions + + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; // functional template + + if (isFunctionalTemplate) { + options.functional = true; + } + } // scopedId + + + if (scopeId) { + options._scopeId = scopeId; + } + + var hook; + + if (moduleIdentifier) { + // server build + hook = function hook(context) { + // 2.3 injection + context = context || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional + // 2.2 with runInNewContext: true + + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } // inject component styles + + + if (style) { + style.call(this, createInjectorSSR(context)); + } // register component module identifier for async chunk inference + + + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; // used by ssr in case component is cached and beforeCreate + // never gets called + + + options._ssrRegister = hook; + } else if (style) { + hook = shadowMode ? function () { + style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); + } : function (context) { + style.call(this, createInjector(context)); + }; + } + + if (hook) { + if (options.functional) { + // register for functional component in vue file + var originalRender = options.render; + + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + + return script; +} + +var normalizeComponent_1 = normalizeComponent; + +/* script */ +const __vue_script__ = script; + +/* template */ +var __vue_render__ = function() { + var _vm = this; + var _h = _vm.$createElement; + var _c = _vm._self._c || _h; + return _c( + "div", + { attrs: { id: _vm.idName }, on: { click: _vm.generate } }, + [_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])], + 2 + ) +}; +var __vue_staticRenderFns__ = []; +__vue_render__._withStripped = true; + + /* style */ + const __vue_inject_styles__ = undefined; + /* scoped */ + const __vue_scope_id__ = undefined; + /* module identifier */ + const __vue_module_identifier__ = undefined; + /* functional template */ + const __vue_is_functional_template__ = false; + /* style inject */ + + /* style inject SSR */ + + + + var JsonExcel = normalizeComponent_1( + { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, + __vue_inject_styles__, + __vue_script__, + __vue_scope_id__, + __vue_is_functional_template__, + __vue_module_identifier__, + undefined, + undefined + ); + +export default JsonExcel; diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.umd.js b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.umd.js new file mode 100755 index 00000000..bd2c0dc0 --- /dev/null +++ b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.umd.js @@ -0,0 +1,660 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.JsonExcel = factory()); +}(this, (function () { 'use strict'; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var download = createCommonjsModule(function (module, exports) { + //download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage + // v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime + // v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs + // v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling. + // v4 adds AMD/UMD, commonJS, and plain browser support + // v4.1 adds url download capability via solo URL argument (same domain/CORS only) + // v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors + // https://github.com/rndme/download + + (function (root, factory) { + { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } + }(commonjsGlobal, function () { + + return function download(data, strFileName, strMimeType) { + + var self = window, // this script is only for browsers anyway... + defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads + mimeType = strMimeType || defaultMime, + payload = data, + url = !strFileName && !strMimeType && payload, + anchor = document.createElement("a"), + toString = function(a){return String(a);}, + myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString), + fileName = strFileName || "download", + blob, + reader; + myBlob= myBlob.call ? myBlob.bind(self) : Blob ; + + if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback + payload=[payload, mimeType]; + mimeType=payload[0]; + payload=payload[1]; + } + + + if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument + fileName = url.split("/").pop().split("?")[0]; + anchor.href = url; // assign href prop to temp anchor + if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path: + var ajax=new XMLHttpRequest(); + ajax.open( "GET", url, true); + ajax.responseType = 'blob'; + ajax.onload= function(e){ + download(e.target.response, fileName, defaultMime); + }; + setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return: + return ajax; + } // end if valid url? + } // end if url? + + + //go ahead and download dataURLs right away + if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){ + + if(payload.length > (1024*1024*1.999) && myBlob !== toString ){ + payload=dataUrlToBlob(payload); + mimeType=payload.type || defaultMime; + }else { + return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs: + navigator.msSaveBlob(dataUrlToBlob(payload), fileName) : + saver(payload) ; // everyone else can save dataURLs un-processed + } + + }else {//not data url, is it a string with special needs? + if(/([\x80-\xff])/.test(payload)){ + var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length; + for(i;i null, + }, + // this prop is used to fix the problem with other components that use the + // variable fields, like vee-validate. exportFields works exactly like fields + exportFields: { + type: Object, + default: () => null, + }, + // Use as fallback when the row has no field values + defaultValue: { + type: String, + required: false, + default: "", + }, + // Title(s) for the data, could be a string or an array of strings (multiple titles) + header: { + default: null, + }, + // Footer(s) for the data, could be a string or an array of strings (multiple footers) + footer: { + default: null, + }, + // filename to export + name: { + type: String, + default: "data.xls", + }, + fetch: { + type: Function, + }, + meta: { + type: Array, + default: () => [], + }, + worksheet: { + type: String, + default: "Sheet1", + }, + //event before generate was called + beforeGenerate: { + type: Function, + }, + //event before download pops up + beforeFinish: { + type: Function, + }, + // Determine if CSV Data should be escaped + escapeCsv: { + type: Boolean, + default: true, + }, + // long number stringify + stringifyLongNum: { + type: Boolean, + default: false, + }, + }, + computed: { + // unique identifier + idName() { + var now = new Date().getTime(); + return "export_" + now; + }, + + downloadFields() { + if (this.fields) return this.fields; + + if (this.exportFields) return this.exportFields; + }, + }, + methods: { + async generate() { + if (typeof this.beforeGenerate === "function") { + await this.beforeGenerate(); + } + let data = this.data; + if (typeof this.fetch === "function" || !data) data = await this.fetch(); + + if (!data || !data.length) { + return; + } + + let json = this.getProcessedJson(data, this.downloadFields); + if (this.type === "html") { + // this is mainly for testing + return this.export( + this.jsonToXLS(json), + this.name.replace(".xls", ".html"), + "text/html" + ); + } else if (this.type === "csv") { + return this.export( + this.jsonToCSV(json), + this.name.replace(".xls", ".csv"), + "application/csv" + ); + } + return this.export( + this.jsonToXLS(json), + this.name, + "application/vnd.ms-excel" + ); + }, + /* + Use downloadjs to generate the download link + */ + export: async function (data, filename, mime) { + let blob = this.base64ToBlob(data, mime); + if (typeof this.beforeFinish === "function") await this.beforeFinish(); + download(blob, filename, mime); + }, + /* + jsonToXLS + --------------- + Transform json data into an xml document with MS Excel format, sadly + it shows a prompt when it opens, that is a default behavior for + Microsoft office and cannot be avoided. It's recommended to use CSV format instead. + */ + jsonToXLS(data) { + let xlsTemp = + ' ${table}
    '; + let xlsData = ""; + const colspan = Object.keys(data[0]).length; + let _self = this; + + //Header + const header = this.header || this.$attrs.title; + if (header) { + xlsData += this.parseExtraData( + header, + '${data}' + ); + } + + //Fields + xlsData += ""; + for (let key in data[0]) { + xlsData += "" + key + ""; + } + xlsData += ""; + xlsData += ""; + + //Data + xlsData += ""; + data.map(function (item, index) { + xlsData += ""; + for (let key in item) { + xlsData += + "" + + _self.preprocessLongNum( + _self.valueReformattedForMultilines(item[key]) + ) + + ""; + } + xlsData += ""; + }); + xlsData += ""; + + //Footer + if (this.footer != null) { + xlsData += ""; + xlsData += this.parseExtraData( + this.footer, + '${data}' + ); + xlsData += ""; + } + + return xlsTemp + .replace("${table}", xlsData) + .replace("${worksheet}", this.worksheet); + }, + /* + jsonToCSV + --------------- + Transform json data into an CSV file. + */ + jsonToCSV(data) { + let _self = this; + var csvData = []; + + //Header + const header = this.header || this.$attrs.title; + if (header) { + csvData.push(this.parseExtraData(header, "${data}\r\n")); + } + + //Fields + for (let key in data[0]) { + csvData.push(key); + csvData.push(","); + } + csvData.pop(); + csvData.push("\r\n"); + //Data + data.map(function (item) { + for (let key in item) { + let escapedCSV = item[key] + ""; + // Escaped CSV data to string to avoid problems with numbers or other types of values + // this is controlled by the prop escapeCsv + if (_self.escapeCsv) { + escapedCSV = '="' + escapedCSV + '"'; // cast Numbers to string + if (escapedCSV.match(/[,"\n]/)) { + escapedCSV = '"' + escapedCSV.replace(/\"/g, '""') + '"'; + } + } + csvData.push(escapedCSV); + csvData.push(","); + } + csvData.pop(); + csvData.push("\r\n"); + }); + //Footer + if (this.footer != null) { + csvData.push(this.parseExtraData(this.footer, "${data}\r\n")); + } + return csvData.join(""); + }, + /* + getProcessedJson + --------------- + Get only the data to export, if no fields are set return all the data + */ + getProcessedJson(data, header) { + let keys = this.getKeys(data, header); + let newData = []; + let _self = this; + data.map(function (item, index) { + let newItem = {}; + for (let label in keys) { + let property = keys[label]; + newItem[label] = _self.getValue(property, item); + } + newData.push(newItem); + }); + + return newData; + }, + getKeys(data, header) { + if (header) { + return header; + } + + let keys = {}; + for (let key in data[0]) { + keys[key] = key; + } + return keys; + }, + /* + parseExtraData + --------------- + Parse title and footer attribute to the csv format + */ + parseExtraData(extraData, format) { + let parseData = ""; + if (Array.isArray(extraData)) { + for (var i = 0; i < extraData.length; i++) { + if (extraData[i]) + parseData += format.replace("${data}", extraData[i]); + } + } else { + parseData += format.replace("${data}", extraData); + } + return parseData; + }, + + getValue(key, item) { + const field = typeof key !== "object" ? key : key.field; + let indexes = typeof field !== "string" ? [] : field.split("."); + let value = this.defaultValue; + + if (!field) value = item; + else if (indexes.length > 1) + value = this.getValueFromNestedItem(item, indexes); + else value = this.parseValue(item[field]); + + if (key.hasOwnProperty("callback")) + value = this.getValueFromCallback(value, key.callback); + + return value; + }, + + /* + convert values with newline \n characters into
    + */ + valueReformattedForMultilines(value) { + if (typeof value == "string") return value.replace(/\n/gi, "
    "); + else return value; + }, + preprocessLongNum(value) { + if (this.stringifyLongNum) { + if (String(value).startsWith("0x")) { + return value; + } + if (!isNaN(value) && value != "") { + if (value > 99999999999 || value < 0.0000000000001) { + return '="' + value + '"'; + } + } + } + return value; + }, + getValueFromNestedItem(item, indexes) { + let nestedItem = item; + for (let index of indexes) { + if (nestedItem) nestedItem = nestedItem[index]; + } + return this.parseValue(nestedItem); + }, + + getValueFromCallback(item, callback) { + if (typeof callback !== "function") return this.defaultValue; + const value = callback(item); + return this.parseValue(value); + }, + parseValue(value) { + return value || value === 0 || typeof value === "boolean" + ? value + : this.defaultValue; + }, + base64ToBlob(data, mime) { + let base64 = window.btoa(window.unescape(encodeURIComponent(data))); + let bstr = atob(base64); + let n = bstr.length; + let u8arr = new Uint8ClampedArray(n); + while (n--) { + u8arr[n] = bstr.charCodeAt(n); + } + return new Blob([u8arr], { type: mime }); + }, + }, // end methods + }; + + function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier + /* server only */ + , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { + if (typeof shadowMode !== 'boolean') { + createInjectorSSR = createInjector; + createInjector = shadowMode; + shadowMode = false; + } // Vue.extend constructor export interop. + + + var options = typeof script === 'function' ? script.options : script; // render functions + + if (template && template.render) { + options.render = template.render; + options.staticRenderFns = template.staticRenderFns; + options._compiled = true; // functional template + + if (isFunctionalTemplate) { + options.functional = true; + } + } // scopedId + + + if (scopeId) { + options._scopeId = scopeId; + } + + var hook; + + if (moduleIdentifier) { + // server build + hook = function hook(context) { + // 2.3 injection + context = context || // cached call + this.$vnode && this.$vnode.ssrContext || // stateful + this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional + // 2.2 with runInNewContext: true + + if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { + context = __VUE_SSR_CONTEXT__; + } // inject component styles + + + if (style) { + style.call(this, createInjectorSSR(context)); + } // register component module identifier for async chunk inference + + + if (context && context._registeredComponents) { + context._registeredComponents.add(moduleIdentifier); + } + }; // used by ssr in case component is cached and beforeCreate + // never gets called + + + options._ssrRegister = hook; + } else if (style) { + hook = shadowMode ? function () { + style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); + } : function (context) { + style.call(this, createInjector(context)); + }; + } + + if (hook) { + if (options.functional) { + // register for functional component in vue file + var originalRender = options.render; + + options.render = function renderWithStyleInjection(h, context) { + hook.call(context); + return originalRender(h, context); + }; + } else { + // inject component registration as beforeCreate hook + var existing = options.beforeCreate; + options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; + } + } + + return script; + } + + var normalizeComponent_1 = normalizeComponent; + + /* script */ + const __vue_script__ = script; + + /* template */ + var __vue_render__ = function() { + var _vm = this; + var _h = _vm.$createElement; + var _c = _vm._self._c || _h; + return _c( + "div", + { attrs: { id: _vm.idName }, on: { click: _vm.generate } }, + [_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])], + 2 + ) + }; + var __vue_staticRenderFns__ = []; + __vue_render__._withStripped = true; + + /* style */ + const __vue_inject_styles__ = undefined; + /* scoped */ + const __vue_scope_id__ = undefined; + /* module identifier */ + const __vue_module_identifier__ = undefined; + /* functional template */ + const __vue_is_functional_template__ = false; + /* style inject */ + + /* style inject SSR */ + + + + var JsonExcel = normalizeComponent_1( + { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, + __vue_inject_styles__, + __vue_script__, + __vue_scope_id__, + __vue_is_functional_template__, + __vue_module_identifier__, + undefined, + undefined + ); + + return JsonExcel; + +}))); diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/example-multi-line.png b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/example-multi-line.png new file mode 100755 index 0000000000000000000000000000000000000000..b6993ebf26d2733163ce2f2d0bd524b595e4ec99 GIT binary patch literal 12028 zcmeHtgFWmFY&hDH!eZDjEIr~iH>sKIRLOMbK06?swte^n^V1fVu3?_UmG^h4R z)(QZ?0=#~ysfa!V00aO4aR2}U06+l(Fo3u?Ks*Tm$pt{604VZ4MEpKP<37aozH7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-MXI1KazEcwF$LcFzf{J@+f$Ei#<{DG%|84Mn6}MUvlV zA#N-6c5@Aadyz}NkGU27J2t`jfG@M^7B>3x$3cq2FCkm)ymy*S{DQ)V@g-x>3-Vu8 z$+r-8e)g-wKWrHOALLF6r1Lnv9O1ad*{8VI0jM9zPb3w5cU(A&Qgw9rYnTpadXLOM zo^5Jg^WC5kOM*JO^Qiwom;cTI#!J>!6I)V4``~AH4M6|jh@J@2?_#1Bd*?j55B>+< zLJ>xL?PZ=oThLv__p8MAE~j?QcguMH35Os~2c&2A!B6hY5XZd@xH%>PmE0j!TArZ0>&lfb{%_K_(BsB<{QMq@j8I-&leM*8kuaF9Y#2 z=@)l+xol~&^e<49rnlw?hX93bMQ$jtQmL7jxv3La69?DexC7T$|JQ(nMwE6YY?aFh z;k%_x0h$0rNJzg(x-Blh)6v}gcardHMrKZxTilI~Z(rZar*YYmuwWTMb*JINSVE{E zCUa_LH33PuYl+bAaFI1*3D?B((>twHkDc|w*TsR|Ag;SA)BGwsl{=}1^X>nPV!;2Pe_EZHf62$e{|yL^CEeq%81zS;7yk|%X>Xb4 zHNow^MWG)=vhP_sUGc@0pnt|mpw^xKO$MhnnWv*K>;5~gEV6qW=PV=4@6tH(wMD0W zmq3|whvRusM9*E#Zl^Vd;B^EE$mTyQVSyWxX{h@CHr2B1XM#o6?pw^9FK)}D1H2d~ zApQ~ur?{ITi-4l!D`i>FHqRa_-i@jFQgs;lGRIC2)S=D%Hy{o(7v<&(1?%I%?4=mB2DC4}#=0Hj$JFwB$ gQQPh=XcRN@a5XD5^2P`KVk { +export const getLiveList = (params) => { return getRequest('/broadcast/studio', params) } +// 添加直播间 +export const addLive = (params) => { + return postRequest('/broadcast/studio', params) +} + +// 获取直播间详情 +export const getLiveInfo = (studioId) => { + return getRequest(`/broadcast/studio/studioInfo/${studioId}`) +} + +// 修改直播间 +export const editLive = (params) => { + return putRequest('/broadcast/studio/edit', params) +} // 获取店铺直播商品 export const getLiveGoods = (params) => { return getRequest('/broadcast/commodity', params) } +// 店铺直播间删除商品 +export const delLiveGoods = (goodsId) => { + return deleteRequest(`/broadcast/commodity/${goodsId}`) +} + +// 直播间删除商品 +export const delRoomLiveGoods = (roomId,liveGoodsId) => { + return deleteRequest(`/broadcast/studio/deleteInRoom/${roomId}/${liveGoodsId}`) +} + // 添加店铺直播商品 -export const addLiveGoods = (params) => { +export const addLiveStoreGoods = (params) => { return postRequestWithNoForm('/broadcast/commodity', params) } +// 店铺直播间添加 +export const addLiveGoods = (params) => { + return putRequest(`/broadcast/studio/push/${params.roomId}/${params.liveGoodsId}`) +} // 获取拼团列表 export const getPintuanList = (params) => { diff --git a/seller/src/config/index.js b/seller/src/config/index.js index d0a31bb8..f468ec53 100644 --- a/seller/src/config/index.js +++ b/seller/src/config/index.js @@ -22,10 +22,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.103:8890', - buyer: 'http://192.168.0.103:8888', - seller: 'http://192.168.0.103:8889', - manager: 'http://192.168.0.103:8887' + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' }, api_prod: { common: 'https://common-api.pickmall.cn', diff --git a/seller/src/views/goods/goods-seller/goods.vue b/seller/src/views/goods/goods-seller/goods.vue index 165f9944..8e12694d 100644 --- a/seller/src/views/goods/goods-seller/goods.vue +++ b/seller/src/views/goods/goods-seller/goods.vue @@ -718,6 +718,9 @@ export default { }); }, }, + mounted () { + this.init(); + }, activated () { this.init(); }, diff --git a/seller/src/views/promotion/live/addLive.vue b/seller/src/views/promotion/live/addLive.vue index a345e731..cfa0c37e 100644 --- a/seller/src/views/promotion/live/addLive.vue +++ b/seller/src/views/promotion/live/addLive.vue @@ -1,8 +1,9 @@ diff --git a/seller/src/views/promotion/live/liveGoods.vue b/seller/src/views/promotion/live/liveGoods.vue index 62c7780f..0073af23 100644 --- a/seller/src/views/promotion/live/liveGoods.vue +++ b/seller/src/views/promotion/live/liveGoods.vue @@ -1,72 +1,102 @@ diff --git a/seller/src/views/promotion/seckill/seckill.vue b/seller/src/views/promotion/seckill/seckill.vue index b2448ac9..7516938c 100644 --- a/seller/src/views/promotion/seckill/seckill.vue +++ b/seller/src/views/promotion/seckill/seckill.vue @@ -2,29 +2,12 @@
    -
    + - + - @@ -32,13 +15,7 @@ - + @@ -46,14 +23,7 @@ - +
    @@ -63,36 +33,14 @@ }}
    - +
    @@ -193,8 +141,8 @@ export default { this.getDataList(); }, handleReset() { - this.searchForm = {} - this.selectDate = '' + this.searchForm = {}; + this.selectDate = ""; this.searchForm.pageNumber = 0; this.searchForm.pageSize = 10; this.getDataList(); @@ -234,9 +182,12 @@ export default { return hourArr; }, }, - activated () { + activated() { this.init(); - } + }, + mounted() { + this.init(); + }, }; diff --git a/manager/src/views/my-components/verify/verify.js b/manager/src/views/my-components/verify/verify.js new file mode 100644 index 00000000..9282f5b3 --- /dev/null +++ b/manager/src/views/my-components/verify/verify.js @@ -0,0 +1,13 @@ + +import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios'; + + +// 获取拼图验证 +export const getVerifyImg = (verificationEnums) => { + return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`); +}; + +// 拼图验证 +export const postVerifyImg = (params) => { + return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params); +}; diff --git a/seller/package.json b/seller/package.json index 39448129..dee8c0ed 100644 --- a/seller/package.json +++ b/seller/package.json @@ -44,7 +44,8 @@ "vuex": "^3.4.0", "wangeditor": "^4.6.13", "xlsx": "^0.16.2", - "xss": "^1.0.7" + "xss": "^1.0.7", + "uuid": "^8.3.2" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.4.4", diff --git a/seller/src/App.vue b/seller/src/App.vue index 2a6fc3f5..1f841906 100644 --- a/seller/src/App.vue +++ b/seller/src/App.vue @@ -5,13 +5,15 @@ diff --git a/seller/src/libs/axios.js b/seller/src/libs/axios.js index 037a4c0f..56d3afd8 100644 --- a/seller/src/libs/axios.js +++ b/seller/src/libs/axios.js @@ -24,6 +24,8 @@ service.interceptors.request.use( ...config.params } } + const uuid = getStore('uuid'); + config.headers['uuid'] = uuid; return config; }, err => { diff --git a/seller/src/router/router.js b/seller/src/router/router.js index 1a1828a3..5bb9b88e 100644 --- a/seller/src/router/router.js +++ b/seller/src/router/router.js @@ -5,7 +5,7 @@ export const loginRouter = { path: "/login", name: "login", meta: { - title: "登录 - lili " + title: "登录 - lili商家后台 " }, component: () => import("@/views/login.vue") }; diff --git a/seller/src/views/login.vue b/seller/src/views/login.vue index 8f9dd33d..93747100 100644 --- a/seller/src/views/login.vue +++ b/seller/src/views/login.vue @@ -55,6 +55,13 @@
    + + @@ -72,11 +79,13 @@ import Header from "@/views/main-components/header"; import Footer from "@/views/main-components/footer"; import LangSwitch from "@/views/main-components/lang-switch"; import util from "@/libs/util.js"; +import verify from '@/views/my-components/verify'; export default { components: { LangSwitch, Header, Footer, + verify }, data() { return { @@ -154,23 +163,27 @@ export default { } }); }, - submitLogin() { - // 正常逻辑 + submitLogin() { // 登录提交 this.$refs.usernameLoginForm.validate((valid) => { if (valid) { - this.loading = true; - login({ - username: this.form.username, - password: this.md5(this.form.password), - }).then((res) => { - this.loading = false; - if (res && res.success) { - this.afterLogin(res); - } - }).catch(()=>{this.loading = false}) + this.$refs.verify.show = true; } }) }, + verifyChange (con) { // 拼图验证码回显 + if (!con.status) return; + + this.loading = true; + login({ + username: this.form.username, + password: this.md5(this.form.password), + }).then((res) => { + this.loading = false; + if (res && res.success) { + this.afterLogin(res); + } + }).catch(()=>{this.loading = false}) + } } }; @@ -203,6 +216,12 @@ export default { display: flex; flex-direction: column !important; } + .verify-con{ + position: absolute; + top: 126px; + z-index: 10; + left: 20px; + } .form { padding-top: 1vh; diff --git a/seller/src/views/my-components/verify/README.md b/seller/src/views/my-components/verify/README.md new file mode 100644 index 00000000..b1fa811e --- /dev/null +++ b/seller/src/views/my-components/verify/README.md @@ -0,0 +1,14 @@ +### 滑动拼图验证 + +### 在页面中引入 .vue文件 + +#### 参数 + +#### 在组件上添加v-if来判断组件显隐 + +#### verifyType 验证格式[ 'LOGIN' ,'REGISTER' ] + +#### @change方法 获取回调,参数为对象 {status:false,distance:100} status 为回调状态,distance为移动距离 + + +#### \ No newline at end of file diff --git a/seller/src/views/my-components/verify/index.vue b/seller/src/views/my-components/verify/index.vue new file mode 100644 index 00000000..2ce1ef45 --- /dev/null +++ b/seller/src/views/my-components/verify/index.vue @@ -0,0 +1,185 @@ + + + diff --git a/seller/src/views/my-components/verify/verify.js b/seller/src/views/my-components/verify/verify.js new file mode 100644 index 00000000..9282f5b3 --- /dev/null +++ b/seller/src/views/my-components/verify/verify.js @@ -0,0 +1,13 @@ + +import {commonUrl, getRequestWithNoToken, postRequestWithNoToken} from '@/libs/axios'; + + +// 获取拼图验证 +export const getVerifyImg = (verificationEnums) => { + return getRequestWithNoToken(`${commonUrl}/common/slider/${verificationEnums}`); +}; + +// 拼图验证 +export const postVerifyImg = (params) => { + return postRequestWithNoToken(`${commonUrl}/common/slider/${params.verificationEnums}`, params); +}; From e1c14af914ffdfe69de7b54d990058f757420a84 Mon Sep 17 00:00:00 2001 From: mabo Date: Thu, 3 Jun 2021 16:17:11 +0800 Subject: [PATCH 08/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B9=B0=E5=AE=B6?= =?UTF-8?q?=E7=AB=AF=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/drawer/Drawer.vue | 2 - buyer/src/components/drawer/Main.vue | 6 +- buyer/src/components/empty/Main.vue | 5 - buyer/src/components/footer/Footer.vue | 2 +- .../src/components/goodsDetail/Promotion.vue | 8 +- .../src/components/goodsDetail/ShowGoods.vue | 23 ++- .../goodsDetail/ShowGoodsDetail.vue | 35 ++-- .../goodsDetail/ShowGoodsQuestion.vue | 53 ------ .../goodsDetail/ShowProductWarranty.vue | 85 --------- buyer/src/components/header/Header.vue | 18 +- buyer/src/components/header/ShopHeader.vue | 2 +- buyer/src/components/header/hoverSearch.vue | 2 +- .../indexDecorate/modelList/carousel.vue | 4 +- .../modelList/firstPageAdvert.vue | 1 - .../indexDecorate/modelList/notEnough.vue | 3 +- .../indexDecorate/modelList/seckill.vue | 2 +- buyer/src/pages/PointGoods.vue | 171 ------------------ buyer/src/pages/PointMall.vue | 6 +- 18 files changed, 56 insertions(+), 372 deletions(-) delete mode 100644 buyer/src/components/goodsDetail/ShowGoodsQuestion.vue delete mode 100644 buyer/src/components/goodsDetail/ShowProductWarranty.vue delete mode 100644 buyer/src/pages/PointGoods.vue diff --git a/buyer/src/components/drawer/Drawer.vue b/buyer/src/components/drawer/Drawer.vue index 54db455f..d7990232 100644 --- a/buyer/src/components/drawer/Drawer.vue +++ b/buyer/src/components/drawer/Drawer.vue @@ -151,8 +151,6 @@ export default { ] }; }, - components: {}, - mounted () {}, methods: { getCartList () { // 获取购物车列表 this.loading = true diff --git a/buyer/src/components/drawer/Main.vue b/buyer/src/components/drawer/Main.vue index c5c32162..78252f5a 100644 --- a/buyer/src/components/drawer/Main.vue +++ b/buyer/src/components/drawer/Main.vue @@ -44,12 +44,12 @@ export default { } }, methods: { - showCartNum (item) { + showCartNum (item) { // 获取购物车数量 if (this.userInfo && item.title === '购物车') { this.getCartList() } }, - clickBar (val) { + clickBar (val) { // tabbar点击操作 if (!this.userInfo) { this.$Modal.confirm({ title: '请登录', @@ -83,7 +83,7 @@ export default { } } }, - openBlank (path) { + openBlank (path) { // 新页面打开地址 let routerUrl = this.$router.resolve({ path: path }) diff --git a/buyer/src/components/empty/Main.vue b/buyer/src/components/empty/Main.vue index a1af93a8..4b0a0555 100644 --- a/buyer/src/components/empty/Main.vue +++ b/buyer/src/components/empty/Main.vue @@ -13,11 +13,6 @@ @@ -283,14 +276,12 @@ export default { } .item-intro-detail{ margin: 0 30px; - // min-height: 1500px; width: 100%; } .item-intro-nav{ width: 100%; height: 38px; background-color: #F7F7F7; - // border-bottom: 1px solid $theme_color; } .item-intro-nav ul{ margin: 0px; @@ -329,8 +320,6 @@ export default { width: 240px; height: 36px; font-size: 14px; - /* text-align: center; */ - /* background-color: #ccc; */ } .item-param-title { color: #232323; diff --git a/buyer/src/components/goodsDetail/ShowGoodsQuestion.vue b/buyer/src/components/goodsDetail/ShowGoodsQuestion.vue deleted file mode 100644 index bd70c809..00000000 --- a/buyer/src/components/goodsDetail/ShowGoodsQuestion.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/buyer/src/components/goodsDetail/ShowProductWarranty.vue b/buyer/src/components/goodsDetail/ShowProductWarranty.vue deleted file mode 100644 index 3bbb7550..00000000 --- a/buyer/src/components/goodsDetail/ShowProductWarranty.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - - - diff --git a/buyer/src/components/header/Header.vue b/buyer/src/components/header/Header.vue index 8293b17a..55281fbf 100644 --- a/buyer/src/components/header/Header.vue +++ b/buyer/src/components/header/Header.vue @@ -25,7 +25,6 @@
    • -
    • 请登录 @@ -148,31 +147,22 @@ export default { } }, methods: { - handleClickTheme () { - this.themeType === 'light' - ? (this.themeType = 'dark') - : (this.themeType = 'light'); - window.document.documentElement.setAttribute( - 'data-theme', - this.themeType - ); - }, - changeCity (city) { + changeCity (city) { // 选择所在城市 this.city = city; }, - goToPay () { + goToPay () { // 跳转购物车 let url = this.$router.resolve({ path: '/cart' }) window.open(url.href, '_blank') }, - myInfo () { + myInfo () { // 跳转会员中心 let url = this.$router.resolve({ path: '/home' }) window.open(url.href, '_blank') }, - signOutFun () { + signOutFun () { // 退出登录 storage.removeItem('accessToken'); storage.removeItem('refreshToken'); storage.removeItem('userInfo'); diff --git a/buyer/src/components/header/ShopHeader.vue b/buyer/src/components/header/ShopHeader.vue index 0b2bda67..33f32a02 100644 --- a/buyer/src/components/header/ShopHeader.vue +++ b/buyer/src/components/header/ShopHeader.vue @@ -20,7 +20,7 @@ export default { } }, computed: { - storeDetail () { + storeDetail () { // 店铺详情 return this.detail; } } diff --git a/buyer/src/components/header/hoverSearch.vue b/buyer/src/components/header/hoverSearch.vue index 5c9e21a0..a81980b8 100644 --- a/buyer/src/components/header/hoverSearch.vue +++ b/buyer/src/components/header/hoverSearch.vue @@ -23,7 +23,7 @@ export default { } }, methods: { - goCartList () { + goCartList () { // 跳转购物车页面 let routerUrl = this.$router.resolve({ path: '/cart' }) diff --git a/buyer/src/components/indexDecorate/modelList/carousel.vue b/buyer/src/components/indexDecorate/modelList/carousel.vue index 0c737399..45c6be95 100644 --- a/buyer/src/components/indexDecorate/modelList/carousel.vue +++ b/buyer/src/components/indexDecorate/modelList/carousel.vue @@ -67,14 +67,14 @@ export default { }; }, methods: { - getArticleList () { + getArticleList () { // 获取常见问题列表 articleList(this.params).then(res => { if (res.success) { this.articleList = res.result.records } }) }, - goArticle (id) { + goArticle (id) { // 跳转文章详情 let routeUrl = this.$router.resolve({ path: '/article', query: {id} diff --git a/buyer/src/components/indexDecorate/modelList/firstPageAdvert.vue b/buyer/src/components/indexDecorate/modelList/firstPageAdvert.vue index 270e6377..7d35c935 100644 --- a/buyer/src/components/indexDecorate/modelList/firstPageAdvert.vue +++ b/buyer/src/components/indexDecorate/modelList/firstPageAdvert.vue @@ -32,7 +32,6 @@ export default { options: this.data.options // 装修数据 }; }, - methods: {} }; diff --git a/buyer/src/pages/PointMall.vue b/buyer/src/pages/PointMall.vue index 7cf5ae32..e72d219b 100644 --- a/buyer/src/pages/PointMall.vue +++ b/buyer/src/pages/PointMall.vue @@ -63,7 +63,8 @@ export default { pageNumber: 1, pageSize: 20, pointsGoodsCategoryId: '' - } + }, + total: 0 // 商品总数 } }, mounted () { @@ -76,6 +77,7 @@ export default { pointGoods(this.params).then(res => { if (res.success) { this.goodsList = res.result.records + this.total = res.result.total } }) }, @@ -94,7 +96,7 @@ export default { goGoodsDetail (skuId, goodsId) { // 跳转商品详情 let routerUrl = this.$router.resolve({ path: '/goodsDetail', - query: {skuId, goodsId} + query: {skuId, goodsId, way: 'POINT'} }) window.open(routerUrl.href, '_blank') }, From f97282ad44299878a6fdc86e19e5c4146d224dda Mon Sep 17 00:00:00 2001 From: mabo Date: Thu, 3 Jun 2021 17:32:38 +0800 Subject: [PATCH 09/22] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/Search.vue | 6 +- .../indexDecorate/modelList/seckill.vue | 2 +- buyer/src/components/invoiceModal/README.md | 2 - buyer/src/components/invoiceModal/index.vue | 4 +- buyer/src/components/map/index.vue | 2 +- buyer/src/components/map/region.vue | 6 +- buyer/src/components/nav/GoodsClassNav.vue | 3 +- buyer/src/components/verify/index.vue | 10 +- buyer/src/pages/GoodsDetail.vue | 1 + .../pages/home/memberCenter/AccountBind.vue | 7 -- .../pages/home/memberCenter/AccountSafe.vue | 98 +------------------ .../pages/home/memberCenter/CommentList.vue | 13 +-- .../home/memberCenter/ComplainDetail.vue | 8 +- .../pages/home/memberCenter/ComplainList.vue | 12 +-- .../pages/home/memberCenter/Distribution.vue | 10 +- .../src/pages/home/memberCenter/Favorites.vue | 14 +-- buyer/src/pages/home/memberCenter/Invoice.vue | 6 +- .../home/memberCenter/evaluation/AddEval.vue | 14 +-- .../memberCenter/evaluation/EvalDetail.vue | 6 +- .../goods/goods-seller/goodsOperation.vue | 2 +- 20 files changed, 60 insertions(+), 166 deletions(-) diff --git a/buyer/src/components/Search.vue b/buyer/src/components/Search.vue index 3a3653a1..0354bcf4 100644 --- a/buyer/src/components/Search.vue +++ b/buyer/src/components/Search.vue @@ -63,17 +63,17 @@ export default { }; }, methods: { - selectTags (item) { + selectTags (item) { // 选择热门标签 this.searchData = item; this.search(); }, - search () { + search () { // 全平台搜索商品 this.$router.push({ path: '/goodsList', query: { keyword: this.searchData } }); }, - searchStore () { + searchStore () { // 店铺搜索商品 this.$emit('search', this.searchData) } }, diff --git a/buyer/src/components/indexDecorate/modelList/seckill.vue b/buyer/src/components/indexDecorate/modelList/seckill.vue index 5c8efd83..c1f16dd8 100644 --- a/buyer/src/components/indexDecorate/modelList/seckill.vue +++ b/buyer/src/components/indexDecorate/modelList/seckill.vue @@ -139,7 +139,7 @@ export default { }, 1000); } }, - goPromotion () { + goPromotion () { // 跳转秒杀页面 let routeUrl = this.$router.resolve({ path: '/seckill' }); diff --git a/buyer/src/components/invoiceModal/README.md b/buyer/src/components/invoiceModal/README.md index 3abb8783..94507dbe 100644 --- a/buyer/src/components/invoiceModal/README.md +++ b/buyer/src/components/invoiceModal/README.md @@ -1,3 +1 @@ ## 此组件为结算页面修改发票信息使用 后续可以复用到个人信息添加发票页面 - -### 目前没有参数,之后会设置一个参数接收历史的单位发票数据 \ No newline at end of file diff --git a/buyer/src/components/invoiceModal/index.vue b/buyer/src/components/invoiceModal/index.vue index e332635b..7c44115e 100644 --- a/buyer/src/components/invoiceModal/index.vue +++ b/buyer/src/components/invoiceModal/index.vue @@ -69,7 +69,7 @@ export default { receiptContent: '不开发票', // 发票内容 type: 1 // 1 个人 2 单位 }, - ruleInline: { + ruleInline: { // 验证规则 receiptTitle: [{ required: true, message: '请填写公司名称' }], taxpayerId: [ { required: true, message: '请填写纳税人识别号' }, @@ -79,7 +79,7 @@ export default { }; }, methods: { - save () { + save () { // 保存发票 if (this.invoiceForm.type === 1) { // 个人 let flag = true; diff --git a/buyer/src/components/map/index.vue b/buyer/src/components/map/index.vue index 534a3f68..f408d1e8 100644 --- a/buyer/src/components/map/index.vue +++ b/buyer/src/components/map/index.vue @@ -85,7 +85,7 @@ export default { this.$emit('getAddress', this.addrContent); } }, - init () { + init () { // 初始化地图 AMapLoader.load({ key: 'b440952723253aa9fe483e698057bf7d', // 申请好的Web端开发者Key,首次调用 load 时必填 version: '', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15 diff --git a/buyer/src/components/map/region.vue b/buyer/src/components/map/region.vue index f7682cb2..3545e7d8 100644 --- a/buyer/src/components/map/region.vue +++ b/buyer/src/components/map/region.vue @@ -21,7 +21,7 @@ export default { props: ['addressId'], mounted () {}, methods: { - change (val, selectedData) { + change (val, selectedData) { // 选择地区 /** * @returns [regionId,region] */ @@ -30,7 +30,7 @@ export default { selectedData[selectedData.length - 1].__label.split('/') ]); }, - loadData (item, callback) { + loadData (item, callback) { // 加载数据 item.loading = true; getRegion(item.value).then((res) => { if (res.result.length <= 0) { @@ -59,7 +59,7 @@ export default { } }); }, - async init () { + async init () { // 初始化地图数据 let data = await getRegion(0); let arr = []; data.result.forEach((item) => { diff --git a/buyer/src/components/nav/GoodsClassNav.vue b/buyer/src/components/nav/GoodsClassNav.vue index 134de723..43457c2c 100644 --- a/buyer/src/components/nav/GoodsClassNav.vue +++ b/buyer/src/components/nav/GoodsClassNav.vue @@ -209,7 +209,7 @@ export default { }, deep: true }, - '$route': { + '$route': { // 监听路由 handler (val, oVal) { if (this.$route.query.categoryId) { let cateId = this.$route.query.categoryId.split(',') @@ -373,6 +373,7 @@ export default { } }, mounted () { + // 有分类id就根据id搜索 if (this.$route.query.categoryId) { let cateId = this.$route.query.categoryId.split(',') Object.assign(this.params, this.$route.query) diff --git a/buyer/src/components/verify/index.vue b/buyer/src/components/verify/index.vue index 2ce1ef45..6fb6b735 100644 --- a/buyer/src/components/verify/index.vue +++ b/buyer/src/components/verify/index.vue @@ -43,11 +43,11 @@ export default { }; }, methods: { - mouseDown (e) { + mouseDown (e) { // 鼠标按下操作, this.downX = e.clientX; this.flag = true; }, - mouseMove (e) { + mouseMove (e) { // 鼠标移动 if (this.flag) { let offset = e.clientX - this.downX; @@ -60,7 +60,7 @@ export default { } } }, - mouseUp () { + mouseUp () { // 鼠标抬起 if (!this.flag) return false; this.flag = false; let params = { @@ -83,7 +83,7 @@ export default { } }); }, - refresh () { + refresh () { // 刷新验证图片 this.flag = false; this.downX = 0; this.distance = 0; @@ -91,7 +91,7 @@ export default { this.verifyText = '拖动滑块解锁'; this.getImg(); }, - getImg () { + getImg () { // 获取验证图片 getVerifyImg(this.type).then(res => { this.data = res.result; }); diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index f065d152..9f5fff3b 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -78,6 +78,7 @@ export default { name: cateName[index] }); }); + console.log(cateArr); this.categoryBar = cateArr; this.goodsMsg = res.result; // 判断是否收藏 diff --git a/buyer/src/pages/home/memberCenter/AccountBind.vue b/buyer/src/pages/home/memberCenter/AccountBind.vue index 114f7d90..f645538c 100644 --- a/buyer/src/pages/home/memberCenter/AccountBind.vue +++ b/buyer/src/pages/home/memberCenter/AccountBind.vue @@ -25,13 +25,6 @@ diff --git a/buyer/src/pages/home/memberCenter/AccountSafe.vue b/buyer/src/pages/home/memberCenter/AccountSafe.vue index b39ff66c..61d7b9a4 100644 --- a/buyer/src/pages/home/memberCenter/AccountSafe.vue +++ b/buyer/src/pages/home/memberCenter/AccountSafe.vue @@ -1,7 +1,6 @@ - - diff --git a/manager/src/views/lili-floor-renovation/wap/advertising.vue b/manager/src/views/lili-floor-renovation/wap/advertising.vue index a6b5c53b..adfe9a9e 100644 --- a/manager/src/views/lili-floor-renovation/wap/advertising.vue +++ b/manager/src/views/lili-floor-renovation/wap/advertising.vue @@ -8,7 +8,7 @@
      - + @@ -16,7 +16,7 @@
      全屏广告
      - +
      - \ No newline at end of file diff --git a/manager/src/views/lili-floor-renovation/wap/index.js b/manager/src/views/lili-floor-renovation/wap/index.js index c7aa1a99..37aa9768 100644 --- a/manager/src/views/lili-floor-renovation/wap/index.js +++ b/manager/src/views/lili-floor-renovation/wap/index.js @@ -1,5 +1,5 @@ import index from './index.vue' //首页 -import btn from './btn.vue' //按钮 + import advertising from './advertising.vue' //全屏活动 import alertAdvertising from './alertAdvertising.vue' //弹窗活动 @@ -7,7 +7,7 @@ import alertAdvertising from './alertAdvertising.vue' //弹窗活动 const templates = { index, - btn, + advertising, alertAdvertising } diff --git a/manager/src/views/lili-floor-renovation/wap/navbar.vue b/manager/src/views/lili-floor-renovation/wap/navbar.vue index a777e892..20be9547 100644 --- a/manager/src/views/lili-floor-renovation/wap/navbar.vue +++ b/manager/src/views/lili-floor-renovation/wap/navbar.vue @@ -67,11 +67,7 @@ export default { name: "index", selected: true, }, - { - title: "悬浮按钮", - name: "btn", - selected: false, - }, + { title: "全屏广告", name: "advertising", diff --git a/manager/src/views/member/list/index.vue b/manager/src/views/member/list/index.vue index 73d13435..fec0be21 100644 --- a/manager/src/views/member/list/index.vue +++ b/manager/src/views/member/list/index.vue @@ -21,11 +21,11 @@ - -
      + +
      - + @@ -137,12 +137,14 @@ export default { loading: true, // 表单加载状态 addFlag: false, // modal显隐控制 updateRegion: false, // 地区 - addMemberForm: { // 添加用户表单 + addMemberForm: { + // 添加用户表单 mobile: "", username: "", password: "", }, - searchForm: { // 请求参数 + searchForm: { + // 请求参数 pageNumber: 1, pageSize: 10, order: "desc", @@ -152,7 +154,8 @@ export default { }, picModelFlag: false, // 选择图片 formValidate: {}, // 表单数据 - addRule: { // 验证规则 + addRule: { + // 验证规则 mobile: [ { required: true, message: "请输入手机号码" }, { @@ -229,6 +232,7 @@ export default { { props: { size: "small", + type: params.row.___selected ? "primary" : "", }, style: { marginRight: "5px", @@ -236,11 +240,11 @@ export default { }, on: { click: () => { - this.callback(params.row); + this.callback(params.row, params.index); }, }, }, - "选择" + params.row.___selected ? "已选择" : "选择" ), h( @@ -251,7 +255,8 @@ export default { size: "small", }, style: { - marginRight: "5px", display: this.selectedMember ? "none" : "block", + marginRight: "5px", + display: this.selectedMember ? "none" : "block", }, on: { click: () => { @@ -270,7 +275,8 @@ export default { ghost: true, }, style: { - marginRight: "5px", display: this.selectedMember ? "none" : "block", + marginRight: "5px", + display: this.selectedMember ? "none" : "block", }, on: { click: () => { @@ -308,9 +314,17 @@ export default { total: 0, // 表单数据总数 }; }, + props: { + // 是否为选中模式 + selectedMember: { + type: Boolean, + default: false, + }, + }, methods: { // 回调给父级 - callback(val) { + callback(val, index) { + val.___selected = !val.___selected; this.$emit("callback", val); }, init() { @@ -378,6 +392,9 @@ export default { API_Member.getMemberListData(this.searchForm).then((res) => { if (res.result.records) { this.loading = false; + res.result.records.forEach((item) => { + item.___selected = false; + }); this.data = res.result.records; this.total = res.result.total; } @@ -476,7 +493,7 @@ export default { /deep/ .ivu-table-wrapper { width: 100%; } -/deep/ .ivu-card{ +/deep/ .ivu-card { width: 100%; } .face { diff --git a/manager/src/views/promotion/coupon/coupon.vue b/manager/src/views/promotion/coupon/coupon.vue index 5ea885b3..c10a40a7 100644 --- a/manager/src/views/promotion/coupon/coupon.vue +++ b/manager/src/views/promotion/coupon/coupon.vue @@ -4,21 +4,10 @@ - + - @@ -26,66 +15,30 @@ - + - + + - - diff --git a/manager/src/views/promotion/seckill/setupSeckill.vue b/manager/src/views/promotion/seckill/setupSeckill.vue new file mode 100644 index 00000000..9ad7c77b --- /dev/null +++ b/manager/src/views/promotion/seckill/setupSeckill.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/manager/src/views/seller/shop/shopOperation.vue b/manager/src/views/seller/shop/shopOperation.vue index 05295e05..ccafc805 100644 --- a/manager/src/views/seller/shop/shopOperation.vue +++ b/manager/src/views/seller/shop/shopOperation.vue @@ -224,7 +224,6 @@ import memberLayout from "@/views/member/list/index"; import ossManage from "@/views/sys/oss-manage/ossManage"; import { getCategoryTree } from "@/api/goods"; import { shopDetail, shopAdd, shopEdit, getShopByMemberId } from "@/api/shops"; -import * as filters from "@/utils/filters"; import uploadPicInput from "@/views/my-components/lili/upload-pic-input"; import region from "@/views/lili-components/region"; import liliMap from "@/views/my-components/map/index"; diff --git a/manager/src/views/sys/message/sms.vue b/manager/src/views/sys/message/sms.vue index b863d8ee..3583b5f5 100644 --- a/manager/src/views/sys/message/sms.vue +++ b/manager/src/views/sys/message/sms.vue @@ -116,7 +116,7 @@
      -
      ${table}
      '; - let xlsData = ""; - const colspan = Object.keys(data[0]).length; - let _self = this; - - //Header - const header = this.header || this.$attrs.title; - if (header) { - xlsData += this.parseExtraData( - header, - '${data}' - ); - } - - //Fields - xlsData += ""; - for (let key in data[0]) { - xlsData += "" + key + ""; - } - xlsData += ""; - xlsData += ""; - - //Data - xlsData += ""; - data.map(function (item, index) { - xlsData += ""; - for (let key in item) { - xlsData += - "" + - _self.preprocessLongNum( - _self.valueReformattedForMultilines(item[key]) - ) + - ""; - } - xlsData += ""; - }); - xlsData += ""; - - //Footer - if (this.footer != null) { - xlsData += ""; - xlsData += this.parseExtraData( - this.footer, - '${data}' - ); - xlsData += ""; - } - - return xlsTemp - .replace("${table}", xlsData) - .replace("${worksheet}", this.worksheet); - }, - /* - jsonToCSV - --------------- - Transform json data into an CSV file. - */ - jsonToCSV(data) { - let _self = this; - var csvData = []; - - //Header - const header = this.header || this.$attrs.title; - if (header) { - csvData.push(this.parseExtraData(header, "${data}\r\n")); - } - - //Fields - for (let key in data[0]) { - csvData.push(key); - csvData.push(","); - } - csvData.pop(); - csvData.push("\r\n"); - //Data - data.map(function (item) { - for (let key in item) { - let escapedCSV = item[key] + ""; - // Escaped CSV data to string to avoid problems with numbers or other types of values - // this is controlled by the prop escapeCsv - if (_self.escapeCsv) { - escapedCSV = '="' + escapedCSV + '"'; // cast Numbers to string - if (escapedCSV.match(/[,"\n]/)) { - escapedCSV = '"' + escapedCSV.replace(/\"/g, '""') + '"'; - } - } - csvData.push(escapedCSV); - csvData.push(","); - } - csvData.pop(); - csvData.push("\r\n"); - }); - //Footer - if (this.footer != null) { - csvData.push(this.parseExtraData(this.footer, "${data}\r\n")); - } - return csvData.join(""); - }, - /* - getProcessedJson - --------------- - Get only the data to export, if no fields are set return all the data - */ - getProcessedJson(data, header) { - let keys = this.getKeys(data, header); - let newData = []; - let _self = this; - data.map(function (item, index) { - let newItem = {}; - for (let label in keys) { - let property = keys[label]; - newItem[label] = _self.getValue(property, item); - } - newData.push(newItem); - }); - - return newData; - }, - getKeys(data, header) { - if (header) { - return header; - } - - let keys = {}; - for (let key in data[0]) { - keys[key] = key; - } - return keys; - }, - /* - parseExtraData - --------------- - Parse title and footer attribute to the csv format - */ - parseExtraData(extraData, format) { - let parseData = ""; - if (Array.isArray(extraData)) { - for (var i = 0; i < extraData.length; i++) { - if (extraData[i]) - parseData += format.replace("${data}", extraData[i]); - } - } else { - parseData += format.replace("${data}", extraData); - } - return parseData; - }, - - getValue(key, item) { - const field = typeof key !== "object" ? key : key.field; - let indexes = typeof field !== "string" ? [] : field.split("."); - let value = this.defaultValue; - - if (!field) value = item; - else if (indexes.length > 1) - value = this.getValueFromNestedItem(item, indexes); - else value = this.parseValue(item[field]); - - if (key.hasOwnProperty("callback")) - value = this.getValueFromCallback(value, key.callback); - - return value; - }, - - /* - convert values with newline \n characters into
      - */ - valueReformattedForMultilines(value) { - if (typeof value == "string") return value.replace(/\n/gi, "
      "); - else return value; - }, - preprocessLongNum(value) { - if (this.stringifyLongNum) { - if (String(value).startsWith("0x")) { - return value; - } - if (!isNaN(value) && value != "") { - if (value > 99999999999 || value < 0.0000000000001) { - return '="' + value + '"'; - } - } - } - return value; - }, - getValueFromNestedItem(item, indexes) { - let nestedItem = item; - for (let index of indexes) { - if (nestedItem) nestedItem = nestedItem[index]; - } - return this.parseValue(nestedItem); - }, - - getValueFromCallback(item, callback) { - if (typeof callback !== "function") return this.defaultValue; - const value = callback(item); - return this.parseValue(value); - }, - parseValue(value) { - return value || value === 0 || typeof value === "boolean" - ? value - : this.defaultValue; - }, - base64ToBlob(data, mime) { - let base64 = window.btoa(window.unescape(encodeURIComponent(data))); - let bstr = atob(base64); - let n = bstr.length; - let u8arr = new Uint8ClampedArray(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); - }, - }, // end methods -}; - -function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier -/* server only */ -, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { - if (typeof shadowMode !== 'boolean') { - createInjectorSSR = createInjector; - createInjector = shadowMode; - shadowMode = false; - } // Vue.extend constructor export interop. - - - var options = typeof script === 'function' ? script.options : script; // render functions - - if (template && template.render) { - options.render = template.render; - options.staticRenderFns = template.staticRenderFns; - options._compiled = true; // functional template - - if (isFunctionalTemplate) { - options.functional = true; - } - } // scopedId - - - if (scopeId) { - options._scopeId = scopeId; - } - - var hook; - - if (moduleIdentifier) { - // server build - hook = function hook(context) { - // 2.3 injection - context = context || // cached call - this.$vnode && this.$vnode.ssrContext || // stateful - this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional - // 2.2 with runInNewContext: true - - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } // inject component styles - - - if (style) { - style.call(this, createInjectorSSR(context)); - } // register component module identifier for async chunk inference - - - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; // used by ssr in case component is cached and beforeCreate - // never gets called - - - options._ssrRegister = hook; - } else if (style) { - hook = shadowMode ? function () { - style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); - } : function (context) { - style.call(this, createInjector(context)); - }; - } - - if (hook) { - if (options.functional) { - // register for functional component in vue file - var originalRender = options.render; - - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; - } - } - - return script; -} - -var normalizeComponent_1 = normalizeComponent; - -/* script */ -const __vue_script__ = script; - -/* template */ -var __vue_render__ = function() { - var _vm = this; - var _h = _vm.$createElement; - var _c = _vm._self._c || _h; - return _c( - "div", - { attrs: { id: _vm.idName }, on: { click: _vm.generate } }, - [_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])], - 2 - ) -}; -var __vue_staticRenderFns__ = []; -__vue_render__._withStripped = true; - - /* style */ - const __vue_inject_styles__ = undefined; - /* scoped */ - const __vue_scope_id__ = undefined; - /* module identifier */ - const __vue_module_identifier__ = undefined; - /* functional template */ - const __vue_is_functional_template__ = false; - /* style inject */ - - /* style inject SSR */ - - - - var JsonExcel = normalizeComponent_1( - { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, - __vue_inject_styles__, - __vue_script__, - __vue_scope_id__, - __vue_is_functional_template__, - __vue_module_identifier__, - undefined, - undefined - ); - -module.exports = JsonExcel; diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.esm.js b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.esm.js deleted file mode 100755 index 2d9535d4..00000000 --- a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.esm.js +++ /dev/null @@ -1,652 +0,0 @@ -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} - -var download = createCommonjsModule(function (module, exports) { -//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage -// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime -// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs -// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling. -// v4 adds AMD/UMD, commonJS, and plain browser support -// v4.1 adds url download capability via solo URL argument (same domain/CORS only) -// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors -// https://github.com/rndme/download - -(function (root, factory) { - { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } -}(commonjsGlobal, function () { - - return function download(data, strFileName, strMimeType) { - - var self = window, // this script is only for browsers anyway... - defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads - mimeType = strMimeType || defaultMime, - payload = data, - url = !strFileName && !strMimeType && payload, - anchor = document.createElement("a"), - toString = function(a){return String(a);}, - myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString), - fileName = strFileName || "download", - blob, - reader; - myBlob= myBlob.call ? myBlob.bind(self) : Blob ; - - if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback - payload=[payload, mimeType]; - mimeType=payload[0]; - payload=payload[1]; - } - - - if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument - fileName = url.split("/").pop().split("?")[0]; - anchor.href = url; // assign href prop to temp anchor - if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path: - var ajax=new XMLHttpRequest(); - ajax.open( "GET", url, true); - ajax.responseType = 'blob'; - ajax.onload= function(e){ - download(e.target.response, fileName, defaultMime); - }; - setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return: - return ajax; - } // end if valid url? - } // end if url? - - - //go ahead and download dataURLs right away - if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){ - - if(payload.length > (1024*1024*1.999) && myBlob !== toString ){ - payload=dataUrlToBlob(payload); - mimeType=payload.type || defaultMime; - }else { - return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs: - navigator.msSaveBlob(dataUrlToBlob(payload), fileName) : - saver(payload) ; // everyone else can save dataURLs un-processed - } - - }else {//not data url, is it a string with special needs? - if(/([\x80-\xff])/.test(payload)){ - var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length; - for(i;i null, - }, - // this prop is used to fix the problem with other components that use the - // variable fields, like vee-validate. exportFields works exactly like fields - exportFields: { - type: Object, - default: () => null, - }, - // Use as fallback when the row has no field values - defaultValue: { - type: String, - required: false, - default: "", - }, - // Title(s) for the data, could be a string or an array of strings (multiple titles) - header: { - default: null, - }, - // Footer(s) for the data, could be a string or an array of strings (multiple footers) - footer: { - default: null, - }, - // filename to export - name: { - type: String, - default: "data.xls", - }, - fetch: { - type: Function, - }, - meta: { - type: Array, - default: () => [], - }, - worksheet: { - type: String, - default: "Sheet1", - }, - //event before generate was called - beforeGenerate: { - type: Function, - }, - //event before download pops up - beforeFinish: { - type: Function, - }, - // Determine if CSV Data should be escaped - escapeCsv: { - type: Boolean, - default: true, - }, - // long number stringify - stringifyLongNum: { - type: Boolean, - default: false, - }, - }, - computed: { - // unique identifier - idName() { - var now = new Date().getTime(); - return "export_" + now; - }, - - downloadFields() { - if (this.fields) return this.fields; - - if (this.exportFields) return this.exportFields; - }, - }, - methods: { - async generate() { - if (typeof this.beforeGenerate === "function") { - await this.beforeGenerate(); - } - let data = this.data; - if (typeof this.fetch === "function" || !data) data = await this.fetch(); - - if (!data || !data.length) { - return; - } - - let json = this.getProcessedJson(data, this.downloadFields); - if (this.type === "html") { - // this is mainly for testing - return this.export( - this.jsonToXLS(json), - this.name.replace(".xls", ".html"), - "text/html" - ); - } else if (this.type === "csv") { - return this.export( - this.jsonToCSV(json), - this.name.replace(".xls", ".csv"), - "application/csv" - ); - } - return this.export( - this.jsonToXLS(json), - this.name, - "application/vnd.ms-excel" - ); - }, - /* - Use downloadjs to generate the download link - */ - export: async function (data, filename, mime) { - let blob = this.base64ToBlob(data, mime); - if (typeof this.beforeFinish === "function") await this.beforeFinish(); - download(blob, filename, mime); - }, - /* - jsonToXLS - --------------- - Transform json data into an xml document with MS Excel format, sadly - it shows a prompt when it opens, that is a default behavior for - Microsoft office and cannot be avoided. It's recommended to use CSV format instead. - */ - jsonToXLS(data) { - let xlsTemp = - ' ${table}
      '; - let xlsData = ""; - const colspan = Object.keys(data[0]).length; - let _self = this; - - //Header - const header = this.header || this.$attrs.title; - if (header) { - xlsData += this.parseExtraData( - header, - '${data}' - ); - } - - //Fields - xlsData += ""; - for (let key in data[0]) { - xlsData += "" + key + ""; - } - xlsData += ""; - xlsData += ""; - - //Data - xlsData += ""; - data.map(function (item, index) { - xlsData += ""; - for (let key in item) { - xlsData += - "" + - _self.preprocessLongNum( - _self.valueReformattedForMultilines(item[key]) - ) + - ""; - } - xlsData += ""; - }); - xlsData += ""; - - //Footer - if (this.footer != null) { - xlsData += ""; - xlsData += this.parseExtraData( - this.footer, - '${data}' - ); - xlsData += ""; - } - - return xlsTemp - .replace("${table}", xlsData) - .replace("${worksheet}", this.worksheet); - }, - /* - jsonToCSV - --------------- - Transform json data into an CSV file. - */ - jsonToCSV(data) { - let _self = this; - var csvData = []; - - //Header - const header = this.header || this.$attrs.title; - if (header) { - csvData.push(this.parseExtraData(header, "${data}\r\n")); - } - - //Fields - for (let key in data[0]) { - csvData.push(key); - csvData.push(","); - } - csvData.pop(); - csvData.push("\r\n"); - //Data - data.map(function (item) { - for (let key in item) { - let escapedCSV = item[key] + ""; - // Escaped CSV data to string to avoid problems with numbers or other types of values - // this is controlled by the prop escapeCsv - if (_self.escapeCsv) { - escapedCSV = '="' + escapedCSV + '"'; // cast Numbers to string - if (escapedCSV.match(/[,"\n]/)) { - escapedCSV = '"' + escapedCSV.replace(/\"/g, '""') + '"'; - } - } - csvData.push(escapedCSV); - csvData.push(","); - } - csvData.pop(); - csvData.push("\r\n"); - }); - //Footer - if (this.footer != null) { - csvData.push(this.parseExtraData(this.footer, "${data}\r\n")); - } - return csvData.join(""); - }, - /* - getProcessedJson - --------------- - Get only the data to export, if no fields are set return all the data - */ - getProcessedJson(data, header) { - let keys = this.getKeys(data, header); - let newData = []; - let _self = this; - data.map(function (item, index) { - let newItem = {}; - for (let label in keys) { - let property = keys[label]; - newItem[label] = _self.getValue(property, item); - } - newData.push(newItem); - }); - - return newData; - }, - getKeys(data, header) { - if (header) { - return header; - } - - let keys = {}; - for (let key in data[0]) { - keys[key] = key; - } - return keys; - }, - /* - parseExtraData - --------------- - Parse title and footer attribute to the csv format - */ - parseExtraData(extraData, format) { - let parseData = ""; - if (Array.isArray(extraData)) { - for (var i = 0; i < extraData.length; i++) { - if (extraData[i]) - parseData += format.replace("${data}", extraData[i]); - } - } else { - parseData += format.replace("${data}", extraData); - } - return parseData; - }, - - getValue(key, item) { - const field = typeof key !== "object" ? key : key.field; - let indexes = typeof field !== "string" ? [] : field.split("."); - let value = this.defaultValue; - - if (!field) value = item; - else if (indexes.length > 1) - value = this.getValueFromNestedItem(item, indexes); - else value = this.parseValue(item[field]); - - if (key.hasOwnProperty("callback")) - value = this.getValueFromCallback(value, key.callback); - - return value; - }, - - /* - convert values with newline \n characters into
      - */ - valueReformattedForMultilines(value) { - if (typeof value == "string") return value.replace(/\n/gi, "
      "); - else return value; - }, - preprocessLongNum(value) { - if (this.stringifyLongNum) { - if (String(value).startsWith("0x")) { - return value; - } - if (!isNaN(value) && value != "") { - if (value > 99999999999 || value < 0.0000000000001) { - return '="' + value + '"'; - } - } - } - return value; - }, - getValueFromNestedItem(item, indexes) { - let nestedItem = item; - for (let index of indexes) { - if (nestedItem) nestedItem = nestedItem[index]; - } - return this.parseValue(nestedItem); - }, - - getValueFromCallback(item, callback) { - if (typeof callback !== "function") return this.defaultValue; - const value = callback(item); - return this.parseValue(value); - }, - parseValue(value) { - return value || value === 0 || typeof value === "boolean" - ? value - : this.defaultValue; - }, - base64ToBlob(data, mime) { - let base64 = window.btoa(window.unescape(encodeURIComponent(data))); - let bstr = atob(base64); - let n = bstr.length; - let u8arr = new Uint8ClampedArray(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); - }, - }, // end methods -}; - -function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier -/* server only */ -, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { - if (typeof shadowMode !== 'boolean') { - createInjectorSSR = createInjector; - createInjector = shadowMode; - shadowMode = false; - } // Vue.extend constructor export interop. - - - var options = typeof script === 'function' ? script.options : script; // render functions - - if (template && template.render) { - options.render = template.render; - options.staticRenderFns = template.staticRenderFns; - options._compiled = true; // functional template - - if (isFunctionalTemplate) { - options.functional = true; - } - } // scopedId - - - if (scopeId) { - options._scopeId = scopeId; - } - - var hook; - - if (moduleIdentifier) { - // server build - hook = function hook(context) { - // 2.3 injection - context = context || // cached call - this.$vnode && this.$vnode.ssrContext || // stateful - this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional - // 2.2 with runInNewContext: true - - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } // inject component styles - - - if (style) { - style.call(this, createInjectorSSR(context)); - } // register component module identifier for async chunk inference - - - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; // used by ssr in case component is cached and beforeCreate - // never gets called - - - options._ssrRegister = hook; - } else if (style) { - hook = shadowMode ? function () { - style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); - } : function (context) { - style.call(this, createInjector(context)); - }; - } - - if (hook) { - if (options.functional) { - // register for functional component in vue file - var originalRender = options.render; - - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; - } - } - - return script; -} - -var normalizeComponent_1 = normalizeComponent; - -/* script */ -const __vue_script__ = script; - -/* template */ -var __vue_render__ = function() { - var _vm = this; - var _h = _vm.$createElement; - var _c = _vm._self._c || _h; - return _c( - "div", - { attrs: { id: _vm.idName }, on: { click: _vm.generate } }, - [_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])], - 2 - ) -}; -var __vue_staticRenderFns__ = []; -__vue_render__._withStripped = true; - - /* style */ - const __vue_inject_styles__ = undefined; - /* scoped */ - const __vue_scope_id__ = undefined; - /* module identifier */ - const __vue_module_identifier__ = undefined; - /* functional template */ - const __vue_is_functional_template__ = false; - /* style inject */ - - /* style inject SSR */ - - - - var JsonExcel = normalizeComponent_1( - { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, - __vue_inject_styles__, - __vue_script__, - __vue_scope_id__, - __vue_is_functional_template__, - __vue_module_identifier__, - undefined, - undefined - ); - -export default JsonExcel; diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.umd.js b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.umd.js deleted file mode 100755 index bd2c0dc0..00000000 --- a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/dist/vue-json-excel.umd.js +++ /dev/null @@ -1,660 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.JsonExcel = factory()); -}(this, (function () { 'use strict'; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var download = createCommonjsModule(function (module, exports) { - //download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage - // v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime - // v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs - // v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling. - // v4 adds AMD/UMD, commonJS, and plain browser support - // v4.1 adds url download capability via solo URL argument (same domain/CORS only) - // v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors - // https://github.com/rndme/download - - (function (root, factory) { - { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } - }(commonjsGlobal, function () { - - return function download(data, strFileName, strMimeType) { - - var self = window, // this script is only for browsers anyway... - defaultMime = "application/octet-stream", // this default mime also triggers iframe downloads - mimeType = strMimeType || defaultMime, - payload = data, - url = !strFileName && !strMimeType && payload, - anchor = document.createElement("a"), - toString = function(a){return String(a);}, - myBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString), - fileName = strFileName || "download", - blob, - reader; - myBlob= myBlob.call ? myBlob.bind(self) : Blob ; - - if(String(this)==="true"){ //reverse arguments, allowing download.bind(true, "text/xml", "export.xml") to act as a callback - payload=[payload, mimeType]; - mimeType=payload[0]; - payload=payload[1]; - } - - - if(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument - fileName = url.split("/").pop().split("?")[0]; - anchor.href = url; // assign href prop to temp anchor - if(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path: - var ajax=new XMLHttpRequest(); - ajax.open( "GET", url, true); - ajax.responseType = 'blob'; - ajax.onload= function(e){ - download(e.target.response, fileName, defaultMime); - }; - setTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return: - return ajax; - } // end if valid url? - } // end if url? - - - //go ahead and download dataURLs right away - if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(payload)){ - - if(payload.length > (1024*1024*1.999) && myBlob !== toString ){ - payload=dataUrlToBlob(payload); - mimeType=payload.type || defaultMime; - }else { - return navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs: - navigator.msSaveBlob(dataUrlToBlob(payload), fileName) : - saver(payload) ; // everyone else can save dataURLs un-processed - } - - }else {//not data url, is it a string with special needs? - if(/([\x80-\xff])/.test(payload)){ - var i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length; - for(i;i null, - }, - // this prop is used to fix the problem with other components that use the - // variable fields, like vee-validate. exportFields works exactly like fields - exportFields: { - type: Object, - default: () => null, - }, - // Use as fallback when the row has no field values - defaultValue: { - type: String, - required: false, - default: "", - }, - // Title(s) for the data, could be a string or an array of strings (multiple titles) - header: { - default: null, - }, - // Footer(s) for the data, could be a string or an array of strings (multiple footers) - footer: { - default: null, - }, - // filename to export - name: { - type: String, - default: "data.xls", - }, - fetch: { - type: Function, - }, - meta: { - type: Array, - default: () => [], - }, - worksheet: { - type: String, - default: "Sheet1", - }, - //event before generate was called - beforeGenerate: { - type: Function, - }, - //event before download pops up - beforeFinish: { - type: Function, - }, - // Determine if CSV Data should be escaped - escapeCsv: { - type: Boolean, - default: true, - }, - // long number stringify - stringifyLongNum: { - type: Boolean, - default: false, - }, - }, - computed: { - // unique identifier - idName() { - var now = new Date().getTime(); - return "export_" + now; - }, - - downloadFields() { - if (this.fields) return this.fields; - - if (this.exportFields) return this.exportFields; - }, - }, - methods: { - async generate() { - if (typeof this.beforeGenerate === "function") { - await this.beforeGenerate(); - } - let data = this.data; - if (typeof this.fetch === "function" || !data) data = await this.fetch(); - - if (!data || !data.length) { - return; - } - - let json = this.getProcessedJson(data, this.downloadFields); - if (this.type === "html") { - // this is mainly for testing - return this.export( - this.jsonToXLS(json), - this.name.replace(".xls", ".html"), - "text/html" - ); - } else if (this.type === "csv") { - return this.export( - this.jsonToCSV(json), - this.name.replace(".xls", ".csv"), - "application/csv" - ); - } - return this.export( - this.jsonToXLS(json), - this.name, - "application/vnd.ms-excel" - ); - }, - /* - Use downloadjs to generate the download link - */ - export: async function (data, filename, mime) { - let blob = this.base64ToBlob(data, mime); - if (typeof this.beforeFinish === "function") await this.beforeFinish(); - download(blob, filename, mime); - }, - /* - jsonToXLS - --------------- - Transform json data into an xml document with MS Excel format, sadly - it shows a prompt when it opens, that is a default behavior for - Microsoft office and cannot be avoided. It's recommended to use CSV format instead. - */ - jsonToXLS(data) { - let xlsTemp = - ' ${table}
      '; - let xlsData = ""; - const colspan = Object.keys(data[0]).length; - let _self = this; - - //Header - const header = this.header || this.$attrs.title; - if (header) { - xlsData += this.parseExtraData( - header, - '${data}' - ); - } - - //Fields - xlsData += ""; - for (let key in data[0]) { - xlsData += "" + key + ""; - } - xlsData += ""; - xlsData += ""; - - //Data - xlsData += ""; - data.map(function (item, index) { - xlsData += ""; - for (let key in item) { - xlsData += - "" + - _self.preprocessLongNum( - _self.valueReformattedForMultilines(item[key]) - ) + - ""; - } - xlsData += ""; - }); - xlsData += ""; - - //Footer - if (this.footer != null) { - xlsData += ""; - xlsData += this.parseExtraData( - this.footer, - '${data}' - ); - xlsData += ""; - } - - return xlsTemp - .replace("${table}", xlsData) - .replace("${worksheet}", this.worksheet); - }, - /* - jsonToCSV - --------------- - Transform json data into an CSV file. - */ - jsonToCSV(data) { - let _self = this; - var csvData = []; - - //Header - const header = this.header || this.$attrs.title; - if (header) { - csvData.push(this.parseExtraData(header, "${data}\r\n")); - } - - //Fields - for (let key in data[0]) { - csvData.push(key); - csvData.push(","); - } - csvData.pop(); - csvData.push("\r\n"); - //Data - data.map(function (item) { - for (let key in item) { - let escapedCSV = item[key] + ""; - // Escaped CSV data to string to avoid problems with numbers or other types of values - // this is controlled by the prop escapeCsv - if (_self.escapeCsv) { - escapedCSV = '="' + escapedCSV + '"'; // cast Numbers to string - if (escapedCSV.match(/[,"\n]/)) { - escapedCSV = '"' + escapedCSV.replace(/\"/g, '""') + '"'; - } - } - csvData.push(escapedCSV); - csvData.push(","); - } - csvData.pop(); - csvData.push("\r\n"); - }); - //Footer - if (this.footer != null) { - csvData.push(this.parseExtraData(this.footer, "${data}\r\n")); - } - return csvData.join(""); - }, - /* - getProcessedJson - --------------- - Get only the data to export, if no fields are set return all the data - */ - getProcessedJson(data, header) { - let keys = this.getKeys(data, header); - let newData = []; - let _self = this; - data.map(function (item, index) { - let newItem = {}; - for (let label in keys) { - let property = keys[label]; - newItem[label] = _self.getValue(property, item); - } - newData.push(newItem); - }); - - return newData; - }, - getKeys(data, header) { - if (header) { - return header; - } - - let keys = {}; - for (let key in data[0]) { - keys[key] = key; - } - return keys; - }, - /* - parseExtraData - --------------- - Parse title and footer attribute to the csv format - */ - parseExtraData(extraData, format) { - let parseData = ""; - if (Array.isArray(extraData)) { - for (var i = 0; i < extraData.length; i++) { - if (extraData[i]) - parseData += format.replace("${data}", extraData[i]); - } - } else { - parseData += format.replace("${data}", extraData); - } - return parseData; - }, - - getValue(key, item) { - const field = typeof key !== "object" ? key : key.field; - let indexes = typeof field !== "string" ? [] : field.split("."); - let value = this.defaultValue; - - if (!field) value = item; - else if (indexes.length > 1) - value = this.getValueFromNestedItem(item, indexes); - else value = this.parseValue(item[field]); - - if (key.hasOwnProperty("callback")) - value = this.getValueFromCallback(value, key.callback); - - return value; - }, - - /* - convert values with newline \n characters into
      - */ - valueReformattedForMultilines(value) { - if (typeof value == "string") return value.replace(/\n/gi, "
      "); - else return value; - }, - preprocessLongNum(value) { - if (this.stringifyLongNum) { - if (String(value).startsWith("0x")) { - return value; - } - if (!isNaN(value) && value != "") { - if (value > 99999999999 || value < 0.0000000000001) { - return '="' + value + '"'; - } - } - } - return value; - }, - getValueFromNestedItem(item, indexes) { - let nestedItem = item; - for (let index of indexes) { - if (nestedItem) nestedItem = nestedItem[index]; - } - return this.parseValue(nestedItem); - }, - - getValueFromCallback(item, callback) { - if (typeof callback !== "function") return this.defaultValue; - const value = callback(item); - return this.parseValue(value); - }, - parseValue(value) { - return value || value === 0 || typeof value === "boolean" - ? value - : this.defaultValue; - }, - base64ToBlob(data, mime) { - let base64 = window.btoa(window.unescape(encodeURIComponent(data))); - let bstr = atob(base64); - let n = bstr.length; - let u8arr = new Uint8ClampedArray(n); - while (n--) { - u8arr[n] = bstr.charCodeAt(n); - } - return new Blob([u8arr], { type: mime }); - }, - }, // end methods - }; - - function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier - /* server only */ - , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { - if (typeof shadowMode !== 'boolean') { - createInjectorSSR = createInjector; - createInjector = shadowMode; - shadowMode = false; - } // Vue.extend constructor export interop. - - - var options = typeof script === 'function' ? script.options : script; // render functions - - if (template && template.render) { - options.render = template.render; - options.staticRenderFns = template.staticRenderFns; - options._compiled = true; // functional template - - if (isFunctionalTemplate) { - options.functional = true; - } - } // scopedId - - - if (scopeId) { - options._scopeId = scopeId; - } - - var hook; - - if (moduleIdentifier) { - // server build - hook = function hook(context) { - // 2.3 injection - context = context || // cached call - this.$vnode && this.$vnode.ssrContext || // stateful - this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional - // 2.2 with runInNewContext: true - - if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { - context = __VUE_SSR_CONTEXT__; - } // inject component styles - - - if (style) { - style.call(this, createInjectorSSR(context)); - } // register component module identifier for async chunk inference - - - if (context && context._registeredComponents) { - context._registeredComponents.add(moduleIdentifier); - } - }; // used by ssr in case component is cached and beforeCreate - // never gets called - - - options._ssrRegister = hook; - } else if (style) { - hook = shadowMode ? function () { - style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); - } : function (context) { - style.call(this, createInjector(context)); - }; - } - - if (hook) { - if (options.functional) { - // register for functional component in vue file - var originalRender = options.render; - - options.render = function renderWithStyleInjection(h, context) { - hook.call(context); - return originalRender(h, context); - }; - } else { - // inject component registration as beforeCreate hook - var existing = options.beforeCreate; - options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; - } - } - - return script; - } - - var normalizeComponent_1 = normalizeComponent; - - /* script */ - const __vue_script__ = script; - - /* template */ - var __vue_render__ = function() { - var _vm = this; - var _h = _vm.$createElement; - var _c = _vm._self._c || _h; - return _c( - "div", - { attrs: { id: _vm.idName }, on: { click: _vm.generate } }, - [_vm._t("default", [_vm._v(" Download " + _vm._s(_vm.name) + " ")])], - 2 - ) - }; - var __vue_staticRenderFns__ = []; - __vue_render__._withStripped = true; - - /* style */ - const __vue_inject_styles__ = undefined; - /* scoped */ - const __vue_scope_id__ = undefined; - /* module identifier */ - const __vue_module_identifier__ = undefined; - /* functional template */ - const __vue_is_functional_template__ = false; - /* style inject */ - - /* style inject SSR */ - - - - var JsonExcel = normalizeComponent_1( - { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, - __vue_inject_styles__, - __vue_script__, - __vue_scope_id__, - __vue_is_functional_template__, - __vue_module_identifier__, - undefined, - undefined - ); - - return JsonExcel; - -}))); diff --git a/node_modules/_vue-json-excel@0.3.0@vue-json-excel/example-multi-line.png b/node_modules/_vue-json-excel@0.3.0@vue-json-excel/example-multi-line.png deleted file mode 100755 index b6993ebf26d2733163ce2f2d0bd524b595e4ec99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12028 zcmeHtgFWmFY&hDH!eZDjEIr~iH>sKIRLOMbK06?swte^n^V1fVu3?_UmG^h4R z)(QZ?0=#~ysfa!V00aO4aR2}U06+l(Fo3u?Ks*Tm$pt{604VZ4MEpKP<37aozH7{V zST3up99mic01*&CZ!iG}ddn4nb)ogqYT^Lst@bS?i9?~{P^7qPjCfL#coI@PX-@oO zqueb)<>X*;&|EoK7uqERAOHbCAOa8wBo~sq2E7eJ9PJow2r8b07KO?|p>i-NL>vmy zfI?hvt=_V7p|CD!QW7*b7mC&@8HXZ~P~;pGiE?#y^+nUiT;Gy$->z|(008zc&^xa% zIT#EAfI)L%Faa103cIBk7_1AHy9Vp(f_0(ysF;|TBym8}T@Fc5z-{!dgaVLIaU>Lq{HSpo9h%0+ zk#k8%6cUL-H8wVO!34Tsa<^{Lw3geow$_D0Z>WKRf$U z^wv3=P{=tHdXHMmg{TL2{iD?6G`c*~b}bn2nygi&hxt`Rixam~7|Pm0!-S*UvLd zYIjLW3f(+P+y(rEO~;r0#qRwb?ufhowJ}1wxRIP`Xovdxk%E~(AJg1{-DDzawj`m; z+kd#-)MT%#V7Rjn*bIl07(HWl26E}ZJJ({9l)AHpxMBj`{!ah+@dN6Z{O1^S4$8oD zzCy$z$>MOYZ^|{emD<7ni|ws%O-?sb6>tdOQ1^pg43s|g-fq^Cc^h!x{{}Gq^w(k! z{tDuYL@edle8s`ZeDfg0CdqzlATuENI)eQH1ICu6B!|hwWV2~=vsO$^jgq1RFK$R{ zPs3^Mo3HAb<5v1T@3sBRbt( zG9*th&zsJdjnJCPdoPC44ro1Hk{ZD)FJLayN-2@Ke{ZXwE(F|DT#{MeR<&`JOIP-} z@(Ba=pV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RIC2)S=D%Hy{o(7v<&(1?%I%?4=mB2DC4}#=0Hj$JFwB$ gQQPh=XcRN@a5XD5^2P`KVk - +
      @@ -181,7 +181,7 @@ export default { this.liveGoodsData.forEach((item, index) => { val.forEach((callback) => { if (item.id == callback.id) { - this.$set(this.liveGoodsData[index], "__selected", true); + this.$set(this.liveGoodsData[index], "___selected", true); // this.selectedGoods.push(item); } }); @@ -208,15 +208,15 @@ export default { * 回调参数补充 */ selectedLiveGoods(val, index) { - if (!val.__selected) { - val.__selected = true; - this.$set(this.liveGoodsData[index], "__selected", true); + if (!val.___selected) { + val.___selected = true; + this.$set(this.liveGoodsData[index], "___selected", true); this.selectedGoods.push(this.liveGoodsData[index]); } else { this.$nextTick(() => { - val.__selected = false; + val.___selected = false; - this.$set(this.liveGoodsData[index], "__selected", true); + this.$set(this.liveGoodsData[index], "___selected", true); this.selectedGoods.splice(index, 1); }); } diff --git a/seller/src/views/statistics/traffic.vue b/seller/src/views/statistics/traffic.vue index 236e381e..131f30f0 100644 --- a/seller/src/views/statistics/traffic.vue +++ b/seller/src/views/statistics/traffic.vue @@ -64,8 +64,8 @@ export default { return { // 时间 - uvs: "", // 访客数 - pvs: "", // 浏览量 + uvs: 0, // 访客数 + pvs: 0, // 浏览量 dateList: [ // 日期选择列表 @@ -198,8 +198,8 @@ export default { if (res.result) { this.data = res.result; res.result.forEach((item) => { - this.uvs += item.uvNum; - this.pvs += item.pvNum; + this.uvs += parseInt(item.uvNum); + this.pvs += parseInt(item.pvNum); }); if (!this.orderChart) { From c9ea7ba8986766042663e0d1d20f598ef0773ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Thu, 10 Jun 2021 18:31:54 +0800 Subject: [PATCH 12/22] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E7=9A=84bug=EF=BC=8C=E6=9A=82=E6=9C=AA?= =?UTF-8?q?=E5=AE=8C=E5=85=A8=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/plugins/request.js | 281 +++--- .../lili-floor-renovation/wap/navbar.vue | 32 +- .../wap/template/tpl.scss | 4 +- .../wap/template/tpl_flex_five.vue | 19 +- .../wap/template/tpl_flex_four.vue | 11 +- .../wap/template/tpl_flex_three.vue | 6 +- .../wap/template/tpl_left_one_right_two.vue | 4 +- .../wap/template/tpl_left_two_right_one.vue | 14 +- manager/src/views/login.vue | 50 +- manager/src/views/main-components/header.vue | 5 +- .../src/views/my-components/lili/editor.vue | 63 +- .../views/page/article-manage/articleList.vue | 30 +- .../src/views/sys/app-version/appVersion.vue | 1 + seller/src/api/order.js | 17 +- seller/src/assets/download.png | Bin 0 -> 2620 bytes seller/src/assets/goodsType1.png | Bin 0 -> 2900 bytes seller/src/assets/goodsType2.png | Bin 0 -> 754 bytes seller/src/assets/goodsTypeTpl.png | Bin 0 -> 3697 bytes seller/src/assets/logo.png | Bin 239866 -> 398960 bytes seller/src/assets/success.png | Bin 0 -> 4471 bytes seller/src/assets/upload.png | Bin 0 -> 2506 bytes seller/src/config/index.js | 8 +- seller/src/router/router.js | 7 + .../views/goods/goods-seller/addGoods.scss | 125 ++- .../goods/goods-seller/goodsOperation.vue | 809 +++++++----------- seller/src/views/login.vue | 138 ++- seller/src/views/main-components/header.vue | 6 +- .../views/order/order/exportOrderDeliver.vue | 122 +++ seller/src/views/order/order/orderDetail.vue | 2 +- seller/src/views/order/order/orderList.vue | 520 +++++------ 30 files changed, 1143 insertions(+), 1131 deletions(-) create mode 100644 seller/src/assets/download.png create mode 100644 seller/src/assets/goodsType1.png create mode 100644 seller/src/assets/goodsType2.png create mode 100644 seller/src/assets/goodsTypeTpl.png create mode 100644 seller/src/assets/success.png create mode 100644 seller/src/assets/upload.png create mode 100644 seller/src/views/order/order/exportOrderDeliver.vue diff --git a/buyer/src/plugins/request.js b/buyer/src/plugins/request.js index c2c2b108..d650d2a7 100644 --- a/buyer/src/plugins/request.js +++ b/buyer/src/plugins/request.js @@ -1,77 +1,133 @@ // import Vue from 'vue'; -import axios from 'axios'; -import https from 'https'; -import { - Message, - Spin, - Modal -} from 'view-design'; -import Storage from './storage'; -import config from '@/config'; -import router from '../router/index.js'; -import store from '../vuex/store'; -import { - handleRefreshToken -} from '@/api/index'; -const qs = require('qs'); - -export const buyerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.buyer : config.api_prod.buyer); -export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common); -export const managerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.manager : config.api_prod.manager); -export const sellerUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.seller : config.api_prod.seller); +import axios from "axios"; +import https from "https"; +import { Message, Spin, Modal } from "view-design"; +import Storage from "./storage"; +import config from "@/config"; +import router from "../router/index.js"; +import store from "../vuex/store"; +import { handleRefreshToken } from "@/api/index"; +const qs = require("qs"); +export const buyerUrl = + process.env.NODE_ENV === "development" + ? config.api_dev.buyer + : config.api_prod.buyer; +export const commonUrl = + process.env.NODE_ENV === "development" + ? config.api_dev.common + : config.api_prod.common; +export const managerUrl = + process.env.NODE_ENV === "development" + ? config.api_dev.manager + : config.api_prod.manager; +export const sellerUrl = + process.env.NODE_ENV === "development" + ? config.api_dev.seller + : config.api_prod.seller; // 创建axios实例 var isRefreshToken = 0; -const refreshToken = getTokenDebounce() +const refreshToken = getTokenDebounce(); const service = axios.create({ timeout: 10000, // 请求超时时间 baseURL: buyerUrl, // API httpsAgent: new https.Agent({ rejectUnauthorized: false }), - paramsSerializer: params => qs.stringify(params, { - arrayFormat: 'repeat' - }) + paramsSerializer: params => + qs.stringify(params, { + arrayFormat: "repeat" + }) }); // request拦截器 -service.interceptors.request.use(config => { - const { - loading - } = config; - // 如果是put/post请求,用qs.stringify序列化参数 - const isPutPost = config.method === 'put' || config.method === 'post'; - const isJson = config.headers['Content-Type'] === 'application/json'; - const isFile = config.headers['Content-Type'] === 'multipart/form-data'; - if (isPutPost && isJson) { - config.data = JSON.stringify(config.data); +service.interceptors.request.use( + config => { + const { loading } = config; + // 如果是put/post请求,用qs.stringify序列化参数 + const isPutPost = config.method === "put" || config.method === "post"; + const isJson = config.headers["Content-Type"] === "application/json"; + const isFile = config.headers["Content-Type"] === "multipart/form-data"; + if (isPutPost && isJson) { + config.data = JSON.stringify(config.data); + } + if (isPutPost && !isFile && !isJson) { + config.data = qs.stringify(config.data, { + arrayFormat: "repeat" + }); + } + /** 配置全屏加载 */ + if (process.client && loading !== false) { + config.loading = Spin.show(); + } + + const uuid = Storage.getItem("uuid"); + config.headers["uuid"] = uuid; + + // 获取访问Token + let accessToken = Storage.getItem("accessToken"); + if (accessToken && config.needToken) { + config.headers["accessToken"] = accessToken; + // 解析当前token时间 + let jwtData = JSON.parse( + decodeURIComponent(escape(window.atob(accessToken.split(".")[1]))) + ); + if (jwtData.exp < new Date().getTime() / 1000) { + refresh() + } + } + + return config; + }, + error => { + Promise.reject(error); } - if (isPutPost && !isFile && !isJson) { - config.data = qs.stringify(config.data, { - arrayFormat: 'repeat' +); + +async function refresh() { + const getTokenRes = await refreshToken(); + if (getTokenRes === "success") { + // 刷新token + if (isRefreshToken === 1) { + error.response.config.headers.accessToken = Storage.getItem( + "accessToken" + ); + return service(error.response.config); + } else { + router.go(0); + } + } else { + Storage.removeItem("accessToken"); + Storage.removeItem("refreshToken"); + Storage.removeItem("userInfo"); + Storage.setItem("cartNum", 0); + store.commit("SET_CARTNUM", 0); + console.log("1111"); + Modal.confirm({ + title: "请登录", + content: "

      请登录后执行此操作

      ", + okText: "立即登录", + cancelText: "继续浏览", + onOk: () => { + router.push({ + path: "/login", + query: { + rePath: router.history.current.path, + query: JSON.stringify(router.history.current.query) + } + }); + }, + onCancel: () => { + Modal.remove(); + } }); } - /** 配置全屏加载 */ - if (process.client && loading !== false) { - config.loading = Spin.show(); - } - - const uuid = Storage.getItem('uuid'); - config.headers['uuid'] = uuid; - - // 获取访问Token - let accessToken = Storage.getItem('accessToken'); - if (accessToken && config.needToken) { - config.headers['accessToken'] = accessToken; - } - return config; -}, error => { - Promise.reject(error); -}); +} // respone拦截器 service.interceptors.response.use( async response => { await closeLoading(response); + return response.data; }, async error => { @@ -84,45 +140,15 @@ service.interceptors.response.use( isRefreshToken++; if (isRefreshToken === 1) { - const getTokenRes = await refreshToken(); - if (getTokenRes === 'success') { // 刷新token - if (isRefreshToken === 1) { - error.response.config.headers.accessToken = Storage.getItem('accessToken') - return service(error.response.config) - } else { - router.go(0) - } - } else { - Storage.removeItem('accessToken'); - Storage.removeItem('refreshToken'); - Storage.removeItem('userInfo'); - Storage.setItem('cartNum', 0) - store.commit('SET_CARTNUM', 0) - console.log('1111'); - Modal.confirm({ - title: '请登录', - content: '

      请登录后执行此操作

      ', - okText: '立即登录', - cancelText: '继续浏览', - onOk: () => { - router.push({ - path: '/login', - query: { - rePath: router.history.current.path, - query: JSON.stringify(router.history.current.query) - } - }); - }, - onCancel: () => { - Modal.remove(); - } - }); - } - isRefreshToken = 0 + refresh() + isRefreshToken = 0; } } else { if (error.message) { - let _message = error.code === 'ECONNABORTED' ? '连接超时,请稍候再试!' : '网络错误,请稍后再试!'; + let _message = + error.code === "ECONNABORTED" + ? "连接超时,请稍候再试!" + : "网络错误,请稍后再试!"; Message.error(errorData.message || _message); } } @@ -134,7 +160,7 @@ service.interceptors.response.use( * 关闭全局加载 * @param target */ -const closeLoading = (target) => { +const closeLoading = target => { if (!target.config || !target.config.loading) return true; return new Promise((resolve, reject) => { setTimeout(() => { @@ -145,13 +171,13 @@ const closeLoading = (target) => { }; export const Method = { - GET: 'get', - POST: 'post', - PUT: 'put', - DELETE: 'delete' + GET: "get", + POST: "post", + PUT: "put", + DELETE: "delete" }; -export default function request (options) { +export default function request(options) { // 如果是服务端或者是请求的刷新token,不需要检查token直接请求。 // if (process.server || options.url.indexOf('passport/token') !== -1) { return service(options); @@ -160,47 +186,46 @@ export default function request (options) { } // 防抖闭包来一波 -function getTokenDebounce () { - let lock = false - let success = false - return function () { +function getTokenDebounce() { + let lock = false; + let success = false; + return function() { if (!lock) { - lock = true - let oldRefreshToken = Storage.getItem('refreshToken'); - handleRefreshToken(oldRefreshToken).then(res => { - if (res.success) { - let { - accessToken, - refreshToken - } = res.result; - Storage.setItem('accessToken', accessToken); - Storage.setItem('refreshToken', refreshToken); + lock = true; + let oldRefreshToken = Storage.getItem("refreshToken"); + handleRefreshToken(oldRefreshToken) + .then(res => { + if (res.success) { + let { accessToken, refreshToken } = res.result; + Storage.setItem("accessToken", accessToken); + Storage.setItem("refreshToken", refreshToken); - success = true - lock = false - } else { - success = false - lock = false - // router.push('/login') - } - }).catch((err) => { - console.log(err); - success = false - lock = false - }) + success = true; + lock = false; + } else { + success = false; + lock = false; + // router.push('/login') + } + }) + .catch(err => { + console.log(err); + success = false; + lock = false; + }); } return new Promise(resolve => { // 一直看lock,直到请求失败或者成功 const timer = setInterval(() => { if (!lock) { - clearInterval(timer) + clearInterval(timer); if (success) { - resolve('success') + resolve("success"); } else { - resolve('fail') + resolve("fail"); } } - }, 500) // 轮询时间间隔 - }) - } + }, 500); // 轮询时间间隔 + }); + }; } diff --git a/manager/src/views/lili-floor-renovation/wap/navbar.vue b/manager/src/views/lili-floor-renovation/wap/navbar.vue index 20be9547..ef7050c5 100644 --- a/manager/src/views/lili-floor-renovation/wap/navbar.vue +++ b/manager/src/views/lili-floor-renovation/wap/navbar.vue @@ -3,13 +3,7 @@
      店铺装修
      -
      @@ -21,17 +15,9 @@
      - + - +
      模板名称 @@ -61,7 +47,8 @@ export default { progress: true, // 展示进度 num: 20, // 提交进度 saveDialog: false, // 加载状态 - way: [ // 装修tab栏切换 + way: [ + // 装修tab栏切换 { title: "首页", name: "index", @@ -80,7 +67,8 @@ export default { }, ], qrcode: "", // 二维码 - submitWay: { // 表单信息 + submitWay: { + // 表单信息 pageShow: this.$route.query.type || false, name: this.$route.query.name || "模板名称", pageClientType: "H5", @@ -124,11 +112,13 @@ export default { // 更新 update() { - this.progress = false; + this.progress = false; API_Other.updateHome(this.$route.query.id, { pageData: JSON.stringify(this.$store.state.styleStore), name: this.submitWay.name, pageShow: this.submitWay.pageShow, + pageType: "INDEX", + pageClientType: "H5", }) .then((res) => { this.num = 50; @@ -171,7 +161,7 @@ export default { this.goback(); }, 1000); } else { - this.progress = true; + this.progress = true; this.saveDialog = false; this.$Message.error("保存失败,请稍后重试"); } diff --git a/manager/src/views/lili-floor-renovation/wap/template/tpl.scss b/manager/src/views/lili-floor-renovation/wap/template/tpl.scss index b8e63cf7..638dd1cc 100644 --- a/manager/src/views/lili-floor-renovation/wap/template/tpl.scss +++ b/manager/src/views/lili-floor-renovation/wap/template/tpl.scss @@ -1,6 +1,6 @@ .image-mode { - max-width: 100%; - height: auto; + width: 100%; + height: 100%; display: block; padding: 1px; } diff --git a/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_five.vue b/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_five.vue index 8abfba18..7b405c4a 100644 --- a/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_five.vue +++ b/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_five.vue @@ -1,11 +1,11 @@ @@ -13,21 +13,18 @@ export default { title: "五列单行图片模块", props: ["res"], - mounted() { - console.log(this.res); - } }; \ No newline at end of file + diff --git a/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_four.vue b/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_four.vue index 4ef37368..a3ac9350 100644 --- a/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_four.vue +++ b/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_four.vue @@ -12,21 +12,22 @@ export default { title: "四列单行图片模块", props: ["res"], - mounted() { - console.log(this.res); - } + }; \ No newline at end of file + diff --git a/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_three.vue b/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_three.vue index 262313ce..e0916e1b 100644 --- a/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_three.vue +++ b/manager/src/views/lili-floor-renovation/wap/template/tpl_flex_three.vue @@ -11,14 +11,12 @@ export default { title: "三列单行图片模块", props: ["res"], - mounted() { - console.log(this.res); - } }; \ No newline at end of file + diff --git a/manager/src/views/lili-floor-renovation/wap/template/tpl_left_one_right_two.vue b/manager/src/views/lili-floor-renovation/wap/template/tpl_left_one_right_two.vue index 378b07a3..fcf0936f 100644 --- a/manager/src/views/lili-floor-renovation/wap/template/tpl_left_one_right_two.vue +++ b/manager/src/views/lili-floor-renovation/wap/template/tpl_left_one_right_two.vue @@ -20,7 +20,7 @@ export default { title: "左一右二", props: ["res"], mounted() { - console.log(this.res); + } }; @@ -34,4 +34,4 @@ export default { background-size: cover; } - \ No newline at end of file + diff --git a/manager/src/views/lili-floor-renovation/wap/template/tpl_left_two_right_one.vue b/manager/src/views/lili-floor-renovation/wap/template/tpl_left_two_right_one.vue index 884c01a3..e77470cf 100644 --- a/manager/src/views/lili-floor-renovation/wap/template/tpl_left_two_right_one.vue +++ b/manager/src/views/lili-floor-renovation/wap/template/tpl_left_two_right_one.vue @@ -10,7 +10,7 @@
      - +
      @@ -21,18 +21,22 @@ export default { props: ["res"], mounted() { console.log(this.res); - } + }, }; \ No newline at end of file +.view-height-75 { + .image-mode { + height: 75px; + } +} + diff --git a/manager/src/views/login.vue b/manager/src/views/login.vue index d2ea2e2f..f428e847 100644 --- a/manager/src/views/login.vue +++ b/manager/src/views/login.vue @@ -23,12 +23,7 @@ - +
      @@ -48,7 +43,7 @@ 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'; +import verify from "@/views/my-components/verify"; export default { components: { @@ -57,18 +52,20 @@ export default { LangSwitch, Header, Footer, - verify + verify, }, data() { return { loading: false, // 加载状态 - form: { // 表单数据 + form: { + // 表单数据 username: "", password: "", mobile: "", code: "", }, - rules: { // 验证规则 + rules: { + // 验证规则 username: [ { required: true, @@ -88,7 +85,8 @@ export default { }, methods: { mounted() {}, - afterLogin(res) { // 登录成功后处理 + afterLogin(res) { + // 登录成功后处理 let accessToken = res.result.accessToken; let refreshToken = res.result.refreshToken; this.setStore("accessToken", accessToken); @@ -109,28 +107,35 @@ export default { } }); }, - submitLogin() { // 登录操作 + submitLogin() { + // 登录操作 this.$refs.usernameLoginForm.validate((valid) => { if (valid) { this.$refs.verify.show = true; } }); }, - verifyChange (con) { // 拼图验证码回显 + verifyChange(con) { + // 拼图验证码回显 if (!con.status) return; - + this.loading = true; login({ username: this.form.username, password: this.md5(this.form.password), - }).then((res) => { - if (res && res.success) { - this.afterLogin(res); - } else { + }) + .then((res) => { + if (res && res.success) { + this.afterLogin(res); + } else { + this.loading = false; + } + }) + .catch(() => { this.loading = false; - } - }).catch(()=>{this.loading = false}); - } + }); + this.$refs.verify.show = false; + }, }, }; @@ -154,7 +159,7 @@ export default { position: relative; zoom: 1; } - .verify-con{ + .verify-con { position: absolute; top: 90px; z-index: 10; @@ -198,5 +203,4 @@ export default { .flex { justify-content: center; } - diff --git a/manager/src/views/main-components/header.vue b/manager/src/views/main-components/header.vue index dcfef0bd..1eeb107b 100644 --- a/manager/src/views/main-components/header.vue +++ b/manager/src/views/main-components/header.vue @@ -2,7 +2,6 @@
      -
      @@ -15,13 +14,13 @@ export default { diff --git a/manager/src/views/my-components/lili/editor.vue b/manager/src/views/my-components/lili/editor.vue index bc7811a2..697bc9ed 100644 --- a/manager/src/views/my-components/lili/editor.vue +++ b/manager/src/views/my-components/lili/editor.vue @@ -15,20 +15,8 @@
      - - + +
      @@ -56,21 +44,21 @@ export default { props: { id: { type: String, - default: "editor" + default: "editor", }, value: String, base64: { type: Boolean, - default: false + default: false, }, showExpand: { type: Boolean, - default: true + default: true, }, openXss: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { @@ -79,16 +67,17 @@ export default { dataEdit: "", // 编辑数据 showHTMLModal: false, // 显示html full: false, // html全屏开关 - fullscreenModal: false // 显示全屏预览 + fullscreenModal: false, // 显示全屏预览 }; }, methods: { + initEditor() { let that = this; // 详见wangeditor3官网文档 https://www.kancloud.cn/wangfupeng/wangeditor3/332599 editor = new E(`#${this.id}`); // 编辑内容绑定数据 - editor.config.onchange = html => { + editor.config.onchange = (html) => { if (this.openXss) { this.data = xss(html); } else { @@ -108,30 +97,30 @@ export default { editor.config.uploadImgServer = uploadFile; // lili如要header中传入token鉴权 editor.config.uploadImgHeaders = { - accessToken: that.getStore("accessToken") + accessToken: that.getStore("accessToken"), }; editor.config.uploadFileName = "file"; editor.config.uploadImgHooks = { - before: function(xhr, editor, files) { + before: function (xhr, editor, files) { // 图片上传之前触发 }, - success: function(xhr, editor, result) { + success: function (xhr, editor, result) { // 图片上传并返回结果,图片插入成功之后触发 }, - fail: function(xhr, editor, result) { + fail: function (xhr, editor, result) { // 图片上传并返回结果,但图片插入错误时触发 that.$Message.error("上传图片失败"); }, - error: function(xhr, editor) { + error: function (xhr, editor) { // 图片上传出错时触发 that.$Message.error("上传图片出错"); }, - timeout: function(xhr, editor) { + timeout: function (xhr, editor) { // 图片上传超时时触发 that.$Message.error("上传图片超时"); }, // 如果服务器端返回的不是 {errno:0, data: [...]} 这种格式,可使用该配置 - customInsert: function(insertImg, result, editor) { + customInsert: function (insertImg, result, editor) { if (result.success == true) { let url = result.result; insertImg(url); @@ -139,10 +128,11 @@ export default { } else { that.$Message.error(result.message); } - } + }, }; } - editor.config.customAlert = function(info) { + + editor.config.customAlert = function (info) { // info 是需要提示的内容 // that.$Message.info(info); }; @@ -156,8 +146,8 @@ export default { // type -> 'emoji' / 'image' type: "image", // content -> 数组 - content: sina - } + content: sina, + }, ]; editor.create(); if (this.value) { @@ -187,7 +177,7 @@ export default { editor.txt.html(this.data); this.$emit("input", this.data); this.$emit("on-change", this.data); - } + }, }); }, setData(value) { @@ -200,22 +190,21 @@ export default { this.$emit("input", this.data); this.$emit("on-change", this.data); } - } + }, }, watch: { value(val) { this.setData(val); - } + }, }, mounted() { this.initEditor(); - } + }, }; diff --git a/seller/src/views/main-components/header.vue b/seller/src/views/main-components/header.vue index e3727242..5f3bac1a 100644 --- a/seller/src/views/main-components/header.vue +++ b/seller/src/views/main-components/header.vue @@ -1,7 +1,7 @@ @@ -14,13 +14,13 @@ export default { diff --git a/seller/src/views/order/order/exportOrderDeliver.vue b/seller/src/views/order/order/exportOrderDeliver.vue new file mode 100644 index 00000000..ab0d7c51 --- /dev/null +++ b/seller/src/views/order/order/exportOrderDeliver.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/seller/src/views/order/order/orderDetail.vue b/seller/src/views/order/order/orderDetail.vue index cfda0899..740dfa33 100644 --- a/seller/src/views/order/order/orderDetail.vue +++ b/seller/src/views/order/order/orderDetail.vue @@ -527,7 +527,7 @@ export default { orderTakeSubmit() { this.$refs.orderTakeForm.validate((valid) => { if (valid) { - API_Order.orderTake(this.sn, this.orderTakeForm).then((res) => { + API_Order.orderTake(this.sn, this.orderTakeForm.qrCode).then((res) => { if (res.success) { this.$Message.success("订单核销成功"); this.orderTakeModal = false; diff --git a/seller/src/views/order/order/orderList.vue b/seller/src/views/order/order/orderList.vue index 7b53d2c3..9451e16f 100644 --- a/seller/src/views/order/order/orderList.vue +++ b/seller/src/views/order/order/orderList.vue @@ -4,22 +4,10 @@
      - + - + - + -
      -
      +
      + + + +
      +

      核验订单号

      +
      + + +
      +
      +
      + +
      +
      - +
      From eb2b3a66a06da41c20d7d7f3234306a81fa08d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 11 Jun 2021 09:52:47 +0800 Subject: [PATCH 13/22] =?UTF-8?q?=E5=90=88=E5=B9=B6Master?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/config/index.js | 16 ++++++++-------- manager/src/views/order/order/orderList.vue | 3 --- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/manager/src/config/index.js b/manager/src/config/index.js index 8b6b162f..680fb1b1 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -17,14 +17,14 @@ export default { * @description api请求基础路径 */ api_dev: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn" - common: 'http://192.168.0.109:8890', - buyer: 'http://192.168.0.109:8888', - seller: 'http://192.168.0.109:8889', - manager: 'http://192.168.0.109:8887' + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" + // common: 'http://192.168.0.109:8890', + // buyer: 'http://192.168.0.109:8888', + // seller: 'http://192.168.0.109:8889', + // manager: 'http://192.168.0.109:8887' }, api_prod: { common: "https://common-api.pickmall.cn", diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue index 144cbb69..e3112e29 100644 --- a/manager/src/views/order/order/orderList.vue +++ b/manager/src/views/order/order/orderList.vue @@ -56,10 +56,7 @@ export default { }, data() { return { - // 表格的表头以及内容 - - fields:{ "订单编号":"sn", "下单时间":"createTime", From 0837f5d9d9f986af28c00f80730689299c0acf37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 11 Jun 2021 19:01:05 +0800 Subject: [PATCH 14/22] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/plugins/request.js | 2 +- manager/src/views/order/order/orderList.vue | 206 +++++++++++------- manager/src/views/promotion/coupon/coupon.vue | 2 - .../goods/goods-seller/goodsOperation.vue | 1 + .../views/order/order/exportOrderDeliver.vue | 16 +- seller/src/views/order/order/orderList.vue | 16 +- 6 files changed, 149 insertions(+), 94 deletions(-) diff --git a/buyer/src/plugins/request.js b/buyer/src/plugins/request.js index d650d2a7..b937df34 100644 --- a/buyer/src/plugins/request.js +++ b/buyer/src/plugins/request.js @@ -71,7 +71,7 @@ service.interceptors.request.use( let jwtData = JSON.parse( decodeURIComponent(escape(window.atob(accessToken.split(".")[1]))) ); - if (jwtData.exp < new Date().getTime() / 1000) { + if (jwtData.exp < Math.round(new Date() / 1000)) { refresh() } } diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue index e3112e29..19bb9905 100644 --- a/manager/src/views/order/order/orderList.vue +++ b/manager/src/views/order/order/orderList.vue @@ -1,47 +1,58 @@ @@ -57,49 +68,53 @@ export default { data() { return { // 表格的表头以及内容 - fields:{ - "订单编号":"sn", - "下单时间":"createTime", - "客户名称":"memberName", - "客户账号":"", - "收货人":"", - "收货人手机号":"", - "收货人地址":"", - "支付方式":{ + fields: { + 订单编号: "sn", + 下单时间: "createTime", + 客户名称: "memberName", + 客户账号: "", + 收货人: "", + 收货人手机号: "", + 收货人地址: "", + 支付方式: { field: "clientType", - callback:value=>{ + callback: (value) => { if (value == "H5") { - return "移动端" + return "移动端"; } else if (value == "PC") { - return "PC端" - } else if (value== "WECHAT_MP") { - return "小程序端" + return "PC端"; + } else if (value == "WECHAT_MP") { + return "小程序端"; } else if (value == "APP") { - return "移动应用端" + return "移动应用端"; } else { return value; } - } + }, }, - "配送方式":"", - "配送费用":"", - "订单商品金额":"", - "订单优惠金额":"", - "订单应付金额":"", - "商品SKU编号":"", - "商品数量":"groupNum", - "买家备注":"", - "订单状态":"", - "付款状态":{ - field:"payStatus", - callback:value=>{ - return value == "UNPAID" ? "未付款" : value == "PAID" ? "已付款" : "" - } + 配送方式: "", + 配送费用: "", + 订单商品金额: "", + 订单优惠金额: "", + 订单应付金额: "", + 商品SKU编号: "", + 商品数量: "groupNum", + 买家备注: "", + 订单状态: "", + 付款状态: { + field: "payStatus", + callback: (value) => { + return value == "UNPAID" + ? "未付款" + : value == "PAID" + ? "已付款" + : ""; + }, }, - "发货状态":"", - "发票类型":"", - "发票抬头":"", - "店铺":"storeName", + 发货状态: "", + 发票类型: "", + 发票抬头: "", + 店铺: "storeName", }, loading: true, // 表单加载状态 searchForm: { @@ -123,18 +138,14 @@ export default { { title: "订单号", key: "sn", - minWidth: 230, + minWidth: 240, tooltip: true, }, - { - title: "下单时间", - key: "createTime", - width: 200, - }, + { title: "订单来源", key: "clientType", - width: 95, + width: 120, render: (h, params) => { if (params.row.clientType == "H5") { return h("div", {}, "移动端"); @@ -149,15 +160,34 @@ export default { } }, }, + { + title: "订单类型", + key: "orderType", + width: 120, + render: (h, params) => { + if (params.row.orderType == "NORMAL") { + return h("div", [h("span", {}, "普通订单")]); + } else if (params.row.orderType == "PINTUAN") { + return h("div", [h("span", {}, "拼团订单")]); + } else if (params.row.orderType == "GIFT") { + return h("div", [h("span", {}, "赠品订单")]); + } else if (params.row.orderType == "VIRTUAL") { + return h("div", [h("tag", {}, "核验订单")]); + } + }, + }, { title: "买家名称", key: "memberName", - width: 130, + minWidth: 130, + tooltip: true, }, + { title: "订单金额", key: "flowPrice", - minWidth: 120, + minWidth: 100, + tooltip: true, render: (h, params) => { return h( "div", @@ -169,7 +199,7 @@ export default { { title: "订单状态", key: "orderStatus", - width: 95, + minWidth: 100, render: (h, params) => { if (params.row.orderStatus == "UNPAID") { return h("div", [h("span", {}, "未付款")]); @@ -188,12 +218,19 @@ export default { } }, }, + { + title: "下单时间", + key: "createTime", + width: 170, + sortable: true, + sortType: "desc", + }, { title: "操作", key: "action", align: "center", - width: 180, + width: 100, render: (h, params) => { return h("div", [ h( @@ -337,4 +374,11 @@ export default { diff --git a/manager/src/views/promotion/coupon/coupon.vue b/manager/src/views/promotion/coupon/coupon.vue index c49959e7..9e439e8b 100644 --- a/manager/src/views/promotion/coupon/coupon.vue +++ b/manager/src/views/promotion/coupon/coupon.vue @@ -232,9 +232,7 @@ export default { methods: { // 选中优惠券 父级传值 check(val,index) { - this.data[index].___selected = !this.data[index].___selected - this.$emit("selected", val); }, init() { diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index dfcac8cc..fc7417d4 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -381,6 +381,7 @@
      +
      diff --git a/seller/src/views/order/order/exportOrderDeliver.vue b/seller/src/views/order/order/exportOrderDeliver.vue index cac35602..2340a62b 100644 --- a/seller/src/views/order/order/exportOrderDeliver.vue +++ b/seller/src/views/order/order/exportOrderDeliver.vue @@ -17,8 +17,8 @@
      - +

      选择或拖拽文件上传

      @@ -42,12 +42,15 @@ + diff --git a/manager/src/views/lili-dialog/index.vue b/manager/src/views/lili-dialog/index.vue index 49b3b1c1..bc5a47d8 100644 --- a/manager/src/views/lili-dialog/index.vue +++ b/manager/src/views/lili-dialog/index.vue @@ -1,7 +1,7 @@ @@ -76,10 +76,7 @@ import couponTemplate from "@/views/promotion/coupon/coupon"; import userList from "@/views/member/list/index"; -import { - saveActivityCoupon, - updateCouponActivity, -} from "@/api/promotion"; +import { saveActivityCoupon, updateCouponActivity } from "@/api/promotion"; export default { name: "addCouponActivity", @@ -89,30 +86,72 @@ export default { }, data() { return { - showCouponSelect: false,//显示优惠券选择框 + showCouponSelect: false, //显示优惠券选择框 modalType: 0, // 是否编辑 - rangeTime: '',//时间区间 - checkUserList: false,//会员选择器 - selectedMember: [],//选择的会员 + rangeTime: "", //时间区间 + checkUserList: false, //会员选择器 + selectedMember: [], //选择的会员 form: { - promotionName: '', //活动名称 - activityScope: 'ALL', //活动范围 - couponActivityType: 'REGISTERED', //触发活动方式 - activityScopeInfo: '', //活动描述 - startTime: '', //开始时间 - endTime: '', //结束时间 - couponActivityItems: [] - + promotionName: "", //活动名称 + activityScope: "ALL", //活动范围 + couponActivityType: "REGISTERED", //触发活动方式 + activityScopeInfo: "", //活动描述 + startTime: "", //开始时间 + endTime: "", //结束时间 + couponActivityItems: [], }, // 表单 id: this.$route.query.id, // 优惠券活动id submitLoading: false, // 添加或编辑提交状态 - selectCouponList: [],//选择的优惠券列表 + selectCouponList: [], //选择的优惠券列表 formRule: { - promotionName: [{required: true, message: "活动名称不能为空"}], - rangeTime: [{required: true, message: "请选择活动有效期"}], - description: [{required: true, message: "请输入范围描述"}], + promotionName: [{ required: true, message: "活动名称不能为空" }], + rangeTime: [{ required: true, message: "请选择活动有效期" }], + description: [{ required: true, message: "请输入范围描述" }], }, - //优惠券表哥 + // 用户表格 + userColumns: [ + { + title: "用户名称", + key: "nickName", + minWidth: 120, + }, + { + title: "手机号", + key: "mobile", + render: (h, params) => { + return h("div", params.row.mobile || "暂未填写"); + }, + }, + { + title: "最后登录时间", + key: "lastLoginDate", + }, + { + title: "操作", + key: "action", + minWidth: 50, + align: "center", + render: (h, params) => { + return h( + "Button", + { + props: { + size: "small", + type: "error", + ghost: true, + }, + on: { + click: () => { + this.delUser(params.index); + }, + }, + }, + "删除" + ); + }, + }, + ], + //优惠券表格 columns: [ { title: "优惠券名称", @@ -175,7 +214,7 @@ export default { }, on: { click: () => { - // this.delGoods(params.index); + this.delCoupon(params.index); }, }, }, @@ -194,14 +233,32 @@ export default { } }, methods: { + // 删除选择的优惠券 + delUser(index) { + this.selectedMember.splice(index, 1); + }, + // 删除选择的优惠券 + delCoupon(index) { + this.selectCouponList.splice(index, 1); + }, // 返回已选择的用户 callbackSelectUser(val) { - let index = this.selectedMember.indexOf(val) - if (index > 0) { - this.selectedMember.remove(val); + // 每次将返回的数据回调判断 + let findUser = this.selectedMember.find((item) => { + return item.id == val.id; + }); + // 如果没有则添加 + if (!findUser) { + this.selectedMember.push(val); + } else { + // 有重复数据就删除 + this.selectedMember.map((item, index) => { + if (item.id == findUser.id) { + this.selectedMember.splice(index, 1); + } + }); } - this.selectedMember.push(val); }, // 添加指定用户 @@ -218,17 +275,16 @@ export default { /** * 返回优惠券*/ selectedCoupon(val) { - this.selectCouponList = val + this.selectCouponList = val; //清空原有数据 this.form.couponActivityItems = []; val.forEach((item, index) => { - this.form.couponActivityItems.push({ num: 0, - couponId: item.id - }) - }) - console.log(val) + couponId: item.id, + }); + }); + console.log(val); }, getCoupon() { @@ -276,7 +332,6 @@ export default { }, /** 保存平台优惠券 */ handleSubmit() { - this.form.startTime = this.$options.filters.unixToDate( this.rangeTime[0] / 1000 ); @@ -287,7 +342,7 @@ export default { this.$refs.form.validate((valid) => { if (valid) { const params = JSON.parse(JSON.stringify(this.form)); - console.log(params) + console.log(params); this.submitLoading = true; if (this.modalType === 0) { // 添加 避免编辑后传入id等数据 记得删除 @@ -318,7 +373,7 @@ export default { this.$store.state.app.pageOpenedList ); this.$router.go(-1); - } + }, }, }; diff --git a/manager/src/views/live/live.vue b/manager/src/views/promotion/live/live.vue similarity index 92% rename from manager/src/views/live/live.vue rename to manager/src/views/promotion/live/live.vue index 25614680..b7d7498c 100644 --- a/manager/src/views/live/live.vue +++ b/manager/src/views/promotion/live/live.vue @@ -93,7 +93,7 @@ export default { }, on: { "on-change": () => { - this.star(params.row,params.index); + this.star(params.row, params.index); }, }, }, @@ -183,19 +183,19 @@ export default { /** * 是否推荐 */ - async star(val,index) { - let switched - if(this.liveData[index].recommend){ - this.$set(this.liveData[index],'recommend',false) - switched = false - } - else{ - - this.$set(this.liveData[index],'recommend',true) - switched = true + async star(val, index) { + let switched; + if (this.liveData[index].recommend) { + this.$set(this.liveData[index], "recommend", false); + switched = false; + } else { + this.$set(this.liveData[index], "recommend", true); + switched = true; } - await whetherStar({id:val.id,recommend:switched}); + await whetherStar({ id: val.id, recommend: switched }); + + this.getStoreLives(); }, /** diff --git a/manager/src/views/live/liveDetail.vue b/manager/src/views/promotion/live/liveDetail.vue similarity index 100% rename from manager/src/views/live/liveDetail.vue rename to manager/src/views/promotion/live/liveDetail.vue diff --git a/seller/src/config/index.js b/seller/src/config/index.js index 17f824e8..27da5927 100644 --- a/seller/src/config/index.js +++ b/seller/src/config/index.js @@ -22,10 +22,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.100:8890', - buyer: 'http://192.168.0.100:8888', - seller: 'http://192.168.0.100:8889', - manager: 'http://192.168.0.100:8887' + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' }, api_prod: { common: 'https://common-api.pickmall.cn', diff --git a/seller/src/views/goods/goods-seller/goodsOperation.vue b/seller/src/views/goods/goods-seller/goodsOperation.vue index fc7417d4..5c434575 100644 --- a/seller/src/views/goods/goods-seller/goodsOperation.vue +++ b/seller/src/views/goods/goods-seller/goodsOperation.vue @@ -25,6 +25,8 @@ + +
      diff --git a/seller/src/views/promotion/live/addLive.vue b/seller/src/views/promotion/live/addLive.vue index cfa0c37e..f2d9327f 100644 --- a/seller/src/views/promotion/live/addLive.vue +++ b/seller/src/views/promotion/live/addLive.vue @@ -153,7 +153,6 @@ import { addLiveGoods, editLive, getLiveInfo, - delLiveGoods, delRoomLiveGoods, } from "@/api/promotion"; import liveGoods from "./liveGoods"; diff --git a/seller/src/views/promotion/live/liveGoods.vue b/seller/src/views/promotion/live/liveGoods.vue index 31fcf0e4..eb2def25 100644 --- a/seller/src/views/promotion/live/liveGoods.vue +++ b/seller/src/views/promotion/live/liveGoods.vue @@ -276,10 +276,10 @@ export default { async saveLiveGoods() { this.saveGoodsLoading = true; let submit = this.liveGoodsData.map((element) => { - console.log(element.priceType); + console.log(element); return { goodsId: element.goodsId, //商品id - goodsImage: element.small, //商品图片 + goodsImage: element.small, //商品图片 必须为 300 * 300 name: element.goodsName, //商品昵称 price: parseInt(element.price), //商品价格 quantity: element.quantity, //库存 From 44da0ec700bdda4b744d22028c3dd2bd43164919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Thu, 17 Jun 2021 09:09:19 +0800 Subject: [PATCH 18/22] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/router/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/src/router/router.js b/manager/src/router/router.js index bdc3d361..65cb5f1b 100644 --- a/manager/src/router/router.js +++ b/manager/src/router/router.js @@ -332,7 +332,7 @@ export const otherRouter = { path: "liveDetail", title: "查看直播", name: "liveDetail", - component: () => import("@/views/live/liveDetail.vue") + component: () => import("@/views/promotion/live/liveDetail.vue") } ] }; From 63e5808a6b0b2a4379afec1ed2c27eceefb4e23f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Thu, 17 Jun 2021 10:42:10 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=B5=E6=B4=BB?= =?UTF-8?q?=E5=8A=A8=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/config/index.js | 8 +- manager/src/views/promotion/coupon/coupon.vue | 75 ++++++++++++++----- .../couponActivity/couponPublish.vue | 2 +- 3 files changed, 61 insertions(+), 24 deletions(-) diff --git a/manager/src/config/index.js b/manager/src/config/index.js index 8b6b162f..1a28698c 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -21,10 +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.109:8890', - buyer: 'http://192.168.0.109:8888', - seller: 'http://192.168.0.109:8889', - manager: 'http://192.168.0.109:8887' + common: 'http://192.168.0.100:8890', + buyer: 'http://192.168.0.100:8888', + seller: 'http://192.168.0.100:8889', + manager: 'http://192.168.0.100:8887' }, api_prod: { common: "https://common-api.pickmall.cn", diff --git a/manager/src/views/promotion/coupon/coupon.vue b/manager/src/views/promotion/coupon/coupon.vue index 7db021f4..7f2ae93d 100644 --- a/manager/src/views/promotion/coupon/coupon.vue +++ b/manager/src/views/promotion/coupon/coupon.vue @@ -25,7 +25,7 @@ - +
      - +
      @@ -59,7 +59,7 @@ export default { modalTitle: "", // 添加或编辑标题 searchForm: { // 搜索框初始化对象 - pageNumber: 0, // 当前页数 + pageNumber: 1, // 当前页数 pageSize: 10, // 页面大小 sort: "startTime", // 默认排序字段 order: "desc", // 默认排序方式 @@ -219,6 +219,7 @@ export default { ], data: [], // 表单数据 total: 0, // 表单数据总数 + selectCoupon: [], //本级选中的优惠券 }; }, props: { @@ -247,22 +248,22 @@ export default { }, methods: { // 选中优惠券 父级传值 + selectedList: { + handler(val) { + // 判断是否是父级回调给自己已选择优惠券 + if (val.length != 0) { + this.selectCoupon = val; + } + }, + deep: true, + immediate: true, + }, check() { - this.$emit("selected", this.selectList); + // this.selectCoupon.push(this.selectList) + this.$emit("selected", this.selectCoupon); }, init() { this.getDataList(); - - // 判断是否是父级回调给自己已选择优惠券 - if (this.selectedList.length != 0) { - // console.log(this.selectedList); - this.selectedList.forEach((item) => { - item._checked = true; - item.___selected = true; - }); - this.$set(this, "data", this.selectedList); - console.log(this.data); - } }, add() { this.$router.push({ name: "add-platform-coupon" }); @@ -275,9 +276,9 @@ export default { this.$router.push({ name: "platform-coupon-info", query: { id: v.id } }); }, changePage(v) { - this.searchForm.pageNumber = v - 1; + this.searchForm.pageNumber = v; this.getDataList(); - this.clearSelectAll(); + // this.clearSelectAll(); }, changePageSize(v) { this.searchForm.pageSize = v; @@ -299,10 +300,37 @@ export default { clearSelectAll() { this.$refs.table.selectAll(false); }, + + /** + * 取消已选择的数据 + */ + cancelSelect(selection, row) { + console.log(row) + let findCoupon = this.selectCoupon.find((item) => { + return item.id == row.id; + }); + // 如果没有则添加 + if (!findCoupon) { + this.selectCoupon.push(row); + } else { + // 有重复数据就删除 + this.selectCoupon.map((item, index) => { + if (item.id == findCoupon.id) { + this.selectCoupon.splice(index, 1); + } + }); + } + }, + /** + * 选择优惠券 + */ changeSelect(e) { + if (this.checked && e.length != 0) { + this.selectCoupon.push(...e); + this.check(); + } this.selectList = e; this.selectCount = e.length; - this.checked ? this.check() : ""; }, getDataList() { this.loading = true; @@ -318,8 +346,17 @@ export default { this.loading = false; if (res.success) { res.result.records.forEach((item) => { + if (this.selectCoupon.length != 0) { + this.selectCoupon.forEach((child) => { + if (item.id == child.id) { + item.___selected = true; + item._checked = true; + } + }); + } item.___selected = false; }); + this.data = res.result.records; this.total = res.result.total; } diff --git a/manager/src/views/promotion/couponActivity/couponPublish.vue b/manager/src/views/promotion/couponActivity/couponPublish.vue index 61fbc7bc..1f7077e5 100644 --- a/manager/src/views/promotion/couponActivity/couponPublish.vue +++ b/manager/src/views/promotion/couponActivity/couponPublish.vue @@ -62,7 +62,7 @@ - + From 76d09c05595a71ec87957bccdc612ff2b42796a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Thu, 17 Jun 2021 14:45:14 +0800 Subject: [PATCH 20/22] =?UTF-8?q?=E5=8A=B5=E6=B4=BB=E5=8A=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=B4=BB=E5=8A=A8=E8=8C=83=E5=9B=B4=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/config/index.js | 8 ++++---- .../src/views/promotion/couponActivity/couponPublish.vue | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/manager/src/config/index.js b/manager/src/config/index.js index 1a28698c..8b6b162f 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -21,10 +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.100:8890', - buyer: 'http://192.168.0.100:8888', - seller: 'http://192.168.0.100:8889', - manager: 'http://192.168.0.100:8887' + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' }, api_prod: { common: "https://common-api.pickmall.cn", diff --git a/manager/src/views/promotion/couponActivity/couponPublish.vue b/manager/src/views/promotion/couponActivity/couponPublish.vue index 1f7077e5..677ee392 100644 --- a/manager/src/views/promotion/couponActivity/couponPublish.vue +++ b/manager/src/views/promotion/couponActivity/couponPublish.vue @@ -10,7 +10,7 @@ - + @@ -86,6 +86,11 @@ export default { }, data() { return { + options: { + disabledDate(date) { + return date && date.valueOf() < Date.now() - 86400000; + }, + }, showCouponSelect: false, //显示优惠券选择框 modalType: 0, // 是否编辑 rangeTime: "", //时间区间 From b3fda143220289c90ed553a6f68e4293164defa8 Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 18 Jun 2021 16:38:10 +0800 Subject: [PATCH 21/22] =?UTF-8?q?=E5=88=B8=E6=B4=BB=E5=8A=A8=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/api/promotion.js | 4 +- manager/src/router/router.js | 8 +- .../views/promotion/couponActivity/coupon.vue | 175 ++---------- .../promotion/couponActivity/couponInfo.vue | 261 +++++------------- .../couponActivity/couponPublish.scss | 4 - .../couponActivity/couponPublish.vue | 185 +++++-------- .../couponActivity/couponSpecify.vue | 172 ------------ .../couponActivity/memberReceiveCoupon.vue | 250 ----------------- 8 files changed, 180 insertions(+), 879 deletions(-) delete mode 100644 manager/src/views/promotion/couponActivity/couponSpecify.vue delete mode 100644 manager/src/views/promotion/couponActivity/memberReceiveCoupon.vue diff --git a/manager/src/api/promotion.js b/manager/src/api/promotion.js index 9c0ccdd0..42173562 100644 --- a/manager/src/api/promotion.js +++ b/manager/src/api/promotion.js @@ -119,8 +119,8 @@ export const getCouponActivityList = params => { return getRequest("/promotion/couponActivity", params); }; // 作废优惠券 -export const deleteCouponActivity = ids => { - return deleteRequest(`/promotion/couponActivity/${ids}`); +export const closeActivity = id => { + return deleteRequest(`/promotion/couponActivity/${id}`); }; // 更新优惠券活动 export const updateCouponActivity = params => { diff --git a/manager/src/router/router.js b/manager/src/router/router.js index 65cb5f1b..d60e240f 100644 --- a/manager/src/router/router.js +++ b/manager/src/router/router.js @@ -251,10 +251,16 @@ export const otherRouter = { }, { path: "coupon-activity/edit", - title: "编辑平台优惠券", + title: "编辑平台优惠券活动", name: "edit-coupon-activity", component: () => import("@/views/promotion/couponActivity/couponPublish.vue") }, + { + path: "promotion/coupon-activity-info", + title: "券活动详情", + name: "coupon-activity-info", + component: () => import("@/views/promotion/couponActivity/couponInfo.vue") + }, { path: "promotion/member-receive-coupon", title: "领取详情", diff --git a/manager/src/views/promotion/couponActivity/coupon.vue b/manager/src/views/promotion/couponActivity/coupon.vue index 0be79c4a..aac1d820 100644 --- a/manager/src/views/promotion/couponActivity/coupon.vue +++ b/manager/src/views/promotion/couponActivity/coupon.vue @@ -4,8 +4,17 @@ - +
      + + +
      import { getCouponActivityList, - updatePlatformCouponStatus, + closeActivity, } from "@/api/promotion"; export default { - name: "coupon", + name: "couponActivity", components: {}, data() { return { @@ -148,63 +157,36 @@ export default { default: false, }, }, - watch: { - $route(to, from) { - if (to.fullPath == "/promotion/manager-coupon") { - this.init(); - } - }, - }, methods: { - // 选中优惠券 父级传值 - check(val, index) { - - this.data[index].___selected = !this.data[index].___selected - - this.$emit("selected", val); - }, + //获取数据 初始化 init() { this.getDataList(); }, + //增加券活动 add() { this.$router.push({name: "add-coupon-activity"}); }, - /** 跳转至领取详情页面 */ - receiveInfo(v) { - this.$router.push({name: "member-receive-coupon", query: {id: v.id}}); - }, + //查看详情 info(v) { - this.$router.push({name: "platform-coupon-info", query: {id: v.id}}); + this.$router.push({name: "coupon-activity-info", query: {id: v.id}}); }, + //跳转页面 changePage(v) { this.searchForm.pageNumber = v - 1; this.getDataList(); - this.clearSelectAll(); }, + //修改分页 changePageSize(v) { this.searchForm.pageSize = v; this.getDataList(); }, + //搜索活动 handleSearch() { this.searchForm.pageNumber = 0; 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; if (this.selectDate && this.selectDate[0] && this.selectDate[1]) { @@ -218,133 +200,32 @@ export default { getCouponActivityList(this.searchForm).then((res) => { this.loading = false; if (res.success) { - res.result.records.forEach(item => { - item.___selected = false - }) this.data = res.result.records; this.total = res.result.total; } }); - this.total = this.data.length; this.loading = false; }, - handleSubmit() { - this.$refs.form.validate((valid) => { - if (valid) { - this.submitLoading = true; - if (this.modalType === 0) { - // 添加 避免编辑后传入id等数据 记得删除 - delete this.form.id; - this.postRequest("/coupon/insertOrUpdate", this.form).then( - (res) => { - this.submitLoading = false; - if (res.success) { - this.$Message.success("操作成功"); - this.getDataList(); - this.modalVisible = false; - } - } - ); - } else { - // 编辑 - this.postRequest("/coupon/insertOrUpdate", this.form).then( - (res) => { - this.submitLoading = false; - if (res.success) { - this.$Message.success("操作成功"); - this.getDataList(); - this.modalVisible = false; - } - } - ); - } - } - }); - }, + //跳转编辑 edit(v) { this.$router.push({name: "edit-platform-coupon", query: {id: v.id}}); }, + //下架活动 remove(v) { this.$Modal.confirm({ title: "确认下架", // 记得确认修改此处 - content: "确认要下架此优惠券么?", + content: "确认要下架此优惠券活动么?下架活动只能重新创建", loading: true, onOk: () => { // 删除 - updatePlatformCouponStatus({ - couponIds: v.id, - promotionStatus: "CLOSE", - }) - .then((res) => { - this.$Modal.remove(); - if (res.success) { - this.$Message.success("优惠券已作废"); - this.getDataList(); - } - }) - .catch(() => { - this.$Modal; - }); - }, - }); - }, - 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.push(e.id); - }); - let params = { - couponIds: ids.toString(), - promotionStatus: "CLOSE", - }; - // 批量删除 - updatePlatformCouponStatus(params).then((res) => { - this.$Modal.remove(); + closeActivity(v.id).then((res) => { if (res.success) { - this.$Message.success("下架成功"); - this.clearSelectAll(); - this.getDataList(); - } - }); - }, - }); - }, - upAll() { - 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.push(e.id); - }); - let params = { - couponIds: ids.toString(), - promotionStatus: "START", - }; - // 批量上架 - updatePlatformCouponStatus(params).then((res) => { - this.$Modal.remove(); - if (res.success) { - this.$Message.success("上架成功"); - this.clearSelectAll(); + this.$Message.success("优惠券活动已作废"); this.getDataList(); } + }).catch(() => { + this.$Modal; }); }, }); diff --git a/manager/src/views/promotion/couponActivity/couponInfo.vue b/manager/src/views/promotion/couponActivity/couponInfo.vue index 87061b89..2b800adf 100644 --- a/manager/src/views/promotion/couponActivity/couponInfo.vue +++ b/manager/src/views/promotion/couponActivity/couponInfo.vue @@ -3,81 +3,37 @@
      -

      平台券活动详情

      +

      优惠券活动详情

      - {{ form.promotionName }} + {{ couponActivity.promotionName }} - {{ - getCouponType(form.couponType) - }} + 新人发券 + 精确发券 - - ¥{{ form.price | unitPrice }} + + 全部会员 + 指定会员 - - {{ form.description }} + + {{ couponActivity.startTime }}~{{ couponActivity.endTime }} - - {{ form.publishNum }} - - - {{ form.limitNum }} - - - {{ form.startTime }} - - - {{ - form.consumptionLimit - }} - - - {{ form.startTime }} 至 {{ form.endTime }} - - - {{ - getScopeType(form.scopeType) - }} - - - {{ form.couponName }} - - - {{ - getStatus(form.status) - }} - - - {{ - getType(form.getType) - }} - - - {{ form.createTime }} - - - {{ form.updateTime }} - - - {{ form.updateBy }} - - - {{ form.receivedNum }} - - - {{ form.usedNum }} + + + 新建 + 已开始 + 已结束 + 已废弃
      -

      适用品类范围

      -
      -
      - - - -
      +

      优惠券列表

      + +
      +

      会员列表列表

      + + +
      @@ -89,145 +45,78 @@ - - - diff --git a/manager/src/views/promotion/couponActivity/memberReceiveCoupon.vue b/manager/src/views/promotion/couponActivity/memberReceiveCoupon.vue deleted file mode 100644 index 4291c1e3..00000000 --- a/manager/src/views/promotion/couponActivity/memberReceiveCoupon.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - - From c4cc07868023e086eecf40198974cf1651274cfd Mon Sep 17 00:00:00 2001 From: Chopper Date: Fri, 18 Jun 2021 17:06:25 +0800 Subject: [PATCH 22/22] =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E8=AE=BE?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/nav/cateNav.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/buyer/src/components/nav/cateNav.vue b/buyer/src/components/nav/cateNav.vue index e4fd092c..07a6b4eb 100644 --- a/buyer/src/components/nav/cateNav.vue +++ b/buyer/src/components/nav/cateNav.vue @@ -93,6 +93,11 @@ export default { getCategory(0).then(res => { if (res.success) { this.cateList = res.result; + // 过期时间 + var expirationTime = new Date().setHours(new Date().getHours() + 1); + // 存放过期时间 + localStorage.setItem('category_expiration_time', expirationTime); + // 存放分类信息 localStorage.setItem('category', JSON.stringify(res.result)) } }); @@ -117,7 +122,12 @@ export default { } }, mounted () { - if (localStorage.getItem('category')) { + if (localStorage.getItem('category') && localStorage.getItem('category_expiration_time')) { + // 如果缓存过期,则获取最新的信息 + if (new Date() > localStorage.getItem('category_expiration_time')) { + this.getCate(); + return; + } this.cateList = JSON.parse(localStorage.getItem('category')) } else { this.getCate()