Commit 4febc18a by zlr

修改etlweb路径配置,显示图标

parent d9f1394f
...@@ -581,7 +581,7 @@ aside { ...@@ -581,7 +581,7 @@ aside {
// //
$svgUrl:'http://192.168.0.2:9888/ETLWEB-SERVER/etlweb'; $svgUrl:'http://192.168.0.44:9888/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.44:9888/ETLWEB-SERVER/etlweb'; // $svgUrl:'http://192.168.0.44:9888/ETLWEB-SERVER/etlweb';
// $svgUrl:'http://192.168.0.44:9882/ETLWEB-SERVER/etlweb'; // $svgUrl:'http://192.168.0.44:9882/ETLWEB-SERVER/etlweb';
// .schema { background-image: url($svgUrl/ui/images/schema.svg?scale=16) !important;} // .schema { background-image: url($svgUrl/ui/images/schema.svg?scale=16) !important;}
......
...@@ -75,6 +75,8 @@ import * as R from 'ramda' ...@@ -75,6 +75,8 @@ import * as R from 'ramda'
Vue.prototype.R = R Vue.prototype.R = R
Vue.config.productionTip = false Vue.config.productionTip = false
const baseUrl = process.env.VUE_APP_BASE_API === '/' ? '' : process.env.VUE_APP_BASE_API
Vue.prototype.etlWeb = baseUrl+"ETLWEB-SERVER/etlweb/"
new Vue({ new Vue({
router, router,
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
}, },
data() { data() {
return { return {
prefix:'http://192.168.0.44:9882/etlweb/', prefix:this.etlWeb,
} }
}, },
computed: { computed: {
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span> <span>
<img :src="prefix+data.icon" style="width:20px" width="" alt=""> <img :src="prefix+data.icon" style="width:20px" width="" alt="">
{{ node.label }} {{ node.label }}
</span> </span>
...@@ -88,7 +87,7 @@ export default { ...@@ -88,7 +87,7 @@ export default {
data() { data() {
return { return {
// prefix:'http://192.168.0.2:9700/etlweb/', // prefix:'http://192.168.0.2:9700/etlweb/',
prefix:'http://192.168.0.44:9882/etlweb/', prefix:this.etlWeb,
// 测试数据开始===== // 测试数据开始=====
jobTreeList: [ jobTreeList: [
{ {
......
...@@ -11,9 +11,10 @@ ...@@ -11,9 +11,10 @@
class="custom-tree-node" class="custom-tree-node"
:key-id="data.children ? '' : 123" :key-id="data.children ? '' : 123"
:id="data.id" :id="data.id"
:icon="data.icon" :icon="prefix+data.icon"
:pluginId="data.pluginId" :pluginId="data.pluginId"
> >
<img :src="prefix+data.icon" style="width:20px" width="" alt="">
{{ data.text }} {{ data.text }}
</div> </div>
</div> </div>
...@@ -34,6 +35,7 @@ export default { ...@@ -34,6 +35,7 @@ export default {
pluginId:"pluginId", pluginId:"pluginId",
}, },
data: [], data: [],
prefix: this.etlWeb
}; };
}, },
components: {}, components: {},
......
...@@ -1267,6 +1267,18 @@ export default { ...@@ -1267,6 +1267,18 @@ export default {
const { width, height } = toolItem; const { width, height } = toolItem;
const parent = this.graph.getDefaultParent(); const parent = this.graph.getDefaultParent();
this.graph.getModel().beginUpdate(); this.graph.getModel().beginUpdate();
const styleObj = {
fillColor: 'transparent',
strokeColor: '#000000',
strokeWidth: '1',
shape: mxConstants.SHAPE_LABEL,
align: mxConstants.ALIGN_CENTER,
verticalAlign: mxConstants.ALIGN_BOTTOM,
imageAlign: mxConstants.ALIGN_CENTER,
imageVerticalAlign: mxConstants.ALIGN_TOP,
image:toolItem['icon']
}
const style = Object.keys(styleObj).map((attr) => `${attr}=${styleObj[attr]}`).join(';')
try { try {
let vertex = this.graph.insertVertex( let vertex = this.graph.insertVertex(
parent, parent,
...@@ -1275,12 +1287,14 @@ export default { ...@@ -1275,12 +1287,14 @@ export default {
x, x,
y, y,
width, width,
height height,
style
); );
vertex.title = toolItem["title"]; vertex.title = toolItem["title"];
vertex.ids = toolItem["id"]; vertex.ids = toolItem["id"];
vertex.pluginId = toolItem["pluginId"]; vertex.pluginId = toolItem["pluginId"];
this.xmlDocuments = mxUtils.parseXml(decodeURIComponent(this.blankCanvas)); this.xmlDocuments = mxUtils.parseXml(decodeURIComponent(this.blankCanvas));
console.log(this.xmlDocuments,'拖拽'); console.log(this.xmlDocuments,'拖拽');
...@@ -1319,17 +1333,13 @@ export default { ...@@ -1319,17 +1333,13 @@ export default {
//选择 //选择
initToolbar() { initToolbar() {
let domArr = document.querySelectorAll('[key-id="123"]'); let domArr = document.querySelectorAll('[key-id="123"]');
console.log(domArr);
domArr.forEach((dom, index) => { domArr.forEach((dom, index) => {
// console.log(dom.pluginId);
// console.log(dom);
let toolItemObj = { let toolItemObj = {
title: dom.innerHTML, title: dom.innerText,
id: dom.id, id: dom.id,
width: 60, width: 50,
height: 60, height: 50,
icon:dom.attributes["icon"].nodeValue,
// value: dom.pluginId, // value: dom.pluginId,
pluginId:dom.getAttribute("pluginId"), pluginId:dom.getAttribute("pluginId"),
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
// document.body.appendChild(link); // document.body.appendChild(link);
// link.click(); // link.click();
var url=`http://192.168.0.2:9888/ETLWEB-SERVER/etlweb/attachment/download?filePath=${res.message}&remove=true` var url=this.etlWeb+`attachment/download?filePath=${res.message}&remove=true`
window.open(url); window.open(url);
} else { } else {
......
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
// document.body.appendChild(link); // document.body.appendChild(link);
// link.click(); // link.click();
var url=`http://192.168.0.2:9888/ETLWEB-SERVER/etlweb/attachment/download?filePath=${res.message}&remove=true` var url=this.etlWeb+`attachment/download?filePath=${res.message}&remove=true`
window.open(url); window.open(url);
} else { } else {
......
...@@ -391,7 +391,7 @@ props: ["dragItem"], ...@@ -391,7 +391,7 @@ props: ["dragItem"],
estabTitle:'转换',//新建转换弹窗提示 estabTitle:'转换',//新建转换弹窗提示
featureDialogVisible:false,//特征列表弹窗 featureDialogVisible:false,//特征列表弹窗
scanDialogVisible:false,//浏览弹窗 scanDialogVisible:false,//浏览弹窗
prefix:'http://192.168.0.2:9700/etlweb/', prefix:this.etlWeb,
inputValue:'',// 密码 inputValue:'',// 密码
// dropFunction,//删除数据库表 // dropFunction,//删除数据库表
deleteLink,//删除资源库模块的方法 deleteLink,//删除资源库模块的方法
......
...@@ -2,7 +2,7 @@ import mxgraph from './mx.js' ...@@ -2,7 +2,7 @@ import mxgraph from './mx.js'
import { steps } from '@/api/kettle/link' import { steps } from '@/api/kettle/link'
const MxConstants = mxgraph.mxConstants const MxConstants = mxgraph.mxConstants
const prefix = '192.168.0.2:9700/etlweb/' const prefix = this.etlWeb
const bar = [] const bar = []
const pamer = new FormData() // 创建form对象 const pamer = new FormData() // 创建form对象
......
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