|
@@ -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>
|