parent
72818d64d3
commit
81e49a0cd6
16 changed files with 1140 additions and 475 deletions
@ -0,0 +1,16 @@ |
||||
import request from '@/router/axios'; |
||||
const prefix = '/api/blade-workflow/homePage' |
||||
// 查询
|
||||
export const getAboutMy = () => { |
||||
return request({ |
||||
url: `${prefix}/aboutMy`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
// 折线图
|
||||
export const getFlowListMonth = () => { |
||||
return request({ |
||||
url: `${prefix}/flowListMonth`, |
||||
method: 'get', |
||||
}) |
||||
} |
||||
@ -0,0 +1,64 @@ |
||||
export const tableOption = { |
||||
index: true, |
||||
indexLabel: "序号", |
||||
indexWidth:120, |
||||
labelPosition: "top", |
||||
selection: false, |
||||
border: false, |
||||
headerAlign: "left", |
||||
align: "left", |
||||
menuAlign:'left', |
||||
menuHeaderAlign:'left', |
||||
menuBtn: true, |
||||
editBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
tip: false, |
||||
searchMenuSpan: 3, //控制搜索按钮
|
||||
columnBtn: false, |
||||
refreshBtn: false, |
||||
header: false, |
||||
dialogCustomClass:"custom", |
||||
menu: false, |
||||
column: [ |
||||
|
||||
{ |
||||
type: "input", |
||||
label: "用户", |
||||
prop: "createBy", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "操作模块", |
||||
prop: "aa", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
label: "操作时间", |
||||
type: "datetime", |
||||
overHidden: true, |
||||
prop: "createTime", |
||||
format: "yyyy-MM-dd HH:mm", |
||||
valueFormat: "yyyy-MM-dd HH:mm:ss", |
||||
addDisplay:false, |
||||
editDisplay: false |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "IP地址", |
||||
prop: "remoteIp", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
type: "input", |
||||
label: "操作详情", |
||||
prop: "title", |
||||
align: "left", |
||||
overHidden: true, |
||||
}, |
||||
], |
||||
} |
||||
@ -0,0 +1,66 @@ |
||||
export const tableOption = { |
||||
index: true, |
||||
indexLabel: "序号", |
||||
indexWidth: 120, |
||||
labelPosition: "top", |
||||
selection: false, |
||||
border: false, |
||||
headerAlign: "left", |
||||
align: "left", |
||||
menuAlign: "left", |
||||
menuHeaderAlign: "left", |
||||
menuBtn: true, |
||||
editBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
tip: false, |
||||
searchMenuSpan: 3, //控制搜索按钮
|
||||
columnBtn: false, |
||||
refreshBtn: false, |
||||
header: false, |
||||
dialogCustomClass: "custom", |
||||
column: [ |
||||
{ |
||||
label: "流程名称", |
||||
prop: "processDefinitionName", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
label: "流程标识", |
||||
prop: "processDefinitionKey", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
label: "流水号", |
||||
prop: "serialNumber", |
||||
bind: "variables.serialNumber", |
||||
overHidden: true, |
||||
}, |
||||
{ |
||||
label: "流程分类", |
||||
row: true, |
||||
type: "tree", |
||||
dicUrl: "/api/blade-workflow/design/category/tree", |
||||
props: { |
||||
label: "name", |
||||
value: "id", |
||||
}, |
||||
prop: "category", |
||||
}, |
||||
{ |
||||
label: "当前节点", |
||||
prop: "taskName", |
||||
}, |
||||
{ |
||||
label: "申请人", |
||||
prop: "startUsername", |
||||
}, |
||||
{ |
||||
label: "申请时间", |
||||
prop: "createTime", |
||||
type: "datetime", |
||||
format: "yyyy-MM-dd HH:mm", |
||||
width: 165, |
||||
}, |
||||
], |
||||
}; |
||||
@ -0,0 +1,210 @@ |
||||
<template> |
||||
<div class="cus-container"> |
||||
<el-form :model="searchForm"> |
||||
<div class="search"> |
||||
<div style="display: flex; align-items: center"> |
||||
<el-select |
||||
v-model="searchForm.taskParentId" |
||||
placeholder="任务父类" |
||||
class="search-select" |
||||
> |
||||
<el-option |
||||
v-for="item in parentList" |
||||
:key="item.id" |
||||
:label="item.dictValue" |
||||
:value="item.id" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select |
||||
v-model="searchForm.taskTypeName" |
||||
placeholder="任务种类" |
||||
class="search-select" |
||||
> |
||||
<el-option |
||||
v-for="item in taskTypeList" |
||||
:key="item.taskTypeName" |
||||
:label="item.taskTypeName" |
||||
:value="item.taskTypeName" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select |
||||
v-model="searchForm.taskLevel" |
||||
placeholder="任务等级" |
||||
class="search-select" |
||||
> |
||||
<el-option |
||||
v-for="item in levelList" |
||||
:key="item.id" |
||||
:label="item.dictValue" |
||||
:value="item.id" |
||||
> |
||||
</el-option> |
||||
</el-select> |
||||
<el-date-picker |
||||
style="width: 314px; margin-right: 20px" |
||||
v-model="searchForm.timeArr" |
||||
format="yyyy-MM-dd HH:mm" |
||||
value-format="yyyy-MM-dd HH:mm:ss" |
||||
class="search-picker" |
||||
type="datetimerange" |
||||
range-separator="至" |
||||
start-placeholder="开始日期" |
||||
end-placeholder="结束日期" |
||||
></el-date-picker> |
||||
<div style="display: flex"> |
||||
<el-button class="search-btn" @click="searchHandle(1)" |
||||
>查询</el-button |
||||
> |
||||
<div class="search-reset" @click="searchHandle(2)"> |
||||
<i class="el-icon-refresh-right" style="font-size: 20px"></i> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</el-form> |
||||
<div style="margin-top: 30px"> |
||||
<avue-crud |
||||
id="avue-id" |
||||
ref="crud" |
||||
:option="option" |
||||
:data="tableData" |
||||
:page.sync="page" |
||||
:table-loading="loading" |
||||
@current-change="currentChange" |
||||
@size-change="sizeChange" |
||||
> |
||||
</avue-crud> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import { getList } from "@/api/logs"; |
||||
import { tableOption } from "@/const/journal/journal.js"; |
||||
export default { |
||||
data() { |
||||
return { |
||||
searchForm: { |
||||
timeArr: null, |
||||
}, |
||||
option: tableOption, |
||||
page: { |
||||
current: 1, |
||||
total: 0, |
||||
size: 10, |
||||
}, |
||||
// 表格数据 |
||||
tableData: [], |
||||
loading: false, |
||||
parentList: [], |
||||
levelList: [], |
||||
}; |
||||
}, |
||||
created() { |
||||
// this.getDict(); |
||||
this.onLoad(); |
||||
}, |
||||
methods: { |
||||
// 字典请求 |
||||
// getDict() { |
||||
// getTaskParent().then((res) => { |
||||
// this.parentList = res.data.data; |
||||
// const column = this.findObject(this.option.column, "taskParentId"); |
||||
// column.dicData = res.data.data; |
||||
// }); |
||||
// getTaskLevel().then((res) => { |
||||
// this.levelList = res.data.data; |
||||
// const column = this.findObject(this.option.column, "taskLevel"); |
||||
// column.dicData = res.data.data; |
||||
// }); |
||||
// getTaskTypeData().then((res) => { |
||||
// this.taskTypeList = res.data.data; |
||||
// }); |
||||
// }, |
||||
// 列表 |
||||
onLoad() { |
||||
this.loading = true; |
||||
const { current, size } = this.page; |
||||
if ( |
||||
this.searchForm.timeArr !== null && |
||||
this.searchForm.timeArr !== undefined |
||||
) { |
||||
this.searchForm.startTime = this.searchForm.timeArr[0]; |
||||
this.searchForm.endTime = this.searchForm.timeArr[1]; |
||||
} |
||||
const { |
||||
taskParentId, |
||||
taskTypeName, |
||||
taskLevel, |
||||
startTime, |
||||
endTime, |
||||
} = this.searchForm; |
||||
let params = { |
||||
taskParentId, |
||||
taskTypeName, |
||||
taskLevel, |
||||
startTime, |
||||
endTime, |
||||
}; |
||||
getList({ current, size, ...params }).then((res) => { |
||||
const { total, records } = res.data.data; |
||||
this.page.total = total; |
||||
this.tableData = records; |
||||
this.loading = false; |
||||
}); |
||||
}, |
||||
// 分页 |
||||
currentChange(currentPage) { |
||||
this.page.current = currentPage; |
||||
this.onLoad(); |
||||
}, |
||||
sizeChange(pageSize) { |
||||
this.page.size = pageSize; |
||||
this.onLoad(); |
||||
}, |
||||
// 查询重置 |
||||
searchHandle(index) { |
||||
this.page.current = 1; |
||||
if (index === 2) { |
||||
this.searchForm = { |
||||
timeArr: null, |
||||
}; |
||||
} |
||||
this.onLoad(); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped> |
||||
.search { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
} |
||||
.search-select { |
||||
width: 150px; |
||||
margin-right: 20px; |
||||
} |
||||
.search-input { |
||||
width: 288px; |
||||
} |
||||
.search-btn { |
||||
width: 130px; |
||||
height: 46px !important; |
||||
background: #2e92f6; |
||||
color: #fff; |
||||
margin-left: 40px; |
||||
margin-right: 20px; |
||||
} |
||||
.search-reset { |
||||
width: 46px; |
||||
height: 44px !important; |
||||
background: #ff9130; |
||||
color: #fff; |
||||
text-align: center; |
||||
line-height: 46px; |
||||
} |
||||
/deep/ .el-input__inner { |
||||
height: 46px; |
||||
} |
||||
</style> |
||||
Loading…
Reference in new issue