Commit 1cfbe001 authored by danfuman's avatar danfuman

修改

parent bf92e4a9
...@@ -215,6 +215,13 @@ export function claim(param) { ...@@ -215,6 +215,13 @@ export function claim(param) {
data: param data: param
}) })
} }
//城投平台-取消认领
export function cancelClaim(name) {
return request({
url:`/customer/cancelClaim/`+name,
method: 'PUT',
})
}
//批量获取城投企业id //批量获取城投企业id
export function getUipIdByCid(param) { export function getUipIdByCid(param) {
return request({ return request({
......
<template>
<div class="region">
<div class="region_left">
<span class="province">{{province}}</span>
<span class="icon">
<i class="el-icon-location"></i>
切换
</span>
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'
@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>
</div>
</div>
</template>
<script>
import { location } from '@/api/macro/macro'
import dataRegion from '@/assets/json/dataRegion'
export default {
name:'region',
props:['province','dataQuery'],
data(){
return {
props: {
value: 'id',
label: 'label',
checkStrictly: true
},
addressList: [],
address:'',
provinceId:[],
location:''
}
},
watch: {
province(newValue, oldValue){
this.location = newValue;
},
},
created(){
this.dataRegion()
this.location=this.province
},
methods:{
addressListbtn() {
let nodesObj = this.$refs.address.getCheckedNodes()[0];
this.location=nodesObj.pathLabels[nodesObj.pathLabels.length-1];
this.provinceId=nodesObj.path;
let data={}
data.province=this.location
data.provinceId=this.provinceId
data.provinces=nodesObj.pathLabels
this.$parent.addressListbtn(data)
},
//地区
async dataRegion() {
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, {
// headers: {
// 'Content-Type': 'application/json'
// }
// }).then(res => {
// if (res.data.code == 200) {
// console.log(res.data.data)
// }
// })
var str = [];
for (let x = 0; x < 3; x++) {
for (let i = 0; i < dataRegion.length; i++) {
if (dataRegion[i].regionLevel == x + 1 && x + 1 == 1) {
str.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 2) {
for (let j = 0; j < str.length; j++) {
if (str[j].id == dataRegion[i].parentId) {
str[j].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}
}
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 3) {
for (let j = 0; j < str.length; j++) {
for (let k = 0; k < str[j].children.length; k++) {
if (str[j].children[k].id == dataRegion[i].parentId) {
str[j].children[k].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId
// "children":[]
});
}
}
}
}
}
}
this.addressList = str;
},
}
}
</script>
<style lang="scss" scoped>
.region{
height: 48px;
background: #F8FBFF;
border-radius: 4px;
margin-bottom: 12px;
.region_left{
background: url("~@/assets/images/economies/img_bg.png") no-repeat;
background-size: 100%;
width: 603px;
height: 48px;
position: relative;
padding-left: 16px;
.province{
font-size: 20px;
cursor: pointer;
font-weight: 700;
color: #004F9C;
margin-right: 12px;
line-height: 48px;
height: 48px;
float: left;
}
.icon{
width: 24px;
color: #0081FF;
font-size: 12px;
display: inline-block;
height: 48px;
i{
margin-left: 4px;
font-size: 16px;
color:#0081FF;
padding-top: 7px;
}
}
.cascader-region {
position: absolute;
left: 20px;
top: 8px;
opacity: 0;
line-height: 22px;
width: 100px;
}
}
}
</style>
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
<div class="content content2"> <div class="content content2">
<div class="common-title">经济信息</div> <div class="common-title">经济信息</div>
<div class="content-box"> <div class="content-box">
<span @click="childMethod(1)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_1.png">下属辖区 <label>{{recentlyYear.subordinateJurisdiction}}<i></i></label></span> <span class="text" @click="childMethod(1)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_1.png"><span>下属辖区</span> <label>{{recentlyYear.subordinateJurisdiction}}<i></i></label></span>
<span @click="childMethod(2)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_2.png">城投平台 <label>{{recentlyYear.urbanInvestmentPlatform}}<i></i></label></span> <span class="text" @click="childMethod(2)" style="cursor: pointer;"><img src="@/assets/images/economies/icon_2.png"><span>城投平台</span> <label>{{recentlyYear.urbanInvestmentPlatform}}<i></i></label></span>
<span><img src="@/assets/images/economies/icon_3.png">城投平台授信余额 <label>{{recentlyYear.creditBalance}}<i>亿</i></label></span> <span class="text"><img src="@/assets/images/economies/icon_3.png"><span>城投平台授信余额</span> <label>{{recentlyYear.creditBalance}}<i>亿</i></label></span>
<span><img src="@/assets/images/economies/icon_4.png">城投平台应收账款 <label>{{recentlyYear.accountsReceivable}}<i>亿</i></label></span> <span class="text"><img src="@/assets/images/economies/icon_4.png"><span>城投平台应收账款</span> <label>{{recentlyYear.accountsReceivable}}<i>亿</i></label></span>
<span><img src="@/assets/images/economies/icon_5.png">城投平台有息债务 <label>{{recentlyYear.uipInterestBearingDebt}}<i>亿</i></label></span> <span class="text"><img src="@/assets/images/economies/icon_5.png"><span>城投平台有息债务</span> <label>{{recentlyYear.uipInterestBearingDebt}}<i>亿</i></label></span>
</div> </div>
</div> </div>
<div class="content content3"> <div class="content content3">
...@@ -762,7 +762,7 @@ export default { ...@@ -762,7 +762,7 @@ export default {
.content2{ .content2{
.content-box{ .content-box{
margin-top: 18px; margin-top: 18px;
span{ .text{
border-right: 1px solid #E4E4E4; border-right: 1px solid #E4E4E4;
display: inline-block; display: inline-block;
color: rgba(35,35,35,0.8); color: rgba(35,35,35,0.8);
...@@ -770,11 +770,15 @@ export default { ...@@ -770,11 +770,15 @@ export default {
padding-left: 16px; padding-left: 16px;
width: 20%; width: 20%;
line-height: 26px; line-height: 26px;
position: relative;
span{
padding-left: 24px;
}
img{ img{
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-right: 4px; position: absolute;
margin-bottom: -4px; top: 4px;
} }
label{ label{
font-weight: 700; font-weight: 700;
......
<template> <template>
<div class="app-container"> <div class="app-container">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="flex-box eco-header"> <div class="flex-box eco-header">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="地区经济" name="first"></el-tab-pane> <el-tab-pane label="地区经济" name="first"></el-tab-pane>
...@@ -7,20 +8,20 @@ ...@@ -7,20 +8,20 @@
<el-tab-pane label="产业结构" name="third"></el-tab-pane> <el-tab-pane label="产业结构" name="third"></el-tab-pane>
<el-tab-pane label="地区经济对比" name="four"></el-tab-pane> <el-tab-pane label="地区经济对比" name="four"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="location"> <!--<div class="location">-->
<span><i class="el-icon-location"></i>{{province}}</span> <!--<span><i class="el-icon-location"></i>{{province}}</span>-->
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd' <!--<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'-->
@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader> <!--@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>-->
<!--<el-select v-model="provinceId" class="cascader-region">--> <!--&lt;!&ndash;<el-select v-model="provinceId" class="cascader-region">&ndash;&gt;-->
<!--<el-option--> <!--&lt;!&ndash;<el-option&ndash;&gt;-->
<!--v-for="(item,index) in addressList"--> <!--&lt;!&ndash;v-for="(item,index) in addressList"&ndash;&gt;-->
<!--:key="index"--> <!--&lt;!&ndash;:key="index"&ndash;&gt;-->
<!--:label="item.label"--> <!--&lt;!&ndash;:label="item.label"&ndash;&gt;-->
<!--:value="item.id"--> <!--&lt;!&ndash;:value="item.id"&ndash;&gt;-->
<!--@click.native="addressListbtn(item.label,item.id)"--> <!--&lt;!&ndash;@click.native="addressListbtn(item.label,item.id)"&ndash;&gt;-->
<!--&gt;</el-option>--> <!--&lt;!&ndash;&gt;</el-option>&ndash;&gt;-->
<!--</el-select>--> <!--&lt;!&ndash;</el-select>&ndash;&gt;-->
</div> <!--</div>-->
</div> </div>
<RegionalEconomy v-if="activeName === 'first' && province" :dataQuery="dataQuery" :provinceId="provinceId"></RegionalEconomy> <RegionalEconomy v-if="activeName === 'first' && province" :dataQuery="dataQuery" :provinceId="provinceId"></RegionalEconomy>
<LocalEconomy v-if="activeName === 'second' && province" :dataQuery="dataQuery" :provinceId="provinceId"></LocalEconomy> <LocalEconomy v-if="activeName === 'second' && province" :dataQuery="dataQuery" :provinceId="provinceId"></LocalEconomy>
...@@ -33,6 +34,7 @@ ...@@ -33,6 +34,7 @@
import RegionalEconomy from './component/regionalEconomy' import RegionalEconomy from './component/regionalEconomy'
import LocalEconomy from './component/localEconomy' import LocalEconomy from './component/localEconomy'
import Comparison from './component/comparison' import Comparison from './component/comparison'
import Region from '../component/region'
import IndustrialStructure from './component/industrialStructure' import IndustrialStructure from './component/industrialStructure'
import { location } from '@/api/macro/macro' import { location } from '@/api/macro/macro'
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
...@@ -43,6 +45,7 @@ export default { ...@@ -43,6 +45,7 @@ export default {
LocalEconomy, LocalEconomy,
Comparison, Comparison,
IndustrialStructure, IndustrialStructure,
Region
}, },
data() { data() {
return { return {
...@@ -61,20 +64,20 @@ export default { ...@@ -61,20 +64,20 @@ export default {
}, },
created() { created() {
this.dataQuery=this.$route.query; this.dataQuery=this.$route.query;
// let params={}
// if(this.dataQuery.provinceId){
// params.provinceId=this.dataQuery.provinceId
// }
if(this.dataQuery.provinceId){ if(this.dataQuery.provinceId){
this.province=this.dataQuery.province; if(Array.isArray(this.dataQuery.province)){
this.dataQuery.province=[this.dataQuery.province] this.province=this.dataQuery.province[0];
}else {
this.province=this.dataQuery.province
this.dataQuery.province = [this.dataQuery.province];
}
this.provinceId.push(this.dataQuery.provinceId) this.provinceId.push(this.dataQuery.provinceId)
}else { }else {
location({}).then(res => { location({}).then(res => {
this.province=res.data.province; this.province=res.data.province;
if(!this.dataQuery.provinceId){ if(!this.dataQuery.provinceId){
this.dataQuery.provinceId=res.data.provinceId this.dataQuery.provinceId=res.data.provinceId
let arr=[this.province] let arr=[res.data.province]
this.dataQuery.province=arr; this.dataQuery.province=arr;
this.provinceId.push(res.data.provinceId) this.provinceId.push(res.data.provinceId)
}else { }else {
...@@ -87,7 +90,8 @@ export default { ...@@ -87,7 +90,8 @@ export default {
this.activeName=this.dataQuery.activeName; this.activeName=this.dataQuery.activeName;
} }
this.dataRegion()
// let name = sessionStorage.getItem('currentTab') // let name = sessionStorage.getItem('currentTab')
// if (name != "undefined" && name){ // if (name != "undefined" && name){
// this.activeName = name; // this.activeName = name;
...@@ -95,7 +99,6 @@ export default { ...@@ -95,7 +99,6 @@ export default {
}, },
methods: { methods: {
handleClick(key,item) { handleClick(key,item) {
console.log(key)
if(key === 'four'){ if(key === 'four'){
this.activeName=key this.activeName=key
} }
...@@ -123,73 +126,26 @@ export default { ...@@ -123,73 +126,26 @@ export default {
} }
// sessionStorage.setItem('currentTab', this.activeName) // sessionStorage.setItem('currentTab', this.activeName)
}, },
//地区
async dataRegion() { addressListbtn(data) {
// await axios.post("https://files.jiansheku.com/file/json/common/dataRegion.json", {}, { this.province=data.province;
// headers: { this.provinceId=data.provinceId;
// 'Content-Type': 'application/json' this.dataQuery.province=data.provinces;
// } let params={}
// }).then(res => { if(data){
// if (res.data.code == 200) { if(this.provinceId.length > 0){
// console.log(res.data.data) params.provinceId=this.provinceId[0]
// } }
// }) if(this.provinceId.length > 1){
var str = []; params.cityId=this.provinceId[1]
for (let x = 0; x < 3; x++) { }
for (let i = 0; i < dataRegion.length; i++) { if(this.provinceId.length > 2){
if (dataRegion[i].regionLevel == x + 1 && x + 1 == 1) { params.areaId=this.provinceId[2]
str.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 2) {
for (let j = 0; j < str.length; j++) {
if (str[j].id == dataRegion[i].parentId) {
str[j].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId,
"children": []
});
}
}
}else if (dataRegion[i].regionLevel == x + 1 && x + 1 == 3) {
for (let j = 0; j < str.length; j++) {
for (let k = 0; k < str[j].children.length; k++) {
if (str[j].children[k].id == dataRegion[i].parentId) {
str[j].children[k].children.push({
'id': dataRegion[i].id,
"label": dataRegion[i].regionName,
"short": dataRegion[i].short,
"value": dataRegion[i].parentId
// "children":[]
});
}
}
}
}
} }
} }
this.addressList = str; location(params).then(res => {
}, console.log(res.data)
addressListbtn() { })
let nodesObj = this.$refs.address.getCheckedNodes()[0];
// console.log(nodesObj)
this.province=nodesObj.pathLabels[nodesObj.pathLabels.length-1];
this.provinceId=nodesObj.path;
this.dataQuery.province=nodesObj.pathLabels;
// this.dataQuery.provinceId=nodesObj.path[nodesObj.path.length-1];
// console.log(this.dataQuery)
// this.province=label;
// this.provinceId=id;
// this.dataQuery.provinceId=id;
// this.dataQuery.province=label;
} }
} }
} }
......
<template> <template>
<div class="app-container enterprises"> <div class="app-container enterprises">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="flex-box eco-header"> <div class="flex-box eco-header">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本地企业" name="first"></el-tab-pane> <el-tab-pane label="本地企业" name="first"></el-tab-pane>
<el-tab-pane label="异地备案" name="second"></el-tab-pane> <el-tab-pane label="异地备案" name="second"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="location"><i class="el-icon-location"></i>{{province}}</div> <!--<div class="location"><i class="el-icon-location"></i>{{province}}</div>-->
</div> </div>
<div class="content"> <div class="content">
<div class="search"> <div class="search">
...@@ -90,13 +91,16 @@ ...@@ -90,13 +91,16 @@
import {encodeStr} from "@/assets/js/common.js" import {encodeStr} from "@/assets/js/common.js"
import aptitudeCode from '@/assets/json/aptitudeCode' import aptitudeCode from '@/assets/json/aptitudeCode'
import { enterprise,location,getUipIdByCid } from '@/api/macro/macro' import { enterprise,location,getUipIdByCid } from '@/api/macro/macro'
import Region from '../component/region'
export default { export default {
name: 'Enterprises', name: 'Enterprises',
// components: {LocalEnterprises,Offsite}, components: {Region},
data() { data() {
return { return {
encodeStr, encodeStr,
activeName: 'first', activeName: 'first',
dataQuery:{},
queryParams:{ queryParams:{
ename:'', ename:'',
codeStr:'', codeStr:'',
...@@ -119,7 +123,7 @@ export default { ...@@ -119,7 +123,7 @@ export default {
province:'', province:'',
provinceId:'', provinceId:'',
show_page:true, show_page:true,
MaxPage:500 MaxPage:500,
} }
}, },
created() { created() {
...@@ -260,6 +264,29 @@ export default { ...@@ -260,6 +264,29 @@ export default {
}); });
}, },
addressListbtn(data) {
console.log(data)
this.province=data.province;
this.provinceId=data.provinceId[0];
this.dataQuery.province=data.provinces;
let params={}
if(data){
if(this.provinceId.length > 0){
params.provinceId=this.provinceId[0]
}
if(this.provinceId.length > 1){
params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
}
}
this.querySubmit()
location(params).then(res => {
console.log(res.data)
})
}
} }
} }
</script> </script>
......
...@@ -67,7 +67,9 @@ ...@@ -67,7 +67,9 @@
<el-table-column label="序号" width="60" align="left"> <el-table-column label="序号" width="60" align="left">
<template slot-scope="scope">{{ scope.$index + 1 }}</template> <template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="地区"/> <el-table-column label="地区">
<template slot-scope="scope">{{ scope.row.type === '全国'? '未公示地区': scope.row.type}}</template>
</el-table-column>
<el-table-column prop="count" sortable label="招标数量" align="right"/> <el-table-column prop="count" sortable label="招标数量" align="right"/>
<el-table-column prop="rate" sortable label="占比(%)" align="right"/> <el-table-column prop="rate" sortable label="占比(%)" align="right"/>
</el-table> </el-table>
...@@ -88,7 +90,7 @@ ...@@ -88,7 +90,7 @@
<div class="main2"> <div class="main2">
<div class="selectYear"> <div class="selectYear">
<el-select v-model="year" filterable class="form-content-width" placeholder="请选择" @change="changeValue()"> <el-select v-model="year" filterable class="form-content-width" placeholder="请选择" @change="changeValue()">
<el-option v-for="(item, index) in yearData" :key="index" :label="item" :value="item" /> <el-option v-for="(item, index) in yearData" :key="index" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
<div class="table-item"> <div class="table-item">
...@@ -119,7 +121,7 @@ export default { ...@@ -119,7 +121,7 @@ export default {
name: 'NationalEconomies', name: 'NationalEconomies',
data() { data() {
return { return {
year:'2023', year:'近一年',
yearOptions: [ yearOptions: [
{ label: '近五年', value: '近五年' }, { label: '近五年', value: '近五年' },
{ label: '近三年', value: '近三年' }, { label: '近三年', value: '近三年' },
...@@ -163,22 +165,37 @@ export default { ...@@ -163,22 +165,37 @@ export default {
value:'近五年', value:'近五年',
punishDateShowPopper: false, punishDateShowPopper: false,
punishDate: "", punishDate: "",
yearData:[], yearData:[
{ label: '近一年', value: '近一年' },
{ label: '近二年', value: '近二年' },
{ label: '近三年', value: '近三年' },
],
myChart:'', myChart:'',
myChart1:'', myChart1:'',
} }
}, },
created() { created() {
let params={} this.getDataByProvince({})
this.getDataByProvince(params) let mydate=new Date();
var startTime, endTime, Year, Month, Day,startyear
Year = mydate.getFullYear();
Month = mydate.getMonth() + 1;
Day = mydate.getDate();
Month = Month < 10 ? '0' + Month : Month
Day = Day < 10 ? '0' + Day : Day
startyear=mydate.getFullYear()-1;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
let params={
startDate:startTime,
endDate:endTime
}
this.getDataByMonth(params) this.getDataByMonth(params)
this.$nextTick(()=>{ this.$nextTick(()=>{
// this.initChart() // this.initChart()
// this.initChart1() // this.initChart1()
}) })
getYear().then(res => {
this.yearData=res.rows;
})
window.addEventListener("resize", this.resizeEcharts); window.addEventListener("resize", this.resizeEcharts);
}, },
beforeDestroy(){ beforeDestroy(){
...@@ -198,6 +215,13 @@ export default { ...@@ -198,6 +215,13 @@ export default {
getDataByProvince(params){ getDataByProvince(params){
countGroupByProvince(params).then(res => { countGroupByProvince(params).then(res => {
this.tableData=res.data.provinceDate; this.tableData=res.data.provinceDate;
let arr=[]
for (let i=0; i<res.data.provinceDate.length; i++){
if(res.data.provinceDate[i].type != '全国'){
arr.push(res.data.provinceDate[i])
}
}
this.dataList=arr;
this.totalCount=res.data.totalCount; this.totalCount=res.data.totalCount;
this.initChart() this.initChart()
}) })
...@@ -232,7 +256,7 @@ export default { ...@@ -232,7 +256,7 @@ export default {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: this.tableData.map(item => item.type), data: this.dataList.map(item => item.type),
axisLabel: { axisLabel: {
show: true, show: true,
// "interval": 0, // "interval": 0,
...@@ -244,7 +268,7 @@ export default { ...@@ -244,7 +268,7 @@ export default {
}, },
series: [ series: [
{ {
data: this.tableData.map(item => item.count), data: this.dataList.map(item => item.count),
type: 'bar', type: 'bar',
barWidth: 16, barWidth: 16,
itemStyle: { itemStyle: {
...@@ -402,7 +426,36 @@ export default { ...@@ -402,7 +426,36 @@ export default {
} }
}, },
changeValue(){ changeValue(){
this.getDataByMonth({year:this.year}) let mydate=new Date();
var startTime, endTime, Year, Month, Day,startyear
Year = mydate.getFullYear();
Month = mydate.getMonth() + 1;
Day = mydate.getDate();
Month = Month < 10 ? '0' + Month : Month
Day = Day < 10 ? '0' + Day : Day
switch (this.year) {
case "近三年":
startyear=mydate.getFullYear()-3;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "近二年":
startyear=mydate.getFullYear()-2;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
case "近一年":
startyear=mydate.getFullYear()-1;
startTime = startyear + "-" + Month + "-" + Day;
endTime = Year + "-" + Month + "-" + Day;
break;
}
let params={
startDate:startTime,
endDate:endTime
}
this.getDataByMonth(params)
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="main1"> <div class="main1">
<div style="height: 300px;"> <div style="height: 300px;">
<div class="left"> <div class="left">
<div class="item" v-for="(item,index) in glData" :class="typeIndex === index ? 'color':''" @click="handleClick(1,index)">{{item.major}}企业<i></i></div> <div class="item" v-for="(item,index) in glData" :class="typeIndex === index ? 'color':''" @click="handleClick(1,index)">{{item.major}}施工总承包<i></i></div>
</div> </div>
<div class="right"> <div class="right">
<div id="gl-echarts" style="height: 260px;background: #ffffff;"></div> <div id="gl-echarts" style="height: 260px;background: #ffffff;"></div>
......
<template> <template>
<div class="app-container urban" ref="urban"> <div class="app-container urban" ref="urban">
<Region v-if="province" :province="province" :dataQuery="dataQuery" @addressListbtn="addressListbtn"></Region>
<div class="content" ref="queryForm"> <div class="content" ref="queryForm">
<div class="flex-box query-box"> <div class="flex-box query-box">
<div class="flex-box query-params"> <div class="flex-box query-params">
...@@ -80,14 +81,14 @@ ...@@ -80,14 +81,14 @@
<!--</template>--> <!--</template>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<div class="item"> <!--<div class="item">-->
<span class="wrap_label">更多筛选</span> <!--<span class="wrap_label">更多筛选</span>-->
<div class="item_ckquery"> <!--<div class="item_ckquery">-->
<span :class="addresslength>0?'select-active':''">注册地区{{addresslength>0?(addresslength+'项'):''}}</span> <!--<span :class="addresslength>0?'select-active':''">注册地区{{addresslength>0?(addresslength+'项'):''}}</span>-->
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd' <!--<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'-->
@input="addressListbtn" v-model="queryParams.address" :options="addressList" :props="props" collapse-tags></el-cascader> <!--@input="addressListbtn" v-model="queryParams.address" :options="addressList" :props="props" collapse-tags></el-cascader>-->
</div> <!--</div>-->
</div> <!--</div>-->
</div> </div>
</div> </div>
<el-input class="search-input" placeholder="输入企业名称关键词" v-model="queryParams.keyword" clearable @clear="handleKeyword()"> <el-input class="search-input" placeholder="输入企业名称关键词" v-model="queryParams.keyword" clearable @clear="handleKeyword()">
...@@ -161,7 +162,7 @@ ...@@ -161,7 +162,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="`/enterprise/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link companyName" v-html="scope.row.companyName" ></router-link> <router-link :to="`/enterprise/${encodeStr(scope.row.companyId)}`" tag="a" class="a-link companyName" v-html="scope.row.companyName" ></router-link>
<span @click="handleClick(scope.row)" class="table-span" style="color: #3D3D3D;cursor: pointer;" v-if="scope.row.claimStatus === 0"><img src="@/assets/images/urban/rl_icon1.png"/>认领</span> <span @click="handleClick(scope.row)" class="table-span" style="color: #3D3D3D;cursor: pointer;" v-if="scope.row.claimStatus === 0"><img src="@/assets/images/urban/rl_icon1.png"/>认领</span>
<span class="table-span" style="color: rgba(35,35,35,0.4);" v-if="scope.row.claimStatus === 1"><img src="@/assets/images/urban/rl_icon2.png"/>已认领</span> <span @click="handleCancelClaim(scope.row)" class="table-span" style="color: rgba(35,35,35,0.4);cursor: pointer;" v-if="scope.row.claimStatus === 1"><img src="@/assets/images/urban/rl_icon2.png"/>已认领</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="city" label="区域" :formatter="formatStatus" width="150"> <el-table-column prop="city" label="区域" :formatter="formatStatus" width="150">
...@@ -259,10 +260,14 @@ ...@@ -259,10 +260,14 @@
<script> <script>
import {encodeStr} from "@/assets/js/common.js" import {encodeStr} from "@/assets/js/common.js"
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim } from '@/api/macro/macro' import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location,cancelClaim } from '@/api/macro/macro'
import { infoHeader } from '@/api/detail/party-a/index' import { infoHeader } from '@/api/detail/party-a/index'
import Region from '../component/region'
export default { export default {
name: 'Urban', name: 'Urban',
components: {
Region
},
data() { data() {
return { return {
encodeStr, encodeStr,
...@@ -300,6 +305,9 @@ export default { ...@@ -300,6 +305,9 @@ export default {
MaxPage:500, MaxPage:500,
// 表格高度 // 表格高度
tableHeight: 0, tableHeight: 0,
dataQuery:{},
province:'',
provinceId:[]
} }
}, },
watch:{ watch:{
...@@ -319,6 +327,28 @@ export default { ...@@ -319,6 +327,28 @@ export default {
this.dataRegion() this.dataRegion()
this.getType() this.getType()
this.querySubmit() this.querySubmit()
this.dataQuery=this.$route.query;
if(this.dataQuery.provinceId){
if(Array.isArray(this.dataQuery.province)){
this.province=this.dataQuery.province[0];
}else {
this.province=this.dataQuery.province
this.dataQuery.province = [this.dataQuery.province];
}
this.provinceId.push(this.dataQuery.provinceId)
}else {
location({}).then(res => {
this.province=res.data.province;
if(!this.dataQuery.provinceId){
this.dataQuery.provinceId=res.data.provinceId
let arr=[res.data.province]
this.dataQuery.province=arr;
this.provinceId.push(res.data.provinceId)
}else {
this.provinceId.push(this.dataQuery.provinceId)
}
})
}
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -340,32 +370,43 @@ export default { ...@@ -340,32 +370,43 @@ export default {
this.tableLoading = true this.tableLoading = true
const params = { pageNum: this.pageIndex, pageSize: this.pageSize,type:Number(this.queryParams.radio)} const params = { pageNum: this.pageIndex, pageSize: this.pageSize,type:Number(this.queryParams.radio)}
const param={} const param={}
if(this.queryParams.address.length > 0){ // if(this.queryParams.address.length > 0){
let arr = this.$refs.address.getCheckedNodes(); // let arr = this.$refs.address.getCheckedNodes();
let provinceCode = [],cityCode = [],countyCode = []; // let provinceCode = [],cityCode = [],countyCode = [];
for (var i in arr) { // for (var i in arr) {
if (arr[i].parent) { // if (arr[i].parent) {
if (!arr[i].parent.checked) { // if (!arr[i].parent.checked) {
arr[i].hasChildren && cityCode.push(arr[i].value); // arr[i].hasChildren && cityCode.push(arr[i].value);
!arr[i].hasChildren && countyCode.push(arr[i].value); // !arr[i].hasChildren && countyCode.push(arr[i].value);
} // }
} else { // } else {
provinceCode.push(arr[i].value) // provinceCode.push(arr[i].value)
} // }
} // }
if(provinceCode.length > 0){ // if(provinceCode.length > 0){
params.provinceIds=provinceCode // params.provinceIds=provinceCode
param.provinceIds=provinceCode // param.provinceIds=provinceCode
} // }
if(cityCode.length > 0){ // if(cityCode.length > 0){
params.cityIds=cityCode // params.cityIds=cityCode
param.cityIds=cityCode // param.cityIds=cityCode
} // }
if(countyCode.length > 0){ // if(countyCode.length > 0){
params.areaIds=countyCode // params.areaIds=countyCode
param.areaIds=countyCode // param.areaIds=countyCode
} // }
// }
if(this.provinceId.length > 0){
params.provinceIds=[this.provinceId[0]]
} }
if(this.provinceId.length > 1){
params.cityIds=[this.provinceId[1]]
}
if(this.provinceId.length > 2){
params.areaIds=[this.provinceId[2]]
}
if(this.queryParams.uipExecutiveLevel){ if(this.queryParams.uipExecutiveLevel){
params.uipExecutiveLevel=this.queryParams.uipExecutiveLevel; params.uipExecutiveLevel=this.queryParams.uipExecutiveLevel;
param.uipExecutiveLevel=this.queryParams.uipExecutiveLevel; param.uipExecutiveLevel=this.queryParams.uipExecutiveLevel;
...@@ -497,24 +538,25 @@ export default { ...@@ -497,24 +538,25 @@ export default {
this.queryParams.uipExecutiveLevel=name; this.queryParams.uipExecutiveLevel=name;
this.querySubmit() this.querySubmit()
}, },
addressListbtn() { addressListbtn(data) {
let arr = this.$refs.address.getCheckedNodes(); this.province=data.province;
let provinceCode = [],cityCode = [],countyCode = []; this.provinceId=data.provinceId;
for (var i in arr) { this.dataQuery.province=data.provinces;
if (arr[i].parent) { let params={}
if (!arr[i].parent.checked) { if(data){
arr[i].hasChildren && cityCode.push(arr[i].value); if(this.provinceId.length > 0){
!arr[i].hasChildren && countyCode.push(arr[i].value); params.provinceId=this.provinceId[0]
} }
} else { if(this.provinceId.length > 1){
provinceCode.push(arr[i].value) params.cityId=this.provinceId[1]
}
if(this.provinceId.length > 2){
params.areaId=this.provinceId[2]
} }
} }
if (provinceCode.length > 0 || cityCode.length > 0 || countyCode.length > 0) { location(params).then(res => {
this.addresslength = provinceCode.length + cityCode.length + countyCode.length; console.log(res.data)
} else { })
this.addresslength = 0;
}
this.pageIndex = 1; this.pageIndex = 1;
this.querySubmit() this.querySubmit()
}, },
...@@ -644,6 +686,17 @@ export default { ...@@ -644,6 +686,17 @@ export default {
} }
}) })
}, },
handleCancelClaim(item){
// cancelClaim(encodeURIComponent(item.companyName),{
// headers: {
// "content-type": "application/json;charset=UTF-8",
// },
// }).then(res => {
// if(res.code === 200){
// this.querySubmit()
// }
// })
}
}, },
} }
</script> </script>
......
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