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"
>
<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 label="所属组织" prop="agencyId" label-width="100px" v-else>
<el-cascader class="u-item-width-normal"
size="small"
ref="myCascader"
v-model="agencyIdTemp"
:options="orgOptions"
:props="orgOptionProps"
:show-all-levels="false"
@change="handleChangeAgency"
clearable>
</el-cascader>
<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-col>
</el-row>
<el-row>
<el-col :span="12">
@ -365,6 +371,10 @@
type: String,
default: "manage",
},
formType:{
type:Object,
default:"add"
}
},
data() {
@ -378,6 +388,9 @@
return {
formType:'',
btnDisable: false,
selGridId: [],
optionsA: [],
formData: {
name: "",
idType: null,
@ -410,6 +423,8 @@
idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" },
],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
},
scopeId: "",
@ -426,9 +441,11 @@
watch: {},
components: {},
created() {
this.getDicts();
this.getOrgTreeList()
async created() {
await this.getDicts();
// this.getOrgTreeList()
await this.getGridList()
},
async mounted() {
this.startLoading();
@ -535,6 +552,59 @@
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) {
console.log(agencyId,options);
for (let i = 0; i < options.length; i++) {
@ -611,6 +681,9 @@
padding-right: 10px;
}
}
.width-two {
width: 553px;
}
</style>

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

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

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

@ -11,6 +11,32 @@
:rules="dataRule"
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-col :span="12">
<div class="info-prop" v-if="formType == 'detail'">
@ -515,6 +541,8 @@ export default {
data() {
return {
btnDisable: false,
selGridId: [],
optionsA: [],
genderList,
binaryOptionList,
@ -545,6 +573,7 @@ export default {
employmentWish: "",
specialSkill: "",
remark: "",
agencyId:""
},
dataRule: {
@ -554,6 +583,7 @@ export default {
idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" },
],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
},
scopeId: "",
@ -574,6 +604,7 @@ export default {
components: {},
async created() {
await this.getDicts();
await this.getGridList()
},
async mounted() {
this.startLoading();
@ -690,6 +721,59 @@ export default {
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>
@ -726,4 +810,7 @@ export default {
padding-right: 10px;
}
}
.width-two {
width: 553px;
}
</style>

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

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

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

@ -11,6 +11,32 @@
:rules="dataRule"
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-col :span="12">
<div class="info-prop" v-if="formType == 'detail'">
@ -589,6 +615,8 @@ export default {
};
return {
btnDisable: false,
selGridId: [],
optionsA: [],
formData: {
name: "",
@ -616,6 +644,7 @@ export default {
pubWelfareJobFlag: null,
workUnit: "",
remark: "",
agencyId:""
},
endPickerOptionsJoinWar: {
disabledDate: (time) => endDisabledDate(time, "joinWarStartTime"),
@ -633,6 +662,7 @@ export default {
idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" },
],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
},
scopeId: "",
@ -650,6 +680,7 @@ export default {
components: {},
async created() {
await this.getDicts();
await this.getGridList()
},
async mounted() {
this.startLoading();
@ -757,7 +788,59 @@ export default {
this.resetData();
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() {
this.formData = {};
},
@ -811,6 +894,9 @@ export default {
padding-right: 10px;
}
}
.width-two {
width: 553px;
}
</style>

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

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

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

@ -11,6 +11,33 @@
:rules="dataRule"
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-col :span="12">
<div class="info-prop" v-if="formType == 'detail'">
@ -373,6 +400,8 @@ export default {
data() {
return {
btnDisable: false,
selGridId: [],
optionsA: [],
formData: {
name: "",
@ -390,6 +419,7 @@ export default {
occupation: "",
hobbyCodes: [],
remark: "",
agencyId:""
},
genderList,
binaryOptionList,
@ -400,6 +430,7 @@ export default {
idType: [
{ required: true, message: "证件类型不能为空", trigger: "bulr" },
],
agencyId: [{ required: true, message: "所属组织不能为空", trigger: "bulr" }],
},
scopeId: "",
dicts: {
@ -417,6 +448,7 @@ export default {
components: {},
async created() {
await this.getDicts();
await this.getGridList()
},
async mounted() {
this.startLoading();
@ -523,6 +555,59 @@ export default {
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>
@ -559,6 +644,9 @@ export default {
padding-right: 10px;
}
}
.width-two {
width: 553px;
}
</style>

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

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

Loading…
Cancel
Save