瀏覽代碼

我的待办

chenc 3 年之前
父節點
當前提交
adebed72f3
共有 3 個文件被更改,包括 188 次插入4 次删除
  1. 6 3
      src/views/dashboard/Analysis.vue
  2. 1 1
      src/views/dashboard/IndexOa.vue
  3. 181 0
      src/views/dashboard/MyToDo.vue

+ 6 - 3
src/views/dashboard/Analysis.vue

@@ -2,7 +2,8 @@
   <div>
     
     <index-oa ></index-oa>
-    <index-chart v-if="indexStyle==1"></index-chart>
+    <my-to-do></my-to-do>
+    <!-- <index-chart v-if="indexStyle==1"></index-chart>
     <index-bdc v-if="indexStyle==2"></index-bdc>
     <index-task v-if="indexStyle==3"></index-task>
     <div style="width: 100%;text-align: right;margin-top: 20px">
@@ -12,7 +13,7 @@
         <a-radio :value="2">统计图表2</a-radio>
         <a-radio :value="3">任务表格</a-radio>
       </a-radio-group>
-    </div>
+    </div> -->
   </div>
 </template>
 
@@ -21,6 +22,7 @@ import IndexChart from './IndexChart'
 import IndexTask from './IndexTask'
 import IndexBdc from './IndexBdc'
 import IndexOa from './IndexOa'
+import MyToDo from './MyToDo'
 
 
 export default {
@@ -29,7 +31,8 @@ export default {
     IndexChart,
     IndexTask,
     IndexBdc,
-    IndexOa
+    IndexOa,
+    MyToDo
   },
   data() {
     return {

+ 1 - 1
src/views/dashboard/IndexOa.vue

@@ -2,7 +2,7 @@
   <div class="page-header-index-wide">
     <a-row :gutter="24">
       <a-col :sm="24" :md="24" :xl="24" :style="{ marginBottom: '24px' }">
-        <a-card size="small" title="OA工作台" :bordered="false" >
+        <a-card title="OA工作台" :bordered="false" >
           <a-row :gutter="24">
             <a-col :sm="24" :md="12" :xl="2" v-for="(item,index)  in activeKeyAll" :key="index">
               <a-card size="small" :bordered="false" >

+ 181 - 0
src/views/dashboard/MyToDo.vue

@@ -0,0 +1,181 @@
+<template>
+  <div class="page-header-index-wide">
+    <a-row :gutter="24">
+      <a-col :sm="24" :md="24" :xl="24" :style="{ marginBottom: '24px' }">
+        <a-card title="我的待办" :bordered="false">
+          <a-row :gutter="24">
+            <a-col :sm="24" :md="24" :xl="24" :style="{ marginBottom: '24px' }">
+              <a-table
+                :scroll="scroll"
+                bordered
+                :loading="loading"
+                rowKey="id"
+                :dataSource="data"
+                :pagination="ipagination"
+                @change="handleTableChange"
+                ref="table"
+                size="small"
+              >
+                <a-table-column title="#" :width="50">
+                  <template slot-scope="t,r,i">
+                    <span>{{i+1}}</span>
+                  </template>
+                </a-table-column>
+                <a-table-column title="任务名称" data-index="name" :width="150" align="center">
+                  <template slot-scope="t">
+                    <span>{{t}}</span>
+                  </template>
+                </a-table-column>
+                <a-table-column title="所属流程" data-index="processName" :width="150" align="center">
+                  <template slot-scope="t">
+                    <span>{{t}}</span>
+                  </template>
+                </a-table-column>
+                <a-table-column title="委托代办人" data-index="owner" align="center" :width="150">
+                  <template slot-scope="t">
+                    <span>{{t}}</span>
+                  </template>
+                </a-table-column>
+                <a-table-column title="流程发起人" data-index="applyer" :width="150" align="center">
+                  <template slot-scope="t">
+                    <span>{{t}}</span>
+                  </template>
+                </a-table-column>
+                <a-table-column
+                  title="优先级"
+                  data-index="priority"
+                  :width="110"
+                  align="center"
+                  key="so"
+                  :sorter="(a,b)=>a.priority - b.priority"
+                >
+                  <template slot-scope="t">
+                    <span v-if="t==0" style="color: green;">普通</span>
+                    <span v-else-if="t==1" style="color: orange;">重要</span>
+                    <span v-else-if="t==2" style="color: red;">紧急</span>
+                    <span v-else style="color: #999;">无</span>
+                  </template>
+                </a-table-column>
+                <a-table-column
+                  title="状态"
+                  data-index="isSuspended"
+                  :width="100"
+                  align="center"
+                  key="z"
+                  :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
+                >
+                  <template slot-scope="t">
+                    <span v-if="!Boolean(t)" style="color: green;">已激活</span>
+                    <span v-if="Boolean(t)" style="color: orange;">已挂起</span>
+                  </template>
+                </a-table-column>
+                <a-table-column title="创建时间" data-index="createTime" :width="200" align="center">
+                  <template slot-scope="t">
+                    <span>{{t}}</span>
+                  </template>
+                </a-table-column>
+                <a-table-column title="操作" data-index align="center" :width="100">
+                  <!-- <template slot-scope="t,r,i">
+              <a href="javascript:void(0);" @click="detail(r)" style="color: blue">申请详情</a>
+              <a-divider type="vertical" />
+              <span v-if="Boolean(r.isSuspended)" style="cursor: no-drop;color: #999999;" title="流程已被挂起,无法操作!">
+                通过 <a-divider type="vertical" />
+                驳回 <a-divider type="vertical" />
+                委托 <a-divider type="vertical" />
+              </span>
+              <span v-else>
+                <a href="javascript:void(0);" @click="passTask(r)" style="color: green">通过</a>
+                <a-divider type="vertical" />
+                <a href="javascript:void(0);" @click="backTask(r)" style="color: orange">驳回</a>
+                <a-divider type="vertical" />
+                <a href="javascript:void(0);" @click="delegateTask(r)" style="color: #00A0E9">委托</a>
+                <a-divider type="vertical" />
+              </span>
+              <a href="javascript:void(0);" @click="history(r)" style="color: #217dbb">历史</a>
+                  </template>-->
+                  <template slot-scope="t,r,i">
+                    <a href="javascript:void(0);" @click="toDealWith()" style="color: blue">去处理</a>
+                  </template>
+                </a-table-column>
+              </a-table>
+            </a-col>
+          </a-row>
+        </a-card>
+      </a-col>
+    </a-row>
+  </div>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
+import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
+export default {
+  name: 'MyToDo',
+  data() {
+    return {
+      data: [], // 表单数据
+      total: 0, // 表单数据总数
+      ipagination: {
+        current: 1,
+        pageSize: 5,
+        pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      }
+    }
+  },
+  created() {
+    this.getDataList()
+  },
+  computed: {
+    scroll: function() {
+      var width = window.innerWidth
+      //ant-table
+      let $antTable = window.document.getElementsByClassName('ant-table')
+      if ($antTable[0]) {
+        width = $antTable[0].clientWidth
+      }
+      console.log('$antTable', $antTable)
+      return {
+        // x:'max-content',
+        x: 1160,
+        y: window.innerHeight / 2
+      }
+    },
+    innerHeight: function() {
+      var innerHeight = window.innerHeight
+      return innerHeight
+    }
+  },
+  methods: {
+    getDataList() {
+      this.loading = true
+      this.postFormAction('/actTask/todoList', {}).then(res => {
+        this.loading = false
+        if (res.success) {
+          this.data = res.result || []
+          this.total = this.data.leading
+        }
+      })
+    },
+    handleTableChange(pagination, filters, sorter) {
+      //分页、排序、筛选变化时触发
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
+      }
+      this.ipagination = pagination
+      // this.loadData();
+    },
+    //去处理按钮
+    toDealWith() {
+      this.$router.push({ path: '/activiti/todoManage' })
+    }
+  }
+}
+</script>