|
@@ -14,7 +14,7 @@
|
|
|
:operation-column-width="operationColumnWidth"
|
|
|
:show-table="showTable"
|
|
|
:code-gather="codeGather"
|
|
|
- @columnWidthChange="columnWidthChange"
|
|
|
+ @columnWidthChange="columnWidthChange"
|
|
|
@columnListChange="columnListChange"
|
|
|
>
|
|
|
<sel-export-column-list
|
|
@@ -28,6 +28,7 @@
|
|
|
|
|
|
<script>
|
|
|
|
|
|
+import { zfireSave, zfireDel } from "@/api/user";
|
|
|
import SelExportColumnList from './sel-export-column-list'
|
|
|
|
|
|
export default {
|
|
@@ -180,61 +181,61 @@ export default {
|
|
|
},
|
|
|
// 监听列表显示状态与排序变化
|
|
|
columnListChange(columnList) {
|
|
|
- // zfireSave(
|
|
|
- // this.$refs.zjpage.columnList.map((item, index) => {
|
|
|
- // var data = {
|
|
|
- // ...item.exportField,
|
|
|
- // sortNum: index,
|
|
|
- // isCopy: item.isCopy,
|
|
|
- // isTotal: item.isTotal,
|
|
|
- // isShow: !item.hidden,
|
|
|
- // moduleId: this.moduleId,
|
|
|
- // adminUserId: this.userid
|
|
|
- // }
|
|
|
- // return data
|
|
|
- // }),
|
|
|
- // this.moduleId
|
|
|
- // )
|
|
|
- // .then(res => {
|
|
|
- // })
|
|
|
- // .catch(err => {
|
|
|
- // this.$message.error('保存失败')
|
|
|
- // })
|
|
|
+ zfireSave(
|
|
|
+ this.$refs.zjpage.columnList.map((item, index) => {
|
|
|
+ var data = {
|
|
|
+ ...item.exportField,
|
|
|
+ sortNum: index,
|
|
|
+ isCopy: item.isCopy,
|
|
|
+ isTotal: item.isTotal,
|
|
|
+ isShow: !item.hidden,
|
|
|
+ moduleId: this.moduleId,
|
|
|
+ adminUserId: this.userid
|
|
|
+ }
|
|
|
+ return data
|
|
|
+ }),
|
|
|
+ this.moduleId
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('保存失败')
|
|
|
+ })
|
|
|
},
|
|
|
// 监听列宽度变化
|
|
|
columnWidthChange({ newWidth, oldWidth, column }) {
|
|
|
- // zfireSave(
|
|
|
- // this.$refs.zjpage.columnList.map((item, index) => {
|
|
|
- // if (item.exportField.jname === column.property) {
|
|
|
- // item.exportField.width = newWidth
|
|
|
- // }
|
|
|
- // return {
|
|
|
- // ...item.exportField,
|
|
|
- // sortNum: index,
|
|
|
- // isCopy: item.isCopy,
|
|
|
- // isTotal: item.isTotal,
|
|
|
- // isShow: !item.hidden,
|
|
|
- // moduleId: this.moduleId,
|
|
|
- // adminUserId: this.userid
|
|
|
- // }
|
|
|
- // }),
|
|
|
- // this.moduleId
|
|
|
- // )
|
|
|
- // .then(res => {
|
|
|
- // })
|
|
|
- // .catch(err => {
|
|
|
- // this.$message.error('保存失败')
|
|
|
- // })
|
|
|
+ zfireSave(
|
|
|
+ this.$refs.zjpage.columnList.map((item, index) => {
|
|
|
+ if (item.exportField.jname === column.property) {
|
|
|
+ item.exportField.width = newWidth
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...item.exportField,
|
|
|
+ sortNum: index,
|
|
|
+ isCopy: item.isCopy,
|
|
|
+ isTotal: item.isTotal,
|
|
|
+ isShow: !item.hidden,
|
|
|
+ moduleId: this.moduleId,
|
|
|
+ adminUserId: this.userid
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ this.moduleId
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('保存失败')
|
|
|
+ })
|
|
|
},
|
|
|
// 表格恢复初始默认状态
|
|
|
reduction() {
|
|
|
- // zfireDel({}, this.userid, this.moduleId)
|
|
|
- // .then(res => {
|
|
|
- // this.$refs.zjpage.refresh()
|
|
|
- // })
|
|
|
- // .catch(err => {
|
|
|
- // this.$message.error('操作失败')
|
|
|
- // })
|
|
|
+ zfireDel({}, this.userid, this.moduleId)
|
|
|
+ .then(res => {
|
|
|
+ this.$refs.zjpage.refresh()
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$message.error('操作失败')
|
|
|
+ })
|
|
|
},
|
|
|
// 导出
|
|
|
export() {
|