Commit 77f5558eaddc89ae9a52107ef301f2ac2ff80395

Authored by wuxw
1 parent 71aaf711

v1.9 巡检计划中 修改巡检路线没有选择的问题

src/components/inspection/editInspectionPlan.vue
@@ -162,19 +162,18 @@ export default { @@ -162,19 +162,18 @@ export default {
162 routeOptions: [], 162 routeOptions: [],
163 signTypeOptions: [], 163 signTypeOptions: [],
164 weekDays: [ 164 weekDays: [
165 - this.$t('inspectionPlan.monday'),  
166 - this.$t('inspectionPlan.tuesday'),  
167 - this.$t('inspectionPlan.wednesday'),  
168 - this.$t('inspectionPlan.thursday'),  
169 - this.$t('inspectionPlan.friday'),  
170 - this.$t('inspectionPlan.saturday'),  
171 - this.$t('inspectionPlan.sunday') 165 + this.$t('addInspectionPlan.monday'),
  166 + this.$t('addInspectionPlan.tuesday'),
  167 + this.$t('addInspectionPlan.wednesday'),
  168 + this.$t('addInspectionPlan.thursday'),
  169 + this.$t('addInspectionPlan.friday'),
  170 + this.$t('addInspectionPlan.saturday'),
  171 + this.$t('addInspectionPlan.sunday')
172 ] 172 ]
173 } 173 }
174 }, 174 },
175 async created() { 175 async created() {
176 await this.loadDictData() 176 await this.loadDictData()
177 - this.loadRoutes()  
178 }, 177 },
179 methods: { 178 methods: {
180 async loadDictData() { 179 async loadDictData() {
@@ -187,11 +186,11 @@ export default { @@ -187,11 +186,11 @@ export default {
187 186
188 async loadRoutes() { 187 async loadRoutes() {
189 try { 188 try {
190 - const { data } = await listInspectionRoutes({ 189 + const { inspectionRoutes } = await listInspectionRoutes({
191 page: 1, 190 page: 1,
192 row: 100 191 row: 100
193 }) 192 })
194 - this.routeOptions = data 193 + this.routeOptions = inspectionRoutes
195 } catch (error) { 194 } catch (error) {
196 console.error('Failed to load routes:', error) 195 console.error('Failed to load routes:', error)
197 } 196 }
@@ -206,6 +205,8 @@ export default { @@ -206,6 +205,8 @@ export default {
206 workdays: plan.inspectionWorkday ? plan.inspectionWorkday.split(',').map(Number) : [] 205 workdays: plan.inspectionWorkday ? plan.inspectionWorkday.split(',').map(Number) : []
207 } 206 }
208 this.loadStaffs(plan.inspectionPlanId) 207 this.loadStaffs(plan.inspectionPlanId)
  208 + this.loadRoutes()
  209 +
209 this.visible = true 210 this.visible = true
210 }, 211 },
211 212
src/components/inspection/pointRoute.vue
@@ -48,12 +48,14 @@ export default { @@ -48,12 +48,14 @@ export default {
48 methods: { 48 methods: {
49 open(params) { 49 open(params) {
50 this.pointRouteInfo.inspectionId = params.inspectionId 50 this.pointRouteInfo.inspectionId = params.inspectionId
  51 + this.pointRouteInfo.inspectionRouteId = params.inspectionRouteId
51 this._loadPointRouteData() 52 this._loadPointRouteData()
52 }, 53 },
53 loadData(point) { 54 loadData(point) {
54 if (!point) return 55 if (!point) return
55 56
56 this.pointRouteInfo.inspectionId = point.inspectionId 57 this.pointRouteInfo.inspectionId = point.inspectionId
  58 + this.pointRouteInfo.inspectionRouteId = point.inspectionRouteId
57 this._loadPointRouteData() 59 this._loadPointRouteData()
58 }, 60 },
59 async _loadPointRouteData() { 61 async _loadPointRouteData() {
@@ -61,6 +63,7 @@ export default { @@ -61,6 +63,7 @@ export default {
61 const params = { 63 const params = {
62 communityId: this.communityId, 64 communityId: this.communityId,
63 inspectionId: this.pointRouteInfo.inspectionId, 65 inspectionId: this.pointRouteInfo.inspectionId,
  66 + inspectionRouteId: this.pointRouteInfo.inspectionRouteId,
64 page: 1, 67 page: 1,
65 row: 100 68 row: 100
66 } 69 }