|
|
@@ -11,21 +11,42 @@
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
<el-table :data="content">
|
|
|
- <el-table-column property="addtime" :label="$t('update_time')" width="170"></el-table-column>
|
|
|
- <el-table-column property="author_username" :label="$t('update_by_who')"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ property="addtime"
|
|
|
+ :label="$t('update_time')"
|
|
|
+ width="170"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ property="author_username"
|
|
|
+ :label="$t('update_by_who')"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column property="page_comments" :label="$t('remark')">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.page_comments }}
|
|
|
+ <el-button
|
|
|
+ v-if="is_show_recover_btn"
|
|
|
+ @click="editComments(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >{{ $t('edit') }}</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
@click="preview_diff(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
- >{{$t('overview')}}</el-button>
|
|
|
+ >{{ $t('overview') }}</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
v-if="is_show_recover_btn"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="recover(scope.row)"
|
|
|
- >{{$t('recover_to_this_version')}}</el-button>
|
|
|
+ >{{ $t('recover_to_this_version') }}</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -36,8 +57,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<style>
|
|
|
-</style>
|
|
|
+<style></style>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
@@ -97,6 +117,18 @@ export default {
|
|
|
let page_id = this.page_id ? this.page_id : this.$route.params.page_id
|
|
|
var url = '#/page/diff/' + page_id + '/' + page_history_id
|
|
|
window.open(url)
|
|
|
+ },
|
|
|
+ editComments(row) {
|
|
|
+ let page_id = this.page_id ? this.page_id : this.$route.params.page_id
|
|
|
+ this.$prompt('', ' ', {}).then(data => {
|
|
|
+ this.request('/api/page/updateHistoryComments', {
|
|
|
+ page_id: page_id,
|
|
|
+ page_history_id: row.page_history_id,
|
|
|
+ page_comments: data.value
|
|
|
+ }).then(() => {
|
|
|
+ this.get_content()
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted() {}
|