<template>
|
<div class="home-container">
|
<el-scrollbar height="100%">
|
<el-row>
|
<el-col :span="12">
|
<div class="grid-content topInfo">
|
<div>流程名称</div>
|
<el-input v-model="searchWord" placeholder="请输入关键词"></el-input>
|
<el-button type="primary">查询</el-button>
|
<el-button plain>重置</el-button>
|
</div>
|
</el-col>
|
</el-row>
|
<div class="mainPages">
|
<div class="main-card">
|
<el-row class="cardTop">
|
<el-col :span="12" class="mainCardBtn">
|
<el-button type="primary" :icon="Plus" size="default">新建</el-button>
|
<el-button type="danger" :icon="Delete" size="default">删除</el-button>
|
<el-button type="success" size="default">设置分类</el-button>
|
</el-col>
|
<el-button type="primary" :icon="Refresh" />
|
</el-row>
|
<el-table
|
ref="multipleTableRef"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="{background: '#fafafa'}"
|
@selection-change="handleSelectionChange"
|
>
|
<el-table-column type="selection" width="55" />
|
<el-table-column property="name" label="流程名称" width="200" />
|
<el-table-column property="flowKey" label="流程key" width="180" />
|
<el-table-column property="sort" label="分类"/>
|
<el-table-column label="版本" width="180">
|
<template #default="scope">
|
<el-tag>{{ scope.row.version }}</el-tag>
|
</template>
|
</el-table-column>
|
<el-table-column label="流程状态" width="180">
|
<template #default="scope">
|
<el-tag type="success">{{ scope.row.status }}</el-tag>
|
</template>
|
</el-table-column>
|
<el-table-column property="updateTime" label="更新时间"/>
|
<el-table-column fixed="right" label="操作" width="180">
|
<template #default>
|
<el-button link type="primary" size="small">修改</el-button>
|
<el-button link type="success" size="small">发布</el-button>
|
<el-button link type="danger" size="small">删除</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<div class="pageBtn">
|
<el-pagination
|
v-model:currentPage="currentPage"
|
v-model:page-size="pageSize"
|
:page-sizes="[10, 15]"
|
small=false
|
background
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="100"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</div>
|
</div>
|
</el-scrollbar>
|
</div>
|
</template>
|
|
<script lang="ts">
|
import { toRefs, reactive, defineComponent, ref } from 'vue';
|
import { storeToRefs } from 'pinia';
|
import { initBackEndControlRoutes } from '/@/router/backEnd';
|
import {useUserInfo} from "/@/stores/userInfo";
|
import { Session } from '/@/utils/storage';
|
import { Plus, Delete, Refresh } from '@element-plus/icons-vue'
|
import { ElTable } from 'element-plus'
|
let global: any = {
|
homeChartOne: null,
|
homeChartTwo: null,
|
homeCharThree: null,
|
dispose: [null, '', undefined],
|
};
|
|
interface stateType {
|
homeOne: Array <type>
|
}
|
interface type {
|
|
}
|
interface User {
|
date: string
|
name: string
|
address: string
|
}
|
export default defineComponent({
|
name: 'reportTypeSetting',
|
setup() {
|
const userInfo = useUserInfo()
|
const { userInfos } = storeToRefs(userInfo);
|
const state = reactive<stateType>({});
|
const multipleTableRef = ref<InstanceType<typeof ElTable>>()
|
const multipleSelection = ref<User[]>([])
|
const handleSelectionChange = (val: User[]) => {
|
multipleSelection.value = val
|
}
|
const currentPage = ref(1)
|
const pageSize = ref(10)
|
const handleSizeChange = (val: number) => {
|
console.log(`${val} items per page`)
|
}
|
const handleCurrentChange = (val: number) => {
|
console.log(`current page: ${val}`)
|
}
|
const tableData: User[] = [
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
},
|
{
|
name: '风险点复评预警',
|
flowKey: 'process111',
|
sort: '未设置',
|
version: 'V:4',
|
status: '已发布',
|
updateTime: '2021-04-22 15:21:31'
|
}
|
]
|
// 折线图
|
const renderMenu = async (value: string) => {
|
Session.set('projectId',value)
|
userInfos.value.projectId = value
|
await initBackEndControlRoutes();
|
};
|
return {
|
renderMenu,
|
multipleTableRef,
|
tableData,
|
currentPage,
|
pageSize,
|
handleSizeChange,
|
handleCurrentChange,
|
Plus,
|
Delete,
|
handleSelectionChange,
|
Refresh,
|
...toRefs(state),
|
};
|
},
|
});
|
</script>
|
|
<style scoped lang="scss">
|
$homeNavLengh: 8;
|
.home-container {
|
height: 100%;
|
overflow: hidden;
|
padding: 40px;
|
.el-row{
|
display: flex;
|
align-items: center;
|
margin-bottom: 20px;
|
&:last-child {
|
margin-bottom: 0;
|
}
|
.el-col{
|
display: flex;
|
align-items: center;
|
margin: 20px 0;
|
}
|
.grid-content{
|
align-items: center;
|
min-height: 36px;
|
}
|
|
.topInfo {
|
display: flex;
|
align-items: center;
|
font-size: 16px;
|
font-weight: bold;
|
|
&>div{
|
white-space: nowrap;
|
margin-right: 20px;
|
}
|
}
|
}
|
.mainPages{
|
height: 100%;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
}
|
.main-card{
|
width: 100%;
|
padding: 20px;
|
background: #fff;
|
.cardTop{
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.mainCardBtn{
|
margin: 0;
|
}
|
}
|
}
|
.pageBtn{
|
display: flex;
|
align-items: center;
|
justify-content: right;
|
margin-top: 20px;
|
|
.demo-pagination-block + .demo-pagination-block {
|
margin-top: 10px;
|
}
|
.demo-pagination-block .demonstration {
|
margin-bottom: 16px;
|
}
|
}
|
}
|
</style>
|