Commit d367e13021af5fa2bcbf93ea63ec368927fac111

Authored by wuxw
1 parent b5dad34f

巡检功能测试

src/components/inspection/ChooseInspectionRoutePoint.vue
1 <template> 1 <template>
2 - <el-dialog  
3 - :title="$t('inspectionRoute.choosePointTitle')"  
4 - :visible.sync="visible"  
5 - width="70%"  
6 - @close="handleClose"  
7 - > 2 + <el-dialog :title="$t('inspectionRoute.choosePointTitle')" :visible.sync="visible" width="70%" @close="handleClose">
8 <el-row :gutter="20"> 3 <el-row :gutter="20">
9 <el-col :span="24"> 4 <el-col :span="24">
10 - <el-card> 5 +
11 <el-row :gutter="20" class="margin-bottom"> 6 <el-row :gutter="20" class="margin-bottom">
12 <el-col :span="18"></el-col> 7 <el-col :span="18"></el-col>
13 <el-col :span="6"> 8 <el-col :span="6">
14 - <el-input  
15 - v-model="chooseInspectionRoutePointInfo.inspectionName"  
16 - :placeholder="$t('inspectionRoute.pointNamePlaceholder')"  
17 - clearable  
18 - class="search-input"  
19 - >  
20 - <el-button  
21 - slot="append"  
22 - type="primary"  
23 - @click="queryPoints"  
24 - > 9 + <el-input v-model="chooseInspectionRoutePointInfo.inspectionName"
  10 + :placeholder="$t('inspectionRoute.pointNamePlaceholder')" clearable class="search-input">
  11 + <el-button slot="append" type="primary" @click="queryPoints">
25 <i class="el-icon-search"></i> 12 <i class="el-icon-search"></i>
26 </el-button> 13 </el-button>
27 - <el-button  
28 - slot="append"  
29 - type="primary"  
30 - @click="resetPoints"  
31 - > 14 + <el-button slot="append" type="primary" @click="resetPoints">
32 <i class="el-icon-refresh"></i> 15 <i class="el-icon-refresh"></i>
33 </el-button> 16 </el-button>
34 </el-input> 17 </el-input>
35 </el-col> 18 </el-col>
36 </el-row> 19 </el-row>
37 20
38 - <el-table  
39 - :data="chooseInspectionRoutePointInfo.points"  
40 - border  
41 - style="width: 100%"  
42 - @selection-change="handleSelectionChange"  
43 - >  
44 - <el-table-column  
45 - type="selection"  
46 - width="55"  
47 - align="center"  
48 - />  
49 - <el-table-column  
50 - prop="inspectionId"  
51 - :label="$t('inspectionRoute.pointId')"  
52 - align="center"  
53 - />  
54 - <el-table-column  
55 - prop="inspectionName"  
56 - :label="$t('inspectionRoute.pointName')"  
57 - align="center"  
58 - /> 21 + <el-table :data="chooseInspectionRoutePointInfo.points" border style="width: 100%"
  22 + @selection-change="handleSelectionChange">
  23 + <el-table-column type="selection" width="55" align="center" />
  24 + <el-table-column prop="inspectionId" :label="$t('inspectionRoute.pointId')" align="center" />
  25 + <el-table-column prop="inspectionName" :label="$t('inspectionRoute.pointName')" align="center" />
59 </el-table> 26 </el-table>
60 27
61 - <el-pagination  
62 - :current-page.sync="page.current"  
63 - :page-size="page.size"  
64 - :total="page.total"  
65 - layout="total, prev, pager, next"  
66 - @current-change="handlePageChange"  
67 - /> 28 + <el-pagination :current-page.sync="page.current" :page-size="page.size" :total="page.total"
  29 + layout="total, prev, pager, next" @current-change="handlePageChange" />
68 30
69 <div class="text-right margin-top"> 31 <div class="text-right margin-top">
70 <el-button @click="handleClose"> 32 <el-button @click="handleClose">
71 {{ $t('common.cancel') }} 33 {{ $t('common.cancel') }}
72 </el-button> 34 </el-button>
73 - <el-button  
74 - type="primary"  
75 - @click="_chooseInspectionRoutePoint"  
76 - > 35 + <el-button type="primary" @click="_chooseInspectionRoutePoint">
77 {{ $t('common.confirm') }} 36 {{ $t('common.confirm') }}
78 </el-button> 37 </el-button>
79 </div> 38 </div>
80 - </el-card>  
81 </el-col> 39 </el-col>
82 </el-row> 40 </el-row>
83 </el-dialog> 41 </el-dialog>
@@ -126,8 +84,8 @@ export default { @@ -126,8 +84,8 @@ export default {
126 inspectionRouteId: this.chooseInspectionRoutePointInfo.inspectionRouteId, 84 inspectionRouteId: this.chooseInspectionRoutePointInfo.inspectionRouteId,
127 communityId: this.communityId 85 communityId: this.communityId
128 } 86 }
129 - const { data, total } = await listInspectionPoints(params)  
130 - this.chooseInspectionRoutePointInfo.points = data 87 + const { inspectionPoints, total } = await listInspectionPoints(params)
  88 + this.chooseInspectionRoutePointInfo.points = inspectionPoints
131 this.page.total = total 89 this.page.total = total
132 } catch (error) { 90 } catch (error) {
133 console.error('获取巡检点列表失败:', error) 91 console.error('获取巡检点列表失败:', error)
src/components/inspection/DeleteInspectionRoute.vue
1 <template> 1 <template>
2 - <el-dialog  
3 - :title="$t('common.confirmOperation')"  
4 - :visible.sync="visible"  
5 - width="30%"  
6 - @close="handleClose"  
7 - > 2 + <el-dialog :title="$t('common.confirmDelete')" :visible.sync="visible" width="30%" @close="handleClose">
8 <div class="text-center"> 3 <div class="text-center">
9 <p>{{ $t('inspectionRoute.confirmDeleteRoute') }}</p> 4 <p>{{ $t('inspectionRoute.confirmDeleteRoute') }}</p>
10 </div> 5 </div>
@@ -12,10 +7,7 @@ @@ -12,10 +7,7 @@
12 <el-button @click="handleClose"> 7 <el-button @click="handleClose">
13 {{ $t('common.cancel') }} 8 {{ $t('common.cancel') }}
14 </el-button> 9 </el-button>
15 - <el-button  
16 - type="primary"  
17 - @click="deleteInspectionRoute"  
18 - > 10 + <el-button type="primary" @click="deleteInspectionRoute">
19 {{ $t('common.confirm') }} 11 {{ $t('common.confirm') }}
20 </el-button> 12 </el-button>
21 </div> 13 </div>
src/components/inspection/EditInspectionRoute.vue
1 <template> 1 <template>
2 - <el-dialog  
3 - :title="$t('inspectionRoute.editRouteTitle')"  
4 - :visible.sync="visible"  
5 - width="50%"  
6 - @close="handleClose"  
7 - >  
8 - <el-form  
9 - ref="form"  
10 - :model="editInspectionRouteInfo"  
11 - :rules="rules"  
12 - label-width="120px"  
13 - >  
14 - <el-form-item  
15 - :label="$t('inspectionRoute.routeName')"  
16 - prop="routeName"  
17 - >  
18 - <el-input  
19 - v-model.trim="editInspectionRouteInfo.routeName"  
20 - :placeholder="$t('inspectionRoute.routeNamePlaceholder')"  
21 - clearable  
22 - /> 2 + <el-dialog :title="$t('inspectionRoute.editRouteTitle')" :visible.sync="visible" width="40%" @close="handleClose">
  3 + <el-form ref="form" :model="editInspectionRouteInfo" :rules="rules" label-width="120px">
  4 + <el-form-item :label="$t('inspectionRoute.routeName')" prop="routeName">
  5 + <el-input v-model.trim="editInspectionRouteInfo.routeName"
  6 + :placeholder="$t('inspectionRoute.routeNamePlaceholder')" clearable />
23 </el-form-item> 7 </el-form-item>
24 - <el-form-item  
25 - :label="$t('inspectionRoute.sequence')"  
26 - prop="seq"  
27 - >  
28 - <el-input  
29 - v-model.number="editInspectionRouteInfo.seq"  
30 - :placeholder="$t('inspectionRoute.sequencePlaceholder')"  
31 - clearable  
32 - /> 8 + <el-form-item :label="$t('inspectionRoute.sequence')" prop="seq">
  9 + <el-input v-model.number="editInspectionRouteInfo.seq" :placeholder="$t('inspectionRoute.sequencePlaceholder')"
  10 + clearable />
33 </el-form-item> 11 </el-form-item>
34 - <el-form-item  
35 - :label="$t('inspectionRoute.remark')"  
36 - prop="remark"  
37 - >  
38 - <el-input  
39 - v-model.trim="editInspectionRouteInfo.remark"  
40 - :placeholder="$t('inspectionRoute.remarkPlaceholder')"  
41 - type="textarea"  
42 - :rows="3"  
43 - clearable  
44 - /> 12 + <el-form-item :label="$t('inspectionRoute.remark')" prop="remark">
  13 + <el-input v-model.trim="editInspectionRouteInfo.remark" :placeholder="$t('inspectionRoute.remarkPlaceholder')"
  14 + type="textarea" :rows="3" clearable />
45 </el-form-item> 15 </el-form-item>
46 </el-form> 16 </el-form>
47 <div slot="footer" class="dialog-footer"> 17 <div slot="footer" class="dialog-footer">
48 <el-button @click="handleClose"> 18 <el-button @click="handleClose">
49 {{ $t('common.cancel') }} 19 {{ $t('common.cancel') }}
50 </el-button> 20 </el-button>
51 - <el-button  
52 - type="primary"  
53 - @click="editInspectionRoute"  
54 - > 21 + <el-button type="primary" @click="editInspectionRoute">
55 {{ $t('common.save') }} 22 {{ $t('common.save') }}
56 </el-button> 23 </el-button>
57 </div> 24 </div>
@@ -81,7 +48,6 @@ export default { @@ -81,7 +48,6 @@ export default {
81 ], 48 ],
82 seq: [ 49 seq: [
83 { required: true, message: this.$t('inspectionRoute.sequenceRequired'), trigger: 'blur' }, 50 { required: true, message: this.$t('inspectionRoute.sequenceRequired'), trigger: 'blur' },
84 - { type: 'number', message: this.$t('inspectionRoute.sequenceMustBeNumber'), trigger: 'blur' }  
85 ], 51 ],
86 remark: [ 52 remark: [
87 { max: 200, message: this.$t('inspectionRoute.remarkMaxLength'), trigger: 'blur' } 53 { max: 200, message: this.$t('inspectionRoute.remarkMaxLength'), trigger: 'blur' }
@@ -107,7 +73,7 @@ export default { @@ -107,7 +73,7 @@ export default {
107 async editInspectionRoute() { 73 async editInspectionRoute() {
108 try { 74 try {
109 await this.$refs.form.validate() 75 await this.$refs.form.validate()
110 - 76 +
111 await updateInspectionRoute(this.editInspectionRouteInfo) 77 await updateInspectionRoute(this.editInspectionRouteInfo)
112 this.$message.success(this.$t('inspectionRoute.editSuccess')) 78 this.$message.success(this.$t('inspectionRoute.editSuccess'))
113 this.$emit('success') 79 this.$emit('success')
src/components/inspection/inspectionRouteMap.vue
@@ -19,29 +19,15 @@ export default { @@ -19,29 +19,15 @@ export default {
19 }, 19 },
20 async mounted() { 20 async mounted() {
21 this.communityId = getCommunityId() 21 this.communityId = getCommunityId()
22 - await this.loadQQMapScript()  
23 // 延迟初始化地图,确保DOM已经渲染 22 // 延迟初始化地图,确保DOM已经渲染
24 - setTimeout(() => {  
25 - this.initMap()  
26 - }, 500)  
27 }, 23 },
28 methods: { 24 methods: {
29 loadData(route) { 25 loadData(route) {
  26 + this.initMap()
  27 +
30 this.loadRoute(route) 28 this.loadRoute(route)
31 }, 29 },
32 - loadQQMapScript() {  
33 - if (window.TMap) {  
34 - return Promise.resolve();  
35 - }  
36 30
37 - return new Promise((resolve, reject) => {  
38 - const script = document.createElement('script');  
39 - script.src = `https://map.qq.com/api/gljs?v=1.exp&key=您的腾讯地图KEY`;  
40 - script.onload = resolve;  
41 - script.onerror = reject;  
42 - document.head.appendChild(script);  
43 - });  
44 - },  
45 initMap() { 31 initMap() {
46 // 默认中心点(北京) 32 // 默认中心点(北京)
47 const center = new window.TMap.LatLng(39.916527, 116.397128) 33 const center = new window.TMap.LatLng(39.916527, 116.397128)
src/components/inspection/pointRoute.vue
@@ -78,7 +78,7 @@ export default { @@ -78,7 +78,7 @@ export default {
78 // 通知地图组件加载路线 78 // 通知地图组件加载路线
79 this.$nextTick(() => { 79 this.$nextTick(() => {
80 if (this.$refs.inspectionRouteMap) { 80 if (this.$refs.inspectionRouteMap) {
81 - this.$refs.inspectionRouteMap.loadRoute(route) 81 + this.$refs.inspectionRouteMap.loadData(route)
82 } 82 }
83 }) 83 })
84 } 84 }
src/views/inspection/addInspectionPlanList.vue
1 <template> 1 <template>
2 <div class="add-inspection-plan-container"> 2 <div class="add-inspection-plan-container">
3 <el-card class="box-card"> 3 <el-card class="box-card">
4 - <div slot="header">  
5 - <h5>{{ $t('addInspectionPlan.title') }}</h5> 4 + <div slot="header" class="text-left">
  5 + <span>{{ $t('addInspectionPlan.title') }}</span>
6 </div> 6 </div>
7 7
8 <el-form ref="form" :model="form" label-width="150px" label-position="right"> 8 <el-form ref="form" :model="form" label-width="150px" label-position="right">
src/views/inspection/inspectionPlanList.vue
@@ -7,38 +7,21 @@ @@ -7,38 +7,21 @@
7 <div class="card-content"> 7 <div class="card-content">
8 <el-row :gutter="20"> 8 <el-row :gutter="20">
9 <el-col :span="5"> 9 <el-col :span="5">
10 - <el-input  
11 - :placeholder="$t('inspectionPlan.inspectionPlanIdPlaceholder')"  
12 - v-model="searchConditions.inspectionPlanId"  
13 - clearable  
14 - /> 10 + <el-input :placeholder="$t('inspectionPlan.inspectionPlanIdPlaceholder')"
  11 + v-model="searchConditions.inspectionPlanId" clearable />
15 </el-col> 12 </el-col>
16 <el-col :span="5"> 13 <el-col :span="5">
17 - <el-input  
18 - :placeholder="$t('inspectionPlan.inspectionPlanNamePlaceholder')"  
19 - v-model="searchConditions.inspectionPlanName"  
20 - clearable  
21 - /> 14 + <el-input :placeholder="$t('inspectionPlan.inspectionPlanNamePlaceholder')"
  15 + v-model="searchConditions.inspectionPlanName" clearable />
22 </el-col> 16 </el-col>
23 <el-col :span="5"> 17 <el-col :span="5">
24 - <el-input  
25 - :placeholder="$t('inspectionPlan.staffNamePlaceholder')"  
26 - v-model="searchConditions.staffNameLike"  
27 - clearable  
28 - /> 18 + <el-input :placeholder="$t('inspectionPlan.staffNamePlaceholder')" v-model="searchConditions.staffNameLike"
  19 + clearable />
29 </el-col> 20 </el-col>
30 <el-col :span="5"> 21 <el-col :span="5">
31 - <el-select  
32 - v-model="searchConditions.state"  
33 - :placeholder="$t('inspectionPlan.statePlaceholder')"  
34 - style="width:100%"  
35 - >  
36 - <el-option  
37 - v-for="(item, index) in stateOptions"  
38 - :key="index"  
39 - :label="item.name"  
40 - :value="item.statusCd"  
41 - /> 22 + <el-select v-model="searchConditions.state" :placeholder="$t('inspectionPlan.statePlaceholder')"
  23 + style="width:100%">
  24 + <el-option v-for="(item, index) in stateOptions" :key="index" :label="item.name" :value="item.statusCd" />
42 </el-select> 25 </el-select>
43 </el-col> 26 </el-col>
44 <el-col :span="4"> 27 <el-col :span="4">
@@ -97,18 +80,11 @@ @@ -97,18 +80,11 @@
97 <el-button size="mini" @click="openDeleteModal(scope.row)"> 80 <el-button size="mini" @click="openDeleteModal(scope.row)">
98 {{ $t('inspectionPlan.delete') }} 81 {{ $t('inspectionPlan.delete') }}
99 </el-button> 82 </el-button>
100 - <el-button  
101 - v-if="scope.row.state === '2020025'"  
102 - size="mini"  
103 - @click="openStateModal(scope.row, '2020026', $t('inspectionPlan.disable'))"  
104 - > 83 + <el-button v-if="scope.row.state === '2020025'" size="mini"
  84 + @click="openStateModal(scope.row, '2020026', $t('inspectionPlan.disable'))">
105 {{ $t('inspectionPlan.disable') }} 85 {{ $t('inspectionPlan.disable') }}
106 </el-button> 86 </el-button>
107 - <el-button  
108 - v-else  
109 - size="mini"  
110 - @click="openStateModal(scope.row, '2020025', $t('inspectionPlan.enable'))"  
111 - > 87 + <el-button v-else size="mini" @click="openStateModal(scope.row, '2020025', $t('inspectionPlan.enable'))">
112 {{ $t('inspectionPlan.enable') }} 88 {{ $t('inspectionPlan.enable') }}
113 </el-button> 89 </el-button>
114 <el-button size="mini" @click="viewDetail(scope.row)"> 90 <el-button size="mini" @click="viewDetail(scope.row)">
@@ -118,21 +94,15 @@ @@ -118,21 +94,15 @@
118 </template> 94 </template>
119 </el-table-column> 95 </el-table-column>
120 </el-table> 96 </el-table>
121 - 97 +
122 <el-row class="margin-top"> 98 <el-row class="margin-top">
123 - <el-col :span="18"> 99 + <el-col :span="18" class="text-left table-desc">
124 <div>{{ $t('inspectionPlan.note') }}</div> 100 <div>{{ $t('inspectionPlan.note') }}</div>
125 </el-col> 101 </el-col>
126 <el-col :span="6"> 102 <el-col :span="6">
127 - <el-pagination  
128 - :current-page.sync="pagination.current"  
129 - :page-sizes="[10, 20, 30, 50]"  
130 - :page-size="pagination.size"  
131 - layout="total, sizes, prev, pager, next"  
132 - :total="pagination.total"  
133 - @size-change="handleSizeChange"  
134 - @current-change="handlePageChange"  
135 - /> 103 + <el-pagination :current-page.sync="pagination.current" :page-sizes="[10, 20, 30, 50]"
  104 + :page-size="pagination.size" layout="total, sizes, prev, pager, next" :total="pagination.total"
  105 + @size-change="handleSizeChange" @current-change="handlePageChange" />
136 </el-col> 106 </el-col>
137 </el-row> 107 </el-row>
138 </el-card> 108 </el-card>
@@ -148,7 +118,7 @@ import { listInspectionPlans } from &#39;@/api/inspection/inspectionPlanApi&#39; @@ -148,7 +118,7 @@ import { listInspectionPlans } from &#39;@/api/inspection/inspectionPlanApi&#39;
148 import EditInspectionPlan from '@/components/inspection/editInspectionPlan' 118 import EditInspectionPlan from '@/components/inspection/editInspectionPlan'
149 import DeleteInspectionPlan from '@/components/inspection/deleteInspectionPlan' 119 import DeleteInspectionPlan from '@/components/inspection/deleteInspectionPlan'
150 import InspectionPlanState from '@/components/inspection/inspectionPlanState' 120 import InspectionPlanState from '@/components/inspection/inspectionPlanState'
151 -import {getDict} from '@/api/community/communityApi' 121 +import { getDict } from '@/api/community/communityApi'
152 export default { 122 export default {
153 name: 'InspectionPlanList', 123 name: 'InspectionPlanList',
154 components: { 124 components: {
@@ -185,7 +155,7 @@ export default { @@ -185,7 +155,7 @@ export default {
185 console.error('Failed to load dictionary data:', error) 155 console.error('Failed to load dictionary data:', error)
186 } 156 }
187 }, 157 },
188 - 158 +
189 async fetchInspectionPlans() { 159 async fetchInspectionPlans() {
190 try { 160 try {
191 const params = { 161 const params = {
@@ -193,7 +163,7 @@ export default { @@ -193,7 +163,7 @@ export default {
193 page: this.pagination.current, 163 page: this.pagination.current,
194 row: this.pagination.size 164 row: this.pagination.size
195 } 165 }
196 - 166 +
197 const { data, total } = await listInspectionPlans(params) 167 const { data, total } = await listInspectionPlans(params)
198 this.planList = data 168 this.planList = data
199 this.pagination.total = total 169 this.pagination.total = total
@@ -201,7 +171,7 @@ export default { @@ -201,7 +171,7 @@ export default {
201 this.$message.error(this.$t('inspectionPlan.fetchError')) 171 this.$message.error(this.$t('inspectionPlan.fetchError'))
202 } 172 }
203 }, 173 },
204 - 174 +
205 resetSearch() { 175 resetSearch() {
206 this.searchConditions = { 176 this.searchConditions = {
207 inspectionPlanId: '', 177 inspectionPlanId: '',
@@ -212,29 +182,29 @@ export default { @@ -212,29 +182,29 @@ export default {
212 this.pagination.current = 1 182 this.pagination.current = 1
213 this.fetchInspectionPlans() 183 this.fetchInspectionPlans()
214 }, 184 },
215 - 185 +
216 handleSizeChange(size) { 186 handleSizeChange(size) {
217 this.pagination.size = size 187 this.pagination.size = size
218 this.fetchInspectionPlans() 188 this.fetchInspectionPlans()
219 }, 189 },
220 - 190 +
221 handlePageChange(page) { 191 handlePageChange(page) {
222 this.pagination.current = page 192 this.pagination.current = page
223 this.fetchInspectionPlans() 193 this.fetchInspectionPlans()
224 }, 194 },
225 - 195 +
226 openAddModal() { 196 openAddModal() {
227 this.$router.push({ path: '/views/inspection/addInspectionPlan' }) 197 this.$router.push({ path: '/views/inspection/addInspectionPlan' })
228 }, 198 },
229 - 199 +
230 openEditModal(plan) { 200 openEditModal(plan) {
231 this.$refs.editModal.open(plan) 201 this.$refs.editModal.open(plan)
232 }, 202 },
233 - 203 +
234 openDeleteModal(plan) { 204 openDeleteModal(plan) {
235 this.$refs.deleteModal.open(plan) 205 this.$refs.deleteModal.open(plan)
236 }, 206 },
237 - 207 +
238 openStateModal(plan, state, stateName) { 208 openStateModal(plan, state, stateName) {
239 this.$refs.stateModal.open({ 209 this.$refs.stateModal.open({
240 inspectionPlanId: plan.inspectionPlanId, 210 inspectionPlanId: plan.inspectionPlanId,
@@ -242,11 +212,11 @@ export default { @@ -242,11 +212,11 @@ export default {
242 stateName 212 stateName
243 }) 213 })
244 }, 214 },
245 - 215 +
246 viewDetail(plan) { 216 viewDetail(plan) {
247 window.open(`/#/pages/inspection/inspectionPlanDetail?inspectionPlanId=${plan.inspectionPlanId}`) 217 window.open(`/#/pages/inspection/inspectionPlanDetail?inspectionPlanId=${plan.inspectionPlanId}`)
248 }, 218 },
249 - 219 +
250 handleSuccess() { 220 handleSuccess() {
251 this.fetchInspectionPlans() 221 this.fetchInspectionPlans()
252 } 222 }
@@ -258,6 +228,7 @@ export default { @@ -258,6 +228,7 @@ export default {
258 .margin-top { 228 .margin-top {
259 margin-top: 20px; 229 margin-top: 20px;
260 } 230 }
  231 +
261 .card-content { 232 .card-content {
262 padding: 20px; 233 padding: 20px;
263 } 234 }
src/views/inspection/inspectionPointList.vue
@@ -18,7 +18,8 @@ @@ -18,7 +18,8 @@
18 18
19 <div class="vc-org margin-top"> 19 <div class="vc-org margin-top">
20 <ul class="point-list"> 20 <ul class="point-list">
21 - <li v-for="(point, index) in inspectionPointInfo.points" :key="index" @click="_switchInspectionPoint(point)" 21 + <li v-for="(point, index) in inspectionPointInfo.points" :key="index"
  22 + @click="_switchInspectionPoint(point)"
22 :class="{ 'active': point.inspectionId == inspectionPointInfo.point.inspectionId }"> 23 :class="{ 'active': point.inspectionId == inspectionPointInfo.point.inspectionId }">
23 {{ point.inspectionName }} 24 {{ point.inspectionName }}
24 </li> 25 </li>
@@ -98,9 +99,11 @@ @@ -98,9 +99,11 @@
98 <el-row v-if="inspectionPointInfo.point.inspectionId" class="margin-top"> 99 <el-row v-if="inspectionPointInfo.point.inspectionId" class="margin-top">
99 <el-col :span="24"> 100 <el-col :span="24">
100 <el-card> 101 <el-card>
101 - <el-tabs v-model="inspectionPointInfo._currentTab" @tab-click="changeTab(inspectionPointInfo._currentTab)"> 102 + <el-tabs v-model="inspectionPointInfo._currentTab"
  103 + @tab-click="changeTab(inspectionPointInfo._currentTab)">
102 <el-tab-pane name="pointTaskDetail" :label="$t('inspectionPoint.tabs.pointTaskDetail')"> 104 <el-tab-pane name="pointTaskDetail" :label="$t('inspectionPoint.tabs.pointTaskDetail')">
103 - <point-task-detail v-if="inspectionPointInfo._currentTab === 'pointTaskDetail'" ref="pointTaskDetail" /> 105 + <point-task-detail v-if="inspectionPointInfo._currentTab === 'pointTaskDetail'"
  106 + ref="pointTaskDetail" />
104 </el-tab-pane> 107 </el-tab-pane>
105 <el-tab-pane name="pointRoute" :label="$t('inspectionPoint.tabs.pointRoute')"> 108 <el-tab-pane name="pointRoute" :label="$t('inspectionPoint.tabs.pointRoute')">
106 <point-route v-if="inspectionPointInfo._currentTab === 'pointRoute'" ref="pointRoute" /> 109 <point-route v-if="inspectionPointInfo._currentTab === 'pointRoute'" ref="pointRoute" />
@@ -118,10 +121,10 @@ @@ -118,10 +121,10 @@
118 </el-col> 121 </el-col>
119 </el-row> 122 </el-row>
120 <!-- 模态框组件 --> 123 <!-- 模态框组件 -->
121 - <add-inspection-point ref="addInspectionPoint" @success="_listInspectionPoints"/>  
122 - <edit-inspection-point ref="editInspectionPoint" @success="_listInspectionPoints"/>  
123 - <delete-inspection-point ref="deleteInspectionPoint" @success="_listInspectionPoints"/>  
124 - <inspection-point-qr-code ref="inspectionPointQrCode" @success="_listInspectionPoints"/> 124 + <add-inspection-point ref="addInspectionPoint" @success="_listInspectionPoints" />
  125 + <edit-inspection-point ref="editInspectionPoint" @success="_listInspectionPoints" />
  126 + <delete-inspection-point ref="deleteInspectionPoint" @success="_listInspectionPoints" />
  127 + <inspection-point-qr-code ref="inspectionPointQrCode" @success="_listInspectionPoints" />
125 </div> 128 </div>
126 </template> 129 </template>
127 130
@@ -220,8 +223,8 @@ export default { @@ -220,8 +223,8 @@ export default {
220 if (this.$refs[tab]) { 223 if (this.$refs[tab]) {
221 this.$refs[tab].loadData(this.inspectionPointInfo.point) 224 this.$refs[tab].loadData(this.inspectionPointInfo.point)
222 } 225 }
223 - },500)  
224 - 226 + }, 500)
  227 +
225 }, 228 },
226 _openAddInspectionPointModal() { 229 _openAddInspectionPointModal() {
227 this.$refs.addInspectionPoint.open() 230 this.$refs.addInspectionPoint.open()
src/views/inspection/inspectionRouteList.vue
@@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
6 <div class="flex justify-start"> 6 <div class="flex justify-start">
7 <el-input v-model="inspectionRouteInfo.conditions.routeName" 7 <el-input v-model="inspectionRouteInfo.conditions.routeName"
8 :placeholder="$t('inspectionRoute.routeNamePlaceholder')" class="search-input" clearable /> 8 :placeholder="$t('inspectionRoute.routeNamePlaceholder')" class="search-input" clearable />
9 - <el-button type="primary" class="margin-left-xs" size="small" @click="_queryInspectionRouteMethod"> 9 + <el-button type="text" class="margin-left-xs" size="small" @click="_queryInspectionRouteMethod">
10 {{ $t('common.search') }} 10 {{ $t('common.search') }}
11 </el-button> 11 </el-button>
12 - <el-button type="primary" class="margin-left-xs" size="small" @click="_openAddInspectionRouteModal"> 12 + <el-button type="text" class="margin-left-xs" size="small" @click="_openAddInspectionRouteModal">
13 {{ $t('common.add') }} 13 {{ $t('common.add') }}
14 </el-button> 14 </el-button>
15 </div> 15 </div>
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 </div> 42 </div>
43 </div> 43 </div>
44 44
45 - <el-row> 45 + <el-row class="text-left">
46 <el-col :span="6"> 46 <el-col :span="6">
47 <div class="form-group"> 47 <div class="form-group">
48 <label class="col-form-label"> 48 <label class="col-form-label">
@@ -81,16 +81,16 @@ @@ -81,16 +81,16 @@
81 <el-card class="tab-card margin-top"> 81 <el-card class="tab-card margin-top">
82 <el-tabs v-model="inspectionRouteInfo._currentTab" @tab-click="changeTab(inspectionRouteInfo._currentTab)"> 82 <el-tabs v-model="inspectionRouteInfo._currentTab" @tab-click="changeTab(inspectionRouteInfo._currentTab)">
83 <el-tab-pane label="巡检点" name="inspectionRoutePoint"> 83 <el-tab-pane label="巡检点" name="inspectionRoutePoint">
84 - <inspection-route-point ref="inspectionRoutePoint"/> 84 + <inspection-route-point ref="inspectionRoutePoint" />
85 </el-tab-pane> 85 </el-tab-pane>
86 <el-tab-pane label="巡检地图" name="inspectionRouteMap"> 86 <el-tab-pane label="巡检地图" name="inspectionRouteMap">
87 - <inspection-route-map ref="inspectionRouteMap"/> 87 + <inspection-route-map ref="inspectionRouteMap" />
88 </el-tab-pane> 88 </el-tab-pane>
89 <el-tab-pane label="巡检计划" name="routePlan"> 89 <el-tab-pane label="巡检计划" name="routePlan">
90 - <route-plan ref="routePlan"/> 90 + <route-plan ref="routePlan" />
91 </el-tab-pane> 91 </el-tab-pane>
92 <el-tab-pane label="巡检任务" name="routeTask"> 92 <el-tab-pane label="巡检任务" name="routeTask">
93 - <route-task ref="routeTask"/> 93 + <route-task ref="routeTask" />
94 </el-tab-pane> 94 </el-tab-pane>
95 </el-tabs> 95 </el-tabs>
96 </el-card> 96 </el-card>
@@ -187,7 +187,7 @@ export default { @@ -187,7 +187,7 @@ export default {
187 if (this.$refs[tab]) { 187 if (this.$refs[tab]) {
188 this.$refs[tab].loadData(this.inspectionRouteInfo.route) 188 this.$refs[tab].loadData(this.inspectionRouteInfo.route)
189 } 189 }
190 - },500) 190 + }, 500)
191 }, 191 },
192 handleSuccess() { 192 handleSuccess() {
193 this._listInspectionRoutes(1, 10) 193 this._listInspectionRoutes(1, 10)