2 changed files with 764 additions and 0 deletions
@ -0,0 +1,752 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<el-dialog |
||||
|
:visible.sync="visible" |
||||
|
width="560px" |
||||
|
custom-class="version-info-dialog" |
||||
|
:append-to-body="true" |
||||
|
:show-close="false" |
||||
|
:close-on-click-modal="view !== 'add'" |
||||
|
@close="onDialogClose"> |
||||
|
<button type="button" class="ver-close" @click="visible = false">×</button> |
||||
|
|
||||
|
<div v-show="view === 'about'" class="ver-panel" v-loading="loading"> |
||||
|
<div class="ver-brand"> |
||||
|
<div class="ver-logo" aria-hidden="true"> |
||||
|
<svg viewBox="0 0 48 48" width="32" height="32"> |
||||
|
<path fill="currentColor" d="M8 20h6V8h4v12h4l2-6h4l2 6h4v-8h4v8h2v4H6v-4h2zm2 8h28v12H10V28zm6 4v4h4v-4h-4zm8 0v4h4v-4h-4z"/> |
||||
|
</svg> |
||||
|
</div> |
||||
|
<div class="ver-brand-text"> |
||||
|
<div class="ver-company">{{ profile.company }}</div> |
||||
|
<div class="ver-product">{{ profile.product }}</div> |
||||
|
<span class="ver-badge">{{ profile.environment }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="ver-hero"> |
||||
|
<div> |
||||
|
<div class="ver-number">{{ current ? current.versionNo : '—' }}</div> |
||||
|
<div class="ver-number-label">当前部署版本</div> |
||||
|
</div> |
||||
|
<span v-if="current" class="ver-badge ver-badge--live">运行中</span> |
||||
|
</div> |
||||
|
|
||||
|
<div class="ver-grid"> |
||||
|
<div> |
||||
|
<div class="ver-label">版本发布日期</div> |
||||
|
<div class="ver-value">{{ releaseDateText }}</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="ver-label">构建版本号</div> |
||||
|
<div class="ver-value">{{ current && current.buildNo ? current.buildNo : '—' }}</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="ver-label">系统部署日期</div> |
||||
|
<div class="ver-value">{{ deployDateText }}</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="ver-label">最近升级时间</div> |
||||
|
<div class="ver-value">{{ upgradeTimeText }}</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="ver-label">部署环境</div> |
||||
|
<div class="ver-value">{{ profile.environment }}</div> |
||||
|
</div> |
||||
|
<div> |
||||
|
<div class="ver-label">部署模式</div> |
||||
|
<div class="ver-value">{{ profile.deployMode }}</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div class="ver-support"> |
||||
|
<div class="ver-support-row"> |
||||
|
<span>技术支持单位</span> |
||||
|
<span>{{ profile.supportCompany }}</span> |
||||
|
</div> |
||||
|
<div class="ver-support-row"> |
||||
|
<span>联系电话</span> |
||||
|
<span>{{ profile.supportPhone }}</span> |
||||
|
</div> |
||||
|
<div class="ver-support-row"> |
||||
|
<span>技术支持邮箱</span> |
||||
|
<span>{{ profile.supportEmail }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<button type="button" class="ver-history-link" @click="openHistory">查看全部历史版本 →</button> |
||||
|
<div class="ver-copy">Copyright © {{ year }} All Rights Reserved.</div> |
||||
|
</div> |
||||
|
|
||||
|
<div v-show="view === 'history'" class="ver-panel"> |
||||
|
<div class="ver-subhead"> |
||||
|
<button type="button" class="ver-back" @click="view = 'about'">← 返回</button> |
||||
|
<div class="ver-subhead-title">历史版本</div> |
||||
|
<button v-if="canAdd" type="button" class="ver-add" @click="openAdd">新增版本</button> |
||||
|
<span v-else class="ver-add-placeholder"></span> |
||||
|
</div> |
||||
|
<div class="ver-history-list" v-loading="loading"> |
||||
|
<div v-if="!list.length && !loading" class="ver-history-empty">暂无历史版本</div> |
||||
|
<div v-for="item in list" :key="item.id" class="ver-history-item"> |
||||
|
<div class="ver-history-top"> |
||||
|
<span class="ver-history-no">{{ item.versionNo }}</span> |
||||
|
<span class="ver-history-date">{{ item.releaseDate || dateOnly(item.createdDate) }}</span> |
||||
|
</div> |
||||
|
<div class="ver-history-desc">{{ item.versionDesc || '暂无版本说明' }}</div> |
||||
|
<div class="ver-history-foot"> |
||||
|
<span class="ver-history-file">{{ item.fileName || '未上传文档' }}</span> |
||||
|
<span class="ver-history-actions"> |
||||
|
<button v-if="canView && item.hasFile" type="button" @click="viewFile(item)">查看文档</button> |
||||
|
<button v-if="canUpload" type="button" @click="pickFile(item)">{{ item.hasFile ? '重新上传' : '上传' }}</button> |
||||
|
</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div v-show="view === 'add'" class="ver-panel"> |
||||
|
<div class="ver-subhead"> |
||||
|
<button type="button" class="ver-back" @click="view = 'history'">← 返回</button> |
||||
|
<div class="ver-subhead-title">新增版本</div> |
||||
|
<span class="ver-add-placeholder"></span> |
||||
|
</div> |
||||
|
<el-form :model="form" :rules="rules" ref="form" label-position="top" class="ver-form" @submit.native.prevent> |
||||
|
<el-form-item label="版本号" prop="versionNo"> |
||||
|
<el-input v-model="form.versionNo" maxlength="50" placeholder="例如 V5.3.2"></el-input> |
||||
|
</el-form-item> |
||||
|
<div class="ver-form-row"> |
||||
|
<el-form-item label="构建版本号" prop="buildNo"> |
||||
|
<el-input v-model="form.buildNo" maxlength="50" placeholder="例如 20261121.01"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="版本发布日期" prop="releaseDate"> |
||||
|
<el-date-picker |
||||
|
v-model="form.releaseDate" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择日期" |
||||
|
popper-class="ver-date-popper" |
||||
|
style="width: 100%"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
<el-form-item label="版本说明" prop="versionDesc"> |
||||
|
<el-input type="textarea" v-model="form.versionDesc" :rows="4" maxlength="2000" placeholder="本次更新内容"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item v-if="canUpload" label="说明文档"> |
||||
|
<el-upload |
||||
|
action="" |
||||
|
:auto-upload="false" |
||||
|
:limit="1" |
||||
|
:file-list="addFileList" |
||||
|
:on-change="onAddFile" |
||||
|
:on-remove="onAddFileRemove"> |
||||
|
<button type="button" class="ver-file-btn">选择文档</button> |
||||
|
</el-upload> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="ver-form-actions"> |
||||
|
<button type="button" class="ver-btn ver-btn--ghost" @click="view = 'history'">取消</button> |
||||
|
<button type="button" class="ver-btn ver-btn--primary" :disabled="saving" @click="saveVersion">{{ saving ? '保存中…' : '确定' }}</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<el-dialog |
||||
|
:title="previewTitle || '版本文档'" |
||||
|
:visible.sync="previewVisible" |
||||
|
width="80%" |
||||
|
custom-class="version-preview-dialog" |
||||
|
:append-to-body="true" |
||||
|
@close="closePreview"> |
||||
|
<iframe v-if="previewType === 'pdf'" :src="previewUrl" class="version-preview"></iframe> |
||||
|
<img v-else-if="previewType === 'image'" :src="previewUrl" class="version-preview-img"> |
||||
|
<pre v-else-if="previewType === 'text'" class="version-preview-text">{{ previewText }}</pre> |
||||
|
</el-dialog> |
||||
|
|
||||
|
<input ref="rowFile" type="file" class="version-hidden-file" @change="onRowFile"> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {createFormAPI} from '@/utils/httpRequest' |
||||
|
|
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
loading: false, |
||||
|
saving: false, |
||||
|
view: 'about', |
||||
|
list: [], |
||||
|
year: new Date().getFullYear(), |
||||
|
profile: { |
||||
|
company: '上海博应信息技术有限公司', |
||||
|
product: 'Manufacturing Execution System', |
||||
|
environment: '正式环境', |
||||
|
deployMode: '本地私有化部署', |
||||
|
supportCompany: '苏州旭捷信息技术有限公司', |
||||
|
supportPhone: '0512-62963812', |
||||
|
supportEmail: 'support@xujiesoft.com' |
||||
|
}, |
||||
|
form: { |
||||
|
versionNo: '', |
||||
|
buildNo: '', |
||||
|
releaseDate: '', |
||||
|
versionDesc: '' |
||||
|
}, |
||||
|
rules: { |
||||
|
versionNo: [{required: true, message: '请输入版本号', trigger: 'blur'}] |
||||
|
}, |
||||
|
addFile: null, |
||||
|
addFileList: [], |
||||
|
uploadRow: null, |
||||
|
previewVisible: false, |
||||
|
previewType: '', |
||||
|
previewUrl: '', |
||||
|
previewText: '', |
||||
|
previewTitle: '' |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
canAdd () { |
||||
|
return this.isAuth('version:add') |
||||
|
}, |
||||
|
canUpload () { |
||||
|
return this.isAuth('version:upload') |
||||
|
}, |
||||
|
canView () { |
||||
|
return this.isAuth('version:view') |
||||
|
}, |
||||
|
current () { |
||||
|
return this.list.length ? this.list[0] : null |
||||
|
}, |
||||
|
releaseDateText () { |
||||
|
if (!this.current) { |
||||
|
return '—' |
||||
|
} |
||||
|
return this.current.releaseDate || this.dateOnly(this.current.createdDate) || '—' |
||||
|
}, |
||||
|
upgradeTimeText () { |
||||
|
if (!this.current || !this.current.createdDate) { |
||||
|
return '—' |
||||
|
} |
||||
|
return String(this.current.createdDate).slice(0, 16) |
||||
|
}, |
||||
|
deployDateText () { |
||||
|
const dates = this.list |
||||
|
.map(item => item.releaseDate || this.dateOnly(item.createdDate)) |
||||
|
.filter(Boolean) |
||||
|
.sort() |
||||
|
return dates.length ? dates[0] : '—' |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.view = 'about' |
||||
|
this.visible = true |
||||
|
this.getList() |
||||
|
}, |
||||
|
openHistory () { |
||||
|
this.view = 'history' |
||||
|
}, |
||||
|
openAdd () { |
||||
|
this.form = {versionNo: '', buildNo: '', releaseDate: '', versionDesc: ''} |
||||
|
this.addFile = null |
||||
|
this.addFileList = [] |
||||
|
this.view = 'add' |
||||
|
this.$nextTick(() => { |
||||
|
if (this.$refs.form) { |
||||
|
this.$refs.form.clearValidate() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
onDialogClose () { |
||||
|
this.view = 'about' |
||||
|
this.closePreview() |
||||
|
}, |
||||
|
dateOnly (value) { |
||||
|
if (!value) { |
||||
|
return '' |
||||
|
} |
||||
|
return String(value).slice(0, 10) |
||||
|
}, |
||||
|
getList () { |
||||
|
this.loading = true |
||||
|
this.$http({ |
||||
|
url: this.$http.adornUrl('/sys/version/list'), |
||||
|
method: 'get', |
||||
|
params: this.$http.adornParams() |
||||
|
}).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.list = data.list || [] |
||||
|
} else { |
||||
|
this.list = [] |
||||
|
this.$message.warning((data && data.msg) || '版本信息加载失败') |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.$message.error('版本信息加载失败,请确认已执行建表脚本并重启服务') |
||||
|
}).finally(() => { |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
onAddFile (file, fileList) { |
||||
|
this.addFile = file && file.raw ? file.raw : null |
||||
|
this.addFileList = fileList.slice(-1) |
||||
|
}, |
||||
|
onAddFileRemove () { |
||||
|
this.addFile = null |
||||
|
this.addFileList = [] |
||||
|
}, |
||||
|
saveVersion () { |
||||
|
this.$refs.form.validate(valid => { |
||||
|
if (!valid) { |
||||
|
return |
||||
|
} |
||||
|
const formData = new FormData() |
||||
|
formData.append('versionNo', (this.form.versionNo || '').trim()) |
||||
|
formData.append('buildNo', (this.form.buildNo || '').trim()) |
||||
|
formData.append('releaseDate', this.form.releaseDate || '') |
||||
|
formData.append('versionDesc', this.form.versionDesc || '') |
||||
|
if (this.canUpload && this.addFile) { |
||||
|
formData.append('file', this.addFile) |
||||
|
} |
||||
|
this.saving = true |
||||
|
createFormAPI('/sys/version/save', 'post', formData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('版本已保存') |
||||
|
this.view = 'history' |
||||
|
this.getList() |
||||
|
} else { |
||||
|
this.$message.warning((data && data.msg) || '保存失败') |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.$message.error('保存失败') |
||||
|
}).finally(() => { |
||||
|
this.saving = false |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
pickFile (row) { |
||||
|
this.uploadRow = row |
||||
|
this.$refs.rowFile.value = '' |
||||
|
this.$refs.rowFile.click() |
||||
|
}, |
||||
|
onRowFile (event) { |
||||
|
const file = event.target.files && event.target.files[0] |
||||
|
if (!file || !this.uploadRow) { |
||||
|
return |
||||
|
} |
||||
|
const formData = new FormData() |
||||
|
formData.append('id', this.uploadRow.id) |
||||
|
formData.append('file', file) |
||||
|
createFormAPI('/sys/version/upload', 'post', formData).then(({data}) => { |
||||
|
if (data && data.code === 0) { |
||||
|
this.$message.success('文档已上传') |
||||
|
this.getList() |
||||
|
} else { |
||||
|
this.$message.warning((data && data.msg) || '上传失败') |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.$message.error('上传失败') |
||||
|
}) |
||||
|
}, |
||||
|
viewFile (row) { |
||||
|
this.$http({ |
||||
|
url: this.$http.adornUrl('/sys/version/file/' + row.id), |
||||
|
method: 'get', |
||||
|
responseType: 'blob' |
||||
|
}).then(async (res) => { |
||||
|
const blob = res.data |
||||
|
if (blob && blob.type && blob.type.indexOf('application/json') === 0) { |
||||
|
let msg = '打开文档失败' |
||||
|
try { |
||||
|
msg = JSON.parse(await blob.text()).msg || msg |
||||
|
} catch (e) {} |
||||
|
this.$message.warning(msg) |
||||
|
return |
||||
|
} |
||||
|
const name = row.fileName || '' |
||||
|
const suffix = name.indexOf('.') >= 0 ? name.substring(name.lastIndexOf('.') + 1).toLowerCase() : '' |
||||
|
this.closePreview() |
||||
|
this.previewTitle = name |
||||
|
if (suffix === 'txt') { |
||||
|
this.previewType = 'text' |
||||
|
this.previewText = await blob.text() |
||||
|
this.previewVisible = true |
||||
|
} else if (suffix === 'pdf') { |
||||
|
this.previewType = 'pdf' |
||||
|
this.previewUrl = URL.createObjectURL(blob) |
||||
|
this.previewVisible = true |
||||
|
} else if (['png', 'jpg', 'jpeg', 'gif', 'webp'].indexOf(suffix) !== -1) { |
||||
|
this.previewType = 'image' |
||||
|
this.previewUrl = URL.createObjectURL(blob) |
||||
|
this.previewVisible = true |
||||
|
} else { |
||||
|
const link = document.createElement('a') |
||||
|
link.href = URL.createObjectURL(blob) |
||||
|
link.download = name || 'version' |
||||
|
document.body.appendChild(link) |
||||
|
link.click() |
||||
|
URL.revokeObjectURL(link.href) |
||||
|
document.body.removeChild(link) |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.$message.error('打开文档失败') |
||||
|
}) |
||||
|
}, |
||||
|
closePreview () { |
||||
|
if (this.previewUrl) { |
||||
|
URL.revokeObjectURL(this.previewUrl) |
||||
|
} |
||||
|
this.previewUrl = '' |
||||
|
this.previewText = '' |
||||
|
this.previewType = '' |
||||
|
} |
||||
|
}, |
||||
|
beforeDestroy () { |
||||
|
this.closePreview() |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.version-hidden-file { |
||||
|
display: none; |
||||
|
} |
||||
|
.version-info-dialog.el-dialog { |
||||
|
background: #0c0c0c; |
||||
|
border: 1px solid #2a2a2a; |
||||
|
border-radius: 18px; |
||||
|
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45); |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
.version-info-dialog .el-dialog__header { |
||||
|
display: none; |
||||
|
} |
||||
|
.version-info-dialog .el-dialog__body { |
||||
|
position: relative; |
||||
|
padding: 28px 32px 22px; |
||||
|
color: #f5f5f5; |
||||
|
background: #0c0c0c; |
||||
|
} |
||||
|
.version-info-dialog .ver-close { |
||||
|
position: absolute; |
||||
|
top: 14px; |
||||
|
right: 16px; |
||||
|
z-index: 2; |
||||
|
width: 28px; |
||||
|
height: 28px; |
||||
|
border: 0; |
||||
|
background: transparent; |
||||
|
color: #8d8d8d; |
||||
|
font-size: 22px; |
||||
|
line-height: 28px; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.version-info-dialog .ver-close:hover { |
||||
|
color: #fff; |
||||
|
} |
||||
|
.version-info-dialog .ver-panel { |
||||
|
animation: ver-in 0.22s ease; |
||||
|
} |
||||
|
@keyframes ver-in { |
||||
|
from { opacity: 0; transform: translateY(6px); } |
||||
|
to { opacity: 1; transform: none; } |
||||
|
} |
||||
|
.version-info-dialog .ver-brand { |
||||
|
display: flex; |
||||
|
align-items: flex-start; |
||||
|
gap: 14px; |
||||
|
} |
||||
|
.version-info-dialog .ver-logo { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
width: 58px; |
||||
|
height: 58px; |
||||
|
border: 1px solid #3a3a3a; |
||||
|
border-radius: 14px; |
||||
|
color: #fff; |
||||
|
flex: none; |
||||
|
} |
||||
|
.version-info-dialog .ver-company { |
||||
|
font-size: 16px; |
||||
|
font-weight: 600; |
||||
|
line-height: 1.4; |
||||
|
} |
||||
|
.version-info-dialog .ver-product { |
||||
|
margin-top: 2px; |
||||
|
color: #9a9a9a; |
||||
|
font-size: 13px; |
||||
|
} |
||||
|
.version-info-dialog .ver-badge { |
||||
|
display: inline-block; |
||||
|
margin-top: 8px; |
||||
|
padding: 2px 8px; |
||||
|
border-radius: 999px; |
||||
|
background: rgba(34, 140, 78, 0.28); |
||||
|
color: #3ddc84; |
||||
|
font-size: 12px; |
||||
|
line-height: 18px; |
||||
|
} |
||||
|
.version-info-dialog .ver-hero { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
margin-top: 28px; |
||||
|
} |
||||
|
.version-info-dialog .ver-number { |
||||
|
font-size: 34px; |
||||
|
font-weight: 700; |
||||
|
letter-spacing: 0.5px; |
||||
|
line-height: 1.1; |
||||
|
} |
||||
|
.version-info-dialog .ver-number-label { |
||||
|
margin-top: 6px; |
||||
|
color: #8d8d8d; |
||||
|
font-size: 13px; |
||||
|
} |
||||
|
.version-info-dialog .ver-badge--live { |
||||
|
margin-top: 0; |
||||
|
} |
||||
|
.version-info-dialog .ver-grid { |
||||
|
display: grid; |
||||
|
grid-template-columns: 1fr 1fr; |
||||
|
gap: 18px 28px; |
||||
|
margin-top: 26px; |
||||
|
} |
||||
|
.version-info-dialog .ver-label { |
||||
|
color: #8d8d8d; |
||||
|
font-size: 13px; |
||||
|
} |
||||
|
.version-info-dialog .ver-value { |
||||
|
margin-top: 6px; |
||||
|
font-size: 16px; |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
.version-info-dialog .ver-support { |
||||
|
margin-top: 26px; |
||||
|
padding-top: 8px; |
||||
|
border-top: 1px solid #242424; |
||||
|
} |
||||
|
.version-info-dialog .ver-support-row { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
gap: 16px; |
||||
|
padding: 9px 0; |
||||
|
color: #d7d7d7; |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
.version-info-dialog .ver-support-row span:first-child { |
||||
|
color: #8d8d8d; |
||||
|
} |
||||
|
.version-info-dialog .ver-support-row span:last-child { |
||||
|
text-align: right; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-link { |
||||
|
display: block; |
||||
|
width: 100%; |
||||
|
margin-top: 18px; |
||||
|
padding: 0; |
||||
|
border: 0; |
||||
|
background: transparent; |
||||
|
color: #3aa0ff; |
||||
|
font-size: 14px; |
||||
|
text-align: center; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-link:hover { |
||||
|
color: #69b8ff; |
||||
|
} |
||||
|
.version-info-dialog .ver-copy { |
||||
|
margin-top: 8px; |
||||
|
color: #6f6f6f; |
||||
|
font-size: 12px; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.version-info-dialog .ver-subhead { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
gap: 12px; |
||||
|
margin-bottom: 14px; |
||||
|
padding-right: 24px; |
||||
|
} |
||||
|
.version-info-dialog .ver-subhead-title { |
||||
|
flex: 1; |
||||
|
font-size: 16px; |
||||
|
font-weight: 600; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.version-info-dialog .ver-back, |
||||
|
.version-info-dialog .ver-history-actions button { |
||||
|
border: 0; |
||||
|
background: transparent; |
||||
|
color: #3aa0ff; |
||||
|
font-size: 13px; |
||||
|
cursor: pointer; |
||||
|
padding: 0; |
||||
|
} |
||||
|
.version-info-dialog .ver-add { |
||||
|
border: 0; |
||||
|
border-radius: 999px; |
||||
|
padding: 4px 12px; |
||||
|
background: rgba(34, 140, 78, 0.28); |
||||
|
color: #3ddc84; |
||||
|
font-size: 13px; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.version-info-dialog .ver-add:hover { |
||||
|
background: rgba(34, 140, 78, 0.42); |
||||
|
} |
||||
|
.version-info-dialog .ver-add-placeholder { |
||||
|
width: 72px; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-list { |
||||
|
height: 390px; |
||||
|
overflow-y: auto; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-list::-webkit-scrollbar { |
||||
|
width: 6px; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-list::-webkit-scrollbar-thumb { |
||||
|
background: #333; |
||||
|
border-radius: 3px; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-empty { |
||||
|
height: 390px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
color: #8d8d8d; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-item { |
||||
|
min-height: 48px; |
||||
|
box-sizing: border-box; |
||||
|
padding: 10px 0 12px; |
||||
|
border-bottom: 1px solid #242424; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-top, |
||||
|
.version-info-dialog .ver-history-foot { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
gap: 12px; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-no { |
||||
|
font-size: 15px; |
||||
|
font-weight: 600; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-date, |
||||
|
.version-info-dialog .ver-history-desc, |
||||
|
.version-info-dialog .ver-history-file { |
||||
|
color: #8d8d8d; |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-desc, |
||||
|
.version-info-dialog .ver-history-file { |
||||
|
overflow: hidden; |
||||
|
white-space: nowrap; |
||||
|
text-overflow: ellipsis; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-desc { |
||||
|
margin: 4px 0; |
||||
|
} |
||||
|
.version-info-dialog .ver-history-actions { |
||||
|
display: flex; |
||||
|
gap: 12px; |
||||
|
flex: none; |
||||
|
} |
||||
|
.version-info-dialog .ver-form .el-form-item { |
||||
|
margin-bottom: 14px; |
||||
|
} |
||||
|
.version-info-dialog .ver-form .el-form-item__label { |
||||
|
height: auto !important; |
||||
|
padding: 0 0 6px; |
||||
|
color: #8d8d8d; |
||||
|
line-height: 18px !important; |
||||
|
} |
||||
|
.version-info-dialog .ver-form .el-form-item__content { |
||||
|
height: auto !important; |
||||
|
margin-top: 0 !important; |
||||
|
line-height: normal !important; |
||||
|
} |
||||
|
.version-info-dialog .ver-form .el-input__inner, |
||||
|
.version-info-dialog .ver-form .el-textarea__inner { |
||||
|
height: 36px !important; |
||||
|
padding: 0 12px !important; |
||||
|
border: 1px solid #333; |
||||
|
border-radius: 8px; |
||||
|
background: #161616; |
||||
|
color: #f5f5f5; |
||||
|
line-height: 36px !important; |
||||
|
} |
||||
|
.version-info-dialog .ver-form .el-textarea__inner { |
||||
|
height: auto !important; |
||||
|
min-height: 96px !important; |
||||
|
padding: 8px 12px !important; |
||||
|
line-height: 1.5 !important; |
||||
|
} |
||||
|
.version-info-dialog .ver-form-row { |
||||
|
display: grid; |
||||
|
grid-template-columns: 1fr 1fr; |
||||
|
gap: 12px; |
||||
|
} |
||||
|
.version-info-dialog .ver-file-btn, |
||||
|
.version-info-dialog .ver-btn { |
||||
|
border-radius: 8px; |
||||
|
cursor: pointer; |
||||
|
font-size: 13px; |
||||
|
} |
||||
|
.version-info-dialog .ver-file-btn { |
||||
|
padding: 7px 14px; |
||||
|
border: 1px solid #333; |
||||
|
background: #161616; |
||||
|
color: #f5f5f5; |
||||
|
} |
||||
|
.version-info-dialog .el-upload-list__item { |
||||
|
color: #d7d7d7; |
||||
|
} |
||||
|
.version-info-dialog .el-upload-list__item-name { |
||||
|
color: #d7d7d7; |
||||
|
} |
||||
|
.version-info-dialog .ver-form-actions { |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
gap: 10px; |
||||
|
margin-top: 6px; |
||||
|
} |
||||
|
.version-info-dialog .ver-btn { |
||||
|
min-width: 72px; |
||||
|
padding: 8px 16px; |
||||
|
border: 1px solid transparent; |
||||
|
} |
||||
|
.version-info-dialog .ver-btn--ghost { |
||||
|
border-color: #333; |
||||
|
background: transparent; |
||||
|
color: #d7d7d7; |
||||
|
} |
||||
|
.version-info-dialog .ver-btn--primary { |
||||
|
background: #1f8f4e; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.version-info-dialog .ver-btn--primary:disabled { |
||||
|
opacity: 0.6; |
||||
|
cursor: default; |
||||
|
} |
||||
|
.version-info-dialog .el-loading-mask { |
||||
|
background: rgba(12, 12, 12, 0.72); |
||||
|
} |
||||
|
.version-preview { |
||||
|
width: 100%; |
||||
|
height: 70vh; |
||||
|
border: 0; |
||||
|
} |
||||
|
.version-preview-img { |
||||
|
max-width: 100%; |
||||
|
} |
||||
|
.version-preview-text { |
||||
|
white-space: pre-wrap; |
||||
|
max-height: 70vh; |
||||
|
overflow: auto; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue