فهرست منبع

计算公式改名

Karsa 1 سال پیش
والد
کامیت
c8bc865bf4

+ 4 - 4
src/views/datasheet_manage/common/customTable.js

@@ -149,13 +149,13 @@ export function getRightClickMenu(pos,canEdit=false) {
         { label: '累计值转月/季值',source: 1,fromEdbKey:5 },
         { label: '同比值',source: 3,fromEdbKey:6 },
         { label: '同差值',source: 4,fromEdbKey:7 },
-        { label: 'N数值移动平均计算',source: 5,fromEdbKey:8 },
-        { label: 'N数值环比值',source: 6,fromEdbKey:12 },
-        { label: 'N数值环差值',source: 7,fromEdbKey:13 },
+        { label: 'N期移动均值',source: 5,fromEdbKey:8 },
+        { label: 'N环比值',source: 6,fromEdbKey:12 },
+        { label: 'N环差值',source: 7,fromEdbKey:13 },
         { label: '升频',source: 8,fromEdbKey:14 },
         { label: '时间移位',source: 10,fromEdbKey:22 },
         { label: '超季节性',source: 11,fromEdbKey:35 },
-        { label: '年化',source: 12,fromEdbKey:52 },
+        { label: '年化',source: 12,fromEdbKey:52 },
         { label: '降频',source: 9,fromEdbKey:51 },
         { label: '累计值',source: 13,fromEdbKey:62 },
         { label: '指数修匀',source: 15,fromEdbKey:'alpha' },

+ 13 - 10
src/views/datasheet_manage/components/MixedTable.vue

@@ -100,7 +100,7 @@
                   :data-rindex="rowHeader[index]"
                   :data-cindex="columnHeader[cell_index]"
                   :data-key="cell.Uid"
-                >{{ cell.ShowStyle?cell.RealValue:cell.ShowValue }}</span>
+                >{{ cell.ShowStyle?cell.ShowFormatValue:cell.ShowValue }}</span>
               </el-popover>
 
               <!-- 数字格式化显示 -->
@@ -110,7 +110,7 @@
                 :data-cindex="columnHeader[cell_index]"
                 :data-key="cell.Uid"
               >
-                {{cell.RealValue}}
+                {{cell.ShowFormatValue}}
               </span>
 
               <span
@@ -130,11 +130,12 @@
                 :data-rindex="rowHeader[index]"
                 :data-cindex="columnHeader[cell_index]"
                 :fetch-suggestions="searchTarget"
-                @click="clickCell($event, cell)"
                 @change.native="changeVal($event, cell)"
                 @keydown.native="keyEnterHandle($event,cell)"
+                @blur="() => {$set(cell,'CanEdit',false)}"
               >
                 <!-- @select="selectTarget($event,cell)"
+                  @click="clickCell($event, cell)"
                 :highlight-first-item="cell.DataType===2"
                  -->
                 <template slot-scope="scope">
@@ -230,7 +231,8 @@ import {
   findCellByFactor,
   splitString,
   toUpperCase,
-  findCellKeyByFactor
+  findCellKeyByFactor,
+  transValueFormat
 } from "../common/customTable";
 import * as sheetInterface from "@/api/modules/sheetApi.js";
 import { dataBaseInterface } from '@/api/api.js';
@@ -1114,7 +1116,7 @@ export default {
       e.preventDefault();
     },
 
-    /* 单元格enter时切换编辑状态 */
+    /* 单元格enter失焦 */
     keyEnterHandle(e,cell) {
       if(e.keyCode===13) {
         //非得搞个要回车失焦
@@ -1122,7 +1124,7 @@ export default {
         this.$refs[`inputRef${e.target.dataset.key}`]&&this.$refs[`inputRef${e.target.dataset.key}`][0].close()
 
         // cell.DataType===6 && this.$set(cell,'CanEdit',false)
-        this.$set(cell,'CanEdit',false)
+        // this.$set(cell,'CanEdit',false)
       }
     },
 
@@ -1158,10 +1160,10 @@ export default {
     },
 
     /* 改变单元格显示文本 */
-    updateCellStyle({ShowStyle,RealValue}) {
+    updateCellStyle({ShowStyle,ShowFormatValue}) {
       
       this.$set(this.selectCell,'ShowStyle',ShowStyle)
-      this.$set(this.selectCell,'RealValue',RealValue)
+      this.$set(this.selectCell,'ShowFormatValue',ShowFormatValue)
       console.log(this.selectCell)
     }
   },
@@ -1318,13 +1320,14 @@ export default {
     }
 
     .subMenu-wrapper {
+      width: 180px;
       display: none;
       padding: 10px 0;
       box-shadow: 0 1px 4px #999;
       background: #fff;
       position: absolute;
-      right: -172px;
-      top:-205px;
+      right: -178px;
+      top:-210px;
       max-height: 400px;
       overflow-y: auto;
     }

+ 2 - 2
src/views/datasheet_manage/components/toolBarSection.vue

@@ -140,7 +140,7 @@ export default {
 
       this.$emit('updateCell',{
         ShowStyle: JSON.stringify(this.option),
-        RealValue: nval
+        ShowFormatValue: nval
       })
     },
 
@@ -155,7 +155,7 @@ export default {
 
       this.$emit('updateCell',{
         ShowStyle: JSON.stringify(this.option),
-        RealValue: nval
+        ShowFormatValue: nval
       })
     }
   },