@@ -170,6 +170,7 @@ export default {
travelTypeList: [],
travelType: [],
fromType: '', //1编辑行程信息 2纳入管理
+ titleList: ['新增待管理', '编辑行程信息', '纳入管理']
}
},
computed: {
@@ -178,18 +179,21 @@ export default {
onLoad(option) {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
+ this.fromType = option.fromType
this.$dict.load('yesOrNo', 'EP_registerPersonType', 'EP_travelType', 'EP_abnormalType', 'epidemicTouchInFourteen',
'EP_homeStatus2', 'EP_quarantineStrategy', 'EP_communityHandleType', 'EP_highRiskIndustries', 'EP_controlMethod').then(() => {
- this.id = option.id
- this.fromType = option.fromType
+ if(option.id) {
+ this.id = option.id
+ this.getDetail()
+ }
this.travelTypeList = this.$dict.getDict('EP_travelType')
- this.getDetail()
this.getCropAreaId()
})
},
onShow() {
- document.title = this.fromType == 2 ? '纳入管理' : '编辑行程信息'
+ console.log(this.fromType)
+ document.title = this.titleList[this.fromType]
},
methods: {
submit() {
@@ -224,7 +228,8 @@ export default {
this.form.startTime = this.form.startTime + ':00',
this.form.arriveTime = this.form.arriveTime + ':00',
this.form.travelType = this.travelType.join(',')
- this.$http.post(`/app/appepidemicpreventionregisterinfo/updateForAdmin`, this.form).then((res) => {
+ var url = this.fromType == 0 ? '/app/appepidemicpreventionregisterinfo/addForCM' : '/app/appepidemicpreventionregisterinfo/updateForAdmin'
+ this.$http.post(url, this.form).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('updateDetail')
diff --git a/src/project/pingchang/AppCommunityManagement/HandleDetail.vue b/src/project/pingchang/AppCommunityManagement/HandleDetail.vue
index 57f60328..160af1d1 100644
--- a/src/project/pingchang/AppCommunityManagement/HandleDetail.vue
+++ b/src/project/pingchang/AppCommunityManagement/HandleDetail.vue
@@ -117,7 +117,7 @@
@@ -216,6 +216,19 @@ export default {
}).catch((err) => {
this.$u.toast(err)
})
+ },
+ changeStatus() {
+ this.$confirm(`是否将${this.info.name}纳入管理`).then(() => {
+ this.$http.post(`/app/appepidemicpreventioncommunitymanagement/cancel?id=${this.id}`, ).then((res) => {
+ if (res.code == 0) {
+ this.$u.toast('操作成功')
+ uni.$emit('updateList')
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 600)
+ }
+ })
+ })
}
},
}