xjc 4 éve
szülő
commit
acb14e91be

+ 37 - 2
src/views/journalQun/CASCIDetail.vue

@@ -283,7 +283,7 @@
             label="操作"
             width="width">
             <template slot-scope="scope">
-                <el-button size="mini" type="primary" @click="getDays30PublishArticle(scope.row)">查看</el-button>
+                <el-button size="mini" type="primary" @click="showArticle(scope.row)">查看</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -341,6 +341,31 @@
           </el-table-column>
         </el-table>
     </el-dialog>
+    <!-- 文章预览 -->
+    <el-dialog
+      title="文章详情"
+      :close-on-click-modal="true"
+      :visible.sync="dialogVisible2"
+      width="414px">
+      <div class="preview">
+        <p class="aname">{{form2.name}}</p>
+        <div class="ainfo">
+          <img width="100" :src="form2.img" alt="">
+          <p>
+            发布单位:{{form2.journal_name}} <br>
+            作者:{{form2.author}} <br>
+            发表时间:{{form2.publish_time}} 
+          </p>
+        </div>
+        <b>文章简介</b>
+        <div class="adesc">{{form2.desc}}</div>
+        <b>文章内容</b>
+        <div v-html="form2.content"></div>
+      </div>
+      <!-- <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="open = false">确 定</el-button>
+      </span> -->
+    </el-dialog>
   </section>
 </template>
 <script>
@@ -349,6 +374,7 @@ export default {
     return {
       form:{},
       form1:{},
+      form2:{},
       params: {
         timerange: [
           new Date(new Date()-1000*60*60*24).toLocaleDateString().split("/").join("-"),
@@ -373,7 +399,8 @@ export default {
       days30Publish:[],
       days30PublishArticle:[],
       dialogTitle:"",
-      dialogVisible1:false
+      dialogVisible1:false,
+      dialogVisible2:false
     };
   },
   methods: {
@@ -458,6 +485,14 @@ export default {
         this.dialogVisible1 = true;
       })
     },
+    showArticle(row){
+      this.loading = true;
+      this.$api.getArticle({ id: row.article_id }).then((res) => {
+          this.form2 = res.data.data;
+          this.loading = false;
+          this.dialogVisible2 = true;
+        });
+    },
     // 初始化图表
     initCharts() {
       let option1 = {

+ 2 - 1
src/views/journalQun/Journal.vue

@@ -179,12 +179,13 @@
       > 
         <el-upload
           class="upload-demo"
-          action="/api/admin/uploadfile"
+          action="/api/admin/journal/upload"
           :show-file-list="false"
           :on-success="handleAvatarSuccess1">
           <el-button size="small" type="primary">点击上传</el-button>
           <div slot="tip" class="el-upload__tip">只能上传.xls/.xlsx文件,且不超过500M</div>
         </el-upload>
+        <a href="http://caos.scxjc.club/journal_template.xls" style="display:block;text-decoration:none;padding:0px;line-height:25px;">点击下载模板</a>
         <div>{{file}}</div>
          <span slot="footer" class="dialog-footer">
           <el-button size="small" type="normal" @click="dialogVisible1=false">取消</el-button>

+ 1 - 1
src/views/system/Role.vue

@@ -48,7 +48,7 @@
                     label="操作">
                     <template slot-scope="scope">
                         <el-button class="edit" type="text" @click="edit(scope.row.id)">编辑</el-button>
-                        <el-button class="del" @click="del(scope.row.id)" type="text">删除</el-button>
+                        <el-button v-if="!scope.row.inner" class="del" @click="del(scope.row.id)" type="text">删除</el-button>
                     </template>
                     </el-table-column>
             </el-table>