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

调整

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