【update】-联调 修改bug

This commit is contained in:
fengchenchen
2023-03-14 14:56:37 +08:00
parent 5255214b63
commit 497e676234
2 changed files with 36 additions and 18 deletions
+2 -2
View File
@@ -256,11 +256,11 @@ export default {
// echarts 的点击事件
chartClickFunc(params) {
console.log('--------顺序----------', params)
// 获取当前点击的饼状图的名字
let queryData = {
name: params.data.name, // 名字
type: params.dataIndex + 1 // 序号
type: params.dataIndex + 1, // 序号
departCode: this.queryParam.departCode, // 部门code
}
this.$refs.notReceivedModal.show(queryData)
@@ -20,6 +20,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange"
:class="dataSource.length === 0 ? 'show-scroll' : ''"
class="j-table-force-nowrap main-table">
@@ -199,6 +200,11 @@ const firstColumnFooter = {
width: 60
}
const defaultSorter = {
column: 'createTime',
order: 'desc'
}
export default {
name: 'NotReceivedModal',
components: {
@@ -216,11 +222,11 @@ export default {
columnsFooter: [firstColumnFooter, ...defaultTableColumns],
footerDataSource: [],
url: {
list: '/statistics/allProjectStatistics/list'
list: '/index/uncollectedList'
},
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
queryParam: {
year: new Date().getFullYear().toString()
},
/* 数据源 */
dataSource: [],
@@ -250,11 +256,13 @@ export default {
* 显示模态框
* seriesName 名字
* type 序号
* departCode 部门code编码
* */
show({seriesName, type}) {
show({name, type, departCode}) {
this.visible = true
this.seriesName = seriesName || ''
this.seriesName = name || ''
this.queryParam.type = type // 查询的序号
this.queryParam.departCode = departCode || '' // 查询的序号
this.dataSource = []
this.footerDataSource = []
this.searchReset()
@@ -279,7 +287,6 @@ export default {
)
},
getQueryField() {
//TODO 字段权限控制
var str = 'id,'
if (this.columns && this.columns.length) {
this.columns.forEach(function (value) {
@@ -289,16 +296,12 @@ export default {
return str
},
getQueryParams() {
var param = Object.assign({ }, this.queryParam, this.isorter, this.filters)
param.field = this.getQueryField()
let param = Object.assign({ }, this.queryParam, this.isorter)
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
return filterObj(param)
},
searchReset() {
this.queryParam = {
year: new Date().getFullYear().toString()
}
this.loadData(1)
},
loadData(arg) {
@@ -311,12 +314,6 @@ export default {
this.ipagination.current = 1
}
let params = this.getQueryParams()//查询条件
if (params.hasOwnProperty.call(params, 'allMoney') && params.hasOwnProperty.call(params, 'allMoneyTwo')) {
if (Number(params.allMoney) > Number(params.allMoneyTwo)) {
this.$message.warn('应收款项范围不正确,请修改')
return
}
}
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
@@ -349,6 +346,27 @@ export default {
this.loading = false
})
},
handleTableChange(pagination, filters, sorter) {
//分页、排序、筛选变化时触发
//筛选
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field
if (sorter.order) {
// 如果当前有列选中筛选条件
this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
} else {
// 没有筛选值则 isorter 重置为初始值
this.isorter.column = defaultSorter.column
this.isorter.order = defaultSorter.order
}
} else {
this.isorter.column = defaultSorter.column
this.isorter.order = defaultSorter.order
}
this.ipagination = pagination
this.loadData()
},
handleOk() {
this.visible = false
},