发布版本更新
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8e0c186ee7
commit
bc01b704c6
|
@ -9,30 +9,64 @@
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<el-form-item label="发布版本" prop="Version">
|
<el-form-item :label="$t('system:log:form:version')" prop="Version">
|
||||||
<el-input
|
<el-input v-model="form.Version" />
|
||||||
v-model="form.Version"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="更新功能" prop="UpdateContent">
|
<el-form-item :label="$t('system:log:form:versionUS')" prop="Version">
|
||||||
|
<el-input v-model="form.Version_US" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('system:log:form:updateContent')"
|
||||||
|
prop="UpdateContent"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.UpdateContent"
|
v-model="form.UpdateContent"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
maxlength="1000"
|
maxlength="1000"
|
||||||
:autosize="{ minRows: 4, maxRows: 5}"
|
:autosize="{ minRows: 4, maxRows: 5 }"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="发布日期" prop="PublishTime">
|
<el-form-item :label="$t('system:log:form:State')" prop="State">
|
||||||
|
<el-select v-model="form.State" placeholder="">
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.PublishStatus"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('system:log:form:PublishTime')">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.PublishTime"
|
v-model="form.PublishTime"
|
||||||
type="date"
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('system:log:form:IsCurrentVersion')"
|
||||||
|
prop="IsCurrentVersion"
|
||||||
|
>
|
||||||
|
<el-select v-model="form.IsCurrentVersion" placeholder="">
|
||||||
|
<el-option
|
||||||
|
v-for="item in $d.YesOrNo"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button size="small" type="primary" @click="handleCancle">取消</el-button>
|
<el-button size="small" type="primary" @click="handleCancle">
|
||||||
<el-button size="small" type="primary" @click="handleSave">保存</el-button>
|
{{ $t('common:button:cancel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button size="small" type="primary" @click="handleSave">
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</base-model>
|
</base-model>
|
||||||
</template>
|
</template>
|
||||||
|
@ -43,8 +77,11 @@ const formDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Id: null,
|
Id: null,
|
||||||
Version: null,
|
Version: null,
|
||||||
|
Version_US: null,
|
||||||
PublishTime: null,
|
PublishTime: null,
|
||||||
UpdateContent: null
|
UpdateContent: null,
|
||||||
|
State: null,
|
||||||
|
IsCurrentVersion: null,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
@ -56,24 +93,53 @@ export default {
|
||||||
form: formDataDefault(),
|
form: formDataDefault(),
|
||||||
rules: {
|
rules: {
|
||||||
Version: [
|
Version: [
|
||||||
{ required: true, message: '请注明', trigger: 'blur' },
|
{
|
||||||
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` }
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{ max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50` },
|
||||||
],
|
],
|
||||||
PublishTime: [
|
// PublishTime: [
|
||||||
{ required: true, message: '请注明', trigger: 'blur' }
|
// { required: true, message: '请注明', trigger: 'blur' }
|
||||||
|
// ],
|
||||||
|
IsCurrentVersion: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:select'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
State: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:select'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
UpdateContent: [
|
UpdateContent: [
|
||||||
{ required: true, message: '请注明', trigger: 'blur' },
|
{
|
||||||
{ max: 1000, message: `${this.$t('common:ruleMessage:maxLength')} 500` }
|
required: true,
|
||||||
]
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 1000,
|
||||||
|
message: `${this.$t('common:ruleMessage:maxLength')} 500`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
model_cfg: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '500px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: true,
|
||||||
},
|
},
|
||||||
model_cfg: { visible: false, showClose: true, width: '500px', title: '', appendToBody: true }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
openDialog(title, data) {
|
openDialog(title, data) {
|
||||||
this.model_cfg.visible = true
|
this.model_cfg.visible = true
|
||||||
this.model_cfg.title = title
|
this.model_cfg.title = title
|
||||||
|
@ -88,22 +154,30 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.LogForm.validate(valid => {
|
this.$refs.LogForm.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
this.loading = true
|
this.loading = true
|
||||||
addOrUpdatePublishLog(this.form).then(res => {
|
addOrUpdatePublishLog(this.form)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.$message.success('保存成功!')
|
this.loading = false
|
||||||
this.model_cfg.visible = false
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.$emit('getList')
|
this.model_cfg.visible = false
|
||||||
}).catch(() => {
|
this.$emit('getList')
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCancle() {
|
handleCancle() {
|
||||||
this.model_cfg.visible = false
|
this.model_cfg.visible = false
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-select,
|
||||||
|
.el-date-editor {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -2,25 +2,14 @@
|
||||||
<div class="log">
|
<div class="log">
|
||||||
<div ref="leftContainer" class="left">
|
<div ref="leftContainer" class="left">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item
|
<el-form-item :label="$t('system:log:table:version')" prop="Version">
|
||||||
label="发布版本"
|
<el-input v-model="searchData.Version" size="small" clearable />
|
||||||
prop="Version"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="searchData.Version"
|
|
||||||
size="small"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item :label="$t('system:log:table:versionUS')" prop="Version">
|
||||||
label="更新功能"
|
<el-input v-model="searchData.Version_US" size="small" clearable />
|
||||||
prop="UpdateContent"
|
</el-form-item>
|
||||||
>
|
<el-form-item label="更新功能" prop="UpdateContent">
|
||||||
<el-input
|
<el-input v-model="searchData.UpdateContent" size="small" clearable />
|
||||||
v-model="searchData.UpdateContent"
|
|
||||||
size="small"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -43,43 +32,71 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
v-adaptive="{bottomOffset:45}"
|
v-adaptive="{ bottomOffset: 45 }"
|
||||||
height="100"
|
height="100"
|
||||||
:data="list"
|
:data="list"
|
||||||
class="table"
|
class="table"
|
||||||
@sort-change="handleSortByColumn"
|
@sort-change="handleSortByColumn"
|
||||||
|
:default-sort="{ prop: 'PublishTime', order: 'descending' }"
|
||||||
>
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index"
|
:label="$t('system:log:table:version')"
|
||||||
width="50"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="发布版本"
|
|
||||||
prop="Version"
|
prop="Version"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="更新功能"
|
:label="$t('system:log:table:versionUS')"
|
||||||
|
prop="Version_US"
|
||||||
|
min-width="90"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('system:log:table:UpdateContent')"
|
||||||
prop="UpdateContent"
|
prop="UpdateContent"
|
||||||
min-width="150"
|
min-width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="发布日期"
|
:label="$t('system:log:table:State')"
|
||||||
|
prop="State"
|
||||||
|
min-width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ $fd('PublishStatus', scope.row.State) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('system:log:table:PublishTime')"
|
||||||
prop="PublishTime"
|
prop="PublishTime"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.PublishTime?moment(scope.row.PublishTime).format('YYYY-MM-DD'):'' }}
|
{{
|
||||||
|
scope.row.PublishTime
|
||||||
|
? moment(scope.row.PublishTime).format('YYYY-MM-DD')
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
:label="$t('system:log:table:IsCurrentVersion')"
|
||||||
|
prop="IsCurrentVersion"
|
||||||
|
min-width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ $fd('YesOrNo', scope.row.IsCurrentVersion) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
:label="$t('common:action:action')"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
prop=""
|
prop=""
|
||||||
min-width="200"
|
min-width="200"
|
||||||
|
@ -92,7 +109,7 @@
|
||||||
icon="el-icon-edit-outline"
|
icon="el-icon-edit-outline"
|
||||||
@click="handleEdit(scope.row)"
|
@click="handleEdit(scope.row)"
|
||||||
>
|
>
|
||||||
编辑
|
{{ $t('common:button:edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -100,13 +117,12 @@
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
{{ $t('common:button:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="pagination" style="text-align: right;margin-top:5px;">
|
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||||
<pagination
|
<pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="searchData.PageIndex"
|
:page.sync="searchData.PageIndex"
|
||||||
|
@ -114,10 +130,7 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<log-form
|
<log-form ref="LogForm" @getList="getList" />
|
||||||
ref="LogForm"
|
|
||||||
@getList="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -129,11 +142,12 @@ import moment from 'moment'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
Version: null,
|
Version: null,
|
||||||
|
Version_US: null,
|
||||||
UpdateContent: null,
|
UpdateContent: null,
|
||||||
Asc: true,
|
Asc: false,
|
||||||
SortField: '',
|
SortField: 'PublishTime',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
@ -144,7 +158,7 @@ export default {
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -153,13 +167,15 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getPublishLogList(this.searchData).then((res) => {
|
getPublishLogList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData
|
||||||
}).catch(() => {
|
this.total = res.Result.TotalCount
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -180,19 +196,23 @@ export default {
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm('是否确认删除?', {
|
this.$confirm('是否确认删除?', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = true
|
||||||
|
deletePublishLog(row.Id)
|
||||||
|
.then((res) => {
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.getList()
|
||||||
|
this.$message.success(
|
||||||
|
this.$t('common:message:deletedSuccessfully')
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then(() => {
|
|
||||||
this.loading = true
|
|
||||||
deletePublishLog(row.Id)
|
|
||||||
.then(res => {
|
|
||||||
this.loading = false
|
|
||||||
if (res.IsSuccess) {
|
|
||||||
this.getList()
|
|
||||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
|
||||||
}
|
|
||||||
}).catch(() => { this.loading = false })
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
|
@ -204,35 +224,35 @@ export default {
|
||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.log {
|
.log {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 10px;
|
flex-direction: column;
|
||||||
border-radius: 5px;
|
width: 0;
|
||||||
.left {
|
flex-grow: 4;
|
||||||
|
// border-right: 1px solid #ccc;
|
||||||
|
.filter-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
width: 0;
|
margin: 5px;
|
||||||
flex-grow: 4;
|
}
|
||||||
// border-right: 1px solid #ccc;
|
.data-table {
|
||||||
.filter-container {
|
flex: 1;
|
||||||
display: flex;
|
padding: 5px 0px;
|
||||||
align-items: center;
|
}
|
||||||
margin: 5px;
|
.pagination-container {
|
||||||
}
|
text-align: right;
|
||||||
.data-table {
|
|
||||||
flex: 1;
|
|
||||||
padding: 5px 0px;
|
|
||||||
}
|
|
||||||
.pagination-container {
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue