|
@@ -22,7 +22,7 @@
|
|
|
]"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
- <a-form-item label="文章描述">
|
|
|
+ <!-- <a-form-item label="文章描述">
|
|
|
<a-textarea
|
|
|
placeholder="请输入文章描述"
|
|
|
:auto-size="{ minRows: 3, maxRows: 5 }"
|
|
@@ -35,7 +35,7 @@
|
|
|
},
|
|
|
]"
|
|
|
/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-item> -->
|
|
|
<a-form-item label="文章分类">
|
|
|
<!-- 文章分类父类 -->
|
|
|
<a-select
|
|
@@ -121,6 +121,20 @@
|
|
|
style="width: 100%"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
+ <a-form-item label="推荐:">
|
|
|
+ <a-radio-group
|
|
|
+ @change="recommendChange"
|
|
|
+ v-decorator="[
|
|
|
+ 'recommand',
|
|
|
+ {
|
|
|
+ initialValue: recommand,
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ <a-radio value="true"> 是 </a-radio>
|
|
|
+ <a-radio value="false"> 否 </a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-item>
|
|
|
<a-form-item v-show="false" :wrapper-col="{ span: 20, offset: 10 }">
|
|
|
<a-button id="articleCreateSubmit" type="primary" html-type="submit"
|
|
|
>提交</a-button
|
|
@@ -224,6 +238,7 @@ export default {
|
|
|
articleChildClass: {},
|
|
|
engineerType: "",
|
|
|
learnDate: "",
|
|
|
+ recommand: "false",
|
|
|
optionType: "",
|
|
|
description: "",
|
|
|
bodyStyle: {
|
|
@@ -329,6 +344,11 @@ export default {
|
|
|
learnDateChoose(date, dateString) {
|
|
|
this.learnDate = dateString;
|
|
|
},
|
|
|
+ // 推荐选择
|
|
|
+ recommendChange(date) {
|
|
|
+ this.recommand = date.target.value;
|
|
|
+ console.log("------" + this.recommand);
|
|
|
+ },
|
|
|
handleSubmitBtnFun() {
|
|
|
document.getElementById("articleCreateSubmit").click();
|
|
|
},
|
|
@@ -373,6 +393,9 @@ export default {
|
|
|
// 必学日期
|
|
|
this.learnDate = learnDate ? formateStringDate(learnDate) : null;
|
|
|
console.log("编辑初始化时间为YYYY-MM-DD", this.learnDate, learnDate);
|
|
|
+ // 推荐
|
|
|
+ this.recommand = item.recommand;
|
|
|
+ console.log("--推荐--" + item.recommand);
|
|
|
// 文章内容
|
|
|
this.content = item.contents;
|
|
|
// 附件内容
|
|
@@ -420,6 +443,9 @@ export default {
|
|
|
this.form.setFieldsValue({
|
|
|
engineerType: this.engineerType.name
|
|
|
});
|
|
|
+ this.form.setFieldsValue({
|
|
|
+ recommand: this.recommand
|
|
|
+ });
|
|
|
this.form.validateFields((err, values) => {
|
|
|
if (!err) {
|
|
|
// 新建文章
|