Browse Source

table组件左右侧操作列区分

master
安虹睿 1 year ago
parent
commit
55c2629862
  1. 2
      Code/Fe/README.md
  2. 10
      Code/Fe/src/components/commonTabel-drawer copy/index.vue
  3. 10
      Code/Fe/src/components/commonTabel-drawer/index.vue
  4. 14
      Code/Fe/src/components/tablePagination/index.vue
  5. 12
      Code/Fe/src/components/umyTable/index.vue
  6. 2
      Code/Fe/src/mixins/TableMixins.js
  7. 2
      Code/Fe/src/views/basicConfig/ExportCustomUserSetting.vue
  8. 6
      Code/Fe/src/views/interfaceBoard/TestSchool.vue

2
Code/Fe/README.md

@ -46,7 +46,7 @@ alertoldSkipCount 主列表-分页-当前页条数
alterResultCount 主列表-分页-每页最大页数 alterResultCount 主列表-分页-每页最大页数
handleSelectionChange 主列表-选择-行数据方法 tablePagination ==> currenTable handleSelectionChange 主列表-选择-行数据方法 tablePagination ==> currenTable
<----20230207添加 begin----> <----20230207添加 begin---->
buttonOperationClick 主列表-操作列按钮点击事件 buttonOperationClick_left 主列表-操作列按钮点击事件
currentPageProps 主列表-当前页码值 currentPageProps 主列表-当前页码值
使用的是@/mixins/TableMixins的oldSkipCount值 使用的是@/mixins/TableMixins的oldSkipCount值
quicklySearchOption 主表查询-快速搜索数据配置 ==> 通用配置在@/utils/quicklySearchOption/index quicklySearchOption 主表查询-快速搜索数据配置 ==> 通用配置在@/utils/quicklySearchOption/index

10
Code/Fe/src/components/commonTabel-drawer copy/index.vue

@ -117,8 +117,8 @@
@handleSelectionChange="handleSelectionChange" @handleSelectionChange="handleSelectionChange"
@inlineDialog="inlineDialog" @inlineDialog="inlineDialog"
@buttonClick="buttonClick" @buttonClick="buttonClick"
:buttonOperationList="buttonOperationList" :buttonOperationList_left="buttonOperationList_left"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick_left="buttonOperationClick_left"
> >
<template> <template>
<slot></slot> <slot></slot>
@ -257,7 +257,7 @@ export default {
], ],
props: { props: {
// //
buttonOperationList:{ buttonOperationList_left:{
type: Array, type: Array,
default: null, default: null,
}, },
@ -479,7 +479,7 @@ export default {
this.displayDialog.detailInfoDialog = val || false this.displayDialog.detailInfoDialog = val || false
}, },
// - // -
buttonOperationClick(row, item, index){ buttonOperationClick_left(row, item, index){
// //
if(item.name == "info"){ if(item.name == "info"){
this.displayDialog.detailInfoDialog = true this.displayDialog.detailInfoDialog = true
@ -487,7 +487,7 @@ export default {
let _name = allUrlOption[this.$route.name].detailInfoName let _name = allUrlOption[this.$route.name].detailInfoName
this.detailInfoTitle = _name ? row[_name] + ' 详情' : '详情' this.detailInfoTitle = _name ? row[_name] + ' 详情' : '详情'
} }
this.$emit('buttonOperationClick',row, item, index) this.$emit('buttonOperationClick_left',row, item, index)
}, },
rowDrop(data,type) { rowDrop(data,type) {
this.$emit('rowDrop',data,type) this.$emit('rowDrop',data,type)

10
Code/Fe/src/components/commonTabel-drawer/index.vue

@ -78,8 +78,8 @@
:currentPageProps="oldSkipCount" :currentPageProps="oldSkipCount"
@overallSearchFormClick="overallSearchClickForDetail" @overallSearchFormClick="overallSearchClickForDetail"
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList="buttonOperationList" :buttonOperationList_left="buttonOperationList_left"
:tableLoading="Loading.tableLoading" :tableLoading="Loading.tableLoading"
></tablePagination> ></tablePagination>
<!-- 新增汇总 表头 区分明细表头使用 summaryTableColumns --> <!-- 新增汇总 表头 区分明细表头使用 summaryTableColumns -->
@ -205,7 +205,7 @@ export default {
], ],
props: { props: {
// //
buttonOperationList:{ buttonOperationList_left:{
type: Array, type: Array,
default: null, default: null,
}, },
@ -531,7 +531,7 @@ export default {
this.displayDialog.detailInfoDialog = val || false this.displayDialog.detailInfoDialog = val || false
}, },
// - // -
buttonOperationClick(row, item, index){ buttonOperationClick_left(row, item, index){
// //
if(item.name == "info"){ if(item.name == "info"){
this.displayDialog.detailInfoDialog = true this.displayDialog.detailInfoDialog = true
@ -539,7 +539,7 @@ export default {
let _name = allUrlOption[this.$route.name].detailInfoName let _name = allUrlOption[this.$route.name].detailInfoName
this.detailInfoTitle = _name ? row[_name] + ' 详情' : '详情' this.detailInfoTitle = _name ? row[_name] + ' 详情' : '详情'
} }
this.$emit('buttonOperationClick',row, item, index) this.$emit('buttonOperationClick_left',row, item, index)
}, },
rowDrop(data,type) { rowDrop(data,type) {
this.$emit('rowDrop',data,type) this.$emit('rowDrop',data,type)

14
Code/Fe/src/components/tablePagination/index.vue

@ -51,8 +51,8 @@
@sortChange="sortChange" @sortChange="sortChange"
@handleSelectionChange="handleSelectionChange" @handleSelectionChange="handleSelectionChange"
@inlineDialog="inlineDialog" @inlineDialog="inlineDialog"
:buttonOperationList="buttonOperationList" :buttonOperationList_left="buttonOperationList_left"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick_left="buttonOperationClick_left"
:tableBorder="true" :tableBorder="true"
:firstFixed="true" :firstFixed="true"
:cellStyle = "cellStyle" :cellStyle = "cellStyle"
@ -116,7 +116,7 @@ export default {
} }
}, },
// //
buttonOperationList:{ buttonOperationList_left:{
type: Array, type: Array,
default: null, default: null,
}, },
@ -342,12 +342,8 @@ export default {
this.$emit('sortChange', data) this.$emit('sortChange', data)
}, },
//table //table
buttonOperationClick(row, index, label) { buttonOperationClick_left(row, index, label) {
this.$emit("buttonOperationClick", row, index, label); this.$emit("buttonOperationClick_left", row, index, label);
},
//table
buttonOperationClick(row, item, index) {
this.$emit("buttonOperationClick", row, item, index);
}, },
// //
// /showSearchOverall // /showSearchOverall

12
Code/Fe/src/components/umyTable/index.vue

@ -21,7 +21,7 @@
<!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式--> <!-- :tree-props="treeProps" height 不能共存 此组件暂不支持tree的格式-->
<!-- 操作列 --> <!-- 操作列 -->
<u-table-column <u-table-column
v-if="buttonOperationList" v-if="buttonOperationList_left"
:fixed="'left'" :fixed="'left'"
:width="120" :width="120"
:align="'center'" :align="'center'"
@ -32,11 +32,11 @@
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-for="(itemButton, indexButton) in buttonOperationList" v-for="(itemButton, indexButton) in buttonOperationList_left"
:key="indexButton" :key="indexButton"
type="text" type="text"
size="mini" size="mini"
@click="buttonOperationClick(scope.row, itemButton, indexButton)" @click="buttonOperationClick_left(scope.row, itemButton, indexButton)"
>{{itemButton.label}}</el-button> >{{itemButton.label}}</el-button>
</template> </template>
</u-table-column> </u-table-column>
@ -442,7 +442,7 @@ export default {
}, },
props: { props: {
// //
buttonOperationList:{ buttonOperationList_left:{
type: Array, type: Array,
default: null, default: null,
}, },
@ -881,8 +881,8 @@ export default {
this.$emit("buttonClick", row, index, label); this.$emit("buttonClick", row, index, label);
}, },
//table //table
buttonOperationClick(row, item, index) { buttonOperationClick_left(row, item, index) {
this.$emit("buttonOperationClick", row, item, index); this.$emit("buttonOperationClick_left", row, item, index);
}, },
}, },
}; };

2
Code/Fe/src/mixins/TableMixins.js

@ -240,7 +240,7 @@ export const tableMixins = {
* @param {*} item 按钮信息 * @param {*} item 按钮信息
* @param {*} index 按钮索引 * @param {*} index 按钮索引
*/ */
buttonOperationClick(row, item, index) { buttonOperationClick_left(row, item, index) {
// 获取当前行数据,赋值给 propsData // 获取当前行数据,赋值给 propsData
this.propsData = row this.propsData = row
// 查看详情 // 查看详情

2
Code/Fe/src/views/basicConfig/ExportCustomUserSetting.vue

@ -17,7 +17,7 @@
@alertoldSkipCount="alertoldSkipCount" @alertoldSkipCount="alertoldSkipCount"
@alterResultCount="alterResultCount" @alterResultCount="alterResultCount"
@handleSelectionChange="handleSelectionChange" @handleSelectionChange="handleSelectionChange"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick_left="buttonOperationClick_left"
:currentPageProps="oldSkipCount" :currentPageProps="oldSkipCount"
:quicklySearchOption="quicklySearchOption" :quicklySearchOption="quicklySearchOption"
@quicklySearchClick="quicklySearchClick" @quicklySearchClick="quicklySearchClick"

6
Code/Fe/src/views/interfaceBoard/TestSchool.vue

@ -23,8 +23,8 @@
:primarySearchOption="primarySearchOption" :primarySearchOption="primarySearchOption"
@overallSearchFormClick="overallSearchFormClick" @overallSearchFormClick="overallSearchFormClick"
:httpOverallSearchData="httpOverallSearchData" :httpOverallSearchData="httpOverallSearchData"
@buttonOperationClick="buttonOperationClick" @buttonOperationClick_left="buttonOperationClick_left"
:buttonOperationList="operationButtonsTable" :buttonOperationList_left="operationButtonsTable"
></tablePagination> ></tablePagination>
<curren-Drawer <curren-Drawer
ref="currenDrawer_Ref" ref="currenDrawer_Ref"
@ -46,7 +46,7 @@
:MaxResultCount="MaxResultCountDetails" :MaxResultCount="MaxResultCountDetails"
@alterResultCountDetails="alterResultCountDetails" @alterResultCountDetails="alterResultCountDetails"
@alertoldSkipCountDetails="alertoldSkipCountDetails" @alertoldSkipCountDetails="alertoldSkipCountDetails"
:buttonOperationList="operationButtonsDetail" :buttonOperationList_left="operationButtonsDetail"
></curren-Drawer> ></curren-Drawer>
<!-- 新增与编辑 --> <!-- 新增与编辑 -->
<newAndEdiDialog <newAndEdiDialog

Loading…
Cancel
Save