文章业务
This commit is contained in:
@@ -141,6 +141,11 @@
|
||||
<!-- disable-transitions>完成-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- </template>-->
|
||||
<el-table-column label="修改时间 " align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布时间 " align="center" prop="publishTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.publishTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||
@@ -148,7 +153,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span v-show="scope.row.status === 'NEd5n92EMIpyyBslaNqsRgE'|| scope.row.status === 'N6CfFGz2UWpQ9Uhk3uwiJAQ'">
|
||||
<span v-show="scope.row.status === '1'|| scope.row.status === '4'|| scope.row.status === '5'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -166,13 +171,20 @@
|
||||
>删除
|
||||
</el-button>
|
||||
</span>
|
||||
<el-button v-show="scope.row.approvalUserId===userId"
|
||||
<el-button v-show="scope.row.approvalUserId===userId && scope.row.status === '2'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleApprova(scope.row)"
|
||||
>审批
|
||||
</el-button>
|
||||
<el-button v-show="scope.row.approvalUserId===userId && scope.row.status === '3'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleOffline(scope.row)"
|
||||
>下线
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -188,7 +200,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listArticle, delArticle, exportArticle,drafts} from "@/api/sist/article";
|
||||
import {listArticle, delArticle, exportArticle,offline} from "@/api/sist/article";
|
||||
import Editor from '@/components/Editor';
|
||||
import store from "@/store";
|
||||
|
||||
@@ -283,7 +295,7 @@ export default {
|
||||
this.getDicts("article_site_type").then(response => {
|
||||
this.siteTypeOptions = response.data;
|
||||
});
|
||||
this.getEncodeDicts("article_type").then(response => {
|
||||
this.getDicts("article_type").then(response => {
|
||||
this.articleTypeOptions = response.data;
|
||||
});
|
||||
this.getDicts("is_top").then(response => {
|
||||
@@ -299,6 +311,9 @@ export default {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
},
|
||||
activated(){
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询系统文章列表 */
|
||||
getList() {
|
||||
@@ -366,6 +381,23 @@ export default {
|
||||
handleApprova(row) {
|
||||
this.$router.push("/article/approve/" + row.id);
|
||||
},
|
||||
handleOffline(row){
|
||||
let that_ = this
|
||||
this.$confirm('是否确认下线标题为:"' + row.title + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function () {
|
||||
that_.loading = true;
|
||||
return offline(row.id);
|
||||
}).then(res=>{
|
||||
if (res.code==200){
|
||||
this.msgSuccess("下线成功");
|
||||
this.getList()
|
||||
}
|
||||
that_.loading = false;
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
|
||||
Reference in New Issue
Block a user