Commit 4febc18a by zlr

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

parent d9f1394f
......@@ -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:9882/ETLWEB-SERVER/etlweb';
// .schema { background-image: url($svgUrl/ui/images/schema.svg?scale=16) !important;}
......
......@@ -65,7 +65,7 @@ new Vue({
router,
store,
render: h => h(App)
})
......@@ -75,6 +75,8 @@ import * as R from 'ramda'
Vue.prototype.R = R
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({
router,
......
......@@ -35,7 +35,7 @@
},
data() {
return {
prefix:'http://192.168.0.44:9882/etlweb/',
prefix:this.etlWeb,
}
},
computed: {
......
<template>
<div class="flow-menu" ref="tool">
<!-- <div v-for="menu in menuList" :key="menu.id"> -->
<!-- <span class="ef-node-pmenu" @click="menu.open = !menu.open">
<i :class="{'el-icon-caret-bottom': menu.open,'el-icon-caret-right': !menu.open}"></i>&nbsp;
{{menu.name}}
</span> -->
<!--
<!--
<ul v-show="menu.open" class="ef-node-menu-ul">
<draggable
@end="end"
......@@ -59,12 +59,11 @@
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<span>
<i :class="data.icon"></i>{{ node.label }}
</span>
</span>
</span> -->
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<span>
<img :src="prefix+data.icon" style="width:20px" width="" alt="">
{{ node.label }}
</span>
......@@ -88,7 +87,7 @@ export default {
data() {
return {
// prefix:'http://192.168.0.2:9700/etlweb/',
prefix:'http://192.168.0.44:9882/etlweb/',
prefix:this.etlWeb,
// 测试数据开始=====
jobTreeList: [
{
......@@ -172,12 +171,12 @@ export default {
type: "group",
name: "基础节点",
ico: "el-icon-video-play",
open: true,
open: true,
children: [
{
id: "01",
type: "start",
name: "没了",
name: "没了",
ico: "el-icon-caret-right",
// 自定义覆盖样式
style: {},
......@@ -301,15 +300,15 @@ export default {
},
stepsFun() {
let pamer = new FormData(); // 创建form对象
pamer.append("node", "xnode-12");
this.$forceUpdate();
steps(pamer).then((res) => {
this.jobTreeList = res
console.log(this.menuList,res[0]);
});
},
......@@ -400,7 +399,7 @@ export default {
console.log("树形拖拽开始2:===", event);
var type = Node.data.type;
this.nodeMenu = this.getMenuByType(type);
},
handleDragend(draggingNode, endNode, position, event) {
......
......@@ -11,10 +11,11 @@
class="custom-tree-node"
:key-id="data.children ? '' : 123"
:id="data.id"
:icon="data.icon"
:icon="prefix+data.icon"
:pluginId="data.pluginId"
>
{{ data.text }}
<img :src="prefix+data.icon" style="width:20px" width="" alt="">
{{ data.text }}
</div>
</div>
</el-tree>
......@@ -34,6 +35,7 @@ export default {
pluginId:"pluginId",
},
data: [],
prefix: this.etlWeb
};
},
components: {},
......@@ -41,7 +43,7 @@ export default {
this.stepsFun()
},
mounted() {
},
beforeUpdate(){
this.$emit('shooStatus',true)
......
......@@ -883,7 +883,7 @@ export default {
// type: Boolean,
// default: false,
// },
// },
props: ["blankCanvas"], //从父组件传过来的值
......@@ -1158,7 +1158,7 @@ export default {
decode(graphXml, graph) {
window["mxGraphModel"] = mxGraphModel;
window["mxGeometry"] = mxGeometry;
// const xmlDocument = mxUtils.parseXml(graphXml);
// const decoder = new mxCodec(xmlDocument);
// const node = xmlDocument.documentElement;
......@@ -1168,7 +1168,7 @@ export default {
var node = enc.encode(graph.getModel());
console.log(mxUtils.getPrettyXml(node));
return mxUtils.getPrettyXml(node);
},
//初始化画布
......@@ -1267,6 +1267,18 @@ export default {
const { width, height } = toolItem;
const parent = this.graph.getDefaultParent();
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 {
let vertex = this.graph.insertVertex(
parent,
......@@ -1275,21 +1287,23 @@ export default {
x,
y,
width,
height
height,
style
);
vertex.title = toolItem["title"];
vertex.ids = toolItem["id"];
vertex.pluginId = toolItem["pluginId"];
this.xmlDocuments = mxUtils.parseXml(decodeURIComponent(this.blankCanvas));
console.log(this.xmlDocuments,'拖拽');
var oSerializer = new XMLSerializer();
console.log(oSerializer.serializeToString(this.xmlDocuments));
console.log(oSerializer.serializeToString(this.xmlDocuments));
......@@ -1319,20 +1333,16 @@ export default {
//选择
initToolbar() {
let domArr = document.querySelectorAll('[key-id="123"]');
console.log(domArr);
domArr.forEach((dom, index) => {
// console.log(dom.pluginId);
// console.log(dom);
let toolItemObj = {
title: dom.innerHTML,
title: dom.innerText,
id: dom.id,
width: 60,
height: 60,
width: 50,
height: 50,
icon:dom.attributes["icon"].nodeValue,
// value: dom.pluginId,
pluginId:dom.getAttribute("pluginId"),
};
const { width, height } = toolItemObj;
......
......@@ -3,7 +3,7 @@
<!-- 浏览 -->
<el-dialog
title="资源库导出"
:visible.sync="exportDialogVisible"
:visible.sync="exportDialogVisible"
width="650px"
top="15%"
:close-on-click-modal="false"
......@@ -44,7 +44,7 @@
<el-button type="primary" @click="expRespository()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -63,7 +63,7 @@ export default {
},
checkedArr:[]
}
},
props: {
exportDialogVisible: Boolean,
......@@ -102,7 +102,7 @@ export default {
});
this.checkedArr=checkArr;
console.log('当前选择文件====',this.checkedArr);
},
//导出资源库
expRespository() {
......@@ -110,7 +110,7 @@ export default {
this.$message.error('请先选择要导出文件');
}
let data = new FormData();
data.append("data",JSON.stringify(this.checkedArr) );
expRespository(data).then((res) => {
if (res) {
......@@ -123,7 +123,7 @@ export default {
// document.body.appendChild(link);
// 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);
} else {
......@@ -131,7 +131,7 @@ export default {
}
});
},
handleCloseScan() {
this.$emit("update:exportDialogVisible", false);
},
......@@ -143,4 +143,4 @@ export default {
background-color: #8888ff;
color: #fff;
}
</style>
\ No newline at end of file
</style>
......@@ -14,10 +14,10 @@
action="https://jsonplaceholder.typicode.com/posts/"
:file-list="fileList"
:auto-upload="false"
:on-change="handleChange">
:on-change="handleChange">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
<!-- 文件夹存放区域start-->
<el-tree
......@@ -74,7 +74,7 @@ export default {
checkedArr:[],
uploadPath:''
}
},
props: {
inputVisibility: Boolean,
......@@ -114,8 +114,8 @@ export default {
});
this.checkedArr=checkArr;
console.log('当前选择文件====',this.checkedArr);
},
// 导入资源库
imp(data){
......@@ -124,7 +124,7 @@ export default {
formData.append('data', JSON.stringify(data));
console.log('参数==',formData);
imp(formData).then(res=>{
if (res) {
if (res) {
this.$message.success('导入成功!');
this.explorer('');//刷新列表
this.$emit("update:inputVisibility", false);//关闭弹窗
......@@ -146,7 +146,7 @@ export default {
this.$message.error('请先选择要导出文件');
}
let data = new FormData();
data.append("data",JSON.stringify(this.checkedArr) );
expRespository(data).then((res) => {
if (res) {
......@@ -159,7 +159,7 @@ export default {
// document.body.appendChild(link);
// 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);
} else {
......@@ -167,7 +167,7 @@ export default {
}
});
},
handleClose() {
this.$emit("update:inputVisibility", false);
},
......@@ -177,9 +177,9 @@ export default {
// path='H:\\小曾发来的新项目\\kettle\\kettle-webapp\\file_trans1.zip';
path="D:\\file\\111.zip";
this.uploadPath=path;
this.Imptree(path);
},
// 导入资源库
Imptree(path){
......@@ -189,18 +189,18 @@ export default {
formData.append('node', 'root');
console.log('参数==',formData);
Imptree(formData).then(res=>{
if (res) {
if (res) {
// this.$message.success('成功!');
this.impFileList=res;
}else {
this.$message.error(res.errMsg)
}
})
},
},
};
......@@ -210,4 +210,4 @@ export default {
background-color: #8888ff;
color: #fff;
}
</style>
\ No newline at end of file
</style>
......@@ -6,7 +6,7 @@
<el-tab-pane label="资源库" name="first">
<div class="sel-content">
<div class="sel-menu-bar">
<el-dropdown
<el-dropdown
size="small"
placement="bottom"
>
......@@ -14,15 +14,15 @@
新建
<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="password" @click.native="createTrans()">
<template>
<template>
<i style="color:red;font-weight:bold;font-size:15px;" class="el-icon-refresh"></i>
新建转换
</template>
</el-dropdown-item>
<el-dropdown-item command="logout" @click.native="createJob()">
<template>
<template>
<i style="color:#F99C1C;font-weight:bold;font-size:15px;" class="el-icon-refresh-left"></i>
新建任务
</template>
......@@ -31,14 +31,14 @@
<el-dropdown-item class="text-center">打开</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown
<el-dropdown
size="small"
placement="bottom">
<span class="sel-btn">
资源库管理
<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="showModalOne()">连接资源库</el-dropdown-item>
<el-dropdown-item >管理资源库</el-dropdown-item>
<el-dropdown-item >断开资源库</el-dropdown-item>
......@@ -46,14 +46,14 @@
<el-dropdown-item>导入资源库</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown
<el-dropdown
size="small"
placement="bottom">
<span class="sel-btn">
帮组
<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-menu slot="dropdown">
<el-dropdown-item> 语言切换</el-dropdown-item>
<el-dropdown-item >关于</el-dropdown-item>
</el-dropdown-menu>
......@@ -71,16 +71,16 @@
:highlight-current="true"
@node-click="handleNodeClick"
>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span style="display:flex;align:center;">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span style="display:flex;align:center;">
<div v-if="data.iconCls" :class="data.iconCls" style="display:inline-block;width:20px;height:20px;background-repeat:no-repeat;background-position:center;" width="" alt=""></div>
{{ node.label }}
{{ node.label }}
</span>
</span>
</el-tree>
<!-- 文件夹存放区域end -->
</div>
</div>
</el-tab-pane>
<el-tab-pane label="核心对象" name="second" v-if="tabShowFlag">
<div class="sel-content">
......@@ -88,21 +88,21 @@
<nodeMenu2 @shooStatus="shooStatus"></nodeMenu2>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-tabs>
</div>
<div class="resize" title="收缩侧边栏">...</div>
<div class="mid">
<el-tabs v-if="tabShowFlag" style="margin-top:-5vh;margin-bottom:0;" v-model="picName" type="card" closable @tab-remove="removeTab">
<el-tab-pane label="数据库名称" >
<mxgraph-designer ref="pic" v-if="mxGraphShow" :blankCanvas="blankCanvas"></mxgraph-designer>
</el-tab-pane>
</el-tabs>
</div>
</el-tabs>
</div>
<!-- 弹窗1start -->
<el-dialog
......@@ -160,7 +160,7 @@
<li class="btn" @mouseenter="typeHoverIdx = idx" @mouseleave="typeHoverIdx = -1" @click="typeCheckedIdx=idx" :class="{'hover': typeHoverIdx == idx,'checked': typeCheckedIdx == idx}" v-for="(item,idx) in typesList" :key="idx" >
{{ item.type }}:{{ item.name }}
</li>
</ul>
</div>
......@@ -205,16 +205,16 @@
<el-button type="primary" @click="repositoryInfoConfirm('repositoryInfoForm')">确 定</el-button>
<el-button @click="createOrUpdate">创建或更新</el-button>
<el-button @click="dialogVisibleRemind = true">删 除</el-button>
<el-button @click="dialogVisibleThree = false">取 消</el-button>
<el-button @click="dialogVisibleThree = false">取 消</el-button>
<!-- <el-button type="primary" @click="dialogVisibleTwo = false">确 定</el-button> -->
</span>
</el-dialog>
<!-- 弹窗3end -->
<!-- 弹窗4start -->
<estab-dialog ref="establishDia" :dialogVisibleFourth.sync='dialogVisibleFourth' @getSonValue="getSonValue" :listNames="listNames"></estab-dialog>
<!-- 弹窗5start -->
......@@ -233,10 +233,10 @@
</span>
</div>
</el-form-item>
<el-form-item label="只读资源库?:" prop="checkPass">
<el-checkbox ></el-checkbox>
</el-form-item>
</el-form-item>
<el-form-item label="不显示隐藏文件:" prop="checkPass">
<el-checkbox ></el-checkbox>
......@@ -252,7 +252,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeFileModal()">取 消</el-button>
<el-button type="primary" @click="FileModal = false">确 定</el-button>
<el-button type="primary" @click="FileModal = false">确 定</el-button>
</span>
</el-dialog>
<!-- 弹窗5end -->
......@@ -277,28 +277,28 @@
ref="tree"
:props="defaultProps"
:highlight-current="true"> -->
<!-- el-icon-folder -->
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<span>
<i :class="data.icon"></i>{{ node.label }}
</span>
</span>
</span> -->
<!-- <span class="custom-tree-node" slot-scope="{node,data}">
<span>
<i class="el-icon-folder"></i>{{ node.label }}
</span>
</span>
</span>
</el-tree> -->
<!-- 文件夹存放区域end -->
</div>
<span slot="footer" class="dialog-footer" style="display:flex;">
<el-select style="flex:1;margin-right:25px;" v-model="ruleForm.region" placeholder="请选择选择数据库连接">
......@@ -306,7 +306,7 @@
<el-option label="区域二" value="beijing"></el-option>
</el-select>
<el-button @click="FileModalScan = false">取 消</el-button>
<el-button type="primary" @click="FileModalScan = false">确 定</el-button>
<el-button type="primary" @click="FileModalScan = false">确 定</el-button>
</span>
</el-dialog>
<!-- 弹窗6end -->
......@@ -373,7 +373,7 @@ export default {
feature,//特征列表
establishDialog,
// Establish,//新建转换,新建作业,新建目录弹窗
},
props: ["dragItem"],
......@@ -381,7 +381,7 @@ props: ["dragItem"],
return {
blankCanvas:"",//空白画布xml
graph:null,
flowData:[],
flowData:[],
exportDialogVisible:false,//导出资源库弹窗
curDataBase:null,//当前选择的资源库
......@@ -391,7 +391,7 @@ props: ["dragItem"],
estabTitle:'转换',//新建转换弹窗提示
featureDialogVisible:false,//特征列表弹窗
scanDialogVisible:false,//浏览弹窗
prefix:'http://192.168.0.2:9700/etlweb/',
prefix:this.etlWeb,
inputValue:'',// 密码
// dropFunction,//删除数据库表
deleteLink,//删除资源库模块的方法
......@@ -473,7 +473,7 @@ props: ["dragItem"],
// logLevel:[
// {required:true,message:'请选择日志级别',trigger:'change'}
// ],
},
checkModel:[],
visible:true,
......@@ -532,7 +532,7 @@ props: ["dragItem"],
fileTreeList:[
{ iconCls:"imageFolder",
path:"/",
childen:[]},
childen:[]},
// {
// "id":"f1e1928d205b49a8b4ceda97d51074c1",
// "text":"45",
......@@ -610,7 +610,7 @@ props: ["dragItem"],
childenTreeList:[],
// defaultProps: {
// label: 'path',
// children: 'children',
// children: 'children',
// },
defaultProps: {
label: "text",
......@@ -630,8 +630,8 @@ props: ["dragItem"],
dialogVisibleThree:false,//资源库信息弹窗
dialogVisibleFourth:false,
// linkType:[
// {value: 0, text: '一般'},
// {value: 1, text: '高级'},
// {value: 0, text: '一般'},
// {value: 1, text: '高级'},
// {value: 2, text: '选项'},
// {value: 3, text: '连接池'},
// {value: 4, text: '集群'}
......@@ -647,30 +647,30 @@ props: ["dragItem"],
mounted () {
this.dragControllerDiv();//左右窗体调整宽度
// this.treeRevert(this.jobTreeList);
// this.accessData();//页面一加载就获取连接类型
this.explorer('');//获取文件夹列表
// console.log(this.$refs.establishDia.linkType,'55555555555555555')
// this.$nextTick(function () {
// console.log(this.$refs.establishDia,'========')
// // this.$refs.establishDia.accessData();//页面一加载就获取连接类型
// this.$refs.establishDia.accessData();//页面一加载就获取连接类型
// })
// this.dialogVisibleFourth=true
// this.$refs.scanDialog.dataBaseScan(formData);
},
methods: {
......@@ -679,15 +679,15 @@ props: ["dragItem"],
//接收子组件显示画布
shooStatus(e){
console.log(e,'接收子组件显示画布')
this.$nextTick(()=>{
this.mxGraphShow = e
})
},
......@@ -699,11 +699,11 @@ props: ["dragItem"],
formData.append('path', path);
formData.append('node', 'xnode-14');
this.$forceUpdate();
explorer(formData).then(res=>{
if (res) {
explorer(formData).then(res=>{
if (res) {
if(path==''){
console.log('点击当前path==',path);
this.fileTreeList=res;
// this.fileTreeList=JSON.stringify(this.fileTreeList);
}else{
......@@ -711,17 +711,17 @@ props: ["dragItem"],
this.childenTreeList=res;
console.log('子节点2path==',this.childenTreeList);
}
}else {
this.$message.error(res.errMsg)
}
})
},
// 左边文件夹和右边画布的宽度可以拖拽调整
dragControllerDiv: function () {
var resize = document.getElementsByClassName('resize');
......@@ -772,7 +772,7 @@ props: ["dragItem"],
return {...pre, [cur['id']]: cur}
}, {});
console.log(formatObj);
let formatArray = arrayList.reduce((arr, cur) => {
// let pid = cur.pid ? cur.pid : 0;
let pid = cur.parent ? cur.parent : 0;
......@@ -786,11 +786,11 @@ props: ["dragItem"],
return arr;
}, []);
console.log('树形数据=============',formatArray);
// this.jobTreeList=formatArray;
},
// 打开关闭弹窗
showModalOne(){
console.log('打卡资源库连接:');
......@@ -802,7 +802,7 @@ props: ["dragItem"],
this.listHoverIdx=-1;//清空当前鼠标移动到的数据
this.listCheckedIdx=-2;//清空当前鼠标选中的数据
},
showModalTwo(){
this.dialogVisibleTwo=true;
this.types();
......@@ -810,7 +810,7 @@ props: ["dragItem"],
handleCloseTwo(){
this.dialogVisibleTwo=false;
},
showModalThree(typeCheckedIdx){
console.log('当前点击---',typeCheckedIdx);
if(typeCheckedIdx==0){
......@@ -819,7 +819,7 @@ props: ["dragItem"],
if(typeCheckedIdx==1){
this.FileModal=true;
}
},
handleCloseThree(){
this.dialogVisibleThree=false;
......@@ -829,11 +829,11 @@ props: ["dragItem"],
this.dialogVisibleFourth=true;
this.$refs.establishDia.database();
// this.accessData();//获取连接类型
this.$refs.establishDia.accessMethod();//获取连接方式
this.$refs.establishDia.accessMethod();//获取连接方式
// console.log('this.methodHoverIdx==',this.methodHoverIdx);
// console.log('this.methodCheckedIdx==',this.methodCheckedIdx);
},
//获取新建弹窗返回来的值
getSonValue(res){
......@@ -852,7 +852,7 @@ props: ["dragItem"],
// this.methodCheckedIdx=0;//关闭弹窗后初始化选择oracle数据对应第一条
// this.addFlag=true;//增减变量改为编辑变量
// },
closeFileModal(){
this.FileModal=false;
},
......@@ -868,7 +868,7 @@ props: ["dragItem"],
// 获取资源库连接类型
types(){
types().then(res=>{
if (res) {
if (res) {
console.log('获取类型成功!');
this.typesList=res;
}else {
......@@ -879,7 +879,7 @@ props: ["dragItem"],
// 获取历史建立的连接资源库列表
getLinkList(){
getLinkList().then(res=>{
if (res) {
if (res) {
console.log('获取历史连接资源库列表:');
this.linkList=res;
}else {
......@@ -892,7 +892,7 @@ props: ["dragItem"],
comfirmCreate(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
// JSON对象转成formData对象
var params=this.createModel;
// 由于高级选项连接池集群页面没有画完,保存默认参数
......@@ -921,24 +921,24 @@ props: ["dragItem"],
this.dialogVisibleFourth=false;//关闭弹窗
this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择的数据
this.listNames();//刷新已经创建的数据库列表
}else {
this.$message.error(res.message)
}
})
}else {
this.$message.error(res.message)
}
})
}
});
},
//查询已经建立的所有数据库列表
listNames(){
listNames().then(res=>{
if (res) {
if (res) {
console.log('获取所有已经创建的数据库列表:',res);
this.namesList=res;
}else {
......@@ -947,7 +947,7 @@ props: ["dragItem"],
})
},
//选择数据库编辑
selectNameFunc(e){
selectNameFunc(e){
console.log('当前选中的数',e);
console.log('当前选中的数-===',this.selectName);
},
......@@ -957,30 +957,30 @@ props: ["dragItem"],
},
editDataBaseModal(){
if(this.selectName){
this.dialogVisibleFourth=true;
this.dialogVisibleFourth=true;
// this.addFlag=false;//增减变量改为编辑变量
}
this.$refs.establishDia.database(this.selectName);
this.$refs.establishDia.accessMethod();//获取连接方式
// console.log('this.methodHoverIdx==',this.methodHoverIdx);
// console.log('this.methodCheckedIdx==',this.methodCheckedIdx);
},
// 资源库连接
loginRepository(formName){
console.log('进入登录==========');
this.$refs[formName].validate((valid) => {
if (valid) {
if (valid) {
// JSON对象转成formData对象
var params=this.loginModel;
params.atStartupShown=false;//在启动时显示此对话框默认为 false
console.log('登录提交参数==',params);
var formData = new FormData();
formData.append('loginInfo', JSON.stringify(params));
formData.append('loginInfo', JSON.stringify(params));
console.log('提交转换数据:',formData);
loginRepository(formData).then(res=>{
console.log('返回数据:',res);
......@@ -988,13 +988,13 @@ props: ["dragItem"],
this.$message.success('连接成功!');
this.explorer('');
this.handleCloseOne();//关闭弹窗
// this.linkCheckedIdx=this.initlinkTypeIdx;//关闭弹窗后初始化选择的数据
}else {
this.$message.error(res.errMsg)
}
})
} else {
console.log('error submit!!');
return false;
......@@ -1037,7 +1037,7 @@ props: ["dragItem"],
// 资源库信息确定新建
repositoryInfoConfirm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
if (valid) {
// JSON对象转成formData对象
var params=this.repositoryInfoModel;
params.type='KettleDatabaseRepository';//写死
......@@ -1051,7 +1051,7 @@ props: ["dragItem"],
console.log('提交数据:',res);
if (res.success) {
this.$message.success('成功!');
this.handleCloseThree();// 关闭弹窗1
this.handleCloseTwo();//关闭弹窗2
this.getLinkList();//刷新列表
......@@ -1062,7 +1062,7 @@ props: ["dragItem"],
this.$message.error(res.errMsg)
}
})
} else {
console.log('error submit!!');
return false;
......@@ -1111,7 +1111,7 @@ props: ["dragItem"],
var formData = new FormData();
formData.append('databaseInfo', JSON.stringify(params));
console.log('表单提交参数==',params);
this.$refs.feature.feature(formData);
this.featureDialogVisible = true;
},
......@@ -1150,7 +1150,7 @@ props: ["dragItem"],
// formData.append('nodeId', '');
// formData.append('text', 'root');
// formData.append('node', 'xnode-2984');
// formData.append('node', 'xnode-2984');
this.$refs.scanDialog.dataBaseScan(formData);
this.scanDialogVisible = true;
},
......@@ -1160,7 +1160,7 @@ props: ["dragItem"],
formData.append('repositoryName', this.loginModel.reposityId);
console.log('参数==',formData);
remove(formData).then(res=>{
if (res) {
if (res) {
this.$message.success('成功!');
this.getLinkList();//打开资源库连接弹窗同时获取历史连接记录
......@@ -1176,7 +1176,7 @@ props: ["dragItem"],
this.estabTitle='转换';
}else{
this.$message.error('请选择资源库中的一个目录');
}
}
},
// 新建任务
createJob(){
......@@ -1185,8 +1185,8 @@ props: ["dragItem"],
this.estabTitle='任务';
}else{
this.$message.error('请选择资源库中的一个目录');
}
}
},
// 新建目录
createFile(){
......@@ -1195,8 +1195,8 @@ props: ["dragItem"],
this.estabTitle='目录';
}else{
this.$message.error('请选择资源库中的一个目录');
}
}
},
handleNodeClick(data,node){
console.log('点击当前节点===',node);
......@@ -1219,20 +1219,20 @@ props: ["dragItem"],
// decoder.decode(node, graph.getModel());
// console.log(esponse.responseText);
})
},
//修改资源库
editDataBase(){
if(this.curDataBase){
editDataBase(){
if(this.curDataBase){
this.repositoryInfoModel.name=this.curDataBase.name;
this.repositoryInfoModel.description=this.curDataBase.description;
this.selectName=this.curDataBase.extraOptions.database;
this.dialogVisibleThree=true;
}else{
this.$message.error('请选择一个资源库');
}
......@@ -1243,7 +1243,7 @@ props: ["dragItem"],
formData.append('connection', this.selectName);
console.log('参数==',formData);
checkInit(formData).then(res=>{
if (res) {
if (res) {
this.$message.success('成功!');
// this.getLinkList();//打开资源库连接弹窗同时获取历史连接记录
......@@ -1259,12 +1259,12 @@ props: ["dragItem"],
}
}
};
</script>
......@@ -1272,4 +1272,4 @@ props: ["dragItem"],
<style>
@import url(./kettle.css);
</style>
\ No newline at end of file
</style>
......@@ -2,7 +2,7 @@ import mxgraph from './mx.js'
import { steps } from '@/api/kettle/link'
const MxConstants = mxgraph.mxConstants
const prefix = '192.168.0.2:9700/etlweb/'
const prefix = this.etlWeb
const bar = []
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