|
@@ -9,7 +9,6 @@
|
|
</span>
|
|
</span>
|
|
<div class="left-cont minHeight" v-show="isLeftWrapShow">
|
|
<div class="left-cont minHeight" v-show="isLeftWrapShow">
|
|
<div class="left-top">
|
|
<div class="left-top">
|
|
- <!-- v-permission="permissionBtn.dataSourcePermission.coalWordData_export" -->
|
|
|
|
<el-button
|
|
<el-button
|
|
style="width: 100%;margin-bottom: 10px;"
|
|
style="width: 100%;margin-bottom: 10px;"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -17,6 +16,7 @@
|
|
size="medium"
|
|
size="medium"
|
|
@click="exportClick"
|
|
@click="exportClick"
|
|
:loading="btnload"
|
|
:loading="btnload"
|
|
|
|
+ v-permission="permissionBtn.dataSourcePermission.coalWordData_export"
|
|
>导出Excel</el-button
|
|
>导出Excel</el-button
|
|
>
|
|
>
|
|
<el-autocomplete
|
|
<el-autocomplete
|
|
@@ -27,6 +27,8 @@
|
|
:trigger-on-focus="false"
|
|
:trigger-on-focus="false"
|
|
placeholder="指标名称/指标ID"
|
|
placeholder="指标名称/指标ID"
|
|
@select="handleSelectLeftSearchval"
|
|
@select="handleSelectLeftSearchval"
|
|
|
|
+ @blur="searchvalBlur"
|
|
|
|
+ @clear="searchvalClear"
|
|
popper-class="el-autocomplete-suggestion-data-entry"
|
|
popper-class="el-autocomplete-suggestion-data-entry"
|
|
clearable
|
|
clearable
|
|
>
|
|
>
|
|
@@ -35,20 +37,19 @@
|
|
暂无数据
|
|
暂无数据
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<div v-else>
|
|
- {{ scope.item.QuotaName }}
|
|
|
|
- {{ frequencyType.get(scope.item.Frequency) }}
|
|
|
|
|
|
+ {{ scope.item.IndexName }}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-autocomplete>
|
|
</el-autocomplete>
|
|
</div>
|
|
</div>
|
|
<ul class="classify-list">
|
|
<ul class="classify-list">
|
|
<li
|
|
<li
|
|
- :class="['classify-item', { act: select_classify === item.BreedId }]"
|
|
|
|
|
|
+ :class="['classify-item', { act: select_classify == item.Area }]"
|
|
v-for="item in classifyList"
|
|
v-for="item in classifyList"
|
|
- :key="item.BreedId"
|
|
|
|
|
|
+ :key="item.Area"
|
|
@click="changeClassify(item)"
|
|
@click="changeClassify(item)"
|
|
>
|
|
>
|
|
- {{ item.BreedName }}
|
|
|
|
|
|
+ {{ item.Area }}
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
@@ -57,14 +58,17 @@
|
|
v-loading="dataloading"
|
|
v-loading="dataloading"
|
|
element-loading-text="获取数据中..."
|
|
element-loading-text="获取数据中..."
|
|
>
|
|
>
|
|
- <div class="right-box" v-if="rightShow">
|
|
|
|
|
|
+ <div class="right-box" v-if="rightShow"
|
|
|
|
+ v-infinite-scroll="loadNext"
|
|
|
|
+ :infinite-scroll-disabled="!haveMore"
|
|
|
|
+ :infinite-scroll-immediate="false">
|
|
<template v-if="dateArr.length">
|
|
<template v-if="dateArr.length">
|
|
<div class="data-header">
|
|
<div class="data-header">
|
|
<lz-table
|
|
<lz-table
|
|
:tableOption="tableOption"
|
|
:tableOption="tableOption"
|
|
tableType="header"
|
|
tableType="header"
|
|
ref="table"
|
|
ref="table"
|
|
- source="lz"
|
|
|
|
|
|
+ source="coalWord"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="data-cont" >
|
|
<div class="data-cont" >
|
|
@@ -72,7 +76,7 @@
|
|
:tableOption="tableOption"
|
|
:tableOption="tableOption"
|
|
tableType="data"
|
|
tableType="data"
|
|
:dateArr="dateArr"
|
|
:dateArr="dateArr"
|
|
- source="lz"
|
|
|
|
|
|
+ source="coalWord"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -82,11 +86,11 @@
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
class="frequency-btn"
|
|
class="frequency-btn"
|
|
- :plain="select_frequency !== item.key"
|
|
|
|
|
|
+ :plain="select_frequency !== item"
|
|
v-for="item in frequencyList"
|
|
v-for="item in frequencyList"
|
|
- :key="item.key"
|
|
|
|
- @click="changeFrequency(item.key)"
|
|
|
|
- >{{ item.label }}</el-button
|
|
|
|
|
|
+ :key="item"
|
|
|
|
+ @click="changeFrequency(item)"
|
|
|
|
+ >{{ item }}</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -95,7 +99,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import lzTable from "@/components/lzTable.vue";
|
|
import lzTable from "@/components/lzTable.vue";
|
|
-import { lzDataInterface } from "@/api/api.js";
|
|
|
|
|
|
+import { coalWordInterface } from "@/api/api.js";
|
|
export default {
|
|
export default {
|
|
name: "coalWord",
|
|
name: "coalWord",
|
|
components: { lzTable },
|
|
components: { lzTable },
|
|
@@ -111,23 +115,15 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- exportLzapi() {
|
|
|
|
|
|
+ exportApi() {
|
|
// 数据导出接口
|
|
// 数据导出接口
|
|
let urlStr = this.exportBase;
|
|
let urlStr = this.exportBase;
|
|
// token
|
|
// token
|
|
urlStr += `?${localStorage.getItem("auth") || ""}`;
|
|
urlStr += `?${localStorage.getItem("auth") || ""}`;
|
|
- // 指标名称参数
|
|
|
|
- urlStr += `&QuotaName=${this.select_quota}`;
|
|
|
|
- // 指标id
|
|
|
|
- urlStr += `&LzCode=${this.leftSearchTradeCode}`;
|
|
|
|
// 分类名称
|
|
// 分类名称
|
|
- urlStr += `&BreedName=${this.select_breed}`;
|
|
|
|
- // 频度
|
|
|
|
- urlStr += `&Frequency=${this.select_frequency}`;
|
|
|
|
- // 单位
|
|
|
|
- urlStr += `&UnitName=${this.select_Unit}`;
|
|
|
|
- // 修改时间
|
|
|
|
- urlStr += `&ModifyTime=${this.select_ModifyTime}`;
|
|
|
|
|
|
+ urlStr += `&Area=${this.select_classify}`;
|
|
|
|
+ // 指标Id
|
|
|
|
+ urlStr += `&IndexCode=${this.leftSearchTradeCode}`;
|
|
return this.escapeStr(urlStr);
|
|
return this.escapeStr(urlStr);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -143,10 +139,13 @@ export default {
|
|
isLeftWrapShow:true,
|
|
isLeftWrapShow:true,
|
|
dataloading: false,
|
|
dataloading: false,
|
|
rightShow: false,
|
|
rightShow: false,
|
|
- exportBase: process.env.VUE_APP_API_ROOT + "/datamanage/export/lzList", //数据导出接口
|
|
|
|
|
|
+ exportBase: process.env.VUE_APP_API_ROOT + "/entry/export/mtjh", //数据导出接口
|
|
select_classify: "",
|
|
select_classify: "",
|
|
classifyList: [],
|
|
classifyList: [],
|
|
select_frequency: "",
|
|
select_frequency: "",
|
|
|
|
+ PageSize:20,
|
|
|
|
+ CurrentIndex:1,
|
|
|
|
+ haveMore:true,
|
|
frequencyType: new Map([
|
|
frequencyType: new Map([
|
|
[1, "日度"],
|
|
[1, "日度"],
|
|
[2, "周度"],
|
|
[2, "周度"],
|
|
@@ -159,100 +158,102 @@ export default {
|
|
tableOption: [],
|
|
tableOption: [],
|
|
dateArr: [], //最长的日期数组
|
|
dateArr: [], //最长的日期数组
|
|
btnload: false,
|
|
btnload: false,
|
|
-
|
|
|
|
leftSearchVal: "", //左侧搜索值
|
|
leftSearchVal: "", //左侧搜索值
|
|
leftSearchTradeCode: "", //如果是搜索选择的 则有此code
|
|
leftSearchTradeCode: "", //如果是搜索选择的 则有此code
|
|
- select_quota: "", // 选中的指标名称
|
|
|
|
- select_Unit: "", // 选中的单位
|
|
|
|
- select_ModifyTime: "", //选中的更新时间
|
|
|
|
- select_breed: "", // 选中的分类名称
|
|
|
|
isAuto: true, // 改变分类时是否自动获取数据
|
|
isAuto: true, // 改变分类时是否自动获取数据
|
|
};
|
|
};
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/* 获取分类 */
|
|
/* 获取分类 */
|
|
getClassify() {
|
|
getClassify() {
|
|
- // TODO: 获取分类接口对接
|
|
|
|
- lzDataInterface.classifyList().then((res) => {
|
|
|
|
|
|
+ coalWordInterface.classifyList().then((res) => {
|
|
if (res.Ret !== 200) return;
|
|
if (res.Ret !== 200) return;
|
|
this.classifyList = res.Data || [];
|
|
this.classifyList = res.Data || [];
|
|
this.select_classify =
|
|
this.select_classify =
|
|
- this.select_classify || this.classifyList[0].BreedId;
|
|
|
|
- this.select_breed = this.classifyList[0].BreedName;
|
|
|
|
|
|
+ this.select_classify || this.classifyList[0].Area;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/* 获取频度 */
|
|
/* 获取频度 */
|
|
getFrequency(defaultSelect) {
|
|
getFrequency(defaultSelect) {
|
|
- // TODO: 获取频度接口对接
|
|
|
|
- lzDataInterface
|
|
|
|
- .frequencyList({
|
|
|
|
- BreedId: Number(this.select_classify),
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- if (res.Ret !== 200) return;
|
|
|
|
- this.frequencyList =
|
|
|
|
- res.Data &&
|
|
|
|
- res.Data.map((item) => {
|
|
|
|
- return {
|
|
|
|
- label: this.frequencyType.get(item.Frequency),
|
|
|
|
- key: item.Frequency,
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
- //设置当前选中的频度,若传入有默认选项则选中默认频度,否则选中列表第一个
|
|
|
|
- this.select_frequency = defaultSelect || this.frequencyList[0].key;
|
|
|
|
- //如果有默认频度,结束后恢复watcher
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- if (defaultSelect) this.isAuto = true;
|
|
|
|
- });
|
|
|
|
|
|
+ coalWordInterface.getFrequencyList({
|
|
|
|
+ Area: this.select_classify,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ if (res.Ret !== 200) return;
|
|
|
|
+ this.frequencyList = res.Data || []
|
|
|
|
+ //设置当前选中的频度,若传入有默认选项则选中默认频度,否则选中列表第一个
|
|
|
|
+ this.select_frequency = defaultSelect || this.frequencyList[0];
|
|
|
|
+ //如果有默认频度,结束后恢复watcher
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ if (defaultSelect) this.isAuto = true;
|
|
});
|
|
});
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/* 获取数据 */
|
|
/* 获取数据 */
|
|
getDataList() {
|
|
getDataList() {
|
|
- // TODO: 获取数据接口对接
|
|
|
|
this.dataloading = true;
|
|
this.dataloading = true;
|
|
- lzDataInterface
|
|
|
|
- .dataList({
|
|
|
|
- BreedId: Number(this.select_classify),
|
|
|
|
- Frequency: this.select_frequency,
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- this.rightShow = true;
|
|
|
|
- if (res.Ret !== 200) return;
|
|
|
|
- // 设置表格数据
|
|
|
|
- this.setDataList(res.Data);
|
|
|
|
|
|
+ coalWordInterface.dataList({
|
|
|
|
+ Area: this.select_classify,
|
|
|
|
+ PageSize: this.PageSize,
|
|
|
|
+ CurrentIndex:this.CurrentIndex,
|
|
|
|
+ Frequency: this.select_frequency,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.rightShow = true;
|
|
|
|
+ if (res.Ret !== 200) return;
|
|
|
|
+
|
|
|
|
+ // 找出最多的页码 判断是否还有数据
|
|
|
|
+ let page_arrs = res.Data.map((item) => item.Paging?item.Paging.Pages:0);
|
|
|
|
+ let totalPage = Math.max.apply(Math, page_arrs);
|
|
|
|
+ this.haveMore = this.CurrentIndex < totalPage ? true : false;
|
|
|
|
+ // 设置表格数据
|
|
|
|
+ this.setDataList(res.Data || []);
|
|
|
|
|
|
|
|
+ this.CurrentIndex == 1 &&
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.initWidth();
|
|
this.initWidth();
|
|
- this.dataloading = false;
|
|
|
|
});
|
|
});
|
|
- });
|
|
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ this.dataloading = false;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ /* 滚动加载 */
|
|
|
|
+ loadNext() {
|
|
|
|
+ this.CurrentIndex++;
|
|
|
|
+ if(this.leftSearchTradeCode){
|
|
|
|
+ this.getTargetDataList()
|
|
|
|
+ }else{
|
|
|
|
+ this.getDataList();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- /* 改变品种 */
|
|
|
|
|
|
+ /* 改变分类 */
|
|
changeClassify(item) {
|
|
changeClassify(item) {
|
|
- this.select_classify = item.BreedId;
|
|
|
|
- this.select_breed = item.BreedName;
|
|
|
|
|
|
+ if(this.dataloading) return
|
|
|
|
+ this.select_classify = item.Area;
|
|
this.leftSearchVal = "";
|
|
this.leftSearchVal = "";
|
|
this.leftSearchTradeCode = ""
|
|
this.leftSearchTradeCode = ""
|
|
- this.select_quota = ""
|
|
|
|
- this.select_Unit = ""
|
|
|
|
- this.select_ModifyTime = ""
|
|
|
|
|
|
+ this.CurrentIndex=1
|
|
},
|
|
},
|
|
/* 改变频度 */
|
|
/* 改变频度 */
|
|
- changeFrequency(key) {
|
|
|
|
- this.select_frequency = key;
|
|
|
|
|
|
+ changeFrequency(item) {
|
|
|
|
+ if(this.select_frequency == item) return
|
|
|
|
+ this.select_frequency = item;
|
|
this.leftSearchVal = "";
|
|
this.leftSearchVal = "";
|
|
|
|
+ this.CurrentIndex=1
|
|
},
|
|
},
|
|
initWidth() {
|
|
initWidth() {
|
|
$(".right-box")[0].style.width =
|
|
$(".right-box")[0].style.width =
|
|
- this.$refs.table && this.$refs.table.$el.clientWidth + 2 + "px";
|
|
|
|
|
|
+ this.$refs.table ? this.$refs.table.$el.clientWidth + 2 + "px":0
|
|
$(".right-box")[0].scrollTop = 0;
|
|
$(".right-box")[0].scrollTop = 0;
|
|
$(".right-box")[0].scrollLeft = 0;
|
|
$(".right-box")[0].scrollLeft = 0;
|
|
},
|
|
},
|
|
/* 数据导出 */
|
|
/* 数据导出 */
|
|
exportClick() {
|
|
exportClick() {
|
|
this.btnload = true;
|
|
this.btnload = true;
|
|
|
|
+ console.log({
|
|
|
|
+ Area:this.select_classify,
|
|
|
|
+ IndexCode:this.leftSearchTradeCode
|
|
|
|
+ },this.exportApi);
|
|
const link = document.createElement("a");
|
|
const link = document.createElement("a");
|
|
- link.href = this.exportLzapi;
|
|
|
|
|
|
+ link.href = this.exportApi;
|
|
link.download = "";
|
|
link.download = "";
|
|
link.click();
|
|
link.click();
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -264,7 +265,7 @@ export default {
|
|
async handleLeftSearch(query, cb) {
|
|
async handleLeftSearch(query, cb) {
|
|
cb([]);
|
|
cb([]);
|
|
if (!query) return;
|
|
if (!query) return;
|
|
- const res = await lzDataInterface.getTargetListByName({
|
|
|
|
|
|
+ const res = await coalWordInterface.targetListSearch({
|
|
Keyword: query,
|
|
Keyword: query,
|
|
});
|
|
});
|
|
if (res.Ret === 200) {
|
|
if (res.Ret === 200) {
|
|
@@ -278,26 +279,29 @@ export default {
|
|
},
|
|
},
|
|
// 选中左侧搜索值
|
|
// 选中左侧搜索值
|
|
handleSelectLeftSearchval(e) {
|
|
handleSelectLeftSearchval(e) {
|
|
- if (!e.LzCode) return;
|
|
|
|
- this.rightShow = false;
|
|
|
|
- this.leftSearchTradeCode = e.LzCode;
|
|
|
|
- this.leftSearchVal = e.QuotaName;
|
|
|
|
- this.select_quota = e.QuotaName;
|
|
|
|
- this.select_Unit = e.UnitName;
|
|
|
|
- this.select_ModifyTime = e.ModifyTime;
|
|
|
|
- this.select_classify = this.classifyList.find(
|
|
|
|
- (item) => item.BreedName === e.BreedName
|
|
|
|
- ).BreedId;
|
|
|
|
- this.select_breed = "";
|
|
|
|
|
|
+ if (!e.IndexCode || this.dataloading) return;
|
|
|
|
+ this.leftSearchTradeCode = e.IndexCode;
|
|
|
|
+ this.leftSearchVal = e.IndexName;
|
|
|
|
+ this.select_classify = e.Area
|
|
// 关闭watcher
|
|
// 关闭watcher
|
|
this.isAuto = false;
|
|
this.isAuto = false;
|
|
this.getFrequency(e.Frequency);
|
|
this.getFrequency(e.Frequency);
|
|
- this.setDataList([e]);
|
|
|
|
|
|
+ this.CurrentIndex=1
|
|
|
|
+ this.getTargetDataList()
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.rightShow = true;
|
|
|
|
this.handleScrollLeftWrap();
|
|
this.handleScrollLeftWrap();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ searchvalBlur(){
|
|
|
|
+ if((!this.leftSearchVal) && this.leftSearchTradeCode){
|
|
|
|
+ this.searchvalClear()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ searchvalClear(){
|
|
|
|
+ this.CurrentIndex=1
|
|
|
|
+ this.leftSearchTradeCode=''
|
|
|
|
+ this.getDataList();
|
|
|
|
+ },
|
|
// 左侧滚动
|
|
// 左侧滚动
|
|
handleScrollLeftWrap() {
|
|
handleScrollLeftWrap() {
|
|
let top = $(".act")[0].offsetTop;
|
|
let top = $(".act")[0].offsetTop;
|
|
@@ -305,19 +309,58 @@ export default {
|
|
scrollTop: top - 200,
|
|
scrollTop: top - 200,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 获取单个指标数据
|
|
|
|
+ getTargetDataList() {
|
|
|
|
+ if (!this.leftSearchTradeCode) return;
|
|
|
|
+ this.dataloading = true;
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ coalWordInterface.getTargetDataList({
|
|
|
|
+ IndexCode: this.leftSearchTradeCode,
|
|
|
|
+ Pagesize: this.PageSize,
|
|
|
|
+ CurrentIndex: this.CurrentIndex
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if (res.Ret !== 200) return;
|
|
|
|
+
|
|
|
|
+ this.haveMore = this.CurrentIndex < res.Data.Paging.Pages ? true : false;
|
|
|
|
+ this.setDataList([res.Data])
|
|
|
|
+
|
|
|
|
+ this.CurrentIndex == 1 &&
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.initWidth();
|
|
|
|
+ });
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ this.dataloading = false;
|
|
|
|
+ })
|
|
|
|
+ } catch (err) {
|
|
|
|
+ console.error(err);
|
|
|
|
+ this.dataloading = false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 设置表格数据
|
|
// 设置表格数据
|
|
- setDataList(tableOption) {
|
|
|
|
- this.tableOption = tableOption;
|
|
|
|
- /* 不满6个追加6个空的显示一排 别问 问就是为了美观 */
|
|
|
|
- if (tableOption.length < 6)
|
|
|
|
- for (let i = 0; i < 6; i++) {
|
|
|
|
- this.tableOption.push({
|
|
|
|
- DataList: [],
|
|
|
|
- });
|
|
|
|
- if (this.tableOption.length >= 6) break;
|
|
|
|
|
|
+ setDataList(data) {
|
|
|
|
+ if(this.CurrentIndex ==1){
|
|
|
|
+ this.tableOption = data;
|
|
|
|
+ /* 不满6个追加6个空的显示一排 别问 问就是为了美观 */
|
|
|
|
+ if (data.length < 6){
|
|
|
|
+ for (let i = 0; i < 6; i++) {
|
|
|
|
+ this.tableOption.push({
|
|
|
|
+ DataList: [],
|
|
|
|
+ });
|
|
|
|
+ if (this.tableOption.length >= 6) break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ this.tableOption.forEach((item) => {
|
|
|
|
+ data.forEach((_item) => {
|
|
|
|
+ if (item.IndexCode === _item.IndexCode) {
|
|
|
|
+ item.DataList = item.DataList.concat(_item.DataList);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
// 合并所有日期
|
|
// 合并所有日期
|
|
- let arr = tableOption.map((item) => item.DataList);
|
|
|
|
|
|
+ let arr = this.tableOption.map((item) => item.DataList);
|
|
let obj = [];
|
|
let obj = [];
|
|
arr.forEach((dataList) => {
|
|
arr.forEach((dataList) => {
|
|
obj.push(...dataList.map((item) => item.DataTime));
|
|
obj.push(...dataList.map((item) => item.DataTime));
|
|
@@ -325,11 +368,13 @@ export default {
|
|
// 日期去重倒序排序
|
|
// 日期去重倒序排序
|
|
this.dateArr = [...new Set(obj)].sort().reverse();
|
|
this.dateArr = [...new Set(obj)].sort().reverse();
|
|
//数据最大长度小于12个 追加数据满12个 别问 问就是为了美观
|
|
//数据最大长度小于12个 追加数据满12个 别问 问就是为了美观
|
|
- if (this.dateArr.length < 12)
|
|
|
|
|
|
+ if (this.dateArr.length < 12){
|
|
for (let i = 0; i < 12; i++) {
|
|
for (let i = 0; i < 12; i++) {
|
|
this.dateArr.push("");
|
|
this.dateArr.push("");
|
|
if (this.dateArr.length >= 12) break;
|
|
if (this.dateArr.length >= 12) break;
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
// 对[#,;]转义
|
|
// 对[#,;]转义
|
|
escapeStr(str) {
|
|
escapeStr(str) {
|