|
|
@@ -1,70 +1,67 @@
|
|
|
<template>
|
|
|
- <div class="container">
|
|
|
- <div class="layout-header-panel container normal-panel">
|
|
|
- <div class="flex-align-center flex-between">
|
|
|
- <div class="normal-margin flex-align-center">
|
|
|
- <p>{{routerName}}</p>
|
|
|
- <slot name="titleRight"></slot>
|
|
|
- </div>
|
|
|
- <div class="normal-margin">
|
|
|
- <cpAdd v-if="tool.checkAuth($route.name,'insert')" :formPath="formPath" @onAddSuccess="listData(param.content.pageNumber = 1)"></cpAdd>
|
|
|
- <el-button-group class="inline-16">
|
|
|
- <el-button v-if="tool.checkAuth($route.name,'delete')" type="default" :disabled="selection.length === 0" size="mini" icon="el-icon-delete" @click="deleteData">删 除</el-button>
|
|
|
- </el-button-group>
|
|
|
- <el-popover
|
|
|
- placement="bottom"
|
|
|
- width="160">
|
|
|
- <div class="flex-align-center flex-between">
|
|
|
- <el-button size="small" type="info" icon="el-icon-upload" block>导 入</el-button>
|
|
|
+ <div class="basic__layout__panel">
|
|
|
+ <div class="radius">
|
|
|
+ <div class="layout-header-panel container normal-panel">
|
|
|
+ <div class="flex-align-center flex-between">
|
|
|
+ <div class="normal-margin flex-align-center">
|
|
|
+ <p style="font-size:30px;font-weight:300">{{routerName}} <i @click="addToAsideBar" style="color:#999" class="el-icon-star-off"></i></p>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <div class="flex-align-center">
|
|
|
+ <cpAdd v-if="tool.checkAuth($route.name,'insert')" :formPath="formPath" @onAddSuccess="listData(param.content.pageNumber = 1)"></cpAdd>
|
|
|
+ <el-button-group v-if="tool.checkAuth($route.name,'delete')" class="inline-16">
|
|
|
+ <el-button type="default" :disabled="selection.length === 0" size="small" @click="deleteData">删 除</el-button>
|
|
|
+ </el-button-group>
|
|
|
+ <el-button class="inline-16" size="small" type="primary" plain>导 入</el-button>
|
|
|
<excel :tablecols="layout" :param="param" :total="total" :excelTitle="routerName"></excel>
|
|
|
</div>
|
|
|
- <el-button size="mini" slot="reference" icon="el-icon-more"></el-button>
|
|
|
- </el-popover>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="flex-align-center flex-between">
|
|
|
- <div class="flex-align-center">
|
|
|
- <el-input placeholder="请输入内容" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" style="width:300px" size="mini" class="input-with-select" clearable>
|
|
|
- <el-button slot="append" icon="el-icon-search" @click="listData(param.content.pageNumber = 1)">查 询</el-button>
|
|
|
- </el-input>
|
|
|
- <slot name="custom"></slot>
|
|
|
+ <slot name="titleRight"></slot>
|
|
|
+ </div>
|
|
|
+ <div class="normal-margin">
|
|
|
+ <setColumn :layout="layout" @changeColumn="changeColumn"></setColumn>
|
|
|
+ <setFixed :data="tableLayout" @onFixedClick="onFixedClick"></setFixed>
|
|
|
+ <i class="el-icon-refresh" @click="listData(param.content.pageNumber = 1,param.content.where.condition = '')"></i>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <setColumn :layout="layout" @changeColumn="changeColumn"></setColumn>
|
|
|
- <setFixed :data="tableLayout" @onFixedClick="onFixedClick"></setFixed>
|
|
|
- <i class="el-icon-refresh" @click="listData(param.content.pageNumber = 1,param.content.where.condition = '')"></i>
|
|
|
+ <div class="flex-align-center flex-between">
|
|
|
+ <div class="flex-align-center">
|
|
|
+ <el-input placeholder="请输入内容" suffix-icon="el-icon-search" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" style="width:200px" size="small" class="input-with-select inline-16" clearable>
|
|
|
+ <!-- <el-button slot="append" icon="el-icon-search" @click="listData(param.content.pageNumber = 1)">查 询</el-button> -->
|
|
|
+ </el-input>
|
|
|
+ <slot name="custom"></slot>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <tableComponent ref="table" v-if="refreshTable" :layout="tableLayout" :tableName="tableName" :custom="true" :data="list" :fixRightData="fixRightData" :fixLeftData="fixLeftData" @checkboxCallBack="checkboxCallBack">
|
|
|
- <template v-slot:customcol="scope">
|
|
|
- <slot :data="scope" name="tbList"></slot>
|
|
|
- </template>
|
|
|
- <template v-slot:opreation="scope">
|
|
|
- <cpEdit v-if="tool.checkAuth($route.name,'update')" :data="scope.data" btnType="text" :formPath="formPath" @onAddSuccess="listData(param.content.pageNumber = 1)"></cpEdit>
|
|
|
- <drawerTemp v-if="detailPath" :data="scope.data" :detailPath="detailPath" :idName="idName"></drawerTemp>
|
|
|
- <slot :data="scope" name="tbOpreation"></slot>
|
|
|
- </template>
|
|
|
- </tableComponent>
|
|
|
- <div class="container normal-panel" style="text-align:right">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- small
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="param.content.pageSize"
|
|
|
- :page-sizes="[20, 50, 100, 200]"
|
|
|
- layout="total,sizes, prev, pager, next, jumper"
|
|
|
- :total="total">
|
|
|
- </el-pagination>
|
|
|
+ <div class="normal-panel" style="padding:0 16px">
|
|
|
+ <tableComponent ref="table" v-if="refreshTable" :layout="tableLayout" :tableName="tableName" :custom="true" :data="list" :fixRightData="fixRightData" :fixLeftData="fixLeftData" @checkboxCallBack="checkboxCallBack">
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <slot :data="scope" name="tbList"></slot>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <!-- <cpEdit v-if="tool.checkAuth($route.name,'update')" :data="scope.data" btnType="text" :formPath="formPath" @onAddSuccess="listData(param.content.pageNumber = 1)"></cpEdit> -->
|
|
|
+ <drawerTemp v-if="detailPath" :data="scope.data" :detailPath="detailPath" :idName="idName"></drawerTemp>
|
|
|
+ <slot :data="scope" name="tbOpreation"></slot>
|
|
|
+ </template>
|
|
|
+ </tableComponent>
|
|
|
+ </div>
|
|
|
+ <div class="container normal-panel" style="text-align:right">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ small
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="param.content.pageSize"
|
|
|
+ :page-sizes="[20, 50, 100, 200]"
|
|
|
+ layout="total,sizes, prev, pager, next, jumper"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import excel from '@/components/export_excel/index.vue'
|
|
|
-
|
|
|
+import {mapGetters} from 'vuex'
|
|
|
export default {
|
|
|
props:['tableName','idName','tableData','apiId','formPath','options','autoQuery','detailPath'],
|
|
|
components:{
|
|
|
@@ -74,8 +71,12 @@ export default {
|
|
|
cpEdit: () => import('./modules/cpEdit'),
|
|
|
setFixed: () => import('./modules/setFixed'),
|
|
|
drawerTemp:() => import('./drawerDetail/index'),
|
|
|
-
|
|
|
- excel
|
|
|
+ excel:() => import('@/components/export_excel/index.vue'),
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ ...mapGetters({
|
|
|
+ acitveApp:'acitveApp'
|
|
|
+ })
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -92,7 +93,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
layout:[],
|
|
|
- fixRightData:[],
|
|
|
+ fixRightData:['operation'],
|
|
|
fixLeftData:[],
|
|
|
tableLayout:[],
|
|
|
selection:[],
|
|
|
@@ -175,13 +176,25 @@ export default {
|
|
|
this.fixLeftData = left
|
|
|
this.$refs['table'].checkFixed()
|
|
|
},
|
|
|
+ // 筛选列
|
|
|
changeColumn (arr) {
|
|
|
this.tableLayout = arr
|
|
|
this.refreshTable= false
|
|
|
setTimeout(() => {
|
|
|
this.refreshTable= true
|
|
|
}, 0);
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 创建快捷应用
|
|
|
+ async addToAsideBar () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "sysmanage.develop.userauthforweb.userauth",
|
|
|
+ "method": "create_usershortcuts",
|
|
|
+ "content": {
|
|
|
+ "systemappid":this.acitveApp.systemappid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$store.dispatch('setAppMenu')
|
|
|
+ },
|
|
|
},
|
|
|
mounted () {
|
|
|
this.autoQuery === false?'':this.listData()
|
|
|
@@ -204,5 +217,13 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style scoped>
|
|
|
-
|
|
|
+.radius{
|
|
|
+ border-radius:10px;
|
|
|
+ overflow: hidden;
|
|
|
+ box-shadow: 0 2px 5px rgb(0 0 0 / 10%);
|
|
|
+ transform: translate3d(0,-2px,0);
|
|
|
+}
|
|
|
+.basic__layout__panel{
|
|
|
+ padding: 16px 16px 16px 0;
|
|
|
+}
|
|
|
</style>
|