فهرست منبع

追加热门新闻字段

wangxy 2 سال پیش
والد
کامیت
9a4eabd94f

+ 8 - 0
src/views/management/XingWenZiXun/XinWenZiXunConfig/index.vue

@@ -13,6 +13,12 @@
                 <el-form-item label="关键字:" prop="keyword">
                     <el-input v-model="configData.keyword" placeholder="请输入关键字"></el-input>
                 </el-form-item>
+                <el-form-item label="热门新闻:" prop="hotFlag">
+                  <el-radio-group v-model="configData.hotFlag">
+                    <el-radio :label="1">是</el-radio>
+                    <el-radio :label="0">否</el-radio>
+                  </el-radio-group>
+                </el-form-item>
                 <el-form-item prop="startTime" label="开始时间:" porp="startTime">
                     <div>
                         <!--   @date 2020/09/28 将日期精确到时分秒 fix by wxy  start  -->
@@ -109,6 +115,7 @@
             return {
                 defaultValue: new Date(),
                 configData:   {
+                    hotFlag:        0,
                     content:        '',
                     intro:          '',
                     pic:            '',
@@ -192,6 +199,7 @@
                 this.configData.title = data.title;
                 this.configData.visits = data.visits;
                 this.configData.keyword = data.keyword;
+                this.configData.hotFlag = data.hotFlag;
             },
             async recoverPage() {
 

+ 5 - 0
src/views/management/XingWenZiXun/components/Table.vue

@@ -36,6 +36,11 @@
                 label="新闻分类"
                 width="200">
         </el-table-column>
+      <el-table-column
+          prop="hot"
+          label="热门新闻"
+          width="200">
+      </el-table-column>
         <el-table-column
                 prop="pic"
                 label="图片"

+ 13 - 0
src/views/management/XingWenZiXun/index.vue

@@ -13,6 +13,17 @@
                         placeholder="请选择新闻分类"
                 ></mySelect>
 
+              <el-select v-model="hotFlag" placeholder="请选择新闻热度" clearable class="search-item">
+                <el-option
+                    label="热门新闻"
+                    value="1">
+                </el-option>
+                <el-option
+                    label="非热门新闻"
+                    value="0">
+                </el-option>
+              </el-select>
+
                 <el-button class="btn-search" size="medium" type="primary" @click="handleSearch">查询</el-button>
             </div>
             <div>
@@ -81,6 +92,7 @@
                 tableSelectData:  [],
                 title:            '',
                 keywords:         '',
+                hotFlag:          '',
             };
         },
         components: {
@@ -163,6 +175,7 @@
                     size:           this.mySize,
                     keyword:        this.keywords,
                     title:          this.title,
+                    hotFlag:        this.hotFlag,
                     newsClassifyId: this.newsClassifyId,
                 };
                 return opt;