| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <template>
- <div class="todo-list">
- <Header />
- <div class="content mt-15">
- <div class="flex gap-5 items-center mb-4 bg-[#f9f9f9] py-2">
- <p class="flex items-center">
- <Icon
- icon="mynaui:arrow-up-down"
- class="icon pr-1 h-6 w-6"
- color="#014099"
- />待办任务列表
- </p>
- <el-button
- type="primary"
- round
- size="default"
- color="#02409b"
- @click="router.back()"
- ><Icon
- icon="mynaui:corner-up-left"
- class="icon pr-1"
- width="20"
- height="20"
- />返回</el-button
- >
- </div>
- <el-table
- :data="oaTasks"
- style="width: 100%"
- :empty-text="loading ? '加载中...' : '暂无数据'"
- height="80vh"
- :header-cell-style="{
- backgroundColor: '#e9f7ff',
- color: 'black',
- fontWeight: '400',
- }"
- :cell-style="{
- color: 'black',
- }"
- >
- <el-table-column
- type="index"
- label="序号"
- width="80"
- fixed="left"
- align="center"
- />
- <el-table-column
- prop="requestName"
- label="请求标题"
- min-width="220"
- fixed="left"
- align="center"
- />
- <el-table-column
- prop="workflowBaseInfo.workflowTypeName"
- label="流程类型"
- width="140"
- align="center"
- />
- <el-table-column
- prop="requestLevel"
- label="紧急程度"
- width="100"
- align="center"
- />
- <el-table-column
- prop="status"
- label="路径状态"
- width="100"
- align="center"
- />
- <el-table-column
- prop="sysName"
- label="系统名称"
- width="140"
- align="center"
- />
- <el-table-column
- prop="createTime"
- label="创建时间"
- width="180"
- align="center"
- />
- <el-table-column
- prop="creatorName"
- label="创建人名称"
- width="120"
- align="center"
- />
- <el-table-column
- prop="currentNodeName"
- label="当前节点名称"
- width="140"
- align="center"
- />
- <el-table-column
- prop="lastOperateTime"
- label="最后操作时间"
- width="180"
- align="center"
- />
- <el-table-column
- prop="lastOperatorName"
- label="最后操作人名称"
- width="140"
- align="center"
- />
- <el-table-column
- prop="receiveTime"
- label="接收时间"
- width="180"
- align="center"
- />
- <el-table-column
- prop="workflowBaseInfo.workflowName"
- label="流程名称"
- min-width="200"
- align="center"
- />
- <el-table-column label="操作" width="120" fixed="right" align="center">
- <template #default="scope">
- <span
- class="text-[#02409b] cursor-pointer"
- @click="goBackPage(scope.row)"
- >处理</span
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- <Footer />
- </div>
- </template>
- <script setup>
- import Header from "@components/home/header.vue";
- import { ref, onMounted } from "vue";
- import { getOATasks, ssoLogin } from "@/api/user";
- import { useUserStore } from "@/stores/useUserStore";
- import { Icon } from "@iconify/vue";
- import router from "@/router";
- const userStore = useUserStore();
- const oaTasks = ref([]);
- const loading = ref(false);
- const goBackPage = async (row) => {
- const res = await ssoLogin({
- username: userStore.getUser.username,
- });
- if (res) {
- const newTab = window.open("", "_blank");
- newTab.location.href =
- "https://yfoa.keruioil.com/wui/index.html" +
- "?ssoToken=" +
- res +
- "#/main";
- setTimeout(function () {
- newTab.location.href = `https://yfoa.keruioil.com/spa/workflow/static4form/index.html?_rdm=1776063595284#/main/workflow/req?requestid=${row.requestId}`;
- }, 50);
- }
- };
- onMounted(async () => {
- if (userStore.getUser.username) {
- loading.value = true;
- try {
- const res = await getOATasks(userStore.getUser.username);
- oaTasks.value = res.todoList;
- } finally {
- loading.value = false;
- }
- }
- });
- </script>
- <style scoped>
- .todo-list {
- display: flex;
- flex-direction: column;
- min-height: 100%;
- }
- .content {
- padding: 16px 20px;
- margin-top: 100px;
- }
- </style>
|