Commit 77f5558eaddc89ae9a52107ef301f2ac2ff80395

Authored by wuxw
1 parent 71aaf711

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

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