修改问题。

master
kevin jiang 6 years ago
parent 51d01ec0df
commit 79781543c7

@ -27,7 +27,7 @@
</Row> </Row>
</template> </template>
<Table :columns="columns1" :data="data1" class="table-account" size="small"></Table> <Table :loading="loading" :columns="columns1" :data="data1" class="table-account" size="small"></Table>
<Page :total="totalSize" :current="pageNum" :page-size="pageSize" show-elevator show-total <Page :total="totalSize" :current="pageNum" :page-size="pageSize" show-elevator show-total
placement="top" @on-change="handlePage" class-name="ks-page"></Page> placement="top" @on-change="handlePage" class-name="ks-page"></Page>
<Modal <Modal
@ -49,6 +49,7 @@
export default { export default {
data() { data() {
return { return {
loading: false,
modal13: false, modal13: false,
roleList: [ roleList: [
{ {
@ -73,21 +74,17 @@
}, },
], ],
shopList: [ shopList: [
{
shopId: '1',
shopName: '店铺1',
},
{
shopId: '2',
shopName: '店铺2',
},
], ],
columns1: [ columns1: [
{ {
type: 'index', type: 'index2',
width: 80, width: 80,
title: "序号", title: "序号",
align: 'center' align: 'center',
render: (h, params) => {
debugger
return h('span', params.index + (this.pageNum- 1) * this.pageSize + 1);
}
}, },
{ {
title: '用户名', title: '用户名',
@ -178,12 +175,6 @@
}, },
], ],
data1: [ data1: [
{
userName: "何永东",
userCode: "7833",
roleName: "系统管理员",
shopName: "全部",
}
], ],
roleId: '', roleId: '',
shopId: '', shopId: '',
@ -256,12 +247,14 @@
// //
listOfShop() { listOfShop() {
let that = this; let that = this;
this.loading = true;
that.shopList = []; that.shopList = [];
let request = { let request = {
userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId
}; };
accountManagement.listAllShopApi(request, function (data) { accountManagement.listAllShopApi(request, function (data) {
data = data.data; data = data.data;
that.loading = false;
if (data.code === '0001') { if (data.code === '0001') {
that.$Message.error("查询店铺失败!"); that.$Message.error("查询店铺失败!");
return; return;
@ -278,7 +271,9 @@
that.shopList.push(row); that.shopList.push(row);
} }
} }
}) }, function () {
that.loading = false;
});
}, },
// //
listAccountInfoFunction: function () { listAccountInfoFunction: function () {

@ -30,8 +30,8 @@ export function removeAccountApi(params, call) {
* @param call * @param call
* @returns {Promise<any | never>} * @returns {Promise<any | never>}
*/ */
export function listAllShopApi(params, call) { export function listAllShopApi(params, call, errorCallBack) {
return http.get('/poi/store/all/list', params).then(call); return http.get('/poi/store/all/list', params).then(call).catch(errorCallBack);
} }
/** /**

Loading…
Cancel
Save