f878c561 by 焦泽平
2 parents e6510ec8 ca5e8fae
......@@ -48,7 +48,7 @@
label="不动产权证号">
</el-table-column>
<el-table-column
prop="qlr"
prop="qlrmc"
label="权利人">
</el-table-column>
<el-table-column
......@@ -72,10 +72,10 @@
<el-col :span="7" style="display: inline-block;">
<el-select v-model="dzhbhData.xzqbsm" value-key="xzqbsm" placeholder="行政区" @change="changeXzq(dzhbhData.xzqbsm)" disabled>
<el-option
v-for="item in xzq"
:key="item.bsm"
:label="item.mc"
:value="item.bsm">
v-for="xzqItem in xzq"
:key="xzqItem.bsm"
:label="xzqItem.mc"
:value="xzqItem.bsm">
</el-option>
</el-select>
</el-col>
......@@ -83,10 +83,10 @@
<el-col :span="7">
<el-select v-model="dzhbhData.djqbsm" placeholder="地籍区" @change="changeDjq(dzhbhData.djqbsm)" disabled>
<el-option
v-for="item in djq"
:key="item.bsm"
:label="item.mc"
:value="item.bsm">
v-for="djqItem in djq"
:key="djqItem.bsm"
:label="djqItem.mc"
:value="djqItem.bsm">
</el-option>
</el-select>
</el-col>
......@@ -94,10 +94,10 @@
<el-col :span="8">
<el-select v-model="dzhbhData.djzqbsm" placeholder="地籍子区" @change="$forceUpdate()" disabled>
<el-option
v-for="item in djzq"
:key="item.bsm"
:label="item.mc"
:value="item.bsm">
v-for="djzqItem in djzq"
:key="djzqItem.bsm"
:label="djzqItem.mc"
:value="djzqItem.bsm">
</el-option>
</el-select>
</el-col>
......
......@@ -750,6 +750,7 @@
background-color: white;
padding: 10px 0;
margin-bottom: 10px;
border: 1px solid #E6E6E6;
}
.tips{
color: #9B9B9B;
......
......@@ -77,7 +77,11 @@
></div>
<div
v-if="item.children==null"
class="reTree_icon reTree_expand_icon"
class="reTree_icon"
:class="{
reTree_default_icon: item.dm != 'G' && item.dm != 'J' && item.dm != 'Z',
reTree_expand_icon: item.dm == 'G' || item.dm == 'J' || item.dm == 'Z',
}"
:style="{
height: (size || 16 * 1.2) + 'px',
width: (size || 16 * 1.2) + 'px',
......
......@@ -16,7 +16,7 @@
}"
@click="itemClick(item)"
>
<div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">{{ item.mc }}</div><div
class="reTree_icon"
:style="{
......@@ -73,7 +73,7 @@
<li @click="drsx" :class="zdQszt=='0'?'':'noEdit'">导入属性</li>
<li @click="dcsx">导出属性</li>
<li v-show="!isZD">导入楼盘</li>
<li>重叠分析</li>
<!-- <li>重叠分析</li> -->
<li v-show="isZD && (zdQszt == '1' || zdQszt == '2')" @click="openCreateDialog('dzw')">添加定着物</li>
<li v-show="isZD && (zdQszt != '1' && zdQszt != '2')" class="noEdit">添加定着物</li>
<li @click="deleteByBsm()">删除</li>
......@@ -229,7 +229,12 @@ export default {
methods: {
dcsx(){
console.log(this.zdData,'zdData')
window.open(`api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`)
// window.open(`api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`)
let url= `api/tx/excelGeo/export?bsm=${this.zdData.bsm}&type=${this.zdData.type}`
let elemIF = document.createElement("iframe");
elemIF.src = url;
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
drsx(){
if (this.zdQszt!='0') {
......@@ -836,8 +841,8 @@ export default {
center;
background-size: contain;
}
/deep/ .importDialog{
margin-top: 120px!important;
margin-left: 291px;
}
/* /deep/ .importDialog{
margin-top: 120px!important;
margin-left: 291px;
} */
</style>
......
<template>
<div >
<div v-if="!resultDialog && !txtResultDialog && !dealDialog" class="importDiv">
<ul class="importDiv" v-if="!resultDialog && !txtResultDialog && !dealDialog">
<li>
<el-upload
class="avatar-uploader"
action="#"
accept=".txt"
:auto-upload="false"
:show-file-list="false"
:on-change="txtFileChange"
>
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<i class="iconfont iconshangchuan"></i>
<div class="title">TXT文本格式</div>
<div class="templateDowload">
<a href="#" @click.stop="downloadFile('./fileTemplate/txttemplet.txt','txttemplet.txt')">TXT模板下载</a>
</div>
</el-upload>
</li>
<li>
<el-upload
class="upload-demo"
action="#"
accept=".txt"
:auto-upload="false"
:show-file-list="false"
:on-change="txtFileChange"
>
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<div class="fileUpload">
<div slot="trigger" class="uploadLeft">
<i class="iconfont icontxt"></i>
</div>
<div solt="tip" class="uploadRight">
<div solt="tip" class="title">TXT文本格式</div>
<div class="el-upload__tip" slot="tip">支持TXT文本格式,点击查看详情<a class="down" href="#" @click.stop="downloadFile('./fileTemplate/txttemplet.txt','txttemplet.txt')" >文本详情</a></div>
</div>
</div>
</el-upload>
<el-upload
class="upload-demo"
class="avatar-uploader"
action="/api/tx/shpUtils/readShp"
accept=".zip"
:show-file-list="false"
:on-success="shpFileSuccess"
>
<!--<el-button size="small" type="primary">点击上传</el-button>-->
<div class="fileUpload">
<div slot="trigger" class="uploadLeft">
<i class="iconfont iconzip"></i>
</div>
<div solt="tip" class="uploadRight">
<div solt="tip" class="title">ESRI Shape文件格式</div>
<div slot="tip" class="el-upload__tip">文件包含.shp、.pdf、.shx、.prj等的压缩文件(.zip)</div>
</div>
</div>
<i class="iconfont iconshangchuan"></i>
<div class="title">ESRI Shape文件格式</div>
</el-upload>
</li>
<li>
<el-upload
class="upload-demo"
class="avatar-uploader"
action="https://jsonplaceholder.typicode.com/posts/"
accept=".dwg,.dxf"
:show-file-list="false"
:on-success="cadFileSuccess"
>
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
<div solt="tip" class="fileUpload">
<div slot="trigger" class="uploadLeft">
<i class="iconfont icondaoruCAD"></i>
</div>
<div solt="tip" class="uploadRight">
<div solt="tip" class="title">CAD文件</div>
<div slot="tip" class="el-upload__tip">支持.dwg、.dxf文件格式</div>
</div>
</div>
<i class="iconfont iconshangchuan"></i>
<div class="title">CAD文件</div>
</el-upload>
</li>
<li>
<el-upload
class="upload-demo"
class="avatar-uploader"
action="/api/tx/excelGeo/readExcel"
accept=".xls,.xlsx"
:show-file-list="false"
:on-success="excelFileSuccess"
>
<!--<el-button size="small" type="primary">点击上传</el-button>-->
<div solt="tip" class="fileUpload">
<div slot="trigger" class="uploadLeft">
<i class="iconfont iconexcel"></i>
</div>
<div solt="tip" class="uploadRight">
<div slot="tip" class="title">Excel文件格式</div>
<div class="el-upload__tip" slot="tip">.xls、.xlsx版本,点击查看详情<a class="downloadFile" @click.stop="downloadFile('./fileTemplate/exceltemplet.xlsx','exceltemplet.xlsx')" href="#">Excel格式</a></div>
</div>
<i class="iconfont iconshangchuan"></i>
<div class="title">Excel文件格式</div>
<div class="templateDowload">
<a href="#" @click.stop="downloadFile('./fileTemplate/exceltemplet.xlsx','exceltemplet.xlsx')">Excel模板下载</a>
</div>
</el-upload>
</div>
</li>
</ul>
<div v-if="resultDialog">
<el-form :model="zdForm" ref="zdCheckForm" label-width="100px" size="small" @submit.native.prevent class="demo-ruleForm">
<el-form-item
......@@ -668,33 +654,45 @@ export default {
}
</script>
<style scoped lang="less">
.upload-demo{
line-height: 34px;
.importDiv{
display: flex;
justify-content:center;
align-content:center;
li{
margin: 5px;
width: 50%;
.title{
line-height: 1;
margin-top: -57px;
font-size: 14px;
}
.templateDowload{
line-height: 1;
margin-top: 7px;
a{
color: #409eff;
}
}
}
}
.fileUpload{
height: 100%;
width: 100%;
.uploadLeft{
float: left;
line-height: 61px;
.iconfont{
font-size: 42px;
}
/deep/ .avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
width: 100%;
height: 178px;
line-height: 178px;
}
.uploadRight{
float: right;
margin-left: 5px;
.title{
text-align: initial;
font-weight: 600;
}
.el-upload__tip{
margin-top: 0px;
a{
color: cornflowerblue;
}
}
/deep/ .avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
/deep/ .iconfont {
font-size: 20px;
color: #8c939d;
width:100%;
text-align: center;
}
}
</style>
\ No newline at end of file
......
......@@ -170,7 +170,7 @@ export default {
view.zoom = 15;
}
}else {
this.$message.warning("暂无图形信息!!!");
this.$message.success("暂无图形信息!!!");
}
},
//导入空间图形是 先判断数据是否跨界
......
<template>
<div class="lshs-content">
<!-- <div class="slot">-->
<!-- <div><span class="tip-title">范围属性变更:</span></div>-->
<!-- <div><span class="tip-title">宗地分割:</span></div>-->
<!-- <div><span class="tip-title">宗地合并:</span></div>-->
<!-- </div>-->
<div id="mountNode" ref="containerWidth"></div>
<div id="mountNodeRight"></div>
</div>
</template>
<script>
import G6 from '@antv/g6';
import insertCss from 'insert-css';
import { getLshs } from "@api/fwsxbg";
export default {
name:"",
components:{},
props:{},
data(){
insertCss(`
.g6-tooltip {
border-radius: 6px;
font-size: 12px;
color: #fff;
background-color: #000;
padding: 2px 8px;
text-align: center;
}
`);
return {
data : {}
}
},
created(){
},
mounted(){
this.getLshsData();
},
methods: {
initG6() {
const data = this.data;
const eWidth = this.$refs.containerWidth.clientWidth
console.log(eWidth+":width")
G6.registerNode(
'sql',
{
drawShape(cfg, group) {
const rect = group.addShape('rect', {
attrs: {
x: -100,
y: -25,
width: 200,
height: 50,
radius: 10,
stroke: '#5B8FF9',
fill: '#C6E5FF',
lineWidth: 1,
},
name: 'rect-shape',
});
if (cfg.name) {
group.addShape('text', {
attrs: {
text: cfg.name,
x: 0,
y: 0,
fill: '#00287E',
fontSize: 14,
textAlign: 'center',
textBaseline: 'middle',
fontWeight: 'bold',
},
name: 'text-shape',
});
}
return rect;
},
},
'single-node',
);
G6.registerEdge(
'polyline1',
{
afterDraw(cfg, group) {
console.log(cfg.data+":cfg")
console.log(group.toString()+"group")
},
},
'polyline',
);
const tooltip = new G6.Tooltip({
offsetX: 10,
offsetY: 10,
itemTypes: ['node', 'edge'],
getContent: (e) => {
const outDiv = document.createElement('div');
outDiv.style.width = 'fit-content';
outDiv.innerHTML = `
<ul>
<li> ${e.item.getModel().conf[0].label}:${e.item.getModel().conf[0].value}</li>
<li> ${e.item.getModel().conf[1].label}:${e.item.getModel().conf[1].value}</li>
<li> ${e.item.getModel().conf[2].label}:${e.item.getModel().conf[2].value}</li>
<li> ${e.item.getModel().conf[3].label}:${e.item.getModel().conf[3].value}</li>
<li> ${e.item.getModel().conf[4].label}:${e.item.getModel().conf[4].value}</li>
</ul>`
;
return outDiv;
},
});
const container = document.getElementById('mountNode');
console.log(container)
const graph = new G6.Graph({
container: 'mountNode',
width:eWidth,
height:1000,
layout: {
type: 'dagre',
nodesepFunc: (d) => {
return 100;
},
ranksep: 30,
controlPoints: true,
},
defaultNode: {
type: 'sql',
},
defaultEdge: {
type: 'polyline1',
style: {
radius: 10,
offset: 10,
// endArrow: true,
lineWidth: 2,
stroke: 'rgba(78,142,230,0.45)',
},
},
nodeStateStyles: {
selected: {
stroke: '#d9d9d9',
fill: '#5394ef',
},
},
plugins: [tooltip],
modes: {
default: [
'drag-node',
'drag-canvas',
'zoom-canvas',
'click-select',
],
},
fitView: true,
});
graph.data(data);
graph.render();
graph.on('node:mouseenter', e => {
graph.setItemState(e.item, 'active', true)
});
graph.on('node:mouseleave', e => {
graph.setItemState(e.item, 'active', false)
});
graph.on('edge:mouseenter', e => {
graph.setItemState(e.item, 'active', true)
});
graph.on('edge:mouseleave', e => {
graph.setItemState(e.item, 'active', false)
});
if (typeof window !== 'undefined')
window.onresize = () => {
if (!graph || graph.get('destroyed')) return;
if (!container || !container.scrollWidth || !container.scrollHeight) return;
graph.changeSize(container.scrollWidth, container.scrollHeight);
};
},
getLshsData(){
let _this = this;
const data = {
"bsm": this.$store.state.zdbsm,
"type": "zd"
};
getLshs(data).then((res)=>{
if(res.code===200){
_this.data=res.result;
this.initG6();
}
})
}
},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
.lshs-content{
width: 100%;
height: 100%;
}
#mountNode{
/*height: calc(100% - 68px);*/
margin-top: -60px;
width: 60%;
float: left;
}
#mountNodeRight{
width: 38%;
float: right;
height: 1000px;
border: 0 solid #5ebbff;
}
.slot{
margin-left: 50px;
margin-top: 20px;
width: 300px;
}
.tip-title{
font-weight: 700;
}
</style>
\ No newline at end of file
......@@ -5,25 +5,27 @@
:visible.sync="isVisible"
width="30%"
:before-close="close">
<div class="main-button">
<el-upload
class="upload-demo"
action="/api/tx/excelGeo/import"
:data="sxdrData"
:on-success="uploadSuccess"
:show-file-list="false"
multiple
>
<el-button type="primary">上传</el-button>
<el-button type="primary" @click="downloadTemplate">下载模板</el-button>
</el-upload>
</div>
<div class="wrap">
<div class="main-button">
<el-upload
class="upload-demo"
action="/api/tx/excelGeo/import"
:data="sxdrData"
:on-success="uploadSuccess"
:show-file-list="false"
multiple
>
<el-button type="primary" icon="iconfont iconshangchuan">上传</el-button>
</el-upload>
</div>
<el-button type="primary" class="download" @click="downloadTemplate">下载模板</el-button>
</div>
<ul>
<li v-for="(item,index) in errorData" :key="index">{{item}}</li>
</ul>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
<!-- <el-button type="primary" @click="confirm">确 定</el-button> -->
</span>
</el-dialog>
</div>
......@@ -59,6 +61,12 @@
this.$store.state.sxdrType = '';
},
methods: {
cancel(){
this.close()
},
confirm(){
console.log("确定....")
},
loading() {
this.$store.state.sxdrType = this.dylx;
},
......@@ -71,7 +79,11 @@
this.reset();
},
downloadTemplate() {
window.open(`/api/tx/excelGeo/template?type=` + this.dylx);
let url= `/api/tx/excelGeo/template?type=${this.dylx}`
let elemIF = document.createElement("iframe");
elemIF.src = url;
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
uploadSuccess(res, file, fileList) {
this.errorData = [];
......@@ -104,12 +116,26 @@
</script>
<style scoped lang="less">
.main-button {
display: -webkit-flex;
display: flex;
flex-direction: column-reverse;
flex-wrap: nowrap;
.wrap{
width: 100%;
height: 30px;
position: relative;
.main-button {
display: -webkit-flex;
display: flex;
flex-direction: column-reverse;
flex-wrap: nowrap;
position: absolute;
left: 165px;
top: 18px;
}
.download{
position: absolute;
left: 300px;
top: 18px;
}
}
ul {
margin-top: 20px;
......
<template>
<div class="">登记簿</div>
</template>
<script>
export default {
name:"",
components:{},
props:{},
data(){
return {
}
},
created(){},
mounted(){},
methods:{},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
......@@ -2,8 +2,10 @@
<div class="content_box">
<el-tabs v-model="activeName" class="tabs" @tab-click="handleClick" type="border-card" >
<el-tab-pane label="多幢基本信息" name="dzxx"><dzxx v-if="dzJbxxVisble"></dzxx></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl">
<fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
<el-tab-pane label="附件材料" name="fjcl"><fjcl v-if="fjclVisible" ref="fjcl"></fjcl></el-tab-pane>
<el-tab-pane label="历史回溯" name="lshs"><lshs></lshs></el-tab-pane>
<el-tab-pane label="登记簿" name="djb"><djb></djb></el-tab-pane>
</el-tabs>
</div>
</template>
......@@ -12,10 +14,12 @@
import dzxx from "./dzxx";
import fjcl from "./../zd/fjcl/fjcl"
import {queryStatus} from "@api/search"
import Lshs from '@components/lshs/index';
import djb from "./djb";
export default {
name: "",
components: {
dzxx,fjcl
dzxx,fjcl,Lshs,djb
},
props: {},
data() {
......
<template>
<div class="lshs-content">
<Lshs></Lshs>
</div>
</template>
<script>
import Lshs from '@components/lshs/index';
export default {
name:"",
components:{Lshs},
props:{},
data(){
return {
data : {}
}
},
created(){
},
mounted(){
},
methods: {
},
computed: {},
watch: {},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<template>
<div class="main">
<div class="main1">
<template v-if="isCxlz">
<!-- <p class="tips">查询条件</p> -->
<div class="search">
......@@ -344,7 +344,7 @@ export default {
this.$nextTick(() => {
this.tableHeight =
(document.documentElement.clientHeight ||
document.body.clientHeight) - 352;
document.body.clientHeight) - 332;
this.lpbContentHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 220;
});
},
......@@ -555,10 +555,12 @@ export default {
};
</script>
<style scoped lang="less">
.main {
.main1 {
width: 100%;
height: 100%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 18px;
height: auto;
padding: 20px;
}
.search{
......
......@@ -192,7 +192,7 @@
<li><span class="label">不动产单元号:</span><span class="value">{{dzFgqData.bdcdyh}}</span></li>
<li><span class="label">项目名称:</span><span class="value">{{dzFgqData.xmmc}}</span></li>
<li><span class="label">不动产权证号:</span><span class="value">{{dzFgqData.bdcqzh}}</span></li>
<li><span class="label">权利人:</span><span class="value">{{dzFgqData.qlr}}</span></li>
<li><span class="label">权利人:</span><span class="value">{{dzFgqData.qlrmc}}</span></li>
<li><span class="label">坐落:</span><span class="value">{{dzFgqData.zl}}</span></li>
</ul>
<div class="zdmap">
......
......@@ -54,7 +54,7 @@
label="不动产权证号">
</el-table-column>
<el-table-column
prop="qlr"
prop="qlrmc"
label="权利人">
</el-table-column>
<el-table-column
......@@ -257,7 +257,7 @@
this.$nextTick(() => {
this.fgBoxWidth = this.$refs.hbBox.clientWidth;
this.tableHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 610
});
});
},
methods: {
......
......@@ -88,8 +88,7 @@
this.queryData.pageNo=this.pageNo;
this.getData(this.queryData);
this.$nextTick(()=>{
console.log(this.$refs.dataGrid.offsetHeight,'this.$refs.dataGrid.offsetHeight');
this.tableHeight = this.$refs.dataGrid.offsetHeight - 68;
this.tableHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 332;
})
},
methods: {
......
......@@ -74,7 +74,7 @@
</div>
<div class="contentItem">
<span class="key">权利人:</span>
<span class="value" :title="item.attributes['权利人']">{{item.attributes['权利人'] == 'Null'?"":item.attributes['权利人']}}</span>
<span class="value" :title="item.attributes['QLR']">{{item.attributes['QLR'] == 'Null'?"":item.attributes['QLR']}}</span>
</div>
<div class="contentItem">
<span class="key">坐落:</span>
......@@ -137,7 +137,7 @@
<el-table-column
label="权利人">
<template slot-scope="scope">
<span>{{ scope.row.attributes['权利人'] == 'Null'?'':scope.row.attributes['权利人'] }}</span>
<span>{{ scope.row.attributes['QLR'] == 'Null'?'':scope.row.attributes['QLR'] }}</span>
</template>
</el-table-column>
<el-table-column
......@@ -588,7 +588,7 @@ export default {
/deep/ .el-tabs__header{
margin: 0 0 0px;
}
/deep/ .el-table td, .el-table th.is-leaf {
/deep/ .el-table td, .el-table th{
text-align: center;
}
/deep/ .el-tabs__nav :first{
......
......@@ -232,6 +232,7 @@ export default {
type:"polygon"
}
//self.checkGeo(graphic);
this.addOverLayer(geometry);
self.$emit("setGeometry",geometry);
}else{
this.$message.warning(response.message);
......@@ -319,7 +320,7 @@ export default {
wkt:wkt
}
this.addOverLayer(graphic.geometry);
},
}
}
}
</script>
......
......@@ -14,7 +14,7 @@
:on-exceed="handleExceed"
:disabled="isDisabled"
>
<el-button size="small" type="primary" :disabled="isDisabled" >上传</el-button>
<el-button size="small" type="primary" :disabled="isDisabled" icon="iconfont iconshangchuan">上传</el-button>
</el-upload>
<table border="2">
<tr>
......@@ -100,7 +100,12 @@
})
},
downloadFile(url) {
window.open(`/api/file/download?url=` + url);
// window.open(`/api/file/download?url=` + url);
let downloadUrl= `/api/file/download?url=${url}`
let elemIF = document.createElement("iframe");
elemIF.src = downloadUrl;
elemIF.style.display = "none";
document.body.appendChild(elemIF)
},
getFileList() {
switch (this.$route.name) {
......
<template>
<div class="lshs-content">
<!-- <div class="slot">-->
<!-- <div><span class="tip-title">范围属性变更:</span></div>-->
<!-- <div><span class="tip-title">宗地分割:</span></div>-->
<!-- <div><span class="tip-title">宗地合并:</span></div>-->
<!-- </div>-->
<div id="mountNode" ref="containerWidth"></div>
<div id="mountNodeRight"></div>
<Lshs></Lshs>
</div>
</template>
<script>
import G6 from '@antv/g6';
import insertCss from 'insert-css';
import { getLshs } from "@api/fwsxbg";
import Lshs from '@components/lshs/index';
export default {
name:"",
components:{},
components:{Lshs},
props:{},
data(){
insertCss(`
.g6-tooltip {
border-radius: 6px;
font-size: 12px;
color: #fff;
background-color: #000;
padding: 2px 8px;
text-align: center;
}
`);
return {
data : {}
}
......@@ -39,166 +21,8 @@ export default {
},
mounted(){
this.getLshsData();
},
methods: {
initG6() {
const data = this.data;
const eWidth = this.$refs.containerWidth.clientWidth
console.log(eWidth+":width")
G6.registerNode(
'sql',
{
drawShape(cfg, group) {
const rect = group.addShape('rect', {
attrs: {
x: -100,
y: -25,
width: 200,
height: 50,
radius: 10,
stroke: '#5B8FF9',
fill: '#C6E5FF',
lineWidth: 1,
},
name: 'rect-shape',
});
if (cfg.name) {
group.addShape('text', {
attrs: {
text: cfg.name,
x: 0,
y: 0,
fill: '#00287E',
fontSize: 14,
textAlign: 'center',
textBaseline: 'middle',
fontWeight: 'bold',
},
name: 'text-shape',
});
}
return rect;
},
},
'single-node',
);
G6.registerEdge(
'polyline1',
{
afterDraw(cfg, group) {
console.log(cfg.data+":cfg")
console.log(group.toString()+"group")
},
},
'polyline',
);
const tooltip = new G6.Tooltip({
offsetX: 10,
offsetY: 10,
itemTypes: ['node', 'edge'],
getContent: (e) => {
const outDiv = document.createElement('div');
outDiv.style.width = 'fit-content';
outDiv.innerHTML = `
<ul>
<li> ${e.item.getModel().conf[0].label}:${e.item.getModel().conf[0].value}</li>
<li> ${e.item.getModel().conf[1].label}:${e.item.getModel().conf[1].value}</li>
<li> ${e.item.getModel().conf[2].label}:${e.item.getModel().conf[2].value}</li>
<li> ${e.item.getModel().conf[3].label}:${e.item.getModel().conf[3].value}</li>
<li> ${e.item.getModel().conf[4].label}:${e.item.getModel().conf[4].value}</li>
</ul>`
;
return outDiv;
},
});
const container = document.getElementById('mountNode');
console.log(container)
const graph = new G6.Graph({
container: 'mountNode',
width:eWidth,
height:1000,
layout: {
type: 'dagre',
nodesepFunc: (d) => {
return 100;
},
ranksep: 30,
controlPoints: true,
},
defaultNode: {
type: 'sql',
},
defaultEdge: {
type: 'polyline1',
style: {
radius: 10,
offset: 10,
// endArrow: true,
lineWidth: 2,
stroke: 'rgba(78,142,230,0.45)',
},
},
nodeStateStyles: {
selected: {
stroke: '#d9d9d9',
fill: '#5394ef',
},
},
plugins: [tooltip],
modes: {
default: [
'drag-node',
'drag-canvas',
'zoom-canvas',
'click-select',
],
},
fitView: true,
});
graph.data(data);
graph.render();
graph.on('node:mouseenter', e => {
graph.setItemState(e.item, 'active', true)
});
graph.on('node:mouseleave', e => {
graph.setItemState(e.item, 'active', false)
});
graph.on('edge:mouseenter', e => {
graph.setItemState(e.item, 'active', true)
});
graph.on('edge:mouseleave', e => {
graph.setItemState(e.item, 'active', false)
});
if (typeof window !== 'undefined')
window.onresize = () => {
if (!graph || graph.get('destroyed')) return;
if (!container || !container.scrollWidth || !container.scrollHeight) return;
graph.changeSize(container.scrollWidth, container.scrollHeight);
};
},
getLshsData(){
let _this = this;
const data = {
"bsm": this.$store.state.zdbsm,
"type": "zd"
};
getLshs(data).then((res)=>{
if(res.code===200){
_this.data=res.result;
this.initG6();
}
})
}
},
computed: {},
watch: {},
......@@ -206,32 +30,4 @@ export default {
</script>
<style scoped lang="less">
.lshs-content{
width: 100%;
height: 100%;
}
#mountNode{
/*height: calc(100% - 68px);*/
margin-top: -60px;
width: 60%;
float: left;
}
#mountNodeRight{
width: 38%;
float: right;
height: 1000px;
border: 0 solid #5ebbff;
}
.slot{
margin-left: 50px;
margin-top: 20px;
width: 300px;
}
.tip-title{
font-weight: 700;
}
</style>
\ No newline at end of file
......
......@@ -364,7 +364,7 @@
</tr>
</table>
<div class="header-button" :style="{width:mainBoxWidth+'px'}">
<el-button type="primary" class="saveBtn" @click="updateZDxx" :disabled="disabled">保存</el-button>
<el-button type="primary" class="saveBtn" @click="updateZDxx" :disabled="disabled" icon="el-icon-search">保存</el-button>
<el-button type="primary" @click="submitZDxx" :disabled="disabled">提交</el-button>
<el-button type="primary" @click="registerCall">登记调用</el-button>
</div>
......@@ -805,14 +805,25 @@
return item.bsm == value;
})
self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc : "";
} else {
} else if(key == 'QLR'){
var qlrTableData = this.$refs.qlrxxModule.tableData;
if(qlrTableData.length > 0){
for(var i = 0;i < qlrTableData.length;i++){
if(i = 0){
self.geoAttributes[key] = qlrTableData[i].qlrmc;
}else{
self.geoAttributes[key] += ','+ qlrTableData[i].qlrmc;
}
}
}
} else {
var formKay = key.toLowerCase();
self.geoAttributes[key] = self.formData[formKay];
}
}
self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) {
console.log("属性保存完成!!");
});
});
}
}
} else {
......
......@@ -233,7 +233,7 @@
</div>
</div>
</div>
<xxxx v-show="!bjztFlag"></xxxx>
<!-- 右键菜单弹出框 -->
......@@ -611,7 +611,7 @@ export default {
getHbsm(data, type) {
if (type) {
// 双击
} else {
//单击 TO DO
this.bsms = data;
......@@ -621,7 +621,7 @@ export default {
getQsztList(data, type) {
if (type) {
// 双击
} else {
//单击 TO DO
this.qsztList = data;
......
......@@ -621,7 +621,7 @@ export default {
this.$nextTick(()=>{
this.lpbContentWidth = this.zdyWidth > this.ljzWidth ?this.zdyWidth - 20 : this.ljzWidth-20;
if (this.lpbContentWidth == 0) {
this.lpbContentWidth = this.$refs.lpbContent.offsetWidth
//his.lpbContentWidth = this.$refs.lpbContent.offsetWidth
}
})
},
......@@ -643,16 +643,16 @@ export default {
self.fghbChoosedList.push(hs);
break;
case 'isFwsxbg':
break;
case 'isCxlz':
break;
case 'isLpb':
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
break;
default:
break;
}
......@@ -664,10 +664,10 @@ export default {
self.fghbChoosedList = self.fghbChoosedList.filter(i=>i!=hs)
break;
case 'isFwsxbg':
break;
case 'isCxlz':
break;
case 'isLpb':
this.hbsmList = this.hbsmList.filter(i=>i!=bsm);
......@@ -675,7 +675,7 @@ export default {
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
break;
default:
break;
}
......@@ -692,7 +692,7 @@ export default {
this.$refs.hbj.getHInfo(this.hbsm);
});
// if (this.isHbfg) {
// }else{
// this.hbsmList.push(bsm); // 将户bsm放进hbsmList
// this.$parent.getHbsm(bsm, true);
......@@ -781,7 +781,7 @@ export default {
this.rightClickFlag = type;
this.lpbChVisible = true;
break;
default:
break;
}
......@@ -800,7 +800,7 @@ export default {
if (e.target.className.indexOf("tdSelect") == -1) {
//未选中→选中
e.target.className += " tdSelect"; //加边框
this.cbsmList.push(item.bsm);
this.cbsmList.push(item.bsm);
} else {
//选中→未选中
e.target.className = "floor";
......@@ -808,7 +808,7 @@ export default {
}
this.$parent.getCbsm(this.cbsmList);
}else{
}
},
//关闭右键菜单
......@@ -901,7 +901,7 @@ export default {
type: "warning",
})
.then(() => {
//确定合并 调用合并接口 this.hbsmList为选中户bsm数组 TO DO
//确定合并 调用合并接口 this.hbsmList为选中户bsm数组 TO DO
let params = {
"newuserbsm": "",
"oldBsms": olbBsms,
......@@ -972,7 +972,7 @@ export default {
});
}
}).catch((error) => {
});
}).catch(() => {
......@@ -1191,7 +1191,7 @@ export default {
width: calc(100% - 32px);
height: 40px;
// background-color: darkorange;
}
}
.mt30{
......