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