Browse Source

四大清单首页,添加时间限制

V1.0
tianq 3 years ago
parent
commit
36771ace06
  1. 13
      src/views/dataBoard/sida/cpts/fwqd.vue
  2. 13
      src/views/dataBoard/sida/cpts/sqpj.vue
  3. 13
      src/views/dataBoard/sida/cpts/wtqd.vue
  4. 14
      src/views/dataBoard/sida/cpts/xqqd.vue
  5. 13
      src/views/dataBoard/sida/cpts/zyqd.vue
  6. 57
      src/views/dataBoard/sida/index.vue

13
src/views/dataBoard/sida/cpts/fwqd.vue

@ -26,7 +26,8 @@ export default {
orgId: { orgId: {
type: String, type: String,
default: '' default: ''
} },
searchDate:Array
}, },
data() { data() {
return { return {
@ -49,10 +50,14 @@ export default {
screenEchartsFrame screenEchartsFrame
}, },
mounted() { mounted() {
this.init(); // this.init();
}, },
watch: { watch: {
orgId() { orgId() {
this.init();
},
searchDate() {
this.init(); this.init();
} }
}, },
@ -91,7 +96,9 @@ export default {
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgId org_id: this.orgId,
start_date: this.searchDate[0],
end_date: this.searchDate[1]
} }
}, },
{ {

13
src/views/dataBoard/sida/cpts/sqpj.vue

@ -34,7 +34,8 @@ export default {
orgId: { orgId: {
type: String, type: String,
default: '' default: ''
} },
searchDate:Array
}, },
data() { data() {
return { return {
@ -84,13 +85,17 @@ export default {
screenEchartsFrame screenEchartsFrame
}, },
mounted() { mounted() {
this.init(); // this.init();
}, },
watch: { watch: {
currentTab() { currentTab() {
// this.getResiCategoryData(); // this.getResiCategoryData();
}, },
orgId() { orgId() {
this.init();
},
searchDate() {
this.init(); this.init();
} }
}, },
@ -128,7 +133,9 @@ export default {
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgId org_id: this.orgId,
start_date: this.searchDate[0],
end_date: this.searchDate[1]
} }
}, },
{ {

13
src/views/dataBoard/sida/cpts/wtqd.vue

@ -27,7 +27,8 @@ export default {
orgId: { orgId: {
type: String, type: String,
default: '' default: ''
} },
searchDate:Array
}, },
data() { data() {
return { return {
@ -51,10 +52,14 @@ export default {
screenEchartsFrame screenEchartsFrame
}, },
mounted() { mounted() {
this.init(); // this.init();
}, },
watch: { watch: {
orgId() { orgId() {
this.init();
},
searchDate() {
this.init(); this.init();
} }
}, },
@ -84,7 +89,9 @@ export default {
query: { query: {
org_id: this.orgId, org_id: this.orgId,
type: this.currentTab, type: this.currentTab,
type2: item.name type2: item.name,
start_date: this.searchDate[0],
end_date: this.searchDate[1]
} }
}); });
}, },

14
src/views/dataBoard/sida/cpts/xqqd.vue

@ -26,7 +26,8 @@ export default {
orgId: { orgId: {
type: String, type: String,
default: '' default: ''
} },
searchDate:Array
}, },
data() { data() {
return { return {
@ -45,11 +46,15 @@ export default {
screenEchartsFrame screenEchartsFrame
}, },
mounted() { mounted() {
this.init(); // console.log("ddd")
// this.init();
}, },
watch: { watch: {
orgId() { orgId() {
this.init(); this.init();
},
searchDate() {
this.init();
} }
}, },
methods: { methods: {
@ -80,13 +85,14 @@ export default {
} else { } else {
url = 'common_need_view'; url = 'common_need_view';
} }
this.$refs.pieChart.showLoading(); this.$refs.pieChart.showLoading();
const { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPostBi(
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgId org_id: this.orgId,
start_date: this.searchDate[0],
end_date: this.searchDate[1]
} }
}, },
{ {

13
src/views/dataBoard/sida/cpts/zyqd.vue

@ -26,7 +26,8 @@ export default {
orgId: { orgId: {
type: String, type: String,
default: '' default: ''
} },
searchDate:Array
}, },
data() { data() {
return { return {
@ -50,10 +51,14 @@ export default {
screenEchartsFrame screenEchartsFrame
}, },
mounted() { mounted() {
this.init(); // this.init();
}, },
watch: { watch: {
orgId() { orgId() {
this.init();
},
searchDate() {
this.init(); this.init();
} }
}, },
@ -94,7 +99,9 @@ export default {
url, url,
{ {
queryParam: { queryParam: {
org_id: this.orgId org_id: this.orgId,
start_date: this.searchDate[0],
end_date: this.searchDate[1]
} }
}, },
{ {

57
src/views/dataBoard/sida/index.vue

@ -7,21 +7,30 @@
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" /> <img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">需求清单</div> <div class="box-title-txt">需求清单</div>
</div> </div>
<div class="m-subbox"><xqqd :orgId="orgData.org_id"></xqqd></div> <div class="m-subbox"><xqqd :orgId="orgData.org_id" :searchDate="searchDate"></xqqd></div>
</div> </div>
<div class="m-box"> <div class="m-box">
<div class="box-title"> <div class="box-title">
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" /> <img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">问题清单</div> <div class="box-title-txt">问题清单</div>
</div> </div>
<div class="m-subbox"><wtqd :orgId="orgData.org_id"></wtqd></div> <div class="m-subbox"><wtqd :orgId="orgData.org_id" :searchDate="searchDate"></wtqd></div>
</div> </div>
</div> </div>
<div class="g-center"> <div class="g-center">
<div class="m-map"> <div class="m-map">
<div class="m-search2"> <div class="m-search2">
<el-date-picker type="daterange" range-separator="" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> <el-date-picker
<el-button type="primary">查询</el-button> type="daterange"
unlink-panels
value-format="yyyy-MM-dd"
@change="searchDateChang()"
v-model="searchDate"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<!-- <el-button type="primary" @click="search">查询</el-button> -->
</div> </div>
<grid-map ref="map" @clickAgency="clickAgencyItem" :srcGridData="orgData" @clickDotBtn="handleClickDotBtn" /> <grid-map ref="map" @clickAgency="clickAgencyItem" :srcGridData="orgData" @clickDotBtn="handleClickDotBtn" />
</div> </div>
@ -30,7 +39,7 @@
<img src="~@/assets/images/shuju/main/card-title-bg-800.png" class="box-title-bg" /> <img src="~@/assets/images/shuju/main/card-title-bg-800.png" class="box-title-bg" />
<div class="box-title-txt">社区评价</div> <div class="box-title-txt">社区评价</div>
</div> </div>
<div class="m-subbox"><sqpj :orgId="orgData.org_id"></sqpj></div> <div class="m-subbox"><sqpj :orgId="orgData.org_id" :searchDate="searchDate"></sqpj></div>
</div> </div>
</div> </div>
<div class="g-right"> <div class="g-right">
@ -44,14 +53,16 @@
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" /> <img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt" @click="fwMore">服务清单</div> <div class="box-title-txt" @click="fwMore">服务清单</div>
</div> </div>
<div class="m-subbox " :class="{ 'z-shrink': orgLevel == 'district' || orgLevel == 'street' || orgLevel == 'city' }"><fwqd :orgId="orgData.org_id"></fwqd></div> <div class="m-subbox " :class="{ 'z-shrink': orgLevel == 'district' || orgLevel == 'street' || orgLevel == 'city' }">
<fwqd :orgId="orgData.org_id" :searchDate="searchDate"></fwqd>
</div>
</div> </div>
<div class="m-box"> <div class="m-box">
<div class="box-title"> <div class="box-title">
<img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" /> <img src="~@/assets/images/shuju/main/card-title-bg-480.png" class="box-title-bg" />
<div class="box-title-txt">资源清单</div> <div class="box-title-txt">资源清单</div>
</div> </div>
<div class="m-subbox"><zyqd :orgId="orgData.org_id"></zyqd></div> <div class="m-subbox"><zyqd :orgId="orgData.org_id" :searchDate="searchDate"></zyqd></div>
</div> </div>
</div> </div>
<cpt-loading v-show="false" /> <cpt-loading v-show="false" />
@ -83,6 +94,7 @@ export default {
}, },
data() { data() {
return { return {
searchDate: ['', ''],
loading: false, loading: false,
orgData: { orgData: {
children: [] children: []
@ -92,12 +104,31 @@ export default {
}; };
}, },
mounted() { mounted() {
const queryOrgId = getQueryPara('orgId'); this.getDate();
const queryOrgLevel = getQueryPara('orgLevel');
this.init(queryOrgId, queryOrgLevel);
}, },
watch: {}, watch: {},
methods: { methods: {
getDate() {
var nowDate = new Date();
var year = nowDate.getFullYear();
var month = nowDate.getMonth() + 1;
var day = nowDate.getDate();
this.searchDate = [`${year}-${1}-${1}`, `${year}-${month}-${day}`];
console.log(this.searchDate);
const queryOrgId = getQueryPara('orgId');
const queryOrgLevel = getQueryPara('orgLevel');
this.init(queryOrgId, queryOrgLevel);
},
searchDateChang() {
if (this.searchDate == null) {
this.searchDate = ['', ''];
}
},
search() {
const queryOrgId = getQueryPara('orgId');
const queryOrgLevel = getQueryPara('orgLevel');
this.init(queryOrgId, queryOrgLevel);
},
toListPage(type = '', type_name = '') { toListPage(type = '', type_name = '') {
this.$router.push({ this.$router.push({
path: '/dataBoard/sida/xq/list', path: '/dataBoard/sida/xq/list',
@ -173,7 +204,7 @@ export default {
// //
async getMapData() { async getMapData() {
console.log('=========================getMapData'); // console.log('=========================getMapData');
const url = 'org_map'; const url = 'org_map';
const { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPostBi(
url, url,
@ -205,7 +236,7 @@ export default {
}, },
// //
async getSubMapData() { async getSubMapData() {
console.log('=========================getSubMapData'); // console.log('=========================getSubMapData');
const url = 'sub_org_map'; const url = 'sub_org_map';
const { data, code, msg } = await requestPostBi( const { data, code, msg } = await requestPostBi(
url, url,
@ -233,7 +264,7 @@ export default {
this.orgData = { this.orgData = {
...orgData ...orgData
}; };
console.log('==========================getSubMapData:result', this.orgData); // console.log('==========================getSubMapData:result', this.orgData);
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }

Loading…
Cancel
Save