提交 ed47084f 编写于 作者: tony001's avatar tony001

update:更新

上级 a5938f3f
......@@ -138,6 +138,8 @@ import AppIndexUserInfo from './components/layout-element/index/app-index-user-i
import AppCtrlPos from './components/layout-element/structure/app-ctrl-pos/app-ctrl-pos.vue';
import AppPresetButton from './components/layout-element/interactive/app-preset-button/app-preset-button.vue';
import AppFieldImageDynamic from './components/layout-element/media/app-field-image-dynamic/app-field-image-dynamic.vue';
import AppTodoList from './components/app-todo-list/app-todo-list.vue';
// 全局挂载UI实体服务注册中心
window['uiServiceRegister'] = uiServiceRegister;
// 全局挂载实体权限服务注册中心
......@@ -290,5 +292,6 @@ export const AppComponents = {
v.component('app-ctrl-pos', AppCtrlPos);
v.component('app-preset-button',AppPresetButton);
v.component('app-field-image-dynamic', AppFieldImageDynamic);
v.component('app-todo-list',AppTodoList);
},
};
\ No newline at end of file
.app-todo-list {
width: 100%;
height: 100%;
.title {
color: #2b85e4;
font-weight: 500;
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
}
}
\ No newline at end of file
<template>
<div class='app-todo-list'>
<el-table :data="myTasks" :border="true" style="width: 100%">
<el-table-column prop="" sortable label="标题">
<template slot-scope="scope">
<span class="title" @click="handleClick(scope.row)">{{ scope.row.description }}</span>
</template>
</el-table-column>
<el-table-column prop="processDefinitionName" sortable label="流程" width="200">
</el-table-column>
<el-table-column prop="name" sortable label="状态" width="200">
</el-table-column>
<el-table-column prop="createTime" sortable label="创建时间" width="200">
</el-table-column>
</el-table>
</div>
</template>
<script lang = 'ts'>
import { Environment } from '@/environments/environment';
import { Component, Vue } from 'vue-property-decorator';
@Component({
})
export default class AppTodoList extends Vue {
/**
* 待办数据
*/
public myTasks: any[] = [];
/**
* vue创建
*/
created(): void {
this.getMyTasks();
}
/**
* 获取待办列表
*/
public getMyTasks() {
let url: any = '/wfcore/mytasks';
this.$http.get(url).then((response: any) => {
if (response && response.status == 200) {
const data: any = response.data;
if (data && data.length > 0) {
this.myTasks = data;
} else {
this.myTasks = [];
}
}
}).catch((error: any) => {
console.warn("加载数据错误");
})
}
/**
* 处理点击
*/
public handleClick(data: any) {
if (!data) return;
// 拼接要打开的窗口地址
const baseUrl: any = Environment.BaseUrl;
const openUrl: any = baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`;
// 打开新窗口
window.open(openUrl, '_blank');
}
}
</script>
<style lang="less">
@import './app-todo-list.less';
</style>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册