Commit dc68a2b0 by 李耀锟

优化树形控件和查看数据弹窗

parent b83d37e5
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
"vuedraggable": "2.20.0", "vuedraggable": "2.20.0",
"vuex": "3.1.0", "vuex": "3.1.0",
"wangeditor": "^3.1.1", "wangeditor": "^3.1.1",
"xlsx": "^0.14.1", "xlsx": "^0.14.5",
"xml2js": "^0.4.23" "xml2js": "^0.4.23"
}, },
"devDependencies": { "devDependencies": {
......
<template> <template>
<div> <div >
<el-tree <el-tree
:data="browsingData" :data="browsingData"
:props="defaultProps" :props="defaultProps"
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
lazy lazy
ref="tree" ref="tree"
:load="loadDataTree" :load="loadDataTree"
> >
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span style="display: flex; align: center"> <span style="display: flex; align: center">
...@@ -45,7 +46,11 @@ export default { ...@@ -45,7 +46,11 @@ export default {
}; };
}, },
created() {}, created() {},
methods: { methods: {
loadDataTree(node, resolve) { loadDataTree(node, resolve) {
if (node.level === 0) { if (node.level === 0) {
...@@ -109,4 +114,16 @@ export default { ...@@ -109,4 +114,16 @@ export default {
padding: 0 10px; padding: 0 10px;
white-space: nowrap; white-space: nowrap;
} }
.el-tree {
min-width: 100%;
display: inline-block;
}
.tree {
overflow:auto;
max-height: 200px;
}
.el-dialog__body{
height: 600px;
overflow-y:auto;
}
</style> </style>
\ No newline at end of file
...@@ -570,15 +570,15 @@ ...@@ -570,15 +570,15 @@
<el-form-item label="要求:"> <el-form-item label="要求:">
<el-select v-model="formFile.file_required" style="width: 100%"> <el-select v-model="formFile.file_required" style="width: 100%">
<el-option label="是" value="1"></el-option> <el-option label="Y" value="Y"></el-option>
<el-option label="否" value="0"></el-option> <el-option label="N" value="N"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="包含子目录:"> <el-form-item label="包含子目录:">
<el-select v-model="formFile.include_subfolders" style="width: 100%"> <el-select v-model="formFile.include_subfolders" style="width: 100%">
<el-option label="是" value="1"></el-option> <el-option label="Y" value="Y"></el-option>
<el-option label="否" value="0"></el-option> <el-option label="N" value="N"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -903,11 +903,11 @@ ...@@ -903,11 +903,11 @@
<el-dialog <el-dialog
title="数据浏览" title="数据浏览"
:visible.sync="dataFlow" :visible.sync="dataFlow"
width="500px" width="1000px"
:before-close="handleClose" :before-close="handleClose"
> >
<el-table :data="dataBrowsing" border style="width: 100%"> <el-table :data="dataBrowsing" border style="width: 100%" height="600">
<el-table-column <el-table-column
v-for="item in dataField" v-for="item in dataField"
:key="item.index" :key="item.index"
...@@ -928,7 +928,6 @@ ...@@ -928,7 +928,6 @@
<script> <script>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
// 使用修改后的jsplumb // 使用修改后的jsplumb
import lodash from "lodash"; //JavaScript 实用工具库 import lodash from "lodash"; //JavaScript 实用工具库
import { import {
excelSheetType, excelSheetType,
...@@ -991,6 +990,10 @@ export default { ...@@ -991,6 +990,10 @@ export default {
data() { data() {
return { return {
upload_file: "", //获取excel文件
lists: [],//获取excel 文件里的字段
nodeData:[], nodeData:[],
dataBrowsing:[], dataBrowsing:[],
dataField:[], dataField:[],
...@@ -1190,9 +1193,21 @@ dataFlow:false, ...@@ -1190,9 +1193,21 @@ dataFlow:false,
methods: { methods: {
getTheField(){ getTheField(){
this.form.file = JSON.stringify(this.file)
for (let name in this.form) {
var edit = new mxCellAttributeChange(
this.nodeData,
name,
this.form[name]
);
this.graph.getModel().execute(edit);
}
var enc = new mxCodec(mxUtils.createXmlDocument()); var enc = new mxCodec(mxUtils.createXmlDocument());
var node = enc.encode(this.graph.getModel()); var node = enc.encode(this.graph.getModel());
this.graphXml = mxUtils.getPrettyXml(node); this.graphXml = mxUtils.getPrettyXml(node);
console.log(this.graphXml,"获取字段");
let pamerFields = new FormData(); // 创建form对象 let pamerFields = new FormData(); // 创建form对象
pamerFields.append("stepName", this.nodeData.value.attributes.label.value) pamerFields.append("stepName", this.nodeData.value.attributes.label.value)
...@@ -1423,7 +1438,10 @@ dataFlow:false, ...@@ -1423,7 +1438,10 @@ dataFlow:false,
addFilePathSelection() { addFilePathSelection() {
this.filePathSelection = !this.filePathSelection; this.filePathSelection = !this.filePathSelection;
if (this.routeState == 1) { if (this.routeState == 1) {
this.localPath.include_subfolders = "N"
this.file.push(this.localPath); this.file.push(this.localPath);
} else if (this.routeState == 2) { } else if (this.routeState == 2) {
this.form.bad_line_files_destination_directory = this.localPath.name; this.form.bad_line_files_destination_directory = this.localPath.name;
} else if (this.routeState == 3) { } else if (this.routeState == 3) {
......
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