| | |
| | | v-permissions="['business:company:sort']">下移</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:company:sync']" :loading="loading" |
| | | @click="synchronous()">同步</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:company:create']" :loading="loading" |
| | | @click="synchronousDingding()">同步钉钉</el-button></li> |
| | | </ul> |
| | | <el-table :max-height="tableHeight" v-loading="isWorking.search" :data="list" stripe |
| | | :tree-props="{ children: 'childList', hasChildren: 'hasChildren' }" row-key="id" |
| | |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" |
| | | @click="$refs.OperaInternalCompanyWindow.open('编辑企业信息', { id: row.parentId, name: row.parentName, type: row.parentType, companyPath: row.parentCompanyPath }, row, 'edit')" |
| | | icon="el-icon-edit" v-permissions="['business:company:update']">编辑</el-button> |
| | | icon="el-icon-edit" v-permissions="['business:company:update']" v-if="row.type ==0">编辑</el-button> |
| | | <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('新建子级', row, null, 'add')" |
| | | icon="el-icon-plus">新建子级</el-button> |
| | | <el-button type="text" @click="deleteById(row)" style="color: red" icon="el-icon-delete" |
| | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import { companySync, sort } from '@/api/business/company' |
| | | import { companySync,companySyncDingding, sort } from '@/api/business/company' |
| | | import OperaInternalCompanyWindow from '@/components/business/OperaInternalCompanyWindow' |
| | | export default { |
| | | name: 'internalCompany', |
| | |
| | | }) |
| | | .catch(() => { }) |
| | | }, |
| | | async synchronousDingding() { |
| | | this.$dialog.actionConfirm('该操作将系统清空已有内部组织信息,您确认同步全部信息吗?', '操作确认提醒') |
| | | .then(() => { |
| | | this.loading = true |
| | | companySyncDingding({}) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '同步成功') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }) |
| | | .catch(() => { }) |
| | | }, |
| | | // 排序 |
| | | sort(direction) { |
| | | if (this.sorting) { |