feat(plc):批量层组件
Showing
3 changed files
with
214 additions
and
16 deletions
1 | import request from '@/plugin/axios' | 1 | import request from '@/plugin/axios' |
2 | |||
2 | /** | 3 | /** |
3 | * 新增自然幢基本信息 | 4 | * 新增自然幢基本信息 |
4 | */ | 5 | */ |
5 | export function insertZrzjbxx (data) { | 6 | export function insertZrzjbxx(data) { |
6 | return request({ | 7 | return request({ |
7 | url: 'fw/qjZrz/insert', | 8 | url: 'fw/qjZrz/insert', |
8 | method: 'post', | 9 | method: 'post', |
... | @@ -13,13 +14,13 @@ export function insertZrzjbxx (data) { | ... | @@ -13,13 +14,13 @@ export function insertZrzjbxx (data) { |
13 | /** | 14 | /** |
14 | * 生成不动产单元号 | 15 | * 生成不动产单元号 |
15 | */ | 16 | */ |
16 | export function getBdcdyh (dpdm,dptype) { | 17 | export function getBdcdyh(dpdm, dptype) { |
17 | return request({ | 18 | return request({ |
18 | url: '/system/generator/getBdcdyh', | 19 | url: '/system/generator/getBdcdyh', |
19 | method: 'get', | 20 | method: 'get', |
20 | params:{ | 21 | params: { |
21 | dpdm:dpdm, | 22 | dpdm: dpdm, |
22 | dptype:dptype | 23 | dptype: dptype |
23 | } | 24 | } |
24 | }) | 25 | }) |
25 | } | 26 | } |
... | @@ -27,23 +28,23 @@ export function getBdcdyh (dpdm,dptype) { | ... | @@ -27,23 +28,23 @@ export function getBdcdyh (dpdm,dptype) { |
27 | /** | 28 | /** |
28 | * 保存自然幢信息 | 29 | * 保存自然幢信息 |
29 | */ | 30 | */ |
30 | export function saveZrzInfo (data) { | 31 | export function saveZrzInfo(data) { |
31 | return request({ | 32 | return request({ |
32 | url: '/fw/qjZrz/updateQjZrz', | 33 | url: '/fw/qjZrz/updateQjZrz', |
33 | method: 'put', | 34 | method: 'put', |
34 | data:data | 35 | data: data |
35 | }) | 36 | }) |
36 | } | 37 | } |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * 保存自然幢信息 | 40 | * 保存自然幢信息 |
40 | */ | 41 | */ |
41 | export function getZrzDetailByBsm (data) { | 42 | export function getZrzDetailByBsm(data) { |
42 | return request({ | 43 | return request({ |
43 | url: '/fw/qjZrz/getQjZrzDetailById', | 44 | url: '/fw/qjZrz/getQjZrzDetailById', |
44 | method: 'get', | 45 | method: 'get', |
45 | params:{ | 46 | params: { |
46 | id:data | 47 | id: data |
47 | } | 48 | } |
48 | }) | 49 | }) |
49 | } | 50 | } |
... | @@ -73,11 +74,22 @@ export function queryYzgy(id) { | ... | @@ -73,11 +74,22 @@ export function queryYzgy(id) { |
73 | /** | 74 | /** |
74 | * 新增逻辑幢信息接口 | 75 | * 新增逻辑幢信息接口 |
75 | */ | 76 | */ |
76 | export function insertCInfo (data) { | 77 | export function insertCInfo(data) { |
77 | return request({ | 78 | return request({ |
78 | url: '/system/qjC/insertQjC', | 79 | url: '/system/qjC/insertQjC', |
79 | method: 'post', | 80 | method: 'post', |
80 | data:data | 81 | data: data |
82 | }) | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * 批量修改层 | ||
87 | */ | ||
88 | export function updatePlc(data) { | ||
89 | return request({ | ||
90 | url: '/system/qjC/batchPlc', | ||
91 | method: 'put', | ||
92 | data: data | ||
81 | }) | 93 | }) |
82 | } | 94 | } |
83 | 95 | ... | ... |
src/components/plc/plC.vue
0 → 100644
1 | <template> | ||
2 | <div> | ||
3 | <el-dialog | ||
4 | title="新增" | ||
5 | :visible.sync="isVisible" | ||
6 | width="50%" | ||
7 | @close="close" | ||
8 | :modal-append-to-body="false" | ||
9 | center> | ||
10 | <div> | ||
11 | <table border="1"> | ||
12 | <tr> | ||
13 | <td>层建筑面积</td> | ||
14 | <td> | ||
15 | <input type="text" v-model="qlcData.cjzmj" class="inputtitle"/> | ||
16 | </td> | ||
17 | <td> | ||
18 | 层套内建筑面积 | ||
19 | </td> | ||
20 | <td> | ||
21 | <input text="text" v-model="qlcData.ctnjzmj" class="inputtitle"/> | ||
22 | </td> | ||
23 | </tr> | ||
24 | <tr> | ||
25 | <td>层阳台面积</td> | ||
26 | <td> | ||
27 | <input type="text" v-model="qlcData.cytmj" class="inputtitle"/> | ||
28 | </td> | ||
29 | <td> | ||
30 | 层半墙面积 | ||
31 | </td> | ||
32 | <td> | ||
33 | <input text="text" v-model="qlcData.cbqmj" class="inputtitle"/> | ||
34 | </td> | ||
35 | </tr> | ||
36 | <tr> | ||
37 | <td>层共有建筑面积(㎡)</td> | ||
38 | <td> | ||
39 | <input type="text" v-model="qlcData.cgyjzmj" class="inputtitle"/> | ||
40 | </td> | ||
41 | <td> | ||
42 | 层分摊建筑面积(㎡) | ||
43 | </td> | ||
44 | <td> | ||
45 | <input text="text" v-model="qlcData.cftjzmj" class="inputtitle"/> | ||
46 | </td> | ||
47 | </tr> | ||
48 | <tr> | ||
49 | <td>层高</td> | ||
50 | <td> | ||
51 | <input type="text" v-model="qlcData.cg" class="inputtitle"/> | ||
52 | </td> | ||
53 | <td> | ||
54 | 水平投影面积(㎡) | ||
55 | </td> | ||
56 | <td> | ||
57 | <input text="text" v-model="qlcData.sptymj" class="inputtitle"/> | ||
58 | </td> | ||
59 | </tr> | ||
60 | </table> | ||
61 | </div> | ||
62 | <div class="shop"> | ||
63 | <el-button type="primary" @click="save">保存</el-button> | ||
64 | <el-button type="primary" @click="result">重置</el-button> | ||
65 | <el-button type="primary" @click="cancel">取消</el-button> | ||
66 | </div> | ||
67 | </el-dialog> | ||
68 | </div> | ||
69 | </template> | ||
70 | |||
71 | <script> | ||
72 | import {updatePlc} from './../../api/zrz' | ||
73 | import {Message} from 'element-ui' | ||
74 | |||
75 | export default { | ||
76 | name: "plC", | ||
77 | data() { | ||
78 | return { | ||
79 | isVisible: false, | ||
80 | qlcData: { | ||
81 | cbqmj: '', // 层半墙面积 | ||
82 | cftjzmj: '', // 层分摊建筑面积 | ||
83 | cg: '', // 层高 | ||
84 | cgyjzmj: '', // 层共有建筑面积 | ||
85 | cjzmj: '', // 层建筑面积 | ||
86 | ctnjzmj: '', // 层套内建筑面积 | ||
87 | cytmj: '', // 层阳台面积 | ||
88 | sptymj: '' // 水平投影面积 | ||
89 | } | ||
90 | } | ||
91 | }, | ||
92 | props: { | ||
93 | bsms: { | ||
94 | type: Array, | ||
95 | }, | ||
96 | plcVisible: { | ||
97 | type: Boolean, | ||
98 | default: function () { | ||
99 | return false | ||
100 | } | ||
101 | } | ||
102 | }, | ||
103 | methods: { | ||
104 | save: function () { | ||
105 | this.qlcData['bsms'] = this.bsms | ||
106 | updatePlc(this.qlcData).then(res => { | ||
107 | console.log(res) | ||
108 | if (res.success) { | ||
109 | Message.success("保存成功") | ||
110 | this.close() | ||
111 | } else { | ||
112 | Message.error(res.message) | ||
113 | } | ||
114 | }) | ||
115 | }, | ||
116 | close: function () { | ||
117 | this.$emit('close') | ||
118 | this.isVisible = false | ||
119 | this.result() | ||
120 | }, | ||
121 | cancel: function () { | ||
122 | this.$emit('close') | ||
123 | this.isVisible = false | ||
124 | }, | ||
125 | result: function () { | ||
126 | this.qlcData = { | ||
127 | cbqmj: '', // 层半墙面积 | ||
128 | cftjzmj: '', // 层分摊建筑面积 | ||
129 | cg: '', // 层高 | ||
130 | cgyjzmj: '', // 层共有建筑面积 | ||
131 | cjzmj: '', // 层建筑面积 | ||
132 | ctnjzmj: '', // 层套内建筑面积 | ||
133 | cytmj: '', // 层阳台面积 | ||
134 | sptymj: '' // 水平投影面积 | ||
135 | } | ||
136 | } | ||
137 | }, | ||
138 | watch: { | ||
139 | plcVisible(val) { | ||
140 | this.isVisible = val | ||
141 | } | ||
142 | } | ||
143 | } | ||
144 | </script> | ||
145 | |||
146 | <style scoped> | ||
147 | table { | ||
148 | margin-top: 10px; | ||
149 | background-color: #fff; | ||
150 | font-size: 14px; | ||
151 | width: 100%; | ||
152 | } | ||
153 | |||
154 | td { | ||
155 | text-align: center; | ||
156 | height: 36px; | ||
157 | min-width: 50px; | ||
158 | } | ||
159 | |||
160 | table:hover { | ||
161 | cursor: pointer; | ||
162 | } | ||
163 | |||
164 | .inputtitle { | ||
165 | line-height: 40px; | ||
166 | width: 95%; | ||
167 | border: none; | ||
168 | } | ||
169 | |||
170 | /* .inputtitle:focus { | ||
171 | outline: none; | ||
172 | }*/ | ||
173 | |||
174 | .shop { | ||
175 | margin-top: 20px; | ||
176 | text-align: center; | ||
177 | } | ||
178 | </style> |
... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
22 | > | 22 | > |
23 | <el-button class="radioBtn" label="2" border>实预测转换</el-button> | 23 | <el-button class="radioBtn" label="2" border>实预测转换</el-button> |
24 | <el-button class="radioBtn" label="3" border>批量户</el-button> | 24 | <el-button class="radioBtn" label="3" border>批量户</el-button> |
25 | <el-button class="radioBtn" label="4" border>批量层</el-button> | 25 | <el-button class="radioBtn" label="4" border @click="plcVisible=true">批量层</el-button> |
26 | <el-button class="radioBtn" label="5" border>批量室号</el-button> | 26 | <el-button class="radioBtn" label="5" border>批量室号</el-button> |
27 | <el-button class="radioBtn" label="6" border>批量坐落</el-button> | 27 | <el-button class="radioBtn" label="6" border>批量坐落</el-button> |
28 | <el-button class="radioBtn" label="7" border>批量单元号</el-button> | 28 | <el-button class="radioBtn" label="7" border>批量单元号</el-button> |
... | @@ -45,7 +45,7 @@ | ... | @@ -45,7 +45,7 @@ |
45 | </div> | 45 | </div> |
46 | <!-- 楼盘表主体 --> | 46 | <!-- 楼盘表主体 --> |
47 | <div class="lp-overview" :style="{ width: lpbContentwidth + 'px' }"> | 47 | <div class="lp-overview" :style="{ width: lpbContentwidth + 'px' }"> |
48 | <lpbContent></lpbContent> | 48 | <lpbContent></lpbContent> |
49 | </div> | 49 | </div> |
50 | <!-- 右侧图例 --> | 50 | <!-- 右侧图例 --> |
51 | <div class="lp-legend"> | 51 | <div class="lp-legend"> |
... | @@ -106,22 +106,27 @@ | ... | @@ -106,22 +106,27 @@ |
106 | > | 106 | > |
107 | </div> | 107 | </div> |
108 | </el-dialog> | 108 | </el-dialog> |
109 | <pl-c :plc-visible="plcVisible" :bsms="bsms" @close="plcClose"></pl-c> | ||
109 | </div> | 110 | </div> |
110 | </template> | 111 | </template> |
111 | 112 | ||
112 | <script> | 113 | <script> |
114 | import PlC from "./../../../../components/plc/plC" | ||
113 | import LineTree from "../../../../components/lineTree/lineTree"; | 115 | import LineTree from "../../../../components/lineTree/lineTree"; |
114 | import addLjz from "./ljz/index"; | 116 | import addLjz from "./ljz/index"; |
115 | import addZdy from "./zdy/index"; | 117 | import addZdy from "./zdy/index"; |
116 | import addCh from "./ch/index"; | 118 | import addCh from "./ch/index"; |
117 | import lpbContent from "./lpbContent/index"; | 119 | import lpbContent from "./lpbContent/index"; |
118 | import { getLpbMenuTree } from "../../../../api/lpb"; | 120 | import { getLpbMenuTree } from "../../../../api/lpb"; |
121 | |||
119 | export default { | 122 | export default { |
120 | name: "", | 123 | name: "", |
121 | components: { LineTree, addLjz, addZdy, addCh, lpbContent }, | 124 | components: { LineTree, addLjz, addZdy, addCh, lpbContent,PlC }, |
122 | props: {}, | 125 | props: {}, |
123 | data() { | 126 | data() { |
124 | return { | 127 | return { |
128 | bsms:["123","321","231"], | ||
129 | plcVisible:false, | ||
125 | radio1: "", | 130 | radio1: "", |
126 | radio2: "", | 131 | radio2: "", |
127 | createFlag: false, | 132 | createFlag: false, |
... | @@ -206,10 +211,13 @@ export default { | ... | @@ -206,10 +211,13 @@ export default { |
206 | this.getLpbMenuTree("1e0c83dfe2e73284f834a80a0947f0c9"); | 211 | this.getLpbMenuTree("1e0c83dfe2e73284f834a80a0947f0c9"); |
207 | // 楼盘表绘制区域宽度计算:楼盘表区域宽度-图例宽度34-滚动条宽度6 | 212 | // 楼盘表绘制区域宽度计算:楼盘表区域宽度-图例宽度34-滚动条宽度6 |
208 | setTimeout(() => { | 213 | setTimeout(() => { |
209 | this.lpbContentwidth = this.$store.state.contentWidth - 34 - 6; | 214 | this.lpbContentwidth = this.$store.state.contentWidth - 34 - 6; |
210 | }, 100); | 215 | }, 100); |
211 | }, | 216 | }, |
212 | methods: { | 217 | methods: { |
218 | plcClose(){ | ||
219 | this.plcVisible=false; | ||
220 | }, | ||
213 | //获取高度计算lpb内容区高度 | 221 | //获取高度计算lpb内容区高度 |
214 | getHeight() { | 222 | getHeight() { |
215 | this.lpbContentHight = window.innerHeight - 340; | 223 | this.lpbContentHight = window.innerHeight - 340; | ... | ... |
-
Please register or sign in to post a comment