Explorar o código

Merge branch 'lzw' of yinet2020/YinetOASystemWeb into master

梁志伟 %!s(int64=4) %!d(string=hai) anos
pai
achega
0bdbbee769

+ 129 - 49
src/views/dashboard/LineChart.vue

@@ -1,56 +1,96 @@
 <template>
   <el-card >
-  <div slot="header" class="clearfix">
-    <span>我的事项</span>
-    <el-button style="float: right; padding: 3px 0;color: #202020;" type="text" @click="more">更多</el-button>
-  </div>
-  <el-tabs v-model="activeName" @tab-click="handleClick">
-    <el-tab-pane label="待办事项" name="first">
-      <el-table :data="toListItem" style="width: 100%;" :header-cell-style="{background:'#eee',width:'100%'}">
-        <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
-        <el-table-column prop="fwtitle" label="标题"  align="left" >
-          <template slot-scope="scope">
-            <el-button type="text" @click="detern(scope.row)" style="color: black">{{scope.row.fwtitle}}</el-button>
-          </template>
-        </el-table-column>
-        <el-table-column prop="createTime" label="接收时间" width="180" align="center">
-          <template slot-scope="scope">
-            <span>{{scope.row.createTime | format('yyyy-MM-dd hh:mm')}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-tab-pane>
-    <el-tab-pane label="我的申请" name="second">
-      <el-table :data="myApplication" style="width: 100%;" :header-cell-style="{background:'#eee',width:'100%'}">
-             <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
-             <el-table-column prop="fwtitle" label="标题"  align="left" >
-               <template slot-scope="scope">
-                 <el-button type="text" @click="myAppReturn(scope.row)" style="color: black">{{scope.row.fwtitle}}</el-button>
-               </template>
-             </el-table-column>
-             <el-table-column prop="createTime" label="创建时间" width="180" align="center">
-                <template slot-scope="scope">
-                  <span>{{scope.row.createTime | format('yyyy-MM-dd hh:mm')}}</span>
-                </template>
-             </el-table-column>
-      </el-table>
-    </el-tab-pane>
+    <div slot="header" class="clearfix">
+      <span>我的事项</span>
+      <el-button style="float: right; padding: 3px 0;color: #202020;" type="text" @click="more">更多</el-button>
+    </div>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="待办事项" name="first">
+        <el-table :data="toListItem" style="width: 100%;" :header-cell-style="{background:'#eee',width:'100%'}">
+          <!--        <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>-->
+          <el-table-column prop="fwtitle" label="标题"  align="left" >
+            <template slot-scope="scope">
+              <el-button type="text"  @click="openactform(scope.row)" style="color: black">{{scope.row.title}}</el-button>
+            </template>
+          </el-table-column>
+          <el-table-column prop="createTime" label="接收时间" width="180" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.createTime | timefilters}}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+      <el-tab-pane label="我的申请" name="second">
+        <el-table :data="myApplication" style="width: 100%;" :header-cell-style="{background:'#eee',width:'100%'}">
+          <!--             <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>-->
+          <el-table-column prop="fwtitle" label="标题"  align="left" >
+            <template slot-scope="scope">
+              <el-button type="text" @click="myAppReturn(scope.row)" style="color: black">{{scope.row.fwtitle}}</el-button>
+            </template>
+          </el-table-column>
+          <el-table-column prop="createTime" label="创建时间" width="180" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.create_time | timefilters}}</span>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
 
-  </el-tabs>
+    </el-tabs>
+    <el-dialog id="actform" title="流程详情" :visible.sync="actOpen" :before-close="cancel" append-to-body width="80%"
+               top="10" height="90%">
+      <!-- 动态引入组件-->
+      <component :is="actForm" :data="details":actOpen="actOpen" @getList="getList" ></component>
+    </el-dialog>
+    <el-dialog id="actform1" title="流程详情" :visible.sync="actOpen1" :before-close="cancel" append-to-body width="80%"
+               top="10" height="90%">
+      <!-- 动态引入组件-->
+      <component :is="actForm1" :data="details1":actOpen="actOpen1" @getList="getList1" ></component>
+    </el-dialog>
   </el-card>
 </template>
 
 <script>
   import { listInfo} from '@/api/system/meapply/meapply'
+  import moment from "moment";
   import {toDoItemListInfo} from "@/api/activiti/form/fw";
+  import {getCurrentFlowFormKey,getStartFormKey } from '@/api/activiti/process/startprocess'
   export default {
+    filters: {
+      timefilters(val) {
+        if (val == null || val == "") {
+          return "暂无时间";
+        } else {
+          let d = new Date(val);   //val 为表格内取到的后台时间
+          let month =
+            d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1;
+          let day = d.getDate() < 10 ? "0" + d.getDate() : d.getDate();
+          let hours = d.getHours() < 10 ? "0" + d.getHours() : d.getHours();
+          let min = d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes();
+          let sec = d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds();
+          let times=d.getFullYear() + '-' + month + '-' + day + ' ' + hours + ':' + min + ':' + sec;
+          return moment(val).format("YYYY-MM-DD HH:mm")
+        }
+      }
+    },
     data() {
       return {
+        actForm: null,
+        actForm1: null,
+        actOpen:false,
+        actOpen1:false,
+        //传入到下一页面的值
+        details:{getactkey: '',
+          formId:'',
+          flg:'1'},
+        details1:{getactkey: '',
+          formId:'',
+          flg:'2'},
         activeName: 'first',
         myApplication: [],
         toListItem: [],
         //参数
-        lineParams: {
+        queryParams: {
           pageNum: 1,
           pageSize: 5,
           orderByColumn: "createTime",
@@ -60,6 +100,7 @@
     },
     created() {
       this.getList();
+      this.getList1();
     },
     methods: {
       handleClick(tab, event) {
@@ -68,27 +109,66 @@
       getList() {
         this.loading = true;
         //我的申请
-        listInfo(this.lineParams).then(response => {
+        listInfo(this.queryParams).then(response => {
+          console.log(response.rows)
           this.myApplication = response.rows;
-          this.total = response.total;
+          this.title = response.title;
           this.loading = false;
         });
         //待办请求
         toDoItemListInfo(this.queryParams).then(response => {
+          console.log(response.rows)
           this.toListItem = response.rows;
-          this.total = response.total;
+          this.title = response.title;
+          this.loading = false;
+        });
+      },
+      openactform(row) {
+        var actkey=row.processInstanceId;
+        var id=row.businessKey
+        let vue = this
+        actkey=actkey.split(":")[0];
+        this.details.getactkey = actkey//动态传参到下面的页面
+        this.details.formId = id//动态传参到下面的页面
+        getCurrentFlowFormKey(actkey).then(response => {
+          var path = response.msg
+          this.actForm = () => Promise.resolve().then(() => require(`@/views/${path}`))
+        })
+        this.actOpen = true
+        return vue.actForm = this.actForm
+      },
+      getList1() {
+        this.loading = true;
+        //我的申请
+        listInfo(this.queryParams).then(response => {
+          console.log(response.rows)
+          this.myApplication = response.rows;
+          this.title = response.title;
           this.loading = false;
         });
       },
+
       detern(row){
         const actkey = row.actkey
         const form = row || this.form
         this.$router.push({path:'/actwork/todo/tododetails',query: {bd:form,id:actkey }})
       },
       myAppReturn(row){
-        const actkey = row.actkey
-        const form = row || this.form
-        this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
+        var actkey=row.definitionId
+        var id=row.businessKey
+        let vue = this
+        actkey=actkey.split(":")[0];
+        this.details1.getactkey = actkey//动态传参到下面的页面
+        this.details1.formId = id//动态传参到下面的页面
+        getStartFormKey(actkey).then(response => {
+          var path = response.msg
+          this.actForm1 = () => Promise.resolve().then(() => require(`@/views/${path}`))
+        })
+        this.actOpen1 = true
+        return vue.actForm1 = this.actForm1
+        // const actkey = row.actkey
+        // const form = row || this.form
+        // this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
       },
       more(){
         if(this.activeName=='first'){
@@ -122,11 +202,11 @@
 
   /*.clearfix:before,*/
   /*.clearfix:after {*/
-    /*display: table;*/
-    /*content: "";*/
+  /*display: table;*/
+  /*content: "";*/
   /*}*/
   /*.clearfix:after {*/
-    /*clear: both*/
+  /*clear: both*/
   /*}*/
   .el-card__header{
     background: #f5f5f5;
@@ -136,7 +216,7 @@
     padding: 15px 20px 20px 20px;
     height: 354px;
   }
- .el-card__header{
-   background: #f5f5f5;
- }
+  .el-card__header{
+    background: #f5f5f5;
+  }
 </style>

+ 11 - 5
src/views/dashboard/PieChart.vue

@@ -1,7 +1,7 @@
 <template>
   <el-card class="box-card">
     <div slot="header" class="clearfix">
-      <span>我的通知(未签收)</span>
+      <span>我的通知</span>
       <el-button style="float: right; padding: 3px 0;color: #202020;" type="text" @click="more">更多</el-button>
     </div>
     <el-table v-loading="loading" :data="infoList" size="small" :show-header="showHeader">
@@ -20,6 +20,7 @@
 </template>
 <script>
   import { listInfo, } from "@/api/system/notify_info/mylist";
+  import log from '../monitor/job/log'
   export default {
     name: "Info",
     data() {
@@ -42,10 +43,9 @@
 // 是否显示弹出层
         open: false,
 // 查询参数
-        pieParams: {
+        queryParams: {
           pageNum: 1,
-          pageSize: 5,
-          recvstatus:0,
+          pageSize:5,
           orderByColumn:"sendtime",//排序字段
           isAsc:"desc",//排序方式
         },
@@ -69,10 +69,16 @@
       /** 查询【请填写功能名称】列表 */
       getList() {
         this.loading = true;
-        listInfo(this.pieParams).then(response => {
+        listInfo(this.queryParams).then(response => {
           console.log(response.rows)
           this.infoList = response.rows;
           this.loading = false;
+          let result=response.rows;
+          for (let i = 0; i <response.rows.length ; i++) {
+            if (result[i].title.length>10){
+              result[i].title=result[i].title.substring(0,10)+"...";
+            }
+          }
         });
       },
 

+ 33 - 7
src/views/dashboard/RaddarChart.vue

@@ -5,10 +5,10 @@
       <el-button style="float: right; padding: 3px 0;color: #202020;" type="text" @click="more">更多</el-button>
     </div>
   <el-table class="body" :data="doneList" :header-cell-style="{background:'#eee',width:'100%'}">
-        <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
+<!--        <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>-->
         <el-table-column prop="fwtitle" label="标题"  align="left">
           <template slot-scope="scope">
-            <el-button type="text" @click="detern(scope.row)" style="color: black">{{scope.row.fwtitle}}</el-button>
+            <el-button type="text" @click="detern(scope.row)" style="color: black">{{scope.row.title}}</el-button>
           </template>
         </el-table-column>
         <el-table-column prop="createTime" label="完成时间" width="180" align="center">
@@ -17,11 +17,18 @@
           </template>
         </el-table-column>
  </el-table>
+    <el-dialog id="actform" title="流程详情" :visible.sync="actOpen" :before-close="cancel" append-to-body width="80%" top="10" height="90%">
+      <!-- 动态引入组件-->
+      <component :is="actForm" :data="details":actOpen="actOpen" @getList="getList" ></component>
+
+
+    </el-dialog>
  </el-card>
 </template>
 
 <script>
   import { havedInfo } from "@/api/activiti/form/fw";
+  import {getStartFormKey } from '@/api/activiti/process/startprocess'
   import moment from "moment";
  export default {
    filters: {
@@ -43,12 +50,19 @@
    },
       data() {
         return {
+          //流程遮罩层
+          actOpen: false,
+          //传入到下一页面的值
+          details:{getactkey: '',
+            formId:'',
+            flg:'2'},
+          actForm: null,
           doneList: [],
           raddarParams: {
             pageNum: 1,
             pageSize: 4,
-            orderByColumn: "createTime",
-            isAsc:"desc",//排序方式
+           // orderByColumn: "createTime",
+           // isAsc:"desc",//排序方式
           },
         }
       },
@@ -68,9 +82,21 @@
        this.$router.replace('/havedone')
      },
      detern(row){
-       const actkey = row.taskid || this.ids
-       const form = row || this.form
-       this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
+       var actkey=row.processDfinitionId
+       var id=row.businessKey
+       let vue = this
+       actkey=actkey.split(":")[0];
+       this.details.getactkey = actkey//动态传参到下面的页面
+       this.details.formId = id//动态传参到下面的页面
+       getStartFormKey(actkey).then(response => {
+         var path = response.msg
+         this.actForm = () => Promise.resolve().then(() => require(`@/views/${path}`))
+       })
+       this.actOpen = true
+       return vue.actForm = this.actForm
+       // const actkey = row.taskid || this.ids
+       // const form = row || this.form
+       // this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
      },
    }
     }

+ 9 - 1
src/views/system/files/column.vue

@@ -26,7 +26,8 @@
       v-loading="loading"
       :data="deptList"
       row-key="deptId"
-      default-expand-all
+      :row-key="getRowKeys"
+      :expand-row-keys="expands"
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
       <el-table-column prop="deptName" label="部门名称" width="260" >
@@ -115,6 +116,13 @@
         components: { Treeselect },
         data() {
             return {
+              // 获取row的key值
+              getRowKeys(row) {
+
+                return row.parentId;
+              },
+              // 要展开的行,数值的元素是row的key值
+              expands: ['0','100'],
                 // 遮罩层
                 loading: true,
                 // 表格树数据