fae459c2 by weimo934

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

1 parent 209cb582
......@@ -44,3 +44,17 @@ export function zrzList(data) {
data:data
})
}
/**
* 查询宗地、自然幢等权属状态
* @param bsm
*/
export function queryStatus(bsm) {
return request({
url:"/system/basiccommon/query-status",
method:'get',
params:{
bsm
}
})
}
......
<template>
<div>
<el-dialog v-dialogDrag :close-on-click-modal="false"
title="批量坐落"
:visible.sync="isVisible"
width="60%"
@close="close"
:modal-append-to-body="false"
title="批量坐落"
:visible.sync="isVisible"
width="60%"
@close="close"
:modal-append-to-body="false"
>
<div>
<table border="1">
<tr>
<td>前缀</td>
<td>宗地</td>
<td>自然幢</td>
<td>逻辑幢</td>
<td>幢单元</td>
<td></td>
<td></td>
<td>后缀</td>
<th>前缀</th>
<th>宗地</th>
<th>自然幢</th>
<th>逻辑幢</th>
<th>幢单元</th>
<th></th>
<th></th>
<th>后缀</th>
</tr>
<tr>
<td>
<input type="text" class="inputtitle" v-model="plzlData.qz"/>
<el-input v-model="plzlData.qz"></el-input>
</td>
<td>
<el-select v-model="plzlData.zd">
<el-option v-for="i in zdgz"
:key="i.label"
:label="i.label"
:value="i.value">
:value="i.value"
:disabled="i.disabled">
</el-option>
</el-select>
</td>
......@@ -38,8 +38,8 @@
<el-option v-for="i in zrzgz"
:key="i.label"
:label="i.label"
:value="i.value">
:value="i.value"
:disabled="i.disabled">
</el-option>
</el-select>
</td>
......@@ -84,7 +84,7 @@
</el-select>
</td>
<td>
<input type="text" class="inputtitle" v-model="plzlData.hz"/>
<el-input v-model="plzlData.hz"></el-input>
</td>
</tr>
</table>
......@@ -132,22 +132,27 @@
zdgz: [
{
label: '宗地坐落',
value: '1'
value: '1',
disabled: false
}, {
label: "宗地名称",
value: '2'
value: '2',
disabled: false
}, {
label: "空",
value: '3'
value: '3',
disabled: false
}
],
zrzgz: [
{
label: '自然幢坐落',
value: '1'
value: '1',
disabled: false
}, {
label: "自然幢名称",
value: '2'
value: '2',
disabled: false
}, {
label: "空",
value: '3'
......@@ -229,7 +234,7 @@
test: function () {
for (let key in this.plzlData) {
if (this.plzlData[key] !== '' && this.plzlData[key] !== '3') {
return true;
return true;
}
}
return false;
......@@ -305,6 +310,40 @@
watch: {
plZlVisible: function (val) {
this.isVisible = val
},
plzlData: {
handler(val){
console.log(val,'批量坐落规则');
// 宗地坐落
if (+val.zd === 1) {
this.zrzgz[0].disabled = true;
this.zrzgz[1].disabled = false;
return
} else if (+val.zd === 2) {
this.zrzgz[0].disabled = false;
this.zrzgz[1].disabled = true;
return
}else {
this.zrzgz[0].disabled = false;
this.zrzgz[1].disabled = false;
return
}
// 自然幢坐落
if (+val.zrz === 1) {
this.zdgz[0].disabled = true;
this.zdgz[1].disabled = false;
return
} else if (+val.zrz === 2) {
this.zdgz[0].disabled = false;
this.zdgz[1].disabled = true;
return
}else {
this.zdgz[0].disabled = false;
this.zdgz[1].disabled = false;
return
}
},
deep:true
}
}
}
......@@ -321,6 +360,10 @@
}
}
th {
height: 36px;
}
td {
text-align: center;
height: 36px;
......
......@@ -2,7 +2,8 @@
<div class="content_box">
<el-tabs v-model="activeName" class="tabs" @tab-click="handleClick">
<el-tab-pane label="多幢基本信息" name="dzxx"><dzxx v-if="dzJbxxVisble"></dzxx></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl"><fjcl v-if="fjclVisible"></fjcl></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl" @click="loading">
<fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
</el-tabs>
</div>
</template>
......@@ -24,6 +25,9 @@
};
},
methods: {
loading(){
this.$refs.fjcl.isUpload(this.$store.state.dzbsm)
},
handleClick(tab, event) {
switch (tab.name) {
case 'dzxx':
......
......@@ -7,8 +7,8 @@
<el-tab-pane label="登记簿" name="djb">
<djb v-if="djbVisible"></djb>
</el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl">
<fjcl v-if="fjclVisible"></fjcl>
<el-tab-pane label="附件材料" name="fjcl" @click="loading">
<fjcl v-if="fjclVisible" ref="fjcl"></fjcl>
</el-tab-pane>
</el-tabs>
</div>
......@@ -36,6 +36,9 @@
},
methods: {
loading(){
this.$refs.fjcl.isUpload(this.$store.state.hbsm)
},
handleClick(tab, event) {
// console.log(tab, event);
switch (tab.name) {
......
......@@ -12,8 +12,9 @@
:show-file-list="false"
multiple
:on-exceed="handleExceed"
:disabled="isUpload"
>
<el-button size="small" type="primary">上传</el-button>
<el-button size="small" type="primary" :disabled="isUpload" >上传</el-button>
</el-upload>
<table border="2">
<tr>
......@@ -22,12 +23,12 @@
<th class="lx">文件类型</th>
<th class="cz">操作</th>
</tr>
<tr v-if="list.length==0">
<td colspan="4" class="noData" >
<tr v-if="list.length===0">
<td colspan="4" class="noData">
<span>暂无数据</span>
</td>
</tr>
<tr v-else v-for="(item,index) in list" :key="index" >
<tr v-else v-for="(item,index) in list" :key="index">
<td class="xh">{{index+1}}</td>
<td class="mc">{{item.filename}}</td>
<td class="lx">{{item.filepostfix}}</td>
......@@ -44,47 +45,46 @@
</template>
<script>
import {insertFile, getFileLis, downloadFile,loadFile,deleteFile} from "@api/common"
import {Message} from "element-ui"
import {insertFile, getFileLis, downloadFile, loadFile, deleteFile} from "@api/common"
import {queryStatus} from "@api/search"
export default {
name: "fjcl",
data() {
return {
fileData:{
glbsm:'',
dylx:''
isUpload: false, //是否可以上传
fileData: {
glbsm: '',
dylx: ''
},
list: [
],
/* filesData: {
dylx: "",
glbsm: "",
list: [
{
filename: "",
filepostfix: "",
fileurl: "",
preViewUrl:""
}
]
},*/
list: []
}
},
mounted() {
this.getFileList()
},
created(){
},
methods: {
deleteFile(bsm){
isUpdate(bsm) {
queryStatus(bsm).then(res => {
if (res.success) {
let qszt = res.result.qszt;
this.isUpload = +qszt !== 0;
}
})
},
deleteFile(bsm) {
this.$confirm('将删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteFile(bsm).then(res=>{
deleteFile(bsm).then(res => {
if (res.success) {
this.getFileList();
}else {
} else {
this.$message.error("删除失败")
}
})
......@@ -95,38 +95,39 @@
});
});
},
loadFile(bsm){
loadFile(bsm).then(res=>{
loadFile(bsm) {
loadFile(bsm).then(res => {
if (res.success) {
window.open(res.message)
}
})
},
downloadFile(url) {
window.open(`/api/file/download?url=`+url);
window.open(`/api/file/download?url=` + url);
},
getFileList() {
switch (this.$route.name) {
case "宗地":
this.fileData.dylx = 'zd';
this.fileData.glbsm = this.$store.state.zdbsm
this.fileData.glbsm = this.$store.state.zdbsm;
break;
case "自然幢":
this.fileData.dylx = 'zrz';
this.fileData.glbsm = this.$store.state.zrzbsm
break
this.fileData.glbsm = this.$store.state.zrzbsm;
break;
case "多幢":
this.fileData.dylx = 'dz';
this.fileData.glbsm = this.$store.state.dzbsm
break
this.fileData.glbsm = this.$store.state.dzbsm;
break;
case "户":
this.fileData.dylx = 'h';
this.fileData.glbsm = this.$store.state.hbsm
this.fileData.glbsm = this.$store.state.hbsm;
break;
default:
break
}
getFileLis(this.fileData.glbsm ).then(res => {
this.isUpdate(this.fileData.glbsm);
getFileLis(this.fileData.glbsm).then(res => {
if (res.success) {
this.list = res.result;
} else {
......@@ -148,7 +149,7 @@
},
handleExceed(files, fileList) {
console.log(fileList)
// this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
// this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
this.$message.warning("上传失败")
},
beforeRemove(file, fileList) {
......@@ -185,19 +186,19 @@
color: blue;
text-decoration: underline;
}
.xh{
.xh {
width: 100px;
}
.mc{
.mc {
width: 300px;
}
.lx{
.lx {
width: 120px;
}
.cz{
.cz {
width: 150px;
}
.noData span{
.noData span {
color: #BBB;
}
}
......
......@@ -7,7 +7,8 @@
<el-tab-pane label="界址线" name="jzx"><jzx v-if="jzxVisible"></jzx></el-tab-pane>
<el-tab-pane label="登记簿" name="djb"><djb v-if="djbVisible"></djb></el-tab-pane>
<el-tab-pane label="历史回溯" name="lshs"><lshs v-if="lshsVisible"></lshs></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl"><fjcl v-if="fjclVisible"></fjcl></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl" @click="loading">
<fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
</el-tabs>
<!-- </div> -->
</template>
......@@ -38,6 +39,9 @@ export default {
};
},
methods: {
loading(){
this.$refs.fjcl.isUpload(this.$store.state.zdbsm)
},
handleClick(tab, event) {
// console.log(tab, event);
switch (tab.name) {
......@@ -59,7 +63,7 @@ export default {
case 'fjcl':
this.fjclVisible = true;
break;
default:
break;
}
......
......@@ -6,7 +6,7 @@
<el-tab-pane label="登记簿" name="djb"><djb></djb></el-tab-pane>
<el-tab-pane label="楼盘表" name="lpb"><lpb v-if="lpbLoad"></lpb></el-tab-pane>
<el-tab-pane label="历史回溯" name="lshs"><lshs></lshs></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl"><fjcl></fjcl></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl" @click="loading"><fjcl ref="fjcl"></fjcl></el-tab-pane>
</el-tabs>
</div>
</template>
......@@ -32,6 +32,9 @@ export default {
};
},
methods: {
loading(){
this.$refs.fjcl.isUpload(this.$store.state.zrzbsm);
},
handleClick(tab, event) {
if(!this.lpbLoad){
this.lpbLoad = tab.name == 'lpb' ? true : false
......