Browse Source

分类项目bug修改

dev
jiangyy 4 years ago
parent
commit
fbf3676a2d
  1. 38
      epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/classifyList.vue
  2. 2
      epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/projectList.vue

38
epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/classifyList.vue

@ -69,7 +69,7 @@
style="width: 100%;margin-bottom: 20px;" style="width: 100%;margin-bottom: 20px;"
row-key="categoryCode" row-key="categoryCode"
border border
default-expand-all :default-expand-all="false"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="categoryName" <el-table-column prop="categoryName"
label="所属类别" label="所属类别"
@ -172,7 +172,6 @@ export default {
timeArray: ['', ''], timeArray: ['', ''],
// //
agencyName: '',
startTimeShow: '',// startTimeShow: '',//
endTimeShow: '', // endTimeShow: '', //
endTimeModel: new Date() - 60 * 60 * 24 * 2, endTimeModel: new Date() - 60 * 60 * 24 * 2,
@ -205,10 +204,20 @@ export default {
if (code === 0) { if (code === 0) {
++this.iscascaderShow ++this.iscascaderShow
this.casOptions = [] this.casOptions = []
this.agencyIdArray.length = [] this.agencyIdArray = []
this.tableParams.orgId = '' this.tableParams.orgId = ''
if (data) { if (data) {
//
this.selAgencyObj = {
agencyId: data.agencyId,
agencyName: data.agencyName,
level: data.level,
pid: data.pid,
}
this.casOptions.push(data) this.casOptions.push(data)
this.agencyIdArray.push(data.agencyId)
} }
} else { } else {
@ -218,7 +227,14 @@ export default {
async loadTable () { async loadTable () {
if (this.validate()) { if (this.validate()) {
const url = '/data/report/screen/project/selectprojectcategory' const url = '/data/report/screen/project/selectprojectcategory'
// const url = 'http://yapi.elinkservice.cn/mock/102/data/report/screen/project/selectprojectcategory'
if (this.selAgencyObj) {
this.tableParams.orgId = this.selAgencyObj.agencyId
this.tableParams.orgType = this.selAgencyObj.level
} else {
this.tableParams.orgId = ''
this.tableParams.orgType = ''
}
if (this.staticType === 'end') { if (this.staticType === 'end') {
this.tableParams.startTime = '' this.tableParams.startTime = ''
@ -249,14 +265,10 @@ export default {
handleChange (value) { handleChange (value) {
if (value && value.length > 0) { if (value && value.length > 0) {
this.selAgencyObj = this.$refs["myCascader"].getCheckedNodes()[0].data this.selAgencyObj = this.$refs["myCascader"].getCheckedNodes()[0].data
this.tableParams.orgId = this.selAgencyObj.agencyId
this.tableParams.orgType = this.selAgencyObj.level
this.agencyName = this.selAgencyObj.agencyName
} else { } else {
this.selAgencyObj = {} this.selAgencyObj = {}
this.tableParams.orgId = ''
this.tableParams.orgType = ''
this.agencyName = ''
} }
}, },
@ -326,7 +338,11 @@ export default {
if (!this.validate()) { if (!this.validate()) {
return false return false
} }
let title = this.agencyName let title = ''
if (this.selAgencyObj) {
title = this.selAgencyObj.agencyName
}
if (this.staticType === 'Interval') { if (this.staticType === 'Interval') {
title = title + ' ' + this.startTimeShow + '-' + this.endTimeShow + '区间增长值' title = title + ' ' + this.startTimeShow + '-' + this.endTimeShow + '区间增长值'

2
epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/projectList.vue

@ -238,7 +238,7 @@ export default {
initAgencyList (casOptions) { initAgencyList (casOptions) {
++this.iscascaderShow ++this.iscascaderShow
this.casOptions = [] this.casOptions = []
this.agencyIdArray.length = [] this.agencyIdArray = []
this.tableParams.orgId = '' this.tableParams.orgId = ''
if (casOptions) { if (casOptions) {
this.casOptions = casOptions this.casOptions = casOptions

Loading…
Cancel
Save