unknown 3 tahun lalu
induk
melakukan
82ac56eb25
6 mengubah file dengan 51 tambahan dan 386 penghapusan
  1. 19 0
      src/api.js
  2. 3 354
      src/router.js
  3. 6 6
      src/views/Home.vue
  4. 1 1
      src/views/Index.vue
  5. 20 24
      src/views/article/Article.vue
  6. 2 1
      vue.config.js

+ 19 - 0
src/api.js

@@ -251,6 +251,25 @@ export default {
 	delArticle: params => {
 		return axios.delete(`${baseURL}/api/admin/article`, { params: params });
 	},
+	// 作业相关
+	getHomeWorkList: params => {
+		return axios.get(`${baseURL}/api/admin/homework/list`, { params: params });
+	},
+	getWorkList: params => {
+		return axios.get(`${baseURL}/api/work/list`, { params: params });
+	},
+	getArticle: params => {
+		return axios.get(`${baseURL}/api/admin/article`, { params: params });
+	},
+	addArticle: params => {
+		return axios.post(`${baseURL}/api/admin/article`, params);
+	},
+	updateArticle: params => {
+		return axios.put(`${baseURL}/api/admin/article`, params);
+	},
+	delArticle: params => {
+		return axios.delete(`${baseURL}/api/admin/article`, { params: params });
+	},
 	// 资讯相关
 	getNewsList: params => {
 		return axios.get(`${baseURL}/api/admin/news/list`, { params: params });

+ 3 - 354
src/router.js

@@ -22,175 +22,9 @@ export default new Router({
         name: '首页'
       }, ]
     },
-    {
-      path: '/message/message',
-      name: '内部消息',
-      icon: 'iconfont iconxiaoxi',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/message/message',
-        component: () => import('./views/message/Notice.vue'),
-        name: '内部消息'
-      }, {
-        path: '/message/message/analyse',
-        component: () => import('./views/message/MessageAnalyse.vue'),
-        name: '问卷统计'
-      }, {
-        path: '/message/message/detail',
-        component: () => import('./views/message/NoticeDetail.vue'),
-        name: '消息详情'
-      }]
-    },
-    {
-      path: '/message/innerSurvey',
-      name: '内部问卷',
-      icon: 'iconfont iconwenjuan',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/message/innerSurvey',
-        component: () => import('./views/message/InnerSurvey.vue'),
-        name: '内部问卷'
-      }, {
-        path: '/message/innerSurvey/analyse',
-        component: () => import('./views/message/MessageAnalyse.vue'),
-        name: '问卷统计'
-      }]
-    },
-    {
-      path: '/message/outSurvey',
-      name: '外部问卷',
-      icon: 'iconfont iconwenjuan1',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/message/outSurvey',
-        component: () => import('./views/message/OutSurvey.vue'),
-        name: '外部问卷'
-      }, {
-        path: '/message/outSurvey/analyse',
-        component: () => import('./views/message/MessageAnalyse.vue'),
-        name: '问卷统计'
-      }]
-    },
-    {
-      path: '/journal/journal',
-      name: '中科院全刊',
-      icon: 'iconfont iconkanwuguanli',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/journal/journal',
-        component: () => import('./views/journalQun/Journal.vue'),
-        name: '中科院全刊'
-      },{
-        path: '/journal/journal/add',
-        component: () => import('./views/journalQun/AddJournal.vue'),
-        name: '中科院全刊'
-      },{
-        path: '/journal/journal/show',
-        component: () => import('./views/journalQun/ShowJournal.vue'),
-        name: '中科院全刊'
-      }]
-    },
-    {
-      path: '/journal/organizer',
-      name: '主办单位',
-      icon: 'iconfont icondanwei3',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/journal/organizer',
-        component: () => import('./views/journalQun/Organizer.vue'),
-        name: '主办单位'
-      },{
-        path: '/journal/organizer/detail',
-        component: () => import('./views/journalQun/SubjectDetail.vue'),
-        name: '主办单位详情'
-      }, ]
-    },
-    {
-      path: '/journal/subject',
-      name: '学科',
-      icon: 'iconfont iconshuben',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/journal/subject',
-        component: () => import('./views/journalQun/Subject.vue'),
-        name: '学科'
-      }, {
-        path: '/journal/subject/detail',
-        component: () => import('./views/journalQun/SubjectDetail.vue'),
-        name: '学科详情'
-      },]
-    },
-    {
-      path: '/journal/casci',
-      name: 'CASCI数据统计',
-      icon: 'iconfont iconshuben',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/journal/casci',
-        component: () => import('./views/journalQun/CASCI.vue'),
-        name: 'CASCI数据统计'
-      }, {
-        path: '/journal/casci/detail',
-        component: () => import('./views/journalQun/CASCIDetail.vue'),
-        name: 'CASCI数据详情'
-      },]
-    },
-    
-    {
-      path: '/learning/activity',
-      name: '活动预告',
-      icon: 'iconfont iconhuodong',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/learning/activity',
-        component: () => import('./views/activity/Activity.vue'),
-        name: '活动预告'
-      },{
-        path: '/learning/activity/add',
-        component: () => import('./views/activity/AddActivity.vue'),
-        name: '新增活动'
-      }, {
-        path: '/learning/activity/apply',
-        component: () => import('./views/activity/apply.vue'),
-        name: '报名'
-      },]
-    },
-    {
-      path: '/learning/oldactivity',
-      name: '活动回顾',
-      icon: 'iconfont iconhuodong',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/learning/oldactivity',
-        component: () => import('./views/activity/OldActivity.vue'),
-        name: '活动回顾'
-      },{
-        path: '/learning/oldactivity/add',
-        component: () => import('./views/activity/AddActivity.vue'),
-        name: '新增活动'
-      },  ]
-    },
     {
       path: '/article/article',
-      name: '文章管理',
+      name: '作业管理',
       icon: 'iconfont iconwenzhang',
       component: () => import('./views/Home.vue'),
       show: 0,
@@ -198,7 +32,7 @@ export default new Router({
       children: [{
         path: '/article/article',
         component: () => import('./views/article/Article.vue'),
-        name: '文章管理'
+        name: '作业管理'
       }, 
       {
         path: '/article/article/add',
@@ -207,126 +41,6 @@ export default new Router({
       }, 
     ]
     },
-    {
-      path: '/article/news',
-      name: '刊群动态',
-      icon: 'iconfont iconwenzhang',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/article/news',
-        component: () => import('./views/news/News.vue'),
-        name: '刊群动态'
-      }, 
-      {
-        path: '/article/news/add',
-        component: () => import('./views/news/AddNews.vue'),
-        name: '新增刊群动态'
-      }, 
-    ]
-    },
-    {
-      path: '/conference/conference',
-      name: '会议管理',
-      icon: 'iconfont iconhuiyizichan',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-          path: '/conference/conference',
-          component: () => import('./views/conference/Manage.vue'),
-          name: '会议管理'
-        }, 
-        {
-          path: '/conference/conference/add',
-          component: () => import('./views/conference/AddConference.vue'),
-          name: '新增会议'
-        }, 
-      ]
-    },
-    {
-      path: '/conference/signup',
-      name: '报名管理',
-      icon: 'iconfont iconbaoming-08',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/conference/signup',
-        component: () => import('./views/conference/Apply.vue'),
-        name: '报名管理'
-      }, ]
-    },
-    {
-      path: '/conference/checker',
-      name: '核销员管理',
-      icon: 'iconfont iconhexiao',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/conference/checker',
-        component: () => import('./views/conference/Checker.vue'),
-        name: '核销员管理'
-      }, ]
-    },
-    {
-      path: '/conference/hotel',
-      name: '酒店管理',
-      icon: 'iconfont icondanwei3',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/conference/hotel',
-        component: () => import('./views/conference/Hotel.vue'),
-        name: '酒店管理'
-      }, ],
-    },
-    {
-      path: '/conference/analyse',
-      name: '与会人员统计',
-      icon: 'iconfont icondanwei3',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/conference/analyse',
-        component: () => import('./views/conference/ApplyAnalyse.vue'),
-        name: '与会人员统计'
-      }, ],
-    },
-    // {
-    //   path: '/message/survey',
-    //   name: '调查问卷',
-    //   icon: 'el-icon-chat-dot-square',
-    //   component: () => import('./views/Home.vue'),
-    //   show: 0,
-    //   isLeaf: 1,
-    //   children: [{
-    //     path: '/message/survey',
-    //     component: () => import('./views/message/investigation.vue'),
-    //     name: '调查问卷'
-    //   }, ]
-    // },
-    {
-      path: '/message/template',
-      name: '问卷模板',
-      icon: 'iconfont iconwenjuanmoban-',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/message/template',
-        component: () => import('./views/message/templateList.vue'),
-        name: '问卷模板'
-      }, {
-        path: '/message/template/add',
-        component: () => import('./views/message/modelForm.vue'),
-        name: '新增表单'
-      }]
-    },
     {
       path: '/system/account',
       name: '账号管理',
@@ -352,71 +66,6 @@ export default new Router({
         component: () => import('./views/system/Role.vue'),
         name: '角色管理'
       }, ]
-    },
-    {
-      path: '/system/hotword',
-      name: '热词',
-      icon: 'iconfont iconrecigundongqiu',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/system/hotword',
-        component: () => import('./views/system/HotWord.vue'),
-        name: '热词'
-      }, ]
-    },
-    {
-      path: '/system/coldword',
-      name: '冷词',
-      icon: 'iconfont iconminganciku1',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/system/coldword',
-        component: () => import('./views/system/ColdWord.vue'),
-        name: '冷词'
-      }, ]
-    },
-    {
-      path: '/system/senword',
-      name: '敏感词',
-      icon: 'iconfont iconminganci',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/system/senword',
-        component: () => import('./views/system/SenWord.vue'),
-        name: '敏感词'
-      }, ]
-    },
-    {
-      path: '/system/banners',
-      name: 'Banner图',
-      icon: 'iconfont icontupian',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/system/banners',
-        component: () => import('./views/system/Banners.vue'),
-        name: 'Banner图'
-      },]
-    },
-    {
-      path: '/system/oplog',
-      name: '日志',
-      icon: 'iconfont iconrizhi',
-      component: () => import('./views/Home.vue'),
-      show: 0,
-      isLeaf: 1,
-      children: [{
-        path: '/system/oplog',
-        component: () => import('./views/system/Oplog.vue'),
-        name: '日志'
-      }, ]
-    },
+    }
   ]
 })

+ 6 - 6
src/views/Home.vue

@@ -59,8 +59,8 @@
   <el-container>
     <el-header>
       <div class="header">
-        <img class="logo" src="../assets/logo.png" alt="" />
-        <div class="siteTitle">中科院期刊微信公众号集中管理平台</div>
+        <!--<img class="logo" src="../assets/logo.png" alt="" />-->
+        <div class="siteTitle">猿人学作业</div>
       </div>
       <div class="nav">
         <router-link
@@ -341,18 +341,18 @@ export default {
         { act: false, to: "/learning/activity", name: "学术交流" },
         { act: false, to: "/article/article", name: "精品导读" },
         { act: false, to: "/conference/conference", name: "会议系统" },
-        { act: false, to: "/message/message", name: "信息管理" },
-        { act: false, to: "/system/account", name: "系统管理" },
+        //{ act: false, to: "/message/message", name: "信息管理" },
+        //{ act: false, to: "/system/account", name: "系统管理" },
       ];
       let mod = this.$route.path.split("/")[1];
       this.$router.options.routes.forEach((element, i) => {
         if (element.path.indexOf(mod) == -1) {
-          element.show = 0;
+          element.show = 1;
         } else {
           if (this.permission(element.name)) {
             element.show = 1;
           } else {
-            element.show = 0;
+            element.show = 1;
           }
         }
       });

+ 1 - 1
src/views/Index.vue

@@ -887,7 +887,7 @@ export default {
   created() {
     this.$api.getAccountInfo().then((res) => {
       this.role_id = res.data.data.role_id;
-      this.getData();
+      //this.getData();
       var color = [];
       for (let i = 0; i < 5; i++) {
         let c =

+ 20 - 24
src/views/article/Article.vue

@@ -104,7 +104,7 @@ a {
 </style>
 <template>
   <section>
-    <p><span>精品导读></span>文章管理</p>
+    <p><span>作业管理></span>所有作业</p>
     <div class="content">
       <div class="filter">
         <el-form
@@ -116,17 +116,17 @@ a {
           <el-form-item label="">
             <el-input
               clearable
-              placeholder="请输入标题"
+              placeholder="请输入姓名"
               v-model="form.name"
             ></el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="search">搜索</el-button>
+            <el-button type="primary" @click="getData">搜索</el-button>
           </el-form-item>
-          <el-form-item label="文章来源">
+          <el-form-item label="课程">
             <el-select
               v-model="form.journal_id"
-              placeholder="请选择期刊"
+              placeholder="请选择"
               filterable
               clearable
               @change="getData()"
@@ -142,8 +142,7 @@ a {
             </el-select>
           </el-form-item>
           <el-form-item style="float: right">
-            <el-button @click="syncToMP" type="primary">同步到公众号</el-button>
-            <el-button @click="addArticle" type="primary">发布文章</el-button>
+            <el-button @click="syncToMP" type="primary">同步作业</el-button>
           </el-form-item>
           <!-- <el-form-item style="float: right" v-if="form.journal_id">
             <el-button @click="$router.go(-1)" type="info">返回</el-button>
@@ -162,21 +161,15 @@ a {
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55"> </el-table-column>
-        <el-table-column prop="name" label="文章名称" width="380px"> </el-table-column>
-        <el-table-column prop="img" label="封面图">
-          <template slot-scope="scope">
-            <img :src="scope.row.img" alt="" width="120" height="80" />
-          </template>
-        </el-table-column>
-        <el-table-column prop="author" label="作者"></el-table-column>
-        <el-table-column prop="journal_name" label="来源"></el-table-column>
-        <el-table-column prop="publish_time" label="出版时间"></el-table-column>
-        <el-table-column prop="ctime" label="发布时间"></el-table-column>
-        <el-table-column prop="read_num" label="阅读量" width="80"></el-table-column>
+        <el-table-column prop="name" label="姓名" width="380px"> </el-table-column>
+        <el-table-column prop="filename" label="作业文件"></el-table-column>
+        <el-table-column prop="lesson" label="课程"></el-table-column>
+        <el-table-column prop="ctime" label="提交时间"></el-table-column>
+        <el-table-column prop="status" label="状态" width="80"></el-table-column>
         <el-table-column prop="zip" width="150" label="操作">
           <template slot-scope="scope">
             <el-button class="edit" type="text" @click="edit(scope.row)"
-              >编辑</el-button
+              >查看</el-button
             >
             <el-button class="del" @click="del(scope.row.id)" type="text"
               >删除</el-button
@@ -341,11 +334,14 @@ export default {
       this.$api.searchJournalList().then((res) => {
         this.journalSearch = res.data.data;
       });
-      this.$api.getArticleList(parm).then((res) => {
-        console.log(res);
-        this.list = res.data.data.list;
-        this.total = res.data.data.total;
-        this.loading = false;
+      
+      this.$api.getWorkList(parm).then((res) => {
+        this.$api.getHomeWorkList(parm).then((res) => {
+          console.log(res);
+          this.list = res.data.data.list;
+          this.total = res.data.data.total;
+          this.loading = false;
+        });
       });
     },
     del(id) {

+ 2 - 1
vue.config.js

@@ -4,7 +4,8 @@ module.exports={
             '/api':{
                 // target:'http://39.107.246.59:81',
                 // target:'http://caos.scxjc.club',
-                target:'https://caos.tederen.com',
+                // target:'https://caos.tederen.com',
+                target:'http://baidu.scxjc.club',
                 changeOrigin: true,
             }
         }