提交代码
parent
47aed608a6
commit
3d10e5c4a8
|
@ -25,6 +25,12 @@ public class SysUser extends BaseEntity
|
|||
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
||||
private Long userId;
|
||||
|
||||
/** 项目单位ID */
|
||||
private Long parDeptId;
|
||||
|
||||
/** 项目单位名称 */
|
||||
private String parDeptName;
|
||||
|
||||
/** 部门ID */
|
||||
@Excel(name = "部门编号", type = Type.IMPORT)
|
||||
private Long deptId;
|
||||
|
@ -297,6 +303,22 @@ public class SysUser extends BaseEntity
|
|||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getParDeptId() {
|
||||
return parDeptId;
|
||||
}
|
||||
|
||||
public void setParDeptId(Long parDeptId) {
|
||||
this.parDeptId = parDeptId;
|
||||
}
|
||||
|
||||
public String getParDeptName() {
|
||||
return parDeptName;
|
||||
}
|
||||
|
||||
public void setParDeptName(String parDeptName) {
|
||||
this.parDeptName = parDeptName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -142,4 +142,5 @@ public class FlowBusinessKeyController extends BaseController {
|
|||
return success(data);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package com.yanzhu.framework.web.service;
|
||||
|
||||
import com.yanzhu.common.core.domain.entity.SysDept;
|
||||
import com.yanzhu.common.core.text.Convert;
|
||||
import com.yanzhu.system.service.ISysDeptService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -27,7 +30,10 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
|||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private SysPasswordService passwordService;
|
||||
|
||||
|
@ -54,8 +60,14 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
|||
throw new ServiceException(MessageUtils.message("user.blocked"));
|
||||
}
|
||||
|
||||
//设置项目单位信息
|
||||
Long deptId = Convert.toLong(user.getDept().getAncestors().split(",")[2]);
|
||||
if(deptId != null){
|
||||
SysDept sysDept = sysDeptService.selectDeptById(deptId);
|
||||
user.setParDeptId(sysDept.getDeptId());
|
||||
user.setParDeptName(sysDept.getDeptName());
|
||||
}
|
||||
passwordService.validate(user);
|
||||
|
||||
return createLoginUser(user);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@ package com.yanzhu.project.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.yanzhu.common.core.domain.entity.SysUser;
|
||||
import com.yanzhu.common.core.text.Convert;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -101,4 +104,19 @@ public class ProProjectInfoController extends BaseController
|
|||
{
|
||||
return toAjax(proProjectInfoService.deleteProProjectInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/findMyDeptProject")
|
||||
public AjaxResult findMyDeptProject()
|
||||
{
|
||||
ProProjectInfo proProjectInfo = new ProProjectInfo();
|
||||
//超管查询所有数据
|
||||
if(!SysUser.isAdmin(super.getUserId())){
|
||||
proProjectInfo.setDeptId(Convert.toLong(super.getLoginUser().getUser().getDept().getAncestors().split(",")[2]));
|
||||
}
|
||||
List<ProProjectInfo> list = proProjectInfoService.selectProProjectInfoList(proProjectInfo);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectInfoById" parameterType="Long" resultMap="ProProjectInfoResult">
|
||||
|
|
|
@ -27,15 +27,6 @@ export function findCommentByProcInsId(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 根据业务流程查询表单数据
|
||||
export function findFormDatasByProcInsId(query) {
|
||||
return request({
|
||||
url: '/flowable/businessKey/findFormDatasByProcInsId',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据条件查询我的代办任务
|
||||
export function myAwaitFlowTaskList(query) {
|
||||
return request({
|
||||
|
|
|
@ -42,3 +42,11 @@ export function delProjectInfo(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 我的部门项目
|
||||
export function findMyDeptProject() {
|
||||
return request({
|
||||
url: '/project/projectInfo/findMyDeptProject',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import './assets/icons' // icon
|
|||
import './permission' // permission control
|
||||
import { getDicts } from "@/api/system/dict/data";
|
||||
import { getConfigKey } from "@/api/system/config";
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/yanZhu";
|
||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, getDurationDate } from "@/utils/yanZhu";
|
||||
// 分页组件
|
||||
import Pagination from "@/components/Pagination";
|
||||
// 自定义表格工具组件
|
||||
|
@ -53,6 +53,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
|
|||
Vue.prototype.selectDictLabels = selectDictLabels
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
Vue.prototype.getDurationDate = getDurationDate
|
||||
|
||||
// 全局组件挂载
|
||||
Vue.component('DictTag', DictTag)
|
||||
|
|
|
@ -9,6 +9,9 @@ const getters = {
|
|||
avatar: state => state.user.avatar,
|
||||
userId: state => state.user.id,
|
||||
name: state => state.user.name,
|
||||
nickname: state => state.user.nickname,
|
||||
dept:state=>state.user.dept,
|
||||
parDeptName:state=>state.user.parDeptName,
|
||||
introduction: state => state.user.introduction,
|
||||
roles: state => state.user.roles,
|
||||
permissions: state => state.user.permissions,
|
||||
|
|
|
@ -7,6 +7,7 @@ import tagsView from './modules/tagsView'
|
|||
import permission from './modules/permission'
|
||||
import settings from './modules/settings'
|
||||
import getters from './getters'
|
||||
import flowtask from './modules/flowtask'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
|
@ -17,7 +18,8 @@ const store = new Vuex.Store({
|
|||
user,
|
||||
tagsView,
|
||||
permission,
|
||||
settings
|
||||
settings,
|
||||
flowtask
|
||||
},
|
||||
getters
|
||||
})
|
||||
|
|
|
@ -6,7 +6,10 @@ const user = {
|
|||
token: getToken(),
|
||||
id: '',
|
||||
name: '',
|
||||
nickname: '',
|
||||
avatar: '',
|
||||
dept: null,
|
||||
parDeptName: null,
|
||||
roles: [],
|
||||
permissions: []
|
||||
},
|
||||
|
@ -21,9 +24,18 @@ const user = {
|
|||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
},
|
||||
SET_NICKNAME: (state, nickname) => {
|
||||
state.nickname = nickname
|
||||
},
|
||||
SET_AVATAR: (state, avatar) => {
|
||||
state.avatar = avatar
|
||||
},
|
||||
SET_DEPT: (state, dept) => {
|
||||
state.dept = dept
|
||||
},
|
||||
SET_PAR_DEPT_NAME: (state, parDeptName) => {
|
||||
state.parDeptName = parDeptName
|
||||
},
|
||||
SET_ROLES: (state, roles) => {
|
||||
state.roles = roles
|
||||
},
|
||||
|
@ -64,6 +76,9 @@ const user = {
|
|||
}
|
||||
commit('SET_ID', user.userId)
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_NICKNAME', user.nickName)
|
||||
commit('SET_PAR_DEPT_NAME', user.parDeptName)
|
||||
commit("SET_DEPT",user.dept);
|
||||
commit('SET_AVATAR', avatar)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
|
|
|
@ -231,3 +231,38 @@ export function tansParams(params) {
|
|||
export function blobValidate(data) {
|
||||
return data.type !== 'application/json'
|
||||
}
|
||||
|
||||
export function getDurationDate(date) {
|
||||
let day=0;
|
||||
let hours=0;
|
||||
let min = date;
|
||||
if(min>1440){
|
||||
day = parseInt(min/1440);
|
||||
min = min % 1440;
|
||||
if(min>60){
|
||||
hours = parseInt(min/60);
|
||||
min = min % 60;
|
||||
}
|
||||
}else if(min>60){
|
||||
hours = parseInt(min/60);
|
||||
min = min % 60;
|
||||
}
|
||||
if(day>0){
|
||||
if(day<10) day="0"+day;
|
||||
if(hours<10) hours="0"+hours;
|
||||
if(min<10) min="0"+min;
|
||||
return day+"天"+hours+"小时"+min+"分钟";
|
||||
}
|
||||
if(hours>0){
|
||||
if(hours<10) hours="0"+hours;
|
||||
if(min<10) min="0"+min;
|
||||
return hours+"小时"+min+"分钟";
|
||||
}
|
||||
if(min>0){
|
||||
if(min<10) min="0"+min;
|
||||
return min+"分钟";
|
||||
}
|
||||
if(min==0){
|
||||
return "1分钟";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<template slot-scope="scope">
|
||||
<!-- @click="handleForm(scope.row.formId)" -->
|
||||
<el-tag type="info" v-if="scope.row.deptId">{{ scope.row.deptName }}</el-tag>
|
||||
<el-tag>缺省工作流</el-tag>
|
||||
<el-tag>默认工作流</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程版本" align="center">
|
||||
|
|
|
@ -5,96 +5,171 @@
|
|||
:visible.sync="onOpen"
|
||||
ref="drawer"
|
||||
direction="rtl"
|
||||
size="80%"
|
||||
size="70%"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】<span v-if="showjd"> - 当前节点【{{options.taskName}}】</span></div>
|
||||
<div>
|
||||
流程详情 【{{ title }}】 - 当前进度【{{ jdtitle }}】<span v-if="showjd">
|
||||
- 当前节点【{{ options.taskName }}】</span
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<div class="drawer">
|
||||
<div class="drawerLeft">
|
||||
<div class="block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(item,index ) in flowRecordList"
|
||||
:key="index"
|
||||
:icon="setIcon(item)"
|
||||
:color="setColor(item)"
|
||||
>
|
||||
<p style="font-weight: 700"> {{ getSort(index) }}{{item.taskName}}{{item.commentResult}}</p>
|
||||
<el-card :body-style="{ padding: '6px' }">
|
||||
<el-descriptions class="margin-top" :column="1" size="small" border>
|
||||
<el-descriptions-item v-if="item.assigneeName" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-user"></i>办理人</template>
|
||||
{{item.assigneeName}}
|
||||
<el-tag type="info" size="mini">{{item.deptName}}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="item.candidate" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
|
||||
{{item.candidate}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="item.deleteReason" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
|
||||
{{getDeleteReason(item.deleteReason)}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
|
||||
{{item.startTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="item.endTime" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
|
||||
{{item.endTime}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="item.duration" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
|
||||
{{getDurationDate(item.duration)}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item v-if="item.message" label-class-name="my-label" :labelStyle="labelStyle">
|
||||
<template slot="label"><i class="el-icon-tickets"></i>处理意见</template>
|
||||
{{item.message}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
<div class="drawerRight">
|
||||
<el-form
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="所属项目">
|
||||
{{ initData.projectName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发起单位">
|
||||
{{ options.startDeptName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人">
|
||||
{{ options.startUserName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批事项">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容">
|
||||
<div v-for="(file,index ) in initData.files" :key="index">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-paperclip"
|
||||
@click="handledownload(file)"
|
||||
>{{file.substring(file.lastIndexOf('/')+1)}}</el-button
|
||||
>
|
||||
<div class="drawerLeft">
|
||||
<div class="block containers">
|
||||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请说明">
|
||||
{{initData.remark}}
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
<el-button type="danger" @click="doCanel">关 闭</el-button>
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="(item, index) in flowRecordList"
|
||||
:key="index"
|
||||
:icon="setIcon(item)"
|
||||
:color="setColor(item)"
|
||||
>
|
||||
<p style="font-weight: 700">
|
||||
{{ getSort(index) }}{{ item.taskName }}{{ item.commentResult }}
|
||||
</p>
|
||||
<el-card :body-style="{ padding: '6px' }">
|
||||
<el-descriptions class="margin-top" :column="1" size="small" border>
|
||||
<el-descriptions-item
|
||||
v-if="item.assigneeName"
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"><i class="el-icon-user"></i>办理人</template>
|
||||
{{ item.assigneeName }}
|
||||
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.candidate"
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"><i class="el-icon-user"></i>候选办理</template>
|
||||
{{ item.candidate }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.deleteReason"
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"><i class="el-icon-user"></i>驳回节点</template>
|
||||
{{ getDeleteReason(item.deleteReason) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"><i class="el-icon-date"></i>接收时间</template>
|
||||
{{ item.startTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.endTime"
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"><i class="el-icon-date"></i>处理时间</template>
|
||||
{{ item.endTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.duration"
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"><i class="el-icon-time"></i>处理耗时</template>
|
||||
{{ getDurationDateStr(item.duration) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item
|
||||
v-if="item.message"
|
||||
label-class-name="my-label"
|
||||
:labelStyle="labelStyle"
|
||||
>
|
||||
<template slot="label"
|
||||
><i class="el-icon-tickets"></i>处理意见</template
|
||||
>
|
||||
{{ item.message }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
<div class="drawerRight">
|
||||
<el-form label-width="80px">
|
||||
<el-form-item label="项目单位">
|
||||
{{ initData.projParName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称">
|
||||
{{ initData.projParName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="申请类型">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人">
|
||||
<label
|
||||
>{{ initData.createBy }}
|
||||
<el-tag type="info" size="mini">{{
|
||||
initData.createByDeptName
|
||||
}}</el-tag></label
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请原因">
|
||||
{{ initData.applyReason }}
|
||||
</el-form-item>
|
||||
<el-form-item label="申请附件" v-if="initData.applyFiles">
|
||||
<div v-for="(file, index) in initData.applyFiles.split(',')" :key="index">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-paperclip"
|
||||
@click="handledownload(file)"
|
||||
>{{ file.substring(file.lastIndexOf("/") + 1) }}</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请时间">
|
||||
{{ parseTime(initData.updateTime, "{y}-{m}-{d} {h}:{i}") }}
|
||||
</el-form-item>
|
||||
<el-form-item label="使用时间">
|
||||
{{ initData.applyReason }}
|
||||
</el-form-item>
|
||||
<el-divider content-position="left">申请明细</el-divider>
|
||||
<el-table stripe :data="initData.proProjectApplyDetailList">
|
||||
<el-table-column label="序号" width="40" type="index"></el-table-column>
|
||||
<el-table-column label="申请明细" align="left">
|
||||
<template slot-scope="scope">
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item>{{ scope.row.superTypeName }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>{{ scope.row.typeName }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="assetsName">{{
|
||||
scope.row.assetsName
|
||||
}}</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="assetsVersion"></el-table-column>
|
||||
<el-table-column label="数量" prop="number">
|
||||
<template slot-scope="scope">
|
||||
<label
|
||||
>{{ scope.row.number }}
|
||||
<el-tag type="info" size="mini">{{
|
||||
scope.row.assetsUnit
|
||||
}}</el-tag></label
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="说明"
|
||||
prop="useReason"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center">
|
||||
<el-button type="danger" @click="doCanel">关 闭</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</div>
|
||||
|
@ -103,11 +178,12 @@
|
|||
<script>
|
||||
import { flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { findCommentByProcInsId, findFormDatasByProcInsId } from "@/api/flowable/businessKey";
|
||||
import { findCommentByProcInsId } from "@/api/flowable/businessKey";
|
||||
import { getProjectApply } from "@/api/project/projectApply";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
// 抽屉层
|
||||
|
@ -116,7 +192,7 @@ export default {
|
|||
loading: false,
|
||||
// 标题
|
||||
title: "",
|
||||
jdtitle:"",
|
||||
jdtitle: "",
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
@ -124,10 +200,10 @@ export default {
|
|||
bpmnViewer: null,
|
||||
options: {},
|
||||
flowRecordList: [],
|
||||
showjd:false,
|
||||
showjd: false,
|
||||
//label样式
|
||||
labelStyle: { width: "180px" },
|
||||
initData:{}
|
||||
initData: {},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -138,10 +214,9 @@ export default {
|
|||
methods: {
|
||||
setIcon(row) {
|
||||
if (row.endTime) {
|
||||
if(row.commentResult=="驳回")
|
||||
{
|
||||
if (row.commentResult == "驳回") {
|
||||
return "el-icon-close";
|
||||
}else{
|
||||
} else {
|
||||
return "el-icon-check";
|
||||
}
|
||||
} else {
|
||||
|
@ -150,10 +225,9 @@ export default {
|
|||
},
|
||||
setColor(row) {
|
||||
if (row.endTime) {
|
||||
if(row.commentResult=="驳回")
|
||||
{
|
||||
if (row.commentResult == "驳回") {
|
||||
return "#f56c6c";
|
||||
}else{
|
||||
} else {
|
||||
return "#2bc418";
|
||||
}
|
||||
} else {
|
||||
|
@ -178,19 +252,21 @@ export default {
|
|||
this.onOpen = true;
|
||||
this.showjd = false;
|
||||
|
||||
if(options.finishTime==null){
|
||||
this.jdtitle="进行中";
|
||||
this.showjd=true;
|
||||
}else if(options.finishTime!=null && options.assigneeId==null){
|
||||
this.jdtitle="已终止";
|
||||
}else{
|
||||
this.jdtitle="已完成";
|
||||
if (options.finishTime == null) {
|
||||
this.jdtitle = "进行中";
|
||||
this.showjd = true;
|
||||
} else if (options.finishTime != null && options.assigneeId == null) {
|
||||
this.jdtitle = "已终止";
|
||||
} else {
|
||||
this.jdtitle = "已完成";
|
||||
}
|
||||
this.getFlowRecordList(options.procInsId, options.deployId);
|
||||
this.getFormDatasList(options.procInsId, options.deployId);
|
||||
flowXmlAndNode({ procInsId:options.procInsId, deployId: options.deployId }).then((res) => {
|
||||
this.initFlowImage(res.data);
|
||||
});
|
||||
this.getFormDatasList(options.businessKey);
|
||||
flowXmlAndNode({ procInsId: options.procInsId, deployId: options.deployId }).then(
|
||||
(res) => {
|
||||
this.initFlowImage(res.data);
|
||||
}
|
||||
);
|
||||
},
|
||||
async initFlowImage(data) {
|
||||
const self = this;
|
||||
|
@ -202,8 +278,8 @@ export default {
|
|||
await self.bpmnViewer.importXML(data.xmlData);
|
||||
// 自适应
|
||||
self.bpmnViewer.get("canvas").zoom("fit-viewport", "auto");
|
||||
if (data.nodeData !==undefined && data.nodeData.length > 0 ) {
|
||||
self.fillColor(data.nodeData)
|
||||
if (data.nodeData !== undefined && data.nodeData.length > 0) {
|
||||
self.fillColor(data.nodeData);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err.message, err.warnings);
|
||||
|
@ -218,192 +294,221 @@ export default {
|
|||
// }).catch(res => {
|
||||
// this.$message.error("数据异常,请联系管理员...");
|
||||
// })
|
||||
const that = this
|
||||
const params = {procInsId: procInsId}
|
||||
findCommentByProcInsId(params).then(res => {
|
||||
that.flowRecordList = res.data;
|
||||
}).catch(res => {
|
||||
this.$message.error("数据异常,请联系管理员...");
|
||||
})
|
||||
const that = this;
|
||||
const params = { procInsId: procInsId };
|
||||
findCommentByProcInsId(params)
|
||||
.then((res) => {
|
||||
that.flowRecordList = res.data;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error("数据异常,请联系管理员...");
|
||||
});
|
||||
},
|
||||
/** 流程表单数据 */
|
||||
getFormDatasList(procInsId, deployId) {
|
||||
// const that = this
|
||||
// const params = {procInsId: procInsId, deployId: deployId}
|
||||
// flowRecord(params).then(res => {
|
||||
// that.flowRecordList = res.data.flowList;
|
||||
// }).catch(res => {
|
||||
// this.$message.error("数据异常,请联系管理员...");
|
||||
// })
|
||||
const that = this
|
||||
const params = {procInsId: procInsId}
|
||||
findFormDatasByProcInsId(params).then(res => {
|
||||
this.initData = res.data;
|
||||
this.initData.files = res.data.files.split(',');
|
||||
}).catch(res => {
|
||||
this.$message.error("数据异常,请联系管理员...");
|
||||
})
|
||||
getFormDatasList(businessKey) {
|
||||
getProjectApply(businessKey)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.initData = res.data;
|
||||
} else {
|
||||
this.$message.error("数据异常,请联系管理员...");
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error("数据异常,请联系管理员...");
|
||||
});
|
||||
},
|
||||
// 设置高亮颜色的
|
||||
fillColor(nodeData) {
|
||||
const canvas = this.bpmnViewer.get('canvas')
|
||||
this.bpmnViewer.getDefinitions().rootElements[0].flowElements.forEach(n => {
|
||||
const completeTask = nodeData.find(m => m.key === n.id)
|
||||
const todoTask = nodeData.find(m => !m.completed)
|
||||
const endTask = nodeData[nodeData.length - 1]
|
||||
if (n.$type === 'bpmn:UserTask') {
|
||||
const canvas = this.bpmnViewer.get("canvas");
|
||||
this.bpmnViewer.getDefinitions().rootElements[0].flowElements.forEach((n) => {
|
||||
const completeTask = nodeData.find((m) => m.key === n.id);
|
||||
const todoTask = nodeData.find((m) => !m.completed);
|
||||
const endTask = nodeData[nodeData.length - 1];
|
||||
if (n.$type === "bpmn:UserTask") {
|
||||
if (completeTask) {
|
||||
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
|
||||
n.outgoing?.forEach(nn => {
|
||||
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
|
||||
canvas.addMarker(
|
||||
n.id,
|
||||
completeTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
n.outgoing?.forEach((nn) => {
|
||||
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||
if (targetTask) {
|
||||
if (todoTask && completeTask.key === todoTask.key && !todoTask.completed){
|
||||
canvas.addMarker(nn.id, todoTask.completed ? 'highlight' : 'highlight-todo')
|
||||
canvas.addMarker(nn.targetRef.id, todoTask.completed ? 'highlight' : 'highlight-todo')
|
||||
}else {
|
||||
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
||||
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
||||
if (
|
||||
todoTask &&
|
||||
completeTask.key === todoTask.key &&
|
||||
!todoTask.completed
|
||||
) {
|
||||
canvas.addMarker(
|
||||
nn.id,
|
||||
todoTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
canvas.addMarker(
|
||||
nn.targetRef.id,
|
||||
todoTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
} else {
|
||||
canvas.addMarker(
|
||||
nn.id,
|
||||
targetTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
canvas.addMarker(
|
||||
nn.targetRef.id,
|
||||
targetTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
// 排他网关
|
||||
else if (n.$type === 'bpmn:ExclusiveGateway') {
|
||||
else if (n.$type === "bpmn:ExclusiveGateway") {
|
||||
if (completeTask) {
|
||||
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
|
||||
n.outgoing?.forEach(nn => {
|
||||
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
|
||||
canvas.addMarker(
|
||||
n.id,
|
||||
completeTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
n.outgoing?.forEach((nn) => {
|
||||
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||
if (targetTask) {
|
||||
|
||||
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
||||
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
||||
canvas.addMarker(
|
||||
nn.id,
|
||||
targetTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
canvas.addMarker(
|
||||
nn.targetRef.id,
|
||||
targetTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
// 并行网关
|
||||
else if (n.$type === 'bpmn:ParallelGateway') {
|
||||
else if (n.$type === "bpmn:ParallelGateway") {
|
||||
if (completeTask) {
|
||||
canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo')
|
||||
n.outgoing?.forEach(nn => {
|
||||
const targetTask = nodeData.find(m => m.key === nn.targetRef.id)
|
||||
canvas.addMarker(
|
||||
n.id,
|
||||
completeTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
n.outgoing?.forEach((nn) => {
|
||||
const targetTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||
if (targetTask) {
|
||||
canvas.addMarker(nn.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
||||
canvas.addMarker(nn.targetRef.id, targetTask.completed ? 'highlight' : 'highlight-todo')
|
||||
canvas.addMarker(
|
||||
nn.id,
|
||||
targetTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
canvas.addMarker(
|
||||
nn.targetRef.id,
|
||||
targetTask.completed ? "highlight" : "highlight-todo"
|
||||
);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (n.$type === 'bpmn:StartEvent') {
|
||||
n.outgoing.forEach(nn => {
|
||||
const completeTask = nodeData.find(m => m.key === nn.targetRef.id)
|
||||
} else if (n.$type === "bpmn:StartEvent") {
|
||||
n.outgoing.forEach((nn) => {
|
||||
const completeTask = nodeData.find((m) => m.key === nn.targetRef.id);
|
||||
if (completeTask) {
|
||||
canvas.addMarker(nn.id, 'highlight')
|
||||
canvas.addMarker(n.id, 'highlight')
|
||||
return
|
||||
canvas.addMarker(nn.id, "highlight");
|
||||
canvas.addMarker(n.id, "highlight");
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
else if (n.$type === 'bpmn:EndEvent') {
|
||||
});
|
||||
} else if (n.$type === "bpmn:EndEvent") {
|
||||
if (endTask.key === n.id && endTask.completed) {
|
||||
canvas.addMarker(n.id, 'highlight')
|
||||
return
|
||||
canvas.addMarker(n.id, "highlight");
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
getDurationDate(val){
|
||||
getDurationDateStr(val) {
|
||||
// 计算出相差天数
|
||||
let days = Math.floor(val / (24 * 3600 * 1000))
|
||||
let days = Math.floor(val / (24 * 3600 * 1000));
|
||||
// 计算出小时数
|
||||
let leave1 = val % (24 * 3600 * 1000) // 计算天数后剩余的毫秒数
|
||||
let hours = Math.floor(leave1 / (3600 * 1000))
|
||||
let leave1 = val % (24 * 3600 * 1000); // 计算天数后剩余的毫秒数
|
||||
let hours = Math.floor(leave1 / (3600 * 1000));
|
||||
// 计算相差分钟数
|
||||
let leave2 = leave1 % (3600 * 1000) // 计算小时数后剩余的毫秒数
|
||||
let minutes = Math.floor(leave2 / (60 * 1000))
|
||||
let leave2 = leave1 % (3600 * 1000); // 计算小时数后剩余的毫秒数
|
||||
let minutes = Math.floor(leave2 / (60 * 1000));
|
||||
// 计算相差秒数
|
||||
let leave3 = leave2 % (60 * 1000) // 计算分钟数后剩余的毫秒数
|
||||
let seconds = Math.round(leave3 / 1000)
|
||||
if(days>0){
|
||||
if(days<10) days = "0"+days;
|
||||
if(hours<10) hours = "0"+hours;
|
||||
if(minutes<10) minutes = "0"+minutes;
|
||||
if(seconds<10) seconds = "0"+seconds;
|
||||
return days + '天' + hours + '小时' + minutes + '分钟' + seconds + '秒';
|
||||
let leave3 = leave2 % (60 * 1000); // 计算分钟数后剩余的毫秒数
|
||||
let seconds = Math.round(leave3 / 1000);
|
||||
if (days > 0) {
|
||||
if (days < 10) days = "0" + days;
|
||||
if (hours < 10) hours = "0" + hours;
|
||||
if (minutes < 10) minutes = "0" + minutes;
|
||||
if (seconds < 10) seconds = "0" + seconds;
|
||||
return days + "天" + hours + "小时" + minutes + "分钟" + seconds + "秒";
|
||||
}
|
||||
if(hours>0){
|
||||
if(hours<10) hours = "0"+hours;
|
||||
if(minutes<10) minutes = "0"+minutes;
|
||||
if(seconds<10) seconds = "0"+seconds;
|
||||
return hours + '小时' + minutes + '分钟' + seconds + '秒';
|
||||
if (hours > 0) {
|
||||
if (hours < 10) hours = "0" + hours;
|
||||
if (minutes < 10) minutes = "0" + minutes;
|
||||
if (seconds < 10) seconds = "0" + seconds;
|
||||
return hours + "小时" + minutes + "分钟" + seconds + "秒";
|
||||
}
|
||||
if(minutes>0){
|
||||
if(minutes<10) minutes = "0"+minutes;
|
||||
if(seconds<10) seconds = "0"+seconds;
|
||||
return minutes + '分钟' + seconds + '秒';
|
||||
if (minutes > 0) {
|
||||
if (minutes < 10) minutes = "0" + minutes;
|
||||
if (seconds < 10) seconds = "0" + seconds;
|
||||
return minutes + "分钟" + seconds + "秒";
|
||||
}
|
||||
if(seconds>0){
|
||||
if(seconds<10) seconds = "0"+seconds;
|
||||
return seconds + '秒';
|
||||
if (seconds > 0) {
|
||||
if (seconds < 10) seconds = "0" + seconds;
|
||||
return seconds + "秒";
|
||||
}
|
||||
},
|
||||
handledownload(url){
|
||||
handledownload(url) {
|
||||
this.$download.resource(url);
|
||||
},
|
||||
getDeleteReason(val){
|
||||
val = val.replace("Change activity to ","");
|
||||
getDeleteReason(val) {
|
||||
val = val.replace("Change activity to ", "");
|
||||
let flowRecordList = this.flowRecordList;
|
||||
for(let i=0;i<flowRecordList.length;i++){
|
||||
if(flowRecordList[i].taskDefKey==val){
|
||||
return "驳回至"+flowRecordList[i].taskName;
|
||||
for (let i = 0; i < flowRecordList.length; i++) {
|
||||
if (flowRecordList[i].taskDefKey == val) {
|
||||
return "驳回至" + flowRecordList[i].taskName;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.app-detailDrawer{
|
||||
.app-detailDrawer {
|
||||
.drawer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 20px;
|
||||
.drawerLeft {
|
||||
width: 60%;
|
||||
min-width: 280px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border-right: 1px solid #dcdfe6;
|
||||
overflow-y: scroll;
|
||||
padding-right: 20px;
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
|
||||
}
|
||||
.maskLayer {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
top: 77px;
|
||||
}
|
||||
}
|
||||
.drawerRight {
|
||||
width: 40%;
|
||||
min-width: 400px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
.containers {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
padding-bottom: 20px;
|
||||
.drawerLeft {
|
||||
width: 50%;
|
||||
min-width: 280px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
border-right: 1px solid #dcdfe6;
|
||||
overflow-y: scroll;
|
||||
padding-right: 20px;
|
||||
.bjs-powered-by {
|
||||
display: none !important;
|
||||
}
|
||||
.maskLayer {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
position: absolute;
|
||||
z-index: 9999;
|
||||
top: 77px;
|
||||
}
|
||||
}
|
||||
.drawerRight {
|
||||
width: 50%;
|
||||
min-width: 400px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
.containers {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
.canvas {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
|
@ -417,12 +522,12 @@ export default {
|
|||
.load {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.el-form-item__label{
|
||||
.el-form-item__label {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.djs-palette{
|
||||
left: 0px!important;
|
||||
.djs-palette {
|
||||
left: 0px !important;
|
||||
top: 0px;
|
||||
border-top: none;
|
||||
}
|
||||
|
@ -466,4 +571,8 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.assetsName {
|
||||
font-weight: 800;
|
||||
color: #409eff;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
@close="closeCallBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>工程管理 【{{ title }}】</div>
|
||||
<div>临时工程申请 【{{ title }}】</div>
|
||||
</template>
|
||||
<el-form
|
||||
ref="form"
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
|
||||
<el-tab-pane name="all"
|
||||
><div slot="label">全部申请({{ tabs.all }})</div></el-tab-pane
|
||||
>
|
||||
|
@ -111,37 +111,73 @@
|
|||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="流程编号"
|
||||
label="项目单位"
|
||||
align="center"
|
||||
prop="procInsId"
|
||||
prop="businessKeyParName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
prop="businessKeyName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="流程名称"
|
||||
align="center"
|
||||
prop="procDefName"
|
||||
width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="流程类别" align="center" prop="category" width="100px" />
|
||||
<el-table-column label="流程版本" align="center" width="80px">
|
||||
<el-table-column label="流程编号" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<label>{{ scope.row.taskId }}</label>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程类别" align="center" prop="category">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.sys_process_category"
|
||||
:value="scope.row.category"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程版本" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交时间" align="center" prop="createTime" width="180" />
|
||||
<el-table-column label="提交时间" align="center" prop="createTime" width="160" />
|
||||
<el-table-column label="流程状态" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.finishTime == null" size="mini">进行中</el-tag>
|
||||
<el-tag type="success" v-if="scope.row.finishTime != null" size="mini"
|
||||
<el-tag
|
||||
type="success"
|
||||
v-if="scope.row.finishTime != null && scope.row.assigneeId != null"
|
||||
size="mini"
|
||||
>已完成</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="danger"
|
||||
v-if="scope.row.finishTime != null && scope.row.assigneeId == null"
|
||||
size="mini"
|
||||
>已终止</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耗时" align="center" prop="duration" width="180" />
|
||||
<el-table-column label="当前节点" align="center" prop="taskName" />
|
||||
<el-table-column label="办理人" align="center">
|
||||
<el-table-column label="当前节点" align="center" prop="taskName">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.finishTime == null">{{ scope.row.taskName }}</div>
|
||||
<div v-if="scope.row.finishTime != null">流程结束</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理耗时" align="center" prop="duration" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ getDurationDate(scope.row.duration) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="办理人" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<label v-if="scope.row.assigneeName"
|
||||
>{{ scope.row.assigneeName }}
|
||||
|
@ -149,7 +185,6 @@
|
|||
scope.row.assigneeDeptName
|
||||
}}</el-tag></label
|
||||
>
|
||||
<!-- <label v-if="scope.row.candidate">{{scope.row.candidate}}</label>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -240,6 +275,12 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="processLoading" fit :data="definitionList" border>
|
||||
<el-table-column label="项目单位" align="center" prop="deptName">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="info" v-if="scope.row.deptId">{{ scope.row.deptName }}</el-tag>
|
||||
<el-tag>默认工作流</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程名称" align="center" prop="name" />
|
||||
<el-table-column label="流程版本" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
@ -272,6 +313,9 @@
|
|||
@pagination="listDefinition"
|
||||
/>
|
||||
</el-dialog>
|
||||
<detailDrawer ref="detailDrawer"></detailDrawer>
|
||||
<editTaskDrawer ref="editTaskDrawer" :closeCallBack="getList"></editTaskDrawer>
|
||||
<initTaskDrawer ref="initTaskDrawer" :closeCallBack="getList"></initTaskDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -294,7 +338,7 @@ import detailDrawer from "./detail/detailDrawer.vue";
|
|||
export default {
|
||||
name: "Deploy",
|
||||
dicts: ["sys_process_category"],
|
||||
components: {},
|
||||
components: { initTaskDrawer, editTaskDrawer, detailDrawer },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -384,8 +428,8 @@ export default {
|
|||
}
|
||||
this.queryGroupCount(this.queryParams);
|
||||
allList(this.queryParams).then((response) => {
|
||||
this.myProcessList = response.data.records;
|
||||
this.total = response.data.total;
|
||||
this.myProcessList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
@ -461,13 +505,8 @@ export default {
|
|||
},
|
||||
/** 发起流程申请 */
|
||||
handleStartProcess(row) {
|
||||
this.$router.push({
|
||||
path: "/flowable/task/myProcess/send/index",
|
||||
query: {
|
||||
deployId: row.deploymentId,
|
||||
procDefId: row.id,
|
||||
},
|
||||
});
|
||||
this.open = false;
|
||||
this.$refs.initTaskDrawer.show(row);
|
||||
},
|
||||
/** 取消流程申请 */
|
||||
handleStop(row) {
|
||||
|
@ -481,14 +520,15 @@ export default {
|
|||
},
|
||||
/** 流程流转记录 */
|
||||
handleFlowRecord(row) {
|
||||
this.$router.push({
|
||||
/** this.$router.push({
|
||||
path: "/flowable/task/myProcess/detail/index",
|
||||
query: {
|
||||
procInsId: row.procInsId,
|
||||
deployId: row.deployId,
|
||||
taskId: row.taskId,
|
||||
},
|
||||
});
|
||||
});*/
|
||||
this.$refs.detailDrawer.show(row);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
@ -551,6 +591,12 @@ export default {
|
|||
this.download(response.msg);
|
||||
});
|
||||
},
|
||||
// 页签点击
|
||||
handleClick() {
|
||||
console.log(this.queryParams.activeName);
|
||||
this.queryParams.activeName = this.activeName;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
:visible.sync="onOpen"
|
||||
ref="drawer"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
size="50%"
|
||||
@close="closeCallBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>工程管理 【{{ title }}】</div>
|
||||
<div>临时工程申请 【{{ title }}】</div>
|
||||
</template>
|
||||
<el-form
|
||||
ref="form"
|
||||
|
@ -23,50 +23,50 @@
|
|||
<div class="canvas" ref="flowCanvas"></div>
|
||||
<div class="maskLayer" />
|
||||
</div>
|
||||
<el-form-item label="所属项目" prop="businessKey">
|
||||
<el-form-item label="项目单位">
|
||||
{{ form.parProjName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="projId">
|
||||
<el-select
|
||||
v-model="form.businessKey"
|
||||
placeholder="请选择所属项目"
|
||||
v-model="form.projId"
|
||||
placeholder="请选择项目名称"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="disPro"
|
||||
@change="projectChage"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) in projectOptions"
|
||||
<el-option
|
||||
v-for="(item, index) in projectOptions"
|
||||
:key="index"
|
||||
:label="item.projectName"
|
||||
:label="item.projName"
|
||||
:value="item.id"
|
||||
>
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起单位">
|
||||
{{ deptName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人">
|
||||
{{ nickName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批事项">
|
||||
<el-form-item label="申请类型">
|
||||
{{ title }}
|
||||
</el-form-item>
|
||||
<el-form-item label="审批内容" prop="files">
|
||||
<el-form-item label="申请人">
|
||||
<label
|
||||
>{{ nickName }} <el-tag type="info" size="mini">{{ deptName }}</el-tag></label
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请原因" prop="applyReason">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.applyReason"
|
||||
placeholder="请输入申请原因"
|
||||
rows="3"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件说明" prop="applyFiles">
|
||||
<FileUpload
|
||||
@input="fileInput"
|
||||
:limit="9"
|
||||
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请说明" prop="remark">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="form.remark"
|
||||
placeholder="请输入申请说明"
|
||||
rows="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" @click="submitForm">提交流程</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交申请</el-button>
|
||||
<el-button @click="doCanel">取 消</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
@ -79,6 +79,7 @@ import store from "@/store";
|
|||
import { definitionStart, flowXmlAndNode } from "@/api/flowable/definition";
|
||||
import { CustomViewer as BpmnViewer } from "@/components/customBpmn";
|
||||
import { getNextFlowNodeByStart } from "@/api/flowable/todo";
|
||||
import { findMyDeptProject } from "@/api/project/projectInfo";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
|
@ -97,10 +98,23 @@ export default {
|
|||
title: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
businessKey: "",
|
||||
projectName: "",
|
||||
files: "",
|
||||
remark: "",
|
||||
id: null,
|
||||
deptId: null,
|
||||
projId: null,
|
||||
projName: null,
|
||||
parProjName: null,
|
||||
applyType: null,
|
||||
applyStatus: null,
|
||||
applyReason: null,
|
||||
applyFiles: null,
|
||||
applyUser: null,
|
||||
useTime: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
@ -115,10 +129,9 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
projectOptions: null,
|
||||
projectOptions: [],
|
||||
deptName: null,
|
||||
nickName: null,
|
||||
disPro: false,
|
||||
bpmnViewer: null,
|
||||
options: {},
|
||||
taskTitle: null,
|
||||
|
@ -135,27 +148,22 @@ export default {
|
|||
// 查询和我相关的项目信息
|
||||
initMyProject() {
|
||||
// 获取项目列表的接口
|
||||
this.$api.publics.getMyProjectList({}).then((response) => {
|
||||
this.projectOptions = response.rows;
|
||||
if (response.rows.length == 0) {
|
||||
this.$message.error("未查询到和您关联项目,请联系子公司或管理员...");
|
||||
} else if (response.rows.length == 1) {
|
||||
// 这里只有一个项目,默认选中并只读
|
||||
this.form.businessKey = response.rows[0].id;
|
||||
this.form.projectName = response.rows[0].projectName;
|
||||
findMyDeptProject().then((response) => {
|
||||
if (response.code == 200 && response.data) {
|
||||
this.projectOptions = response.data;
|
||||
this.form.projId = response.data[0].id;
|
||||
this.form.projName = response.data[0].projName;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 项目选择
|
||||
projectChage(val) {
|
||||
let projectName = "";
|
||||
this.projectOptions.forEach((item) => {
|
||||
if ((item.id = val)) {
|
||||
projectName = item.projectName;
|
||||
return;
|
||||
}
|
||||
});
|
||||
this.form.projectName = projectName;
|
||||
for(let i = 0; i < this.projectOptions.length; i++) {
|
||||
if(this.projectOptions[i].id == val) {
|
||||
this.form.projName = this.projectOptions[i].projName;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
doCanel() {
|
||||
this.onOpen = false;
|
||||
|
@ -164,8 +172,9 @@ export default {
|
|||
this.options = options;
|
||||
this.initMyProject();
|
||||
this.title = options.name;
|
||||
this.deptName = store.getters.dept.deptName;
|
||||
this.form.parProjName = store.getters.parDeptName;
|
||||
this.nickName = store.getters.name;
|
||||
this.deptName = store.getters.dept.deptName;
|
||||
const self = this;
|
||||
this.onOpen = true;
|
||||
flowXmlAndNode({ deployId: options.deploymentId }).then((res) => {
|
||||
|
@ -185,17 +194,6 @@ export default {
|
|||
console.error(err.message, err.warnings);
|
||||
}
|
||||
},
|
||||
fileInput(files) {
|
||||
let fileUrls = "";
|
||||
if (files.length > 0) {
|
||||
fileUrls = "";
|
||||
files.forEach((item) => {
|
||||
fileUrls += "," + item.url;
|
||||
});
|
||||
fileUrls = fileUrls.substring(1);
|
||||
}
|
||||
this.form.files = fileUrls;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<script>
|
||||
import { getDept, delDept, addDept, updateDept } from "@/api/system/dept";
|
||||
import { companyList } from '@/api/project/company'
|
||||
import {projectList} from '@/api/project/project'
|
||||
import { projectList } from '@/api/project/project'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
export default {
|
||||
|
|
Loading…
Reference in New Issue