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. 159
      src/views/plugin/workflow/process/workorder.vue
  13. 2
      src/views/wel/index.vue

@ -1,6 +1,6 @@
import request from '@/router/axios'; import request from '@/router/axios';
const prefix = '/api/blade-workflow/workOrder' const prefix = '/api/blade-workflow/workOrder'
// 查询 // 工单记录查询
export const getList = (query) => { export const getList = (query) => {
return request({ return request({
url: `${prefix}/historyWorkOrder`, url: `${prefix}/historyWorkOrder`,
@ -8,3 +8,19 @@ export const getList = (query) => {
params:query 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, overHidden: true,
dicData: [], dicData: [],
props: { props: {
label: "fullName", label: "deptName",
value: "id", value: "id",
}, },
span: 8, span: 8,

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

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

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

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

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

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

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

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

@ -1,244 +1,281 @@
<template> <template>
<basic-container class="wf-container"> <div class="cus-container">
<avue-crud :option="option" <el-form :model="searchForm">
:table-loading="loading" <div class="search">
:data="data" <div style="display: flex; align-item: center">
:page.sync="page" <el-select
:search.sync="query" v-model="searchForm.taskParent"
:permission="permissionList" placeholder="任务父类"
v-model="form" class="search-select"
@search-change="searchChange" clearable
@search-reset="searchReset" >
@selection-change="selectionChange" <el-option
@current-change="currentChange" v-for="item in taskParent"
@size-change="sizeChange" :key="item.dictValue"
@refresh-change="onLoad(page, query)" :label="item.dictValue"
@on-load="onLoad"> :value="item.dictValue"
<template slot="menu" >
slot-scope="{row}"> </el-option>
<el-button v-if="permission.wf_process_todo_detail" </el-select>
type="text" <el-select
size="small" v-model="searchForm.taskType"
icon="el-icon-info" placeholder="任务种类"
@click="dynamicRoute(row, 'detail')">详情</el-button> class="search-select"
<el-button v-if="permission.wf_process_todo_follow" clearable
type="text" >
size="small" <el-option
icon="el-icon-search" v-for="item in taskInfos"
@click="handleFlow(row)">流程图</el-button> :key="item.taskTypeName"
</template> :label="item.taskTypeName"
<template #searchMenu :value="item.taskTypeName"
v-if="permission.wf_process_todo_search"> >
<el-badge :value="query.formSearch? query.formSearch.split(',').length: 0" </el-option>
:hidden="!query.formSearch || query.formSearch.split(',').length == 0"> </el-select>
<el-button icon="el-icon-search" <el-select
@click="$refs['wf-search'].visible = true">表单</el-button> v-model="searchForm.currentResponsiblePerson"
</el-badge> placeholder="当前责任人"
</template> class="search-select"
</avue-crud> 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" <template slot-scope="scope" slot="approvalStatus">
append-to-body <span
destroy-on-close :style="{
title="流程图" color:
width="70%" scope.row.approvalStatus == '审批中'
custom-class="wf-dialog"> ? '#FF9130'
<wf-design ref="bpmn" : scope.row.approvalStatus == '进行中'
style="height: 60vh;" ? '#4CA3FB'
:options="bpmnOption"></wf-design> : scope.row.approvalStatus == '已完成'
</el-dialog> ? '#2EE27C'
<wf-search ref="wf-search" : '#ccc',
v-model="query.formSearch"></wf-search> }"
</basic-container> >{{ scope.row.approvalStatus }}</span
>
</template>
</avue-crud>
</div>
</div>
</template> </template>
<script> <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 { mapGetters } from "vuex";
import exForm from "../mixins/ex-form";
import exForm from '../mixins/ex-form'
import WfSearch from './components/search.vue'
export default { export default {
mixins: [exForm], mixins: [exForm],
components: { WfSearch },
data() { data() {
return { return {
form: {}, searchForm: {},
query: {}, conpanyList: [{ label: "运维公司", value: 1 }],
loading: true, option: tableOption,
page: { page: {
pageSize: 10, current: 1,
currentPage: 1, total: 0,
total: 0 size: 10,
}, },
selectionList: [], //
option: { tableData: [],
size: 'mini', loading: false,
height: 'auto', taskParent: [],
calcHeight: 30, taskInfos: [],
tip: false, depts: [],
border: true, users: [],
selection: true, statusList: [
dialogType: 'drawer', {
addBtn: false, label: "审批中",
editBtn: false, value: "审批中",
delBtn: false, },
align: 'center', {
searchMenuSpan: 6, label: "进行中",
searchSize: 'mini', value: "进行中",
searchIndex: 3, },
searchIcon: true, {
column: [ label: "已完成",
{ value: "已完成",
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: {}
}; };
}, },
created() {
this.dictBiz();
this.onLoad();
},
computed: { computed: {
...mapGetters(["permission"]), ...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: { methods: {
handleDetail(row) { dictBiz() {
const param = { conditionalData().then((res) => {
taskId: row.taskId, const { taskParent, taskInfos, depts, users, taskLevel } = res.data.data;
processInsId: row.processInstanceId this.taskParent = taskParent;
} this.taskInfos = taskInfos;
this.$router.push('/workflow/process/detail/' + Buffer.from(JSON.stringify(param)).toString('base64')) this.depts = depts;
}, this.users = users;
handleFlow(row) { this.taskLevel = taskLevel
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();
}, },
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) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.current = currentPage;
this.onLoad();
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.size = pageSize;
this.onLoad();
}, },
onLoad(page, params = {}) { //
this.loading = true; searchHandle(index) {
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { this.page.current = 1;
const data = res.data.data; if (index === 2) {
this.page.total = data.total; this.searchForm = {
this.data = data.records; timeArr: null,
this.loading = false; };
}); }
} this.onLoad();
} },
},
}; };
</script> </script>
<style lang="scss" scoped>
<style lang="scss"> .search-line {
.wf-container { margin-top: 20px;
.el-collapse-item__content {
padding-top: 8px;
}
.el-badge__content.is-fixed {
right: 16px;
}
}
.wf-dialog {
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
margin: 0 !important; }
position: absolute; .search-select {
top: 40%; width: 150px;
left: 50%; margin-right: 20px;
transform: translate(-50%, -40%); }
max-height: calc(100% - 30px); .search-input {
max-width: calc(100% - 30px); width: 288px;
.el-dialog__body { }
flex: 1; .search-btn {
overflow: auto; 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> </style>

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

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

Loading…
Cancel
Save