1 2 完成

This commit is contained in:
clay
2022-01-06 22:57:08 +08:00
parent e1e6a1cde3
commit a07de6ff90
7 changed files with 822 additions and 30 deletions

View File

@@ -9,10 +9,10 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发布人" prop="publishUserName">
<el-input v-model="formData.publishUserName" placeholder="请输入发布人" clearable :style="{width: '100%'}">
</el-input>
</el-form-item>
<!-- <el-form-item label="发布人" prop="publishUserName">-->
<!-- <el-input v-model="formData.publishUserName" placeholder="请输入发布人" clearable :style="{width: '100%'}">-->
<!-- </el-input>-->
<!-- </el-form-item>-->
</el-col>
</el-row>
<el-row>
@@ -20,7 +20,7 @@
<el-form-item label="文章类型" prop="type">
<el-select v-model="formData.type" placeholder="请选择文章类型" clearable :style="{width: '100%'}">
<el-option
v-for="dict in typeOptions"
v-for="dict in articleTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
@@ -70,26 +70,31 @@
<el-form-item label="发布网站" prop="sitetype">
<el-radio-group v-model="formData.sitetype">
<el-radio-button v-for="(item, index) in sitetypeOptions" :key="index"
:label="item.dictValue">{{ item.dictLabel }}</el-radio-button>
:label="item.dictValue">{{ item.dictLabel }}
</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发布时间" prop="publishTime">
<el-date-picker
v-model="formData.publishTime"
type="datetime"
placeholder="选择日期时间"
align="right"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
</el-col>
<!--发布时间 为审批时间-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="发布时间" prop="publishTime">-->
<!-- <el-date-picker-->
<!-- v-model="formData.publishTime"-->
<!-- type="datetime"-->
<!-- placeholder="选择日期时间"-->
<!-- align="right"-->
<!-- :picker-options="pickerOptions">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<el-col :offset="1" :span="22">
<el-col :offset="1" :span="16">
<Editor v-model="formData.content" :min-height="500"/>
</el-col>
<el-col :span="6">
选择菜单或者文章类型
</el-col>
</el-row>
<el-row>
<el-col :span="24" class="submitForm">
@@ -116,7 +121,6 @@ export default {
formData: {
id: null,
title: null,
publishUserName: null,
type: null,
isTop: null,
isEnglish: null,
@@ -129,11 +133,6 @@ export default {
message: '请输入文章标题',
trigger: 'blur'
}],
publishUserName: [{
required: true,
message: '请输入发布人',
trigger: 'blur'
}],
type: [{
required: true,
message: '请选择文章类型',
@@ -165,7 +164,7 @@ export default {
trigger: 'change'
}],
},
typeOptions: [],
articleTypeOptions: [],
isTopOptions: [],
isViewOptions: [],
isEnglishOptions: [],
@@ -209,8 +208,8 @@ export default {
this.getDicts("article_site_type").then(response => {
this.sitetypeOptions = response.data;
});
this.getDicts("type").then(response => {
this.typeOptions = response.data;
this.getDicts("article_type").then(response => {
this.articleTypeOptions = response.data;
});
this.getDicts("is_top").then(response => {
this.isTopOptions = response.data;
@@ -257,7 +256,8 @@ export default {
.article {
margin-top: 20px;
}
.submitForm{
.submitForm {
margin-top: 20px;
}
</style>