1. 待办 2.工单记录

main
赵培友 3 years ago
parent b18c5279e0
commit cf1bd87e50
  1. 18
      src/api/plugin/workflow/workorder.js
  2. 2
      src/const/maintenance/system.js
  3. 95
      src/const/workflow/todo.js
  4. 17
      src/const/workflow/workorder.js
  5. 1
      src/views/journal/index.vue
  6. 1
      src/views/maintenance/database1.vue
  7. 1
      src/views/maintenance/system.vue
  8. 1
      src/views/maintenance/task.vue
  9. 9
      src/views/plugin/workflow/mixins/ex-form.js
  10. 11
      src/views/plugin/workflow/process/components/form.vue
  11. 469
      src/views/plugin/workflow/process/todo.vue
  12. 161
      src/views/plugin/workflow/process/workorder.vue
  13. 2
      src/views/wel/index.vue

@ -1,10 +1,26 @@
import request from '@/router/axios';
const prefix = '/api/blade-workflow/workOrder'
// 查询
// 工单记录查询
export const getList = (query) => {
return request({
url: `${prefix}/historyWorkOrder`,
method: 'get',
params:query
})
}
// 我的待办
export const todoList = (query) => {
return request({
url: `${prefix}/myToDo`,
method: 'get',
params:query
})
}
// 头部查询
export const conditionalData = (query) => {
return request({
url: `${prefix}/conditionalData`,
method: 'get',
params:query
})
}

@ -55,7 +55,7 @@ export const tableOption = {
overHidden: true,
dicData: [],
props: {
label: "fullName",
label: "deptName",
value: "id",
},
span: 8,

@ -1,14 +1,14 @@
export const tableOption = {
index: true,
indexLabel: "序号",
indexWidth: 120,
labelPosition: "top",
indexWidth:120,
selection: false,
border: false,
gutter: 60, //设置input的大小
headerAlign: "left",
align: "left",
menuAlign: "left",
menuHeaderAlign: "left",
menuAlign:'left',
menuHeaderAlign:'left',
menuBtn: true,
editBtn: false,
delBtn: false,
@ -17,50 +17,89 @@ export const tableOption = {
searchMenuSpan: 3, //控制搜索按钮
columnBtn: false,
refreshBtn: false,
// dialogCustomClass: "custom",
header: false,
dialogCustomClass: "custom",
menuWidth:120,
column: [
{
label: "流程名称",
prop: "processDefinitionName",
type: "input",
label: "任务父类",
prop: "taskParent",
align: "left",
overHidden: true,
},
{
label: "流程标识",
prop: "processDefinitionKey",
type: "input",
label: "任务种类",
prop: "taskType",
align: "left",
overHidden: true,
},
{
label: "流水号",
prop: "serialNumber",
bind: "variables.serialNumber",
type: "input",
label: "操作模块",
prop: "operationModule",
align: "left",
overHidden: true,
},
{
label: "流程分类",
row: true,
type: "tree",
dicUrl: "/api/blade-workflow/design/category/tree",
props: {
label: "name",
value: "id",
},
prop: "category",
type: "input",
label: "当前责任人",
prop: "currentResponsiblePerson",
align: "left",
overHidden: true,
},
{
type: "input",
label: "管理部门",
prop: "dept",
align: "left",
overHidden: true,
},
{
label: "当前节点",
prop: "taskName",
type: "input",
label: "运维公司",
prop: "currentResponsiblePerson",
align: "left",
overHidden: true,
},
{
label: "申请人",
prop: "startUsername",
type: "input",
label: "发起人",
prop: "sponsor",
align: "left",
overHidden: true,
},
{
label: "申请时间",
type: "input",
label: "审批状态",
prop: "approvalStatus",
align: "left",
overHidden: true,
},
{
label: "创建时间",
type: "datetime",
overHidden: true,
prop: "createTime",
format: "yyyy-MM-dd HH:mm",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
// {
// label: "结束时间",
// type: "datetime",
// overHidden: true,
// prop: "endTime",
// format: "yyyy-MM-dd HH:mm",
// valueFormat: "yyyy-MM-dd HH:mm:ss",
// },
{
label: "期望完成时间",
type: "datetime",
overHidden: true,
prop: "expectedCompletionTime",
format: "yyyy-MM-dd HH:mm",
width: 165,
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
],
};
}

@ -1,7 +1,8 @@
export const tableOption = {
index: true,
indexLabel: "序号",
indexWidth:120,
selection: true,
selection: false,
border: false,
gutter: 60, //设置input的大小
headerAlign: "left",
@ -22,22 +23,22 @@ export const tableOption = {
column: [
{
type: "input",
label: "任务类",
prop: "renwuzhonglei",
label: "任务类",
prop: "renwufulei",
align: "left",
overHidden: true,
},
{
type: "input",
label: "任务类",
prop: "$renwufulei",
label: "任务类",
prop: "$renwuzhonglei",
align: "left",
overHidden: true,
},
{
type: "input",
label: "操作模块",
prop: "$xitongmingchengshujuku",
prop: "xitongmingchengshujuku",
align: "left",
overHidden: true,
},
@ -50,7 +51,7 @@ export const tableOption = {
},
{
type: "input",
label: "管部门",
label: "管部门",
prop: "$guanlibumen",
align: "left",
overHidden: true,
@ -58,7 +59,7 @@ export const tableOption = {
{
type: "input",
label: "运维公司",
prop: "$yunweigongsi",
prop: "currentResponsiblePerson",
align: "left",
overHidden: true,
},

@ -199,6 +199,7 @@ export default {
color: #fff;
text-align: center;
line-height: 46px;
cursor: pointer;
}
/deep/ .el-input__inner {
height: 46px;

@ -245,6 +245,7 @@ export default {
color: #fff;
text-align: center;
line-height: 46px;
cursor: pointer;
}
/deep/ .el-input__inner {
height: 46px;

@ -294,6 +294,7 @@ export default {
color: #fff;
text-align: center;
line-height: 46px;
cursor: pointer;
}
/deep/ .el-input__inner {
height: 46px;

@ -298,6 +298,7 @@ export default {
color: #fff;
text-align: center;
line-height: 46px;
cursor: pointer;
}
/deep/ .el-input__inner {
height: 46px;

@ -41,6 +41,7 @@ export default {
methods: {
// 动态路由跳转
dynamicRoute(row, type, async = false, parent) {
console.log(row);
const {
id,
taskId,
@ -236,6 +237,14 @@ export default {
}
startProcess(form)
.then(() => {
// let item = 1;
// if (item === 1) {
// this.visible = true;
// done();
// this.loading = false;
// } else {
// }
if (isExForm === true) {
resolve(done);
} else {

@ -103,7 +103,7 @@
<el-table-column prop="createTime" label="上传时间" width="240">
</el-table-column>
<el-table-column label="操作">
<el-table-column label="操作">
<template slot-scope="scope">
<i
class="el-icon-delete"
@ -154,6 +154,14 @@
>
</el-row>
</avue-skeleton>
<el-dialog
:visible.sync="visible"
append-to-body
title="流程图展示"
width="70%"
custom-class="flow-design-dialog"
>
</el-dialog>
<!-- 人员选择弹窗 -->
<wf-user-select
@ -231,6 +239,7 @@ export default {
taskParentList: [], //
taskAndDataBaseList: [], //
// taskLevelList: [] //
visible: false,
};
},
mounted() {

@ -1,244 +1,281 @@
<template>
<basic-container class="wf-container">
<avue-crud :option="option"
:table-loading="loading"
:data="data"
:page.sync="page"
:search.sync="query"
:permission="permissionList"
v-model="form"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="onLoad(page, query)"
@on-load="onLoad">
<template slot="menu"
slot-scope="{row}">
<el-button v-if="permission.wf_process_todo_detail"
type="text"
size="small"
icon="el-icon-info"
@click="dynamicRoute(row, 'detail')">详情</el-button>
<el-button v-if="permission.wf_process_todo_follow"
type="text"
size="small"
icon="el-icon-search"
@click="handleFlow(row)">流程图</el-button>
</template>
<template #searchMenu
v-if="permission.wf_process_todo_search">
<el-badge :value="query.formSearch? query.formSearch.split(',').length: 0"
:hidden="!query.formSearch || query.formSearch.split(',').length == 0">
<el-button icon="el-icon-search"
@click="$refs['wf-search'].visible = true">表单</el-button>
</el-badge>
</template>
</avue-crud>
<div class="cus-container">
<el-form :model="searchForm">
<div class="search">
<div style="display: flex; align-item: center">
<el-select
v-model="searchForm.taskParent"
placeholder="任务父类"
class="search-select"
clearable
>
<el-option
v-for="item in taskParent"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictValue"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.taskType"
placeholder="任务种类"
class="search-select"
clearable
>
<el-option
v-for="item in taskInfos"
:key="item.taskTypeName"
:label="item.taskTypeName"
:value="item.taskTypeName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.currentResponsiblePerson"
placeholder="当前责任人"
class="search-select"
clearable
>
<el-option
v-for="item in users"
:key="item.realName"
:label="item.realName"
:value="item.realName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.dept"
placeholder="管理部门"
class="search-select"
clearable
>
<el-option
v-for="item in depts"
:key="item.deptName"
:label="item.deptName"
:value="item.deptName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.approvalStatus"
placeholder="审批状态"
class="search-select"
clearable
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.sponsor"
placeholder="发起人"
class="search-select"
clearable
>
<el-option
v-for="item in users"
:key="item.realName"
:label="item.realName"
:value="item.realName"
>
</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>
<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>
</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"
>
<template slot="menu" slot-scope="{ row }">
<el-button
v-if="permission.wf_process_todo_detail"
@click="dynamicRoute(row, 'detail')"
>详情</el-button
>
</template>
<el-dialog :visible.sync="bpmnVisible"
append-to-body
destroy-on-close
title="流程图"
width="70%"
custom-class="wf-dialog">
<wf-design ref="bpmn"
style="height: 60vh;"
:options="bpmnOption"></wf-design>
</el-dialog>
<wf-search ref="wf-search"
v-model="query.formSearch"></wf-search>
</basic-container>
<template slot-scope="scope" slot="approvalStatus">
<span
:style="{
color:
scope.row.approvalStatus == '审批中'
? '#FF9130'
: scope.row.approvalStatus == '进行中'
? '#4CA3FB'
: scope.row.approvalStatus == '已完成'
? '#2EE27C'
: '#ccc',
}"
>{{ scope.row.approvalStatus }}</span
>
</template>
</avue-crud>
</div>
</div>
</template>
<script>
import { todoList as getList, detail } from "@/api/plugin/workflow/process";
import {
todoList as getList,
conditionalData,
} from "@/api/plugin/workflow/workorder.js";
import { tableOption } from "@/const/workflow/todo.js";
import { mapGetters } from "vuex";
import exForm from '../mixins/ex-form'
import WfSearch from './components/search.vue'
import exForm from "../mixins/ex-form";
export default {
mixins: [exForm],
components: { WfSearch },
data() {
return {
form: {},
query: {},
loading: true,
searchForm: {},
conpanyList: [{ label: "运维公司", value: 1 }],
option: tableOption,
page: {
pageSize: 10,
currentPage: 1,
total: 0
current: 1,
total: 0,
size: 10,
},
selectionList: [],
option: {
size: 'mini',
height: 'auto',
calcHeight: 30,
tip: false,
border: true,
selection: true,
dialogType: 'drawer',
addBtn: false,
editBtn: false,
delBtn: false,
align: 'center',
searchMenuSpan: 6,
searchSize: 'mini',
searchIndex: 3,
searchIcon: true,
column: [
{
label: '流程名称',
prop: 'processDefinitionName',
search: true,
overHidden: true
},
{
label: '流程标识',
prop: 'processDefinitionKey',
search: true,
overHidden: true
},
{
label: '流水号',
prop: 'serialNumber',
bind: 'variables.serialNumber',
search: true,
overHidden: true
},
{
label: "流程分类",
row: true,
type: 'tree',
dicUrl: '/api/blade-workflow/design/category/tree',
props: {
label: 'name',
value: 'id'
},
prop: "category",
search: true,
},
{
label: '当前节点',
prop: 'taskName',
},
{
label: '申请人',
prop: 'startUsername',
search: true
},
{
label: '申请时间',
prop: 'createTime',
type: 'datetime',
format: 'yyyy-MM-dd HH:mm',
width: 165,
},
]
},
data: [],
bpmnVisible: false,
bpmnOption: {}
//
tableData: [],
loading: false,
taskParent: [],
taskInfos: [],
depts: [],
users: [],
statusList: [
{
label: "审批中",
value: "审批中",
},
{
label: "进行中",
value: "进行中",
},
{
label: "已完成",
value: "已完成",
},
],
};
},
created() {
this.dictBiz();
this.onLoad();
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.deployment_add, false),
viewBtn: this.vaildData(this.permission.deployment_view, false),
delBtn: this.vaildData(this.permission.deployment_delete, false),
editBtn: this.vaildData(this.permission.deployment_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
handleDetail(row) {
const param = {
taskId: row.taskId,
processInsId: row.processInstanceId
}
this.$router.push('/workflow/process/detail/' + Buffer.from(JSON.stringify(param)).toString('base64'))
},
handleFlow(row) {
const { taskId, processInstanceId } = row
detail({ taskId, processInsId: processInstanceId }).then(res => {
const { process, flow } = res.data.data
this.bpmnOption = {
mode: 'view',
xml: process.xml,
flows: this.handleResolveFlows(flow)
}
this.bpmnVisible = true
})
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
dictBiz() {
conditionalData().then((res) => {
const { taskParent, taskInfos, depts, users, taskLevel } = res.data.data;
this.taskParent = taskParent;
this.taskInfos = taskInfos;
this.depts = depts;
this.users = users;
this.taskLevel = taskLevel
});
},
selectionChange(list) {
this.selectionList = list;
//
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];
}
getList({ current, size,...this.searchForm }).then((res) => {
const { total, records } = res.data.data;
this.page.total = total;
this.tableData = records;
this.loading = false;
});
},
//
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.page.current = currentPage;
this.onLoad();
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.page.size = pageSize;
this.onLoad();
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
});
}
}
//
searchHandle(index) {
this.page.current = 1;
if (index === 2) {
this.searchForm = {
timeArr: null,
};
}
this.onLoad();
},
},
};
</script>
<style lang="scss">
.wf-container {
.el-collapse-item__content {
padding-top: 8px;
}
.el-badge__content.is-fixed {
right: 16px;
}
}
.wf-dialog {
<style lang="scss" scoped>
.search-line {
margin-top: 20px;
display: flex;
flex-direction: column;
margin: 0 !important;
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -40%);
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
.el-dialog__body {
flex: 1;
overflow: auto;
}
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: 0 20px;
}
.search-reset {
width: 46px;
height: 44px !important;
background: #ff9130;
color: #fff;
text-align: center;
line-height: 46px;
cursor: pointer;
}
/deep/ .el-input__inner {
height: 46px;
}
</style>

@ -4,77 +4,83 @@
<div class="search">
<div>
<el-select
v-model="searchForm.company"
v-model="searchForm.taskParent"
placeholder="任务父类"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in taskParent"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictValue"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.company"
v-model="searchForm.taskType"
placeholder="任务种类"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in taskInfos"
:key="item.taskTypeName"
:label="item.taskTypeName"
:value="item.taskTypeName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.company"
v-model="searchForm.currentResponsiblePerson"
placeholder="当前责任人"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in users"
:key="item.realName"
:label="item.realName"
:value="item.realName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.company"
v-model="searchForm.dept"
placeholder="管理部门"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in depts"
:key="item.deptName"
:label="item.deptName"
:value="item.deptName"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.company"
v-model="searchForm.level"
placeholder="任务级别"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in taskLevel"
:key="item.dictValue"
:label="item.dictValue"
:value="item.dictValue"
>
</el-option>
</el-select>
<el-select
v-model="searchForm.company"
v-model="searchForm.approvalStatus"
placeholder="审批状态"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
@ -82,15 +88,16 @@
</el-option>
</el-select>
<el-select
v-model="searchForm.company"
v-model="searchForm.sponsor"
placeholder="发起人"
class="search-select"
clearable
>
<el-option
v-for="item in conpanyList"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in users"
:key="item.realName"
:label="item.realName"
:value="item.realName"
>
</el-option>
</el-select>
@ -110,7 +117,7 @@
<div style="display: flex">
<el-date-picker
style="width: 314px; margin-right: 20px"
v-model="searchForm.timeArr"
v-model="searchForm.timeArr2"
format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm:ss"
class="search-picker"
@ -147,17 +154,29 @@
@size-change="sizeChange"
>
<template slot-scope="scope" slot="menu">
<el-button @click="detailsHandle(scope.row)">查看详情 </el-button>
<el-button @click="detailsHandle(scope.row)">详情 </el-button>
</template>
<!-- <template slot-scope="scope" slot="status">
</template> -->
</avue-crud>
<template slot-scope="scope" slot="status">
<span
:style="{
color:
scope.row.status == '审批中'
? '#FF9130'
: scope.row.status == '进行中'
? '#4CA3FB'
: scope.row.status == '已完成'
? '#2EE27C'
: '#000',
}"
>{{ scope.row.status }}</span
>
</template>
</avue-crud>
</div>
</div>
</template>
<script>
import { getList } from "@/api/plugin/workflow/workorder.js"
import { getList, conditionalData } from "@/api/plugin/workflow/workorder.js";
import { tableOption } from "@/const/workflow/workorder.js";
export default {
data() {
@ -173,17 +192,62 @@ export default {
//
tableData: [],
loading: false,
taskParent: [],
taskInfos: [],
depts: [],
users: [],
taskLevel: [],
statusList: [
{
label: "审批中",
value: "审批中",
},
{
label: "进行中",
value: "进行中",
},
{
label: "已完成",
value: "已完成",
},
]
};
},
created() {
this.dictBiz();
this.onLoad();
},
methods: {
dictBiz() {
conditionalData().then((res) => {
const { taskParent, taskInfos, depts, users, taskLevel } = res.data.data;
this.taskParent = taskParent;
this.taskInfos = taskInfos;
this.depts = depts;
this.users = users;
this.taskLevel = taskLevel
});
},
//
onLoad() {
this.loading = true;
const { current, size } = this.page;
getList({ current, size }).then((res) => {
if (
this.searchForm.timeArr !== null &&
this.searchForm.timeArr !== undefined
) {
this.searchForm.startTime = this.searchForm.timeArr[0];
this.searchForm.endTime = this.searchForm.timeArr[1];
}
if (
this.searchForm.timeArr2 !== null &&
this.searchForm.timeArr2 !== undefined
) {
this.searchForm.startTime2 = this.searchForm.timeArr2[0];
this.searchForm.endTime2 = this.searchForm.timeArr2[1];
}
getList({ current, size,...this.searchForm }).then((res) => {
const { total, records } = res.data.data;
this.page.total = total;
this.tableData = records;
@ -201,10 +265,12 @@ export default {
},
//
searchHandle(index) {
if (index === 1) {
//
} else {
//
this.page.current = 1;
if (index === 2) {
this.searchForm = {
timeArr: null,
timeArr2: null,
};
}
this.onLoad();
},
@ -215,9 +281,9 @@ export default {
</script>
<style lang="scss" scoped>
.search-line {
margin-top: 20px;
display: flex;
justify-content: space-between;
margin-top: 20px;
display: flex;
justify-content: space-between;
}
.search-select {
width: 150px;
@ -240,6 +306,7 @@ export default {
color: #fff;
text-align: center;
line-height: 46px;
cursor: pointer;
}
/deep/ .el-input__inner {
height: 46px;

@ -270,7 +270,7 @@ export default {
var myChart = this.$echarts.init(document.getElementById("pieItemTwo"));
//
var option = {
color: ["#FF9130", "#4CA3FB", "#2EE27C"],
color: ["#FF9130", "#2EE27C", "#4CA3FB"],
title: {
text: "按照完成状态统计",
textStyle: {

Loading…
Cancel
Save