dai 3 years ago
parent
commit
7ba152b830
  1. 2
      package.json
  2. 70
      src/views/components/resiSearch.vue
  3. 14
      src/views/modules/base/resi.vue

2
package.json

@ -39,7 +39,7 @@
"jsencrypt": "3.0.3", "jsencrypt": "3.0.3",
"lodash": "4.17.15", "lodash": "4.17.15",
"mint-ui": "2.2.13", "mint-ui": "2.2.13",
"node-sass": "4.12.0", "node-sass": "^4.12.0",
"ol": "6.9.0", "ol": "6.9.0",
"portfinder": "1.0.21", "portfinder": "1.0.21",
"proj4": "2.8.0", "proj4": "2.8.0",

70
src/views/components/resiSearch.vue

@ -13,6 +13,7 @@
:options="orgOptions" :options="orgOptions"
:props="orgOptionProps" :props="orgOptionProps"
:show-all-levels="false" :show-all-levels="false"
collapse-tags
@change="handleChangeAgency"></el-cascader> @change="handleChangeAgency"></el-cascader>
</div> </div>
</div> </div>
@ -242,6 +243,7 @@
<script> <script>
import inputRange from './rangeInput.vue' import inputRange from './rangeInput.vue'
import Ar from 'element-ui/src/locale/lang/ar'
export default { export default {
name: 'ResiSearch', name: 'ResiSearch',
components: { components: {
@ -302,17 +304,19 @@ export default {
let constForm = { let constForm = {
...form, ...form,
GRID_ID: '', GRID_ID: '',
GRID_IDS: '',
VILLAGE_ID: '', VILLAGE_ID: '',
BUILD_ID: '', BUILD_ID: '',
UNIT_ID: '', UNIT_ID: '',
HOME_ID: '' HOME_ID: ''
} }
let orgOptionProps = { let orgOptionProps = {
multiple: false, multiple: true,// 2023-04-06
value: 'agencyId', value: 'agencyId',
label: 'agencyName', label: 'agencyName',
children: 'subAgencyList', children: 'subAgencyList',
checkStrictly: true checkStrictly: true,
} }
return { return {
@ -331,7 +335,9 @@ export default {
fixedList: [], fixedList: [],
fixedForm: { fixedForm: {
AGENCY_ID: '', AGENCY_ID: '',
AGENCY_IDS: [],
GRID_ID: '', GRID_ID: '',
GRID_IDS: [],
VILLAGE_ID: '', VILLAGE_ID: '',
BUILD_ID: '', BUILD_ID: '',
UNIT_ID: '', UNIT_ID: '',
@ -341,7 +347,9 @@ export default {
form: { form: {
...form, ...form,
AGENCY_ID: '', AGENCY_ID: '',
AGENCY_IDS: [],
GRID_ID: '', GRID_ID: '',
GRID_IDS:[],
VILLAGE_ID: '', VILLAGE_ID: '',
BUILD_ID: '', BUILD_ID: '',
UNIT_ID: '', UNIT_ID: '',
@ -381,7 +389,7 @@ export default {
}, },
queryType:{ queryType:{
'AGENCY_ID':'like' 'AGENCY_ID':'list_equal'
} }
} }
}, },
@ -516,19 +524,30 @@ export default {
} }
}, },
handleChangeAgency(val) { handleChangeAgency(val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data // let checkedNodes = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) { this.$nextTick(()=> {
if(obj.level === 'grid'){ let checkedNodes = this.$refs["myCascader"].getCheckedNodes();
this.form.GRID_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; if (checkedNodes) {
this.form.AGENCY_ID='' //
// 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 { } else {
this.form.AGENCY_ID = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''; this.form.AGENCY_IDS.push(nodeData.agencyId);
this.form.GRID_ID = '' }
} }
} else { } else {
this.form.AGENCY_ID='' this.form.AGENCY_IDS = []
this.form.GRID_ID = '' this.form.GRID_IDS = []
} }
this.form.VILLAGE_ID = '' this.form.VILLAGE_ID = ''
@ -536,9 +555,9 @@ export default {
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
this.getValiheList() this.getValiheList()
})
}, },
handleChangeGrid(val) { handleChangeGrid(val) {
console.log('val', val)
this.form.VILLAGE_ID = '' this.form.VILLAGE_ID = ''
this.form.BUILD_ID = '' this.form.BUILD_ID = ''
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
@ -546,7 +565,6 @@ export default {
this.getValiheList() this.getValiheList()
}, },
handleChangeV(val) { handleChangeV(val) {
console.log('val', val)
this.form.BUILD_ID = '' this.form.BUILD_ID = ''
this.form.UNIT_ID = '' this.form.UNIT_ID = ''
this.form.HOME_ID = '' this.form.HOME_ID = ''
@ -574,15 +592,32 @@ export default {
this.fixedList.forEach((item, index) => { this.fixedList.forEach((item, index) => {
if (item.columnName == val) { if (item.columnName == val) {
hasVal = true hasVal = true
let valueInForm = this.form[val]
if (valueInForm instanceof Array) {
//
item.columnValue = valueInForm
} else {
//
item.columnValue[0] = this.form[val] item.columnValue[0] = this.form[val]
}
if (!this.form[val]) this.fixedList.splice(index, 1) if (!this.form[val]) this.fixedList.splice(index, 1)
console.log('fixedList----val', this.fixedList) console.log('fixedList----val', this.fixedList)
} else { } else {
let columnValue = undefined;
let valueInForm = this.form[val]
if (valueInForm instanceof Array) {
//
columnValue = valueInForm
} else {
//
columnValue = [valueInForm]
}
_item = { _item = {
queryType: this.queryType[val]?this.queryType[val]:'equal',//'equal', queryType: this.queryType[val]?this.queryType[val]:'equal',//'equal',
tableName: 'ic_resi_user', tableName: 'ic_resi_user',
columnName: val, columnName: val,
columnValue: [this.form[val]] columnValue: columnValue
} }
console.log('fixedList----else', _item) console.log('fixedList----else', _item)
// this.$set(this.fixedList, index, _item) // this.$set(this.fixedList, index, _item)
@ -599,7 +634,6 @@ export default {
} }
} }
} }
console.log('fixedList----999', this.fixedList)
this.tempFormList.forEach((item) => { this.tempFormList.forEach((item) => {
if (item.columnName === val) item.isChange = true if (item.columnName === val) item.isChange = true
}) })
@ -641,8 +675,8 @@ export default {
const { user } = this.$store.state const { user } = this.$store.state
this.$http this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { .post('/gov/org/icneighborhood/neighborhoodoption', {
gridId: this.form.GRID_ID, gridIds: this.form.GRID_IDS,
agencyId: this.form.AGENCY_ID, agencyIds: this.form.AGENCY_IDS,
// agencyId: user.agencyId // agencyId: user.agencyId
}) })
.then(({ data: res }) => { .then(({ data: res }) => {

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

@ -656,14 +656,9 @@ export default {
handleSearchFrom () { handleSearchFrom () {
let arr = []; let arr = [];
this.searchList.forEach((item) => { this.searchList.forEach((item) => {
const arr1 = const arr1 = this.$refs[`resiSearch${item.itemGroupId}`][0].handleSearch();
this.$refs[`resiSearch${item.itemGroupId}`][0].handleSearch();
arr = arr.concat(arr1); arr = arr.concat(arr1);
// console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`])
}); });
console.log("search-----refs", this.$refs);
console.log("search-----arr", arr);
this.currentPage = 1; this.currentPage = 1;
this.conditions = arr; this.conditions = arr;
this.getTableData(); this.getTableData();
@ -675,10 +670,6 @@ export default {
this.getTableData(); this.getTableData();
}, },
resetSearchForm (formName) { resetSearchForm (formName) {
// for(const n in this.form) {
// this.form[n] = ''
// }
// this.handleSearch()
this.searchList.forEach((item) => { this.searchList.forEach((item) => {
this.$refs[`resiSearch${item.itemGroupId}`][0].resetForm(); this.$refs[`resiSearch${item.itemGroupId}`][0].resetForm();
// console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`]) // console.log('search-----refs', this.$refs[`resiSearch${item.itemGroupId}`])
@ -1246,15 +1237,12 @@ export default {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
} else { } else {
console.log("获取查询详情成功--sss", res);
res.data.forEach((item) => { res.data.forEach((item) => {
item.queryItemList.forEach((n) => { item.queryItemList.forEach((n) => {
if (n.optionSourceType === "remote") { if (n.optionSourceType === "remote") {
this.getOptionsList(n.optionSourceValue).then((res) => { this.getOptionsList(n.optionSourceValue).then((res) => {
n.options = this.getTreeData(res); n.options = this.getTreeData(res);
}); });
// console.log('')
} else if (n.itemType == "radio" && n.options.length == 0) { } else if (n.itemType == "radio" && n.options.length == 0) {
n.options = [ n.options = [
{ {

Loading…
Cancel
Save