更新内容:1.增加上传时间的语义化,显示方式有datetime格式改为YYYY年MM月DD日 2.完善平台信息记录板,将记录信息迁移至数据库中,通过接口获取信息,并添加临期检查时间计算
This commit is contained in:
parent
956b4c4351
commit
43fc4de386
|
@ -150,6 +150,18 @@ export const updatePassword = data =>{
|
|||
})
|
||||
}
|
||||
|
||||
export const getAllPlatformData = () =>{
|
||||
return axios({
|
||||
headers:{
|
||||
"Authorization": localStorage.getItem("systemToken")
|
||||
},
|
||||
url: '/plat/getAllPlatformData',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 默认全部倒出
|
||||
// 根据需要进行
|
||||
export default {
|
||||
|
@ -166,5 +178,6 @@ export default {
|
|||
getFilesInfoByName,
|
||||
getAllUser,
|
||||
getFileTypeById,
|
||||
updatePassword
|
||||
updatePassword,
|
||||
getAllPlatformData
|
||||
}
|
||||
|
|
|
@ -424,6 +424,13 @@ export default {
|
|||
if (res.status == 0) {
|
||||
this.list = res.data
|
||||
this.filesInfo.filesTypeId = this.$route.params.typeId
|
||||
//用于时间格式转换遍历
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
//暂无判空
|
||||
this.list[i].uploadTime = this.$moment(this.list[i].uploadTime).format('YYYY年MM月DD日')
|
||||
|
||||
}
|
||||
|
||||
this.listLoading = false
|
||||
}else {
|
||||
Message.warning("分类显示失败,已显示全部数据")
|
||||
|
|
|
@ -1,75 +1,109 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="serviceName"
|
||||
label="服务/工具名称"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="peopleName"
|
||||
label="负责人/经办人"
|
||||
width="190">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="购买时间/续费时间">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
prop="serviceName"
|
||||
label="服务/工具名称"
|
||||
width="180"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="peopleName"
|
||||
label="负责人/经办人"
|
||||
width="190"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="renewDate"
|
||||
label="购买时间/续费时间"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="describe"
|
||||
label="备注"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="expireTime"
|
||||
label="一年节点(到期/用量检查)"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAllPlatformData } from '@/utils/http/interface'
|
||||
import { Message } from 'element-ui'
|
||||
|
||||
export default {
|
||||
name: 'PlatformData',
|
||||
data(){
|
||||
return{
|
||||
tableData:[
|
||||
{
|
||||
serviceName: "敏感词敏感图过滤服务-百度云",
|
||||
peopleName:"明军老师账号-启磊续费",
|
||||
date:"2022年12月22日续费(1年 图片,敏感词各五十万次调用)"
|
||||
},
|
||||
{
|
||||
serviceName: "实名认证服务-网易易盾",
|
||||
peopleName:"启磊",
|
||||
date:"2022年7月底购买"
|
||||
},
|
||||
{
|
||||
serviceName: "SSL证书",
|
||||
peopleName:"明军老师",
|
||||
date:"2022年6月29日颁发"
|
||||
},
|
||||
{
|
||||
serviceName: "短信服务-云片网",
|
||||
peopleName:"公共邮箱账号-明军老师续费",
|
||||
date:"2022年09月续费1000元"
|
||||
},
|
||||
{
|
||||
serviceName: "微信小程序认证",
|
||||
peopleName:"维昊",
|
||||
date:"2022年09月07日提交认证"
|
||||
},
|
||||
{
|
||||
serviceName: "微信公众号",
|
||||
peopleName:"苛萱账号-明军老师续费",
|
||||
date:"2022年04月12日提交认证"
|
||||
},
|
||||
{
|
||||
serviceName: "sca工具",
|
||||
peopleName:"维昊",
|
||||
date:"-"
|
||||
},
|
||||
{
|
||||
serviceName: "华为云服务器",
|
||||
peopleName:"明军老师",
|
||||
date:"-"
|
||||
},
|
||||
]
|
||||
data() {
|
||||
return {
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.$api.getAllPlatformData().then((res) => {
|
||||
if (res.status == 0) {
|
||||
this.tableData = res.data
|
||||
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].renewDate != null) {
|
||||
this.tableData[i].renewDate = this.$moment(this.tableData[i].renewDate).format('YYYY-MM-DD')
|
||||
//计算到期时间
|
||||
var expireTime = this.$moment(this.tableData[i].renewDate).add(1, 'years')
|
||||
this.tableData[i].expireTime = this.$moment(expireTime, 'YYYY-MM-DD').fromNow(true)
|
||||
} else {
|
||||
this.tableData[i].renewDate = '未设置时间'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Message.warning('系统错误')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
//moment计算时间 本地化
|
||||
this.$moment.defineLocale('zh-cn', {
|
||||
relativeTime: {
|
||||
|
||||
future: '%s内',
|
||||
|
||||
past: '%s前',
|
||||
|
||||
s: '几秒',
|
||||
|
||||
m: '1 分钟',
|
||||
|
||||
mm: '%d 分钟',
|
||||
|
||||
h: '1 小时',
|
||||
|
||||
hh: '%d 小时',
|
||||
|
||||
d: '1 天',
|
||||
|
||||
dd: '%d 天',
|
||||
|
||||
M: '1 个月',
|
||||
|
||||
MM: '%d 个月',
|
||||
|
||||
y: '1 年',
|
||||
|
||||
yy: '%d 年'
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -7464,7 +7464,7 @@ mockjs@1.0.1-beta3:
|
|||
|
||||
moment@^2.29.4:
|
||||
version "2.29.4"
|
||||
resolved "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
|
||||
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
|
||||
|
||||
move-concurrently@^1.0.1:
|
||||
|
|
Loading…
Reference in New Issue