瀏覽代碼

处理更新按钮显示异常及文章不显示输入框

yangg 9 月之前
父節點
當前提交
d48c468142

+ 1 - 1
.env.development

@@ -2,5 +2,5 @@
 ENV = 'development'
 ENV = 'development'
 port = 8080
 port = 8080
 # base api
 # base api
-VUE_APP_BASE_API = 'http://58.246.234.210:8084'
+VUE_APP_BASE_API = 'http://192.168.1.199:8084'
 #192.168.1.199
 #192.168.1.199

文件差異過大導致無法顯示
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-d38ceedc.68741a84.css → dist/static/css/chunk-fbe87a14.68741a84.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.8fad701b.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-d38ceedc.52772c66.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-fbe87a14.d12630f4.js


+ 12 - 15
src/views/document/create.vue

@@ -33,8 +33,7 @@
           size="mini"
           size="mini"
           @click="renew"
           @click="renew"
           v-if="
           v-if="
-            docAttr.is_template == 0 &&
-            docAttr.id > 0 &&
+           articleId !== undefined &&
             type !== 'module' &&
             type !== 'module' &&
             type == 'document'
             type == 'document'
           "
           "
@@ -1221,7 +1220,6 @@ export default {
         });
         });
 
 
         this.coms = [data];
         this.coms = [data];
-        console.log("11", this.coms);
       } catch (error) {
       } catch (error) {
         console.error("加载模板信息失败:", error);
         console.error("加载模板信息失败:", error);
       }
       }
@@ -1289,7 +1287,6 @@ export default {
     },
     },
     //加载文档信息
     //加载文档信息
     async onLoadArticle(id) {
     async onLoadArticle(id) {
-      console.log("文档");
       try {
       try {
         this.loading = true;
         this.loading = true;
         const res = await getDocumentInfo({ id });
         const res = await getDocumentInfo({ id });
@@ -1315,20 +1312,20 @@ export default {
           typeof res.data.data === "string"
           typeof res.data.data === "string"
             ? JSON.parse(res.data.data)
             ? JSON.parse(res.data.data)
             : res.data.data;
             : res.data.data;
-
+            
         const updatedComs = await Promise.all(
         const updatedComs = await Promise.all(
           templateData.map(async (el) => {
           templateData.map(async (el) => {
-            let templateInfo = { data: {} };
+            /* let templateInfo = { data: {} };
             if (this.type !== "document") {
             if (this.type !== "document") {
               templateInfo = await getTemplateInfo({ id: el.id });
               templateInfo = await getTemplateInfo({ id: el.id });
-            }
+            } */
             const formulaData = await searchFormula({ page: 1, pageSize: 999 });
             const formulaData = await searchFormula({ page: 1, pageSize: 999 });
 
 
-            const attrs =
-              typeof templateInfo.data.attrs === "string"
+            const attrs =el.attrs
+              /* typeof templateInfo.data.attrs === "string"
                 ? JSON.parse(templateInfo.data.attrs)
                 ? JSON.parse(templateInfo.data.attrs)
-                : templateInfo.data.attrs || []; // Add a fallback empty array
-
+                : templateInfo.data.attrs || []; // Add a fallback empty array */
+           
             attrs.forEach((item) => {
             attrs.forEach((item) => {
               const matchedFormula = formulaData.data.dataList.find(
               const matchedFormula = formulaData.data.dataList.find(
                 (ite) => ite.id === item.data.id
                 (ite) => ite.id === item.data.id
@@ -1339,7 +1336,7 @@ export default {
               }
               }
             });
             });
 
 
-            return { ...el, ...templateInfo.data, attrs };
+            return { ...el/* , ...templateInfo.data, attrs */ };
           })
           })
         );
         );
 
 
@@ -1369,9 +1366,9 @@ export default {
         }
         }
 
 
         this.docAttr = {
         this.docAttr = {
-          id: res.data.id,
-          category_id: Number(res.data.category_id),
-          title: res.data.title,
+          id: this.docAttr.id,
+          category_id: Number(this.docAttr.category_id),
+          title: this.docAttr.title,
           content: "",
           content: "",
           status: res.data.status,
           status: res.data.status,
           is_template: res.data.is_template,
           is_template: res.data.is_template,

部分文件因文件數量過多而無法顯示