qinzhipeng_v 5 years ago
parent
commit
ca8c1c635c
1 changed files with 25 additions and 2 deletions
  1. 25 2
      src/views/Platform/useCasePage.vue

+ 25 - 2
src/views/Platform/useCasePage.vue

@@ -9,7 +9,9 @@
           <el-aside width="17%" style=" background: #FFF;margin: 1% 0 1% 1%; border-radius:8px;">
           <el-aside width="17%" style=" background: #FFF;margin: 1% 0 1% 1%; border-radius:8px;">
             <div class="nav_Input" style="min-height:90vh;">
             <div class="nav_Input" style="min-height:90vh;">
               <br>
               <br>
-              <p v-show="node_Data" style="cursor: pointer; margin: 100% 0;font-size:14px; text-align:center;" @click="createFolder">新建文件夹</p>
+              <div v-show="node_Data" align="center">
+                <el-button v-show="node_Data" style="cursor: pointer; margin: 100% 0;font-size:14px; text-align:center; border: 1px solid #FFFFFF;" icon="el-icon-circle-plus-outline" @click="createFolder">新建文件夹</el-button>
+              </div>
               <el-tree
               <el-tree
                 v-if="dataShow"
                 v-if="dataShow"
                 style="overflow-x:auto; min-width:100%;display:inline-block !important"
                 style="overflow-x:auto; min-width:100%;display:inline-block !important"
@@ -118,7 +120,14 @@
             </el-main>
             </el-main>
             <!-- xmind -->
             <!-- xmind -->
             <el-main style="background:#ffffff; width:98%;margin:0% 1% 1% 1%; font-size:14px;border-radius:8px;">
             <el-main style="background:#ffffff; width:98%;margin:0% 1% 1% 1%; font-size:14px;border-radius:8px;">
-              <el-button type="primary" size="mini" style="margin-left:1%;" @click="upload_File()">导入</el-button>
+              <el-button type="primary" size="mini" style="margin-left:1%;" @click="upload_File()">导入</el-button><br>
+              <el-upload
+                class="upload-demo"
+                action="http://star.xiaojukeji.com/upload/img.node"
+                :on-change="handleChange"
+              >
+                <el-button size="small" type="primary">导入</el-button>
+              </el-upload>
               <el-table :data="grid_xmind" size="mini" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" style="width: 100%; font-size:13px;margin-top:1%;" border @select-all="clickAllData" @selection-change="handleSelectionChange">
               <el-table :data="grid_xmind" size="mini" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" style="width: 100%; font-size:13px;margin-top:1%;" border @select-all="clickAllData" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" min-width="50" align="center" @change="clickAllData(gridData)" />
                 <el-table-column type="selection" min-width="50" align="center" @change="clickAllData(gridData)" />
                 <el-table-column prop="name" label="文件名" min-width="80" align="center">
                 <el-table-column prop="name" label="文件名" min-width="80" align="center">
@@ -595,6 +604,20 @@ export default {
         })
         })
     },
     },
 
 
+    handleChange(file, fileList) {
+      this.grid_xmind.push({ 'name': file.name, 'url': 'http:' + file.url })
+      var xmind_code = {
+        id: this.startId,
+        xmindUrl: JSON.stringify(this.grid_xmind),
+        modifier: this.userInformation
+      }
+      updateXmindUrl(xmind_code).then(res => {
+        if (res.code === 200) {
+          this.$message({ type: 'success', message: '导入成功' })
+        }
+      })
+    },
+
     // 导入xmind
     // 导入xmind
     import_File() {
     import_File() {
       var obj = this.im_File
       var obj = this.im_File