diff --git a/src/project/weiyang/AppWorkOrder/Add.vue b/src/project/weiyang/AppWorkOrder/Add.vue index 2dc4c233..b13d44c4 100644 --- a/src/project/weiyang/AppWorkOrder/Add.vue +++ b/src/project/weiyang/AppWorkOrder/Add.vue @@ -4,7 +4,7 @@ {{ forms.groupName || '请选择事件类型' }} - + @@ -65,21 +65,23 @@ export default { }, flag: false, show: false, - myList: [] + myList: [], + eventSource: '' } }, computed: { ...mapState(['user']), }, - onLoad() { - this.typeList() + onLoad(option) { this.forms.girdId = this.user.girdId this.forms.girdName = this.user.girdName this.forms.girdMemberId = this.user.girdMemberId this.forms.girdMemberName = this.user.name + this.eventSource = option.eventSource + this.typeList() }, onShow() { - document.title = '巡查添加' + document.title = '添加上报' this.forms.name = this.user.name this.forms.phone = this.user.phone uni.$on('chooseLat', res => { @@ -88,13 +90,12 @@ export default { }, methods: { typeList() { - this.$http.post(`/app/apppatrolreportgroupv2/list`, null, { - params: { - size: 9999, - }, - }).then((res) => { + this.$http.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}&size=9999`).then((res) => { if (res.code == 0) { - this.myList = res.data.records + res.data.map((item) => { + var i = {dictName: item, dictValue: item} + this.myList.push(i) + }) this.$forceUpdate() } }) diff --git a/src/project/weiyang/AppWorkOrder/Content.vue b/src/project/weiyang/AppWorkOrder/Content.vue index 3a7dbfe8..77d717f9 100644 --- a/src/project/weiyang/AppWorkOrder/Content.vue +++ b/src/project/weiyang/AppWorkOrder/Content.vue @@ -9,7 +9,7 @@ {{ forms.groupName || '请选择事件分类' }} - + { this.selectUser = res @@ -83,14 +85,12 @@ export default { }, methods: { typeList() { - this.$http.post(`/app/apppatrolreportgroupv2/list`, null, { - params: { - size: 9999, - }, - }) - .then((res) => { + this.$http.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}&size=9999`).then((res) => { if (res.code == 0) { - this.myList = res.data.records + res.data.map((item) => { + var i = {dictName: item, dictValue: item} + this.myList.push(i) + }) this.$forceUpdate() } }) diff --git a/src/project/weiyang/AppWorkOrder/List.vue b/src/project/weiyang/AppWorkOrder/List.vue index 9b8e0349..1f0120cf 100644 --- a/src/project/weiyang/AppWorkOrder/List.vue +++ b/src/project/weiyang/AppWorkOrder/List.vue @@ -54,7 +54,7 @@
- + @@ -171,7 +171,7 @@ export default { uni.navigateTo({url}) }, add() { - uni.navigateTo({url: './Add'}) + uni.navigateTo({url: `./Add?eventSource=${this.tabList[this.currentTabs].value}`}) }, getIsAdd() { @@ -184,10 +184,10 @@ export default { getTypeList() { this.typeList = [] - this.instance.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.tabs[this.currIndex].value}`).then(res => { + this.$http.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.tabs[this.currIndex].value}`).then(res => { if (res.code == 0) { res.data.map((item) => { - var i = {distName: item, dictValue: item} + var i = {dictName: item, dictValue: item} this.typeList.push(i) }) }