This commit is contained in:
clay
2022-01-08 14:05:21 +08:00
parent d6bca55436
commit c2e0314914
5 changed files with 231 additions and 140 deletions

View File

@@ -1,10 +1,10 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="站点类型" prop="sitetype">
<el-select v-model="queryParams.sitetype" placeholder="请选择站点类型" clearable size="small">
<el-form-item label="站点类型" prop="siteType">
<el-select v-model="queryParams.siteType" placeholder="请选择站点类型" clearable size="small">
<el-option
v-for="dict in sitetypeOptions"
v-for="dict in siteTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
@@ -115,7 +115,7 @@
</template>
</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="siteType" :formatter="siteTypeFormat"/>
<el-table-column label="文章类型" align="center" prop="type" :formatter="typeFormat"/>
<el-table-column label="发布人姓名" align="center" prop="publishUserName"/>
<el-table-column label="是否置顶" align="center" prop="isTop" :formatter="isTopFormat"/>
@@ -124,6 +124,23 @@
<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>-->
<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>
@@ -191,7 +208,7 @@ export default {
// 是否显示弹出层
open: false,
// 站点类型 1 sist 2: lab 3: 双边都发字典
sitetypeOptions: [],
siteTypeOptions: [],
// 1: 2: 3: 根据导航字典
typeOptions: [],
// 是否置顶字典
@@ -210,7 +227,7 @@ export default {
pageSize: 10,
},
params: {},
sitetype: null,
siteType: null,
type: null,
title: null,
isTop: null,
@@ -220,7 +237,7 @@ export default {
},
// 表单校验
rules: {
sitetype: [
siteType: [
{required: true, message: "站点类型 1 sist 2: lab 3: 双边都发不能为空}", trigger: "change"},
],
type: [
@@ -253,7 +270,7 @@ export default {
created() {
this.getList();
this.getDicts("article_site_type").then(response => {
this.sitetypeOptions = response.data;
this.siteTypeOptions = response.data;
});
this.getDicts("article_type").then(response => {
this.typeOptions = response.data;
@@ -282,8 +299,8 @@ export default {
});
},
// 站点类型 1 sist 2: lab 3: 双边都发字典翻译
sitetypeFormat(row, column) {
return this.selectDictLabel(this.sitetypeOptions, row.sitetype);
siteTypeFormat(row, column) {
return this.selectDictLabel(this.siteTypeOptions, row.siteType);
},
// 1: 2: 3: 根据导航字典翻译
typeFormat(row, column) {