Commit 4d8e87ac authored by 李苏's avatar 李苏 💬

调整

parent f9d14087
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default{ export default{
async onLoad(){ async onLoad(){
...@@ -123,7 +124,7 @@ ...@@ -123,7 +124,7 @@
/* 重置表单 */ /* 重置表单 */
this.$refs.form.resetFields() this.$refs.form.resetFields()
this.form.sjwcsj = new Date().getTime() this.form.sjwcsj = new Date().getTime()
this.$eventBus.$emit('save'); eventBus.$emit('save');
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
......
...@@ -106,6 +106,7 @@ ...@@ -106,6 +106,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default { export default {
data() { data() {
return { return {
...@@ -178,7 +179,8 @@ ...@@ -178,7 +179,8 @@
}, },
async onLoad() { async onLoad() {
this.apiGetDwxList() this.apiGetDwxList()
this.$eventBus.$on('save', () => { eventBus.$on('save', () => {
console.log('$on save')
this.dwxSearch() this.dwxSearch()
}) })
this.ztMap = await this.$match({ this.ztMap = await this.$match({
...@@ -192,7 +194,7 @@ ...@@ -192,7 +194,7 @@
}, },
onUnload() { onUnload() {
this.$eventBus.$off('save') eventBus.$off('save')
}, },
} }
</script> </script>
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default { export default {
onLoad() { onLoad() {
uni.getStorage({ uni.getStorage({
...@@ -74,18 +75,18 @@ ...@@ -74,18 +75,18 @@
this.form.hbrid = res.data.userid this.form.hbrid = res.data.userid
} }
}); });
this.$eventBus.$on('xzxm', (xmxx) => { eventBus.$on('xzxm', (xmxx) => {
this.form.xmid = xmxx.id this.form.xmid = xmxx.id
this.form.xmName = xmxx.name this.form.xmName = xmxx.name
}) })
this.$eventBus.$on('xzsj', (sjxx) => { eventBus.$on('xzsj', (sjxx) => {
this.form.sjwhid = sjxx.id this.form.sjwhid = sjxx.id
this.form.sjwhName = sjxx.sjms this.form.sjwhName = sjxx.sjms
}) })
}, },
onUnload() { onUnload() {
this.$eventBus.$off('xzxm') eventBus.$off('xzxm')
this.$eventBus.$off('xzsj') eventBus.$off('xzsj')
}, },
data() { data() {
return { return {
...@@ -151,13 +152,14 @@ ...@@ -151,13 +152,14 @@
}) })
}, },
back(){ back(){
eventBus.$emit('save')
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1,
}) })
this.$eventBus.$emit('save')
}, },
submit() { submit() {
this.$refs.form.validate().then(res => { this.$refs.form.validate().then(res => {
......
...@@ -107,7 +107,9 @@ ...@@ -107,7 +107,9 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default{ export default{
async onLoad(){ async onLoad(){
this.ztMap= await this.$match({ this.ztMap= await this.$match({
url:'/xmgl/gcxm/init/zt' url:'/xmgl/gcxm/init/zt'
...@@ -116,12 +118,12 @@ ...@@ -116,12 +118,12 @@
// url:'device/sbdxj/dxjrw/init/zt' // url:'device/sbdxj/dxjrw/init/zt'
// }) // })
this.dwxSearch() this.dwxSearch()
this.$eventBus.$on('save', () => { eventBus.$on('save', () => {
this.dwxSearch() this.dwxSearch()
}) })
}, },
onUnload() { onUnload() {
this.$eventBus.$off('save') eventBus.$off('save')
}, },
data() { data() {
return{ return{
...@@ -164,7 +166,7 @@ ...@@ -164,7 +166,7 @@
/* 处理点检任务 */ /* 处理点检任务 */
handleIt(item) { handleIt(item) {
this.$eventBus.$emit('xzsj',item) eventBus.$emit('xzsj',item)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
</template> </template>
<script> <script>
import eventBus from '@/common/util/eventBus.js'
export default{ export default{
async onLoad(){ async onLoad(){
this.ztMap= await this.$match({ this.ztMap= await this.$match({
...@@ -139,12 +140,12 @@ ...@@ -139,12 +140,12 @@
// url:'device/sbdxj/dxjrw/init/zt' // url:'device/sbdxj/dxjrw/init/zt'
// }) // })
this.dwxSearch() this.dwxSearch()
this.$eventBus.$on('save', () => { eventBus.$on('save', () => {
this.dwxSearch() this.dwxSearch()
}) })
}, },
onUnload() { onUnload() {
this.$eventBus.$off('save') eventBus.$off('save')
}, },
data() { data() {
return{ return{
...@@ -187,7 +188,7 @@ ...@@ -187,7 +188,7 @@
/* 处理点检任务 */ /* 处理点检任务 */
handleIt(item) { handleIt(item) {
this.$eventBus.$emit('xzxm',item) eventBus.$emit('xzxm',item)
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment