Browse Source

新闻管理/新闻审核-删除上报时间,添加字段来源、并修改来源、封面图为非必选项

Sanmu8 1 year ago
parent
commit
764b758ee8
2 changed files with 32 additions and 9 deletions
  1. 25 7
      src/views/news/index.vue
  2. 7 2
      src/views/news/task/index.vue

+ 25 - 7
src/views/news/index.vue

@@ -77,6 +77,17 @@
         </template>
       </el-table-column>
 
+       <el-table-column
+        label="来源"
+        align="center"
+        width="120"
+        prop="source"
+      >
+        <template slot-scope="scope">
+          {{scope.row.source}}
+        </template>
+      </el-table-column>
+
       <el-table-column label="编辑日期" align="center" width="120" prop="updateTime">
         <template slot-scope="scope">
           {{ scope.row.updateTime ? scope.row.updateTime.substr(0, 10) : '无' }}
@@ -84,17 +95,17 @@
       </el-table-column>
       <el-table-column label="审核日期" align="center" width="120" prop="audit_time">
         <template slot-scope="scope">
-          {{ scope.row.audit_time ? scope.row.audit_time.substr(0, 10) : '无' }}
+          {{ scope.row.auditTime ? scope.row.auditTime.substr(0, 10) : '无' }}
         </template>
       </el-table-column>
-      <el-table-column label="上报日期" align="center" width="120" prop="report_date">
+      <!-- <el-table-column label="上报日期" align="center" width="120" prop="report_date">
         <template slot-scope="scope">
           {{ scope.row.report_date ? scope.row.report_date.substr(0, 10) : '无' }}
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="发布日期" align="center" width="120" prop="release_date">
         <template slot-scope="scope">
-          {{ scope.row.release_date ? scope.row.release_date.substr(0, 10) : '无' }}
+          {{ scope.row.releaseDate ? scope.row.releaseDate.substr(0, 10) : '无' }}
         </template>
       </el-table-column>
       <el-table-column label="新闻状态" align="center" width="120" prop="status">
@@ -130,12 +141,17 @@
           <el-input v-model="form.title" placeholder="请输入标题"></el-input>
         </el-form-item>
 
+        <el-form-item label="来源">
+          <el-input v-model="form.source" placeholder="请输入来源"></el-input>
+        </el-form-item>
+
+
         <el-form-item label="类型" prop="type">
           <el-select v-model="form.type" placeholder="请选择">
             <el-option v-for="item in typeList" :key="item.value + 'typeList'" :label="item.label" :value="item.value"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="封面图" prop="picture">
+        <el-form-item label="封面图">
           <el-upload action="#" list-type="picture-card" :limit="1" :auto-upload="true" :http-request="httprequest" :before-upload="beforeupload" :file-list="fileList">
             <i slot="default" class="el-icon-plus"></i>
             <div slot="file" slot-scope="{ file }">
@@ -235,7 +251,8 @@ export default {
         type: null,
         typeName: null,
         picture: null,
-        status: null
+        status: null,
+        source:null,
       },
       // 表单参数
       form: {},
@@ -356,7 +373,8 @@ export default {
         type: null,
         typeName: null,
         picture: null,
-        status: '0'
+        status: '0',
+        source:null
       };
       this.fileList = [];
       this.resetForm('form');

+ 7 - 2
src/views/news/task/index.vue

@@ -37,7 +37,13 @@
           <el-form-item label="标题" prop="title">
             <el-input
               v-model="taskList.formobj.title"
-              placeholder="请输入标题"
+              disabled
+            ></el-input>
+          </el-form-item>
+
+          <el-form-item label="来源">
+            <el-input
+              v-model="taskList.formobj.source"
               disabled
             ></el-input>
           </el-form-item>
@@ -45,7 +51,6 @@
           <el-form-item label="类型" prop="type">
             <el-select
               v-model="taskList.formobj.type"
-              placeholder="请选择"
               disabled
             >
               <el-option