调整企业管理

This commit is contained in:
aixianling
2022-03-14 12:07:48 +08:00
parent 66fad244d9
commit f2508c5823
3 changed files with 337 additions and 287 deletions

View File

@@ -0,0 +1,35 @@
<template>
<section class="AppCompany">
<component :is="currentComponent" :instance="instance" :dict="dict" :permissions="permissions"/>
</section>
</template>
<script>
import List from "./components/List";
import Sta from "./components/Statistics";
export default {
name: "AppCompany",
label: "企业管理",
components: {List, Sta},
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
currentComponent() {
return this.$route.hash == "#sta" ? Sta : List
}
},
created() {
}
}
</script>
<style lang="scss" scoped>
.AppCompany {
height: 100%;
}
</style>

View File

@@ -66,7 +66,8 @@
<el-input v-model.trim="dialogForm.corpSecret" placeholder="请输入企业CORP_SECRET" clearable :maxLength="50"/> <el-input v-model.trim="dialogForm.corpSecret" placeholder="请输入企业CORP_SECRET" clearable :maxLength="50"/>
</el-form-item> </el-form-item>
<el-form-item label="企业通讯录SECRET" prop="corpAddressBookSecret"> <el-form-item label="企业通讯录SECRET" prop="corpAddressBookSecret">
<el-input v-model.trim="dialogForm.corpAddressBookSecret" placeholder="请输入企业通讯录SECRET" clearable :maxLength="50"/> <el-input v-model.trim="dialogForm.corpAddressBookSecret" placeholder="请输入企业通讯录SECRET" clearable
:maxLength="50"/>
</el-form-item> </el-form-item>
<el-form-item label="访问地址" prop="accessUrl" :rules="[{required: true, message: '请输入访问地址'}]"> <el-form-item label="访问地址" prop="accessUrl" :rules="[{required: true, message: '请输入访问地址'}]">
<el-input v-model.trim="dialogForm.accessUrl" placeholder="请输入访问地址" clearable <el-input v-model.trim="dialogForm.accessUrl" placeholder="请输入访问地址" clearable
@@ -202,10 +203,8 @@ export default {
window.open(accessUrl, "_blank"); window.open(accessUrl, "_blank");
}, },
toStatistics(item) { toStatistics(item) {
this.$emit('change', { let {corpId} = item
type: 'Statistics', this.$router.push({query: {corpId}, hash: "#sta"})
params: item
})
}, },
}, },
created() { created() {

View File

@@ -34,7 +34,9 @@
<ai-card title="统计信息" class="chart-content"> <ai-card title="统计信息" class="chart-content">
<template #title> <template #title>
<div class="tabs"> <div class="tabs">
<div class="item" v-for="(item, index) in tabs" :key="index" :class="index == activeIndex ? 'active' : ''" @click="tabClick(index)">{{item}}</div> <div class="item" v-for="(item, index) in tabs" :key="index" :class="index == activeIndex ? 'active' : ''"
@click="tabClick(index)">{{ item }}
</div>
</div> </div>
</template> </template>
<template #content> <template #content>
@@ -61,7 +63,8 @@
icon="el-icon-refresh-right" icon="el-icon-refresh-right"
size="small" size="small"
@click="resetSearch" @click="resetSearch"
>重置</el-button >重置
</el-button
> >
</template> </template>
</ai-search-bar> </ai-search-bar>
@@ -75,7 +78,8 @@
</ai-table> </ai-table>
</div> </div>
<div class="table" v-else-if="activeIndex == 3"> <div class="table" v-else-if="activeIndex == 3">
<ai-table :tableData="userList" :total="userPage.total" :current.sync="userPage.current" :size.sync="userPage.size" <ai-table :tableData="userList" :total="userPage.total" :current.sync="userPage.current"
:size.sync="userPage.size"
@getList="getUserTableData" :col-configs="userColConfigs" :dict="dict"> @getList="getUserTableData" :col-configs="userColConfigs" :dict="dict">
<!-- <el-table-column slot="options" align="center" label="操作" fixed="right" width="240px"> <!-- <el-table-column slot="options" align="center" label="操作" fixed="right" width="240px">
<div class="table-options" slot-scope="{ row }"> <div class="table-options" slot-scope="{ row }">
@@ -92,6 +96,7 @@
<script> <script>
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: 'Statistics', name: 'Statistics',
@@ -99,7 +104,6 @@
instance: Function, instance: Function,
dict: Object, dict: Object,
permissions: Function, permissions: Function,
params: Object
}, },
data() { data() {
@@ -133,14 +137,19 @@
{label: "姓名", prop: "name", align: 'center'}, {label: "姓名", prop: "name", align: 'center'},
{label: "添加好友人数", prop: "residentCount", align: 'center'} {label: "添加好友人数", prop: "residentCount", align: 'center'}
] ]
},
params() {
return this.$route.query || {}
} }
}, },
mounted() { created() {
this.getInfo()
this.getTableData() this.getTableData()
this.getUserTableData() this.getUserTableData()
}, },
mounted() {
this.getInfo()
},
methods: { methods: {
chartInit() { chartInit() {
@@ -288,9 +297,7 @@
}) })
}, },
onBack() { onBack() {
this.$emit('change', { this.$router.push({})
type: 'list'
})
}, },
tabClick(index) { tabClick(index) {
this.activeIndex = index this.activeIndex = index
@@ -319,18 +326,21 @@
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
} }
.title { .title {
line-height: 60px; line-height: 60px;
font-size: 18px; font-size: 18px;
text-align: center; text-align: center;
color: #666; color: #666;
} }
.num { .num {
font-size: 32px; font-size: 32px;
font-weight: 700; font-weight: 700;
text-align: center; text-align: center;
padding-bottom: 20px; padding-bottom: 20px;
} }
.tabs { .tabs {
.item { .item {
display: inline-block; display: inline-block;
@@ -338,26 +348,32 @@
line-height: 54px; line-height: 54px;
cursor: pointer; cursor: pointer;
} }
.active { .active {
color: #26f; color: #26f;
border-bottom: 2px solid #26f; border-bottom: 2px solid #26f;
} }
} }
.chart-content { .chart-content {
height: calc(100% - 240px); height: calc(100% - 240px);
::v-deep .ai-card__body { ::v-deep .ai-card__body {
height: calc(100% - 70px); height: calc(100% - 70px);
} }
.echart { .echart {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.table { .table {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-y: scroll; overflow-y: scroll;
} }
} }
::v-deep .ai-detail__content--wrapper { ::v-deep .ai-detail__content--wrapper {
height: 100%; height: 100%;
} }