diff --git a/packages/jianping/AppHelpedResident/hrAdd.vue b/packages/jianping/AppHelpedResident/hrAdd.vue
index f7addc01..a8823041 100644
--- a/packages/jianping/AppHelpedResident/hrAdd.vue
+++ b/packages/jianping/AppHelpedResident/hrAdd.vue
@@ -11,7 +11,7 @@
-
+
@@ -19,7 +19,7 @@
-
@@ -73,8 +73,8 @@
-
-
+
+
{{item.dictName}}
@@ -127,19 +127,19 @@
-
-
+
+
-
-
-
+
+
+
@@ -257,6 +257,7 @@ export default {
isHousehold: [{required: true, message: "请选择是否户主"}],
householdRelation: [{required: true, message: "请选择与户主关系"}],
householdIdNumber: [{required: true, message: "请选择户主身份证号"}],
+ riskType: [{required: true, message: "请选择风险因素"}],
}
},
rootArea() {
@@ -267,17 +268,32 @@ export default {
return {
form: {
householdRelation: "",
- healthyStatus: [],
- file: []
+ healthyStatus: '',
+ healthyStatusList: [],
+ file: [],
},
+ isSelectUser: false, //是否选择人员
}
},
methods: {
checkName(e) {
- // this.formData.name = e.name
- // this.formData.idNumber = e.idNumber
- // this.formData.phone = e.phone
- // this.formData.areaId = e.householdAreaId
+ if(!e) {
+ this.isSelectUser = false
+ this.form.name = ''
+ this.form.idNumber = ''
+ this.form.phone =''
+ this.form.areaId = ''
+ this.form.birthDate = ''
+ this.form.sex = ''
+ this.form.age = ''
+ return
+ }
+ this.form.name = e.name
+ this.form.idNumber = e.idNumber
+ this.form.phone = e.phone
+ this.form.areaId = e.householdAreaId
+ this.handleIdNumberAutocomplete(e.idNumber)
+ this.isSelectUser = true
},
back() {
this.$router.push({})
@@ -299,8 +315,8 @@ export default {
submit() {
this.$refs.ruleForm.validate(v => {
if (v) {
- if (this.form.isHousehold == 1) {
- this.form.householdIdNumber = this.form.idNumber
+ if (this.form.healthyStatusList.length) {
+ this.form.healthyStatus = this.form.healthyStatusList.join(',')
}
this.instance.post(`/app/apppreventionreturntopoverty/addOrUpdate`, this.form).then(res => {
if (res.code == 0) {
diff --git a/packages/jianping/AppHelpedResident/hrList.vue b/packages/jianping/AppHelpedResident/hrList.vue
index a9579631..9cf3f85f 100644
--- a/packages/jianping/AppHelpedResident/hrList.vue
+++ b/packages/jianping/AppHelpedResident/hrList.vue
@@ -11,8 +11,8 @@
-
-
+
+
-
+
@@ -106,7 +106,7 @@ export default {
files: []
},
miniTypeList: [],
- newTypeList: []
+ newTypeList: [],
}
},
methods: {
@@ -161,17 +161,14 @@ export default {
},
getDetail() {
let {id} = this.$route.query
- if(!id) {
- return
- }
- id && this.instance.post("/app/apppreventionreturntopoverty/queryDetailById", null, {
+ id && this.instance.post("/app/apppublicityinfo/queryDetailById", null, {
params: {id}
}).then(res => {
if (res?.data) {
if(res.data.pictureUrl) {
res.data.pictureUrlList = [{url: res.data.pictureUrl}]
}
- this.form = res.data
+ this.form = {...res.data}
this.getNewTypeList()
}
})
@@ -180,29 +177,35 @@ export default {
let {parentId} = this.$route.query
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
if (res.code == 0) {
- res.data.records.map((item) => {
- item.dictName = item.categoryName
- item.dictValue = item.id
+ this.miniTypeList = res.data.records.map((item) => {
+ return {
+ dictName: item.categoryName,
+ dictValue: item.id
+ }
})
- this.miniTypeList = res.data.records
+ console.log(this.miniTypeList)
+ if(this.$route.query.id) {
+ this.getDetail()
+ }
}
})
},
getNewTypeList() {
this.instance.post(`/app/apppublicitycategory/list?categoryType=2&size=100&parentId=${this.form.moduleId}`).then(res => {
if (res.code == 0) {
- res.data.records.map((item) => {
- item.dictName = item.categoryName
- item.dictValue = item.id
+ res.data.records
+ this.newTypeList = res.data.records.map((item) => {
+ return {
+ dictName: item.categoryName,
+ dictValue: item.id
+ }
})
- this.newTypeList = res.data.records
}
})
},
},
created() {
this.getTypeList()
- this.getDetail()
}
}
diff --git a/packages/jianping/AppPublicizeInformation/List.vue b/packages/jianping/AppPublicizeInformation/List.vue
index 2dbd9378..c9badac6 100644
--- a/packages/jianping/AppPublicizeInformation/List.vue
+++ b/packages/jianping/AppPublicizeInformation/List.vue
@@ -46,7 +46,7 @@
@selection-change="v=>ids=v.map(e=>e.id)">
- 编辑
+ 编辑
删除
@@ -130,7 +130,7 @@ export default {
methods: {
getTableData() {
this.instance.post("/app/apppublicityinfo/list", null, {
- params: {...this.page, ...this.search}
+ params: {...this.page, ...this.search, moduleId: this.miniTypeList[this.miniTypeIndex].id || ''}
}).then(res => {
if (res?.data) {
this.tableData = res.data?.records
@@ -139,7 +139,7 @@ export default {
})
},
showEdit(id) {
- this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id}, hash: "#add"})
+ this.$router.push({query: {id: id, parentId: this.typeList[this.typeIndex].id, moduleId: this.miniTypeList[this.miniTypeIndex].id}, hash: "#add"})
},
handleDelete(ids) {
this.$confirm("是否删除该条宣传资讯信息").then(() => {
@@ -197,6 +197,10 @@ export default {
this.instance.post(`/app/apppublicitycategory/list?categoryType=1&size=100&parentId=${parentId}`).then(res => {
if (res.code == 0) {
this.miniTypeList = res.data.records
+ if(res.data.records && res.data.records.length) {
+ this.miniTypeClick(0)
+ }
+
}
})
},
@@ -214,6 +218,9 @@ export default {
},
miniTypeClick(e) {
this.miniTypeIndex = e
+ this.current = 1
+ this.tableData = []
+ this.getTableData()
},
editMini(index) {
this.form = {...this.miniTypeList[index]}