|  |  |  | 
|---|
|  |  |  | <!-- 表格和分页 --> | 
|---|
|  |  |  | <template v-slot:table-wrap> | 
|---|
|  |  |  | <ul class="toolbar"> | 
|---|
|  |  |  | <li><el-button type="primary">同步</el-button></li> | 
|---|
|  |  |  | <li><el-button type="primary"  v-permissions="['business:hksync:park']"  @click="syncParks()">同步</el-button></li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | <el-table | 
|---|
|  |  |  | v-loading="isWorking.search" | 
|---|
|  |  |  | 
|---|
|  |  |  | import BaseTable from '@/components/base/BaseTable' | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import { findList } from '@/api/business/parks' | 
|---|
|  |  |  | import {findList, syncParks} from '@/api/business/parks' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'Parks', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getfindList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | syncParks(){ | 
|---|
|  |  |  | this.$dialog.actionConfirm("操作确认提醒","您确认同步全部信息吗?") | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.isWorking.delete = true | 
|---|
|  |  |  | this.api.syncParks({}) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | this.$tip.apiSuccess(res || '同步成功') | 
|---|
|  |  |  | this.__afterDelete() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .finally(() => { | 
|---|
|  |  |  | this.isWorking.delete = false | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => {}) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getfindList () { | 
|---|
|  |  |  | findList({}) | 
|---|
|  |  |  | .then(res => { | 
|---|