Просмотр исходного кода

/api/HtmlWindowResource/uniqueByNo 修复返回值

YangZhiJie 1 год назад
Родитель
Сommit
92cf28993e

+ 4 - 2
src/client/MenuNode.vue

@@ -183,8 +183,8 @@ export default {
         });
       } else if (nodeType == 'HTML') {
         HtmlWindowResource.uniqueByNo(_self.model.htmlWindowNo).then(successData => {
-          if (successData != null) {
-            var htmlFileName = successData.htmlFileName;
+          if (successData.errorCode == 0) {
+            var htmlFileName = successData.data.htmlFileName;
             if(htmlFileName == null){
               Notify.error(_self.$t('lang.Notify.dataDictionaryError'), _self.$t('lang.Notify.describe1'), false);
               return;
@@ -193,6 +193,8 @@ export default {
               htmlFileName = htmlFileName.replace('{URL}', Common.getHostPageBaseURL());
             }
             window.open(htmlFileName);
+          } else{
+            Notify.error(_self.$t('lang.Notify.dataDictionaryError'), successData.errorMessage, true);
           }
         }, errorData => {
           Common.processException(errorData);

+ 7 - 1
src/window/tabView/TabButton.vue

@@ -459,7 +459,13 @@ export default {
         }
       } else if (tabButton.htmlWindowNo != undefined) {
         HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
-          htmlWindowDto => {
+          response => {
+            if (response.errorCode != 0) {
+              Notify.error(_self.$t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
+              return;
+            }
+
+            const htmlWindowDto = response.data;
             if (htmlWindowDto != undefined) {
               var htmlWindowUrl = htmlWindowDto.htmlFileName;
               var autoCloseInterval = htmlWindowDto.autoCloseInterval;

+ 7 - 1
src/window1/tabGridView/CellTextItem.vue

@@ -687,7 +687,13 @@ export default {
         }
       } else if (tabButton.htmlWindowNo != undefined) {
         HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
-          htmlWindowDto => {
+          response => {
+            if (response.errorCode != 0) {
+              Notify.error(_self.$t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
+              return;
+            }
+
+            const htmlWindowDto = response.data;
             if (htmlWindowDto != undefined) {
               var htmlWindowUrl = htmlWindowDto.htmlFileName;
               var autoCloseInterval = htmlWindowDto.autoCloseInterval;

+ 7 - 1
src/window1/tabGridView/NewTabButton.vue

@@ -647,7 +647,13 @@ const execute = async function (tabButton) {
     }
   } else if (tabButton.htmlWindowNo != undefined) {
     HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
-      htmlWindowDto => {
+      response => {
+        if (response.errorCode != 0) {
+          Notify.error(_self.$t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
+          return;
+        }
+
+        const htmlWindowDto = response.data;
         if (htmlWindowDto != undefined) {
           var htmlWindowUrl = htmlWindowDto.htmlFileName;
           var autoCloseInterval = htmlWindowDto.autoCloseInterval;

+ 7 - 1
src/window1/tabView/TabButton.vue

@@ -522,7 +522,13 @@ export default {
         }
       } else if (tabButton.htmlWindowNo != undefined) {
         HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
-          htmlWindowDto => {
+          response => {
+            if (response.errorCode != 0) {
+              Notify.error(_self.$t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
+              return;
+            }
+
+            const htmlWindowDto = response.data;
             if (htmlWindowDto != undefined) {
               var htmlWindowUrl = htmlWindowDto.htmlFileName;
               var autoCloseInterval = htmlWindowDto.autoCloseInterval;

+ 7 - 1
src/window1/tabView/TabButton1.vue

@@ -464,7 +464,13 @@ export default {
         }
       } else if (tabButton.htmlWindowNo != undefined) {
         HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
-          htmlWindowDto => {
+          response => {
+            if (response.errorCode != 0) {
+              Notify.error(_self.$t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
+              return;
+            }
+
+            const htmlWindowDto = response.data;
             if (htmlWindowDto != undefined) {
               var htmlWindowUrl = htmlWindowDto.htmlFileName;
               var autoCloseInterval = htmlWindowDto.autoCloseInterval;