|
@@ -1,57 +1,43 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div>
|
|
|
|
|
- <el-row class="btn-list-border btn-form-inline " v-if="emTableList.showHead"
|
|
|
|
|
- :class="(showHead || tableTitle) ? ' el-btn-row' : ' el-btn-no-row'" :gutter="30">
|
|
|
|
|
- <el-col :span="(emTableList.options && emTableList.options.titleSpan ? emTableList.options.titleSpan : 8)"
|
|
|
|
|
- v-if="tableButtonToAuth(64, 'search')" class="btn-list-left">
|
|
|
|
|
- <span class="title text-overflow-ellipsis" @click.stop="reloadTableList">{{ emTableList.custTableTitle ||
|
|
|
|
|
- tableTitle}}</span>
|
|
|
|
|
- <span v-if="emTableList.tableStatus" v-html="emTableList.tableStatus"></span>
|
|
|
|
|
- <el-input placeholder="请输入内容" prefix-icon="el-icon-search" v-model="finds">
|
|
|
|
|
- <el-button @click="searchList()" size="mini" slot="append">查 询</el-button>
|
|
|
|
|
- </el-input>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="(emTableList.options && emTableList.options.titleSpan ? emTableList.options.titleSpan : 8)"
|
|
|
|
|
- v-else class="btn-list-left">
|
|
|
|
|
- <template v-if="emTableList.leftButtonsList.length">
|
|
|
|
|
- <el-button v-for="(btn,i) in emTableList.leftButtonsList" size="mini" :type="btn.type" :icon="btn.icon"
|
|
|
|
|
- @click="eventBtnData(btn.event)">{{btn.name}}</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- <span v-else class="title text-overflow-ellipsis"
|
|
|
|
|
- @click.stop="reloadTableList">{{ emTableList.custTableTitle ||
|
|
|
|
|
- tableTitle}}</span><span v-if="emTableList.tableStatus" v-html="emTableList.tableStatus"></span>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col
|
|
|
|
|
- :span="(emTableList.options && emTableList.options.buttonSpan ? emTableList.options.buttonSpan : 16)">
|
|
|
|
|
- <el-button v-for="(btn, index) in tableButtonList()" :key="index"
|
|
|
|
|
- :size="btn.hasOwnProperty('size') ? btn.size : 'mini'" :type="btn.type ? btn.type : 'primary'"
|
|
|
|
|
- :icon="btn.icon" :plain="btn.shape === 'plain' ? true : false"
|
|
|
|
|
- :round="btn.shape === 'round' ? true : false" :circle="btn.shape === 'circle' ? true : false"
|
|
|
|
|
- :disabled="btn.hasOwnProperty('disabled') ? btn.disabled : false" :style="btn.style"
|
|
|
|
|
- @click="custBtnList(btn)">{{ btn.name }}</el-button>
|
|
|
|
|
- <el-button v-if="tableButtonToAuth(16, 'add')" size="mini" type="primary" icon="el-icon-plus"
|
|
|
|
|
- @click="eventBtnData('add')">增加</el-button>
|
|
|
|
|
- <el-button v-if="tableButtonToAuth(32, 'delAll')" size="mini" type="danger" icon="el-icon-delete"
|
|
|
|
|
- @click="eventBtnData('delAll')">删除</el-button>
|
|
|
|
|
- <el-popover v-if="tableButtonToAuth(2, 'checkbox')" trigger="hover" transition="">
|
|
|
|
|
- <el-collapse-transition>
|
|
|
|
|
- <div class="filter-container">
|
|
|
|
|
- <el-checkbox-group v-model="checkboxVals" open-delay="3">
|
|
|
|
|
- <el-checkbox v-for="item in columnOptions" :key="item.name" :label="item"
|
|
|
|
|
- v-if="item.field != 'oid' && item.field != 'useropts'">{{ item.name }}</el-checkbox>
|
|
|
|
|
- </el-checkbox-group>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-collapse-transition>
|
|
|
|
|
- <el-button type="success" slot="reference" size="mini" style="margin-left: 10px;"><i
|
|
|
|
|
- class="el-icon-date"></i></el-button>
|
|
|
|
|
- </el-popover>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
|
|
+ <div class="el-btn-row" flex="main:justify cross:center" v-if="!emTableList.hideBtnRow">
|
|
|
|
|
+ <div class="left" flex="cross:center">
|
|
|
|
|
+ <template v-if="emTableList.leftButtonsList.length">
|
|
|
|
|
+ <el-button v-for="(btn, i) in emTableList.leftButtonsList" size="mini" :type="btn.type" :icon="btn.icon"
|
|
|
|
|
+ @click="eventBtnData(btn.event)">{{ btn.name }}</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <span v-else class="title text-overflow-ellipsis" @click.stop="reloadTableList">{{
|
|
|
|
|
+ emTableList.custTableTitle ||
|
|
|
|
|
+ tableTitle}}</span>
|
|
|
|
|
+ <slot name="extInfo"></slot>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="right"><el-button v-for="(btn, index) in tableButtonList()" :key="index"
|
|
|
|
|
+ :size="btn.hasOwnProperty('size') ? btn.size : 'mini'" :type="btn.type ? btn.type : 'primary'"
|
|
|
|
|
+ :icon="btn.icon" :plain="btn.shape === 'plain' ? true : false"
|
|
|
|
|
+ :round="btn.shape === 'round' ? true : false" :circle="btn.shape === 'circle' ? true : false"
|
|
|
|
|
+ :disabled="btn.hasOwnProperty('disabled') ? btn.disabled : false" :style="btn.style"
|
|
|
|
|
+ @click="custBtnList(btn)">{{ btn.name }}</el-button>
|
|
|
|
|
+ <el-button v-if="tableButtonToAuth(16, 'add')" size="mini" type="primary" icon="el-icon-plus"
|
|
|
|
|
+ @click="eventBtnData('add')">增加</el-button>
|
|
|
|
|
+ <el-button v-if="tableButtonToAuth(32, 'delAll')" size="mini" type="danger" icon="el-icon-delete"
|
|
|
|
|
+ @click="eventBtnData('delAll')">删除</el-button>
|
|
|
|
|
+ <el-popover v-if="tableButtonToAuth(2, 'checkbox')" trigger="hover" transition="">
|
|
|
|
|
+ <el-collapse-transition>
|
|
|
|
|
+ <div class="filter-container">
|
|
|
|
|
+ <el-checkbox-group v-model="checkboxVals" open-delay="3">
|
|
|
|
|
+ <el-checkbox v-for="item in columnOptions" :key="item.name" :label="item"
|
|
|
|
|
+ v-if="item.field != 'oid' && item.field != 'useropts'">{{ item.name }}</el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-collapse-transition>
|
|
|
|
|
+ <el-button type="success" slot="reference" size="mini" style="margin-left: 10px;"><i
|
|
|
|
|
+ class="el-icon-date"></i></el-button>
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { isTypeof, isArrayInnerValue, checkAuthButtonList } from '@/components/thrid/em-element-ui/src/tools/utils';
|
|
|
|
|
|
|
+import { isTypeof, isArrayInnerValue, checkAuthButtonList } from 'submodule/dx-element-ui/src/tools/utils';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'EmButtons',
|
|
name: 'EmButtons',
|
|
|
data() {
|
|
data() {
|
|
@@ -141,14 +127,17 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
.el-btn-row {
|
|
.el-btn-row {
|
|
|
- height: 60px;
|
|
|
|
|
- line-height: 60px;
|
|
|
|
|
|
|
+ min-height: 60px;
|
|
|
text-align: right;
|
|
text-align: right;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.el-btn-no-row {
|
|
|
|
|
- height: 20px;
|
|
|
|
|
- line-height: 20px;
|
|
|
|
|
- text-align: right;
|
|
|
|
|
|
|
+.left {
|
|
|
|
|
+ flex:1;
|
|
|
|
|
+ width: 0;
|
|
|
|
|
+}
|
|
|
|
|
+.title {
|
|
|
|
|
+ color: #0084F4;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|