|  |  |  | 
|---|
|  |  |  | v-permissions="['business:ywpatrolline:create']">新建</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-table v-loading="loading" :data="list" stripe> | 
|---|
|  |  |  | <el-table-column prop="code" label="公司名称" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="name" label="公司简介" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="" label="纳税识别号" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="modelNo" label="公司地址" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="realName" label="收支账户数量" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="name" label="公司名称" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="shortName" label="公司简称" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="code" label="纳税识别号" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="address" label="公司地址" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="accountNum" label="收支账户数量" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="status" label="状态" min-width="100" show-overflow-tooltip> | 
|---|
|  |  |  | <template v-slot="scope"> | 
|---|
|  |  |  | <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"> | 
|---|
|  |  |  | <el-switch v-model="scope.row.status" @change="e => changeStatus(scope.row)" :active-value="0" :inactive-value="1"> | 
|---|
|  |  |  | </el-switch> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" | 
|---|
|  |  |  | v-permissions="['business:category:update']">编辑</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" | 
|---|
|  |  |  | <el-button type="text" @click="handleDel(row)" icon="el-icon-delete" | 
|---|
|  |  |  | v-permissions="['business:category:delete']">删除</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import QueryForm from '@/components/common/QueryForm' | 
|---|
|  |  |  | import Edit from './components/companyEdit.vue' | 
|---|
|  |  |  | import { companyGetList, deleteById } from '@/api/business/company' | 
|---|
|  |  |  | import { companyGetList, deleteById, updateStatusById } from '@/api/business/company' | 
|---|
|  |  |  | import { Message } from 'element-ui' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | Pagination, | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | changeStatus(row) { | 
|---|
|  |  |  | updateStatusById(row).then(res => { | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | Message.success('更新状态成功') | 
|---|
|  |  |  | }, () => { | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getList(page) { | 
|---|
|  |  |  | const { pagination, filters } = this | 
|---|
|  |  |  | this.loading = true | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleDel(row) { | 
|---|
|  |  |  | let message = `确认删除该记录吗?` | 
|---|
|  |  |  | let message = `确认删除该公司吗?` | 
|---|
|  |  |  | this.$dialog.deleteConfirm(message) | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.isWorking.delete = true | 
|---|
|  |  |  | deleteById(row.id) | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.$tip.apiSuccess('删除成功') | 
|---|