Răsfoiți Sursa

智能研报增加字体,图表等导入列表加载优化

jwyu 11 luni în urmă
părinte
comite
49b9195bd6

+ 6 - 3
src/views/smartReport/components/ETAPriceChart.vue

@@ -21,7 +21,7 @@
                 v-model="isShowMe" 
                 @change="handleIsShowMeChange"
             >只看我的</el-checkbox>
-            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
+            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
                 <draggable
                     :list="list"
                     :group="{ name: 'component', pull: 'clone', put: false }"
@@ -52,7 +52,8 @@ export default {
             list:[],
             page:1,
             pageSize:20,
-            finished:false
+            finished:false,
+            loading:false
         }
     },
     created(){
@@ -96,7 +97,9 @@ export default {
                 PageSize: this.pageSize,
                 IsShowMe: this.isShowMe,
             };
+            this.loading=true
             let res = await futuresInterface.searchChart(params);
+            this.loading=false
             if (res.Ret !== 200) return;
             const arr = res.Data.List || [];
             this.list =
@@ -107,7 +110,7 @@ export default {
         },
 
         handleLoadMore(){
-            if(this.finished) return
+            if(this.finished||this.loading) return
             this.page++
             this.getChartList()
         }

+ 6 - 3
src/views/smartReport/components/ETASandBox.vue

@@ -16,7 +16,7 @@
             </div>
         </div>
         <div class="main-box">
-            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
+            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
                 <draggable
                     :list="list"
                     :group="{ name: 'component', pull: 'clone', put: false }"
@@ -46,7 +46,8 @@ export default {
             list:[],
             page:1,
             pageSize:20,
-            finished:false
+            finished:false,
+            loading:false
         }
     },
     created(){
@@ -88,7 +89,9 @@ export default {
                 CurrentIndex: this.page,
                 PageSize: this.pageSize,
             };
+            this.loading=true
             let res = await sandInterface.sandlistByQuote(params);
+            this.loading=false
             if (res.Ret !== 200) return;
             const arr = res.Data.List || [];
             this.list =
@@ -99,7 +102,7 @@ export default {
         },
 
         handleLoadMore(){
-            if(this.finished) return
+            if(this.finished||this.loading) return
             this.page++
             this.getSandBoxList()
         }

+ 33 - 6
src/views/smartReport/components/ETASheet.vue

@@ -12,6 +12,7 @@
 			/>
         </div>
         <div class="main-box">
+            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
             <draggable
                 :list="list"
                 :group="{ name: 'component', pull: 'clone', put: false }"
@@ -26,6 +27,7 @@
                 </div>
             </draggable>
             <tableNoData text="暂无数据" size="mini" v-if="list.length===0"/>
+            </div>
         </div>
     </div>
 </template>
@@ -36,7 +38,11 @@ export default {
     data() {
         return {
             keyword:'',
-            list:[]
+            list:[],
+            page:1,
+            pageSize:20,
+            finished:false,
+            loading:false
         }
     },
     created(){
@@ -60,19 +66,34 @@ export default {
         },
 
         handleSearch(){
+            this.list=[]
+            this.page=1
+            this.finished=false
             this.getSheetList()
         },
         getSheetList() {
-            this.list=[]
+            this.loading=true
             sheetInterface.sheetList({
                 Keyword: this.keyword,
-                CurrentIndex: 1,
-                PageSize: 10000,
+                CurrentIndex: this.page,
+                PageSize: this.pageSize,
             }).then((res) => {
+                this.loading=false
                 if (res.Ret !== 200) return;
-                this.list = res.Data.List || [];
+                const arr = res.Data.List || [];
+                this.list =
+                    this.page === 1
+                    ? arr
+                    : [...this.list, ...arr];
+                this.finished =  res.Data.Paging.IsEnd;
             });
         },
+
+        handleLoadMore(){
+            if(this.finished||this.loading) return
+            this.page++
+            this.getSheetList()
+        }
     },
 }
 </script>
@@ -96,7 +117,13 @@ div{
         border: 1px solid var(--gary-gy-5-line, #C8CDD9);
         background: #FFF;
         padding: 20px;
-        overflow-y: auto;
+        display: flex;
+        flex-direction: column;
+        .list-wrap{
+            flex: 1;
+            overflow-y: auto;
+
+        }
         .sheet-list-box{
             display: flex;
             flex-wrap: wrap;

+ 6 - 3
src/views/smartReport/components/ImportETAChart.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="import-eta-chart-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
+    <div class="import-eta-chart-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
             <el-checkbox
                 class="onlyshowme-box"
                 v-model="isShowMe" 
@@ -32,7 +32,8 @@ export default {
             pageSize:20,
             list:[],
             finished:false,
-            keyword:''
+            keyword:'',
+            loading:false
         }
     },
     created() {
@@ -55,12 +56,14 @@ export default {
         },
 
         async getETAChartList(){
+            this.loading=true
             const res=await dataBaseInterface.chartSearchByEs({
                 Keyword: this.keyword || "",
                 CurrentIndex: this.page,
                 PageSize: this.pageSize,
                 IsShowMe: this.isShowMe,
             })
+            this.loading=false
             if(res.Ret===200){
                 const arr=res.Data.List || []
                 this.list=[...this.list,...arr]
@@ -76,7 +79,7 @@ export default {
         },
 
         handleLoadMore(){
-            if(this.finished) return
+            if(this.finished||this.loading) return
             this.page++
             this.getETAChartList()
         },

+ 1 - 1
src/views/smartReport/components/ImportMyETAChart.vue

@@ -38,7 +38,7 @@ export default {
         return {
             myChartClassifyList:[],
             selectMyChartClassify:'',
-            pageSize:10000,
+            pageSize:20,
 			CurrentIndex: 1,
 			list:[],
             loading:false,

+ 6 - 3
src/views/smartReport/components/SemanticAnalysis.vue

@@ -16,7 +16,7 @@
             </div>
         </div>
         <div class="main-box">
-            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
+            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
                 <draggable
                     :list="list"
                     :group="{ name: 'component', pull: 'clone', put: false }"
@@ -46,7 +46,8 @@ export default {
             list:[],
             page:1,
             pageSize:20,
-            finished:false
+            finished:false,
+            loading:false
         }
     },
     created(){
@@ -88,7 +89,9 @@ export default {
                 CurrentIndex: this.page,
                 PageSize: this.pageSize,
             };
+            this.loading=true
             let res = await semanticInterface.compareSearch(params);
+            this.loading=false
             if (res.Ret !== 200) return;
             const arr = res.Data.List || [];
             this.list =
@@ -99,7 +102,7 @@ export default {
         },
 
         handleLoadMore(){
-            if(this.finished) return
+            if(this.finished||this.loading) return
             this.page++
             this.getSemanticList()
         }

+ 6 - 3
src/views/smartReport/components/StatisticAnalysis.vue

@@ -26,7 +26,7 @@
                 v-model="isShowMe" 
                 @change="handleIsShowMeChange"
             >只看我的</el-checkbox>
-            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="false">
+            <div class="list-wrap" v-infinite-scroll="handleLoadMore" :infinite-scroll-immediate="true">
                 <draggable
                     :list="list"
                     :group="{ name: 'component', pull: 'clone', put: false }"
@@ -81,7 +81,8 @@ export default {
             list:[],
             page:1,
             pageSize:20,
-            finished:false
+            finished:false,
+            loading:false
         }
     },
     created(){
@@ -135,6 +136,7 @@ export default {
                 PageSize: this.pageSize,
                 IsShowMe: this.isShowMe,
             };
+            this.loading=true
             let res = null;
             if (this.activeType === '相关性') {
                 res = await chartRelevanceApi.searchChart(params);
@@ -145,6 +147,7 @@ export default {
             } else if (this.activeType === '跨品种分析') {
                 res = await crossVarietyInterface.searchChart(params);
             }
+            this.loading=false
 
             if (res.Ret !== 200) return;
             const arr = res.Data.List || [];
@@ -156,7 +159,7 @@ export default {
         },
 
         handleLoadMore(){
-            if(this.finished) return
+            if(this.finished||this.loading) return
             this.page++
             this.getChartList()
         }

+ 10 - 0
src/views/smartReport/components/TextEdit.vue

@@ -69,6 +69,16 @@ export default {
                 toolbarVisibleWithoutSelection: true, //是否开启 不选中模式
                 toolbarSticky: false, //操作栏是否自动吸顶
                 saveInterval: 0,
+                fontFamily:{
+                    'Arial,Helvetica,sans-serif': 'Arial',
+                    'Georgia,serif': 'Georgia',
+                    'Impact,Charcoal,sans-serif': 'Impact',
+                    'Tahoma,Geneva,sans-serif': 'Tahoma',
+                    'Times New Roman,Times,serif': 'Times New Roman',
+                    'Verdana,Geneva,sans-serif': 'Verdana',
+                    '思源宋体':'思源宋体',
+                    '思源黑体':'思源黑体',
+                },
                 events: {
                     //this.editor 定义在vue data 中
                     initialized: function () {