fanzhen0117

This commit is contained in:
fanzhen123
2020-01-17 16:20:21 +08:00
parent 14658634dc
commit 1bf723e62e
8 changed files with 108 additions and 5 deletions

View File

@@ -529,6 +529,7 @@ export default {
this.transBefore.timeArr = this.$store.state.transBefore.timeArr
this.transBefore.termsName = this.$store.state.transBefore.termsName
this.transBefore.termsExplain = this.$store.state.transBefore.termsExplain
this.transBefore.dataSource = this.$store.state.transBefore.dataSource
this.transBefore.areaName = this.$store.state.transBefore.areaName
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
@@ -545,6 +546,7 @@ export default {
this.transBefore.timeArr = this.$store.state.transBefore.timeArr
this.transBefore.termsName = this.$store.state.transBefore.termsName
this.transBefore.termsExplain = this.$store.state.transBefore.termsExplain
this.transBefore.dataSource = this.$store.state.transBefore.dataSource
this.transBefore.areaName = this.$store.state.transBefore.areaName
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
@@ -564,6 +566,7 @@ export default {
this.transBefore.timeArr = this.$store.state.transBefore.timeArr
this.transBefore.termsName = this.$store.state.transBefore.termsName
this.transBefore.termsExplain = this.$store.state.transBefore.termsExplain
this.transBefore.dataSource = this.$store.state.transBefore.dataSource
this.transBefore.areaName = this.$store.state.transBefore.areaName
this.transBefore.transBeforeTermsData = this.$store.state.transBefore.transBeforeTermsData
this.transBefore.transBeforeAreaData = this.$store.state.transBefore.transBeforeAreaData
@@ -876,6 +879,8 @@ export default {
if (this.transBefore.termsName.indexOf(labIndexName) !== -1) {
console.log('指标解释:', this.transBefore.termsExplain[this.transBefore.termsName.indexOf(labIndexName)])
this.$store.state.labelExplainData = this.transBefore.termsExplain[this.transBefore.termsName.indexOf(labIndexName)]
// 数据来源
this.$store.state.dataFrom = this.transBefore.dataSource[this.transBefore.termsName.indexOf(labIndexName)]
this.$store.state.labelExplainState = true
} else {
this.$store.state.labelExplainData = labIndexName
@@ -1146,6 +1151,7 @@ export default {
brrtf.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
brrtf.termsName = res.data.data.termsName
brrtf.termsExplain = res.data.data.termsExplain
brrtf.dataSource = res.data.data.dataSource
brrtf.areaName = res.data.data.areaName
if (this.$route.query.type === 'area') {
console.log(this.$store.state.yesNoClickZZ, '走这里')
@@ -1188,6 +1194,7 @@ export default {
this.transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
this.transBefore.termsName = res.data.data.termsName
this.transBefore.termsExplain = res.data.data.termsExplain
this.transBefore.dataSource = res.data.data.dataSource
this.transBefore.areaName = res.data.data.areaName
this.transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
this.transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
@@ -1207,6 +1214,7 @@ export default {
this.transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
this.transBefore.termsName = res.data.data.termsName
this.transBefore.termsExplain = res.data.data.termsExplain
this.transBefore.dataSource = res.data.data.dataSource
this.transBefore.areaName = res.data.data.areaName
this.transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
this.transBefore.transBeforeAreaData = res.data.data.transBeforeAreaData
@@ -1277,6 +1285,7 @@ export default {
transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
transBefore.termsName = res.data.data.termsName
transBefore.termsExplain = res.data.data.termsExplain
transBefore.dataSource = res.data.data.dataSource
transBefore.areaName = res.data.data.areaName
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
// 转置后在请求数据 需要将数据转置
@@ -1330,8 +1339,12 @@ export default {
computed: {
// 计算表说明字符串
computedTableExplain() {
this.transBefore.tableExplain ? this.transBefore.tableExplain = this.transBefore.tableExplain : this.transBefore.tableExplain = ''
return this.transBefore.tableExplain.replace(/\\n/gm, "<br/>")
let Str = ''
if (this.transBefore) {
this.transBefore.tableExplain ? this.transBefore.tableExplain = this.transBefore.tableExplain : this.transBefore.tableExplain = ''
Str = this.transBefore.tableExplain
}
return Str.replace(/\\n/gm, "<br/>")
},
// 行计算样式
computedLineSty() {

View File

@@ -175,18 +175,21 @@ export default {
transBefore.termsName = res.data.data.termsName
transBefore.areaName = this.$store.state.transBefore.areaName
transBefore.termsExplain = res.data.data.termsExplain
transBefore.dataSource = res.data.data.dataSource
this.$store.newSelectChangeData = this.$store.state.dataArealabelTime.areaArr
} else if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'sj')) {
transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
transBefore.termsName = this.$store.state.transBefore.termsName
transBefore.areaName = res.data.data.areaName
transBefore.termsExplain = this.$store.state.transBefore.termsExplain
transBefore.dataSource = this.$store.state.transBefore.dataSource
this.$store.newSelectChangeData = this.$store.state.dataArealabelTime.quotaArr
} else if ((this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'zb')) {
transBefore.timeArr = this.$store.state.transBefore.timeArr.map((item, index) => { return item.toString() })
transBefore.termsName = res.data.data.termsName
transBefore.areaName = res.data.data.areaName
transBefore.termsExplain = res.data.data.termsExplain
transBefore.dataSource = res.data.data.dataSource
this.$store.newSelectChangeData = this.$store.state.dataArealabelTime.timeArr
}
transBefore.tableExplain = res.data.data.tableExplain

View File

@@ -514,6 +514,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
@@ -542,6 +545,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
@@ -648,6 +654,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return lebalIndex.indexOf(index) !== -1
})

View File

@@ -301,6 +301,7 @@ export default {
// 将处理完的数据放到全局变量中
this.$store.state.transBefore.termsName.push(this.insertName)
this.$store.state.transBefore.termsExplain.push('')
this.$store.state.transBefore.dataSource.push('')
this.$store.state.transBefore.transBeforeTermsData.push(dataStrArr)
} else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
if (this.$store.state.transBefore.timeArr.indexOf(this.insertName) !== -1) {
@@ -374,6 +375,7 @@ export default {
// 将处理完的数据放到全局变量中
this.$store.state.transBefore.termsName.push(this.insertName)
this.$store.state.transBefore.termsExplain.push('')
this.$store.state.transBefore.dataSource.push('')
this.$store.state.transBefore.transBeforeAreaData.push(dataStrArr)
} else if (this.$store.state.SelecttDimension.col === 'sj' && this.$store.state.SelecttDimension.row === 'zb') {
if (this.$store.state.transBefore.timeArr.indexOf(this.insertName) !== -1) {
@@ -541,6 +543,7 @@ export default {
// console.log(dataStrArr, 'dataStrArr新增指标')
this.$store.state.transBefore.termsName.push(this.insertName)
this.$store.state.transBefore.termsExplain.push('')
this.$store.state.transBefore.dataSource.push('')
this.$store.state.transBefore.transBeforeAreaData.push(dataStrArr)
// 转置回来
arrData = JSON.parse(JSON.stringify(this.$store.state.transBefore.transBeforeAreaData))
@@ -585,6 +588,7 @@ export default {
// 将处理完的数据放到全局变量中
this.$store.state.transBefore.termsName.push(this.insertName)
this.$store.state.transBefore.termsExplain.push('')
this.$store.state.transBefore.dataSource.push('')
this.$store.state.transBefore.transBeforeTermsData.push(dataStrArr)
} else if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
if (this.$store.state.transBefore.timeArr.indexOf(this.insertName) !== -1) {
@@ -658,6 +662,7 @@ export default {
// 将处理完的数据放到全局变量中
this.$store.state.transBefore.termsName.push(this.insertName)
this.$store.state.transBefore.termsExplain.push('')
this.$store.state.transBefore.dataSource.push('')
this.$store.state.transBefore.transBeforeAreaData.push(dataStrArr)
} else if (this.$store.state.SelecttDimension.col === 'zb' && this.$store.state.SelecttDimension.row === 'sj') {
if (this.$store.state.transBefore.timeArr.indexOf(this.insertName) !== -1) {
@@ -825,6 +830,7 @@ export default {
// console.log(dataStrArr, 'dataStrArr新增指标')
this.$store.state.transBefore.termsName.push(this.insertName)
this.$store.state.transBefore.termsExplain.push('')
this.$store.state.transBefore.dataSource.push('')
this.$store.state.transBefore.transBeforeAreaData.push(dataStrArr)
// 转置回来
arrData = JSON.parse(JSON.stringify(this.$store.state.transBefore.transBeforeAreaData))

View File

@@ -5,6 +5,10 @@
<span>指标解释</span>
<img :src="imgUrl" alt @click="$store.state.labelExplainState=false" />
</div>
<div class="top_center">
<span>数据来源</span>
<span :title="$store.state.dataFrom">{{$store.state.dataFrom}}</span>
</div>
<div class="contanin">{{$store.state.labelExplainData}}</div>
<input type="hidden" :value="$store.state.labelExplainData" />
<!-- 确定取消 -->
@@ -20,7 +24,6 @@ export default {
data () {
return {
imgUrl: require('../../../static/nav/deleteImg.png')
}
},
methods: {
@@ -86,6 +89,33 @@ export default {
cursor: pointer;
}
}
& > .top_center {
margin-top: 0.6rem;
width: 38.375rem;
height: 3.925rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
// border: 1px solid red;
& > span {
padding: 0.12rem;
}
& > span:nth-child(1) {
font-size: 0.875rem;
font-weight: bold;
}
& > span:nth-child(2) {
padding: 0 0.32rem;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
& > span:nth-child(2):hover {
cursor: pointer;
}
}
& > .titles {
margin: 1rem 0;
width: 38.375rem;
@@ -114,7 +144,7 @@ export default {
margin-top: 1rem;
padding: 0.5rem;
width: 37.375rem;
height: 27rem;
height: 24rem;
font-size: 1.125rem;
font-weight: normal;
font-stretch: normal;
@@ -122,6 +152,7 @@ export default {
letter-spacing: 0rem;
color: #666666;
overflow: auto;
background-color: #eeeeee;
}
& > .bottom {
width: 38.375rem;

View File

@@ -378,6 +378,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return brre.indexOf(index) !== -1
})
@@ -469,6 +472,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.transBefore.dataSource.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
@@ -548,6 +554,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return brre.indexOf(index) !== -1
})
@@ -624,6 +633,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
@@ -852,6 +864,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return brre.indexOf(index) !== -1
})
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
// 关闭窗口
this.$store.state.selcettWindowState = false
@@ -929,6 +944,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
console.log(this.$store.state.transBefore, 'this.$store.state.transBefore')
// 关闭窗口
this.$store.state.selcettWindowState = false
@@ -1021,6 +1039,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.transBefore.dataSource.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
@@ -1097,6 +1118,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.noChangeData.termsName.filter((item, index) => {
return brre.indexOf(index) !== -1
})
@@ -1190,6 +1214,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.transBefore.dataSource.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
@@ -1281,6 +1308,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.transBefore.dataSource.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.termsName = this.$store.state.transBefore.termsName.filter((item, index) => {
return brre.indexOf(index) !== -1
})
@@ -1548,6 +1578,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return brre.indexOf(index) !== -1
})
this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
@@ -1639,6 +1672,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.noChangeData.termsExplain.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.dataSource = this.$store.state.noChangeData.dataSource.filter((item, index) => {
return AllLabelIndex.indexOf(index) !== -1
})
this.$store.state.transBefore.areaName = this.$store.state.transBefore.areaName.filter((item, index) => {
return brre.indexOf(index) !== -1
})

View File

@@ -20,7 +20,9 @@ export default new Vuex.Store({
// 指标解释状态
labelExplainState: false,
// 指标解释数据
labelExplainData: '这是指标解释使劲儿发红包健康撒大部分更健康',
labelExplainData: '',
// 数据来源
dataFrom: '',
// 维度转换状态
dimensionState: false,
// 数据表中的数据

View File

@@ -838,6 +838,9 @@ export default {
this.$store.state.transBefore.termsExplain = this.$store.state.transBefore.termsExplain.filter((item, index) => {
return firstHang.indexOf(index) === -1
})
this.$store.state.transBefore.dataSource = this.$store.state.transBefore.dataSource.filter((item, index) => {
return firstHang.indexOf(index) === -1
})
this.$store.state.transBefore.timeArr = this.$store.state.transBefore.timeArr.filter((item, index) => {
return secendHang.indexOf(index) === -1
})