|
|
@@ -23,6 +23,7 @@
|
|
|
:pagination="pagination"
|
|
|
:selection-row="selection"
|
|
|
@action-event="handleAction"
|
|
|
+ @sort-change="handleSortChange"
|
|
|
@pagination-change="handlePaginationChange">
|
|
|
|
|
|
<template slot="wenjinachayue"
|
|
|
@@ -123,7 +124,7 @@ export default {
|
|
|
},
|
|
|
paginations: 20,
|
|
|
page: 1,
|
|
|
- sorts: {},
|
|
|
+ sorts: {NIAN_DU_: "desc"},
|
|
|
depth: '', // 分类栏层级
|
|
|
treeData: [], // 分类栏数据
|
|
|
guanJian: '',
|
|
|
@@ -151,7 +152,7 @@ export default {
|
|
|
},
|
|
|
// 表格字段配置
|
|
|
columns: [
|
|
|
- { prop: 'nian_du_', label: '年度', width: 80,dateFormat: 'yyyy' },
|
|
|
+ { prop: 'nian_du_', label: '年度', width: 80, dateFormat: 'yyyy', sortable: 'custom' },
|
|
|
{ prop: 'fen_lei_', label: '记录表单分类', width: 120 },
|
|
|
{ prop: 'biao_dan_ming_che', label: '表单名称', width: 350 },
|
|
|
{ prop: 'shi_wu_shuo_ming_', label: '事务说明', width: 350 },
|
|
|
@@ -216,10 +217,10 @@ export default {
|
|
|
) : (
|
|
|
startTimeWhere ? ' where ' + startTimeWhere : ''
|
|
|
)
|
|
|
- let where = nianduWhere?(this.guanJian ? nianduWhere + ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')` : nianduWhere):(
|
|
|
- this.guanJian? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`:''
|
|
|
+ let where = nianduWhere ? (this.guanJian ? nianduWhere + ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')` : nianduWhere) : (
|
|
|
+ this.guanJian ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'` : ''
|
|
|
)
|
|
|
- let sql = 'select * FROM t_ywyxjlb jl LEFT JOIN lh_bm_ry ry ON ry.ry_id = jl.bian_zhi_ren_' + where + ' order by bian_zhi_shi_jian desc'
|
|
|
+ let sql = 'select * FROM t_ywyxjlb jl LEFT JOIN lh_bm_ry ry ON ry.ry_id = jl.bian_zhi_ren_' + where + ` order by nian_du_ ${this.sorts.NIAN_DU_}, bian_zhi_shi_jian desc`
|
|
|
curdPost('sql', sql).then(response => {
|
|
|
let tableDatas = response.variables.data
|
|
|
if (tableDatas.length !== 0) {
|
|
|
@@ -271,10 +272,10 @@ export default {
|
|
|
) : (
|
|
|
nianduWhere ? nianduWhere : ``
|
|
|
)
|
|
|
- let where = idwhere?(this.guanJian ? idwhere + ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')` : idwhere):(
|
|
|
- this.guanJian? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`:''
|
|
|
+ let where = idwhere ? (this.guanJian ? idwhere + ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')` : idwhere) : (
|
|
|
+ this.guanJian ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'` : ''
|
|
|
)
|
|
|
- let sql = `select * FROM t_ywyxjlb jl LEFT JOIN lh_bm_ry ry ON ry.ry_id = jl.bian_zhi_ren_ ` + where + ` order by bian_zhi_shi_jian desc`
|
|
|
+ let sql = `select * FROM t_ywyxjlb jl LEFT JOIN lh_bm_ry ry ON ry.ry_id = jl.bian_zhi_ren_ ` + where + ` order by nian_du_ ${this.sorts.NIAN_DU_},bian_zhi_shi_jian desc`
|
|
|
console.log('22222')
|
|
|
|
|
|
curdPost('sql', sql).then(response => {
|
|
|
@@ -450,7 +451,13 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+/**
|
|
|
+ * 处理排序
|
|
|
+ */
|
|
|
+ handleSortChange(sort) {
|
|
|
+ ActionUtils.setSorts(this.sorts, sort)
|
|
|
+ this.loadData()
|
|
|
+ },
|
|
|
handleNodeClick(typeId, typeName, treeData) {
|
|
|
this.tableTitle = typeName.name
|
|
|
this.typeId = typeId
|