Browse Source

#bug586居民分类缺少组织

feature
mk 2 years ago
parent
commit
bb3b375a46
  1. 113
      src/views/modules/base/residentManagement/subsistenceAllowance/addForm.vue
  2. 9
      src/views/modules/base/residentManagement/subsistenceAllowance/subsistenceAllowance.vue
  3. 87
      src/views/modules/base/residentManagement/unemployment/addForm.vue
  4. 9
      src/views/modules/base/residentManagement/unemployment/unemployment.vue
  5. 86
      src/views/modules/base/residentManagement/veteran/addForm.vue
  6. 10
      src/views/modules/base/residentManagement/veteran/veteran.vue
  7. 88
      src/views/modules/base/residentManagement/volunteer/addForm.vue
  8. 9
      src/views/modules/base/residentManagement/volunteer/volunteer.vue

113
src/views/modules/base/residentManagement/subsistenceAllowance/addForm.vue

@ -12,24 +12,30 @@
class="div_form" class="div_form"
> >
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<div class="info-prop" v-if="formType == 'detail'"> <div class="info-prop"
<span class="info-title-2">所属组织: </span> v-if="formType == 'detail'">
<span>{{ formData.agencyName || "--" }}</span> <span class="info-title-2">所属组织: </span>
</div> <span>{{ formData.agencyName || "--" }}</span>
<el-form-item label="所属组织" prop="agencyId" label-width="100px" v-else> </div>
<el-cascader class="u-item-width-normal" <el-form-item v-else
size="small" label="所属组织"
ref="myCascader" label-width="100px"
v-model="agencyIdTemp" prop="agencyId">
:options="orgOptions" <el-cascader v-if="formType == 'add'"
:props="orgOptionProps" ref="ref_cascader_agency"
:show-all-levels="false" class="width-two"
@change="handleChangeAgency" v-model=" selGridId"
clearable> :options="optionsA"
</el-cascader> @change="handleChangeAngency"
:props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}"
clearable />
<span v-else>{{ formData.agencyName || "--" }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -365,6 +371,10 @@
type: String, type: String,
default: "manage", default: "manage",
}, },
formType:{
type:Object,
default:"add"
}
}, },
data() { data() {
@ -378,6 +388,9 @@
return { return {
formType:'', formType:'',
btnDisable: false, btnDisable: false,
selGridId: [],
optionsA: [],
formData: { formData: {
name: "", name: "",
idType: null, idType: null,
@ -410,6 +423,8 @@
idType: [ idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" }, { required: true, message: "证件类型不能为空", trigger: "bulr" },
], ],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
}, },
scopeId: "", scopeId: "",
@ -426,9 +441,11 @@
watch: {}, watch: {},
components: {}, components: {},
created() { async created() {
this.getDicts(); await this.getDicts();
this.getOrgTreeList() // this.getOrgTreeList()
await this.getGridList()
}, },
async mounted() { async mounted() {
this.startLoading(); this.startLoading();
@ -535,6 +552,59 @@
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
handleChangeAngency (val) {
let obj = this.$refs["ref_cascader_agency"].getCheckedNodes()[0].data;
console.log('改变组织', obj)
if (obj) {
if (obj.level !== 'community') {
this.$message.info('请选择社区')
this.formData.agencyId = ''
this.selGridId = []
return false
} else {
this.formData.agencyId = val
}
}
},
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
agencyId: user.agencyId,
client: 'gov'
}
this.$http
// .post('/gov/org/userhouse/service/serviceScopeTree')
// .post('/data/aggregator/org/agencytree', params)
.post('/gov/org/customeragency/staffinagencylist')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
let { agencyList, subAgencyList } = res.data
const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
}
})
.catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误')
})
this.dataListLoading = false
},
deepTree (arr) {
if (Array.isArray(arr)) {
return arr.map(item => {
return {
...item,
subAgencyList: item.subAgencyList.length > 0 && this.deepTree(item.subAgencyList) || null
}
})
}
},
findPathInOptions(agencyId, options) { findPathInOptions(agencyId, options) {
console.log(agencyId,options); console.log(agencyId,options);
for (let i = 0; i < options.length; i++) { for (let i = 0; i < options.length; i++) {
@ -611,6 +681,9 @@
padding-right: 10px; padding-right: 10px;
} }
} }
.width-two {
width: 553px;
}
</style> </style>

9
src/views/modules/base/residentManagement/subsistenceAllowance/subsistenceAllowance.vue

@ -215,7 +215,14 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="agencyName"
align="center"
width="100"
label="所属组织"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column <el-table-column
prop="mobile" prop="mobile"
align="center" align="center"

87
src/views/modules/base/residentManagement/unemployment/addForm.vue

@ -11,6 +11,32 @@
:rules="dataRule" :rules="dataRule"
class="div_form" class="div_form"
> >
<el-row>
<el-col :span="24">
<div class="info-prop"
v-if="formType == 'detail'">
<span class="info-title-2">所属组织: </span>
<span>{{ formData.agencyName || "--" }}</span>
</div>
<el-form-item v-else
label="所属组织"
label-width="100px"
prop="agencyId">
<el-cascader v-if="formType == 'add'"
ref="ref_cascader_agency"
class="width-two"
v-model=" selGridId"
:options="optionsA"
@change="handleChangeAngency"
:props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}"
clearable />
<span v-else>{{ formData.agencyName || "--" }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<div class="info-prop" v-if="formType == 'detail'"> <div class="info-prop" v-if="formType == 'detail'">
@ -515,6 +541,8 @@ export default {
data() { data() {
return { return {
btnDisable: false, btnDisable: false,
selGridId: [],
optionsA: [],
genderList, genderList,
binaryOptionList, binaryOptionList,
@ -545,6 +573,7 @@ export default {
employmentWish: "", employmentWish: "",
specialSkill: "", specialSkill: "",
remark: "", remark: "",
agencyId:""
}, },
dataRule: { dataRule: {
@ -554,6 +583,7 @@ export default {
idType: [ idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" }, { required: true, message: "证件类型不能为空", trigger: "bulr" },
], ],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
}, },
scopeId: "", scopeId: "",
@ -574,6 +604,7 @@ export default {
components: {}, components: {},
async created() { async created() {
await this.getDicts(); await this.getDicts();
await this.getGridList()
}, },
async mounted() { async mounted() {
this.startLoading(); this.startLoading();
@ -690,6 +721,59 @@ export default {
loading.close(); loading.close();
} }
}, },
handleChangeAngency (val) {
let obj = this.$refs["ref_cascader_agency"].getCheckedNodes()[0].data;
console.log('改变组织', obj)
if (obj) {
if (obj.level !== 'community') {
this.$message.info('请选择社区')
this.formData.agencyId = ''
this.selGridId = []
return false
} else {
this.formData.agencyId = val
}
}
},
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
agencyId: user.agencyId,
client: 'gov'
}
this.$http
// .post('/gov/org/userhouse/service/serviceScopeTree')
// .post('/data/aggregator/org/agencytree', params)
.post('/gov/org/customeragency/staffinagencylist')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
let { agencyList, subAgencyList } = res.data
const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
}
})
.catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误')
})
this.dataListLoading = false
},
deepTree (arr) {
if (Array.isArray(arr)) {
return arr.map(item => {
return {
...item,
subAgencyList: item.subAgencyList.length > 0 && this.deepTree(item.subAgencyList) || null
}
})
}
},
}, },
}; };
</script> </script>
@ -726,4 +810,7 @@ export default {
padding-right: 10px; padding-right: 10px;
} }
} }
.width-two {
width: 553px;
}
</style> </style>

9
src/views/modules/base/residentManagement/unemployment/unemployment.vue

@ -349,7 +349,14 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="agencyName"
align="center"
width="100"
label="所属组织"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column <el-table-column
prop="mobile" prop="mobile"
align="center" align="center"

86
src/views/modules/base/residentManagement/veteran/addForm.vue

@ -11,6 +11,32 @@
:rules="dataRule" :rules="dataRule"
class="div_form" class="div_form"
> >
<el-row>
<el-col :span="24">
<div class="info-prop"
v-if="formType == 'detail'">
<span class="info-title-2">所属组织: </span>
<span>{{ formData.agencyName || "--" }}</span>
</div>
<el-form-item v-else
label="所属组织"
label-width="100px"
prop="agencyId">
<el-cascader v-if="formType == 'add'"
ref="ref_cascader_agency"
class="width-two"
v-model=" selGridId"
:options="optionsA"
@change="handleChangeAngency"
:props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}"
clearable />
<span v-else>{{ formData.agencyName || "--" }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<div class="info-prop" v-if="formType == 'detail'"> <div class="info-prop" v-if="formType == 'detail'">
@ -589,6 +615,8 @@ export default {
}; };
return { return {
btnDisable: false, btnDisable: false,
selGridId: [],
optionsA: [],
formData: { formData: {
name: "", name: "",
@ -616,6 +644,7 @@ export default {
pubWelfareJobFlag: null, pubWelfareJobFlag: null,
workUnit: "", workUnit: "",
remark: "", remark: "",
agencyId:""
}, },
endPickerOptionsJoinWar: { endPickerOptionsJoinWar: {
disabledDate: (time) => endDisabledDate(time, "joinWarStartTime"), disabledDate: (time) => endDisabledDate(time, "joinWarStartTime"),
@ -633,6 +662,7 @@ export default {
idType: [ idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" }, { required: true, message: "证件类型不能为空", trigger: "bulr" },
], ],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
}, },
scopeId: "", scopeId: "",
@ -650,6 +680,7 @@ export default {
components: {}, components: {},
async created() { async created() {
await this.getDicts(); await this.getDicts();
await this.getGridList()
}, },
async mounted() { async mounted() {
this.startLoading(); this.startLoading();
@ -757,7 +788,59 @@ export default {
this.resetData(); this.resetData();
this.$emit("handleClose"); this.$emit("handleClose");
}, },
handleChangeAngency (val) {
let obj = this.$refs["ref_cascader_agency"].getCheckedNodes()[0].data;
console.log('改变组织', obj)
if (obj) {
if (obj.level !== 'community') {
this.$message.info('请选择社区')
this.formData.agencyId = ''
this.selGridId = []
return false
} else {
this.formData.agencyId = val
}
}
},
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
agencyId: user.agencyId,
client: 'gov'
}
this.$http
// .post('/gov/org/userhouse/service/serviceScopeTree')
// .post('/data/aggregator/org/agencytree', params)
.post('/gov/org/customeragency/staffinagencylist')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
let { agencyList, subAgencyList } = res.data
const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
}
})
.catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误')
})
this.dataListLoading = false
},
deepTree (arr) {
if (Array.isArray(arr)) {
return arr.map(item => {
return {
...item,
subAgencyList: item.subAgencyList.length > 0 && this.deepTree(item.subAgencyList) || null
}
})
}
},
resetData() { resetData() {
this.formData = {}; this.formData = {};
}, },
@ -811,6 +894,9 @@ export default {
padding-right: 10px; padding-right: 10px;
} }
} }
.width-two {
width: 553px;
}
</style> </style>

10
src/views/modules/base/residentManagement/veteran/veteran.vue

@ -377,7 +377,15 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="agencyName"
align="center"
width="100"
label="所属组织"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column <el-table-column
prop="mobile" prop="mobile"
align="center" align="center"

88
src/views/modules/base/residentManagement/volunteer/addForm.vue

@ -11,6 +11,33 @@
:rules="dataRule" :rules="dataRule"
class="div_form" class="div_form"
> >
<el-row>
<el-col :span="24">
<div class="info-prop"
v-if="formType == 'detail'">
<span class="info-title-2">所属组织: </span>
<span>{{ formData.agencyName || "--" }}</span>
</div>
<el-form-item v-else
label="所属组织"
label-width="100px"
prop="agencyId">
<el-cascader v-if="formType == 'add'"
ref="ref_cascader_agency"
class="width-two"
v-model=" selGridId"
:options="optionsA"
@change="handleChangeAngency"
:props="{ checkStrictly: true, emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}"
clearable />
<span v-else>{{ formData.agencyName || "--" }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<div class="info-prop" v-if="formType == 'detail'"> <div class="info-prop" v-if="formType == 'detail'">
@ -373,6 +400,8 @@ export default {
data() { data() {
return { return {
btnDisable: false, btnDisable: false,
selGridId: [],
optionsA: [],
formData: { formData: {
name: "", name: "",
@ -390,6 +419,7 @@ export default {
occupation: "", occupation: "",
hobbyCodes: [], hobbyCodes: [],
remark: "", remark: "",
agencyId:""
}, },
genderList, genderList,
binaryOptionList, binaryOptionList,
@ -400,6 +430,7 @@ export default {
idType: [ idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" }, { required: true, message: "证件类型不能为空", trigger: "bulr" },
], ],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
}, },
scopeId: "", scopeId: "",
dicts: { dicts: {
@ -417,6 +448,7 @@ export default {
components: {}, components: {},
async created() { async created() {
await this.getDicts(); await this.getDicts();
await this.getGridList()
}, },
async mounted() { async mounted() {
this.startLoading(); this.startLoading();
@ -523,6 +555,59 @@ export default {
loading.close(); loading.close();
} }
}, },
handleChangeAngency (val) {
let obj = this.$refs["ref_cascader_agency"].getCheckedNodes()[0].data;
console.log('改变组织', obj)
if (obj) {
if (obj.level !== 'community') {
this.$message.info('请选择社区')
this.formData.agencyId = ''
this.selGridId = []
return false
} else {
this.formData.agencyId = val
}
}
},
getGridList () {
const { user } = this.$store.state
this.dataListLoading = true
const params = {
agencyId: user.agencyId,
client: 'gov'
}
this.$http
// .post('/gov/org/userhouse/service/serviceScopeTree')
// .post('/data/aggregator/org/agencytree', params)
.post('/gov/org/customeragency/staffinagencylist')
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
let { agencyList, subAgencyList } = res.data
const _arr = [{ ...agencyList, subAgencyList: [...subAgencyList] }]
this.optionsA = this.deepTree(_arr)
}
})
.catch(() => {
this.dataListLoading = false
return this.$message.error('网络错误')
})
this.dataListLoading = false
},
deepTree (arr) {
if (Array.isArray(arr)) {
return arr.map(item => {
return {
...item,
subAgencyList: item.subAgencyList.length > 0 && this.deepTree(item.subAgencyList) || null
}
})
}
},
}, },
}; };
</script> </script>
@ -559,6 +644,9 @@ export default {
padding-right: 10px; padding-right: 10px;
} }
} }
.width-two {
width: 553px;
}
</style> </style>

9
src/views/modules/base/residentManagement/volunteer/volunteer.vue

@ -288,7 +288,14 @@
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="agencyName"
align="center"
width="100"
label="所属组织"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column <el-table-column
prop="mobile" prop="mobile"
align="center" align="center"

Loading…
Cancel
Save