فهرست منبع

根据业务需求修改

aaa 3 سال پیش
والد
کامیت
dd622d16b3

+ 2 - 2
src/views/articleManagement/articleCarouselUpload.vue

@@ -271,9 +271,9 @@ export default {
       if (!isJpgOrPng) {
         this.$message.error('上传图片只能是 .jpeg, .jpg, .png, 格式!');
       }
-      let isLtHalf1M = file.size / 1024 / 1024 < 0.5;
+      let isLtHalf1M = file.size / 1024 / 1024 < 50;
       if (!isLtHalf1M) {
-        this.$message.error(`${file.name} 文件必须小于 0.5M !`);
+        this.$message.error(`${file.name} 文件必须小于 50M !`);
       }
       let bySelf = false;
       return isJpgOrPng && isLtHalf1M && bySelf;

+ 2 - 2
src/views/articleManagement/articleCreate.vue

@@ -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

+ 28 - 2
src/views/articleManagement/videoCreate.vue

@@ -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) {
           // 新建文章