Zory 3 semanas atrás
pai
commit
eae1720f99
1 arquivos alterados com 15 adições e 0 exclusões
  1. 15 0
      src/views/manage/shop/index/components/option.vue

+ 15 - 0
src/views/manage/shop/index/components/option.vue

@@ -7,6 +7,7 @@
             <div class="left-panel">
                 <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 type="danger" icon="el-icon-connection" @click="table_sync()">同步POI</el-button>
             </div>
         </div>
     </fieldset>
@@ -29,6 +30,20 @@ export default {
         }
     },
     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){
             if (this.dataSelect.length == 0) {
                 return this.$message.error("请选择修改数据")