Jelajahi Sumber

sheet页选中问题

Karsa 1 tahun lalu
induk
melakukan
6a2e8b818f

+ 6 - 2
src/views/datasheet_manage/customAnalysis/components/createTargetForm.vue

@@ -171,7 +171,10 @@ export default {
           unit: data.Unit,
         }
 
-        this.setRangeShow([data.DateSequenceStr,data.DataSequenceStr]);
+        let sheetName = data.DateSequenceStr.substr(0,data.DateSequenceStr.indexOf('!'))
+        let order = luckysheet.getAllSheets().find(_ => _.name===sheetName) ? luckysheet.getAllSheets().find(_ => _.name===sheetName).order : 0;
+
+        this.setRangeShow([data.DateSequenceStr,data.DataSequenceStr],order);
       }else {
         this.formData = {
           edbInfoId: 0,
@@ -190,7 +193,7 @@ export default {
     },
 
     /* 解析公式显示选区 */
-    setRangeShow(range) {
+    setRangeShow(range,order=null) {
       
       //初始化多选区
       let rangeArr = [];
@@ -201,6 +204,7 @@ export default {
       }else {
         rangeArr = [this.splitFormula(range)]
       }
+      order!==null && luckysheet.setSheetActive(order)
       luckysheet.setRangeShow(rangeArr)
     },