jwyu 5 месяцев назад
Родитель
Сommit
84c42e9ea9

+ 3 - 0
src/views/datasheet_manage/balanceSheetEdit.vue

@@ -348,6 +348,9 @@ export default {
       sheetInterface.balanceTableVersion({ExcelInfoId:this.sheetId}).then(res=>{
         if(res.Ret===200){
           const arr=res.Data.List||[]
+          if(this.$i18nt.locale!=='zh'){
+            arr[0].VersionName='Active'
+          }
           this.versionOpts=arr
         }
       })

+ 3 - 6
src/views/datasheet_manage/components/BalanceAddChart.vue

@@ -648,11 +648,7 @@ export default {
     tableSelect(start,end,str){
       console.log(start,end,str);
       if(this.selectInput){
-        // 如果选择的不是同行或者同列 
-        if(!(start.col==end.col||start.row==end.row)){
-          this.$message.warning(this.$t('CustomAnalysisPage.only_allowed_select_msg'));
-          return
-        }
+
         //查找到是哪个指标
         const tag=this.selectInput.split('_')[0]
         const type=this.selectInput.split('_')[1]
@@ -938,7 +934,8 @@ export default {
   background: #fff;
   position: fixed;
   top: 20%;
-  left: 50%;
+  // left: 50%;
+  right: 10%;
   border-radius: 2px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
   z-index: 999;

+ 14 - 0
src/views/datasheet_manage/components/BalanceTable.vue

@@ -593,6 +593,20 @@ export default {
       if(this.selectionStart){
         // 找到当前sheet 数据
         const sobj=this.sheetOpts.filter(_e=>_e.ExcelInfoId===this.activeSheetId)[0]
+        // 如果选择的不是同行或者同列 
+        if(!(this.selectionStart.col==this.selectionEnd.col||this.selectionStart.row==this.selectionEnd.row)){
+          this.$message.warning(this.$t('CustomAnalysisPage.only_allowed_select_msg'));
+          return
+        }
+        // 判断选择的顺序如果是从后往前选择交换 start 和end
+        if((this.selectionStart.col==this.selectionEnd.col&&this.selectionStart.row>this.selectionEnd.row)||(this.selectionStart.row==this.selectionEnd.row&&this.selectionStart.col>this.selectionEnd.col)){
+          const temStart=JSON.parse(JSON.stringify(this.selectionStart))
+          const temEnd=JSON.parse(JSON.stringify(this.selectionEnd))
+          this.selectionEnd=temStart
+          this.selectionStart=temEnd
+        }
+
+
         const str=`${sobj.ExcelName}!$${this.columnHeader[this.selectionStart.col]}$${this.selectionStart.row+1}:$${this.columnHeader[this.selectionEnd.col]}$${this.selectionEnd.row+1}`
         this.$refs.balanceAddChart.tableSelect(this.selectionStart,this.selectionEnd,str)
       }

+ 3 - 3
src/views/datasheet_manage/sheetList.vue

@@ -399,17 +399,17 @@
         :model="balanceTableForm" 
         :rules="balanceTableFormRule" 
         ref="addBalanceForm" 
-        label-width="100px" 
+        label-width="140px" 
         class="add-balance-wrap"
       >
-        <el-form-item label="表格名称" prop="name">
+        <el-form-item :label="$t('OnlineExcelPage.excel_name_ipt')" prop="name">
           <el-input 
             v-model="balanceTableForm.name" 
             :placeholder="$t('OnlineExcelPage.please_table_name_ipt')"
             style="width:350px"
           ></el-input>
         </el-form-item>
-        <el-form-item label="所属分类" prop="classify">
+        <el-form-item :label="$t('SteelChemicalPage.label_edb_classify')" prop="classify">
           <el-cascader
             v-model="balanceTableForm.classify"
             :options="balanceClassifyOpts"