Merge branch 'master' of http://yun.pashanhoo.com:9090/renchao/CadastralSystem
Showing
1 changed file
with
35 additions
and
9 deletions
... | @@ -2,13 +2,13 @@ | ... | @@ -2,13 +2,13 @@ |
2 | <div class="main"> | 2 | <div class="main"> |
3 | <div class="button"> | 3 | <div class="button"> |
4 | <el-button type="primary" @click="oneExit">编辑</el-button> | 4 | <el-button type="primary" @click="oneExit">编辑</el-button> |
5 | <el-button type="primary">保存</el-button> | 5 | <el-button type="primary" @click="save">保存</el-button> |
6 | <el-button type="primary" @click="batchExit">批量修改</el-button> | 6 | <el-button type="primary" @click="batchExit">批量修改</el-button> |
7 | </div> | 7 | </div> |
8 | <div class="table"> | 8 | <div class="table"> |
9 | <table border="1"> | 9 | <table border="1"> |
10 | <tr> | 10 | <tr> |
11 | <td><input type="checkbox" @click="allcheck"/></td> | 11 | <td><input type="checkbox" @click="allcheck" v-model="isCheckAll"/></td> |
12 | <td>界址点号</td> | 12 | <td>界址点号</td> |
13 | <td>顺序号</td> | 13 | <td>顺序号</td> |
14 | <td>X坐标值</td> | 14 | <td>X坐标值</td> |
... | @@ -17,11 +17,13 @@ | ... | @@ -17,11 +17,13 @@ |
17 | <td>界址点类型</td> | 17 | <td>界址点类型</td> |
18 | </tr> | 18 | </tr> |
19 | <tr v-for="(item,index) in jzdlist" :key="index"> | 19 | <tr v-for="(item,index) in jzdlist" :key="index"> |
20 | <td><input type="checkbox" v-model="item.isCheck"/></td> | 20 | <td><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td> |
21 | <td><input type="text" class="formInput" v-model="item.jzdh" readonly="readonly"/></td> | 21 | <td><input type="text" class="formInput" v-model="item.jzdh" readonly="readonly"/></td> |
22 | <td><input type="text" class="formInput" v-model="item.sxh" readonly="readonly"/></td> | 22 | <td><input type="text" class="formInput" v-model="item.sxh" readonly="readonly"/></td> |
23 | <td><input type="text" class="formInput" v-model="item.xzbz" :readonly="item.iszb"/></td> | 23 | <td><input type="text" class="formInput" v-model="item.xzbz" :readonly="item.iszb" |
24 | <td><input tepe="text" class="formInput" v-model="item.yzbz" :readonly="item.iszb"/></td> | 24 | @keydown="oninput"/></td> |
25 | <td><input tepe="text" class="formInput" v-model="item.yzbz" :readonly="item.iszb" | ||
26 | @keydown="oninput"/></td> | ||
25 | <td> | 27 | <td> |
26 | <el-select v-model="item.jblx" :disabled="item.jbisdisabled"> | 28 | <el-select v-model="item.jblx" :disabled="item.jbisdisabled"> |
27 | <el-option | 29 | <el-option |
... | @@ -94,6 +96,7 @@ | ... | @@ -94,6 +96,7 @@ |
94 | props: {}, | 96 | props: {}, |
95 | data() { | 97 | data() { |
96 | return { | 98 | return { |
99 | isCheckAll: false, | ||
97 | centerDialogVisible: false, | 100 | centerDialogVisible: false, |
98 | jblx: [ | 101 | jblx: [ |
99 | { | 102 | { |
... | @@ -191,7 +194,6 @@ | ... | @@ -191,7 +194,6 @@ |
191 | // 该标识码继承过来 | 194 | // 该标识码继承过来 |
192 | let bsm = '401044005bad0557d5e3787239d8e18e'; | 195 | let bsm = '401044005bad0557d5e3787239d8e18e'; |
193 | queryjzd(bsm).then(res => { | 196 | queryjzd(bsm).then(res => { |
194 | debugger | ||
195 | for (let i = 0; i < res.result.length; i++) { | 197 | for (let i = 0; i < res.result.length; i++) { |
196 | res.result[i]['isCheck'] = false; | 198 | res.result[i]['isCheck'] = false; |
197 | res.result[i]['iszb'] = 'readonly'; | 199 | res.result[i]['iszb'] = 'readonly'; |
... | @@ -202,16 +204,40 @@ | ... | @@ -202,16 +204,40 @@ |
202 | }) | 204 | }) |
203 | }, | 205 | }, |
204 | methods: { | 206 | methods: { |
207 | save() { | ||
208 | console.log("保存...."); | ||
209 | for (let item of this.jzdlist) { | ||
210 | if (item.isCheck) { | ||
211 | item.iszb = 'readonly'; | ||
212 | item.jbisdisabled = true; | ||
213 | item.jzdisdisabled = true; | ||
214 | } | ||
215 | } | ||
216 | }, | ||
217 | oninput(e) { | ||
218 | e.target.value = (e.target.value.match(/^\d*(\.?\d{0,0})/g)[0]) || null | ||
219 | }, | ||
220 | changeAll(e) { | ||
221 | if (!e.target.checked) { | ||
222 | console.log("11111") | ||
223 | this.isCheckAll = false; | ||
224 | return | ||
225 | } | ||
226 | for (let item of this.jzdlist) { | ||
227 | if (!item.isCheck) { | ||
228 | this.isCheckAll = false; | ||
229 | return | ||
230 | } | ||
231 | } | ||
232 | this.isCheckAll = true; | ||
233 | }, | ||
205 | allcheck(value) { | 234 | allcheck(value) { |
206 | for (let item of this.jzdlist) { | 235 | for (let item of this.jzdlist) { |
207 | item.isCheck = value.target.checked; | 236 | item.isCheck = value.target.checked; |
208 | } | 237 | } |
209 | }, | 238 | }, |
210 | oneExit() { | 239 | oneExit() { |
211 | console.log("oneExit......") | ||
212 | console.log(this.jzdlist) | ||
213 | for (let item of this.jzdlist) { | 240 | for (let item of this.jzdlist) { |
214 | console.log(item) | ||
215 | if (item.isCheck) { | 241 | if (item.isCheck) { |
216 | item.iszb = false; | 242 | item.iszb = false; |
217 | item.jbisdisabled = false; | 243 | item.jbisdisabled = false; | ... | ... |
-
Please register or sign in to post a comment