2019-12-03 11:19:45 +08:00
|
|
|
|
<style scoped>
|
|
|
|
|
|
.account {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
<template>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<div class="account">
|
|
|
|
|
|
<div class="content-left">
|
2020-02-21 17:57:19 +08:00
|
|
|
|
<div class="sidebar-title">{{$t('overall.config')}}</div>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<div class="sidebar-info">
|
|
|
|
|
|
<div class="sidebar-info-item sidebar-info-top sidebar-info-item-active">{{$t('config.account.account')}}</div>
|
|
|
|
|
|
<div class="sidebar-info-item" @click="jumpTo('promServer')" id="account-jump-promserver">
|
|
|
|
|
|
{{$t('config.promServer.promServerList')}}
|
2019-12-06 17:36:33 +08:00
|
|
|
|
</div>
|
2020-02-21 17:57:19 +08:00
|
|
|
|
<div class="sidebar-info-item" @click="jumpTo('dc')" id="account-jump-dc">
|
|
|
|
|
|
{{$t('config.dc.dc')}}
|
|
|
|
|
|
</div>
|
2020-03-11 12:27:00 +08:00
|
|
|
|
<div class="sidebar-info-item" @click="jumpTo('model')" id="account-jump-model">
|
|
|
|
|
|
{{$t('config.model.model')}}
|
|
|
|
|
|
</div>
|
2020-03-26 19:58:09 +08:00
|
|
|
|
<div class="sidebar-info-item" @click="jumpTo('mib')" id="account-jump-mib">
|
|
|
|
|
|
{{$t('config.mib.mib')}}
|
|
|
|
|
|
</div>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="content-right">
|
2020-03-27 17:20:55 +08:00
|
|
|
|
<div class="main-list" :class="{'main-list-with-sub': showSubList}">
|
|
|
|
|
|
<div class="top-tools" v-show="mainResizeShow">
|
|
|
|
|
|
<div class="top-tool-main-right margin-r-20" :class="{'top-tool-main-right-to-left': showSubList}">
|
|
|
|
|
|
<div class="top-tool-search">
|
|
|
|
|
|
<search-input ref="searchInput" :searchMsg="searchMsg" @search="search" :inTransform="inTransform"></search-input>
|
|
|
|
|
|
</div>
|
2020-03-27 18:44:59 +08:00
|
|
|
|
<button type="button" @click="toAdd" :title="$t('overall.createAccount')"
|
|
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-style-light margin-l-20" id="account-add">
|
2020-03-27 17:20:55 +08:00
|
|
|
|
<i class="nz-icon-create-square nz-icon"></i>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="pagination-top pagination-top-hide display-none"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!--<div class="top-tools">
|
2020-03-19 20:44:14 +08:00
|
|
|
|
<div class="top-tool-main-right">
|
|
|
|
|
|
<div class="top-tool-search margin-r-20">
|
|
|
|
|
|
<search-input :searchMsg="searchMsg" @search="search"></search-input>
|
|
|
|
|
|
</div>
|
2020-02-22 18:44:01 +08:00
|
|
|
|
<button type="button" @click="toAdd" :title="$t('overall.createAccount')"
|
2020-03-19 20:44:14 +08:00
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="account-add">
|
2020-01-15 20:55:24 +08:00
|
|
|
|
<i class="nz-icon-create-square nz-icon"></i>
|
2020-02-03 21:30:07 +08:00
|
|
|
|
</button>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
</div>
|
2020-03-27 17:20:55 +08:00
|
|
|
|
</div>-->
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
class="nz-table"
|
|
|
|
|
|
:data="tableData"
|
|
|
|
|
|
border
|
|
|
|
|
|
v-show="mainResizeShow"
|
|
|
|
|
|
ref="accountTable"
|
|
|
|
|
|
:height="mainTableHeight"
|
|
|
|
|
|
v-scrollBar:el-table
|
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
:resizable="false"
|
|
|
|
|
|
v-for="(item, index) in tablelable"
|
|
|
|
|
|
v-if="item.show"
|
|
|
|
|
|
:width="item.width"
|
|
|
|
|
|
:key="`col-${index}`"
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope" :column="item">
|
|
|
|
|
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
|
|
|
|
|
<span :title="$t('overall.view')" @click="detail(scope.row)" class="content-right-option" :id="'account-detail-'+scope.row.id"><i class="nz-icon nz-icon-view"></i></span>
|
|
|
|
|
|
|
|
|
|
|
|
<span :title="$t('overall.edit')" @click="edit(scope.row)" class="content-right-option" :id="'account-edit-'+scope.row.id"><i class="nz-icon nz-icon-edit"></i></span>
|
|
|
|
|
|
|
|
|
|
|
|
<span :title="$t('overall.delete')" @click="del(scope.row)" class="content-right-option" :id="'account-del-'+scope.row.id"><i class="el-icon-delete"></i></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span v-else-if="item.prop == 'lang'">
|
|
|
|
|
|
{{scope.row[item.prop] == 'en' ? 'English' : ''}}
|
|
|
|
|
|
{{scope.row[item.prop] == 'zh' ? '中文' : ''}}
|
|
|
|
|
|
{{scope.row[item.prop] == 'ru' ? 'русский' : ''}}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span v-else-if="item.prop == 'receiver'">
|
|
|
|
|
|
<template v-for="rec in scope.row[item.prop]">{{rec.name}} </template>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span v-else-if="item.prop == 'status'">
|
|
|
|
|
|
<el-switch
|
|
|
|
|
|
v-model="scope.row.status"
|
|
|
|
|
|
active-value="1"
|
|
|
|
|
|
inactive-value="0"
|
|
|
|
|
|
active-color="#ee9d3f"
|
|
|
|
|
|
:disabled="isCurrentUser(scope.row.username)"
|
|
|
|
|
|
@change="(val)=>{statusChange(scope.row)}">
|
|
|
|
|
|
</el-switch>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span v-else>{{scope.row[item.prop]}}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column width="28">
|
|
|
|
|
|
<template slot="header" slot-scope="scope" :resizable="false">
|
|
|
|
|
|
<span @click.stop="elementsetShow('shezhi',$event)" class="nz-table-gear">
|
|
|
|
|
|
<i class="nz-icon nz-icon-gear"></i>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
<div class="pagination-bottom" v-show="!showSubList">
|
|
|
|
|
|
<Pagination :tableId="tableId" :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
|
|
|
|
|
</div>
|
2020-03-27 18:44:59 +08:00
|
|
|
|
<button class="to-top" v-show="showTopBtn" @click="$toTop"><i class="nz-icon nz-icon-top"></i></button>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
</div>
|
2020-03-27 17:20:55 +08:00
|
|
|
|
<bottom-box v-if="showSubList" :show-sub-list="showSubList" :subResizeShow="subResizeShow" :obj="user" :isFullScreen="isFullScreen" :from="'account'" :targetTab="targetTab" :detail="userDetail"
|
|
|
|
|
|
@closeSubList="showSubList = false" @fullScreen="fullScreen" @exitFullScreen="exitFullScreen" @listResize="listResize" ></bottom-box>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
</div>
|
2020-01-02 18:10:24 +08:00
|
|
|
|
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<transition name="right-box">
|
2020-02-25 18:59:23 +08:00
|
|
|
|
<div class="right-box right-box-account" v-if="rightBox.show" v-clickoutside="clickos">
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<!-- begin--顶部按钮-->
|
|
|
|
|
|
<div class="right-box-top-btns">
|
|
|
|
|
|
<button type="button" v-if="user.userId != '' && rightBox.isEdit" @click="del(user)"
|
2020-01-17 16:06:35 +08:00
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light nz-btn-min-width-82"
|
|
|
|
|
|
id="account-edit-del">
|
2020-01-17 09:54:01 +08:00
|
|
|
|
<span class="right-box-top-btn-icon"><i class="el-icon-delete"></i></span>
|
|
|
|
|
|
<span class="right-box-top-btn-txt">{{$t('overall.delete')}}</span>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
</button>
|
|
|
|
|
|
<button v-if="!rightBox.isEdit" type="button" @click="saveOrToEdit"
|
2020-01-17 16:06:35 +08:00
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-size-alien nz-btn-style-light nz-btn-min-width-82"
|
|
|
|
|
|
id="account-edit-edit">
|
2020-01-17 09:54:01 +08:00
|
|
|
|
<span class="right-box-top-btn-icon"><i class="nz-icon nz-icon-edit"></i></span>
|
|
|
|
|
|
<span class="right-box-top-btn-txt">{{$t('overall.edit')}}</span>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- end--顶部按钮-->
|
2019-12-03 11:19:45 +08:00
|
|
|
|
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<!-- begin--标题-->
|
|
|
|
|
|
<div class="right-box-title">{{rightBox.title}}</div>
|
|
|
|
|
|
<!-- end--标题-->
|
2019-12-03 11:19:45 +08:00
|
|
|
|
|
2020-01-17 16:06:35 +08:00
|
|
|
|
<!-- begin--表单-->
|
|
|
|
|
|
<el-scrollbar class="right-box-form-box">
|
|
|
|
|
|
<el-form class="right-box-form" :model="user" label-position="top" :rules="rules" ref="accountForm">
|
|
|
|
|
|
<!--username-->
|
|
|
|
|
|
<el-form-item :label="$t('config.account.account')" prop="username">
|
|
|
|
|
|
<el-input autocomplete="new-password" v-if="rightBox.isEdit" type="text" placeholder=""
|
|
|
|
|
|
v-model="user.username" maxlength="64" show-word-limit size="small"></el-input>
|
|
|
|
|
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{user.username}}</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--password-->
|
|
|
|
|
|
<el-form-item :label="$t('config.account.password')" prop="password" v-if="rightBox.isEdit &&!user.userId">
|
|
|
|
|
|
<el-input autocomplete="new-password" type="password" placeholder="" v-model="user.password"
|
|
|
|
|
|
maxlength="16" show-word-limit size="small"></el-input>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--email-->
|
|
|
|
|
|
<el-form-item label="E-mail" prop="email">
|
|
|
|
|
|
<el-input v-if="rightBox.isEdit" type="text" placeholder="" v-model="user.email" size="small"></el-input>
|
|
|
|
|
|
<div v-if="!rightBox.isEdit" class="right-box-form-content-txt">{{user.email}}</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--language-->
|
|
|
|
|
|
<!--<el-form-item :label="$t('config.account.language')" prop="language">
|
|
|
|
|
|
<el-radio v-model="user.lang" label="en" :disabled="user.lang != 'en'">English</el-radio>
|
|
|
|
|
|
<el-radio v-model="user.lang" label="zh" :disabled="user.lang != 'zh'">中文</el-radio>
|
|
|
|
|
|
<el-radio v-model="user.lang" label="ru" disabled>русский({{$t('config.account.notCurrentlySupport')}})</el-radio>
|
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
|
<!--enable-->
|
|
|
|
|
|
<el-form-item :label="$t('config.account.enable')">
|
2020-02-11 12:08:11 +08:00
|
|
|
|
<el-switch v-model="user.status" active-color="#ee9d3f" :disabled="!rightBox.isEdit || isCurrentUser(user.username)" active-value="1"
|
2020-01-17 16:06:35 +08:00
|
|
|
|
inactive-value="0">
|
|
|
|
|
|
</el-switch>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('config.account.createTime')" v-if="!rightBox.isEdit">
|
|
|
|
|
|
<div class="right-box-form-content-txt">{{user.createTime}}</div>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
|
<!-- end--表单-->
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<!--底部按钮-->
|
|
|
|
|
|
<div class="right-box-bottom-btns">
|
2020-01-17 16:06:35 +08:00
|
|
|
|
<button @click="esc" id="account-esc"
|
2020-02-17 17:29:15 +08:00
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-style-light nz-btn-min-width-100">
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<span>{{$t('overall.cancel')}}</span>
|
|
|
|
|
|
</button>
|
2020-01-17 16:06:35 +08:00
|
|
|
|
<button v-if="rightBox.isEdit" @click="saveOrToEdit" id="account-save"
|
2020-02-17 17:29:15 +08:00
|
|
|
|
class="nz-btn nz-btn-size-normal nz-btn-style-normal nz-btn-min-width-100">
|
2020-01-16 18:11:15 +08:00
|
|
|
|
<span>{{$t('overall.save')}}</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
2020-01-17 16:06:35 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</transition>
|
|
|
|
|
|
<element-set
|
|
|
|
|
|
v-clickoutside="elementsetHide"
|
|
|
|
|
|
:dropCol="dropCol"
|
|
|
|
|
|
@tablelable="tablelabelEmit"
|
|
|
|
|
|
:table-title="tableTitle"
|
|
|
|
|
|
ref="elementset"
|
|
|
|
|
|
></element-set>
|
|
|
|
|
|
</div>
|
2019-12-03 11:19:45 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
2020-01-16 18:11:15 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
name: "account",
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2020-03-27 18:44:59 +08:00
|
|
|
|
//底部上滑框相关
|
2020-03-27 17:20:55 +08:00
|
|
|
|
mainTableHeight: this.$tableHeight.normal, //主列表table高度
|
2020-03-27 18:44:59 +08:00
|
|
|
|
showSubList: false, //是否展示二级列表
|
2020-03-27 17:20:55 +08:00
|
|
|
|
targetTab: '', //展示二级列表中的哪个页签
|
|
|
|
|
|
showElementSet: false, //控制自定义列的弹框
|
|
|
|
|
|
inTransform: false, //搜索框相关,搜索条件下拉框是否在transform里
|
|
|
|
|
|
mainResizeShow: true, //dom高度改变时部分内容是否展示
|
|
|
|
|
|
subResizeShow: true,
|
|
|
|
|
|
isFullScreen: false,
|
2020-03-27 18:44:59 +08:00
|
|
|
|
userDetail: [],
|
|
|
|
|
|
//底部上滑框相关end
|
|
|
|
|
|
|
2020-03-13 12:20:02 +08:00
|
|
|
|
tableId: 'accountTable', //需要分页的table的id,用于记录每页数量
|
2020-03-05 21:30:45 +08:00
|
|
|
|
showTopBtn: false,
|
2020-01-16 18:11:15 +08:00
|
|
|
|
rightBox: { //弹出框相关
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
isEdit: false, //false查看,true编辑
|
|
|
|
|
|
title: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
user: {
|
|
|
|
|
|
userId: '',
|
|
|
|
|
|
username: '',
|
|
|
|
|
|
email: '',
|
|
|
|
|
|
status: '1',
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
receiver: [],
|
|
|
|
|
|
lang: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
pageObj: {
|
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
|
total: 0
|
|
|
|
|
|
},
|
|
|
|
|
|
tableTitle: [
|
|
|
|
|
|
{
|
|
|
|
|
|
label: 'ID',
|
|
|
|
|
|
prop: 'userId',
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
width: 80
|
|
|
|
|
|
}, {
|
|
|
|
|
|
label: this.$t("config.account.account"),
|
|
|
|
|
|
prop: 'username',
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
}, {
|
|
|
|
|
|
label: 'E-mail',
|
|
|
|
|
|
prop: 'email',
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
}, /*{
|
2019-12-05 15:46:40 +08:00
|
|
|
|
label: this.$t('config.account.receiver'),
|
2019-12-03 11:19:45 +08:00
|
|
|
|
prop: 'receiver',
|
2019-12-25 17:15:09 +08:00
|
|
|
|
show: false,
|
2020-01-08 22:19:46 +08:00
|
|
|
|
}, */{
|
2020-01-16 18:11:15 +08:00
|
|
|
|
label: this.$t('config.account.createTime'),
|
|
|
|
|
|
prop: 'createTime',
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
}, {
|
|
|
|
|
|
label: this.$t('config.account.enable'),
|
|
|
|
|
|
prop: 'status',
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
width: 100
|
|
|
|
|
|
}, {
|
|
|
|
|
|
label: this.$t('config.account.option'),
|
|
|
|
|
|
prop: 'option',
|
|
|
|
|
|
show: true,
|
2020-02-18 11:05:57 +08:00
|
|
|
|
width: 120
|
2020-01-16 18:11:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
tablelable: [],
|
|
|
|
|
|
dropCol: [],
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
username: [
|
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
|
|
|
|
|
],
|
|
|
|
|
|
password: [
|
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
|
|
|
|
|
],
|
|
|
|
|
|
email: [
|
|
|
|
|
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'},
|
|
|
|
|
|
{type: 'email', message: this.$t('validate.email')}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
tableData: [],
|
|
|
|
|
|
receiverData: [{
|
|
|
|
|
|
id: '1',
|
|
|
|
|
|
name: 'group1',
|
|
|
|
|
|
description: '小组1desc'
|
2019-12-03 11:19:45 +08:00
|
|
|
|
}, {
|
2020-01-16 18:11:15 +08:00
|
|
|
|
id: '2',
|
|
|
|
|
|
name: 'group2',
|
|
|
|
|
|
description: '小组2desc'
|
2019-12-03 11:19:45 +08:00
|
|
|
|
}, {
|
2020-01-16 18:11:15 +08:00
|
|
|
|
id: '3',
|
|
|
|
|
|
name: '小组3',
|
|
|
|
|
|
description: '小组3desc'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
id: '4',
|
|
|
|
|
|
name: '小组4',
|
|
|
|
|
|
description: '小组4desc'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
id: '5',
|
|
|
|
|
|
name: '小组啊小组5',
|
|
|
|
|
|
description: '小组5desc'
|
|
|
|
|
|
}, {
|
|
|
|
|
|
id: '6',
|
|
|
|
|
|
name: '小组6',
|
|
|
|
|
|
description: '小组6desc'
|
2019-12-20 17:18:30 +08:00
|
|
|
|
}],
|
2020-01-16 18:11:15 +08:00
|
|
|
|
searchMsg: { //给搜索框子组件传递的信息
|
|
|
|
|
|
zheze_none: true,
|
|
|
|
|
|
searchLabelList: [{
|
|
|
|
|
|
id: 10,
|
|
|
|
|
|
name: this.$t('config.account.account'),
|
|
|
|
|
|
type: 'input',
|
|
|
|
|
|
label: 'username',
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
}],
|
|
|
|
|
|
},
|
|
|
|
|
|
searchLabel: {}, //搜索参数
|
|
|
|
|
|
}
|
2020-01-08 22:19:46 +08:00
|
|
|
|
},
|
2020-01-16 18:11:15 +08:00
|
|
|
|
methods: {
|
2020-03-27 17:20:55 +08:00
|
|
|
|
// 鼠标拖动二级列表
|
|
|
|
|
|
listResize(e) {
|
|
|
|
|
|
let mainListDom = document.querySelector(".main-list-with-sub"); //主列表
|
|
|
|
|
|
let subListDom = document.querySelector(".sub-list"); //副列表
|
|
|
|
|
|
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
|
|
|
|
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
|
|
|
|
//得到点击时俩dom的初始高度:
|
|
|
|
|
|
let mainInitialHeight = mainListDom.offsetHeight;
|
|
|
|
|
|
let subInitialHeight = subListDom.offsetHeight;
|
|
|
|
|
|
//点击时鼠标的Y轴位置
|
|
|
|
|
|
let mouseInitialY = e.clientY;
|
|
|
|
|
|
|
|
|
|
|
|
let _this = this;
|
|
|
|
|
|
|
|
|
|
|
|
document.onmousemove = (e) => {
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
//得到鼠标拖动的距离
|
|
|
|
|
|
let mouseMoveY = Math.abs(e.clientY - mouseInitialY);
|
|
|
|
|
|
|
|
|
|
|
|
//往上方拖动:
|
|
|
|
|
|
if (e.clientY < mouseInitialY) {
|
|
|
|
|
|
mainListDom.style.height = mainInitialHeight-mouseMoveY+'px';
|
|
|
|
|
|
subListDom.style.height = subInitialHeight+mouseMoveY+'px';
|
|
|
|
|
|
}
|
|
|
|
|
|
//往下方拖动:
|
|
|
|
|
|
if (e.clientY > mouseInitialY) {
|
|
|
|
|
|
mainListDom.style.height = mainInitialHeight+mouseMoveY+'px';
|
|
|
|
|
|
subListDom.style.height = subInitialHeight-mouseMoveY+'px';
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 主、副列表最小高度限制为15px
|
|
|
|
|
|
if(parseInt(mainListDom.style.height) >= contentRightHeight-15){
|
|
|
|
|
|
mainListDom.style.height = contentRightHeight-15+'px';
|
|
|
|
|
|
}
|
|
|
|
|
|
if(parseInt(mainListDom.style.height) <= 15){
|
|
|
|
|
|
mainListDom.style.height = 15+'px';
|
|
|
|
|
|
}
|
|
|
|
|
|
if(parseInt(subListDom.style.height) >= contentRightHeight-15){
|
|
|
|
|
|
subListDom.style.height = contentRightHeight-15+'px';
|
|
|
|
|
|
}
|
|
|
|
|
|
if(parseInt(subListDom.style.height) <= 15){
|
|
|
|
|
|
subListDom.style.height = 15+'px';
|
|
|
|
|
|
}
|
|
|
|
|
|
//当主副列表可视区域小于一定值时,不展示内容
|
|
|
|
|
|
if(parseInt(mainListDom.style.height) <= 100){
|
|
|
|
|
|
if (_this.mainResizeShow) {
|
|
|
|
|
|
_this.mainResizeShow = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (!_this.mainResizeShow) {
|
|
|
|
|
|
_this.mainResizeShow = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if(parseInt(subListDom.offsetHeight) <= 100){
|
|
|
|
|
|
if (_this.subResizeShow) {
|
|
|
|
|
|
_this.subResizeShow = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (!_this.subResizeShow) {
|
|
|
|
|
|
_this.subResizeShow = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
document.onmouseup = () => {
|
|
|
|
|
|
document.onmousemove = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
exitFullScreen() {
|
|
|
|
|
|
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
|
|
|
|
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
|
|
|
|
//主列表
|
|
|
|
|
|
document.querySelector(".main-list-with-sub").style.height = this.mainListHeight ? this.mainListHeight + 'px' : 'calc(50% - 4px)';
|
|
|
|
|
|
|
|
|
|
|
|
//副列表
|
|
|
|
|
|
document.querySelector(".sub-list").style.height = this.mainListHeight ? contentRightHeight-this.mainListHeight-9 + 'px' : 'calc(50% - 4px)';
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.isFullScreen = false;
|
|
|
|
|
|
if (document.querySelector(".main-list-with-sub").offsetHeight >= 100) {
|
|
|
|
|
|
this.mainResizeShow = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (document.querySelector(".sub-list").offsetHeight >= 100) {
|
|
|
|
|
|
this.subResizeShow = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}, 210);
|
|
|
|
|
|
},
|
|
|
|
|
|
fullScreen() {
|
|
|
|
|
|
let contentRightDom = document.querySelector(".content-right"); //右侧内容区
|
|
|
|
|
|
let contentRightHeight = contentRightDom.offsetHeight;//可视高度
|
|
|
|
|
|
this.isFullScreen = true;
|
|
|
|
|
|
//主列表
|
|
|
|
|
|
this.mainListHeight = document.querySelector(".main-list-with-sub").offsetHeight; //记录全屏前主列表的高度
|
|
|
|
|
|
document.querySelector(".main-list-with-sub").style.height = '0';
|
|
|
|
|
|
this.mainResizeShow = false;
|
|
|
|
|
|
//副列表
|
|
|
|
|
|
document.querySelector(".sub-list").style.height = contentRightHeight + 'px';
|
|
|
|
|
|
},
|
|
|
|
|
|
jumpTo(data, id) {
|
|
|
|
|
|
this.$router.push({
|
|
|
|
|
|
path: "/" + data,
|
|
|
|
|
|
query: {
|
|
|
|
|
|
t: +new Date()
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
convertToDetail(obj) {
|
|
|
|
|
|
let detail = [];
|
|
|
|
|
|
detail.push({label: this.$t("config.account.account"), value: obj.username});
|
|
|
|
|
|
detail.push({label: "E-mail", value: obj.email});
|
|
|
|
|
|
let available = obj.status == 1 ? this.$t("tip.yes") : this.$t("tip.no");
|
|
|
|
|
|
detail.push({label: this.$t("config.account.enable"), value: available});
|
|
|
|
|
|
detail.push({label: this.$t("config.account.createTime"), value: obj.createTime});
|
|
|
|
|
|
return detail;
|
|
|
|
|
|
},
|
2020-01-16 18:11:15 +08:00
|
|
|
|
elementsetShow(s, e) {
|
|
|
|
|
|
var eventfixed = {
|
|
|
|
|
|
shezhi: 0,
|
|
|
|
|
|
screen: 0
|
|
|
|
|
|
};
|
|
|
|
|
|
eventfixed[s] = 1;
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
this.$store.commit('setHeaderTable', this.tablelable);
|
|
|
|
|
|
this.$store.commit('setEventfixed', eventfixed);
|
|
|
|
|
|
const h = document.documentElement.clientHeight;
|
|
|
|
|
|
const w = document.documentElement.clientWidth;
|
|
|
|
|
|
const dw = this.$refs.elementset.$el.offsetWidth;
|
|
|
|
|
|
const dh = this.$refs.elementset.$el.offsetHeight;
|
|
|
|
|
|
let positionx =
|
2020-02-18 11:05:57 +08:00
|
|
|
|
e.clientX + dw <= w - 10 ? e.clientX + 14 : e.clientX + 14 - dw;
|
2020-01-16 18:11:15 +08:00
|
|
|
|
let positiony =
|
|
|
|
|
|
e.clientY + dh <= h - 10
|
2020-02-18 11:05:57 +08:00
|
|
|
|
? e.clientY + 20
|
|
|
|
|
|
: e.clientY + 20 - (e.clientY + dh - h);
|
2020-01-16 18:11:15 +08:00
|
|
|
|
this.$store.commit('setPosition', {positionx, positiony});
|
|
|
|
|
|
},
|
|
|
|
|
|
elementsetHide() {
|
|
|
|
|
|
//悬浮点击空白隐藏
|
|
|
|
|
|
this.$refs.elementset.elementsetHide();
|
|
|
|
|
|
},
|
|
|
|
|
|
tablelabelEmit(data) {
|
|
|
|
|
|
//获取子组件传过来的参数
|
|
|
|
|
|
this.$store.commit('setHeaderTable', data);
|
|
|
|
|
|
this.tablelable = data;
|
|
|
|
|
|
},
|
2020-02-25 18:59:23 +08:00
|
|
|
|
clickos() {
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
},
|
2020-01-16 18:11:15 +08:00
|
|
|
|
edit: function (u) {
|
|
|
|
|
|
this.user = Object.assign({}, u);
|
|
|
|
|
|
this.rightBox.isEdit = true;
|
|
|
|
|
|
this.rightBox.title = this.$t("config.account.editAccount") + " ID:" + u.userId;
|
|
|
|
|
|
this.rightBox.show = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
del: function (u) {
|
|
|
|
|
|
this.$confirm(this.$t("tip.confirmDelete"), {
|
|
|
|
|
|
confirmButtonText: this.$t("tip.yes"),
|
|
|
|
|
|
cancelButtonText: this.$t("tip.no"),
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
this.$delete("sys/user/delete?userIds=" + u.userId).then(response => {
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
this.getTableData();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2019-12-19 17:22:18 +08:00
|
|
|
|
});
|
|
|
|
|
|
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
detail: function (u) {
|
|
|
|
|
|
this.user = Object.assign({}, u);
|
2020-03-27 17:20:55 +08:00
|
|
|
|
/*this.rightBox.isEdit = false;
|
2020-01-17 16:06:35 +08:00
|
|
|
|
this.rightBox.title = this.$t("config.account.account") + " ID:" + u.userId;
|
2020-03-27 17:20:55 +08:00
|
|
|
|
this.rightBox.show = true;*/
|
|
|
|
|
|
this.targetTab = "detail";
|
|
|
|
|
|
this.showSubList = true;
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
getTableData: function () {
|
|
|
|
|
|
this.$set(this.searchLabel, "pageNo", this.pageObj.pageNo);
|
|
|
|
|
|
this.$set(this.searchLabel, "pageSize", this.pageObj.pageSize);
|
|
|
|
|
|
this.$get('sys/user/list', this.searchLabel).then(response => {
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
for (let i = 0; i < response.data.list.length; i++) {
|
|
|
|
|
|
response.data.list[i].status = response.data.list[i].status + "";
|
|
|
|
|
|
}
|
|
|
|
|
|
this.tableData = response.data.list;
|
|
|
|
|
|
this.pageObj.total = response.data.total
|
2019-12-09 19:23:20 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
toAdd: function () {
|
|
|
|
|
|
this.cleanUser();
|
|
|
|
|
|
this.rightBox.isEdit = true;
|
|
|
|
|
|
this.rightBox.title = this.$t("config.account.createAccount");
|
|
|
|
|
|
this.rightBox.show = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
tabSave: function () {
|
|
|
|
|
|
this.$put('sys/user/update', this.user).then(response => {
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.getTableData();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
save: function () {
|
|
|
|
|
|
this.$refs.accountForm.validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
if (this.user.userId) {
|
|
|
|
|
|
this.$put('sys/user/update', this.user).then(response => {
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.getTableData();
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$post('sys/user/save', this.user).then(response => {
|
|
|
|
|
|
if (response.code === 200) {
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
|
|
|
|
|
this.getTableData();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$message.error(response.msg);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
saveOrToEdit: function () {
|
|
|
|
|
|
if (!this.rightBox.isEdit) {
|
|
|
|
|
|
this.rightBox.isEdit = true;
|
|
|
|
|
|
this.rightBox.title = this.$t("config.account.editAccount") + " ID:" + this.user.userId;
|
2020-01-16 15:48:49 +08:00
|
|
|
|
} else {
|
2020-01-17 16:06:35 +08:00
|
|
|
|
this.save();
|
2020-01-16 15:48:49 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
statusChange: function (user) {
|
|
|
|
|
|
this.user = user;
|
|
|
|
|
|
this.tabSave();
|
|
|
|
|
|
},
|
|
|
|
|
|
jumpTo(data, id) {
|
|
|
|
|
|
this.$router.push({
|
|
|
|
|
|
path: "/" + data,
|
|
|
|
|
|
query: {
|
|
|
|
|
|
t: +new Date()
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
toEditReceiver: function (item) {
|
|
|
|
|
|
if (!item.isEdit) {
|
|
|
|
|
|
//如果不在编辑状态,那么其他项如果有改动,则还原改动,最后开始编辑
|
|
|
|
|
|
this.blurEditReceiver();
|
|
|
|
|
|
item.isEdit = true;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
//如果已在编辑状态,判断name是否有变更,有变更则发请求
|
|
|
|
|
|
if (item.name != item.oldName) {
|
|
|
|
|
|
if (this.updateReceiverName(item) == 200) {
|
|
|
|
|
|
item.isEdit = false;
|
|
|
|
|
|
}
|
2019-12-19 17:22:18 +08:00
|
|
|
|
} else {
|
2020-01-17 16:06:35 +08:00
|
|
|
|
item.errorMessage = '';
|
|
|
|
|
|
item.isEdit = false;
|
2019-12-19 17:22:18 +08:00
|
|
|
|
}
|
2020-01-02 18:10:24 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
blurEditReceiver: function () {
|
|
|
|
|
|
for (let i = 0; i < this.receiverData.length; i++) {
|
|
|
|
|
|
if (this.receiverData[i].isEdit) {
|
|
|
|
|
|
this.receiverData[i].name = this.receiverData[i].oldName;
|
|
|
|
|
|
this.receiverData[i].isEdit = false;
|
|
|
|
|
|
this.receiverData[i].errorMessage = '';
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
2019-12-10 17:00:28 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
toDelReceiver: function (item) {
|
2019-12-04 15:15:10 +08:00
|
|
|
|
this.blurEditReceiver();
|
2020-01-17 16:06:35 +08:00
|
|
|
|
//TODO 请求后台,删除用户组
|
|
|
|
|
|
},
|
|
|
|
|
|
initReceiverData: function () {
|
|
|
|
|
|
for (let i = 0; i < this.receiverData.length; i++) {
|
|
|
|
|
|
this.$set(this.receiverData[i], 'oldName', this.receiverData[i].name);
|
|
|
|
|
|
this.$set(this.receiverData[i], 'isEdit', false);
|
2019-12-04 15:15:10 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
esc: function () {
|
|
|
|
|
|
this.rightBox.show = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
updateReceiverName: function (item) {
|
|
|
|
|
|
//TODO 请求接口改名
|
|
|
|
|
|
let code = 200;
|
|
|
|
|
|
//this.$set(item, 'errorMessage', 'err');
|
|
|
|
|
|
item.errorMessage = '';
|
|
|
|
|
|
item.oldName = item.name;
|
|
|
|
|
|
return code;
|
|
|
|
|
|
},
|
|
|
|
|
|
cleanUser: function () {
|
|
|
|
|
|
this.user = {
|
|
|
|
|
|
userId: '',
|
|
|
|
|
|
username: '',
|
|
|
|
|
|
email: '',
|
|
|
|
|
|
status: '1',
|
|
|
|
|
|
createTime: '',
|
|
|
|
|
|
receiver: [],
|
|
|
|
|
|
lang: 'en'
|
2019-12-04 15:15:10 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
|
|
|
|
|
pageNo(val) {
|
|
|
|
|
|
this.pageObj.pageNo = val;
|
|
|
|
|
|
this.getTableData();
|
|
|
|
|
|
},
|
|
|
|
|
|
pageSize(val) {
|
|
|
|
|
|
this.pageObj.pageSize = val;
|
2020-03-13 12:20:02 +08:00
|
|
|
|
localStorage.setItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId, val);
|
2020-01-17 16:06:35 +08:00
|
|
|
|
this.getTableData();
|
|
|
|
|
|
},
|
|
|
|
|
|
search: function (searchObj) {
|
|
|
|
|
|
this.searchLabel = {};
|
|
|
|
|
|
this.pageObj.pageNo = 1;
|
|
|
|
|
|
for (let item in searchObj) {
|
|
|
|
|
|
if (searchObj[item]) {
|
|
|
|
|
|
this.$set(this.searchLabel, item, searchObj[item]);
|
|
|
|
|
|
}
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
this.getTableData();
|
2019-12-18 17:00:44 +08:00
|
|
|
|
}
|
2020-01-17 16:06:35 +08:00
|
|
|
|
},
|
2020-02-11 12:08:11 +08:00
|
|
|
|
computed: {
|
|
|
|
|
|
isCurrentUser() {
|
|
|
|
|
|
return function(username) {
|
|
|
|
|
|
return localStorage.getItem('nz-username') == username;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-03-27 17:20:55 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
user: {
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
handler(n) {
|
|
|
|
|
|
this.userDetail = this.convertToDetail(n);
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
showSubList(n) {
|
|
|
|
|
|
this.inTransform = n;
|
|
|
|
|
|
if (!n) {
|
|
|
|
|
|
this.mainTableHeight = this.$tableHeight.normal; //重置table的高度
|
|
|
|
|
|
this.isFullScreen = false;
|
|
|
|
|
|
//移动分页组件的位置
|
|
|
|
|
|
let paginationTop = document.querySelector(".pagination-top");
|
|
|
|
|
|
let paginationBottom = document.querySelector(".pagination-bottom");
|
|
|
|
|
|
paginationTop.classList.remove("display-none");
|
|
|
|
|
|
if (paginationTop.classList.contains("pagination-top-show")) {
|
|
|
|
|
|
paginationTop.classList.remove("pagination-top-show");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!paginationTop.classList.contains("pagination-top-hide")) {
|
|
|
|
|
|
paginationTop.classList.add("pagination-top-hide");
|
|
|
|
|
|
}
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
paginationTop.classList.add("display-none");
|
|
|
|
|
|
paginationBottom.appendChild(paginationTop.removeChild(document.querySelector(".pagination")));
|
|
|
|
|
|
}, 210);
|
|
|
|
|
|
|
|
|
|
|
|
// 主列表恢复全屏
|
|
|
|
|
|
this.mainResizeShow = this.subResizeShow = true;
|
|
|
|
|
|
document.querySelector('.main-list').style.height = "";
|
|
|
|
|
|
//副列表高度清空
|
|
|
|
|
|
document.querySelector(".sub-list").style.height = '';
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.mainTableHeight = this.$tableHeight.openSubList.mainList; //重置table高度
|
|
|
|
|
|
//移动分页组件的位置
|
|
|
|
|
|
let paginationTop = document.querySelector(".pagination-top");
|
|
|
|
|
|
paginationTop.appendChild(document.querySelector(".pagination-bottom").removeChild(document.querySelector(".pagination")));
|
|
|
|
|
|
paginationTop.classList.remove("display-none");
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
if (paginationTop.classList.contains("pagination-top-hide")) {
|
|
|
|
|
|
paginationTop.classList.remove("pagination-top-hide");
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!paginationTop.classList.contains("pagination-top-show")) {
|
|
|
|
|
|
paginationTop.classList.add("pagination-top-show");
|
|
|
|
|
|
}
|
|
|
|
|
|
}, 210);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2020-01-17 16:06:35 +08:00
|
|
|
|
mounted() {
|
2020-03-13 12:20:02 +08:00
|
|
|
|
//是否存在分页缓存
|
|
|
|
|
|
let pageSize = localStorage.getItem('nz-pageSize-' + localStorage.getItem('nz-username') + '-' + this.tableId);
|
2020-03-20 18:22:44 +08:00
|
|
|
|
if (pageSize != 'undefined' && pageSize != null) {
|
2020-03-13 12:20:02 +08:00
|
|
|
|
this.pageObj.pageSize = pageSize
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-12-18 17:00:44 +08:00
|
|
|
|
this.getTableData();
|
2020-01-17 16:06:35 +08:00
|
|
|
|
this.initReceiverData();
|
2020-03-05 21:30:45 +08:00
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
//绑定滚动条事件,控制top按钮
|
|
|
|
|
|
let el = this.$refs.accountTable.$el.querySelector(".el-table__body-wrapper");
|
|
|
|
|
|
if (el._ps_) {
|
|
|
|
|
|
el.addEventListener("ps-scroll-y", () => {
|
2020-03-06 17:53:36 +08:00
|
|
|
|
if (el._ps_.scrollbarYTop > 50) {
|
2020-03-05 21:30:45 +08:00
|
|
|
|
this.showTopBtn = true;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.showTopBtn = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2020-01-17 16:06:35 +08:00
|
|
|
|
this.tablelable = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
|
|
|
|
|
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
|
|
|
|
|
: this.tableTitle;
|
|
|
|
|
|
this.dropCol = localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path)
|
|
|
|
|
|
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-" + this.$route.path))
|
|
|
|
|
|
: this.tableTitle;
|
2019-12-03 11:19:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|