فهرست منبع

截面组合图-引用日期设置

jwyu 1 سال پیش
والد
کامیت
312a507ab1

+ 4 - 1
src/views/chartRelevance_manage/components/selectTarget.vue

@@ -31,7 +31,7 @@
         v-model="targetType"
         :placeholder="$t('StatisticAnalysis.StatisticFeatureChart.selecr_indicator_pld')"
         @change="targetTypeChange"
-        style="width: 150px;"
+        :style="{'width': selectBoxWidth?selectBoxWidth:'150px'}"
       >
         <el-option
           v-for="item in etaTypeOpt"
@@ -136,6 +136,9 @@ export default {
       },
       width: {
         default:'100%'
+      },
+      selectBoxWidth:{
+        default:''
       }
     },
     watch:{

+ 15 - 1
src/views/dataEntry_manage/addChart.vue

@@ -351,6 +351,9 @@
 						@modifySeriesName="IsNameDefault = false"
 					/>
 
+					<!-- 截面组合图 -->
+					<sectional-combination-option/>
+
 
 					<!-- 标识区 标记线 图表说明 -->
 					<markersSection
@@ -679,8 +682,19 @@ import LegendEditDia from './components/LegendEditDia.vue';
 import markersSection from './components/markersSection.vue';
 import chartSourceEditDia from './components/chartSourceEditDialog.vue';
 import chartRelationEdbList from './components/chartReleationEdbTable.vue';
+import sectionalCombinationOption from './components/sectionalCombinationOption.vue';
 export default {
-  components: { Chart,DateChooseDia,barOption,sectionalScatterOption,LegendEditDia,markersSection,chartSourceEditDia,chartRelationEdbList},
+  components: { 
+		Chart,
+		DateChooseDia,
+		barOption,
+		sectionalScatterOption,
+		LegendEditDia,
+		markersSection,
+		chartSourceEditDia,
+		chartRelationEdbList,
+		sectionalCombinationOption
+	},
 	directives: {
     drag(el, bindings) {
       el.onmousedown = function (e) {

+ 222 - 0
src/views/dataEntry_manage/components/referenceDateSet.vue

@@ -0,0 +1,222 @@
+<template>
+  <el-dialog
+    :visible.sync="show"
+    :close-on-click-modal="false"
+    :append-to-body="true"
+    @close="cancelHandle"
+    custom-class="referenceData-set-dialog"
+    center
+    width="960px"
+    v-dialogDrag
+    top="8vh"
+    title="引用日期设置"
+  >
+    <div class="list-wrap">
+      <div class="list-item" v-for="(item, index) in list" :key="index">
+        <img
+          class="btn-del"
+          v-if="list.length > 1"
+          src="~@/assets/img/icons/delete-red.png"
+          alt=""
+          @click="handleDelListItem(index)"
+        />
+        <el-input
+          placeholder="引用日期名称"
+          v-model="item.name"
+          style="width: 220px"
+        ></el-input>
+        <div class="date-type-box">
+          <el-radio v-model="item.dateType" :label="1">指标最新日期</el-radio>
+          <div style="width: 300px">
+            <selectTarget
+              ref="selectRef"
+              :defaultId="
+                item.selectEdbData ? item.selectEdbData.EdbInfoId : ''
+              "
+              :defaultOpt="item.selectEdbData ? [item.selectEdbData] : []"
+              :selectStyleType="3"
+              selectBoxWidth="105px"
+              @select="chooseEdb($event, index)"
+            />
+          </div>
+          <div style="flex: 1">
+            <template v-if="item.selectEdbData">
+              <span>频度:</span>
+              <span>{{ item.selectEdbData.Frequency }}</span>
+              <span>最新日期:</span>
+              <span>{{ item.selectEdbData.LatestDate }}</span>
+            </template>
+          </div>
+          <div>
+            <label class="el-form-item__label">{{
+              $t("ETableChildren.advance_the_term")
+            }}</label>
+            <el-input
+              class="number-input"
+              v-model="item.MoveForward"
+              type="number"
+              :min="0"
+              style="margin-right: 10px; width: 40px"
+              @change="
+                (e) => {
+                  item.MoveForward = Number(e);
+                }
+              "
+            />{{ $t("ETableChildren.term_ipt") }}
+          </div>
+        </div>
+        <div class="date-type-box">
+          <el-radio v-model="item.dateType" :label="2">系统日期</el-radio>
+          <span>{{ today }}</span>
+        </div>
+        <div>
+          <dateMoveWaySec
+            ref="dateMoveWayRef"
+            :defaultArr="item.dateTransfData"
+          />
+        </div>
+      </div>
+    </div>
+    <div class="add-more-btn" @click="handleAddListItem">
+      <img src="~@/assets/img/icons/add_blue_new.png" alt="" />
+      <span>添加更多引用日期</span>
+    </div>
+    <div class="btn-bottom">
+      <el-button @click="cancelHandle"
+        ><!-- 取消 -->{{ $t("Dialog.cancel_btn") }}</el-button
+      >
+      <el-button type="primary" style="margin-right: 20px"
+        ><!-- 保存 -->{{ $t("Dialog.confirm_save_btn") }}</el-button
+      >
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import moment from 'moment';
+import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
+import dateMoveWaySec from '@/views/datasheet_manage/components/dateMoveWaySection.vue'
+export default {
+  components: { selectTarget, dateMoveWaySec },
+  props: {
+    show: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      today: moment().format('YYYY-MM-DD'),
+      list: [
+        {
+          name: '',
+          dateType: 1,//1指标最新日期 2系统日期
+          selectEdbData: null,
+          MoveForward: 0,//期数前移
+          dateTransfData: null,//日期变换数据
+        }
+      ]
+    }
+  },
+  methods: {
+    cancelHandle() {
+      this.$emit("update:show", false);
+    },
+    chooseEdb(e, index) {
+      console.log('选择的指标', e);
+      this.list[index].selectEdbData = e || null
+    },
+
+    handleDelListItem(index) {
+      this.list.splice(index, 1)
+    },
+
+    handleAddListItem() {
+      this.list.push({
+        name: '',
+        dateType: 1,//1指标最新日期 2系统日期
+        selectEdbData: null,
+        MoveForward: 0,//期数前移
+        dateTransfData: null,//日期变换数据
+      })
+    }
+  },
+
+}
+</script>
+
+<style lang="scss">
+.referenceData-set-dialog {
+  .list-wrap {
+    max-height: 800px;
+    overflow-y: auto;
+    .list-item {
+      width: 90%;
+      margin-bottom: 20px;
+      padding: 28px 16px;
+      background-color: #f5f7f9;
+      border-radius: 4px;
+      position: relative;
+      .btn-del {
+        position: absolute;
+        right: -25px;
+        width: 20px;
+        height: 20px;
+        top: 50%;
+        transform: translateY(-50%);
+        cursor: pointer;
+      }
+      .date-type-box {
+        margin-top: 20px;
+        display: flex;
+        align-items: center;
+        gap: 0 5px;
+      }
+      .number-input {
+        .el-input__inner {
+          padding: 0 3px;
+        }
+      }
+      .date-change-ways {
+        margin-top: 20px;
+        padding-left: 0;
+        .header {
+          label {
+            width: auto;
+            margin-left: 0;
+          }
+        }
+        .date-change-list {
+          padding-left: 0;
+          .el-tag.el-tag--info {
+            background-color: #dae8ff;
+            border-color: #dae8ff;
+            color: #075eee;
+          }
+        }
+      }
+    }
+  }
+  .add-more-btn {
+    display: inline-block;
+    cursor: pointer;
+    color: #075eee;
+    img {
+      width: 20px;
+      height: 20px;
+      margin-right: 5px;
+      vertical-align: middle;
+    }
+    span {
+      display: inline-block;
+      line-height: 20px;
+      position: relative;
+      top: 2px;
+    }
+  }
+  .btn-bottom {
+    text-align: center;
+    padding: 30px 0;
+  }
+}
+</style>

+ 107 - 0
src/views/dataEntry_manage/components/sectionalCombinationOption.vue

@@ -0,0 +1,107 @@
+<template>
+  <div class="sectionalCombination-option-wrap">
+    <div class="sort-wrap">
+      <div>
+        <el-tooltip
+          effect="dark"
+          content="默认排序为每个系列添加指标的顺序,切换升序/降序时,需选择基准系列,按照该系列的数值大小对横轴重排"
+          placement="top-start"
+        >
+          <span>
+            <span>排序规则</span>
+            <i class="el-icon-info"></i>
+          </span>
+        </el-tooltip>
+        <el-radio-group v-model="sortType" style="margin-left: 20px">
+          <el-radio :label="0">默认</el-radio>
+          <el-radio :label="1">升序</el-radio>
+          <el-radio :label="2">降序</el-radio>
+        </el-radio-group>
+      </div>
+      <el-select
+        class="select-box"
+        v-model="sortBasisEdb"
+        placeholder="请选择基准"
+      >
+        <el-option
+          v-for="item in sortBasisOpts"
+          :key="item.value"
+          :label="item.label"
+          :value="item.value"
+        >
+        </el-option>
+      </el-select>
+    </div>
+    <div class="date-set-wrap">
+      <span @click="showReferenceDate=true">引用日期设置</span>
+      <span>横纵轴设置</span>
+    </div>
+    <div class="add-cont">
+      <img
+        src="~@/assets/img/set_m/add_ico.png"
+        alt=""
+        style="width: 16px; height: 16px; margin-right: 10px"
+      />
+      <span>添加系列</span>
+    </div>
+
+    <!-- 引用日期设置 -->
+    <referenceDateSet 
+      :show.sync="showReferenceDate" 
+    />
+  </div>
+</template>
+
+<script>
+import referenceDateSet from './referenceDateSet.vue'
+export default {
+  components: { referenceDateSet },
+  data() {
+    return {
+      sortType: 0,
+      sortBasisEdb: '',
+      sortBasisOpts: [],
+
+      showReferenceDate: false,
+
+    }
+  },
+}
+</script>
+
+<style lang="scss">
+.sectionalCombination-option-wrap {
+  .sort-wrap {
+    width: 90%;
+    .el-radio {
+      margin-right: 10px;
+    }
+  }
+  .select-box {
+    display: block;
+    margin-top: 10px;
+    .el-input__inner {
+      height: 40px !important;
+      line-height: 40px !important;
+      padding: 0 15px !important;
+    }
+  }
+  .date-set-wrap {
+    width: 90%;
+    margin-top: 10px;
+    display: flex;
+    justify-content: space-between;
+    color: #409eff;
+    font-size: 15px;
+    cursor: pointer;
+  }
+  .add-cont {
+    margin-top: 10px;
+    color: #409eff;
+    font-size: 16px;
+    cursor: pointer;
+    display: flex;
+    align-items: center;
+  }
+}
+</style>

+ 9 - 0
src/views/datasheet_manage/components/dateMoveWaySection.vue

@@ -76,6 +76,11 @@
 </template>
 <script>
 export default {
+  props:{
+    defaultArr:{
+      default:()=>[]
+    }
+  },
   computed: {
     frequencyDaysOptions() {
       let typeMap = {
@@ -119,6 +124,10 @@ export default {
       
     }
   },
+  created() {
+    console.log('日期变换组件加载',this.defaultArr);
+    this.initData(this.defaultArr)
+  },
   methods:{
     /* 提加日期变换数组 */
     addDateChange() {