zcy hace 4 años
padre
commit
22fa47fea5

+ 3 - 3
src/views/basics/add/CheckAndEditModel.vue

@@ -103,7 +103,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -112,7 +112,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -138,7 +138,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/check/view/bl/CheckAndEditModel.vue

@@ -101,7 +101,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -110,7 +110,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -136,7 +136,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/check/view/dc/CheckAndEditModel.vue

@@ -103,7 +103,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -112,7 +112,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -138,7 +138,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/check/view/fd/CheckAndEditModel.vue

@@ -98,7 +98,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -107,7 +107,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -133,7 +133,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/check/view/gl/CheckAndEditModel.vue

@@ -106,7 +106,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -115,7 +115,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -141,7 +141,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/check/view/jc/CheckAndEditModel.vue

@@ -98,7 +98,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -107,7 +107,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -133,7 +133,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/check/view/wjc/CheckAndEditModel.vue

@@ -98,7 +98,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -107,7 +107,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -133,7 +133,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 1 - 1
src/views/basics/line/index.vue

@@ -145,7 +145,7 @@ export default {
       columns: columns(this),
       url: {
         list: '/business/catenary/bus/line/list',
-        delete: '/business/catenary/bus/line/{lineIds}?lineIds=',
+        delete: '/business/catenary/bus/line/',
         exportXlsUrl: '/exportXlsUrl',
         importExcelUrl: `${process.env.VUE_APP_BASE_API}/importExcelUrl`,
         tree: '/system/dept/treeSelect'

+ 3 - 3
src/views/basics/pillar/CheckAndEditModel.vue

@@ -129,7 +129,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -138,7 +138,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -167,7 +167,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {

+ 2 - 12
src/views/basics/suoting/CheckAndEditModel.vue

@@ -55,7 +55,6 @@ export default {
   },
   data() {
     return {
-      stationShow: false,
       lineShow: false,
       treeData: [],
       labelCol: { span: 4 },
@@ -83,22 +82,13 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
           this.lineShow = true
         })
       }
-    },
-    'model.lineId': {
-      deep: true,
-      handler: function(newV, oldV) {
-        this.stationShow = false
-        this.$nextTick(() => {
-          this.stationShow = true
-        })
-      }
     }
   },
   created() {
@@ -117,7 +107,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null }
       this.visible = true
     },
     edit(record) {

+ 3 - 3
src/views/basics/tunnel/CheckAndEditModel.vue

@@ -101,7 +101,7 @@ export default {
   },
   watch: {
     'model.deptId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.lineShow = false
         this.$nextTick(() => {
@@ -110,7 +110,7 @@ export default {
       }
     },
     'model.lineId': {
-      deep: true,
+      immediate: true,
       handler: function(newV, oldV) {
         this.stationShow = false
         this.$nextTick(() => {
@@ -139,7 +139,7 @@ export default {
       })
     },
     add() {
-      this.model = {}
+      this.model = { lineId: null, stationId: null }
       this.visible = true
     },
     edit(record) {