From 8ea9463705d26f07a279bab974769a5ceed43415 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期一, 06 五月 2024 14:23:01 +0800
Subject: [PATCH] 最新版本
---
admin/src/views/business/internalCompany.vue | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/admin/src/views/business/internalCompany.vue b/admin/src/views/business/internalCompany.vue
index f4dc54c..141cb20 100644
--- a/admin/src/views/business/internalCompany.vue
+++ b/admin/src/views/business/internalCompany.vue
@@ -17,8 +17,10 @@
<!-- 琛ㄦ牸鍜屽垎椤� -->
<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:create']" @click="$refs.OperaInternalCompanyWindow.open('鏂板缓浼佷笟',null,null)">鏂板缓</el-button></li>
+ <li><el-button @click="sort('top')" :loading="isWorking.sort" icon="el-icon-sort-up" v-permissions="['business:company:sort']">涓婄Щ</el-button></li>
+ <li><el-button @click="sort('bottom')" :loading="isWorking.sort" icon="el-icon-sort-down" 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>-->
</ul>
<el-table
v-loading="isWorking.search"
@@ -26,19 +28,28 @@
stripe
:tree-props="{children: 'childList'}"
row-key="id"
+ :expand-row-keys="[list && list.length > 0 ? list[0].id.toString() : '']"
@selection-change="handleSelectionChange"
>
-<!-- <el-table-column type="selection" width="55"></el-table-column>-->
+ <el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="name" label="缁勭粐鍚嶇О" min-width="100px"></el-table-column>
- <el-table-column prop="editDate" label="鏈�鍚庢洿鏂版椂闂�" min-width="100px"></el-table-column>
+ <el-table-column prop="name" label="缁勭粐绫诲瀷" min-width="100px">
+ <template scope="{row}">
+ <span v-if="row.type == 0">鐩稿叧鏂圭粍缁�</span>
+ <span v-if="row.type == 1">鍐呴儴缁勭粐</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="companyPath" label="缁勭粐璺緞" min-width="100px"></el-table-column>
+ <el-table-column prop="editorName" label="鎿嶄綔浜�" min-width="100px"></el-table-column>
+ <el-table-column prop="editDate" label="鏈�鍚庢洿鏂版椂闂�" min-width="100px"></el-table-column>
<el-table-column
label="鎿嶄綔"
width="230"
fixed="right"
>
<template slot-scope="{row}">
- <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('缂栬緫浼佷笟淇℃伅', row)" icon="el-icon-edit" v-permissions="['business:company:update']">缂栬緫</el-button>
- <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('鏂板缓瀛愮骇', { disable: true, parentId: row.id })" icon="el-icon-plus">鏂板缓瀛愮骇</el-button>
+ <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('缂栬緫浼佷笟淇℃伅',{ id: row.parentId,name:row.parentName,companyPath:row.parentCompanyPath}, row)" icon="el-icon-edit" v-permissions="['business:company:update']">缂栬緫</el-button>
+ <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('鏂板缓瀛愮骇', row,null)" icon="el-icon-plus">鏂板缓瀛愮骇</el-button>
<el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:company:delete']">鍒犻櫎</el-button>
</template>
</el-table-column>
@@ -54,7 +65,6 @@
import TableLayout from '@/layouts/TableLayout'
import { companySync } from '@/api/business/company'
import OperaInternalCompanyWindow from '@/components/business/OperaInternalCompanyWindow'
-import { memberSync } from '@/api/business/member'
export default {
name: 'internalCompany',
extends: BaseTable,
@@ -62,8 +72,9 @@
data () {
return {
// 鎼滅储
+ loading:false,
searchForm: {
- type: 1
+ // type: 1
},
list: [],
total: 0
@@ -98,7 +109,7 @@
async synchronous () {
this.$dialog.actionConfirm('鎿嶄綔纭鎻愰啋', '鎮ㄧ‘璁ゅ悓姝ュ叏閮ㄤ俊鎭悧锛�')
.then(() => {
- this.isWorking.delete = true
+ this.loading = true
companySync({})
.then(res => {
this.$tip.apiSuccess(res || '鍚屾鎴愬姛')
@@ -108,7 +119,7 @@
this.$tip.apiFailed(e)
})
.finally(() => {
- this.isWorking.delete = false
+ this.loading = false
})
})
.catch(() => {})
--
Gitblit v1.9.3