Browse Source

08.17.2打包

yangg 10 months ago
parent
commit
08da76dd94

+ 1 - 1
.env.development

@@ -2,5 +2,5 @@
 ENV = 'development'
 port = 8080
 # base api
-VUE_APP_BASE_API = 'http://120.46.190.49:8000'
+VUE_APP_BASE_API = 'http://192.168.1.178:8000'
 #192.168.1.178

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-481b5f39.8ed3cde4.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-a29b7d62.904a5f71.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.61d1c18c.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-481b5f39.64f651df.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-a29b7d62.591cf077.js


+ 1 - 1
src/views/document/com/components/Attribute/Directory/index.scss

@@ -2,7 +2,7 @@
   display:flex;
   width:100%;
   flex-direction:column;
-  height:500px;
+  height:740px;
   overflow: auto;
   justify-content: flex-start;
   align-items: flex-start;

+ 1 - 1
src/views/document/com/components/Attribute/attributeVar/index.scss

@@ -5,7 +5,7 @@
   align-items: flex-start;
   padding:10px;
   width:100%;
-  height:500px;
+  height:740px;
   overflow: hidden;
   overflow-y: auto;
   .el-collapse{

+ 60 - 4
src/views/document/com/components/TextArea/index.vue

@@ -18,6 +18,12 @@
     <template v-else>
       <div class="rich-editor" v-html="content"></div>
     </template>
+    <div v-if="loading" class="overlay">
+      <el-progress
+        :percentage="progress"
+        class="full-width-progress"
+      ></el-progress>
+    </div>
   </div>
 </template>
 
@@ -118,6 +124,8 @@ export default {
 
       content: "",
       editor: null,
+      loading: false,
+      progress: 0,
     };
   },
   mounted() {},
@@ -387,11 +395,38 @@ export default {
         row: row,
         col: col,
       };
-      let res = await findData(par);
-      if (res.status == 200) {
-        return res.data.result;
+
+      // Start the progress bar
+      this.loading = true;
+      this.progress = 0;
+
+      try {
+        // Simulate progress updates
+        const updateProgress = setInterval(() => {
+          if (this.progress < 90) {
+            this.progress += 10;
+          }
+        }, 100);
+
+        let res = await findData(par);
+        if (res.status == 200) {
+          result = res.data.result;
+        }
+
+        // Complete the progress
+        this.progress = 100;
+        clearInterval(updateProgress);
+      } catch (error) {
+        console.error("Error fetching remote data:", error);
+      } finally {
+        // Hide the progress bar after a short delay
+        setTimeout(() => {
+          this.loading = false;
+          this.progress = 0;
+        }, 1000);
       }
-      return 0;
+
+      return result;
     },
     //获取本地文档模块数据
     async getModuleData(code, attrName) {
@@ -451,4 +486,25 @@ export default {
 </script>
 <style lang="scss">
 @import "./index.scss";
+.template-textarea {
+  position: relative;
+}
+
+.overlay {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.5); // Semi-transparent background
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 10; // Ensure it is above other content
+}
+
+.full-width-progress {
+  width: 80%; // Adjust as needed
+  color: inherit; // Ensure the color remains unchanged
+}
 </style>

+ 1 - 1
src/views/document/com/components/TextView/index.scss

@@ -8,7 +8,7 @@
   position: relative;
   .rich-editor{
     width:100%;
-    min-height: 20px;
+    min-height: 50px;
 
   }
   .content{

+ 37 - 16
src/views/document/com/components/TextView/index.vue

@@ -32,8 +32,8 @@ export default {
   watch: {
     com: {
       handler(val) {
-        console.log('val',val);
-       /*  let _this = this;
+        console.log("val", val);
+        /*  let _this = this;
         if (val == null) return;
         if (val.content == undefined || val.content == null) return;
         _this.replaceData(val.content).then((res) => {
@@ -51,19 +51,40 @@ export default {
     };
   },
   methods: {
-    replaceData(data){
-          for(var i=0;i<this.com.attrs.length;i++){
-            if(this.com.attrs[i].type=='variable'){
-              //全局变量
-              data=data.replace("{{"+this.com.attrs[i].id+"}}",'<input type="text" class="text-input-box" value="'+this.com.attrs[i].content+'">');
-
-            }else{
-              data=data.replace("{{"+this.com.attrs[i].id+"}}",this.com.attrs[i].content);
-            }
-          }
-          return data;
-          
-        },
+    replaceData(data) {
+      for (var i = 0; i < this.com.attrs.length; i++) {
+        let attrId = this.com.attrs[i].id;
+        if (this.com.attrs[i].type == "variable") {
+          //全局变量
+          data = data.replace(
+            "{{" + this.com.attrs[i].id + "}}",
+            '<input type="text" class="text-input-box" value="' +
+              this.com.attrs[i].content +
+              '">'
+          );
+        } else if (this.com.attrs[i].type == "Directory") {
+          //处理目录
+          data = data.replace(
+            "<p>{{" + attrId + "}}</p>",
+            "<h1>" + this.com.attrs[i].content + "</h1>"
+          );
+          data = data.replace(
+            "<div>{{" + attrId + "}}</div>",
+            "<h1>" + this.com.attrs[i].content + "</h1>"
+          );
+          data = data.replace(
+            "<span>{{" + attrId + "}}</span>",
+            "<h1>" + this.com.attrs[i].content + "</h1>"
+          );
+        } else {
+          data = data.replace(
+            "{{" + this.com.attrs[i].id + "}}",
+            this.com.attrs[i].content
+          );
+        }
+      }
+      return data;
+    },
     /* async replaceData(data) {
       let _this = this;
       for (var i = 0; i < _this.com.attrs.length; i++) {
@@ -181,7 +202,7 @@ export default {
 
     //获取远程数据
     async getRemoteData(code, sheet, row, col) {
-      debugger
+      debugger;
       let _this = this;
       let result = 0;
       let par = {

Some files were not shown because too many files changed in this diff