Commit 43d95c3b authored by danfuman's avatar danfuman

修改

parent a9279abe
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
data.provinceId=this.provinceId data.provinceId=this.provinceId
data.provinces=nodesObj.pathLabels data.provinces=nodesObj.pathLabels
this.$parent.addressListbtn(data) this.$parent.addressListbtn(data)
localStorage.setItem('location', true)
}, },
//地区 //地区
async dataRegion() { async dataRegion() {
......
...@@ -45,6 +45,12 @@ ...@@ -45,6 +45,12 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<!--<div class="content content-box" v-else>-->
<!--<div class="empty">-->
<!--<img class="img" src="@/assets/images/project/empty.png">-->
<!--<div class="p1">抱歉,暂无专项债项目数据</div>-->
<!--</div>-->
<!--</div>-->
</div> </div>
</template> </template>
...@@ -66,11 +72,13 @@ export default { ...@@ -66,11 +72,13 @@ export default {
data:[], data:[],
oneYear:'', oneYear:'',
twoYear:'', twoYear:'',
state:false
} }
}, },
watch: { watch: {
provinceId(newValue, oldValue){ provinceId(newValue, oldValue){
this.getData() this.getData()
this.getGroupCount()
} }
}, },
created() { created() {
...@@ -116,10 +124,10 @@ export default { ...@@ -116,10 +124,10 @@ export default {
} }
} }
for(let i=0; i<list.length; i++){ for(let i=0; i<list.length; i++){
list[i].money=Number(list[i].money).toFixed(2) list[i].money=list[i].money ? Number(list[i].money).toFixed(2) : '-';
list[i].rate=Number(list[i].rate).toFixed(2) list[i].rate=list[i].rate ? Number(list[i].rate).toFixed(2) : '-';
list[i].lastMoney=Number(list[i].lastMoney).toFixed(2) list[i].lastMoney=list[i].lastMoney ? Number(list[i].lastMoney).toFixed(2) : '-';
list[i].lastRate=Number(list[i].lastRate).toFixed(2) list[i].lastRate=list[i].lastRate ? Number(list[i].lastRate).toFixed(2) : '-';
} }
this.tableData=list.reverse() this.tableData=list.reverse()
} }
...@@ -136,7 +144,17 @@ export default { ...@@ -136,7 +144,17 @@ export default {
startTime=this.queryParams.year+'-01-01'; startTime=this.queryParams.year+'-01-01';
endTime=this.queryParams.year+'-12-31'; endTime=this.queryParams.year+'-12-31';
} }
bidGroupCountByProjectType({startDate:startTime,endDate:endTime}).then(res => { let params={startDate:startTime,endDate:endTime}
if(this.provinceId.length >= 0){
params.province=this.provinceId[0]
}
if(this.provinceId.length >= 1){
params.city=this.provinceId[1]
}
if(this.provinceId.length >= 2){
params.county=this.provinceId[2]
}
bidGroupCountByProjectType(params).then(res => {
if(res.code === 200){ if(res.code === 200){
let list=[] let list=[]
for(let i=0; i<res.data.length; i++){ for(let i=0; i<res.data.length; i++){
...@@ -318,6 +336,26 @@ export default { ...@@ -318,6 +336,26 @@ export default {
} }
} }
} }
.empty{
margin: 0 auto;
height: 550px;
text-align: center;
.img{
width: 108px;
height: 108px;
margin-bottom: 24px;
margin-top: 150px;
}
.p1{
color: #333333;
font-size: 16px;
}
.p2{
color: #999999;
font-size: 14px;
margin-top: 8px;
}
}
} }
} }
</style> </style>
...@@ -279,10 +279,10 @@ export default { ...@@ -279,10 +279,10 @@ export default {
} }
}, },
created() { created() {
this.getData()
let mydate=new Date(); let mydate=new Date();
this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1] this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1]
this.$nextTick(()=>{ this.$nextTick(()=>{
this.getData()
// console.log(this.dataQuery) // console.log(this.dataQuery)
}) })
}, },
...@@ -300,11 +300,6 @@ export default { ...@@ -300,11 +300,6 @@ export default {
// } // }
}, },
watch: { watch: {
dataQuery: {
handler(newValue, oldValue) {
},
deep: true
},
provinceId(newValue, oldValue){ provinceId(newValue, oldValue){
this.getData() this.getData()
} }
......
...@@ -63,7 +63,9 @@ export default { ...@@ -63,7 +63,9 @@ export default {
} }
}, },
created() { created() {
this.dataQuery=this.$route.query; //使用JSON方法深拷贝
let data = JSON.parse(JSON.stringify(this.$route.query))
this.dataQuery=data;
if(this.dataQuery.provinceId){ if(this.dataQuery.provinceId){
if(Array.isArray(this.dataQuery.province)){ if(Array.isArray(this.dataQuery.province)){
this.province=this.dataQuery.province[0]; this.province=this.dataQuery.province[0];
...@@ -71,9 +73,14 @@ export default { ...@@ -71,9 +73,14 @@ export default {
this.province=this.dataQuery.province this.province=this.dataQuery.province
this.dataQuery.province = [this.dataQuery.province]; this.dataQuery.province = [this.dataQuery.province];
} }
if(Array.isArray(this.dataQuery.provinceId)){
this.provinceId=this.dataQuery.provinceId
}else {
this.provinceId.push(this.dataQuery.provinceId) this.provinceId.push(this.dataQuery.provinceId)
}
}else { }else {
location({}).then(res => { location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){ if(res.data.area){
this.province=res.data.area this.province=res.data.area
}else { }else {
...@@ -99,13 +106,21 @@ export default { ...@@ -99,13 +106,21 @@ export default {
}else { }else {
this.provinceId=this.dataQuery.provinceId this.provinceId=this.dataQuery.provinceId
} }
}else {
this.province=res.data.province
if(!this.dataQuery.provinceId){
this.provinceId=[res.data.provinceId]
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
}
}) })
} }
if(this.dataQuery.activeName){ if(this.dataQuery.activeName){
this.activeName=this.dataQuery.activeName; this.activeName=this.dataQuery.activeName;
} }
// let name = sessionStorage.getItem('currentTab') // let name = sessionStorage.getItem('currentTab')
// if (name != "undefined" && name){ // if (name != "undefined" && name){
// this.activeName = name; // this.activeName = name;
......
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
}, },
created() { created() {
location({}).then(res => { location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){ if(res.data.area){
this.province=res.data.area this.province=res.data.area
}else { }else {
...@@ -135,6 +136,16 @@ export default { ...@@ -135,6 +136,16 @@ export default {
}else { }else {
this.provinceId=this.dataQuery.provinceId this.provinceId=this.dataQuery.provinceId
} }
}else {
this.province=res.data.province;
if(!this.dataQuery.provinceId){
this.provinceId=[res.data.provinceId]
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
}
this.$nextTick(() => { this.$nextTick(() => {
this.getData() this.getData()
this.getStatistics() this.getStatistics()
......
...@@ -384,6 +384,7 @@ export default { ...@@ -384,6 +384,7 @@ export default {
this.querySubmit() this.querySubmit()
}else { }else {
location({}).then(res => { location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){ if(res.data.area){
this.province=res.data.area this.province=res.data.area
}else { }else {
...@@ -411,6 +412,17 @@ export default { ...@@ -411,6 +412,17 @@ export default {
}else { }else {
this.provinceId=this.dataQuery.provinceId this.provinceId=this.dataQuery.provinceId
} }
}else {
this.province=res.data.province
if(!this.dataQuery.provinceId){
this.provinceId=[res.data.provinceId]
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
}
this.querySubmit() this.querySubmit()
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment