c2f1a553 by weimo934

feat(jzx):界址线

1 parent d4a61983
...@@ -12,6 +12,7 @@ export function savemjft(data) { ...@@ -12,6 +12,7 @@ export function savemjft(data) {
12 data: data, 12 data: data,
13 }); 13 });
14 } 14 }
15
15 /** 16 /**
16 * 新增宗地基本信息 17 * 新增宗地基本信息
17 */ 18 */
...@@ -26,16 +27,17 @@ export function insertQjZdjbxx(data) { ...@@ -26,16 +27,17 @@ export function insertQjZdjbxx(data) {
26 /** 27 /**
27 * 新增宗地基本信息 28 * 新增宗地基本信息
28 */ 29 */
29 export function getBdcdyh (dpdm,dptype) { 30 export function getBdcdyh(dpdm, dptype) {
30 return request({ 31 return request({
31 url: '/system/generator/getBdcdyh', 32 url: '/system/generator/getBdcdyh',
32 method: 'get', 33 method: 'get',
33 params:{ 34 params: {
34 dpdm:dpdm, 35 dpdm: dpdm,
35 dptype:dptype 36 dptype: dptype
36 } 37 }
37 }) 38 })
38 } 39 }
40
39 /** 41 /**
40 * 查询界址点 42 * 查询界址点
41 */ 43 */
...@@ -48,6 +50,7 @@ export function queryjzd(glBsm) { ...@@ -48,6 +50,7 @@ export function queryjzd(glBsm) {
48 }, 50 },
49 }); 51 });
50 } 52 }
53
51 /** 54 /**
52 * 查询界址线 55 * 查询界址线
53 */ 56 */
...@@ -61,3 +64,47 @@ export function queryjzx(glBsm) { ...@@ -61,3 +64,47 @@ export function queryjzx(glBsm) {
61 }) 64 })
62 } 65 }
63 66
67 /**
68 * 界址点单一修改
69 */
70 export function jzdsingleModify(data) {
71 return request({
72 url: '/zd/qjJzd/singleModify',
73 method: 'put',
74 data: data
75 })
76 }
77 /**
78 * 界址点批量修改
79 */
80 export function jzdbatchModify(data) {
81 return request({
82 url: '/zd/qjJzd/batchModify',
83 method: 'put',
84 data: data
85 })
86 }
87
88 /**
89 * 界址线单一修改
90 */
91 export function jzxsingleModify(data) {
92 return request({
93 url: '/zd/qjJzx/singleModify',
94 method: 'put',
95 data: data
96 })
97 }
98
99 /**
100 * 界址线批量修改
101 */
102 export function jzxsbatchModify(data) {
103 return request({
104 url: '/zd/qjJzx/batchModify',
105 method: 'put',
106 data: data
107 })
108 }
109
110
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
56 <div class="plxg"> 56 <div class="plxg">
57 <div> 57 <div>
58 <span class=""> 界标类型:</span> 58 <span class=""> 界标类型:</span>
59 <el-select> 59 <el-select v-model="batchJzd.jblx">
60 <el-option 60 <el-option
61 v-for="i in jblx" 61 v-for="i in jblx"
62 :key="i.key" 62 :key="i.key"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 </div> 67 </div>
68 <div> 68 <div>
69 <span>界址点类型:</span> 69 <span>界址点类型:</span>
70 <el-select> 70 <el-select v-model="batchJzd.jzdlx">
71 <el-option 71 <el-option
72 v-for="i in jzdlx" 72 v-for="i in jzdlx"
73 :key="i.key" 73 :key="i.key"
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
80 </div> 80 </div>
81 <span slot="footer" class="dialog-footer"> 81 <span slot="footer" class="dialog-footer">
82 <el-button @click="centerDialogVisible = false">取 消</el-button> 82 <el-button @click="centerDialogVisible = false">取 消</el-button>
83 <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button> 83 <el-button type="primary" @click="jzdbatchsave">确 定</el-button>
84 </span> 84 </span>
85 </el-dialog> 85 </el-dialog>
86 </div> 86 </div>
...@@ -88,7 +88,8 @@ ...@@ -88,7 +88,8 @@
88 </template> 88 </template>
89 89
90 <script> 90 <script>
91 import {queryjzx} from '../../../api/zd' 91 import {queryjzd, jzdsingleModify, jzdbatchModify} from '../../../api/zd'
92 import {Message} from 'element-ui'
92 93
93 export default { 94 export default {
94 name: "界址点", 95 name: "界址点",
...@@ -148,21 +149,12 @@ ...@@ -148,21 +149,12 @@
148 value: '4' 149 value: '4'
149 } 150 }
150 ], 151 ],
151 jzdlist: [ 152 jzdlist: [],
152 /* { 153 batchJzd: {
153 isCheck: false, 154 bsms: [],
154 jzdh: 'JZDH001',
155 sxh: '1',
156 xzbz: '10.0',
157 yzbz: '11.0',
158 jblx: '1', 155 jblx: '1',
159 jzdlx: '1', 156 jzdlx: '1'
160 iszb: 'readonly', 157 }
161 jbisdisabled: true,
162 jzdisdisabled: true
163 }*/
164
165 ]
166 } 158 }
167 }, 159 },
168 created() { 160 created() {
...@@ -170,19 +162,24 @@ ...@@ -170,19 +162,24 @@
170 }, 162 },
171 mounted() { 163 mounted() {
172 // 该标识码继承过来 164 // 该标识码继承过来
173 let bsm = '044dc12648a1f41374679281da63e93b'; 165 let bsm = '401044005bad0557d5e3787239d8e18e';
174 queryjzx(bsm).then(res => { 166 queryjzd(bsm).then(res => {
175 for (let i = 0; i < res.result.length; i++) { 167 for (let i = 0; i < res.result.length; i++) {
176 res.result[i]['isCheck'] = false; 168 res.result[i]['isCheck'] = false;
177 res.result[i]['iszb'] = 'readonly'; 169 res.result[i]['iszb'] = 'readonly';
178 res.result[i]['jzdisdisabled'] = true; 170 res.result[i]['jzdisdisabled'] = true;
179 } 171 }
180 this.jzdlist = res.result; 172 this.jzdlist = res.result;
173 console.log("=====================================")
174 console.log(this.jzdlist)
181 }) 175 })
182 }, 176 },
183 methods: { 177 methods: {
184 save() { 178 save() {
185 console.log("保存...."); 179 console.log("保存....");
180 jzdsingleModify(this.jzdlist).then(res => {
181 console.log(res)
182 })
186 for (let item of this.jzdlist) { 183 for (let item of this.jzdlist) {
187 if (item.isCheck) { 184 if (item.isCheck) {
188 item.iszb = 'readonly'; 185 item.iszb = 'readonly';
...@@ -195,10 +192,12 @@ ...@@ -195,10 +192,12 @@
195 e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null 192 e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null
196 }, 193 },
197 changeAll(e) { 194 changeAll(e) {
195 console.log(e)
198 if (!e.target.checked) { 196 if (!e.target.checked) {
199 this.isCheckAll = false; 197 this.isCheckAll = false;
200 return 198 return
201 } 199 }
200 this.batch.bsms.length = 0;
202 for (let item of this.jzdlist) { 201 for (let item of this.jzdlist) {
203 if (!item.isCheck) { 202 if (!item.isCheck) {
204 this.isCheckAll = false; 203 this.isCheckAll = false;
...@@ -223,7 +222,33 @@ ...@@ -223,7 +222,33 @@
223 }, 222 },
224 batchExit() { 223 batchExit() {
225 console.log("批量修改") 224 console.log("批量修改")
225 let flag=false;
226 for (let item of this.jzdlist){
227 if (item.isCheck){
228 flag=true;
229 }
230 }
231 if (flag){
226 this.centerDialogVisible = true; 232 this.centerDialogVisible = true;
233 } else {
234 Message.info("请勾选要修改的数据")
235 }
236 },
237 jzdbatchsave() {
238 this.batchJzd.bsms.length = 0;
239 for (let item of this.jzdlist) {
240 if (item.isCheck) {
241 this.batchJzd.bsms.push(item.bsm);
242 }
243 }
244 jzdbatchModify(this.batchJzd).then(res => {
245 console.log(res)
246 if (res.success) {
247 this.centerDialogVisible = false;
248 } else {
249 Message.error("修改失败")
250 }
251 })
227 } 252 }
228 }, 253 },
229 computed: {}, 254 computed: {},
...@@ -231,9 +256,10 @@ ...@@ -231,9 +256,10 @@
231 } 256 }
232 </script> 257 </script>
233 <style scoped lang="less"> 258 <style scoped lang="less">
234 /deep/.el-input.is-disabled .el-input__inner{ 259 /* /deep/ .el-input.is-disabled .el-input__inner {
235 color: #cc1214; 260 color: #606764;
236 } 261 }*/
262
237 .main { 263 .main {
238 box-sizing: border-box; 264 box-sizing: border-box;
239 padding: 18px; 265 padding: 18px;
...@@ -264,7 +290,7 @@ ...@@ -264,7 +290,7 @@
264 cursor: text; 290 cursor: text;
265 } 291 }
266 292
267 table:hover{ 293 table:hover {
268 cursor: pointer; 294 cursor: pointer;
269 } 295 }
270 </style> 296 </style>
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
19 </tr> 19 </tr>
20 <tr v-for="(item,index) in jzxlist" :key="index"> 20 <tr v-for="(item,index) in jzxlist" :key="index">
21 <td><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td> 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> 22 <td><input type="text" class="formInput" v-model="item.qdh" readonly="readonly"/></td>
23 <td><input type="text" class="formInput" v-model="item.zzd" readonly="readonly"/></td> 23 <td><input type="text" class="formInput" v-model="item.zdh" readonly="readonly"/></td>
24 <td><input type="text" class="formInput" v-model="item.jzdj" :readonly="item.jjisdisabled"/></td> 24 <td><input type="text" class="formInput" v-model="item.jzjj" :readonly="item.jjisdisabled"/></td>
25 <td> 25 <td>
26 <el-select v-model="item.jzxlx" :disabled="item.jzxisdisabled"> 26 <el-select v-model="item.jzxlb" :disabled="item.jzxisdisabled">
27 <el-option 27 <el-option
28 v-for="i in jzxlx" 28 v-for="i in jzxlx"
29 :key="i.key" 29 :key="i.key"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 <div class="plxg"> 67 <div class="plxg">
68 <div> 68 <div>
69 <span class=""> 界址线类型:</span> 69 <span class=""> 界址线类型:</span>
70 <el-select> 70 <el-select v-model="batchJzx.jzxlx">
71 <el-option 71 <el-option
72 v-for="i in jzxlx" 72 v-for="i in jzxlx"
73 :key="i.key" 73 :key="i.key"
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 </div> 78 </div>
79 <div> 79 <div>
80 <span>界址线位置:</span> 80 <span>界址线位置:</span>
81 <el-select> 81 <el-select v-model="batchJzx.jzxwz">
82 <el-option 82 <el-option
83 v-for="i in jzxwz" 83 v-for="i in jzxwz"
84 :key="i.key" 84 :key="i.key"
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
89 </div> 89 </div>
90 <div> 90 <div>
91 <span>界线性质:</span> 91 <span>界线性质:</span>
92 <el-select> 92 <el-select v-model="batchJzx.jxxz">
93 <el-option 93 <el-option
94 v-for="i in jxxz" 94 v-for="i in jxxz"
95 :key="i.key" 95 :key="i.key"
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
102 </div> 102 </div>
103 <span slot="footer" class="dialog-footer"> 103 <span slot="footer" class="dialog-footer">
104 <el-button @click="centerDialogVisible = false">取 消</el-button> 104 <el-button @click="centerDialogVisible = false">取 消</el-button>
105 <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button> 105 <el-button type="primary" @click="jzxbatchsave">确 定</el-button>
106 </span> 106 </span>
107 </el-dialog> 107 </el-dialog>
108 </div> 108 </div>
...@@ -110,10 +110,11 @@ ...@@ -110,10 +110,11 @@
110 </template> 110 </template>
111 111
112 <script> 112 <script>
113 import {queryjzd} from '../../../api/zd' 113 import {queryjzx, jzxsingleModify, jzxsbatchModify} from '../../../api/zd'
114 import {Message} from 'element-ui'
114 115
115 export default { 116 export default {
116 name: "", 117 name: "界址线",
117 components: {}, 118 components: {},
118 props: {}, 119 props: {},
119 data() { 120 data() {
...@@ -213,46 +214,13 @@ ...@@ -213,46 +214,13 @@
213 value: '670700' 214 value: '670700'
214 }, 215 },
215 ], 216 ],
216 jzxlist: [ 217 jzxlist: [],
217 { 218 batchJzx: {
218 isCheck: false, 219 bsms: [],
219 qsd: '11', 220 jzxlx: '250200',
220 zzd: '1',
221 jzdj: '10.0',
222 jzxlx: '670600',
223 jzxwz: '1',
224 jxxz: '600002',
225 sm: '32131',
226 iszb: 'readonly',
227 jjisdisabled: true,
228 jzxisdisabled: true
229 }, {
230 isCheck: false,
231 qsd: '12',
232 zzd: '1',
233 jzdj: '10.0',
234 jzxlx: '670500',
235 jzxwz: '1', 221 jzxwz: '1',
236 jxxz: '600002', 222 jxxz: '600001'
237 sm: '3123', 223 }
238 iszb: 'readonly',
239 jjisdisabled: true,
240 jzxisdisabled: true
241 }, {
242 isCheck: false,
243 qsd: '14',
244 zzd: '1',
245 jzdj: '10.0',
246 jzxlx: '670700',
247 jzxwz: '1',
248 jxxz: '600004',
249 sm: '212',
250 iszb: 'readonly',
251 jjisdisabled: true,
252 jzxisdisabled: true
253 },
254
255 ]
256 } 224 }
257 }, 225 },
258 created() { 226 created() {
...@@ -260,20 +228,24 @@ ...@@ -260,20 +228,24 @@
260 }, 228 },
261 mounted() { 229 mounted() {
262 // 该标识码继承过来 230 // 该标识码继承过来
263 let bsm = '401044005bad0557d5e3787239d8e18e'; 231 let bsm = '044dc12648a1f41374679281da63e93b';
264 /* queryjzd(bsm).then(res => { 232 queryjzx(bsm).then(res => {
265 for (let i = 0; i < res.result.length; i++) { 233 for (let i = 0; i < res.result.length; i++) {
266 res.result[i]['isCheck'] = false; 234 res.result[i]['isCheck'] = false;
267 res.result[i]['iszb'] = 'readonly'; 235 res.result[i]['jjisdisabled'] = 'readonly';
268 res.result[i]['jbisdisabled'] = true; 236 res.result[i]['jzxisdisabled'] = true;
269 res.result[i]['jzdisdisabled'] = true;
270 } 237 }
271 this.jzdlist = res.result; 238 this.jzxlist = res.result;
272 })*/ 239 console.log("================================")
240 console.log(this.jzxlist)
241 })
273 }, 242 },
274 methods: { 243 methods: {
275 save() { 244 save() {
276 console.log("保存...."); 245 console.log("保存....");
246 jzxsingleModify(this.jzxlist).then(res => {
247 console.log(res)
248 })
277 for (let item of this.jzxlist) { 249 for (let item of this.jzxlist) {
278 if (item.isCheck) { 250 if (item.isCheck) {
279 item.jjisdisabled = 'readonly'; 251 item.jjisdisabled = 'readonly';
...@@ -286,7 +258,6 @@ ...@@ -286,7 +258,6 @@
286 }, 258 },
287 changeAll(e) { 259 changeAll(e) {
288 if (!e.target.checked) { 260 if (!e.target.checked) {
289 console.log("11111")
290 this.isCheckAll = false; 261 this.isCheckAll = false;
291 return 262 return
292 } 263 }
...@@ -314,7 +285,33 @@ ...@@ -314,7 +285,33 @@
314 }, 285 },
315 batchExit() { 286 batchExit() {
316 console.log("批量修改") 287 console.log("批量修改")
288 let flag = false;
289 for (let item of this.jzxlist) {
290 if (item.isCheck) {
291 flag = true;
292 }
293 }
294 if (flag) {
317 this.centerDialogVisible = true; 295 this.centerDialogVisible = true;
296 } else {
297 Message.info("请勾选要修改的数据")
298 }
299 },
300 jzxbatchsave() {
301 this.batchJzx.bsms.length = 0;
302 for (let item of this.jzxlist) {
303 if (item.isCheck) {
304 this.batchJzx.bsms.push(item.bsm);
305 }
306 }
307 jzxsbatchModify(this.batchJzx).then(res => {
308 console.log(res)
309 if (res.success) {
310 this.centerDialogVisible = false;
311 } else {
312 Message.error("修改失败")
313 }
314 })
318 } 315 }
319 }, 316 },
320 computed: {}, 317 computed: {},
...@@ -322,6 +319,11 @@ ...@@ -322,6 +319,11 @@
322 } 319 }
323 </script> 320 </script>
324 <style scoped lang="less"> 321 <style scoped lang="less">
322
323 /* /deep/ .el-input.is-disabled .el-input__inner {
324 color: #606764;
325 }*/
326
325 .main { 327 .main {
326 box-sizing: border-box; 328 box-sizing: border-box;
327 padding: 18px; 329 padding: 18px;
......