tianq 3 years ago
parent
commit
b8489a89e9
  1. 36
      src/views/modules/census/census-accountActiveList.vue
  2. 46
      src/views/modules/census/census-houseList.vue
  3. 8
      src/views/modules/census/census-residentList.vue

36
src/views/modules/census/census-accountActiveList.vue

@ -155,12 +155,13 @@ export default {
value: 'agencyId' value: 'agencyId'
}, },
tableData: [], tableData: [],
tableData2: [],
formData: { formData: {
orgId: '', orgId: '',
startDate: '', startDate: '',
endDate: '' endDate: ''
}, },
orgId: '',
cateOptions: [], cateOptions: [],
eventTypeCheck: [], eventTypeCheck: [],
pageNo: 1, pageNo: 1,
@ -183,10 +184,10 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight']) ...mapGetters(['clientHeight', 'iframeHeight'])
}, },
watch: { watch: {
'formData.endTime': function(val) { 'formData.endDate': function(val) {
if (val && val != '') { if (val && val != '') {
let arrayTemp = val.split(' '); let arrayTemp = val.split(' ');
this.formData.endTime = arrayTemp[0] + ' 23:59:59'; this.formData.endDate = arrayTemp[0] + ' 23:59:59';
} }
} }
}, },
@ -194,6 +195,7 @@ export default {
console.log(this.$store.state); console.log(this.$store.state);
this.user = this.$store.state.user; this.user = this.$store.state.user;
this.agencyId = this.user.agencyId; this.agencyId = this.user.agencyId;
this.orgId = this.agencyId;
this.getOrgTreeList(); this.getOrgTreeList();
this.getTableData(); this.getTableData();
this.getTableData2(); this.getTableData2();
@ -209,8 +211,10 @@ export default {
handleSearch(val) { handleSearch(val) {
let tmp = this.formData.orgId; let tmp = this.formData.orgId;
if (!(tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null)) { if (!(tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null)) {
this.formData.orgId = ''; this.orgId = this.agencyId;
this.formData.level = ''; this.formData.level = '';
} else {
this.orgId = this.formData.orgId;
} }
console.log(this.formData); console.log(this.formData);
this.pageNo = 1; this.pageNo = 1;
@ -240,13 +244,17 @@ export default {
async handleExport(type) { async handleExport(type) {
const url = '/gov/org/staffLoginLog/accountActivityInfo-export'; const url = '/gov/org/staffLoginLog/accountActivityInfo-export';
const { formData } = this;
const { data, code, msg } = await requestPost(url, param);
axios({ axios({
url: window.SITE_CONFIG['apiURL'] + url, url: window.SITE_CONFIG['apiURL'] + url,
method: 'post', method: 'post',
data: { data: {
isActivity: type, isActivity: type,
...formData orgId: this.orgId,
startDate: this.formData.startDate,
endDate: this.formData.endDate
}, },
responseType: 'blob' responseType: 'blob'
}) })
@ -291,7 +299,7 @@ export default {
async getCountLevel() { async getCountLevel() {
const url = '/gov/org/staffLoginLog/getActivityTotal'; const url = '/gov/org/staffLoginLog/getActivityTotal';
// const url = 'http://yapi.elinkservice.cn/mock/356/gov/org/staffLoginLog/count-level'; // const url = 'http://yapi.elinkservice.cn/mock/356/gov/org/staffLoginLog/count-level';
let param = { ...this.formData }; let param = { orgId: this.orgId, startDate: this.formData.startDate, endDate: this.formData.endDate };
const { data, code, msg } = await requestPost(url, param); const { data, code, msg } = await requestPost(url, param);
console.log('getCountLeveldata', data); console.log('getCountLeveldata', data);
if (code === 0) { if (code === 0) {
@ -306,11 +314,8 @@ export default {
const url = '/gov/org/staffLoginLog/getAccountActivityInfo'; const url = '/gov/org/staffLoginLog/getAccountActivityInfo';
const { formData } = this; let param = { orgId: this.orgId, isActivity: 1, startDate: this.formData.startDate, endDate: this.formData.endDate };
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, param);
isActivity: 1,
...formData
});
this.tableLoading = false; this.tableLoading = false;
if (code === 0) { if (code === 0) {
@ -328,11 +333,8 @@ export default {
const url = '/gov/org/staffLoginLog/getAccountActivityInfo'; const url = '/gov/org/staffLoginLog/getAccountActivityInfo';
const { formData } = this; let param = { orgId: this.orgId, isActivity: 0, startDate: this.formData.startDate, endDate: this.formData.endDate };
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, param);
isActivity: 0,
...formData
});
this.tableLoading2 = false; this.tableLoading2 = false;
if (code === 0) { if (code === 0) {

46
src/views/modules/census/census-houseList.vue

@ -66,7 +66,7 @@
<div class="content"> <div class="content">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="num">{{ item.value }}</div> <div class="num">{{ item.value }}</div>
<div class="unit" :style="{ color: color[index] }">{{ item.radio}}%</div> <div class="unit" :style="{ color: color[index] }">{{ item.radio }}%</div>
</div> </div>
</div> </div>
</div> </div>
@ -98,7 +98,7 @@
<div class="content"> <div class="content">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="num">{{ item.value }}</div> <div class="num">{{ item.value }}</div>
<div class="unit" :style="{ color: color[index] }">{{ item.radio}}%</div> <div class="unit" :style="{ color: color[index] }">{{ item.radio }}%</div>
</div> </div>
</div> </div>
</div> </div>
@ -238,7 +238,8 @@ export default {
pieData2: [], pieData2: [],
orgId: '', orgId: '',
purpose: '', purpose: '',
rentFlag: '' rentFlag: '',
orgIdPath: ''
}; };
}, },
computed: { computed: {
@ -271,8 +272,7 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
this.pageType = 'view'; this.pageType = 'view';
this.detailId = row.houseId; this.detailId = row.houseId;
console.log('detailId', row);
console.log('detailId', this.detailId);
this.detailData = row; this.detailData = row;
}, },
handleClose() { handleClose() {
@ -290,7 +290,9 @@ export default {
const { data, code, msg } = await requestPost(url, { const { data, code, msg } = await requestPost(url, {
pageSize, pageSize,
pageNo, pageNo,
orgIdPath: this.orgId, orgIdPath: this.orgIdPath,
orgId: this.orgId,
orgType: this.orgType,
timeStart: this.formData.startDate, timeStart: this.formData.startDate,
timeEnd: this.formData.endDate, timeEnd: this.formData.endDate,
purpose: this.purpose, purpose: this.purpose,
@ -322,9 +324,11 @@ export default {
this.$refs.pieChart.showLoading(); this.$refs.pieChart.showLoading();
let url = '/gov/org/ichouse/getHousePurposeCount'; let url = '/gov/org/ichouse/getHousePurposeCount';
let param = { let param = {
orgIdPath: this.orgId, orgIdPath: this.orgIdPath,
timeStart: this.formData.startDate, timeStart: this.formData.startDate,
timeEnd: this.formData.endDate timeEnd: this.formData.endDate,
orgId: this.orgId,
orgType: this.orgType
}; };
const { data, code, msg } = await requestPost(url, param); const { data, code, msg } = await requestPost(url, param);
this.$refs.pieChart.hideLoading(); this.$refs.pieChart.hideLoading();
@ -339,15 +343,17 @@ export default {
this.$refs.pieChart2.showLoading(); this.$refs.pieChart2.showLoading();
let url = '/gov/org/ichouse/getHouseStatusCount'; let url = '/gov/org/ichouse/getHouseStatusCount';
let param = { let param = {
orgIdPath: this.orgId, orgIdPath: this.orgIdPath,
timeStart: this.formData.startDate, timeStart: this.formData.startDate,
timeEnd: this.formData.endDate timeEnd: this.formData.endDate,
orgId: this.orgId,
orgType: this.orgType
}; };
const { data, code, msg } = await requestPost(url, param); const { data, code, msg } = await requestPost(url, param);
this.$refs.pieChart2.hideLoading(); this.$refs.pieChart2.hideLoading();
if (code === 0) { if (code === 0) {
this.pieData2 = data; this.pieData2 = data;
console.log('this.pieData2', this.pieData2);
this.getPie2(); this.getPie2();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
@ -398,11 +404,9 @@ export default {
}; };
}); });
console.log('chartData', this.chartData);
this.iniPieChart(this.chartData); this.iniPieChart(this.chartData);
}, },
setPieData2() { setPieData2() {
console.log(this.pieData2)
let data = [...this.pieData2.list]; let data = [...this.pieData2.list];
let type = { let type = {
1: '出租', 1: '出租',
@ -420,7 +424,6 @@ export default {
}; };
}); });
console.log('chartData', this.chartData2);
this.iniPieChart2(this.chartData2); this.iniPieChart2(this.chartData2);
}, },
// //
@ -660,11 +663,13 @@ export default {
data: { data: {
pageSize, pageSize,
pageNo, pageNo,
orgIdPath: this.orgId, orgIdPath: this.orgIdPath,
timeStart: this.formData.startDate, timeStart: this.formData.startDate,
timeEnd: this.formData.endDate, timeEnd: this.formData.endDate,
purpose: this.purpose, purpose: this.purpose,
rentFlag: this.rentFlag rentFlag: this.rentFlag,
orgId: this.orgId,
orgType: this.orgType
}, },
responseType: 'blob' responseType: 'blob'
}) })
@ -716,18 +721,19 @@ export default {
this.getsubData2(); this.getsubData2();
}, },
handleChangeAgency(val) { handleChangeAgency(val) {
// let obj = this.$refs['myCascader'].getCheckedNodes()[0].data; let obj = this.$refs['myCascader'].getCheckedNodes()[0].data;
let tmp = this.formData.orgId; let tmp = this.formData.orgId;
if (tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null) { if (tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null) {
this.orgId = this.formData.orgId; this.orgId = this.formData.orgId;
this.orgIdPath = obj.orgIdPath;
this.orgType = obj.level;
console.log(this.orgId, this.orgIdPath, this.orgType);
} else { } else {
console.log('ww');
this.orgId = this.agencyId; this.orgId = this.agencyId;
} }
console.log('this.orgId', this.orgId);
}, },
deepTree(arr) { deepTree(arr) {
if (Array.isArray(arr)) { if (Array.isArray(arr)) {
return arr.map(item => { return arr.map(item => {

8
src/views/modules/census/census-residentList.vue

@ -605,24 +605,24 @@ export default {
}, },
handelClickMyPei(param) { handelClickMyPei(param) {
this.code = param.data.code; this.code = param.data.code;
this.codeType = 'education'; this.codeType = 'age';
this.getTableData(); this.getTableData();
}, },
handelClickMyPei2(param) { handelClickMyPei2(param) {
this.code = param.data.code; this.code = param.data.code;
this.codeType = 'age'; this.codeType = 'education';
this.getTableData(); this.getTableData();
}, },
handleClickItem(item) { handleClickItem(item) {
this.code = item.code; this.code = item.code;
this.codeType = 'education'; this.codeType = 'age';
this.getTableData(); this.getTableData();
}, },
handleClickItem2(item) { handleClickItem2(item) {
this.code = item.code; this.code = item.code;
this.codeType = 'age'; this.codeType = 'education';
this.getTableData(); this.getTableData();
}, },
async handleExport() { async handleExport() {

Loading…
Cancel
Save