|
@@ -30,7 +30,7 @@
|
|
|
v-decorator="[
|
|
|
'description',
|
|
|
{
|
|
|
- rules: [{ required: true, message: '请输入文章描述' }],
|
|
|
+ rules: [{ message: '请输入文章描述' }],
|
|
|
initialValue: description,
|
|
|
},
|
|
|
]"
|
|
@@ -48,7 +48,7 @@
|
|
|
message: '请选择文章分类父类',
|
|
|
},
|
|
|
],
|
|
|
- initialValue: articleChildClass.name,
|
|
|
+ initialValue: articleParentClass.name,
|
|
|
},
|
|
|
]"
|
|
|
@change="articleClassParentChange"
|
|
@@ -72,10 +72,10 @@
|
|
|
message: '请选择文章分类子类',
|
|
|
},
|
|
|
],
|
|
|
- initialValue: articleParentClass.name,
|
|
|
+ initialValue: articleChildClass.name,
|
|
|
},
|
|
|
]"
|
|
|
- :disabled="!articleParentClass || !articleParentClass.id"
|
|
|
+ :disabled="!articleChildClass || !articleChildClass.id"
|
|
|
@change="articleClassChildChange"
|
|
|
>
|
|
|
<a-select-option
|
|
@@ -104,10 +104,21 @@
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="必学日期:">
|
|
|
- <a-date-picker
|
|
|
+ <!-- <a-date-picker
|
|
|
:defaultValue="learnDate"
|
|
|
@change="learnDateChoose"
|
|
|
style="width:100%;"
|
|
|
+ /> -->
|
|
|
+ <a-date-picker
|
|
|
+ placeholder="请选择日期"
|
|
|
+ @change="learnDateChoose"
|
|
|
+ v-decorator="[
|
|
|
+ 'learnDate',
|
|
|
+ {
|
|
|
+ initialValue: learnDate,
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ style="width:100%;"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
<a-form-item v-show="false" :wrapper-col="{ span: 20, offset: 10 }">
|
|
@@ -209,6 +220,9 @@ export default {
|
|
|
},
|
|
|
// 查询文章分类子集
|
|
|
getArticleChildClass() {
|
|
|
+ if (!this.articleParentClass.id) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
let pathParamsData = { categoryId: this.articleParentClass.id };
|
|
|
this.$_http
|
|
|
.get(
|
|
@@ -262,7 +276,6 @@ export default {
|
|
|
},
|
|
|
// 必学日期选择
|
|
|
learnDateChoose(date, dateString) {
|
|
|
- console.log(dateString);
|
|
|
this.learnDate = dateString;
|
|
|
},
|
|
|
handleSubmitBtnFun() {
|
|
@@ -292,10 +305,11 @@ export default {
|
|
|
});
|
|
|
// 文章描述
|
|
|
this.description = item.description ? item.description : '';
|
|
|
- // 文章分类-父类
|
|
|
- this.articleChildClass = item.rootMaterialCategory;
|
|
|
+ // 文章分类-父类:
|
|
|
+ this.articleParentClass = item.rootMaterialCategory;
|
|
|
+ this.getArticleChildClass(); // 获取子类列表的值
|
|
|
// 文章分类-子类
|
|
|
- this.articleParentClass = item.materialCategory;
|
|
|
+ this.articleChildClass = item.materialCategory;
|
|
|
// 选中工种
|
|
|
if (item.engineerTypes.length !== 0) {
|
|
|
let engineerId = item.engineerTypes[0];
|