zhangym 2 år sedan
förälder
incheckning
d89c3ced9d
1 ändrade filer med 19 tillägg och 17 borttagningar
  1. 19 17
      src/views/energyOperationSupport/components/securitys/pic2.vue

+ 19 - 17
src/views/energyOperationSupport/components/securitys/pic2.vue

@@ -88,8 +88,8 @@
       </el-upload>
     </el-dialog>
     <el-dialog title="文件上传" :visible.sync="dialogVisible1" destroy-on-close width="35%" top="6vh" height="90%">
-      <el-upload class="upload-demo" ref="upload1" :file-list="fileList" action=""
-        :loading="loading" :auto-upload="false" :on-change="handleChange" :on-remove="handleRemove">
+      <el-upload class="upload-demo" ref="upload1" :file-list="fileList" action="" :multiple="true" :loading="loading"
+        :auto-upload="false" :on-change="handleChange" :on-remove="handleRemove">
         <el-button slot="trigger" size="small" type="primary" :loading="loading" icon="el-icon-plus">选取文件
         </el-button>
         <el-button size="small" type="primary" icon="el-icon-bottom-right" @click="beforeUpload">上传
@@ -98,8 +98,8 @@
       </el-upload>
     </el-dialog>
 
-    <el-dialog title="文件信息预览" :visible.sync="dialogVisible3" destroy-on-close width="85%" top="6vh" height="90%" >
-      <el-table :data="tableData" border style="width: 100%" max-height="500" stripe = "true">
+    <el-dialog title="文件信息预览" :visible.sync="dialogVisible3" destroy-on-close width="85%" top="6vh" height="90%">
+      <el-table :data="tableData" border style="width: 100%" max-height="500" :stripe="true">
         <el-table-column prop="createtime" label="上传时间" width="180">
         </el-table-column>
         <el-table-column prop="createman" label="上传人" width="80">
@@ -358,7 +358,7 @@ export default {
             that.itemNode = item;
             that.dialogVisible1 = true;
             console.log('fileitemNode', that.itemNode)
-          }else if (target.id == "delLabel") {
+          } else if (target.id == "delLabel") {
             // 删除
             that.itemNode = item;
             that.delDialogVisible = true;
@@ -729,7 +729,7 @@ export default {
         const $id = node.parentid;
         const $node = data.children.find(item => item.id === this.thereData);
         console.log('$node', $node)
-        const $node2 = $node.children.find(item => item.id ===this.fiveData)
+        const $node2 = $node.children.find(item => item.id === this.fiveData)
         const $node3 = $node2.children.find(item => item.id === $id)
         if ($node3) {
           this.crumbNavs.push($node3);
@@ -758,7 +758,7 @@ export default {
     //changeDat
     changeDat(node) {
       if (node) {
-        if (node.tlevel > 1 && node.tlevel<6) {
+        if (node.tlevel > 1 && node.tlevel < 6) {
           //graph.changeData(JSON.parse(JSON.stringify(node))),
           graph.changeData(node)
           graph.fitView([230, 240, 390, 390]);
@@ -1084,15 +1084,15 @@ export default {
     // 文件状态改变时的钩子,添加文件、上传成功和上传失败时都会被调用,function(file, fileList)
     handleChange(file, fileList) {
       this.fileList = fileList
-      let size  = 0;
-      this.fileList.forEach((item)=>{
-        size +=item.size
+      let size = 0;
+      this.fileList.forEach((item) => {
+        size += item.size
       })
-       let fileSize = size/1024/1024 < 10 ?0:1
-       if(fileSize===1){
+      let fileSize = size / 1024 / 1024 < 10 ? 0 : 1
+      if (fileSize === 1) {
         this.$message.error("上传文件大小请不要超过10MB!")
-       }
-      console.log(fileSize ===1)
+      }
+      console.log(fileSize === 1)
     },
     // 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。function(file, fileList)
     handleRemove(file, fileList) {
@@ -1178,8 +1178,11 @@ export default {
           that.updateNameData2(that.itemNode._cfg.id, arr2);
           that.uploadloading = false;
           that.$refs.upload1.clearFiles();
-          that.getGxNameData();
-          graph.changeData();
+          //that.getGxNameData3();
+          
+         // graph.changeData(that.treeData)
+         // graph.fitView([230, 240, 390, 390]);
+        location.reload()
         }
         else {
           that.$message.error(res.message);
@@ -1215,7 +1218,6 @@ export default {
           that.$refs.upload2.clearFiles();
           console.log(that.rowNodeid);
           that.gettableData(that.rowNodeid);
-          graph.changeData();
         }
         else {
           that.$message.error(res.message);