fae459c2 by weimo934

feat(fjcl,plzl):附件材料权属状态判断,批量坐落宗地和自然幢规则互斥

1 parent 209cb582
...@@ -44,3 +44,17 @@ export function zrzList(data) { ...@@ -44,3 +44,17 @@ export function zrzList(data) {
44 data:data 44 data:data
45 }) 45 })
46 } 46 }
47
48 /**
49 * 查询宗地、自然幢等权属状态
50 * @param bsm
51 */
52 export function queryStatus(bsm) {
53 return request({
54 url:"/system/basiccommon/query-status",
55 method:'get',
56 params:{
57 bsm
58 }
59 })
60 }
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog v-dialogDrag :close-on-click-modal="false" 3 <el-dialog v-dialogDrag :close-on-click-modal="false"
4 title="批量坐落" 4 title="批量坐落"
5 :visible.sync="isVisible" 5 :visible.sync="isVisible"
6 width="60%" 6 width="60%"
7 @close="close" 7 @close="close"
8 :modal-append-to-body="false" 8 :modal-append-to-body="false"
9 > 9 >
10 <div> 10 <div>
11 <table border="1"> 11 <table border="1">
12 <tr> 12 <tr>
13 <td>前缀</td> 13 <th>前缀</th>
14 <td>宗地</td> 14 <th>宗地</th>
15 <td>自然幢</td> 15 <th>自然幢</th>
16 <td>逻辑幢</td> 16 <th>逻辑幢</th>
17 <td>幢单元</td> 17 <th>幢单元</th>
18 <td></td> 18 <th></th>
19 <td></td> 19 <th></th>
20 <td>后缀</td> 20 <th>后缀</th>
21 </tr> 21 </tr>
22 <tr> 22 <tr>
23 <td> 23 <td>
24 <input type="text" class="inputtitle" v-model="plzlData.qz"/> 24 <el-input v-model="plzlData.qz"></el-input>
25 </td> 25 </td>
26 <td> 26 <td>
27 <el-select v-model="plzlData.zd"> 27 <el-select v-model="plzlData.zd">
28 <el-option v-for="i in zdgz" 28 <el-option v-for="i in zdgz"
29 :key="i.label" 29 :key="i.label"
30 :label="i.label" 30 :label="i.label"
31 :value="i.value"> 31 :value="i.value"
32 32 :disabled="i.disabled">
33 </el-option> 33 </el-option>
34 </el-select> 34 </el-select>
35 </td> 35 </td>
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
38 <el-option v-for="i in zrzgz" 38 <el-option v-for="i in zrzgz"
39 :key="i.label" 39 :key="i.label"
40 :label="i.label" 40 :label="i.label"
41 :value="i.value"> 41 :value="i.value"
42 42 :disabled="i.disabled">
43 </el-option> 43 </el-option>
44 </el-select> 44 </el-select>
45 </td> 45 </td>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
84 </el-select> 84 </el-select>
85 </td> 85 </td>
86 <td> 86 <td>
87 <input type="text" class="inputtitle" v-model="plzlData.hz"/> 87 <el-input v-model="plzlData.hz"></el-input>
88 </td> 88 </td>
89 </tr> 89 </tr>
90 </table> 90 </table>
...@@ -132,22 +132,27 @@ ...@@ -132,22 +132,27 @@
132 zdgz: [ 132 zdgz: [
133 { 133 {
134 label: '宗地坐落', 134 label: '宗地坐落',
135 value: '1' 135 value: '1',
136 disabled: false
136 }, { 137 }, {
137 label: "宗地名称", 138 label: "宗地名称",
138 value: '2' 139 value: '2',
140 disabled: false
139 }, { 141 }, {
140 label: "空", 142 label: "空",
141 value: '3' 143 value: '3',
144 disabled: false
142 } 145 }
143 ], 146 ],
144 zrzgz: [ 147 zrzgz: [
145 { 148 {
146 label: '自然幢坐落', 149 label: '自然幢坐落',
147 value: '1' 150 value: '1',
151 disabled: false
148 }, { 152 }, {
149 label: "自然幢名称", 153 label: "自然幢名称",
150 value: '2' 154 value: '2',
155 disabled: false
151 }, { 156 }, {
152 label: "空", 157 label: "空",
153 value: '3' 158 value: '3'
...@@ -229,7 +234,7 @@ ...@@ -229,7 +234,7 @@
229 test: function () { 234 test: function () {
230 for (let key in this.plzlData) { 235 for (let key in this.plzlData) {
231 if (this.plzlData[key] !== '' && this.plzlData[key] !== '3') { 236 if (this.plzlData[key] !== '' && this.plzlData[key] !== '3') {
232 return true; 237 return true;
233 } 238 }
234 } 239 }
235 return false; 240 return false;
...@@ -305,6 +310,40 @@ ...@@ -305,6 +310,40 @@
305 watch: { 310 watch: {
306 plZlVisible: function (val) { 311 plZlVisible: function (val) {
307 this.isVisible = val 312 this.isVisible = val
313 },
314 plzlData: {
315 handler(val){
316 console.log(val,'批量坐落规则');
317 // 宗地坐落
318 if (+val.zd === 1) {
319 this.zrzgz[0].disabled = true;
320 this.zrzgz[1].disabled = false;
321 return
322 } else if (+val.zd === 2) {
323 this.zrzgz[0].disabled = false;
324 this.zrzgz[1].disabled = true;
325 return
326 }else {
327 this.zrzgz[0].disabled = false;
328 this.zrzgz[1].disabled = false;
329 return
330 }
331 // 自然幢坐落
332 if (+val.zrz === 1) {
333 this.zdgz[0].disabled = true;
334 this.zdgz[1].disabled = false;
335 return
336 } else if (+val.zrz === 2) {
337 this.zdgz[0].disabled = false;
338 this.zdgz[1].disabled = true;
339 return
340 }else {
341 this.zdgz[0].disabled = false;
342 this.zdgz[1].disabled = false;
343 return
344 }
345 },
346 deep:true
308 } 347 }
309 } 348 }
310 } 349 }
...@@ -321,6 +360,10 @@ ...@@ -321,6 +360,10 @@
321 } 360 }
322 } 361 }
323 362
363 th {
364 height: 36px;
365 }
366
324 td { 367 td {
325 text-align: center; 368 text-align: center;
326 height: 36px; 369 height: 36px;
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
2 <div class="content_box"> 2 <div class="content_box">
3 <el-tabs v-model="activeName" class="tabs" @tab-click="handleClick"> 3 <el-tabs v-model="activeName" class="tabs" @tab-click="handleClick">
4 <el-tab-pane label="多幢基本信息" name="dzxx"><dzxx v-if="dzJbxxVisble"></dzxx></el-tab-pane> 4 <el-tab-pane label="多幢基本信息" name="dzxx"><dzxx v-if="dzJbxxVisble"></dzxx></el-tab-pane>
5 <el-tab-pane label="附件材料" name="fjcl"><fjcl v-if="fjclVisible"></fjcl></el-tab-pane> 5 <el-tab-pane label="附件材料" name="fjcl" @click="loading">
6 <fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
6 </el-tabs> 7 </el-tabs>
7 </div> 8 </div>
8 </template> 9 </template>
...@@ -24,6 +25,9 @@ ...@@ -24,6 +25,9 @@
24 }; 25 };
25 }, 26 },
26 methods: { 27 methods: {
28 loading(){
29 this.$refs.fjcl.isUpload(this.$store.state.dzbsm)
30 },
27 handleClick(tab, event) { 31 handleClick(tab, event) {
28 switch (tab.name) { 32 switch (tab.name) {
29 case 'dzxx': 33 case 'dzxx':
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
7 <el-tab-pane label="登记簿" name="djb"> 7 <el-tab-pane label="登记簿" name="djb">
8 <djb v-if="djbVisible"></djb> 8 <djb v-if="djbVisible"></djb>
9 </el-tab-pane> 9 </el-tab-pane>
10 <el-tab-pane label="附件材料" name="fjcl"> 10 <el-tab-pane label="附件材料" name="fjcl" @click="loading">
11 <fjcl v-if="fjclVisible"></fjcl> 11 <fjcl v-if="fjclVisible" ref="fjcl"></fjcl>
12 </el-tab-pane> 12 </el-tab-pane>
13 </el-tabs> 13 </el-tabs>
14 </div> 14 </div>
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
36 36
37 }, 37 },
38 methods: { 38 methods: {
39 loading(){
40 this.$refs.fjcl.isUpload(this.$store.state.hbsm)
41 },
39 handleClick(tab, event) { 42 handleClick(tab, event) {
40 // console.log(tab, event); 43 // console.log(tab, event);
41 switch (tab.name) { 44 switch (tab.name) {
......
...@@ -12,8 +12,9 @@ ...@@ -12,8 +12,9 @@
12 :show-file-list="false" 12 :show-file-list="false"
13 multiple 13 multiple
14 :on-exceed="handleExceed" 14 :on-exceed="handleExceed"
15 :disabled="isUpload"
15 > 16 >
16 <el-button size="small" type="primary">上传</el-button> 17 <el-button size="small" type="primary" :disabled="isUpload" >上传</el-button>
17 </el-upload> 18 </el-upload>
18 <table border="2"> 19 <table border="2">
19 <tr> 20 <tr>
...@@ -22,12 +23,12 @@ ...@@ -22,12 +23,12 @@
22 <th class="lx">文件类型</th> 23 <th class="lx">文件类型</th>
23 <th class="cz">操作</th> 24 <th class="cz">操作</th>
24 </tr> 25 </tr>
25 <tr v-if="list.length==0"> 26 <tr v-if="list.length===0">
26 <td colspan="4" class="noData" > 27 <td colspan="4" class="noData">
27 <span>暂无数据</span> 28 <span>暂无数据</span>
28 </td> 29 </td>
29 </tr> 30 </tr>
30 <tr v-else v-for="(item,index) in list" :key="index" > 31 <tr v-else v-for="(item,index) in list" :key="index">
31 <td class="xh">{{index+1}}</td> 32 <td class="xh">{{index+1}}</td>
32 <td class="mc">{{item.filename}}</td> 33 <td class="mc">{{item.filename}}</td>
33 <td class="lx">{{item.filepostfix}}</td> 34 <td class="lx">{{item.filepostfix}}</td>
...@@ -44,47 +45,46 @@ ...@@ -44,47 +45,46 @@
44 </template> 45 </template>
45 46
46 <script> 47 <script>
47 import {insertFile, getFileLis, downloadFile,loadFile,deleteFile} from "@api/common" 48 import {insertFile, getFileLis, downloadFile, loadFile, deleteFile} from "@api/common"
48 import {Message} from "element-ui" 49 import {queryStatus} from "@api/search"
49 50
50 export default { 51 export default {
51 name: "fjcl", 52 name: "fjcl",
52 data() { 53 data() {
53 return { 54 return {
54 fileData:{ 55 isUpload: false, //是否可以上传
55 glbsm:'', 56 fileData: {
56 dylx:'' 57 glbsm: '',
58 dylx: ''
57 }, 59 },
58 list: [ 60 list: []
59 ],
60 /* filesData: {
61 dylx: "",
62 glbsm: "",
63 list: [
64 {
65 filename: "",
66 filepostfix: "",
67 fileurl: "",
68 preViewUrl:""
69 }
70 ]
71 },*/
72 } 61 }
73 }, 62 },
74 mounted() { 63 mounted() {
75 this.getFileList() 64 this.getFileList()
76 }, 65 },
66 created(){
67
68 },
77 methods: { 69 methods: {
78 deleteFile(bsm){ 70 isUpdate(bsm) {
71 queryStatus(bsm).then(res => {
72 if (res.success) {
73 let qszt = res.result.qszt;
74 this.isUpload = +qszt !== 0;
75 }
76 })
77 },
78 deleteFile(bsm) {
79 this.$confirm('将删除该文件, 是否继续?', '提示', { 79 this.$confirm('将删除该文件, 是否继续?', '提示', {
80 confirmButtonText: '确定', 80 confirmButtonText: '确定',
81 cancelButtonText: '取消', 81 cancelButtonText: '取消',
82 type: 'warning' 82 type: 'warning'
83 }).then(() => { 83 }).then(() => {
84 deleteFile(bsm).then(res=>{ 84 deleteFile(bsm).then(res => {
85 if (res.success) { 85 if (res.success) {
86 this.getFileList(); 86 this.getFileList();
87 }else { 87 } else {
88 this.$message.error("删除失败") 88 this.$message.error("删除失败")
89 } 89 }
90 }) 90 })
...@@ -95,38 +95,39 @@ ...@@ -95,38 +95,39 @@
95 }); 95 });
96 }); 96 });
97 }, 97 },
98 loadFile(bsm){ 98 loadFile(bsm) {
99 loadFile(bsm).then(res=>{ 99 loadFile(bsm).then(res => {
100 if (res.success) { 100 if (res.success) {
101 window.open(res.message) 101 window.open(res.message)
102 } 102 }
103 }) 103 })
104 }, 104 },
105 downloadFile(url) { 105 downloadFile(url) {
106 window.open(`/api/file/download?url=`+url); 106 window.open(`/api/file/download?url=` + url);
107 }, 107 },
108 getFileList() { 108 getFileList() {
109 switch (this.$route.name) { 109 switch (this.$route.name) {
110 case "宗地": 110 case "宗地":
111 this.fileData.dylx = 'zd'; 111 this.fileData.dylx = 'zd';
112 this.fileData.glbsm = this.$store.state.zdbsm 112 this.fileData.glbsm = this.$store.state.zdbsm;
113 break; 113 break;
114 case "自然幢": 114 case "自然幢":
115 this.fileData.dylx = 'zrz'; 115 this.fileData.dylx = 'zrz';
116 this.fileData.glbsm = this.$store.state.zrzbsm 116 this.fileData.glbsm = this.$store.state.zrzbsm;
117 break 117 break;
118 case "多幢": 118 case "多幢":
119 this.fileData.dylx = 'dz'; 119 this.fileData.dylx = 'dz';
120 this.fileData.glbsm = this.$store.state.dzbsm 120 this.fileData.glbsm = this.$store.state.dzbsm;
121 break 121 break;
122 case "户": 122 case "户":
123 this.fileData.dylx = 'h'; 123 this.fileData.dylx = 'h';
124 this.fileData.glbsm = this.$store.state.hbsm 124 this.fileData.glbsm = this.$store.state.hbsm;
125 break; 125 break;
126 default: 126 default:
127 break 127 break
128 } 128 }
129 getFileLis(this.fileData.glbsm ).then(res => { 129 this.isUpdate(this.fileData.glbsm);
130 getFileLis(this.fileData.glbsm).then(res => {
130 if (res.success) { 131 if (res.success) {
131 this.list = res.result; 132 this.list = res.result;
132 } else { 133 } else {
...@@ -148,7 +149,7 @@ ...@@ -148,7 +149,7 @@
148 }, 149 },
149 handleExceed(files, fileList) { 150 handleExceed(files, fileList) {
150 console.log(fileList) 151 console.log(fileList)
151 // this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); 152 // this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
152 this.$message.warning("上传失败") 153 this.$message.warning("上传失败")
153 }, 154 },
154 beforeRemove(file, fileList) { 155 beforeRemove(file, fileList) {
...@@ -185,19 +186,19 @@ ...@@ -185,19 +186,19 @@
185 color: blue; 186 color: blue;
186 text-decoration: underline; 187 text-decoration: underline;
187 } 188 }
188 .xh{ 189 .xh {
189 width: 100px; 190 width: 100px;
190 } 191 }
191 .mc{ 192 .mc {
192 width: 300px; 193 width: 300px;
193 } 194 }
194 .lx{ 195 .lx {
195 width: 120px; 196 width: 120px;
196 } 197 }
197 .cz{ 198 .cz {
198 width: 150px; 199 width: 150px;
199 } 200 }
200 .noData span{ 201 .noData span {
201 color: #BBB; 202 color: #BBB;
202 } 203 }
203 } 204 }
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
7 <el-tab-pane label="界址线" name="jzx"><jzx v-if="jzxVisible"></jzx></el-tab-pane> 7 <el-tab-pane label="界址线" name="jzx"><jzx v-if="jzxVisible"></jzx></el-tab-pane>
8 <el-tab-pane label="登记簿" name="djb"><djb v-if="djbVisible"></djb></el-tab-pane> 8 <el-tab-pane label="登记簿" name="djb"><djb v-if="djbVisible"></djb></el-tab-pane>
9 <el-tab-pane label="历史回溯" name="lshs"><lshs v-if="lshsVisible"></lshs></el-tab-pane> 9 <el-tab-pane label="历史回溯" name="lshs"><lshs v-if="lshsVisible"></lshs></el-tab-pane>
10 <el-tab-pane label="附件材料" name="fjcl"><fjcl v-if="fjclVisible"></fjcl></el-tab-pane> 10 <el-tab-pane label="附件材料" name="fjcl" @click="loading">
11 <fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
11 </el-tabs> 12 </el-tabs>
12 <!-- </div> --> 13 <!-- </div> -->
13 </template> 14 </template>
...@@ -38,6 +39,9 @@ export default { ...@@ -38,6 +39,9 @@ export default {
38 }; 39 };
39 }, 40 },
40 methods: { 41 methods: {
42 loading(){
43 this.$refs.fjcl.isUpload(this.$store.state.zdbsm)
44 },
41 handleClick(tab, event) { 45 handleClick(tab, event) {
42 // console.log(tab, event); 46 // console.log(tab, event);
43 switch (tab.name) { 47 switch (tab.name) {
...@@ -59,7 +63,7 @@ export default { ...@@ -59,7 +63,7 @@ export default {
59 case 'fjcl': 63 case 'fjcl':
60 this.fjclVisible = true; 64 this.fjclVisible = true;
61 break; 65 break;
62 66
63 default: 67 default:
64 break; 68 break;
65 } 69 }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <el-tab-pane label="登记簿" name="djb"><djb></djb></el-tab-pane> 6 <el-tab-pane label="登记簿" name="djb"><djb></djb></el-tab-pane>
7 <el-tab-pane label="楼盘表" name="lpb"><lpb v-if="lpbLoad"></lpb></el-tab-pane> 7 <el-tab-pane label="楼盘表" name="lpb"><lpb v-if="lpbLoad"></lpb></el-tab-pane>
8 <el-tab-pane label="历史回溯" name="lshs"><lshs></lshs></el-tab-pane> 8 <el-tab-pane label="历史回溯" name="lshs"><lshs></lshs></el-tab-pane>
9 <el-tab-pane label="附件材料" name="fjcl"><fjcl></fjcl></el-tab-pane> 9 <el-tab-pane label="附件材料" name="fjcl" @click="loading"><fjcl ref="fjcl"></fjcl></el-tab-pane>
10 </el-tabs> 10 </el-tabs>
11 </div> 11 </div>
12 </template> 12 </template>
...@@ -32,6 +32,9 @@ export default { ...@@ -32,6 +32,9 @@ export default {
32 }; 32 };
33 }, 33 },
34 methods: { 34 methods: {
35 loading(){
36 this.$refs.fjcl.isUpload(this.$store.state.zrzbsm);
37 },
35 handleClick(tab, event) { 38 handleClick(tab, event) {
36 if(!this.lpbLoad){ 39 if(!this.lpbLoad){
37 this.lpbLoad = tab.name == 'lpb' ? true : false 40 this.lpbLoad = tab.name == 'lpb' ? true : false
......