Browse Source

Merge branch 'master' of http://git.cc-lotus.info/count/webnew-count

reloaded 5 years ago
parent
commit
d2a41b4846

+ 3 - 2
src/components/uploadone.vue

@@ -4,7 +4,7 @@
       v-if="url"
       v-if="url"
       ref="upload"
       ref="upload"
       :action="url"
       :action="url"
-      list-type="picture-card"
+      :list-type="listType"
       :file-list="fileList"
       :file-list="fileList"
       :limit="limit"
       :limit="limit"
       :on-exceed="outLimit"
       :on-exceed="outLimit"
@@ -30,7 +30,8 @@ export default {
     url: { type: null },
     url: { type: null },
     limit: { type: Number },
     limit: { type: Number },
     data: { type: null },
     data: { type: null },
-    type: { type: String },
+    // type: { type: String },
+    listType: { type: String, default: 'picture-card' },
   },
   },
   components: {},
   components: {},
   data: () => ({
   data: () => ({

+ 1 - 1
src/layout/common/menus.vue

@@ -4,7 +4,7 @@
       <el-col :span="24">
       <el-col :span="24">
         <el-menu :default-active="$route.path" router class="el-menu-demo" mode="horizontal">
         <el-menu :default-active="$route.path" router class="el-menu-demo" mode="horizontal">
           <el-menu-item index="/news/index">新闻动态</el-menu-item>
           <el-menu-item index="/news/index">新闻动态</el-menu-item>
-          <el-menu-item index="/achievement/index">成果展示</el-menu-item>
+          <el-menu-item index="/achievement/index?col_name=平台建设">成果展示</el-menu-item>
           <el-menu-item index="/service/index">计算服务</el-menu-item>
           <el-menu-item index="/service/index">计算服务</el-menu-item>
           <el-menu-item index="/communication/index">交流互动</el-menu-item>
           <el-menu-item index="/communication/index">交流互动</el-menu-item>
           <el-menu-item index="/partisan/index">党建学苑</el-menu-item>
           <el-menu-item index="/partisan/index">党建学苑</el-menu-item>

+ 2 - 1
src/store/index.js

@@ -9,7 +9,7 @@ import staff from './staff';
 import expert from './expert';
 import expert from './expert';
 import login from './login';
 import login from './login';
 import user from './user';
 import user from './user';
-
+import news from './news';
 Vue.use(Vuex);
 Vue.use(Vuex);
 
 
 export default new Vuex.Store({
 export default new Vuex.Store({
@@ -24,5 +24,6 @@ export default new Vuex.Store({
     staff,
     staff,
     expert,
     expert,
     user,
     user,
+    news,
   },
   },
 });
 });

+ 45 - 0
src/store/news.js

@@ -0,0 +1,45 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  newsInfo: `/api/count/department`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit = 10, ...info } = {}) {
+    const res = await this.$axios.$get(api.newsInfo, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...info } = {}) {
+    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, {
+      ...info,
+    });
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 1 - 1
src/views/achievement/index.vue

@@ -159,7 +159,7 @@ export default {
   },
   },
   data: () => ({
   data: () => ({
     displays: '0',
     displays: '0',
-    columnName: '',
+    columnName: '平台建设',
     total: 1,
     total: 1,
     details: {},
     details: {},
     list: [
     list: [

+ 8 - 8
src/views/communication/parts/topicDetail.vue

@@ -33,7 +33,7 @@
                     <p v-html="detail.content"></p>
                     <p v-html="detail.content"></p>
                   </el-col>
                   </el-col>
                   <el-col :span="24" class="jubao">
                   <el-col :span="24" class="jubao">
-                    <span>举报</span>
+                    <!-- <span>举报</span> -->
                   </el-col>
                   </el-col>
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
@@ -59,7 +59,7 @@
                     <p v-html="item.content"></p>
                     <p v-html="item.content"></p>
                   </el-col>
                   </el-col>
                   <el-col :span="24" class="jubao">
                   <el-col :span="24" class="jubao">
-                    <span>举报</span>
+                    <!-- <span>举报</span> -->
                   </el-col>
                   </el-col>
                 </el-col>
                 </el-col>
               </el-col>
               </el-col>
@@ -102,7 +102,7 @@ export default {
   data: () => ({
   data: () => ({
     squareImage: require('@/assets/222.png'),
     squareImage: require('@/assets/222.png'),
     detail: {},
     detail: {},
-    list: [{ name: 'dsadas' }],
+    list: [],
     total: 0,
     total: 0,
     form: {},
     form: {},
     inputInfo: '',
     inputInfo: '',
@@ -230,7 +230,7 @@ export default {
   border-bottom: 1px dashed #ccc;
   border-bottom: 1px dashed #ccc;
 }
 }
 .main .two .twoInfo .left .leftDown {
 .main .two .twoInfo .left .leftDown {
-  height: 420px;
+  height: 280px;
 }
 }
 .main .two .twoInfo .left .leftDown .el-image {
 .main .two .twoInfo .left .leftDown .el-image {
   margin: 40px 18px;
   margin: 40px 18px;
@@ -268,7 +268,7 @@ export default {
   float: right;
   float: right;
 }
 }
 .main .two .twoInfo .right .info {
 .main .two .twoInfo .right .info {
-  height: 300px;
+  height: 190px;
   border: 2px solid #044b79;
   border: 2px solid #044b79;
   border-radius: 10px;
   border-radius: 10px;
   margin: 30px 0;
   margin: 30px 0;
@@ -277,11 +277,11 @@ export default {
 .main .two .twoInfo .right .info p {
 .main .two .twoInfo .right .info p {
   font-size: 20px;
   font-size: 20px;
   overflow: hidden;
   overflow: hidden;
-  height: 260px;
+  height: 170px;
 }
 }
 .main .two .twoInfo .right .jubao {
 .main .two .twoInfo .right .jubao {
-  height: 70px;
-  line-height: 60px;
+  height: 40px;
+  line-height: 40px;
   border-top: 1px dashed #ff8b0f;
   border-top: 1px dashed #ff8b0f;
   border-bottom: 10px solid #5096d2;
   border-bottom: 10px solid #5096d2;
 }
 }

+ 14 - 2
src/views/index.vue

@@ -41,6 +41,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+// const { mapActions: login } = createNamespacedHelpers('login');
 import top from '@/layout/common/top.vue';
 import top from '@/layout/common/top.vue';
 import menus from '@/layout/common/menus.vue';
 import menus from '@/layout/common/menus.vue';
 import dynamic from '@/layout/index/dynamic.vue';
 import dynamic from '@/layout/index/dynamic.vue';
@@ -173,9 +174,20 @@ export default {
       },
       },
     ],
     ],
   }),
   }),
-  created() {},
+  created() {
+    this.search();
+  },
   computed: {},
   computed: {},
-  methods: {},
+  methods: {
+    // ...{ departmentQuery: 'query', departmentFetch: 'fetch' },
+    async search() {
+      let res = await this.toLogin({ col_name: '工作动态' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `jobsList`, res.data);
+      }
+      jobsList;
+    },
+  },
 };
 };
 </script>
 </script>
 
 

+ 27 - 3
src/views/pcenter/parts/infoAdmin.vue

@@ -64,8 +64,19 @@
               <el-form-item label="图片" prop="img_url" v-if="form.type == '0'">
               <el-form-item label="图片" prop="img_url" v-if="form.type == '0'">
                 <upload :limit="1" :data="form.img_url" type="img_url" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
                 <upload :limit="1" :data="form.img_url" type="img_url" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
               </el-form-item>
               </el-form-item>
+              <el-form-item label="视频" prop="file_url" v-if="form.type == '0' && form.col_name == '科技培训'">
+                <upload
+                  :limit="1"
+                  :data="form.file_url"
+                  type="file_url"
+                  accept=".mp4"
+                  listType=""
+                  :url="'/files/imgpath/upload'"
+                  @upload="uploadSuccess"
+                ></upload>
+              </el-form-item>
               <el-form-item label="内容" prop="content" v-if="form.type == '0'">
               <el-form-item label="内容" prop="content" v-if="form.type == '0'">
-                <el-input v-model="form.content" type="textarea" placeholder="请输入信息内容"></el-input>
+                <wang-editor v-model="form.content" ref="editor"></wang-editor>
               </el-form-item>
               </el-form-item>
               <el-form-item label="是否推荐" prop="is_top">
               <el-form-item label="是否推荐" prop="is_top">
                 <el-radio-group v-model="form.is_top">
                 <el-radio-group v-model="form.is_top">
@@ -73,7 +84,7 @@
                   <el-radio label="1">推荐</el-radio>
                   <el-radio label="1">推荐</el-radio>
                 </el-radio-group>
                 </el-radio-group>
               </el-form-item>
               </el-form-item>
-              <el-form-item label="状态" prop="status">
+              <el-form-item label="状态" prop="status" v-if="user.type == '0' || user.type == '1'">
                 <el-radio-group v-model="form.status">
                 <el-radio-group v-model="form.status">
                   <el-radio label="0">草稿</el-radio>
                   <el-radio label="0">草稿</el-radio>
                   <el-radio label="1">审核中</el-radio>
                   <el-radio label="1">审核中</el-radio>
@@ -81,6 +92,8 @@
                 </el-radio-group>
                 </el-radio-group>
               </el-form-item>
               </el-form-item>
               <el-col :span="24" style="text-align:center;">
               <el-col :span="24" style="text-align:center;">
+                <el-button type="success" v-if="user.type == '0' || user.type == '1'" @click="examineIn()">审核通过</el-button>
+                <el-button type="danger" v-if="user.type == '0' || user.type == '1'" @click="examineOut()">审核拒绝</el-button>
                 <el-button type="primary" @click="submitDraft('form')">保存草稿</el-button>
                 <el-button type="primary" @click="submitDraft('form')">保存草稿</el-button>
                 <el-button type="success" @click="submitForm('form')">发布信息</el-button>
                 <el-button type="success" @click="submitForm('form')">发布信息</el-button>
                 <el-button type="danger" @click="resetForm('form')">取消</el-button>
                 <el-button type="danger" @click="resetForm('form')">取消</el-button>
@@ -94,13 +107,15 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import upload from '@/components/uploadone.vue';
+import upload from '@/components/upload.vue';
+import wangEditor from '@/components/wang-editor.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
 export default {
   name: 'infoAdmin',
   name: 'infoAdmin',
   props: {},
   props: {},
   components: {
   components: {
     upload,
     upload,
+    wangEditor,
   },
   },
   data: function() {
   data: function() {
     return {
     return {
@@ -162,6 +177,7 @@ export default {
     submitDraft(formName) {
     submitDraft(formName) {
       this.$refs[formName].validate(valid => {
       this.$refs[formName].validate(valid => {
         if (valid) {
         if (valid) {
+          this.form.uid = this.user.uid;
           console.log(this.form);
           console.log(this.form);
         } else {
         } else {
           console.log('error submit!!');
           console.log('error submit!!');
@@ -184,6 +200,14 @@ export default {
     resetForm(formName) {
     resetForm(formName) {
       this.$refs[formName].resetFields();
       this.$refs[formName].resetFields();
     },
     },
+    // 审核通过
+    examineIn() {
+      console.log('审核通过');
+    },
+    // 审核拒绝
+    examineOut() {
+      console.log('审核拒绝');
+    },
     // 图片
     // 图片
     uploadSuccess({ type, data }) {
     uploadSuccess({ type, data }) {
       this.$set(this.form, `${type}`, data.uri);
       this.$set(this.form, `${type}`, data.uri);