Browse Source

Merge branch 'yantai_dev' into dev

# Conflicts:
#	src/views/components/resiSearch.vue
dev
mk 3 years ago
parent
commit
94a999ee88
  1. 9
      src/views/components/rangeInput.vue
  2. 513
      src/views/components/resiSearch.vue
  3. 2
      src/views/modules/base/resi.vue
  4. 96
      src/views/modules/census/census-accountActiveList.vue
  5. 69
      src/views/modules/census/census-houseList.vue
  6. 8
      src/views/modules/census/census-residentList.vue

9
src/views/components/rangeInput.vue

@ -10,7 +10,7 @@
:type="inputType"
clearable
placeholder="请输入"
@change="handleChange" />
@change="handleChange($event,'s')" />
</el-form-item>
<div class="div_middle">-</div>
<el-form-item prop="end">
@ -20,7 +20,7 @@
:type="inputType"
clearable
placeholder="请输入"
@change="handleChange"
@change="handleChange($event,'e')"
@blur="handleBlur" />
</el-form-item>
</div>
@ -87,10 +87,9 @@ export default {
},
},
methods: {
handleChange (val) {
handleChange (val,type) {
// if ()
this.$emit('change', { ...this.inputForm })
this.$emit('change', { ...this.inputForm },type)
},
handleBlur () {

513
src/views/components/resiSearch.vue

@ -14,7 +14,6 @@
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
collapse-tags
@change="handleChangeAgency"></el-cascader>
</div>
</div>
@ -70,7 +69,7 @@
size="small"
filterable
clearable
style="width: 120px;"
style="width: 120px"
class="resi-cell-select"
:disabled="changeVDisabled"
@clear="handleClearBuild"
@ -91,7 +90,7 @@
size="small"
filterable
clearable
style="width: 120px;"
style="width: 120px"
class="resi-cell-select"
@click="handleClearDan"
@change="handleChangeD"
@ -111,7 +110,7 @@
size="small"
filterable
clearable
style="width: 120px;"
style="width: 120px"
class="resi-cell-select"
>
<el-option
@ -133,7 +132,12 @@
>
<el-col v-for="n in item" :key="n.id" :span="computdSpan(item.length)">
<div class="resi-cell">
<div class="resi-cell-label" :class="item.length != 4 && 'resi-cell-label1'">{{ n.label }}</div>
<div
class="resi-cell-label"
:class="item.length != 4 && 'resi-cell-label1'"
>
{{ n.label }}
</div>
<div
class="resi-cell-value"
:class="n.itemType === 'radio' && 'resi-cell-value-radio'"
@ -150,12 +154,16 @@
<template v-else-if="n.itemType == 'inputRange'">
<!-- <el-input
v-model.trim="form[n.columnName]"
class="resi-cell-input"
class="resi-cell-input"F
size="small"
clearable
placeholder="请输入内容"
/> -->
<inputRange v-model="form[n.columnName]" :type="n.validType" @change="handleAgeChange" />
<inputRange
v-model="ageObj"
:type="n.validType"
@change="handleAgeChange"
/>
</template>
<template v-else-if="n.itemType === 'datepicker'">
<el-date-picker
@ -216,7 +224,12 @@
</el-cascader>
<template v-else-if="n.itemType === 'checkbox'">
<el-checkbox-group v-model="form[n.columnName]">
<el-checkbox v-for="ns in n.options" :key="ns.value" :label="ns.value">{{ns.label}}</el-checkbox>
<el-checkbox
v-for="ns in n.options"
:key="ns.value"
:label="ns.value"
>{{ ns.label }}</el-checkbox
>
<!-- <el-checkbox label="n.la"></el-checkbox> -->
</el-checkbox-group>
</template>
@ -230,8 +243,12 @@
<el-button type="primary" size="mini">查询</el-button>
</el-col> -->
<el-col :span="24">
<el-button type="primary" size="small" @click="handleSearch">查询</el-button>
<el-button class="diy-button--reset" size="small" @click="resetForm">重置</el-button>
<el-button type="primary" size="small" @click="handleSearch"
>查询</el-button
>
<el-button class="diy-button--reset" size="small" @click="resetForm"
>重置</el-button
>
</el-col>
</el-row>
<!-- <div v-if="isArrow" class="resi-down" @click="handleOpenSearch">
@ -244,80 +261,82 @@
<script>
import inputRange from './rangeInput.vue'
import Ar from 'element-ui/src/locale/lang/ar'
export default {
name: 'ResiSearch',
name: "ResiSearch",
components: {
inputRange
inputRange,
},
props: {
formList: {
type: Array,
default: () => []
default: () => [],
},
columnName: {
type: String,
default: ''
default: "",
},
showGrid: {
type: Boolean,
default: false
default: false,
},
isArrow: {
type: Boolean,
default: false
}
default: false,
},
},
data() {
let initForm = (arr, columnName) => {
let _form = {}
let _form = {};
// console.log('formInfo', obj)
// if (Object.keys(obj).length > 0) {
// _form = { ...obj }
// return _form
// }
arr.forEach((item) => {
if (item.itemType == 'checkbox') _form[item.columnName] = []
else if (item.queryType == 'resi_category' && columnName ){
_form[item.columnName] = [columnName]
} else if (columnName && columnName === item.columnName) _form[item.columnName] = '1'
else if (item.itemType == 'inputRange') _form[item.columnName] = { start: '', end: ''}
else _form[item.columnName] = ''
})
return _form
}
let itemList = this.formList.map(item => {
if (item.itemType == 'inputRange' && item.funType == 'agetoyear') {
item.columnName = 'age'
if (item.itemType == "checkbox") _form[item.columnName] = [];
else if (item.queryType == "resi_category" && columnName) {
_form[item.columnName] = [columnName];
} else if (columnName && columnName === item.columnName)
_form[item.columnName] = "1";
else if (item.itemType == "inputRange")
_form[item.columnName] = { start: "", end: "" };
else _form[item.columnName] = "";
});
return _form;
};
let itemList = this.formList.map((item) => {
if (item.itemType == "inputRange" && item.funType == "") {
item.columnName = "age";
}
return {
...item
}
})
let form = initForm(itemList, this.columnName)
let tempFormList = itemList.map(item => {
...item,
};
});
let form = initForm(itemList, this.columnName);
let tempFormList = itemList.map((item) => {
return {
...item,
isChange:( item.queryType == 'resi_category' && this.columnName) || this.columnName === item.columnName ? true : false
}
})
isChange:
(item.queryType == "resi_category" && this.columnName) ||
this.columnName === item.columnName
? true
: false,
};
});
let constForm = {
...form,
GRID_ID: '',
GRID_IDS: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
}
let orgOptionProps = {
multiple: true,// 2023-04-06
multiple: false,
value: 'agencyId',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true,
checkStrictly: true
}
return {
@ -330,15 +349,13 @@ export default {
optionsG: [],
orgOptions: [],
orgOptionProps,
agencyIdArray:[],
value: '',
agencyIdArray: [],
value: "",
itemList,
fixedList: [],
fixedForm: {
AGENCY_ID: '',
AGENCY_IDS: [],
GRID_ID: '',
GRID_IDS: [],
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
@ -348,9 +365,7 @@ export default {
form: {
...form,
AGENCY_ID: '',
AGENCY_IDS: [],
GRID_ID: '',
GRID_IDS:[],
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
@ -360,65 +375,66 @@ export default {
pickerOptions: {
shortcuts: [
{
text: '最近一周',
text: "最近一周",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: '最近一个月',
text: "最近一个月",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
}
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: '最近三个月',
text: "最近三个月",
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
}
}
]
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
queryType:{
'AGENCY_ID':'list_equal'
'AGENCY_ID':'like'
}
}
},
computed: {
sliceList() {
return function (data, count) {
console.log(data);
if (data !== undefined) {
let index = 0
let arrTemp = []
let index = 0;
let arrTemp = [];
for (let i = 0; i < data.length; i++) {
index = parseInt(i / count)
index = parseInt(i / count);
if (arrTemp.length <= index) {
arrTemp.push([])
}
arrTemp[index].push(data[i])
arrTemp.push([]);
}
return arrTemp
arrTemp[index].push(data[i]);
}
return arrTemp;
}
};
},
changeVDisabled () {
return !this.form.VILLAGE_ID
changeVDisabled() {
return !this.form.VILLAGE_ID;
},
changeBDisabled () {
return !this.form.BUILD_ID
changeBDisabled() {
return !this.form.BUILD_ID;
},
changeDDisabled () {
return !this.form.UNIT_ID
changeDDisabled() {
return !this.form.UNIT_ID;
},
},
watch: {
@ -427,128 +443,141 @@ export default {
// console.log('valpppp----', val, val2)
for (let n in val) {
if (this.constForm[n] !== val[n]) {
this.handleChangeForm(n)
console.log('nnnnnn', n)
this.handleChangeForm(n);
console.log("nnnnnn", n);
}
}
this.constForm = { ...val }
this.constForm = { ...val };
},
deep: true
}
deep: true,
},
created () {
},
created() {
// this.initForm()
// console.log('formcccc---', this.form)
this.getOrgTreeList()
this.getGridList()
this.getValiheList()
if (this.columnName) this.handleChangeForm(this.columnName)
this.getOrgTreeList();
this.getGridList();
this.getValiheList();
if (this.columnName) this.handleChangeForm(this.columnName);
},
methods: {
initForm() {
this.formList.forEach((item) => {
this.$set(this.form, item.columnName, '')
})
console.log('formcccc---', this.form)
this.$set(this.form, item.columnName, "");
});
console.log("formcccc---", this.form);
},
computdSpan(len) {
return len == 1 ? 24 : 6
return len == 1 ? 24 : 6;
},
handleClearVillage() {
this.form.BUILD_ID = ''
this.form.HOME_ID = ''
this.form.BUILD_ID = "";
this.form.HOME_ID = "";
},
handleClearBuild() {
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.form.BUILD_ID = "";
this.form.UNIT_ID = "";
this.form.HOME_ID = "";
},
handleClearDan() {
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.form.UNIT_ID = "";
this.form.HOME_ID = "";
},
resetForm(formName) {
for(const n in this.form) {
if (n == 'age') {
this.form.age = {
start: '',
end: ''
}
} else if (typeof this.form[n] == 'object') this.form[n] = []
else this.form[n] = ''
for (const n in this.form) {
if (typeof this.form[n] == "object") this.form[n] = [];
else this.form[n] = "";
}
this. agencyIdArray=[]
this.ageObj = {};
this.agencyIdArray = [];
// let arr3 = [...arr1, ...arr]
this.$emit('search', [])
this.$emit("search", []);
// this.handleSearch()
// this.orgOptions = [];
},
handleSearch() {
// console.log('formmmmm---', this.form)
const itemTypes = ['daterange', 'timerange', 'checkbox']
let a = this.tempFormList.filter(item => item.itemType != 'inputRange')
let arr = a.filter((n) => n.isChange).map((item) => {
const itemTypes = ["daterange", "timerange", "checkbox"];
let a = this.tempFormList.filter((item) => item.itemType != "inputRange");
let arr = a
.filter((n) => n.isChange)
.map((item) => {
return {
queryType: item.queryType,
tableName: item.tableName,
columnName: item.columnName,
// columnValue: []
columnValue: this.form[item.columnName] &&
columnValue:
this.form[item.columnName] &&
(itemTypes.includes(item.queryType) ||
itemTypes.includes(item.itemType) || item.multiSelect == 1
itemTypes.includes(item.itemType) ||
item.multiSelect == 1
? this.form[item.columnName]
: [this.form[item.columnName].toString()])
}
})
const arr2 = arr.filter(item => item.columnValue.length > 0)
: [this.form[item.columnName].toString()]),
};
});
console.log(arr);
const arr2 = arr.filter((item) => item.columnValue != null&& item.columnValue.length > 0);
let arr1 = this.fixedList
.filter((n) => n.columnValue.length > 0)
.map((item) => {
return {
...item
...item,
};
});
let arr3 = [];
var objKey = JSON.stringify(this.ageObj) == "{}";
if (objKey) {
arr3 = [...arr1, ...arr2];
this.$emit("search", arr3);
return arr3;
} else {
let temp = [];
for (let i in this.ageObj) {
temp.push(this.ageObj[i]);
}
let arr4 = [
{
columnName: "",
columnValue: temp,
queryType: "agerange",
tableName: "ic_resi_user",
},
];
arr3 = [...arr1, ...arr2, ...arr4];
this.$emit("search", arr3);
return arr3;
}
})
let arr3 = [...arr1, ...arr2]
this.$emit('search', arr3)
return arr3
},
handleOpenSearch() {
this.openSearch = !this.openSearch
this.openSearch = !this.openSearch;
},
handleAgeChange(val) {
console.log('val----age---', val)
if (val.end) {
const s = this.computedBirth(val.end)
const e = this.computedBirth(val.start)
this.form.BIRTHDAY = [s, e]
handleAgeChange(val, type) {
console.log("val----age---", val);
if (type == "s") {
this.ageObj.start = val.start;
} else {
this.ageObj.end = val.end;
}
// const s = this.computedBirth(val.end)
// const e = this.computedBirth(val.start)
},
handleChangeAgency(val) {
// let checkedNodes = this.$refs["myCascader"].getCheckedNodes()[0].data
this.$nextTick(()=> {
let checkedNodes = this.$refs["myCascader"].getCheckedNodes();
if (checkedNodes) {
//
// this.form.GRID_IDS.push(obj.agencyId);
// this.form.AGENCY_IDS.push( obj.pid);
//
this.form.GRID_IDS = [];
this.form.AGENCY_IDS = [];
for (let i in checkedNodes) {
let nodeData = checkedNodes[i].data;
if (nodeData.level == 'grid') {
this.form.GRID_IDS.push(nodeData.agencyId);
} else {
this.form.AGENCY_IDS.push(nodeData.agencyId);
}
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
if(obj.level === 'grid'){
this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.AGENCY_ID=''
}else{
this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : '';
this.form.GRID_ID = ''
}
} else {
this.form.AGENCY_IDS = []
this.form.GRID_IDS = []
}else{
this.form.AGENCY_ID=''
this.form.GRID_ID = ''
}
this.form.VILLAGE_ID = ''
@ -556,9 +585,9 @@ export default {
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getValiheList()
})
},
handleChangeGrid(val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
@ -566,41 +595,34 @@ export default {
this.getValiheList()
},
handleChangeV(val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
},
handleChangeB(val) {
console.log('val', val)
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getUniList()
console.log("val", val);
this.form.UNIT_ID = "";
this.form.HOME_ID = "";
this.getUniList();
},
handleChangeD(val) {
console.log('val', val)
this.form.HOME_ID = ''
this.getHouseList()
console.log("val", val);
this.form.HOME_ID = "";
this.getHouseList();
},
// form
handleChangeForm(val) {
for (let n in this.fixedForm) {
if (n === val) {
if (this.fixedList.length > 0) {
let _item = {}
let hasVal = false
let _item = {};
let hasVal = false;
this.fixedList.forEach((item, index) => {
if (item.columnName == val) {
hasVal = true
let valueInForm = this.form[val]
if (valueInForm instanceof Array) {
//
item.columnValue = valueInForm
} else {
//
item.columnValue[0] = this.form[val]
}
if (!this.form[val]) this.fixedList.splice(index, 1)
console.log('fixedList----val', this.fixedList)
} else {
@ -615,149 +637,156 @@ export default {
}
_item = {
queryType: this.queryType[val]?this.queryType[val]:'equal',//'equal',
tableName: 'ic_resi_user',
queryType: this.queryType[val]
? this.queryType[val]
: "equal", //'equal',
tableName: "ic_resi_user",
columnName: val,
columnValue: columnValue
columnValue: [this.form[val]]
}
console.log('fixedList----else', _item)
// this.$set(this.fixedList, index, _item)
}
})
if (Object.keys(_item).length > 0 && !hasVal) this.fixedList.push(_item)
});
if (Object.keys(_item).length > 0 && !hasVal)
this.fixedList.push(_item);
} else {
this.$set(this.fixedList, 0, {
queryType: this.queryType[val]?this.queryType[val]:'equal',//'equal',
tableName: 'ic_resi_user',
queryType: this.queryType[val] ? this.queryType[val] : "equal", //'equal',
tableName: "ic_resi_user",
columnName: val,
columnValue: [this.form[val]]
})
columnValue: [this.form[val]],
});
}
}
}
console.log('fixedList----999', this.fixedList)
this.tempFormList.forEach((item) => {
if (item.columnName === val) item.isChange = true
})
if (item.columnName === val) item.isChange = true;
});
},
getOrgTreeList() {
const { user } = this.$store.state
const { user } = this.$store.state;
this.$http
.post('/gov/org/customeragency/agencygridtree', {})
.post("/gov/org/customeragency/agencygridtree", {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.msg);
} else {
console.log('获取组织树成功', res.data)
this.orgOptions=[]
this.orgOptions .push( res.data)
console.log("获取组织树成功", res.data);
this.orgOptions = [];
this.orgOptions.push(res.data);
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return this.$message.error("网络错误");
});
},
getGridList() {
const { user } = this.$store.state
const { user } = this.$store.state;
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId, purpose: 'query' })
.post("/gov/org/customergrid/gridoption", {
agencyId: user.agencyId,
purpose: "query",
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.msg);
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
console.log("获取查询详情成功", res.data);
this.optionsG = res.data;
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return this.$message.error("网络错误");
});
},
getValiheList() {
const { user } = this.$store.state
const { user } = this.$store.state;
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', {
gridIds: this.form.GRID_IDS,
agencyIds: this.form.AGENCY_IDS,
gridId: this.form.GRID_ID,
agencyId: this.form.AGENCY_ID,
// agencyId: user.agencyId
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.msg);
} else {
console.log('获取查询详情成功', res.data)
this.optionsV = res.data
console.log("获取查询详情成功", res.data);
this.optionsV = res.data;
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return this.$message.error("网络错误");
});
},
getBuildList() {
this.$http
.post('/gov/org/icbuilding/buildingoption', {
neighborHoodId: this.form.VILLAGE_ID
.post("/gov/org/icbuilding/buildingoption", {
neighborHoodId: this.form.VILLAGE_ID,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.msg);
} else {
console.log('获取查询详情成功', res.data)
this.optionsB = res.data
console.log("获取查询详情成功", res.data);
this.optionsB = res.data;
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return this.$message.error("网络错误");
});
},
getUniList() {
this.$http
.post('/gov/org/icbuildingunit/unitoption', {
buildingId: this.form.BUILD_ID
.post("/gov/org/icbuildingunit/unitoption", {
buildingId: this.form.BUILD_ID,
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.msg);
} else {
console.log('获取查询详情成功', res.data)
this.optionsD = res.data
console.log("获取查询详情成功", res.data);
this.optionsD = res.data;
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return this.$message.error("网络错误");
});
},
getHouseList() {
this.$http
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID })
.post("/gov/org/ichouse/houseoption", { unitId: this.form.UNIT_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.msg);
} else {
console.log('获取查询详情成功', res.data)
this.optionsH = res.data
console.log("获取查询详情成功", res.data);
this.optionsH = res.data;
}
})
.catch(() => {
return this.$message.error('网络错误')
})
return this.$message.error("网络错误");
});
},
computedBirth(age) {
let now = new Date();
let nowYear = now.getFullYear();
let nowMonth = now.getMonth()+1;
let nowMonth = now.getMonth() + 1;
let nowDay = now.getDate(); // daymonthmonthyearyear
let subYear = nowYear - age
if(nowMonth < 10){
nowMonth = '0'+ nowMonth
let subYear = nowYear - age;
if (nowMonth < 10) {
nowMonth = "0" + nowMonth;
}
if(nowDay < 10){
nowDay = '0' + nowDay
if (nowDay < 10) {
nowDay = "0" + nowDay;
}
console.log(subYear+'-'+nowMonth+'-'+nowDay);
return subYear + '-' + nowMonth + '-' + nowDay
}
}
}
console.log(subYear + "-" + nowMonth + "-" + nowDay);
return subYear + "-" + nowMonth + "-" + nowDay;
},
},
};
</script>
<style lang="scss" scope>

2
src/views/modules/base/resi.vue

@ -664,8 +664,8 @@ export default {
this.getTableData();
},
handleSearch (val) {
console.log("searchhh--", val);
this.currentPage = 1;
console.log(val);
this.conditions = val;
this.getTableData();
},

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

@ -72,6 +72,15 @@
<el-table-column prop="accountActivityCount" label="活跃账号数" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="accountCount" align="center" width="110" label="总账号数" :show-overflow-tooltip="true"></el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[10, 20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
></el-pagination>
</div>
</el-col>
<el-col :span="12">
@ -99,6 +108,15 @@
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" />
<el-table-column prop="agencyName" align="center" label="组织名称" :show-overflow-tooltip="true"></el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"
:current-page.sync="pageNo2"
:page-sizes="[10, 20, 50, 100, 200]"
:page-size="parseInt(pageSize2)"
layout="sizes, prev, pager, next, total"
:total="total2"
></el-pagination>
</div>
</el-col>
</el-row>
@ -155,17 +173,21 @@ export default {
value: 'agencyId'
},
tableData: [],
tableData2: [],
formData: {
orgId: '',
startDate: '',
endDate: ''
},
orgId: '',
cateOptions: [],
eventTypeCheck: [],
pageNo: 1,
pageSize: window.localStorage.getItem('pageSize') || 20,
total: 1,
pageNo2: 1,
pageSize2: window.localStorage.getItem('pageSize2') || 20,
total: 0,
total2: 0,
endPickerOptions: {
disabledDate: endDisabledDate
},
@ -177,16 +199,16 @@ export default {
},
computed: {
maxTableHeight() {
return this.$store.state.inIframe ? this.clientHeight - 400 + this.iframeHeigh : this.clientHeight - 400;
return this.$store.state.inIframe ? this.clientHeight - 439 + this.iframeHeigh : this.clientHeight - 439;
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
'formData.endTime': function(val) {
'formData.endDate': function(val) {
if (val && val != '') {
let arrayTemp = val.split(' ');
this.formData.endTime = arrayTemp[0] + ' 23:59:59';
this.formData.endDate = arrayTemp[0] + ' 23:59:59';
}
}
},
@ -194,12 +216,31 @@ export default {
console.log(this.$store.state);
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.orgId = this.agencyId;
this.getOrgTreeList();
this.getTableData();
this.getTableData2();
this.getCountLevel();
},
methods: {
handleSizeChange(val) {
this.pageSize = val;
window.localStorage.setItem('pageSize', val);
this.getTableData();
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTableData();
},
handleSizeChange2(val) {
this.pageSize2 = val;
window.localStorage.setItem('pageSize2', val);
this.getTableData2();
},
handleCurrentChange2(val) {
this.pageNo2 = val;
this.getTableData2();
},
handleChangeAgency(val) {
let obj = this.$refs['myCascader'].getCheckedNodes()[0].data;
console.log(obj);
@ -209,11 +250,13 @@ export default {
handleSearch(val) {
let tmp = this.formData.orgId;
if (!(tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null)) {
this.formData.orgId = '';
this.orgId = this.agencyId;
this.formData.level = '';
} else {
this.orgId = this.formData.orgId;
}
console.log(this.formData);
this.pageNo = 1;
this.pageNo = 1;this.pageNo2 = 1;
this.getTableData();
this.getTableData2();
this.getCountLevel();
@ -240,13 +283,17 @@ export default {
async handleExport(type) {
const url = '/gov/org/staffLoginLog/accountActivityInfo-export';
const { formData } = this;
const { data, code, msg } = await requestPost(url, param);
axios({
url: window.SITE_CONFIG['apiURL'] + url,
method: 'post',
data: {
isActivity: type,
...formData
orgId: this.orgId,
startDate: this.formData.startDate,
endDate: this.formData.endDate
},
responseType: 'blob'
})
@ -291,7 +338,7 @@ export default {
async getCountLevel() {
const url = '/gov/org/staffLoginLog/getActivityTotal';
// 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);
console.log('getCountLeveldata', data);
if (code === 0) {
@ -306,14 +353,20 @@ export default {
const url = '/gov/org/staffLoginLog/getAccountActivityInfo';
const { formData } = this;
const { data, code, msg } = await requestPost(url, {
let param = {
orgId: this.orgId,
startDate: this.formData.startDate,
endDate: this.formData.endDate,
isActivity: 1,
...formData
});
isPage: true,
pageNo: this.pageNo,
pageSize: this.pageSize
};
const { data, code, msg } = await requestPost(url, param);
this.tableLoading = false;
if (code === 0) {
this.total = data.total || 0;
this.tableData = data.list
? data.list.map(item => {
return item;
@ -328,14 +381,21 @@ export default {
const url = '/gov/org/staffLoginLog/getAccountActivityInfo';
const { formData } = this;
const { data, code, msg } = await requestPost(url, {
let param = {
orgId: this.orgId,
startDate: this.formData.startDate,
endDate: this.formData.endDate,
isActivity: 0,
...formData
});
isPage: true,
pageNo: this.pageNo2,
pageSize: this.pageSize2
};
const { data, code, msg } = await requestPost(url, param);
this.tableLoading2 = false;
if (code === 0) {
this.total2 = data.total || 0;
console.log(this.total2)
this.tableData2 = data.list
? data.list.map(item => {
return item;

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

@ -66,7 +66,7 @@
<div class="content">
<div class="name">{{ item.name }}</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>
@ -98,7 +98,7 @@
<div class="content">
<div class="name">{{ item.name }}</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>
@ -238,7 +238,8 @@ export default {
pieData2: [],
orgId: '',
purpose: '',
rentFlag: ''
rentFlag: '',
orgIdPath: ''
};
},
computed: {
@ -249,10 +250,10 @@ export default {
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
'formData.endTime': function(val) {
'formData.endDate': function(val) {
if (val && val != '') {
let arrayTemp = val.split(' ');
this.formData.endTime = arrayTemp[0] + ' 23:59:59';
this.formData.endDate = arrayTemp[0] + ' 23:59:59';
}
}
},
@ -260,19 +261,15 @@ export default {
console.log(this.$store.state);
this.user = this.$store.state.user;
this.agencyId = this.user.agencyId;
this.orgId = this.agencyId;
this.getOrgTreeList();
this.getTableData();
this.getsubData();
this.getsubData2();
},
methods: {
show(row) {
this.dialogVisible = true;
this.pageType = 'view';
this.detailId = row.houseId;
console.log('detailId', row);
console.log('detailId', this.detailId);
this.detailData = row;
},
handleClose() {
@ -290,7 +287,9 @@ export default {
const { data, code, msg } = await requestPost(url, {
pageSize,
pageNo,
orgIdPath: this.orgId,
orgIdPath: this.orgIdPath,
orgId: this.orgId,
orgType: this.orgType,
timeStart: this.formData.startDate,
timeEnd: this.formData.endDate,
purpose: this.purpose,
@ -322,9 +321,11 @@ export default {
this.$refs.pieChart.showLoading();
let url = '/gov/org/ichouse/getHousePurposeCount';
let param = {
orgIdPath: this.orgId,
orgIdPath: this.orgIdPath,
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);
this.$refs.pieChart.hideLoading();
@ -339,15 +340,17 @@ export default {
this.$refs.pieChart2.showLoading();
let url = '/gov/org/ichouse/getHouseStatusCount';
let param = {
orgIdPath: this.orgId,
orgIdPath: this.orgIdPath,
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);
this.$refs.pieChart2.hideLoading();
if (code === 0) {
this.pieData2 = data;
console.log('this.pieData2', this.pieData2);
this.getPie2();
} else {
this.$message.error(msg);
@ -398,11 +401,9 @@ export default {
};
});
console.log('chartData', this.chartData);
this.iniPieChart(this.chartData);
},
setPieData2() {
console.log(this.pieData2)
let data = [...this.pieData2.list];
let type = {
1: '出租',
@ -420,7 +421,6 @@ export default {
};
});
console.log('chartData', this.chartData2);
this.iniPieChart2(this.chartData2);
},
//
@ -660,11 +660,13 @@ export default {
data: {
pageSize,
pageNo,
orgIdPath: this.orgId,
orgIdPath: this.orgIdPath,
timeStart: this.formData.startDate,
timeEnd: this.formData.endDate,
purpose: this.purpose,
rentFlag: this.rentFlag
rentFlag: this.rentFlag,
orgId: this.orgId,
orgType: this.orgType
},
responseType: 'blob'
})
@ -695,12 +697,19 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log('获取组织树成功', res.data);
// let { agencyList, subAgencyList } = res.data;
let data = res.data;
console.log('获取组织树成功', data);
// let { agencyList, subAgencyList } = data;
// const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }];
// this.orgOptions = this.deepTree(_arr);
this.orgOptions = [];
this.orgOptions.push(res.data);
this.orgOptions.push(data);
this.orgId = data.agencyId;
this.orgIdPath = data.orgIdPath;
this.orgType = data.level;
this.getTableData();
this.getsubData();
this.getsubData2();
}
})
.catch(() => {
@ -716,16 +725,18 @@ export default {
this.getsubData2();
},
handleChangeAgency(val) {
// let obj = this.$refs['myCascader'].getCheckedNodes()[0].data;
let obj = this.$refs['myCascader'].getCheckedNodes()[0].data;
let tmp = this.formData.orgId;
if (tmp && typeof tmp != 'undefined' && tmp != 0 && tmp != null) {
this.orgId = this.formData.orgId;
this.orgIdPath = obj.orgIdPath;
this.orgType = obj.level;
} else {
console.log('ww');
this.orgId = this.agencyId;
this.orgId = this.orgOptions.agencyId;
this.orgIdPath = this.orgOptions.orgIdPath;
this.orgType = this.orgOptions.level;
}
console.log('this.orgId', this.orgId);
},
deepTree(arr) {

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

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

Loading…
Cancel
Save