Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ETL-admin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
莫晓莉
ETL-admin
Commits
d5093a79
Commit
d5093a79
authored
Mar 31, 2021
by
李耀琨
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
f0cb22fa
4febc18a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
313 additions
and
87 deletions
+313
-87
.merge_file_a26720
+0
-0
src/api/kettle/file.js
+11
-0
src/assets/styles/index.scss
+1
-1
src/main.js
+3
-1
src/views/dashboard-kettle/components/designer/modules/node.vue
+1
-1
src/views/dashboard-kettle/components/designer/modules/node_menu.vue
+12
-13
src/views/dashboard-kettle/components/designer/modules/node_menu2.vue
+5
-3
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
+20
-10
src/views/dialogs-components/global/export-tree/main.vue
+8
-9
src/views/dialogs-components/global/in-repository/main.vue
+16
-17
src/views/dialogs-components/global/table-list/index.js
+3
-0
src/views/dialogs-components/global/table-list/main.vue
+115
-0
src/views/kettle/home2.vue
+0
-0
src/views/kettle/toolbar.js
+1
-1
src/views/output-dialog/table-out.vue
+117
-31
No files found.
.merge_file_a26720
0 → 100644
View file @
d5093a79
This diff is collapsed.
Click to expand it.
src/api/kettle/file.js
View file @
d5093a79
...
...
@@ -218,6 +218,17 @@ export function imp(data) {
})
}
//获取表输出
export
function
inputOutputFields
(
data
)
{
return
request
({
url
:
'etlweb/trans/inputOutputFields'
,
data
,
method
:
'post'
})
}
...
...
src/assets/styles/index.scss
View file @
d5093a79
...
...
@@ -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;}
...
...
src/main.js
View file @
d5093a79
...
...
@@ -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
,
...
...
src/views/dashboard-kettle/components/designer/modules/node.vue
View file @
d5093a79
...
...
@@ -35,7 +35,7 @@
},
data
()
{
return
{
prefix
:
'http://192.168.0.44:9882/etlweb/'
,
prefix
:
this
.
etlWeb
,
}
},
computed
:
{
...
...
src/views/dashboard-kettle/components/designer/modules/node_menu.vue
View file @
d5093a79
<
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>
{{
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
)
{
...
...
src/views/dashboard-kettle/components/designer/modules/node_menu2.vue
View file @
d5093a79
...
...
@@ -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
)
...
...
src/views/dashboard-kettle/components/designer/mxgraphDesigner.vue
View file @
d5093a79
...
...
@@ -1293,6 +1293,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,
...
...
@@ -1311,10 +1323,6 @@ export default {
// this.xmlDocuments = mxUtils.parseXml(
// decodeURIComponent(this.blankCanvas)
// );
// console.log(this.xmlDocuments, "拖拽");
// var oSerializer = new XMLSerializer();
// console.log(oSerializer.serializeToString(this.xmlDocuments));
...
...
@@ -1338,7 +1346,8 @@ export default {
this
.
graph
.
getModel
().
beginUpdate
();
try
{
var
cell
=
this
.
graph
.
insertVertex
(
this
.
graph
.
getDefaultParent
(),
null
,
res
.
documentElement
,
x
,
y
,
width
,
height
,);
var
cell
=
this
.
graph
.
insertVertex
(
this
.
graph
.
getDefaultParent
(),
null
,
res
.
documentElement
,
x
,
y
,
width
,
height
,
style
);
cell
.
title
=
toolItem
[
"title"
];
cell
.
ids
=
toolItem
[
"id"
];
cell
.
pluginId
=
toolItem
[
"pluginId"
];
...
...
@@ -1366,20 +1375,21 @@ this.graph.getModel().beginUpdate();
//选择
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
.
inner
HTML
,
title
:
dom
.
inner
Text
,
id
:
dom
.
id
,
width
:
60
,
height
:
60
,
width
:
50
,
height
:
50
,
icon
:
dom
.
attributes
[
"icon"
].
nodeValue
,
// value: dom.pluginId,
pluginId
:
dom
.
getAttribute
(
"pluginId"
),
icon
:
dom
.
getAttribute
(
"icon"
),
};
const
{
width
,
height
}
=
toolItemObj
;
...
...
src/views/dialogs-components/global/export-tree/main.vue
View file @
d5093a79
...
...
@@ -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
>
src/views/dialogs-components/global/in-repository/main.vue
View file @
d5093a79
...
...
@@ -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
>
src/views/dialogs-components/global/table-list/index.js
0 → 100644
View file @
d5093a79
import
main
from
'./main.vue'
export
default
main
\ No newline at end of file
src/views/dialogs-components/global/table-list/main.vue
0 → 100644
View file @
d5093a79
<
template
>
<div>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<template
v-for=
"(item,index) in tableHead"
>
<el-table-column
:prop=
"item.column_name"
:label=
"item.column_comment"
:key=
"index"
></el-table-column>
</
template
>
<el-table-column
label=
"操作"
width=
"100px"
>
<
template
slot-scope=
"scope"
>
<el-button
@
click=
"editField(false, scope.row)"
type=
"text"
size=
"small"
>
编辑
</el-button
>
<el-button
type=
"text"
size=
"small"
@
click=
"deletefield(scope.$index, tableData)"
>
删除
</el-button
>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
{
getFileexplorer
,
getFilextension
}
from
"@/api/kettle/file"
;
export
default
{
name
:
"table-list"
,
data
()
{
return
{
fieldForm
:
{},
// field: false,
dataState
:
false
,
fieldFormat
:
[],
fieldType
:
[],
// 表头数据
// tableHead2:[
// {
// column_name: "column_name",column_comment:"表字段"
// },
// {
// column_name: "column_age",column_comment:"流字段"
// },
// ],
// // 表格数据
// tableData2: [{
// column_age: '3',
// column_name: '鞠婧祎',
// },
// {
// column_age: '25',
// column_name: '魏大勋',
// },
// {
// column_age: '18',
// column_name: '关晓彤',
// }],
}
},
props
:
{
tableHead
:
Array
,
tableData
:
Array
,
field
:
Boolean
,
fieldClick
:
Function
},
created
()
{
},
methods
:
{
editField
(
state
,
val
)
{
// this.field = !this.field;
this
.
$emit
(
"update:field"
,
true
);
this
.
fieldClick
(
state
,
val
);
// this.dataState = state;
// if (state) {
// this.fieldForm = {};
// } else {
// this.fieldForm = val;
// }
},
// handleClose(){},
deletefield
(
index
,
rows
)
{
rows
.
splice
(
index
,
1
);
},
// 字段
// addField() {
// this.field = !this.field;
// if (this.dataState) {
// this.tableData.push(this.fieldForm);
// } else {
// }
// },
},
};
</
script
>
<
style
>
.type-checked
{
background-color
:
#8888ff
;
color
:
#fff
;
}
</
style
>
\ No newline at end of file
src/views/kettle/home2.vue
View file @
d5093a79
This diff is collapsed.
Click to expand it.
src/views/kettle/toolbar.js
View file @
d5093a79
...
...
@@ -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对象
...
...
src/views/output-dialog/table-out.vue
View file @
d5093a79
...
...
@@ -132,16 +132,58 @@
<el-tab-pane
label=
"数据库字段"
name=
"oher "
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
新增字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
@
click=
"fieldClick(true)"
>
新增字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
删除字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
获取字段
</el-button>
<el-button
style=
"padding: 3px 0"
type=
"text"
>
输入字段映射
</el-button>
</div>
<el-table
style=
"width: 100%"
border
:data=
"tableData2"
>
<
!--
<
el-table
style=
"width: 100%"
border
:data=
"tableData2"
>
<template
v-for=
"(item,index) in tableHead2"
>
<el-table-column
:prop=
"item.column_name"
:label=
"item.column_comment"
:key=
"index"
v-if=
"item.column_name != 'id'"
></el-table-column>
</
template
>
</el-table>
</el-table>
-->
<table-list
ref=
"tableDia"
:tableHead=
"tableHead"
:tableData=
"tableData"
:field
.
sync=
"editDia"
:fieldClick=
"fieldClick"
></table-list>
<!-- 编辑弹窗开始=========== -->
<el-dialog
title=
"编辑"
:visible
.
sync=
"field"
width=
"500px"
:before-close=
"handleCloseEdit"
append-to-body
>
<el-form
ref=
"form"
:model=
"fieldForm"
label-width=
"80px"
>
<!-- <el-checkbox-group v-model="checkedCities" style="width:100%;">
<el-checkbox > -->
<el-form-item
label=
"表字段:"
>
<el-select
v-model=
"fieldForm.column_name"
style=
"width: 100%"
>
<el-option
label=
"不去掉空格"
value=
"none"
></el-option>
<el-option
label=
"去掉左空格"
value=
"left"
></el-option>
<el-option
label=
"去掉右空格"
value=
"right"
></el-option>
<el-option
label=
"去掉左右两端空格"
value=
"both"
></el-option>
</el-select>
</el-form-item>
<!-- </el-checkbox> -->
<!-- <el-checkbox > -->
<el-form-item
label=
"流字段:"
>
<el-select
v-model=
"fieldForm.stream_name"
style=
"width: 100%"
>
<el-option
label=
"不去掉空格"
value=
"none"
></el-option>
<el-option
label=
"去掉左空格"
value=
"left"
></el-option>
<el-option
label=
"去掉右空格"
value=
"right"
></el-option>
<el-option
label=
"去掉左右两端空格"
value=
"both"
></el-option>
</el-select>
</el-form-item>
<!-- </el-checkbox>
</el-checkbox-group> -->
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"field = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"addField"
>
确 定
</el-button>
</span>
</el-dialog>
<!-- 编辑弹窗结束============ -->
</el-card>
</el-tab-pane>
</el-tabs>
...
...
@@ -155,9 +197,18 @@
</template>
<
script
>
import
{
inputOutputFields
,
//获取表输出
}
from
"@/api/kettle/file"
;
export
default
({
data
(){
return
{
field
:
false
,
//编辑弹窗
checkedCities
:
[
'上海'
,
'北京'
],
editDia
:
false
,
//编辑表字段
fieldForm
:{},
//编辑弹窗
radioTreaty
:
'0'
,
tableOutForm
:{
commit
:
"1000"
,
...
...
@@ -191,6 +242,31 @@ export default ({
include_subfolders
:
"1"
,
},
],
// 表头数据
tableHead
:[
{
column_name
:
"column_name"
,
column_comment
:
"表字段"
},
{
column_name
:
"stream_name"
,
column_comment
:
"流字段"
},
],
// 表格数据
tableData
:
[{
stream_name
:
'3'
,
column_name
:
'鞠婧祎'
,
},
{
stream_name
:
'25'
,
column_name
:
'魏大勋'
,
},
{
stream_name
:
'18'
,
column_name
:
'关晓彤'
,
}],
// 表头数据
tableHead2
:[
{
...
...
@@ -253,38 +329,48 @@ export default ({
handleClose
(){
this
.
$emit
(
"update:tableOutPutVisible"
,
false
);
},
//新建转换
createTrans
(){
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
formData
.
append
(
'dir'
,
this
.
nodePath
);
formData
.
append
(
'transName'
,
this
.
inputValue
);
// console.log('新建提交参数==',params);
createTrans
(
formData
).
then
(
res
=>
{
if
(
res
)
{
this
.
$message
.
success
(
'创建成功!'
);
this
.
explorer
(
''
);
this
.
$emit
(
"update:estabDialogVisible"
,
false
);
}
else
{
this
.
$message
.
error
(
res
.
errMsg
)
}
//获取表输出
inputOutputFields
(){
// var enc = new mxCodec(mxUtils.createXmlDocument());
// var node = enc.encode(graph.getModel());
// store.baseParams.stepName = encodeURIComponent(cell.getAttribute('label'));
// store.baseParams.graphXml = mxUtils.getPrettyXml(node);
// store.baseParams.before = true
let
pamer
=
new
FormData
();
// 创建form对象
pamer
.
append
(
"stepName"
,
this
.
nodePath
);
pamer
.
append
(
"graphXml"
,
"transformation"
);
pamer
.
append
(
"before"
,
true
);
pamer
.
append
(
"query"
,
''
);
inputOutputFields
(
pamer
).
then
(
res
=>
{
console
.
log
(
res
,
'返回空白画布xml'
);
this
.
blankCanvas
=
res
})
},
// 上传
handleChange
(
file
,
fileList
)
{
// console.log(file);
this
.
fileList
=
fileList
.
slice
(
-
3
);
this
.
tableData
.
push
({
name
:
file
.
name
});
// console.log(this.tableData);
// this.getObjectURL(file.raw)
// console.log(this.getObjectURL(file.raw));
//新增或者编辑弹窗
fieldClick
(
state
,
val
)
{
this
.
field
=
!
this
.
field
;
this
.
dataState
=
state
;
if
(
state
)
{
this
.
fieldForm
=
{};
}
else
{
this
.
fieldForm
=
val
;
}
},
//关闭编辑的弹窗
handleCloseEdit
(){
this
.
field
=
!
this
.
field
;
},
addSheet
(){},
fileChnageInput
(
e
)
{
console
.
log
(
e
);
// 字段
addField
()
{
this
.
field
=
!
this
.
field
;
console
.
log
(
'添加的字段==='
,
this
.
fieldForm
);
if
(
this
.
dataState
)
{
this
.
tableData
.
push
(
this
.
fieldForm
);
}
},
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment