【update】-联调 修改bug
This commit is contained in:
@@ -256,11 +256,11 @@ export default {
|
|||||||
// echarts 的点击事件
|
// echarts 的点击事件
|
||||||
|
|
||||||
chartClickFunc(params) {
|
chartClickFunc(params) {
|
||||||
console.log('--------顺序----------', params)
|
|
||||||
// 获取当前点击的饼状图的名字
|
// 获取当前点击的饼状图的名字
|
||||||
let queryData = {
|
let queryData = {
|
||||||
name: params.data.name, // 名字
|
name: params.data.name, // 名字
|
||||||
type: params.dataIndex + 1 // 序号
|
type: params.dataIndex + 1, // 序号
|
||||||
|
departCode: this.queryParam.departCode, // 部门code
|
||||||
}
|
}
|
||||||
this.$refs.notReceivedModal.show(queryData)
|
this.$refs.notReceivedModal.show(queryData)
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
@change="handleTableChange"
|
||||||
:class="dataSource.length === 0 ? 'show-scroll' : ''"
|
:class="dataSource.length === 0 ? 'show-scroll' : ''"
|
||||||
class="j-table-force-nowrap main-table">
|
class="j-table-force-nowrap main-table">
|
||||||
|
|
||||||
@@ -199,6 +200,11 @@ const firstColumnFooter = {
|
|||||||
width: 60
|
width: 60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const defaultSorter = {
|
||||||
|
column: 'createTime',
|
||||||
|
order: 'desc'
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NotReceivedModal',
|
name: 'NotReceivedModal',
|
||||||
components: {
|
components: {
|
||||||
@@ -216,11 +222,11 @@ export default {
|
|||||||
columnsFooter: [firstColumnFooter, ...defaultTableColumns],
|
columnsFooter: [firstColumnFooter, ...defaultTableColumns],
|
||||||
footerDataSource: [],
|
footerDataSource: [],
|
||||||
url: {
|
url: {
|
||||||
list: '/statistics/allProjectStatistics/list'
|
list: '/index/uncollectedList'
|
||||||
},
|
},
|
||||||
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
|
/* 查询条件-请不要在queryParam中声明非字符串值的属性 */
|
||||||
queryParam: {
|
queryParam: {
|
||||||
year: new Date().getFullYear().toString()
|
|
||||||
},
|
},
|
||||||
/* 数据源 */
|
/* 数据源 */
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -250,11 +256,13 @@ export default {
|
|||||||
* 显示模态框
|
* 显示模态框
|
||||||
* seriesName 名字
|
* seriesName 名字
|
||||||
* type 序号
|
* type 序号
|
||||||
|
* departCode 部门code编码
|
||||||
* */
|
* */
|
||||||
show({seriesName, type}) {
|
show({name, type, departCode}) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.seriesName = seriesName || ''
|
this.seriesName = name || ''
|
||||||
this.queryParam.type = type // 查询的序号
|
this.queryParam.type = type // 查询的序号
|
||||||
|
this.queryParam.departCode = departCode || '' // 查询的序号
|
||||||
this.dataSource = []
|
this.dataSource = []
|
||||||
this.footerDataSource = []
|
this.footerDataSource = []
|
||||||
this.searchReset()
|
this.searchReset()
|
||||||
@@ -279,7 +287,6 @@ export default {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
getQueryField() {
|
getQueryField() {
|
||||||
//TODO 字段权限控制
|
|
||||||
var str = 'id,'
|
var str = 'id,'
|
||||||
if (this.columns && this.columns.length) {
|
if (this.columns && this.columns.length) {
|
||||||
this.columns.forEach(function (value) {
|
this.columns.forEach(function (value) {
|
||||||
@@ -289,16 +296,12 @@ export default {
|
|||||||
return str
|
return str
|
||||||
},
|
},
|
||||||
getQueryParams() {
|
getQueryParams() {
|
||||||
var param = Object.assign({ }, this.queryParam, this.isorter, this.filters)
|
let param = Object.assign({ }, this.queryParam, this.isorter)
|
||||||
param.field = this.getQueryField()
|
|
||||||
param.pageNo = this.ipagination.current
|
param.pageNo = this.ipagination.current
|
||||||
param.pageSize = this.ipagination.pageSize
|
param.pageSize = this.ipagination.pageSize
|
||||||
return filterObj(param)
|
return filterObj(param)
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.queryParam = {
|
|
||||||
year: new Date().getFullYear().toString()
|
|
||||||
}
|
|
||||||
this.loadData(1)
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
@@ -311,12 +314,6 @@ export default {
|
|||||||
this.ipagination.current = 1
|
this.ipagination.current = 1
|
||||||
}
|
}
|
||||||
let params = this.getQueryParams()//查询条件
|
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
|
this.loading = true
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -349,6 +346,27 @@ export default {
|
|||||||
this.loading = false
|
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() {
|
handleOk() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user