引导页提交
Showing
2 changed files
with
333 additions
and
5 deletions
src/api/panel.js
0 → 100644
1 | import request from '@/plugin/axios' | ||
2 | /** | ||
3 | * 查询所有行政区 | ||
4 | */ | ||
5 | export function getAllList() { | ||
6 | return request({ | ||
7 | url: 'system/xzq/getAllList', | ||
8 | method: 'get', | ||
9 | }) | ||
10 | } | ||
11 | /** | ||
12 | * 跟据行政区标识码查地籍区 | ||
13 | */ | ||
14 | export function getListByXzqbsm (xzqbsm) { | ||
15 | return request({ | ||
16 | url: 'system/djq/getListByXzqbsm', | ||
17 | method: 'get', | ||
18 | params: { | ||
19 | xzqbsm | ||
20 | } | ||
21 | }) | ||
22 | } | ||
23 | /** | ||
24 | * 跟据地籍区标识码查地籍子区 | ||
25 | */ | ||
26 | export function getListByPbsm (pbsm) { | ||
27 | return request({ | ||
28 | url: 'system/djq/getListByPbsm', | ||
29 | method: 'get', | ||
30 | params: { | ||
31 | pbsm | ||
32 | } | ||
33 | }) | ||
34 | } | ||
35 | /** | ||
36 | * 新增宗地基本信息 | ||
37 | */ | ||
38 | export function insertQjZdjbxx (data) { | ||
39 | return request({ | ||
40 | url: 'zd/qjZdjbxx/insertQjZdjbxx', | ||
41 | method: 'post', | ||
42 | data: data, | ||
43 | }) | ||
44 | } | ||
45 | /** | ||
46 | * 新增自然幢基本信息 | ||
47 | */ | ||
48 | export function insertZrzjbxx (data) { | ||
49 | return request({ | ||
50 | url: 'fw/qjZrz/insert', | ||
51 | method: 'post', | ||
52 | data: data, | ||
53 | }) | ||
54 | } | ||
55 | /** | ||
56 | * 通过名称获取字典 | ||
57 | */ | ||
58 | export function getDdicByMC (mc) { | ||
59 | return request({ | ||
60 | url: 'system/dictionary/getDdicByMC', | ||
61 | method: 'get', | ||
62 | params: { | ||
63 | mc | ||
64 | } | ||
65 | }) | ||
66 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | <template> | 1 | <template> |
2 | <div class=""></div> | 2 | <div> |
3 | </template> | 3 | <el-tabs :tab-position="tabPosition" v-model="activeName" id="tabs" type="card" class="eltabs" @tab-click="handleClick"> |
4 | <el-tab-pane class="eltabspane" label="宗地" name="zd" > | ||
5 | |||
6 | <el-form :inline="true" class="demo-form-inline"> | ||
7 | <el-form-item label="行政区"> | ||
8 | <el-select v-model="xzqValue" value-key="xzqbsm" placeholder="行政区" @change="changeXzq(xzqValue)" style="width:130px;"> | ||
9 | <el-option v-for="item in xzq" | ||
10 | :key="item.xzqbsm" | ||
11 | :label="item.xzqmc" | ||
12 | :value="item.xzqbsm"> | ||
13 | </el-option> | ||
14 | </el-select> | ||
15 | </el-form-item> | ||
16 | <el-form-item label="地籍区"> | ||
17 | <el-select v-model="djqValue" placeholder="地籍区" @change="changeDjq(djqValue)" style="width:130px;"> | ||
18 | <el-option v-for="item in djq" | ||
19 | :key="item.bsm" | ||
20 | :label="item.mc" | ||
21 | :value="item.bsm"> | ||
22 | </el-option> | ||
23 | </el-select> | ||
24 | </el-form-item> | ||
25 | <el-form-item label="地籍子区"> | ||
26 | <el-select v-model="djzqValue" placeholder="地籍子区" style="width:130px;"> | ||
27 | <el-option v-for="item in djzq" | ||
28 | :key="item.bsm" | ||
29 | :label="item.mc" | ||
30 | :value="item.bsm"> | ||
31 | </el-option> | ||
32 | </el-select> | ||
33 | </el-form-item> | ||
34 | |||
35 | |||
36 | |||
37 | <el-form-item label="项目名称" > | ||
38 | <el-input v-model="zdProjectName" placeholder="项目名称" style="width:400px;"></el-input> | ||
39 | </el-form-item> | ||
40 | <el-form-item label="所有权类型"> | ||
41 | <el-select v-model="syqlx.value" placeholder="所有权类型" @change="changeSyqlx(syqlx.value)" style="width:400px;"> | ||
42 | <el-option v-for="item in syqlx" | ||
43 | :key="item.value" | ||
44 | :label="item.label" | ||
45 | :value="item.value"> | ||
46 | </el-option> | ||
47 | </el-select> | ||
48 | </el-form-item> | ||
49 | <el-form-item label="特征码"> | ||
50 | <el-select v-model="tzmCode" placeholder="地籍子区" style="width:200px;"> | ||
51 | <el-option v-for="item in zdtzm" | ||
52 | :key="item.bsm" | ||
53 | :label="item.mc" | ||
54 | :value="item.bsm"> | ||
55 | </el-option> | ||
56 | </el-select> | ||
57 | </el-form-item> | ||
58 | <div> | ||
59 | <el-form-item style="margin-left:300px;"> | ||
60 | <el-button type="primary" >导入图形</el-button> | ||
61 | </el-form-item> | ||
62 | <el-form-item> | ||
63 | <el-button type="primary" @click="newZd">创建</el-button> | ||
64 | </el-form-item> | ||
65 | <el-form-item> | ||
66 | <el-button type="primary">取消</el-button> | ||
67 | </el-form-item> | ||
68 | </div> | ||
69 | |||
70 | </el-form> | ||
4 | 71 | ||
72 | |||
73 | </el-tab-pane> | ||
74 | <el-tab-pane class="eltabspane" label="宗海" name="zh">宗海</el-tab-pane> | ||
75 | <el-tab-pane class="eltabspane" label="自然幢" name="zrz"> | ||
76 | <el-form :inline="true" class="zrzProject"> | ||
77 | <el-form-item label="项目名称"> | ||
78 | <el-input v-model="zrzProjectName" placeholder="项目名称" style="width:400px;"></el-input> | ||
79 | </el-form-item> | ||
80 | |||
81 | <div> | ||
82 | <el-form-item style="margin-left:300px;"> | ||
83 | <el-button type="primary" >导入图形</el-button> | ||
84 | </el-form-item> | ||
85 | <el-form-item> | ||
86 | <el-button type="primary" @click="newZrz">创建</el-button> | ||
87 | </el-form-item> | ||
88 | <el-form-item> | ||
89 | <el-button type="primary">取消</el-button> | ||
90 | </el-form-item> | ||
91 | </div> | ||
92 | </el-form> | ||
93 | </el-tab-pane> | ||
94 | <el-tab-pane class="eltabspane" label="多幢" name="dz">多幢</el-tab-pane> | ||
95 | <el-tab-pane class="eltabspane" label="林权" name="lq">林权</el-tab-pane> | ||
96 | <el-tab-pane class="eltabspane" label="构筑物" name="gzw">构筑物</el-tab-pane> | ||
97 | </el-tabs> | ||
98 | </div> | ||
99 | |||
100 | </template> | ||
5 | <script> | 101 | <script> |
102 | import{getAllList,getListByXzqbsm,getListByPbsm,insertQjZdjbxx,getDdicByMC,insertZrzjbxx} from "../../../api/panel" | ||
6 | export default { | 103 | export default { |
7 | name:"", | 104 | name:"", |
8 | components:{}, | 105 | components:{}, |
9 | props:{}, | 106 | props:{}, |
10 | data(){ | 107 | data(){ |
11 | return { | 108 | return { |
109 | tabPosition: 'left', | ||
110 | //默认第一个选项卡 | ||
111 | activeName: "zd", | ||
112 | zdProjectName:'', | ||
113 | zrzProjectName:'', | ||
114 | tzmCode:'', | ||
115 | syqlxCode:'', | ||
116 | xzqValue:'', | ||
117 | djqValue:'', | ||
118 | djzqValue:'', | ||
119 | xzq:[], | ||
120 | djq:[], | ||
121 | djzq:[], | ||
122 | syqlx:[ | ||
123 | { | ||
124 | label:"国家所有", | ||
125 | value:"G" | ||
126 | },{ | ||
127 | label:"集体所有", | ||
128 | value:"J" | ||
129 | },{ | ||
130 | label:"土地所有权未确定或有争议", | ||
131 | value:"Z" | ||
132 | }, | ||
133 | ], | ||
134 | zdtzm:[] | ||
12 | } | 135 | } |
13 | }, | 136 | }, |
14 | created(){}, | 137 | created(){ |
138 | this.getXzqList(); | ||
139 | this.getDdicByMC(); | ||
140 | }, | ||
15 | mounted(){}, | 141 | mounted(){}, |
16 | methods:{}, | 142 | methods:{ |
143 | handleClick(tab, event) { | ||
144 | console.log(tab, event); | ||
145 | console.log(tab.name); | ||
146 | }, | ||
147 | newZd(){ | ||
148 | var data = { | ||
149 | xzqbsm:this.xzqValue, | ||
150 | djqbsm:this.djqValue, | ||
151 | djzqbsm:this.djzqValue, | ||
152 | syqlxbsm:this.syqlxCode, | ||
153 | xmmc:this.zdProjectName, | ||
154 | zdtzmbsm:this.tzmCode | ||
155 | } | ||
156 | console.log(data); | ||
157 | insertQjZdjbxx(data).then((res) => { | ||
158 | console.log(res.result) | ||
159 | if(res.code=="200"){ | ||
160 | this.$message({ | ||
161 | message: '创建成功!', | ||
162 | type: 'success' | ||
163 | }); | ||
164 | //todo 跳转到宗地基本信息内容表页面 (预留) | ||
165 | |||
166 | }else{ | ||
167 | this.$message.error('创建失败!'); | ||
168 | } | ||
169 | }) | ||
170 | .catch((error) => { | ||
171 | |||
172 | }); | ||
173 | }, | ||
174 | newZrz(){ | ||
175 | //todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm | ||
176 | var data = { | ||
177 | userbsm:'', | ||
178 | xmmc:this.zrzProjectName, | ||
179 | zdbsm:'' | ||
180 | } | ||
181 | console.log(data); | ||
182 | insertZrzjbxx(data).then((res) => { | ||
183 | console.log(res.result) | ||
184 | if(res.code=="200"){ | ||
185 | this.$message({ | ||
186 | message: '创建成功!', | ||
187 | type: 'success' | ||
188 | }); | ||
189 | //todo 跳转到自然幢基本信息内容表页面 (预留) | ||
190 | |||
191 | }else{ | ||
192 | this.$message.error('创建失败!'); | ||
193 | } | ||
194 | }) | ||
195 | .catch((error) => { | ||
196 | |||
197 | }); | ||
198 | }, | ||
199 | getXzqList(){ | ||
200 | getAllList().then((res) => { | ||
201 | console.log(res.result) | ||
202 | this.xzq = res.result; | ||
203 | }) | ||
204 | .catch((error) => { | ||
205 | |||
206 | }); | ||
207 | }, | ||
208 | getDdicByMC(){ | ||
209 | getDdicByMC("宗地(宗海)特征码").then((res) => { | ||
210 | console.log(res.result) | ||
211 | this.zdtzm = res.result; | ||
212 | |||
213 | }) | ||
214 | .catch((error) => { | ||
215 | |||
216 | }); | ||
217 | }, | ||
218 | changeXzq(id){ | ||
219 | this.djq = []; | ||
220 | this.djzq = []; | ||
221 | this.djqValue = ''; | ||
222 | this.djzqValue = ''; | ||
223 | getListByXzqbsm(id).then((res) => { | ||
224 | if(res.result==null){ | ||
225 | this.djq = null; | ||
226 | }else{ | ||
227 | this.djq = res.result; | ||
228 | |||
229 | } | ||
230 | }) | ||
231 | .catch((error) => { | ||
232 | |||
233 | }); | ||
234 | }, | ||
235 | changeDjq(item){ | ||
236 | this.djzq = []; | ||
237 | this.djzqValue = ''; | ||
238 | if(item==null){ | ||
239 | console.log("llllllllllasdas") | ||
240 | }else { | ||
241 | console.log(item) | ||
242 | getListByPbsm(item).then((res) => { | ||
243 | console.log(res.result) | ||
244 | if (res.result== null) { | ||
245 | this.djzq = null; | ||
246 | } else { | ||
247 | this.djzq = res.result; | ||
248 | |||
249 | } | ||
250 | }) | ||
251 | .catch((error) => { | ||
252 | |||
253 | }); | ||
254 | } | ||
255 | }, | ||
256 | changeSyqlx(id){ | ||
257 | this.syqlxCode = id; | ||
258 | console.log(this.syqlxCode); | ||
259 | }, | ||
260 | }, | ||
17 | computed: {}, | 261 | computed: {}, |
18 | watch: {}, | 262 | watch: {}, |
19 | } | 263 | } |
20 | </script> | 264 | </script> |
21 | <style scoped lang="less"> | 265 | <style > |
266 | .eltabs{ | ||
267 | height: 600px;width:800px;margin:80px auto;border:1px solid #666 | ||
268 | } | ||
269 | .eltabspane{ | ||
270 | height: 500px;width:660px;padding:20px; | ||
271 | } | ||
272 | |||
273 | #tabs .el-tabs__item { | ||
274 | font-size:18px!important; | ||
275 | color:#333; | ||
276 | width:100px; | ||
277 | height:60px; | ||
278 | line-height: 80px; | ||
279 | } | ||
280 | .zrzProject{ | ||
281 | margin-top:80px; | ||
282 | } | ||
283 | |||
22 | </style> | 284 | </style> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment