index.vue
12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<template>
<div class="main">
<div class="button">
<el-button type="primary" @click="oneExit">编辑</el-button>
<el-button type="primary" @click="save">保存</el-button>
<el-button type="primary" @click="batchExit">批量修改</el-button>
</div>
<div class="table">
<table border="1">
<tr>
<td><input type="checkbox" @click="allcheck" v-model="isCheckAll"/></td>
<td>起始点</td>
<td>终止点</td>
<td>界址点距(m)</td>
<td>界址线类型</td>
<td>界址线位置</td>
<td>界限性质</td>
<td>说明</td>
</tr>
<tr v-for="(item,index) in jzxlist" :key="index">
<td><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td>
<td><input type="text" class="formInput" v-model="item.qsd" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.zzd" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.jzdj" :readonly="item.jjisdisabled"/></td>
<td>
<el-select v-model="item.jzxlx" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jzxlx"
:key="i.key"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</td>
<td>
<el-select v-model="item.jzxwz" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jzxwz"
:key="i.key"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</td>
<td>
<el-select v-model="item.jxxz" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jxxz"
:key="i.key"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</td>
<td>
<input type="text" class="formInput" v-model="item.sm"/>
</td>
</tr>
</table>
</div>
<div>
<el-dialog
title="批量修改"
:visible.sync="centerDialogVisible"
width="30%"
center>
<div class="plxg">
<div>
<span class=""> 界址线类型:</span>
<el-select>
<el-option
v-for="i in jzxlx"
:key="i.key"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</div>
<div>
<span>界址线位置:</span>
<el-select>
<el-option
v-for="i in jzxwz"
:key="i.key"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</div>
<div>
<span>界线性质:</span>
<el-select>
<el-option
v-for="i in jxxz"
:key="i.key"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import {queryjzd} from '../../../api/zd'
export default {
name: "",
components: {},
props: {},
data() {
return {
isCheckAll: false,
centerDialogVisible: false,
jzxwz: [
{
key: '1',
label: '内',
value: '1'
}, {
key: '2',
label: '中',
value: '2'
}, {
key: '3',
label: '外',
value: '3'
},
],
jxxz: [
{
key: '600001',
label: '已定界',
value: '600001'
}, {
key: '600002',
label: '未定界',
value: '600002'
}, {
key: '600003',
label: '争议界',
value: '600003'
}, {
key: '600004',
label: '工作界',
value: '600004'
}, {
key: '600009',
label: '其他',
value: '600009'
},
],
jzxlx: [
{
key: '250200',
label: '海岸线',
value: '250200'
}, {
key: '250201',
label: '大潮平均高潮线',
value: '250201'
}, {
key: '250202',
label: '零米等深线',
value: '250202'
}, {
key: '250203',
label: '江河入海口陆海分界线',
value: '250203'
}, {
key: '620200',
label: '国界',
value: '620200'
}, {
key: '630200',
label: '省、自治区、直辖市界',
value: '630200'
}, {
key: '640200',
label: '地区、自治州、地级市界',
value: '640200'
}, {
key: '650200',
label: '县、区、旗、县级市界',
value: '650200'
}, {
key: '660200',
label: '街道、乡、(镇)界',
value: '660200'
}, {
key: '670402',
label: '开发区、保税区界',
value: '670402'
}, {
key: '670500',
label: '街坊、村界',
value: '670500'
}, {
key: '670600',
label: '省、自治区、直辖市间海域行政界线',
value: '670600'
}, {
key: '670700',
label: '县际间海域行政界线',
value: '670700'
},
],
jzxlist: [
{
isCheck: false,
qsd: '11',
zzd: '1',
jzdj: '10.0',
jzxlx: '670600',
jzxwz: '1',
jxxz: '600002',
sm: '32131',
iszb: 'readonly',
jjisdisabled: true,
jzxisdisabled: true
}, {
isCheck: false,
qsd: '12',
zzd: '1',
jzdj: '10.0',
jzxlx: '670500',
jzxwz: '1',
jxxz: '600002',
sm: '3123',
iszb: 'readonly',
jjisdisabled: true,
jzxisdisabled: true
}, {
isCheck: false,
qsd: '14',
zzd: '1',
jzdj: '10.0',
jzxlx: '670700',
jzxwz: '1',
jxxz: '600004',
sm: '212',
iszb: 'readonly',
jjisdisabled: true,
jzxisdisabled: true
},
]
}
},
created() {
},
mounted() {
// 该标识码继承过来
let bsm = '401044005bad0557d5e3787239d8e18e';
/* queryjzd(bsm).then(res => {
for (let i = 0; i < res.result.length; i++) {
res.result[i]['isCheck'] = false;
res.result[i]['iszb'] = 'readonly';
res.result[i]['jbisdisabled'] = true;
res.result[i]['jzdisdisabled'] = true;
}
this.jzdlist = res.result;
})*/
},
methods: {
save() {
console.log("保存....");
for (let item of this.jzxlist) {
if (item.isCheck) {
item.jjisdisabled = 'readonly';
item.jzxisdisabled = true;
}
}
},
oninput(e) {
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null
},
changeAll(e) {
if (!e.target.checked) {
console.log("11111")
this.isCheckAll = false;
return
}
for (let item of this.jzxlist) {
if (!item.isCheck) {
this.isCheckAll = false;
return
}
}
this.isCheckAll = true;
},
allcheck(value) {
for (let item of this.jzxlist) {
item.isCheck = value.target.checked;
}
},
oneExit() {
for (let item of this.jzxlist) {
if (item.isCheck) {
item.jjisdisabled = false;
item.jzxisdisabled = false;
}
}
},
batchExit() {
console.log("批量修改")
this.centerDialogVisible = true;
}
},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
.main {
box-sizing: border-box;
padding: 18px;
height: auto;
width: 80%;
}
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
}
td {
text-align: center;
height: 36px;
}
table .formInput {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
cursor: text;
}
select[disabled='false']::-ms-value {
color: #000;
}
</style>