Commit 3b71b549 authored by hubaoshan's avatar hubaoshan

Merge remote-tracking branch 'origin/project9-8' into project9-8

parents f09a43bd 7e705531
<template> <template>
<div style="height: 100%;"> <div style="height: 98%;">
<div class="super-flow-demo1"> <div class="super-flow-demo1">
<!-- 最外层,加滚轮监听函数 --> <!-- 最外层,加滚轮监听函数 -->
...@@ -8,12 +8,13 @@ ...@@ -8,12 +8,13 @@
<!-- superflow里面是个弹窗?就点一下出那个悬浮的东西 --> <!-- superflow里面是个弹窗?就点一下出那个悬浮的东西 -->
<div <div
class="super-flow-content" class="super-flow-content"
@wheel="handleScroll"
> >
<!-- @wheel="handleScroll" 阻止默认滚轮事件-->
<!-- 这下面删了个v-drag就不能拖动画布了 --> <!-- 这下面删了个v-drag就不能拖动画布了 -->
<div <div
ref="flowContainer" ref="flowContainer"
class="flow-container" class="flow-container"
style="width: 1920px;height: 1080px"
id="popSuperBack" id="popSuperBack"
> >
<super-flow <super-flow
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
<div v-if="meta && meta.info && meta.info.pn"> <div v-if="meta && meta.info && meta.info.pn">
pn:{{ meta.info.pn }} pn:{{ meta.info.pn }}
</div> </div>
<div <div
slot="reference" slot="reference"
class="flow-node ellipsis all" class="flow-node ellipsis all"
...@@ -175,14 +176,14 @@ ...@@ -175,14 +176,14 @@
<superFlowWatch v-if="observationMode" :dataToWatch="dataToWatch"> <superFlowWatch v-if="observationMode" :dataToWatch="dataToWatch">
</superFlowWatch> </superFlowWatch>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
import SuperFlow from 'vue-super-flow' import SuperFlow from 'vue-super-flow'
import 'vue-super-flow/lib/index.css' import 'vue-super-flow/lib/index.css'
import nodeListJson from './nodeListJson.json' import nodeListJson from './nodeListJson.json'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
...@@ -624,7 +625,7 @@ export default { ...@@ -624,7 +625,7 @@ export default {
} }
} }
} }
// 刷一下模版,不然没有响应式 // 刷一下模版,不然没有响应式
this.templateShow = false this.templateShow = false
...@@ -648,7 +649,7 @@ export default { ...@@ -648,7 +649,7 @@ export default {
this.observationMode = true this.observationMode = true
}, },
//清除 //清除
clear(){ clear(){
this.nodeList = [] this.nodeList = []
...@@ -943,7 +944,7 @@ export default { ...@@ -943,7 +944,7 @@ export default {
/* 让宽度跟父元素(外面的大框相关) */ /* 让宽度跟父元素(外面的大框相关) */
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: auto;
background-color: #bbb; background-color: #bbb;
margin: 10px; margin: 10px;
} }
...@@ -951,8 +952,6 @@ export default { ...@@ -951,8 +952,6 @@ export default {
.flow-container { .flow-container {
float: left; float: left;
position: absolute; position: absolute;
width: 100%;
height: 100%;
overflow: hidden; overflow: hidden;
/* background: url("./R-C.jpg") no-repeat center / cover ; */ /* background: url("./R-C.jpg") no-repeat center / cover ; */
background: no-repeat center / cover ; background: no-repeat center / cover ;
...@@ -981,8 +980,8 @@ export default { ...@@ -981,8 +980,8 @@ export default {
--> -->
<!-- 先加个业务id <!-- 先加个业务id
flowName flowName
--> -->
<!-- 导入后分两个版本,一个有文字标签,一个没有,按钮来回切换 --> <!-- 导入后分两个版本,一个有文字标签,一个没有,按钮来回切换 -->
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
@mousedown="evt => nodeItemMouseDown(evt, item.value)" @mousedown="evt => nodeItemMouseDown(evt, item.value)"
> >
<!-- 里面嵌套这层为卡片提供样式和信息之类,后面卡片样式判断可以在这里面做 --> <!-- 里面嵌套这层为卡片提供样式和信息之类,后面卡片样式判断可以在这里面做 -->
<div class="flow-node ellipsis all" <div class="flow-node ellipsis all"
:style="{backgroundImage: 'url('+item.value().meta.img+')' }" :style="{backgroundImage: 'url('+item.value().meta.img+')' }"
> >
</div> </div>
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
placeholder="请输入图片地址" placeholder="请输入图片地址"
v-model="backgroundUrl"> v-model="backgroundUrl">
</el-input> --> </el-input> -->
<el-button <el-button
style=" style="
margin-top: 300px; " margin-top: 300px; "
type="success" type="success"
@click="showBackGroundPage">更换背景</el-button> @click="showBackGroundPage">更换背景</el-button>
</div> </div>
...@@ -50,12 +50,13 @@ ...@@ -50,12 +50,13 @@
<!-- superflow里面是个弹窗?就点一下出那个悬浮的东西 --> <!-- superflow里面是个弹窗?就点一下出那个悬浮的东西 -->
<div <div
class="super-flow-content" class="super-flow-content"
@wheel="handleScroll"
> >
<!-- @wheel="handleScroll" 阻止默认滚轮事件-->
<!-- 这下面删了个v-drag就不能拖动画布了 --> <!-- 这下面删了个v-drag就不能拖动画布了 -->
<div <div
ref="flowContainer" ref="flowContainer"
class="flow-container" class="flow-container"
style="width: 1920px;height: 1080px"
id="mainSuperBack" id="mainSuperBack"
> >
<super-flow <super-flow
...@@ -138,7 +139,7 @@ ...@@ -138,7 +139,7 @@
maxlength="30" maxlength="30"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 判断类型然后选择展示的内容 --> <!-- 判断类型然后选择展示的内容 -->
<el-form <el-form
...@@ -187,7 +188,7 @@ ...@@ -187,7 +188,7 @@
<superFlowWatch v-if="observationMode" :dataToWatch="dataToWatch"> <superFlowWatch v-if="observationMode" :dataToWatch="dataToWatch">
</superFlowWatch> </superFlowWatch>
</div> </div>
</el-dialog> </el-dialog>
<!-- 对话框,用来换图 --> <!-- 对话框,用来换图 -->
<el-dialog <el-dialog
...@@ -201,7 +202,7 @@ ...@@ -201,7 +202,7 @@
placeholder="请输入图片地址" placeholder="请输入图片地址"
maxlength="100" maxlength="100"
/> />
<!-- 底下的取消键是死的 --> <!-- 底下的取消键是死的 -->
<span <span
slot="footer" slot="footer"
...@@ -225,8 +226,8 @@ ...@@ -225,8 +226,8 @@
<script> <script>
/* eslint-disable */ /* eslint-disable */
import SuperFlow from 'vue-super-flow' import SuperFlow from 'vue-super-flow'
import superFlowWatch from './graph/graphWatch.vue' import superFlowWatch from './graph/graphWatch.vue'
import 'vue-super-flow/lib/index.css' import 'vue-super-flow/lib/index.css'
import nodeListJson from './graph/nodeListJson.json' import nodeListJson from './graph/nodeListJson.json'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
...@@ -411,7 +412,7 @@ export default { ...@@ -411,7 +412,7 @@ export default {
} }
}) })
}, },
// 下面的所有配置需要向上面这个看齐,都需要修改 // 下面的所有配置需要向上面这个看齐,都需要修改
// { // {
// label: '服务器', // label: '服务器',
...@@ -460,7 +461,7 @@ export default { ...@@ -460,7 +461,7 @@ export default {
], ],
// 右键画布事件 // 右键画布事件
graphMenu: [ graphMenu: [
], ],
// graphMenu: [ // graphMenu: [
// [ // [
...@@ -687,7 +688,7 @@ export default { ...@@ -687,7 +688,7 @@ export default {
this.backgroundshow = true this.backgroundshow = true
}, },
changeBackGround() { changeBackGround() {
this.backgroundshow = false this.backgroundshow = false
let backDiv = document.getElementById('mainSuperBack') let backDiv = document.getElementById('mainSuperBack')
if (this.backgroundUrl == '') { if (this.backgroundUrl == '') {
...@@ -698,9 +699,9 @@ export default { ...@@ -698,9 +699,9 @@ export default {
backDiv.style.backgroundImage = 'url('+this.backgroundUrl+')' backDiv.style.backgroundImage = 'url('+this.backgroundUrl+')'
} }
// backDiv.style.background = this.backgroundUrl // backDiv.style.background = this.backgroundUrl
}, },
//清除 //清除
clear(){ clear(){
this.nodeList = [] this.nodeList = []
...@@ -782,7 +783,7 @@ export default { ...@@ -782,7 +783,7 @@ export default {
// 从服务器获取存档并加载 // 从服务器获取存档并加载
loadNodeListJson(){ loadNodeListJson(){
findLatestData().then(res => { findLatestData().then(res => {
let data = JSON.parse(res.data.graph) let data = JSON.parse(res.data.graph)
// data是获取到的信息 // data是获取到的信息
// console.log('---------------'); // console.log('---------------');
...@@ -809,7 +810,7 @@ export default { ...@@ -809,7 +810,7 @@ export default {
// this.backgroundUrl = data.background.replace(/^.{5}(.+).{2}$/, '$1') // this.backgroundUrl = data.background.replace(/^.{5}(.+).{2}$/, '$1')
this.addNode() this.addNode()
}) })
}, },
...@@ -986,7 +987,7 @@ export default { ...@@ -986,7 +987,7 @@ export default {
<style> <style scoped lang="scss">
/* .shelf { /* .shelf {
text-align: center; text-align: center;
width: 100%; width: 100%;
...@@ -1019,13 +1020,12 @@ export default { ...@@ -1019,13 +1020,12 @@ export default {
</style> </style>
<style> <style scoped lang="scss">
/* 外侧盒子 */ /* 外侧盒子 */
.super-flow-demo1 { .super-flow-demo1 {
position: relative; position: relative;
margin-top: 20px;
width: 100%; width: 100%;
height: 800px; height: 750px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.watchModeButton { .watchModeButton {
...@@ -1059,7 +1059,7 @@ export default { ...@@ -1059,7 +1059,7 @@ export default {
/* 让宽度跟父元素(外面的大框相关) */ /* 让宽度跟父元素(外面的大框相关) */
width: calc(100% - 220px); width: calc(100% - 220px);
height: 100%; height: 100%;
overflow: hidden; overflow: auto;
background-color: #bbb; background-color: #bbb;
margin: 10px; margin: 10px;
} }
...@@ -1067,9 +1067,6 @@ export default { ...@@ -1067,9 +1067,6 @@ export default {
.flow-container { .flow-container {
float: left; float: left;
position: absolute; position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
background-size: cover; /* 拉伸并填充整个div */ background-size: cover; /* 拉伸并填充整个div */
background-repeat: no-repeat; /* 不重复 */ background-repeat: no-repeat; /* 不重复 */
/* background-image: url('https://pic35.photophoto.cn/20150511/0034034892281415_b.jpg'); */ /* background-image: url('https://pic35.photophoto.cn/20150511/0034034892281415_b.jpg'); */
...@@ -1097,4 +1094,4 @@ export default { ...@@ -1097,4 +1094,4 @@ export default {
<!-- 2.拖拽图片,没啥问题,存档这会还是保存的图片信息 --> <!-- 2.拖拽图片,没啥问题,存档这会还是保存的图片信息 -->
<!-- 3.保存,另存一个相似的副本,将图片替换为对应id,将替换后的副本发送 --> <!-- 3.保存,另存一个相似的副本,将图片替换为对应id,将替换后的副本发送 -->
<!-- 4,查看模式,发送普通图片版本的信息过去,这样不影响逻辑 --> <!-- 4,查看模式,发送普通图片版本的信息过去,这样不影响逻辑 -->
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment