|
@@ -7,6 +7,7 @@
|
|
|
<div class="left-panel">
|
|
<div class="left-panel">
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="table_add()">新增店铺</el-button>
|
|
<el-button type="primary" icon="el-icon-plus" @click="table_add()">新增店铺</el-button>
|
|
|
<el-button icon="el-icon-document" @click="table_batch_status(0)" :disabled="dataSelect.length>0?false:true">启用</el-button>
|
|
<el-button icon="el-icon-document" @click="table_batch_status(0)" :disabled="dataSelect.length>0?false:true">启用</el-button>
|
|
|
|
|
+ <el-button type="danger" icon="el-icon-connection" @click="table_sync()">同步POI</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
@@ -29,6 +30,20 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ table_sync(){
|
|
|
|
|
+ this.$confirm(`发起同步后,请耐心等待1-2分钟后再刷新当前数据列表`, '提示', {
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(async () => {
|
|
|
|
|
+ var resp = await this.$API.store.sync.get();
|
|
|
|
|
+ if (resp.code == 0) {
|
|
|
|
|
+ return this.$message.error(resp.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$message.success(resp.msg);
|
|
|
|
|
+ this.$emit("success");
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
async table_batch_status(status){
|
|
async table_batch_status(status){
|
|
|
if (this.dataSelect.length == 0) {
|
|
if (this.dataSelect.length == 0) {
|
|
|
return this.$message.error("请选择修改数据")
|
|
return this.$message.error("请选择修改数据")
|