Commit 43d95c3b authored by danfuman's avatar danfuman

修改

parent a9279abe
......@@ -50,6 +50,7 @@
data.provinceId=this.provinceId
data.provinces=nodesObj.pathLabels
this.$parent.addressListbtn(data)
localStorage.setItem('location', true)
},
//地区
async dataRegion() {
......
......@@ -45,6 +45,12 @@
</el-table>
</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>
</template>
......@@ -66,11 +72,13 @@ export default {
data:[],
oneYear:'',
twoYear:'',
state:false
}
},
watch: {
provinceId(newValue, oldValue){
this.getData()
this.getGroupCount()
}
},
created() {
......@@ -116,10 +124,10 @@ export default {
}
}
for(let i=0; i<list.length; i++){
list[i].money=Number(list[i].money).toFixed(2)
list[i].rate=Number(list[i].rate).toFixed(2)
list[i].lastMoney=Number(list[i].lastMoney).toFixed(2)
list[i].lastRate=Number(list[i].lastRate).toFixed(2)
list[i].money=list[i].money ? Number(list[i].money).toFixed(2) : '-';
list[i].rate=list[i].rate ? Number(list[i].rate).toFixed(2) : '-';
list[i].lastMoney=list[i].lastMoney ? Number(list[i].lastMoney).toFixed(2) : '-';
list[i].lastRate=list[i].lastRate ? Number(list[i].lastRate).toFixed(2) : '-';
}
this.tableData=list.reverse()
}
......@@ -136,7 +144,17 @@ export default {
startTime=this.queryParams.year+'-01-01';
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){
let list=[]
for(let i=0; i<res.data.length; i++){
......@@ -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>
......@@ -279,10 +279,10 @@ export default {
}
},
created() {
this.getData()
let mydate=new Date();
this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1]
this.$nextTick(()=>{
this.getData()
// console.log(this.dataQuery)
})
},
......@@ -300,11 +300,6 @@ export default {
// }
},
watch: {
dataQuery: {
handler(newValue, oldValue) {
},
deep: true
},
provinceId(newValue, oldValue){
this.getData()
}
......
......@@ -63,7 +63,9 @@ export default {
}
},
created() {
this.dataQuery=this.$route.query;
//使用JSON方法深拷贝
let data = JSON.parse(JSON.stringify(this.$route.query))
this.dataQuery=data;
if(this.dataQuery.provinceId){
if(Array.isArray(this.dataQuery.province)){
this.province=this.dataQuery.province[0];
......@@ -71,9 +73,14 @@ export default {
this.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)
}
}else {
location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){
this.province=res.data.area
}else {
......@@ -99,13 +106,21 @@ export default {
}else {
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){
this.activeName=this.dataQuery.activeName;
}
// let name = sessionStorage.getItem('currentTab')
// if (name != "undefined" && name){
// this.activeName = name;
......
......@@ -110,6 +110,7 @@ export default {
},
created() {
location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){
this.province=res.data.area
}else {
......@@ -135,6 +136,16 @@ export default {
}else {
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.getData()
this.getStatistics()
......
......@@ -384,6 +384,7 @@ export default {
this.querySubmit()
}else {
location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){
this.province=res.data.area
}else {
......@@ -411,6 +412,17 @@ export default {
}else {
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()
})
}
......
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