08c74968 by weimo934

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/zd/zddcb/index.vue
2 parents d078f4cd 9aa4e12e
......@@ -23,7 +23,15 @@
"color": "#f50325",
"width": 1
}
},
"importSymbol": {
"type": "simple-fill",
"color": [ 245,3, 37, 0.4 ],
"style": "none",
"outline": {
"color": "#006cff",
"width": 2
}
}
}
}
\ No newline at end of file
......
......@@ -284,6 +284,7 @@
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
@blur="inputBlur($event,true)"
@input="startTime(index,childIndex)"
>
</el-date-picker>
......@@ -332,6 +333,7 @@
value-format="yyyy-MM-dd"
:picker-options="childItem.pickerEnd"
placeholder="选择日期"
@blur="inputBlur($event,true)"
@input="endTime(index,childIndex)"
>
</el-date-picker>
......@@ -429,7 +431,6 @@ export default {
},
created() {},
mounted(){
console.log(this.formData,'formData');
},
methods: {
startTime(index,childIndex){
......@@ -452,7 +453,6 @@ export default {
}
},
sumTime(index,childIndex,syqx,e){
console.log(e,'eeee');
this.$refs.syqx.forEach((item,index)=>{
if(item.value == syqx){
this.$refs.tdsyjssj[index].$el.style.border=""
......@@ -567,13 +567,10 @@ export default {
});
},
getQlxzDataList() {
console.log(this.countList,'this.countList');
return this.countList;
},
getRules(){
let rules = [];
console.log(this.$refs.tdsyqssj,'this.$refs.qlxzdm');
console.log(this.countList,'this.countList');
let temp = 0;
this.countList.forEach((item,index)=>{
rules.push({
......@@ -599,9 +596,6 @@ export default {
rule: /^\s*$/g, //非空
},
)
if (ind == item.list.length-1) {
temp += item.list.length;
}
if(this.hasSyqx){
rules.push(
{
......@@ -613,6 +607,9 @@ export default {
}
)
}
if (ind == item.list.length-1) {
temp += item.list.length;
}
})
})
this.rulesResult = true;
......@@ -664,6 +661,18 @@ export default {
// },
},
watch:{
countList: {
handler : function (newVal, oldVal) {
newVal.forEach((item,ind)=>{
if(item.qlxzdm != ''){
this.$refs.qlxzdm[ind].$el.style.border=""
}
})
},
deep:true
} ,
}
};
</script>
<style lang="less">
......
......@@ -175,31 +175,35 @@ export default {
// 左键双击事件
dbclick(item) {
clearTimeout(this.time);
if(item.type == 'zd' || item.type == 'zrz' ||item.type == 'dz'){
//此处不要将$router移到if的外面,因为可能是双击行政区,就不知道去哪儿了
if (item.type == 'zd') {
this.$store.state.zdbsm = item.bsm;
this.$router.push({
path: '/'+item.type,
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm
}
});
}else if(item.type == 'zrz'){
this.$store.state.zrzbsm = item.bsm;
this.$router.push({
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm
}
});
}else if(item.type == 'dz'){
this.$store.state.dzbsm = item.bsm;
this.$router.push({
path: '/'+item.type,
query:{
source: 2,
bsm:item.bsm
}
});
}
// if (item.type == 'zd') {
// this.$router.push({
// path: '/zd',
// query:{
// source: 2,
// bsm:item.bsm
// }
// });
// }else if(item.type == 'zrz'){
// this.$router.push({
// path: '/zrz',
// query:{
// bsm:item.bsm
// }
// });
// }
},
closeMenu() {
this.$emit("changeVisible", false);
......
......@@ -101,7 +101,8 @@
<li v-show="zdData.type == 'zdy'" @click="deleteZdy">删除</li>
</ul>
<el-dialog title="导入图形" :visible.sync="improtDialog">
<!--@close="closeImportDialog"-->
<el-dialog title="导入图形" :modal="false" :close-on-click-modal="false" custom-class="importDialog" :visible.sync="improtDialog" width="30%" @close="closeImportDialog">
<import-geo :property-info="zdData" :timeLine="new Date().getTime()" :geo-info="currentClickZdGeo" @closeImportDialog="closeImportDialog"></import-geo>
</el-dialog>
<!-- 添加定着物弹框 -->
......@@ -263,6 +264,8 @@ export default {
this.$store.state.zdbsm = this.zdData.zdbsm;
if(this.zdData.type == 'dz'){
this.$store.state.dzbsm = this.zdData.bsm;
}else{
this.$store.state.dzbsm = '';
}
},
//关闭添加定着物弹框
......@@ -439,6 +442,7 @@ export default {
}else {
BSM = this.zdData.bsm;
}
//当确定导入图形是 跳转到图形界面
this.queryGeoByBsm(BSM,type,function (features){
if(features && features.length > 0){
if(features[0].geometry){
......@@ -447,6 +451,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
self.postionToMap();
self.improtDialog = true;
self.currentClickZdGeo = features[0];
}).catch(() => {
......@@ -456,11 +461,13 @@ export default {
});
});
}else {
self.postionToMap();
self.currentClickZdGeo = features[0];
self.improtDialog = true;
}
}else{
self.postionToMap();
self.currentClickZdGeo = null;
self.improtDialog = true;
}
......@@ -509,7 +516,6 @@ export default {
}).then(res => {
debugger
});*/
}else{
self.$message.warning("暂无空间信息!!!!");
}
......@@ -583,6 +589,7 @@ export default {
//关闭图形弹框
closeImportDialog(){
this.improtDialog = false;
this.clearOverLayer();
}
},
......@@ -731,4 +738,8 @@ export default {
center;
background-size: contain;
}
/deep/ .importDialog{
margin-top: 120px!important;
margin-left: 291px;
}
</style>
......
......@@ -38,19 +38,18 @@
esriMap
]) => {
var map = new esriMap({
basemap:"hybrid"
basemap:"osm"
});
//108.95 34.27
var view = new MapView({
container: self.viewId,
map: map,
zoom:10,
zoom:10,
center: [-0.154133333770497,0.6138183594020817],
spatialReference: {
wkid: 102100
}
});
center: [-0.154133333770497,0.6138183594020817],
spatialReference: {
wkid: 102100
}
});
maps[self.viewId] = view;
if(self.afterLoaderFunction && typeof self.afterLoaderFunction == 'function'){
self.afterLoaderFunction(view);
......
......@@ -24,7 +24,7 @@ export default {
identifyParameters.tolerance = tolerance ? tolerance : 3;
identifyParameters.mapExtent = mapExtent ? mapExtent : geometry.extent;
identifyParameters.returnGeometry = returnGeometry ? returnGeometry : false;
//identifyParameters.returnFieldName = false;
//identifyParameters.returnFieldName = true;
identifyParameters.spatialReference = geometry.spatialReference;
identifyTask.execute(identifyParameters).then(result => {
if(callBackFunction && typeof callBackFunction == 'function'){
......
......@@ -22,20 +22,29 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
var geo = null;
if(graphic.geometry.type == 'point'){
geo = new Point(graphic.geometry);
}else if(graphic.geometry.type == 'polyline'){
geo = new Polyline(graphic.geometry);
}else if(graphic.geometry.type == 'polygon'){
geo = new Polygon(graphic.geometry);
var saveGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
if(!graphic[i].geometry){
geo = null;
}else if(graphic[i].geometry.type == 'point'){
geo = new Point(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polyline'){
geo = new Polyline(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polygon'){
geo = new Polygon(graphic[i].geometry);
}
var saveGraphic = new Graphic({
attributes:graphic[i].attributes,
geometry:geo
});
saveGraphics.push(saveGraphic);
}
var saveGraphic = new Graphic({
attributes:graphic.attributes,
geometry:geo
});
featureLayer.applyEdits({
addFeatures:[saveGraphic]
addFeatures:saveGraphics
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
......@@ -62,20 +71,30 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
var geo = null;
if(graphic.geometry.type == 'point'){
geo = new Point(graphic.geometry);
}else if(graphic.geometry.type == 'polyline'){
geo = new Polyline(graphic.geometry);
}else if(graphic.geometry.type == 'polygon'){
geo = new Polygon(graphic.geometry);
var updGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
if(!graphic[i].geometry){
geo = new Polygon();
}else if(graphic[i].geometry.type == 'point'){
geo = new Point(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polyline'){
geo = new Polyline(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polygon'){
geo = new Polygon(graphic[i].geometry);
}
var updGraphic = new Graphic({
attributes:graphic[i].attributes,
geometry:geo
});
updGraphics.push(updGraphic);
}
var updGraphic = new Graphic({
attributes:graphic.attributes,
geometry:geo
});
featureLayer.applyEdits({
updateFeatures:[updGraphic]
updateFeatures:updGraphics
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
......@@ -102,21 +121,31 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
var geo = null;
if(graphic.geometry.type == 'point'){
geo = new Point(graphic.geometry);
}else if(graphic.geometry.type == 'polyline'){
geo = new Polyline(graphic.geometry);
}else if(graphic.geometry.type == 'polygon'){
geo = new Polygon(graphic.geometry);
var delGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
}
for(var i = 0;i < graphic.length;i++){
var geo = null;
if(!graphic[i].geometry){
geo = null;
}else if(graphic[i].geometry.type == 'point'){
geo = new Point(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polyline'){
geo = new Polyline(graphic[i].geometry);
}else if(graphic[i].geometry.type == 'polygon'){
geo = new Polygon(graphic[i].geometry);
}
var delGraphic = new Graphic({
attributes:graphic[i].attributes,
geometry:geo
});
delGraphics.push(delGraphic);
}
var delGraphic = new Graphic({
attributes:graphic.attributes,
geometry:geo
});
featureLayer.applyEdits({
deleteFeatures:[delGraphic]
deleteFeatures:delGraphics
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
......
......@@ -28,7 +28,7 @@ export default{
where += " and ";
}
if(Array.isArray(parames[i].value)){
where += parames[i].name + " in (" + parames[i].value.toString + ")";
where += parames[i].name + " in (" + parames[i].value.toString() + ")";
}else if(typeof parames[i].value == 'number'){
where += parames[i].name + " =" + parames[i].value ;
}else{
......
......@@ -169,6 +169,8 @@ export default {
this.getRightTreeByZrzbsm(this.$store.state.zrzbsm);
}else if(newPath == "/dz"){
this.getRightTreeByDzbsm(this.$store.state.dzbsm);
}else if(newPath == "/h"){
this.getRightTreeByHbsm(this.$store.state.hbsm);
} else if(newPath == "/viewMap"){
this.isMap = true;
if(this.$route.query.type == "zd"){
......@@ -329,6 +331,14 @@ export default {
});
},
getRightTreeByHbsm(bsm) {
getTreeByBsm(bsm,"h").then((res) => {
if (res.success) {
this.pd = res.result;
}
});
},
sortNavigation(data, selectId) {
let headTop = this.headTop;
data.forEach((item, index) => {
......
......@@ -290,8 +290,9 @@ export default {
//todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
this.$refs['ruleForm1'].validate((valid) => {
if (valid) {
this.ruleForm1.zdbsm = this.$store.state.zdbsm != '' ? this.$store.state.zdbsm : '';
this.ruleForm1.dzbsm = this.$store.state.dzbsm != '' ? this.$store.state.dzbsm : '';
this.ruleForm1.zdbsm = this.auth ? this.$store.state.zdbsm : '';
this.ruleForm1.dzbsm = this.auth ? this.$store.state.dzbsm : '';
insertZrzjbxx(this.ruleForm1)
.then((res) => {
if (res.code == "200") {
......
......@@ -6,6 +6,7 @@
:data="tableData"
:height="tableHeight"
:row-class-name="tableRowClassName"
@row-dblclick="doubleClick"
>
<el-table-column type="index" width="80" align="center" label="序号">
</el-table-column>
......@@ -81,6 +82,9 @@
methods: {
onSubmit() {
},
doubleClick(row, column, event){
this.handleClick(row);
},
tableRowClassName({row, rowIndex}) {
if (rowIndex % 2 !== 0) {
return "even-row";
......
......@@ -76,15 +76,20 @@ export default {
},
mixins:[mapLayerManager,findTask],
mounted(){
var query = this.$route.query;
if(query && JSON.stringify(query) != "{}"){
//self.addGeoByBsm(query.bsm,query.type,self.viewId);
if(query.type == 'zd'){
this.getRightTree(query.bsm)
}else if(query.type == 'zrz'){
this.getRightTreeByZrzbsm(query.bsm);
var query = this.$route.query
var self = this;
setTimeout(function () {
if(query && JSON.stringify(query) != "{}"){
//self.addGeoByBsm(query.bsm,query.type,self.viewId);
if(query.type == 'zd'){
self.getRightTree(query.bsm)
}else if(query.type == 'zrz'){
self.getRightTreeByZrzbsm(query.bsm);
}
}
}
},500);
},
methods:{
......@@ -93,9 +98,9 @@ export default {
var view = maps[this.viewId];
view.ui.remove('zoom');
loadModules([
"esri/layers/MapImageLayer",
"esri/layers/MapImageLayer"
]).then(([
MapImageLayer,
MapImageLayer
])=>{
var mapImageLayer = new MapImageLayer({
url:self.layerUrl,
......@@ -137,9 +142,11 @@ export default {
},
//图层选择事件
selectLayerChange(){
debugger
var self = this;
this.features = [];
var layerAndResult = this.results.filter(function (item) {
return item.layerId = self.selectResLayerId;
return item.layerId == self.selectResLayerId;
})
if(layerAndResult){
this.features = layerAndResult[0].features;
......
......@@ -79,12 +79,12 @@ export default {
return;
}
for(var i = 0;i < searchResult.length;i++){
var layer = view.map.findLayerById("searchResult"+searchResult.layerName);
var layer = view.map.findLayerById("searchResult"+searchResult[i].layerId);
if(layer){
layer.removeAll();
}else{
layer = new GraphicsLayer({
id:"searchResult"+searchResult.layerName
id:"searchResult"+searchResult[i].layerId
})
view.map.add(layer);
}
......
......@@ -627,7 +627,6 @@ export default {
updateZDxx(formData) {
//获取权利性质数据
this.formData.list = this.$refs.qlxzModule.getQlxzDataList();
this.$refs.qlxzModule.getRules();
console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()');
//判断容密高是否为区间值,如果是区间值,则将输入框的值赋予
this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl;
......@@ -689,14 +688,8 @@ export default {
rule: /^\s*$/g, //非空
},
]
//判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致)
if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){
this.$message({
message: '宗地代码或不动产单元号有误,请核对后再试一次',
type: "warning",
});
}else{
// console.log(this.rules,'rules');
this.$refs.qlxzModule.getRules();
let flag = true;
this.rules.forEach(item=>{
if(item.rule.test(item.data) || item.data == null){
......@@ -717,47 +710,55 @@ export default {
}
})
this.$nextTick(()=>{
if(flag){
if(flag && this.$refs.qlxzModule.getRulesResult()){
//宗地面积处理
// console.log(this.formData.zdmj,'this.formData.zdmj');
// this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'')
updateQjZdjbxx(this.formData)
.then((res) => {
if (res.code == 200) {
console.log(res);
this.$message({
message: '保存成功',
type: "success",
});
// 保存成功再次查询
this.getZdjbxxData(this.$store.state.zdbsm);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
})
.catch((error) => {});
//保存到空间库里面
var self = this;
for(var key in this.geoAttributes){
if(key == "BSM"){
self.geoAttributes[key] = this.$store.state.zdbsm
}else if(key == 'QLSDFS'){
var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs;
var qlsdfs = qlsdfsList.filter(item => {
return item.bsm == value;
//判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致)
if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){
this.$message({
message: '宗地代码或不动产单元号有误,请核对后再试一次',
type: "warning",
});
}else{
updateQjZdjbxx(this.formData)
.then((res) => {
if (res.code == 200) {
console.log(res);
this.$message({
message: '保存成功',
type: "success",
});
// 保存成功再次查询
this.getZdjbxxData(this.$store.state.zdbsm);
} else {
this.$message({
message: res.message,
type: "warning",
});
}
})
self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:"";
}else {
var formKay = key.toLowerCase();
self.geoAttributes[key] = self.formData[formKay];
.catch((error) => {});
//保存到空间库里面
var self = this;
for(var key in this.geoAttributes){
if(key == "BSM"){
self.geoAttributes[key] = this.$store.state.zdbsm
}else if(key == 'QLSDFS'){
var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs;
var qlsdfs = qlsdfsList.filter(item => {
return item.bsm == value;
})
self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:"";
}else {
var formKay = key.toLowerCase();
self.geoAttributes[key] = self.formData[formKay];
}
}
self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) {
console.log("属性保存完成!!");
});
}
self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) {
console.log("属性保存完成!!");
});
}else{
this.$message({
// message: item.name+'不能为空',
......@@ -767,11 +768,6 @@ export default {
}
})
}
},
inputBlur(e){
if(e.target.value!=''){
......@@ -886,6 +882,17 @@ export default {
this.getZdjbxxData(val)
this.curZdbsm = val;
},
"formData.bdcdyh":function (val) {
if (val != '') {
this.$refs.bdcdyh.style.border = '';
}
},
"formData.zddm":function (val) {
if (val != '') {
this.$refs.zddm.style.border = '';
}
}
},
"$store.state.sxdrType": function (val) {
debugger
this.$message.success(val);
......@@ -893,7 +900,6 @@ export default {
this.getZdjbxxData(this.$store.state.zdbsm)
}
},
},
};
</script>
<style lang="less" scoped>
......
......@@ -2,7 +2,7 @@
<div ref="lpb" class="content_box">
<el-tabs v-model="activeName" class="tabs" @tab-click="handleClick">
<el-tab-pane label="自然幢信息" name="zrzxx"><zrzxx></zrzxx></el-tab-pane>
<el-tab-pane label="业主共有" name="yzgy"><yzgy></yzgy></el-tab-pane>
<el-tab-pane label="业主共有" name="yzgy"><yzgy v-if="yzgyLoad"></yzgy></el-tab-pane>
<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>
......@@ -28,6 +28,7 @@ export default {
return {
activeName: "zrzxx",
lpbLoad:false, //默认不加载楼盘表组件
yzgyLoad:false,
};
},
methods: {
......@@ -35,6 +36,9 @@ export default {
if(!this.lpbLoad){
this.lpbLoad = tab.name == 'lpb' ? true : false
}
if(!this.yzgyLoad){
this.yzgyLoad = tab.name == 'yzgy' ? true : false
}
},
},
created() {},
......
<template>
<div class="">
<div class="main">
<table border="1">
<tr>
<td colspan="3">宗地代码</td>
<td colspan="4"><input type="text" class="formInput" v-model="zddm " disabled/></td>
</tr>
<tr>
<td colspan="3">建筑物区分所有权业主共有部分权利人</td>
<td colspan="4"><input type="text" class="formInput" v-model="Data.qlr" disabled/></td>
</tr>
</table>
<table border="1">
<tr>
<td>
<el-button
type="primary"
class="changeBtn outAdd addMinus"
@click="addRow"
>+</el-button
>
</td>
<td>建(构)筑物编号</td>
<td>建(构)筑物数量</td>
<td>建(构)筑物面积(㎡)</td>
<td>占地面积(㎡)</td>
<td>分摊土地面积(㎡)</td>
<td>附记</td>
</tr>
<tr v-for="(item,i) in Data.list" :key="i">
<td>
<el-button
type="primary"
class="changeBtn outMinus addMinus"
@click="delRow(i)"
>-</el-button
>
</td>
<td><el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input></td>
<td><el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d*/g)) || null" placeholder="请输入建(构)筑物数量"></el-input></td>
<td><el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入建(构)筑物面积(㎡)"></el-input></td>
<td><el-input v-model="item.zdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入占地面积(㎡)"></el-input></td>
<td><el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入分摊土地面积(㎡)"></el-input></td>
<td><el-input v-model="item.fj" placeholder="请输入附记"></el-input></td>
</tr>
<!-- <tr>
<td>统计</td>
<td>{{sumTdsyqsyqmj}}</td>
<td>{{sumDydytdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
</tr>-->
</table>
<div class="pers">
<el-button @click="save" type="primary">保存</el-button>
</div>
<div class="main" ref="mainBox">
<table border="1">
<tr>
<td colspan="3">宗地代码</td>
<td colspan="4"><input type="text" class="formInput" v-model="zddm " disabled/></td>
</tr>
<tr>
<td colspan="3">建筑物区分所有权业主共有部分权利人</td>
<td colspan="4"><input type="text" class="formInput" v-model="Data.qlr" disabled/></td>
</tr>
</table>
<table border="1">
<tr>
<td>
<el-button
type="primary"
class="changeBtn outAdd addMinus"
@click="addRow"
>+</el-button
>
</td>
<td>建(构)筑物编号</td>
<td>建(构)筑物数量</td>
<td>建(构)筑物面积(㎡)</td>
<td>占地面积(㎡)</td>
<td>分摊土地面积(㎡)</td>
<td>附记</td>
</tr>
<tr v-for="(item,i) in Data.list" :key="i">
<td>
<el-button
type="primary"
class="changeBtn outMinus addMinus"
@click="delRow(i)"
>-</el-button
>
</td>
<td><el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input></td>
<td><el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d*/g)) || null" placeholder="请输入建(构)筑物数量"></el-input></td>
<td><el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入建(构)筑物面积(㎡)"></el-input></td>
<td><el-input v-model="item.zdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入占地面积(㎡)"></el-input></td>
<td><el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d*(\.?\d{0,3})/g)[0]) || null" placeholder="请输入分摊土地面积(㎡)"></el-input></td>
<td><el-input v-model="item.fj" placeholder="请输入附记"></el-input></td>
</tr>
<!-- <tr>
<td>统计</td>
<td>{{sumTdsyqsyqmj}}</td>
<td>{{sumDydytdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
<td>{{sumFttdmj}}</td>
</tr>-->
</table>
<!-- <div class="pers">
<el-button @click="save" type="primary">保存</el-button>
</div> -->
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="save">保存</el-button>
</div>
</div>
</template>
......@@ -83,7 +84,8 @@
fttdmj: '', //分摊土地面积
fj: ''
}]
}
},
mainBoxWidth:0
}
},
......@@ -127,10 +129,12 @@
console.log("create init...")
},
mounted() {
console.log("mounted init...")
// console.log(this.$refs.mainBox.clientWidth,"this.$refs.mainBox.clientWidth")
this.Data.glbsm = this.$store.state.zrzbsm
this.zddm = this.$store.state.zddm
this.getData(this.Data.glbsm)
this.$nextTick(() => {
this.mainBoxWidth = this.$refs.mainBox.clientWidth;
})
},
watch: {
"$store.state.zdbsm": function (bsm) {
......@@ -147,7 +151,7 @@
box-sizing: border-box;
padding: 18px;
height: auto;
width: 80%;
width: 100%;
}
table {
......@@ -186,4 +190,22 @@
.dzwsl {
width: 200px;
}
.header-button {
height: 50px;
position: fixed;
bottom: 0;
right: 0;
text-align: center;
background-color: #ffffff;
.saveBtn {
background-color: #00CACD;
border-color: #00CACD;
padding: 10px 30px;
margin-top: 8px;
}
.saveBtn:hover {
background-color: rgba(0, 202, 205, .8);
border-color: rgba(0, 202, 205, .8);
}
}
</style>
......
<template>
<div class="main">
<div class="main" ref="mainBox">
<div class="formMenu">
<Qlr ref="qlrxxModule" :bsm="bsm" :qszt="form.qszt"></Qlr>
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="zrzTable">
......@@ -43,7 +43,7 @@
<tr>
<td colspan="2" >房屋性质<i class="requisite">*</i></td>
<td colspan="4" >
<el-select class="formSelect" ref="fwxz" @blur="inputBlur($event)" :disabled="form.qszt!='0'" v-model="form.fwxzbsm" placeholder="请选择" >
<el-select class="formSelect" ref="fwxz" :disabled="form.qszt!='0'" v-model="form.fwxzbsm" placeholder="请选择" >
<el-option
v-for="item in $store.state.fwxzOptions"
:key="item.bsm"
......@@ -156,7 +156,6 @@
<td colspan="3" >
<el-select-tree style="width:100%"
ref="ghyt"
@blur="inputBlur($event)"
v-if="show"
:default-expand-all="defaultExpandAll"
:multiple="multiple"
......@@ -173,7 +172,6 @@
<td colspan="4" >
<el-select-tree style="width:100%"
ref="yt"
@blur="inputBlur($event)"
v-if="show"
:default-expand-all="defaultExpandAll"
:multiple="multiple"
......@@ -198,7 +196,7 @@
<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;删除</span>
</td>
<td colspan="9" >
<el-select class="persent78" ref="fwjg" @blur="inputBlur($event)" :disabled="form.qszt!='0'" v-model="item1.fwjgzdbsm" placeholder="请选择" >
<el-select class="persent78" ref="fwjg" :disabled="form.qszt!='0'" v-model="item1.fwjgzdbsm" placeholder="请选择" >
<el-option
v-for="item in $store.state.jgOptions"
:key="item.bsm"
......@@ -266,10 +264,11 @@
</tr>
</table>
<div style="min-height: 40px;text-align: center;margin-top: 10px">
<el-button type="success" @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="onSave">保存</el-button>
<el-button type="primary" @click="onSubmit">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
<!-- <el-button type="primary" class="saveBtn" @click="save">保存</el-button> -->
</div>
</div>
</div>
......@@ -398,6 +397,7 @@
BSM:"",
},
rules:[],
mainBoxWidth:0,
}
},
methods: {
......@@ -491,13 +491,13 @@
this.form.fwytList.forEach((item,index)=>{
this.rules.push(
{
data:this.form.fwytList[index].ghyt,
data:item.fwytzdbsm,
name:'规划用途',
dom:this.$refs.ghyt[index],
rule: /^\s*$/g, //非空
},
{
data:this.form.fwytList[index].yt,
data:item.fwytzdbsm,
name:'用途',
dom:this.$refs.yt[index],
rule: /^\s*$/g, //非空
......@@ -507,7 +507,7 @@
this.form.fwjgList.forEach((item,index)=>{
this.rules.push(
{
data:this.form.fwjgList[index].fwjg,
data:item.fwjgzdbsm,
name:'房屋结构',
dom:this.$refs.fwjg[index],
rule: /^\s*$/g, //非空
......@@ -519,7 +519,6 @@
this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList();
this.$refs.qlxzModule.getRules();
let flag = true;
console.log(this.rules,'this.rules');
this.rules.forEach(item=>{
if(item.rule.test(item.data) || item.data == null){
if(item.dom.$el){
......@@ -534,7 +533,7 @@
}
})
this.$nextTick(()=>{
if (flag) {
if (flag && this.$refs.qlxzModule.getRulesResult()) {
if(this.form.zrzh.substring(0,19) != this.form.zddm || this.form.bdcdyh.substring(0,19) != this.form.zddm){
this.$message({
message: '自然幢号或不动产单元号有误,请核对后再试一次',
......@@ -542,15 +541,15 @@
});
}else{
saveZrzInfo(this.form).then((res)=>{
if(res.code===200){
this.$message.success("保存完成!")
}else {
this.$message({
message: res.message,
type: "warning",
});
}
this.loading=false;
if(res.code===200){
this.$message.success("保存完成!")
}else {
this.$message({
message: res.message,
type: "warning",
});
}
this.loading=false;
})
this.loading=false;
......@@ -718,7 +717,11 @@
this.getZrzDetailByBsm(this.$route.query.bsm)
}
},
mounted() {},
mounted() {
this.$nextTick(() => {
this.mainBoxWidth = this.$refs.mainBox.clientWidth;
})
},
computed: {
zrzbsm() {
return this.$store.state.zdbsm;
......@@ -727,7 +730,46 @@
watch:{
zrzbsm:function (val) {
this.reload()
}
},
"form.bdcdyh":function (val) {
if (val != '') {
this.$refs.bdcdyh.style.border = '';
}
},
"form.zrzh":function (val) {
if (val != '') {
this.$refs.zrzh.style.border = '';
}
},
"form.fwxzbsm":{
handler:function (val) {
if (val != '') {
this.$refs.fwxz.$el.style.border = '';
}
},
immediate:false
},
"form.fwytList": {
handler : function (newVal, oldVal) {
newVal.forEach((item,ind)=>{
if(item.fwytzdbsm != ''){
this.$refs.ghyt[ind].$el.style.border=""
this.$refs.yt[ind].$el.style.border=""
}
})
},
deep:true
},
"form.fwjgList": {
handler : function (newVal, oldVal) {
newVal.forEach((item,ind)=>{
if(item.fwjgzdbsm != ''){
this.$refs.fwjg[ind].$el.style.border=""
}
})
},
deep:true
},
}
}
</script>
......@@ -739,6 +781,7 @@
.formMenu {
width: 100%;
margin: 0 auto;
margin-bottom: 50px;
}
.zrzTable {
margin: 10px 0;
......@@ -792,5 +835,26 @@
width: 100%;
}
}
.header-button {
height: 50px;
position: fixed;
bottom: 0;
right: 6px;
text-align: center;
background-color: #ffffff;
.el-button{
padding: 10px 30px;
margin-top: 8px;
cursor: pointer;
}
.saveBtn {
background-color: #00CACD;
border-color: #00CACD;
}
.saveBtn:hover {
background-color: rgba(0, 202, 205, .8);
border-color: rgba(0, 202, 205, .8);
}
}
}
</style>
......