Bladeren bron

修改数据项

FinalYu 2 jaren geleden
bovenliggende
commit
09be7750cd

+ 7 - 4
chuanyi_client2/src/components/HeaderMain/index.vue

@@ -153,7 +153,7 @@
                 </el-select>
               </el-form-item>
               <el-form-item :label="modeValueTips" prop="modeValue" v-if="groupRateForm.readMode != '1'" class="cy-mv">
-                <el-input v-model="groupRateForm.modeValue" :placeholder="'请输入' + modeValueTips"
+                <el-input v-model.trim="groupRateForm.modeValue" :placeholder="'请输入' + modeValueTips"
                           oninput="value=value.replace(/[^0-9.]/g,'')">
                   <template slot="append" v-if="groupRateForm.readMode == '0'">
                     <el-select v-model="groupRateForm.modeValueUnit" @change="readModeValueUnitChange" placeholder="">
@@ -584,7 +584,7 @@ export default {
   methods: {
     /** 表单验证判断 */
     testModeValue(rule, value, callback) {
-      if (!value || !value.trim()) {
+      if (!value) {
         callback(new Error(this.modeValueTips + '不能为空'))
       } else {
         callback()
@@ -871,13 +871,15 @@ export default {
         this.chooseItemDataView = true
         this.groupDialogTitle = '修改数据组'
         this.groupRateForm.readMode = item.readMode + ''
-        this.groupRateForm.modeValue = item.modeValue
         if (parseInt(item.modeValue) % 3600 == 0) { // 时
           this.groupRateForm.modeValueUnit = '3'
+          this.groupRateForm.modeValue = item.modeValue / 3600
         } else if (parseInt(item.modeValue) % 60 == 0) { // 分
           this.groupRateForm.modeValueUnit = '2'
+          this.groupRateForm.modeValue = item.modeValue / 60
         } else { // 秒
           this.groupRateForm.modeValueUnit = '1'
+          this.groupRateForm.modeValue = item.modeValue
         }
         this.groupRateForm.valueMode = item.valueCondition + ''
         this.groupRateForm.valuePeriod = [item.startReadTime, item.endReadTime]
@@ -1395,10 +1397,11 @@ export default {
     },
     /** 选择数据项弹出层保存事件:第二步 */
     itemDialogSave2() {
+      this.filterChooseItemText = ''
+      this.chooseItemChangeEvent()
       this.groupBasicForm.itemList = this.chooseItemDataList
       this.itemDataStep = 1
       this.filterItemData = ''
-      this.filterChooseItemText = ''
       this.dataLineListSelections = []
       this.dataItemDialogVisible = false
       this.chooseItemDataView = true

+ 0 - 1
chuanyi_client2/src/views/data_model/index.vue

@@ -32,7 +32,6 @@
         <el-table-column
             align="center"
             label="数据值"
-            sortable
             prop="mathParameter"
             width="150">
         </el-table-column>

+ 2 - 2
chuanyi_client2/src/views/group_item/index.vue

@@ -45,14 +45,14 @@
       <el-table-column prop="itemName" sortable label="数据项名称" align="center">
       </el-table-column>
       <template v-if="groupRunStatus">
-        <el-table-column prop="dataType" sortable label="数据项类型" align="center" width="100">
+        <el-table-column prop="dataType" sortable label="数据项类型" align="center" width="120">
         </el-table-column>
         <el-table-column prop="operationRule" sortable label="表达式" align="center" width="200">
           <template slot-scope="scope">
             {{ scope.row.operationRule ? scope.row.operationRule : '默认值' }}
           </template>
         </el-table-column>
-        <el-table-column prop="dataOrgValue" sortable label="原始数据值" align="center" width="100">
+        <el-table-column prop="dataOrgValue" sortable label="原始数据值" align="center" width="120">
           <template slot-scope="scope">
             {{ scope.row.dataOrgValue ? scope.row.dataOrgValue : '' }}
           </template>

+ 2 - 2
chuanyi_client2/src/views/report_template/index.vue

@@ -1135,7 +1135,7 @@ export default {
       let rangeWithFlatten = luckysheet.getRangeWithFlatten()
       if (!rangeWithFlatten || rangeWithFlatten.length != 1) {
         this.$message({
-          message: '请在 Excel 中选择图表需要存放的位置!',
+          message: '请选择一项单元格!',
           type: 'warning'
         })
         return
@@ -1277,7 +1277,7 @@ export default {
       let rangeWithFlatten = luckysheet.getRangeWithFlatten()
       if (!rangeWithFlatten || rangeWithFlatten.length <= 1) {
         _this.$message({
-          message: '请在 Excel 中选择图表需要存放的位置范围!',
+          message: '请选择多项单元格!',
           type: 'warning'
         })
         return