Sfoglia il codice sorgente

BUG FIX: 仪表盘增加排序。

YangZhiJie 2 anni fa
parent
commit
14fbc25ab5
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      src/dashboard/Dashboard.vue

+ 4 - 0
src/dashboard/Dashboard.vue

@@ -82,6 +82,7 @@ export default defineComponent({
           // const jsUrl = '' + '/DictionaryBase/Dashboard/BASE/2020080401.js';
           //const jsUrl = '/DictionaryAsset/Dashboard/EAM/20220309_095250.js';
           const componentName = item.componentName;
+          const sortNo = (item.sortNo == null) ? 100 : item.sortNo;
 
           if (item.cssUrl != null && item.cssUrl != undefined) {
             CssUtil.dynamicLoadCss(Common.getHostPageBaseURL() + item.cssUrl, componentName);
@@ -109,10 +110,13 @@ export default defineComponent({
                 var item1 = {
                   no: componentName,
                   componentName: componentName,
+                  sortNo: sortNo,
                 };
 
                 console.log(_self.dashboardArray);
                 _self.dashboardArray.push(item1);
+                // add by jack 2024-05-22 增加排序
+                _self.dashboardArray.sort((a, b) => a.sortNo - b.sortNo);
               },
               errorData => {
                 console.error(errorData);