Commit d3dca5aa by 无尘

fix: 更新loading

parent 9a4a6123
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-28 15:24:12
* @LastEditors: 无尘
* @LastEditTime: 2020-11-24 17:55:36
* @LastEditTime: 2020-12-22 11:39:30
-->
<!--
门店绑定-选择分组
......@@ -12,7 +12,7 @@
import customerStoreGroup from '@/components/app/my-customer/customer-store-group.vue';
-->
<template>
<div class="bind-store-body">
<div class="bind-store-body" v-loading="loading">
<div class="font-12 color-909399">最终选择范围是根据选择范围和管理员管辖范围内的相同分组或门店。</div>
<div class="store-body-wrap">
<div class="select-search m-t-10">
......@@ -59,7 +59,8 @@ export default {
defaultProps: {
children: 'children',
label: 'storeGroupName'
}
},
loading: false
};
},
mounted() {
......@@ -157,6 +158,7 @@ export default {
*/
getGroup() {
const that = this;
that.loading = true;
const para = {
type: that.storeType,
enterpriseId: that.brandId,
......@@ -164,6 +166,7 @@ export default {
};
getGroupList(para, { headers: { sign: that.brandId } })
.then(async res => {
that.loading = false;
if (!!res.result && res.result.length) {
res.result.forEach(ele => {
ele.expand = false;
......@@ -175,10 +178,9 @@ export default {
// 存一份数据自己搜索
// console.log(that.groupData)
that.groupDataCopy = JSON.parse(JSON.stringify(res.result));
})
.catch(function(error) {
that.loading = false;
});
},
},
......
......@@ -4,14 +4,14 @@
* @Author: 无尘
* @Date: 2020-08-28 15:24:42
* @LastEditors: 无尘
* @LastEditTime: 2020-11-24 18:05:50
* @LastEditTime: 2020-12-22 11:40:38
-->
<!--
<customer-store :brand-id="brandId" :select-store="selectStore" @checkStoreIds="checkStoreIds"></customer-store>
import customerStore from '@/components/app/my-customer/customer-store.vue';
-->
<template>
<div class="daily-store-select">
<div class="daily-store-select" v-loading="loading">
<div class="font-12 color-909399">最终选择范围是根据选择范围和管理员管辖范围内的相同分组或门店。</div>
<div class="store-select-wrap">
<div class="select-search m-t-10">
......@@ -69,7 +69,8 @@ export default {
stores: [], // 已选门店id结果集
},
pageNum: 1,
pageSize: 300
pageSize: 300,
loading: false
};
},
mounted() {
......@@ -135,6 +136,7 @@ export default {
*/
getStoreData() {
const that = this;
that.loading = true;
const para = {
search: that.searchSelect,
enterpriseId: that.brandId,
......@@ -145,6 +147,7 @@ export default {
};
getStoreList(para, { headers: { sign: that.brandId } })
.then(res => {
that.loading = false;
if (that.pageNum == 1) {
that.stores = JSON.parse(JSON.stringify(res.result.result)) || [];
that.searchSelect === '' ? that.storesCopy = JSON.parse(JSON.stringify(res.result.result)) || [] : '';
......@@ -162,7 +165,7 @@ export default {
}
})
.catch(function(error) {
that.loading = false;
});
}
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘
* @LastEditTime: 2020-12-22 10:36:16
* @LastEditTime: 2020-12-22 11:33:31
-->
<!--
<sync-crowd-dialog :brand-id="brandId" :select-ids="selectIds" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog>
......@@ -27,7 +27,7 @@
</div>
</div>
<div class="m-t-20">
<el-table class="select-table" v-loading="loadingPage" ref="multipleTable" height="400" :data="tableData" tooltip-effect="dark" :style="{ width: '100%' }" @selection-change="handleSelectionChange">
<el-table class="select-table" ref="multipleTable" height="400" :data="tableData" tooltip-effect="dark" :style="{ width: '100%' }" @selection-change="handleSelectionChange">
<el-table-column type="selection" :selectable="selectable" width="55"> </el-table-column>
<el-table-column prop="" label="人群名称" show-overflow-tooltip>
<template slot-scope="scope">
......@@ -93,7 +93,6 @@ export default {
classifyId: '',
classifyList: [],
// 分页参数
loadingPage: false,
currentPage: 1,
pageSize: 20,
total: 0,
......@@ -285,7 +284,7 @@ export default {
*/
getTableList() {
const that = this;
that.loadingPage = true;
that.loadingBtn = true;
const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId,
......@@ -296,12 +295,12 @@ export default {
};
getSyncMemberData(para, { headers: { sign: that.brandId } })
.then(res => {
that.loadingPage = false;
that.loadingBtn = false;
that.tableData = res.result.result || [];
that.total = res.result.totalCount;
})
.catch(function(error) {
that.loadingPage = false;
that.loadingBtn = false;
});
}
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-09-01 13:53:59
* @LastEditors: 无尘
* @LastEditTime: 2020-12-08 16:19:07
* @LastEditTime: 2020-12-22 11:43:19
-->
<!--
......@@ -13,7 +13,7 @@
-->
<template>
<el-dialog :title="form.categoryId ? '编辑分类' : '新建分类'" width="600px" :visible.sync="editVisible" :before-close="handleClose">
<el-form :model="form" :rules="rules" ref="tagForm" label-width="110px">
<el-form v-loading="loadingBtn" :model="form" :rules="rules" ref="tagForm" label-width="110px">
<el-form-item label="分类名称" prop="categoryName">
<limit-input
:input-width="440"
......@@ -26,7 +26,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" :loading="loadingBtn" @click="submit('tagForm')">{{form.categoryId ? '保存' : '新建'}}</el-button>
<el-button type="primary" @click="submit('tagForm')">{{form.categoryId ? '保存' : '新建'}}</el-button>
</div>
</el-dialog>
</template>
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-12-22 10:36:57
* @LastEditTime: 2020-12-22 11:35:22
-->
<template>
<div class="common-app-right">
......@@ -119,6 +119,7 @@ export default {
*/
getCustomerData() {
const that = this;
that.loading = true;
const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId,
......@@ -126,6 +127,7 @@ export default {
};
getCustomerSet(para, { headers: { sign: that.brandId } })
.then(res => {
that.loading = false;
if (res.result && !!res.result.length) {
res.result.forEach(ele => {
that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
......@@ -142,7 +144,7 @@ export default {
}
})
.catch(function(error) {
that.loading = false;
});
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment