Commit 71d6b5a6 by 莫晓莉

脚本--执行脚本保存和回显。文件夹浏览选择所有文件

parent 1807c413
......@@ -44,7 +44,7 @@
<el-option v-for="(item,index) in allTreeList" :key="index" :label="item.desc" :value="item.type"></el-option>
</el-select> -->
<span slot="footer" class="dialog-footer" style="display:flex;">
<el-select v-model="allValue" style="width: 100%;margin-right:15px;">
<el-select v-model="allValue" style="width: 100%;margin-right:15px;" @change="selectType">
<el-option v-for="(item,index) in allTreeList" :key="index" :label="item.desc" :value="item.type"></el-option>
</el-select>
<el-button @click="handleClose">取 消</el-button>
......@@ -63,7 +63,8 @@ export default {
name: "file-tree",
data() {
return {
allValue:'',
extension:0,
allValue:null,
allTreeList:[],//所有文件
defaultProps: {
label: "text",
......@@ -83,14 +84,14 @@ export default {
// listNames: Function, //父传过来的方法
},
created() {
this.getFilextension();//获取所有文件
// this.getFilextension();//获取所有文件
},
methods: {
// 获取文件树
getFileTreeList(path,node){
var formData = new FormData();
formData.append("path",path);
formData.append("extension", 0);
formData.append("extension", this.extension);
formData.append("node", node);
getFileexplorer(formData).then((res) => {
if (res) {
......@@ -114,6 +115,7 @@ export default {
if (node.level === 0) {
var par='';
this.getFileTreeList(par,'xnode-5140');
this.getFilextension();
return resolve(this.fileTreeList);
} else {
var path = node.data.id;
......@@ -121,7 +123,7 @@ export default {
var formData = new FormData();
formData.append("path",path);
formData.append("extension", 0);
formData.append("extension", this.extension);
formData.append("node", node);
getFileexplorer(formData).then((res) => {
if (res) {
......@@ -151,12 +153,23 @@ export default {
getFilextension(formData).then((res) => {
if (res) {
this.allTreeList = res;
// this.getFileTreeList(par,'xnode-5140');
} else {
this.$message.error(res.errMsg);
}
});
},
selectType(e){
console.log("选择--",e);
if(e==1){
this.extension=1;
this.getFileTreeList('','xnode-5140');
}
},
// 点击选择当前节点
handleNodeClick(data,node){
......@@ -168,6 +181,9 @@ export default {
},
confirmChoose() {
this.extension=0;//重置所有文件为空
this.allTreeList=[];//重置所有文件为空
this.allValue=null;
var curName=this.formName;
this.excelForm[curName]=this.curChooseNode.data.id;
this.$emit("excelForm",this.excelForm);
......@@ -178,6 +194,9 @@ export default {
handleClose() {
this.$emit("update:fileDialogVisible", false);
this.extension=0;//重置所有文件为空
this.allTreeList=[];//重置所有文件为空
this.allValue=null;
},
},
};
......
......@@ -56,7 +56,7 @@
<el-form-item label-width="100px">
<el-row :gutter="10">
<el-col :span="20">
<el-input :disabled="myForm.specification_method=='rep_name'? false:true" v-model="myForm.jobname"></el-input>
<el-input :disabled="myForm.specification_method=='rep_name'? false:true" v-model="myForm.transname"></el-input>
</el-col>
<el-col class="line" :span="3">
......@@ -76,11 +76,11 @@
<el-form-item label-width="100px" >
<el-row :gutter="10">
<el-col :span="20">
<el-input :disabled="myForm.specification_method=='rep_ref'? false:true" v-model="myForm.referenceName"></el-input>
<el-input :disabled="myForm.specification_method=='rep_ref'? false:true" v-model="myForm.trans_object_id"></el-input>
</el-col>
<el-col class="line" :span="3">
<el-button size="mini" :disabled="myForm.specification_method=='rep_ref'? false:true" v-model="myForm.referenceName" >选择</el-button></el-col
<el-button size="mini" :disabled="myForm.specification_method=='rep_ref'? false:true" >选择</el-button></el-col
>
</el-row>
</el-form-item>
......
......@@ -72,7 +72,7 @@
<div slot="header" class="clearfix">
<span>Case值映射</span>
<el-button style="padding: 3px 0;margin-left:50px;" type="text" @click="fieldClick(true)">新增字段</el-button>
<!-- <el-button style="padding: 3px 0" type="text" @click="inputOutputFields('get')">获取字段</el-button> -->
<el-button style="padding: 3px 0" type="text" @click="inputOutputFields('get')">获取字段</el-button>
<el-button style="padding: 3px 0" type="text" @click="deleteFields">删除全部</el-button>
</div>
<table-list ref="tableDia" :tableHead="tableHead" :tableData="tableData" :field.sync="editDia" :fieldClick="fieldClick"></table-list>
......
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