Просмотр исходного кода

feature(订单管理系统):
1、首页日程安排换为督办管理

niezch 2 лет назад
Родитель
Сommit
fc89d182d2
2 измененных файлов с 53 добавлено и 9 удалено
  1. 51 6
      src/views/index/index.vue
  2. 2 3
      src/views/plat/task/index.vue

+ 51 - 6
src/views/index/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: wanglj 471442253@qq.com
  * @Date: 2022-12-13 10:28:33
- * @LastEditors: wanglj
- * @LastEditTime: 2023-03-27 16:41:46
+ * @LastEditors: niezch@dashoo.cn
+ * @LastEditTime: 2023-04-03 09:28:45
  * @Description: file content
  * @FilePath: \opms_frontend\src\views\index\index.vue
 -->
@@ -145,10 +145,9 @@
       </grid-layout>
     </div>
     <div class="right">
-      <el-card class="calendar">
+      <!-- <el-card class="calendar">
         <div slot="header" class="card-title">
           <span>日程安排</span>
-          <!-- <el-button style="padding: 0" type="text">添加</el-button> -->
         </div>
         <div class="week">
           <vab-icon
@@ -179,13 +178,38 @@
             <div class="detail" :class="{ active: activity.active }">
               <p class="time">
                 {{ activity.schDate }}
-                <!-- <el-button type="text">详情</el-button> -->
               </p>
               <p>{{ activity.schTitle }}</p>
             </div>
           </el-timeline-item>
         </el-timeline>
         <div class="timelineEmpty">暂无日程</div>
+      </el-card> -->
+      <el-card class="notice">
+        <div slot="header" class="card-title">
+          <span>督办管理</span>
+          <div class="buttons">
+            <el-button size="mini" @click="handleSupervision">
+              更多
+              <i class="el-icon-arrow-right el-icon--right"></i>
+            </el-button>
+          </div>
+        </div>
+        <ul>
+          <li v-for="(item, index) in supervisionList" :key="index" class="notice-list">
+            <p>
+              <span>【督办】</span>
+              {{ item.taskTitle }}
+            </p>
+            <!-- <p class="time">
+              <vab-icon icon="time-line" />
+              {{ parseTime(item.createdTime, '{y}-{m}-{d}') }}
+            </p> -->
+            <div class="buttons">
+              <el-button size="mini" @click="getSupervisionInfo(item)">办理</el-button>
+            </div>
+          </li>
+        </ul>
       </el-card>
       <el-card class="notice">
         <div slot="header" class="card-title">
@@ -262,7 +286,7 @@
   import to from 'await-to-js'
   import indexApi from '@/api/index'
   import messageApi from '@/api/system/message'
-
+  import taskApi from '@/api/plat/task'
   export default {
     name: 'Index',
     components: {
@@ -362,6 +386,7 @@
         dayList: ['日', '一', '二', '三', '四', '五', '六'],
         messageList: [],
         msgTypeOptions: [],
+        supervisionList: [],
       }
     },
     mounted() {
@@ -369,6 +394,7 @@
       this.getDateList()
       this.getOptions()
       this.handleNoticeList()
+      this.getSupervisionList()
       this.$baseEventBus.$on('receivedMessage', () => {
         console.log('---------------通知更新公告----------------')
         this.handleNoticeList()
@@ -997,6 +1023,11 @@
           name: 'NoticeHistory',
         })
       },
+      handleSupervision() {
+        this.$router.push({
+          name: 'Task',
+        })
+      },
       async handleNoticeList() {
         const { data } = await messageApi.getList({ msgType: '10' })
         this.messageList = data.list
@@ -1004,6 +1035,20 @@
       getNoticeInfo(row) {
         this.$refs['notice-details'].open(row.id)
       },
+      getSupervisionInfo(row) {
+        this.$store.state.task.theTask = { ...row }
+        this.$router.push({
+          path: '/plat/task/detail',
+          query: {
+            type: 1,
+          },
+        })
+      },
+      async getSupervisionList() {
+        const { data } = await taskApi.getTaskList({ operateType: '1', pageNum: 1, pageSize: 10 })
+        debugger
+        this.supervisionList = data.list
+      },
     },
   }
 </script>

+ 2 - 3
src/views/plat/task/index.vue

@@ -96,6 +96,7 @@
         </vab-query-form>
         <!-- 主页面 -->
         <el-table
+          ref="table"
           v-loading="listLoading"
           border
           :data="list"
@@ -325,9 +326,6 @@
         this.$nextTick(() => this.$refs.table.doLayout())
       },
     },
-    activated() {
-      this.fetchData()
-    },
     async created() {
       this.queryForm.operateType = '1'
       this.statistics()
@@ -341,6 +339,7 @@
     methods: {
       // 单元格样式控制
       tableRowClassName({ row, rowIndex }) {
+        console.log(rowIndex)
         if (row.taskStatus === '10' && this.queryForm.operateType == 1) {
           return 'warning-row'
         }