添加时间显示
This commit is contained in:
parent
063ab62109
commit
9f2acfee68
|
|
@ -13,7 +13,8 @@
|
|||
value-format="YYYY-MM-DD HH:mm:ss" type="date" placeholder="结束时间" @change="validateEndTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" v-if="!readonly">
|
||||
<el-select v-model="mediaType" placeholder="请选择" style="min-width: 120px;" clearable @change="handleChangeMediaType" >
|
||||
<el-select v-model="mediaType" placeholder="请选择" style="min-width: 120px;" clearable
|
||||
@change="handleChangeMediaType">
|
||||
<el-option v-for="item in mediaTypes" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
|
|
@ -216,7 +217,14 @@ const initHistoryCharLine = () => {
|
|||
_historyChar.value.setOption({
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: "{b} : {c} 元/天" //鼠标放上去 展示内容
|
||||
// formatter: "{b} : {c} 元/天" //鼠标放上去 展示内容
|
||||
formatter: function (params) {
|
||||
// 从原始数据中获取时间
|
||||
const originalData = historyList.value; // 你的原始数据
|
||||
const time = originalData[params.dataIndex].createTime;
|
||||
|
||||
return `${params.name}: ${params.value} 元/天<br/>时间: ${time}`;
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
|
|
@ -304,7 +312,14 @@ const initHistoryCharBar = () => {
|
|||
_historyChar.value.setOption({
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: "{b} : {c} 元/天" //鼠标放上去 展示内容
|
||||
// formatter: "{b} : {c} 元/天" //鼠标放上去 展示内容
|
||||
formatter: function (params) {
|
||||
// 从原始数据中获取时间
|
||||
const originalData = historyList.value; // 你的原始数据
|
||||
const time = originalData[params.dataIndex].createTime;
|
||||
|
||||
return `${params.name}: ${params.value} 元/天<br/>时间: ${time}`;
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
|
|
@ -388,7 +403,7 @@ const initHistoryCharBar = () => {
|
|||
// _historyChar.value.resize()
|
||||
// })
|
||||
}
|
||||
const handleChangeMediaType = (val) => {
|
||||
const handleChangeMediaType = (val) => {
|
||||
getMediaPriceList()
|
||||
}
|
||||
const handleChangeType = (val) => {
|
||||
|
|
@ -424,8 +439,6 @@ const getMediaPriceList = () => {
|
|||
itemYDate = (convertIntTotalRegularPrice / (item.buyCycle * 7)).toFixed(2)
|
||||
} else {
|
||||
const repliceValue = parseInt(item.buyCycle.replace('个月', '').replace('月', ''))
|
||||
console.log('会输入月份的原始值', item.buyCycle)
|
||||
console.log('替换会输入月份的结果', repliceValue)
|
||||
itemYDate = (convertIntTotalRegularPrice / (repliceValue * 31)).toFixed(2)
|
||||
}
|
||||
}
|
||||
|
|
@ -463,7 +476,7 @@ const validateEndTime = (val) => {
|
|||
}
|
||||
};
|
||||
// 对外暴漏方法
|
||||
const initHistoryData = (_mediaId, _readonly) => {
|
||||
const initHistoryData = (_mediaId, _readonly) => {
|
||||
historyDataOpen.value = true
|
||||
readonly.value = _readonly
|
||||
nextTick(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user