| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:company:create', 'business:company:sync']"> |
| | | <li><el-button type="primary" v-permissions="['business:company:create']" @click="$refs.OperaInternalCompanyWindow.open('新建企业')">新建</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:company:sync']" @click="synchronous()">同步</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:company:sync']" :loading="loading" @click="synchronous()">同步</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | data () { |
| | | return { |
| | | // 搜索 |
| | | loading:false, |
| | | searchForm: { |
| | | type: 1 |
| | | }, |
| | |
| | | async synchronous () { |
| | | this.$dialog.actionConfirm('操作确认提醒', '您确认同步全部信息吗?') |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | this.loading = true |
| | | companySync({}) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '同步成功') |
| | |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | | this.loading = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |