文章审批加保存
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
<el-form-item label="文章类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择文章类型" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
:key="dict.dictValue"
|
||||
v-for="dict in articleTypeOptions"
|
||||
:key="dict.dictCode"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
:value="dict.dictCode"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -59,15 +59,15 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-hasPermi="['sist:article:add']"
|
||||
@click="handleAdd"
|
||||
>新增
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
v-hasPermi="['sist:article:add']"
|
||||
@click="handleAdd"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@@ -116,7 +116,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="文章标题" align="center" prop="title"/>
|
||||
<el-table-column label="站点类型" align="center" prop="siteType" :formatter="siteTypeFormat"/>
|
||||
<el-table-column label="文章类型" align="center" prop="type" :formatter="typeFormat"/>
|
||||
<el-table-column label="文章类型" align="center" prop="type" :formatter="articleTypeFormat"/>
|
||||
<el-table-column label="发布人姓名" align="center" prop="publishUserName"/>
|
||||
<el-table-column label="是否置顶" align="center" prop="isTop" :formatter="isTopFormat"/>
|
||||
<el-table-column label="是否显示" align="center" prop="isView" :formatter="isViewFormat"/>
|
||||
@@ -124,30 +124,31 @@
|
||||
<el-table-column label="缩略图" align="center" prop="imgurl"/>
|
||||
<el-table-column label="是否英文" align="center" prop="isEnglish" :formatter="isEnglishFormat"/>
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat"/>
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag-->
|
||||
<!-- v-if="scope.row.status==1">待取件-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- type="warning" v-if="scope.row.status==2"-->
|
||||
<!-- >运输中-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- type="danger" v-if="scope.row.status==3"-->
|
||||
<!-- disable-transitions>待收取-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- type="success" v-if="scope.row.status==4"-->
|
||||
<!-- disable-transitions>完成-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag-->
|
||||
<!-- v-if="scope.row.status==1">待取件-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- type="warning" v-if="scope.row.status==2"-->
|
||||
<!-- >运输中-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- type="danger" v-if="scope.row.status==3"-->
|
||||
<!-- disable-transitions>待收取-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- <el-tag-->
|
||||
<!-- type="success" v-if="scope.row.status==4"-->
|
||||
<!-- disable-transitions>完成-->
|
||||
<!-- </el-tag>-->
|
||||
<!-- </template>-->
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<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'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@@ -164,6 +165,14 @@
|
||||
v-hasPermi="['sist:article:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</span>
|
||||
<el-button v-show="scope.row.approvalUserId===userId"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleApprova(scope.row)"
|
||||
>审批
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -179,8 +188,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listArticle, delArticle, exportArticle} from "@/api/sist/article";
|
||||
import {listArticle, delArticle, exportArticle,drafts} from "@/api/sist/article";
|
||||
import Editor from '@/components/Editor';
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
name: "Article",
|
||||
@@ -189,6 +199,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userId: store.getters.userId,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -210,7 +221,7 @@ export default {
|
||||
// 站点类型 1: sist 2: lab 3: 双边都发字典
|
||||
siteTypeOptions: [],
|
||||
// 1: 2: 3: 根据导航字典
|
||||
typeOptions: [],
|
||||
articleTypeOptions: [],
|
||||
// 是否置顶字典
|
||||
isTopOptions: [],
|
||||
// 是否显示字典
|
||||
@@ -272,8 +283,8 @@ export default {
|
||||
this.getDicts("article_site_type").then(response => {
|
||||
this.siteTypeOptions = response.data;
|
||||
});
|
||||
this.getDicts("article_type").then(response => {
|
||||
this.typeOptions = response.data;
|
||||
this.getEncodeDicts("article_type").then(response => {
|
||||
this.articleTypeOptions = response.data;
|
||||
});
|
||||
this.getDicts("is_top").then(response => {
|
||||
this.isTopOptions = response.data;
|
||||
@@ -303,8 +314,8 @@ export default {
|
||||
return this.selectDictLabel(this.siteTypeOptions, row.siteType);
|
||||
},
|
||||
// 1: 2: 3: 根据导航字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.type);
|
||||
articleTypeFormat(row, column) {
|
||||
return this.selectDictCode(this.articleTypeOptions, row.type);
|
||||
},
|
||||
// 是否置顶字典翻译
|
||||
isTopFormat(row, column) {
|
||||
@@ -351,6 +362,10 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.$router.push("/article/edit/" + row.id);
|
||||
},
|
||||
/** 审批按钮操作 */
|
||||
handleApprova(row) {
|
||||
this.$router.push("/article/approve/" + row.id);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
|
||||
Reference in New Issue
Block a user