release-v1.0 #1
188
src/api/my_business/workflow.js
Normal file
188
src/api/my_business/workflow.js
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 审批记录
|
||||||
|
export function workflowGetLog(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/getLog',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//流程实例撤回到拟稿人环节
|
||||||
|
export function workflowbacktostart(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/backtostart',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
timeout: 30*60*1000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取流程环节定义信息
|
||||||
|
export function activitydefinition(procDefId, actDefId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/activitydefinition/' + procDefId + '/' + actDefId,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询列表
|
||||||
|
export function workflowToDoList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/toDoList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建流程,获取下一环节流程定义信息
|
||||||
|
export function workflowNextactsNew(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextacts/new',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新建流程,获取下一环节流程定义信息
|
||||||
|
// 获取下一环节集合,并可以标识已办和自动将未办理环节优先排序
|
||||||
|
export function workflowNextactsNew2(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextacts/new2',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询流程审批记录列表
|
||||||
|
export function processWorkflowGetList(businessId) {
|
||||||
|
return request({
|
||||||
|
url: '/process/workflowLog/list' + '?pageNum=1&pageSize=100&businessId=' + businessId,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNextactuserByPending(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextactuser/pending',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getNextActUsersByNew(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/nextactuser/new',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function workflowSubmit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/submit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function workflowCancel(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/cancel',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function workflowReject(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/reject',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function workflowBacktoprev(data) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/backtoprev',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getHistAskLogUrl(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/histasklogurl/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getExtAttributeModel(procDefId, actDefId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/getExtAttributeModel/?procDefId=' + procDefId + "&actDefId=" + actDefId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function selectLogByBusinessId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/process/workflowLog/selectLogByBusinessId?businessId' + query,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function workflowprocesskey(query) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/process/key/' + query,
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getStartActdef(procDefId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/startactdef/' + procDefId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据流程实例id获取流程实例信息和流程状态
|
||||||
|
export function procInstInfoAndStatus(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/procInstInfoAndStatus/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据流程实例id获取流程实例信息
|
||||||
|
export function getProcInstInfo(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/procInstInfo/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function selectLogByProcInstId(query) {
|
||||||
|
return request({
|
||||||
|
url: '/web/log/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取流程待选人员展示方式
|
||||||
|
export function selectUserStyle() {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/selectUserStyle',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据流程实例id获取流程实例信息
|
||||||
|
export function getRecordbyPorcInstId(procInstId) {
|
||||||
|
return request({
|
||||||
|
url: '/workflow/getRecord/' + procInstId,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -17,20 +17,29 @@ export function getTool(toolId) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getInfoByBpmcId(bpmcId) {
|
||||||
|
return request({
|
||||||
|
url: '/tool/bpmc/' + bpmcId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 新增工具信息
|
// 新增工具信息
|
||||||
export function addTool(data) {
|
export function addTool(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/tool',
|
url: '/tool',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
timeout: 30*60*1000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改工具信息
|
// 修改工具信息
|
||||||
export function updateTool(data) {
|
export function updateTool(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/tool',
|
url: '/tool/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -42,3 +51,11 @@ export function delTool(toolId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function checkToolExist(params) {
|
||||||
|
return request({
|
||||||
|
url: '/tool/checkToolExist',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
51
src/api/tool/userApply.js
Normal file
51
src/api/tool/userApply.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询使用申请列表
|
||||||
|
export function listApply(query) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询使用申请详细
|
||||||
|
export function getApply(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getInfoByBpmcId(bpmcId) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/bpmc/' + bpmcId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增使用申请
|
||||||
|
export function addApply(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改使用申请
|
||||||
|
export function updateApply(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除使用申请
|
||||||
|
export function delApply(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
44
src/api/tool/userApplyItem.js
Normal file
44
src/api/tool/userApplyItem.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询使用申请详情列表
|
||||||
|
export function listItem(query) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询使用申请详情详细
|
||||||
|
export function getItem(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增使用申请详情
|
||||||
|
export function addItem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改使用申请详情
|
||||||
|
export function updateItem(data) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除使用申请详情
|
||||||
|
export function delItem(id) {
|
||||||
|
return request({
|
||||||
|
url: '/use/apply/item/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
107
src/components/DealDrawer/index.vue
Normal file
107
src/components/DealDrawer/index.vue
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-drawer
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:visible.sync="visible"
|
||||||
|
:append-to-body="true"
|
||||||
|
direction="rtl"
|
||||||
|
size="90%"
|
||||||
|
:with-header="false"
|
||||||
|
:show-close="false"
|
||||||
|
modal-append-to-body
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<div style="width:100%; height:100%;overflow: hidden">
|
||||||
|
<iframe :src="src" width="100%" name="dmsDrawer" height="100%" title="myFrame" style="border: 0"></iframe>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="drawerShow"
|
||||||
|
direction="rtl"
|
||||||
|
size="90%"
|
||||||
|
:append-to-body="true"
|
||||||
|
:with-header="false"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:show-close="false"
|
||||||
|
modal-append-to-body
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<main-component ref="mainComponent" :code="path" :data="data" @close="handleCodeCloseChange"></main-component>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/*
|
||||||
|
流程处理抽屉组件
|
||||||
|
*/
|
||||||
|
import MainComponent from '@/components/mainComponent/index.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DealDrawer',
|
||||||
|
components: { MainComponent },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
workflowMessageCbAdded: false,
|
||||||
|
visible: false,
|
||||||
|
drawerShow: false,
|
||||||
|
data: undefined,
|
||||||
|
path: '',
|
||||||
|
src: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
activated() {
|
||||||
|
this.setupMessageListener()
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.setupMessageListener()
|
||||||
|
},
|
||||||
|
deactivated() {
|
||||||
|
this.removeMessageListener()
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.removeMessageListener()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//建立addEventListener事件
|
||||||
|
setupMessageListener() {
|
||||||
|
if (!this.workflowMessageCbAdded) {
|
||||||
|
window.addEventListener('message', this.handleMsg)
|
||||||
|
this.workflowMessageCbAdded = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//销毁addEventListener事件
|
||||||
|
removeMessageListener() {
|
||||||
|
window.removeEventListener('message', this.handleMsg)
|
||||||
|
this.workflowMessageCbAdded = false
|
||||||
|
},
|
||||||
|
handleMsg(event) {
|
||||||
|
let _this = this
|
||||||
|
let data = event.data
|
||||||
|
if (data.type === 'close') {
|
||||||
|
_this.visible = false
|
||||||
|
if (data.msgType) {
|
||||||
|
_this.$modal[data.msgType](data.msg)
|
||||||
|
}
|
||||||
|
_this.$emit('closeDrawer')
|
||||||
|
}else if(data.type === 'pdfPreview'){
|
||||||
|
this.pdfPreview(data.pdfId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pdfPreview(pdfId){
|
||||||
|
this.path = 'views/components/pdfPreview/index'
|
||||||
|
this.data = pdfId
|
||||||
|
this.drawerShow = true
|
||||||
|
},
|
||||||
|
init(url) {
|
||||||
|
let _this = this
|
||||||
|
_this.visible = true
|
||||||
|
// iframe加载URL地址
|
||||||
|
_this.src = url
|
||||||
|
},
|
||||||
|
handleCodeCloseChange() {
|
||||||
|
this.drawerShow = false
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
34
src/components/MonitorDrawer/index.vue
Normal file
34
src/components/MonitorDrawer/index.vue
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:wrapperClosable='false'
|
||||||
|
title="流程监控"
|
||||||
|
size="65%"
|
||||||
|
:visible.sync="visible"
|
||||||
|
:append-to-body="true"
|
||||||
|
>
|
||||||
|
<div style="width:100%;height:100%">
|
||||||
|
<iframe :src="src" width="100%" height="100%" title="myFrame" style="border: 0;"></iframe>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getHistAskLogUrl } from "@/api/my_business/workflow";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
src: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(procInstId) {
|
||||||
|
let _this = this
|
||||||
|
_this.visible = true
|
||||||
|
getHistAskLogUrl(procInstId).then(res => {
|
||||||
|
_this.src=res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
36
src/components/mainComponent/index.vue
Normal file
36
src/components/mainComponent/index.vue
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<component :is="dashboard" ref="component" :data="data" :dataType="dataType" @close="close">
|
||||||
|
<slot></slot>
|
||||||
|
</component>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'MainComponent',
|
||||||
|
props: ['code','data','dataType'],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
dashboard: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
code (val) {
|
||||||
|
this.init(val)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.init(this.code)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init (val) {
|
||||||
|
try {
|
||||||
|
if (val) {
|
||||||
|
this.dashboard = resolve => require(['@/' + val + '.vue'], resolve)
|
||||||
|
}
|
||||||
|
}catch (e) {}
|
||||||
|
},
|
||||||
|
close (value) {
|
||||||
|
this.$emit('close', value)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -8,6 +8,7 @@ import '../public/css/poctstyle.css'
|
|||||||
import '../public/css/tool.css'
|
import '../public/css/tool.css'
|
||||||
import '@/assets/styles/index.scss' // global css
|
import '@/assets/styles/index.scss' // global css
|
||||||
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import App from './App'
|
import App from './App'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
@ -38,6 +39,8 @@ import DictTag from '@/components/DictTag'
|
|||||||
import VueMeta from 'vue-meta'
|
import VueMeta from 'vue-meta'
|
||||||
// 字典数据组件
|
// 字典数据组件
|
||||||
import DictData from '@/components/DictData'
|
import DictData from '@/components/DictData'
|
||||||
|
// 图形监控组件
|
||||||
|
import MonitorDrawer from "@/components/MonitorDrawer"
|
||||||
|
|
||||||
// 全局方法挂载
|
// 全局方法挂载
|
||||||
Vue.prototype.getDicts = getDicts
|
Vue.prototype.getDicts = getDicts
|
||||||
@ -58,6 +61,7 @@ Vue.component('Editor', Editor)
|
|||||||
Vue.component('FileUpload', FileUpload)
|
Vue.component('FileUpload', FileUpload)
|
||||||
Vue.component('ImageUpload', ImageUpload)
|
Vue.component('ImageUpload', ImageUpload)
|
||||||
Vue.component('ImagePreview', ImagePreview)
|
Vue.component('ImagePreview', ImagePreview)
|
||||||
|
Vue.component('MonitorDrawer', MonitorDrawer)
|
||||||
|
|
||||||
Vue.use(directive)
|
Vue.use(directive)
|
||||||
Vue.use(plugins)
|
Vue.use(plugins)
|
||||||
|
@ -41,6 +41,12 @@ export const constantRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// 统一流程处理前端页面(涉及待办、已办、办结)
|
||||||
|
path: '/workflowRouter',
|
||||||
|
component: (resolve) => require(['@/views/workflowList/workflowRouter.vue'], resolve),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: () => import('@/views/login'),
|
component: () => import('@/views/login'),
|
||||||
|
@ -7,6 +7,7 @@ const getters = {
|
|||||||
cachedViews: state => state.tagsView.cachedViews,
|
cachedViews: state => state.tagsView.cachedViews,
|
||||||
token: state => state.user.token,
|
token: state => state.user.token,
|
||||||
avatar: state => state.user.avatar,
|
avatar: state => state.user.avatar,
|
||||||
|
userInfo: state => state.user.info,
|
||||||
name: state => state.user.name,
|
name: state => state.user.name,
|
||||||
nickName: state => state.user.nickName,
|
nickName: state => state.user.nickName,
|
||||||
introduction: state => state.user.introduction,
|
introduction: state => state.user.introduction,
|
||||||
|
@ -7,6 +7,7 @@ const user = {
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
nickName: '',
|
nickName: '',
|
||||||
|
info: {},
|
||||||
avatar: '',
|
avatar: '',
|
||||||
roles: [],
|
roles: [],
|
||||||
permissions: []
|
permissions: []
|
||||||
@ -33,6 +34,9 @@ const user = {
|
|||||||
},
|
},
|
||||||
SET_PERMISSIONS: (state, permissions) => {
|
SET_PERMISSIONS: (state, permissions) => {
|
||||||
state.permissions = permissions
|
state.permissions = permissions
|
||||||
|
},
|
||||||
|
SET_INFO:(state, info) => {
|
||||||
|
state.info = info
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -70,6 +74,8 @@ const user = {
|
|||||||
commit('SET_NAME', user.userName)
|
commit('SET_NAME', user.userName)
|
||||||
commit('SET_NICK_NAME', user.nickName)
|
commit('SET_NICK_NAME', user.nickName)
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar)
|
||||||
|
commit('SET_INFO', user)
|
||||||
|
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
@ -155,7 +155,6 @@ import { getToken } from "@/utils/auth";
|
|||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import blUserSelector from "@/components/user-selector/src/user-selector";
|
import blUserSelector from "@/components/user-selector/src/user-selector";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import toolDetail from "./toolDetail";
|
import toolDetail from "./toolDetail";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -159,7 +159,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Dept",
|
name: "Dept",
|
||||||
|
@ -275,7 +275,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
|
import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import IconSelect from "@/components/IconSelect";
|
import IconSelect from "@/components/IconSelect";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -224,7 +224,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
|
@ -325,7 +325,6 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
|
@ -387,6 +387,19 @@
|
|||||||
</div><!--el-form-border 表单-->
|
</div><!--el-form-border 表单-->
|
||||||
</el-drawer><!--el-drawer 导出抽屉-->
|
</el-drawer><!--el-drawer 导出抽屉-->
|
||||||
|
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="drawerShow"
|
||||||
|
direction="rtl"
|
||||||
|
size="90%"
|
||||||
|
:with-header="false"
|
||||||
|
:wrapperClosable="false"
|
||||||
|
:show-close="false"
|
||||||
|
modal-append-to-body
|
||||||
|
:destroy-on-close="true"
|
||||||
|
>
|
||||||
|
<main-component ref="mainComponent" :code="path+code" :data="data" @close="handleClose"></main-component>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
<!-- 工具详情对话框 -->
|
<!-- 工具详情对话框 -->
|
||||||
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" size="85%" class="no-padding">
|
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" size="85%" class="no-padding">
|
||||||
<template #title>
|
<template #title>
|
||||||
@ -407,16 +420,20 @@ import { getToken } from "@/utils/auth";
|
|||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import blUserSelector from "@/components/user-selector/src/user-selector";
|
import blUserSelector from "@/components/user-selector/src/user-selector";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import toolDetail from "./toolDetail";
|
import toolDetail from "./toolDetail";
|
||||||
import AddDoc from './AddDoc'
|
import AddDoc from './AddDoc'
|
||||||
|
import mainComponent from "@/components/mainComponent/index.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
dicts: ['sys_normal_disable', 'tool_type'],
|
dicts: ['sys_normal_disable', 'tool_type'],
|
||||||
components: { Treeselect, blUserSelector, toolDetail, AddDoc },
|
components: { Treeselect, blUserSelector, toolDetail, AddDoc,mainComponent },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
drawerShow: false,
|
||||||
|
path: 'views/workflowList/addWorkflow/',
|
||||||
|
code: '',
|
||||||
|
data: undefined,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -629,12 +646,8 @@ export default {
|
|||||||
},
|
},
|
||||||
/**=============================申请使用Start================================*/
|
/**=============================申请使用Start================================*/
|
||||||
applyUse(row){
|
applyUse(row){
|
||||||
let toolIds = row?.id || '1'
|
let _this = this
|
||||||
if(toolIds.length == 0){
|
_this.handleOpen({...row,type:'use_apply'})
|
||||||
this.$modal.msgWarning("请选择需要申请使用的工具!");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.applyDrawerOpen = true
|
|
||||||
},
|
},
|
||||||
submitApply(){
|
submitApply(){
|
||||||
|
|
||||||
@ -681,14 +694,22 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
// this.reset();
|
||||||
getTool().then(response => {
|
// getTool().then(response => {
|
||||||
this.postOptions = response.posts;
|
// this.postOptions = response.posts;
|
||||||
this.roleOptions = response.roles;
|
// this.roleOptions = response.roles;
|
||||||
this.addDrawerOpen = true;
|
// this.addDrawerOpen = true;
|
||||||
this.title = "添加工具";
|
// this.title = "添加工具";
|
||||||
this.form.password = this.initPassword;
|
// this.form.password = this.initPassword;
|
||||||
});
|
// });
|
||||||
|
let _this = this
|
||||||
|
_this.handleOpen({type:'tool_release'})
|
||||||
|
},
|
||||||
|
handleOpen(row){
|
||||||
|
let _this = this
|
||||||
|
_this.code = row.type
|
||||||
|
_this.data = row
|
||||||
|
_this.drawerShow = true
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
@ -784,6 +805,9 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
},
|
||||||
|
handleClose(){
|
||||||
|
this.drawerShow = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
738
src/views/workflowList/addWorkflow/tool_release.vue
Normal file
738
src/views/workflowList/addWorkflow/tool_release.vue
Normal file
@ -0,0 +1,738 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading||detailLoading">
|
||||||
|
<div class="drawer-head">
|
||||||
|
<div class="cell-title">
|
||||||
|
<div>
|
||||||
|
<p class="title">新增工具</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cell-btn">
|
||||||
|
<el-button v-if="pListData&&pListData.procInstId" @click="handleMonitor">流程监控</el-button>
|
||||||
|
<el-button v-if="editStatus&&pListData.procInstId" type="danger" @click="deleteForm">撤销</el-button>
|
||||||
|
<el-button v-if="(editStatus||workflowStatus)" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
<el-button v-if="editStatus" type="primary" @click="saveForm" >保存</el-button>
|
||||||
|
<el-button @click="close">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-if="pListData&&pListData.procInstId" v-model="activeName">
|
||||||
|
<el-tab-pane label="信息内容" name="info"></el-tab-pane>
|
||||||
|
<el-tab-pane label="审批记录" name="log"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div class="el-form-border" v-show="activeName==='info'">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
基本信息
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具编号" prop="toolCode">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolCode" placeholder="请输入工具编号"/>
|
||||||
|
<span v-else>{{form.toolCode}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具名称" prop="toolName">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolName" placeholder="请输入工具名称"/>
|
||||||
|
<span v-else>{{form.toolName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="负责人" prop="toolPrincipalsName">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolPrincipalsName" placeholder="请选择负责人" maxlength="11"/>
|
||||||
|
<span v-else>{{form.toolPrincipalsName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="归属部门" prop="toolRespDept">
|
||||||
|
<treeselect :disabled="!editStatus" v-model="form.toolRespDept" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具来源" prop="toolSource">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolSource" placeholder="请输入工具来源"/>
|
||||||
|
<span v-else>{{form.toolSource}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具用途" prop="toolUse">
|
||||||
|
<el-input v-if="editStatus" v-model="form.toolUse" placeholder="请输入工具用途" />
|
||||||
|
<span v-else>{{form.toolUse}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="工具类别">
|
||||||
|
<el-select v-if="editStatus" v-model="form.toolType" placeholder="请选择工具类别" style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.tool_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<dict-tag v-else :options="dict.type.tool_type" :value="form.toolType"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<el-radio-group v-model="form.status" v-if="editStatus">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{dict.label}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<dict-tag v-else :options="dict.type.sys_normal_disable" :value="form.status"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="测试情况">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.testSituation" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="功能描述">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.functionDesc" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="适用条件">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.applyCondition" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="操作说明">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.operateExplain" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.remark" type="textarea" :rows="3" maxlength="500" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
关联附件
|
||||||
|
</div>
|
||||||
|
<div class="operate">
|
||||||
|
<el-button type="primary" icon="el-icon-upload2" @click="handleDocAdd">上传</el-button>
|
||||||
|
<el-button icon="el-icon-delete">删除</el-button>
|
||||||
|
</div><!--operate 操作按钮-->
|
||||||
|
<el-table :data="docList" style="width: 100%">
|
||||||
|
<el-table-column type="selection" width="50" align="center"> </el-table-column>
|
||||||
|
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" />
|
||||||
|
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
||||||
|
<el-table-column label="归属部门" prop="docRespDept" :show-overflow-tooltip="true" width="150" />
|
||||||
|
<el-table-column label="来源" prop="docSource" width="100" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="180">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handlePriew(scope.row)"
|
||||||
|
>预览</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button type="text" icon="el-icon-download">下载</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table><!--el-table-->
|
||||||
|
</div>
|
||||||
|
<div v-if="attributeModelBool('approve')&&workflowStatus">
|
||||||
|
<div class="box-title">
|
||||||
|
{{submitLabel}}
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'结论:'" prop="pass">
|
||||||
|
<el-radio-group v-model.trim="formSubmit.pass">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in passoptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row >
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'意见:'">
|
||||||
|
<el-input
|
||||||
|
v-model="formSubmit.summary"
|
||||||
|
type="textarea"
|
||||||
|
:placeholder="'请输入'+submitLabel+'意见'"
|
||||||
|
maxlength="200"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<!-- 上传 -->
|
||||||
|
<add-doc :show.sync="addDocShow" toolId="1111" @callback="openEvent"/>
|
||||||
|
</div><!--el-form-border 表单-->
|
||||||
|
<div v-show="activeName==='log'">
|
||||||
|
<workflow-logs :procInstId = "pListData.procInstId"></workflow-logs>
|
||||||
|
</div>
|
||||||
|
<!-- 流程选择下一环节及人员 开始 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择下一环节及人员"
|
||||||
|
v-if="dialogVisible" :visible.sync="dialogVisible"
|
||||||
|
width="60%"
|
||||||
|
append-to-body
|
||||||
|
v-loading = flowStepLoading
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<processcode
|
||||||
|
ref="prochild"
|
||||||
|
:searchQuery="searchQuery"
|
||||||
|
:pListData="pListData"
|
||||||
|
:isSummary="isSummary"
|
||||||
|
></processcode>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleWorkflowSubmit"
|
||||||
|
>提 交</el-button
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 流程选择下一环节及人员 结束 -->
|
||||||
|
<monitor-drawer
|
||||||
|
v-if="monitorDrawerVisible"
|
||||||
|
ref="monitorDrawer"
|
||||||
|
></monitor-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listDocument } from "@/api/document/document";
|
||||||
|
import processcode from "@/views/workflowList/processcode/index.vue";
|
||||||
|
import {
|
||||||
|
workflowprocesskey,
|
||||||
|
getStartActdef,
|
||||||
|
getExtAttributeModel,
|
||||||
|
procInstInfoAndStatus,
|
||||||
|
} from '@/api/my_business/workflow'
|
||||||
|
import WorkflowLogs from '@/views/workflowList/workflowLogs/index.vue'
|
||||||
|
import AddDoc from '@/views/tool/AddDoc.vue'
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
|
import { addTool, checkToolExist, getInfoByBpmcId, updateTool } from '@/api/tool/tool'
|
||||||
|
// PDF本地文件预览
|
||||||
|
export default {
|
||||||
|
dicts: ['sys_normal_disable','tool_type'],
|
||||||
|
components: {
|
||||||
|
Treeselect, AddDoc,
|
||||||
|
WorkflowLogs,
|
||||||
|
processcode,
|
||||||
|
},
|
||||||
|
name: "Borrow_doc",
|
||||||
|
props: ['data'],
|
||||||
|
data() {
|
||||||
|
let validatorToolExist = (rule, value, callback) => {
|
||||||
|
let _this = this
|
||||||
|
if (_this.editStatus&&_this.form.toolCode&&_this.form.toolRespDept) {
|
||||||
|
checkToolExist(_this.form).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
let deptName = _this.getDeptName(_this.deptOptions, _this.form.toolRespDept)
|
||||||
|
callback(new Error(deptName+"下已存在编号为"+_this.form.toolCode+'的工具,请勿重复添加!'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
// 新增时的关联附件
|
||||||
|
docList: [],
|
||||||
|
addDocShow: false,
|
||||||
|
docQueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
toolId: ''
|
||||||
|
},
|
||||||
|
defaultStaff: [],
|
||||||
|
yes: 'Y',
|
||||||
|
searchQuery: {},
|
||||||
|
deptList: [],
|
||||||
|
companyList: [],
|
||||||
|
deptOptions: [],
|
||||||
|
docClassList: [],
|
||||||
|
submitLabel:undefined,
|
||||||
|
passoptions: [
|
||||||
|
{ value: true, label: "通过" },
|
||||||
|
{ value: false, label: "不通过" },
|
||||||
|
],
|
||||||
|
formSubmit: { summary: "", actionType: "", pass: "" },
|
||||||
|
isSummary: false,
|
||||||
|
activeName: "info",
|
||||||
|
nodeDetail: [],
|
||||||
|
procDefKey: undefined,
|
||||||
|
viewId: "",
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
viewShow: false,
|
||||||
|
monitorDrawerVisible:false,
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
toolCode: [
|
||||||
|
{ required: true, message: "工具编号不能为空", trigger: "blur" },
|
||||||
|
{ min: 2, max: 30, message: '工具编号长度必须介于 2 和 30 之间', trigger: 'blur' },
|
||||||
|
{ validator: validatorToolExist, trigger: "blur" },
|
||||||
|
],
|
||||||
|
toolName: [
|
||||||
|
{ required: true, message: "工具名称不能为空", trigger: "blur" },
|
||||||
|
{ max: 50, message: '工具名称不能超过50个字', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
toolPrincipalsName: [
|
||||||
|
{ required: true, message: "负责人不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
toolSource: [
|
||||||
|
{ max: 50, message: '工具来源不能超过50个字', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
toolUse: [
|
||||||
|
{ max: 50, message: '工具用途不能超过50个字', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
kuozhanshuju: {},
|
||||||
|
kuozhanshujuBool: {},
|
||||||
|
kuozhanshujuLabel: {},
|
||||||
|
pListData: {},
|
||||||
|
editStatus:false,
|
||||||
|
workflowStatus: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
loading: false,
|
||||||
|
detailLoading: false,
|
||||||
|
flowStepLoading : false,
|
||||||
|
// 默认密码
|
||||||
|
initPassword: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
data (val) {
|
||||||
|
if (val) {
|
||||||
|
this.init(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.data) {
|
||||||
|
this.init(this.data)
|
||||||
|
}
|
||||||
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
|
this.initPassword = response.msg;
|
||||||
|
});
|
||||||
|
this.getDeptTree()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询部门下拉树结构 */
|
||||||
|
getDeptTree() {
|
||||||
|
deptTreeSelect().then(response => {
|
||||||
|
this.deptOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async init(row) {
|
||||||
|
let _this = this
|
||||||
|
_this.rest()
|
||||||
|
_this.loading = true
|
||||||
|
_this.procDefKey = 'Process_FHXOQXVP'
|
||||||
|
_this.form.type = row.type
|
||||||
|
//是否编辑模式
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
if (row && row.procInstId) {
|
||||||
|
let procInstId = row.procInstId
|
||||||
|
_this.workflowStatus = row.status == '1'
|
||||||
|
_this.procInstInfoAndStatus(procInstId)
|
||||||
|
_this.getDetail(procInstId)
|
||||||
|
} else {
|
||||||
|
_this.workflowStatus = true
|
||||||
|
_this.loading = false
|
||||||
|
_this.editStatus = true
|
||||||
|
_this.getWorkflowprocesskey();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDetail(procInstId) {
|
||||||
|
let _this = this
|
||||||
|
_this.detailLoading = true
|
||||||
|
getInfoByBpmcId(procInstId).then(async (res) => {
|
||||||
|
let formData = res.data;
|
||||||
|
formData.type = _this.form.type
|
||||||
|
_this.form = formData
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.detailLoading = false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
rest(){
|
||||||
|
let _this = this
|
||||||
|
_this.activeName = "info"
|
||||||
|
_this.openEvent()
|
||||||
|
},
|
||||||
|
procInstInfoAndStatus(procInstId){
|
||||||
|
let _this = this
|
||||||
|
procInstInfoAndStatus(procInstId).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
_this.pListData = res
|
||||||
|
}else {
|
||||||
|
_this.pListData = {procInstId:procInstId}
|
||||||
|
}
|
||||||
|
_this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getWorkflowprocesskey() {
|
||||||
|
let _this = this
|
||||||
|
_this.loading = true
|
||||||
|
_this.pListData = {}
|
||||||
|
if (_this.procDefKey) {
|
||||||
|
workflowprocesskey(_this.procDefKey).then((data) => {
|
||||||
|
getStartActdef(data.data.procDefId).then((res) => {
|
||||||
|
_this.pListData = res.data;
|
||||||
|
this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.$message.warning("该文件类型尚未进行流程设置,将无法发起流程!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getExtAttributeModel(){
|
||||||
|
let _this = this
|
||||||
|
let procDefId = _this.pListData.procDefId
|
||||||
|
let curActDefId = _this.pListData.curActDefId || _this.pListData.actDefId
|
||||||
|
if (procDefId&&curActDefId) {
|
||||||
|
getExtAttributeModel(
|
||||||
|
procDefId,
|
||||||
|
curActDefId
|
||||||
|
).then((res) => {
|
||||||
|
let kuozhanshujuBool = {}
|
||||||
|
let kuozhanshuju = {}
|
||||||
|
let kuozhanshujuLabel = {}
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
kuozhanshujuLabel[item.objKey] = item.objName
|
||||||
|
if (item.objType==='Boolean') {
|
||||||
|
kuozhanshujuBool[item.objKey] = item.objValue
|
||||||
|
} else {
|
||||||
|
kuozhanshuju[item.objKey] = item.objValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
_this.kuozhanshujuBool = kuozhanshujuBool;
|
||||||
|
_this.kuozhanshuju = kuozhanshuju;
|
||||||
|
_this.kuozhanshujuLabel = kuozhanshujuLabel;
|
||||||
|
_this.editStatus =_this.attributeModelBool('edit')&&_this.workflowStatus
|
||||||
|
_this.submitLabel = _this.attributeModelLabel('approve')
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.kuozhanshujuBool = {}
|
||||||
|
_this.kuozhanshuju = {}
|
||||||
|
_this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModelBool(val){
|
||||||
|
if (this.kuozhanshujuBool&&this.kuozhanshujuBool!=={}) {
|
||||||
|
let obj = this.kuozhanshujuBool[val]
|
||||||
|
return obj?obj==='true':false
|
||||||
|
}else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModel(val){
|
||||||
|
return this.kuozhanshuju[val]
|
||||||
|
},
|
||||||
|
attributeModelLabel(val){
|
||||||
|
return this.kuozhanshujuLabel[val]
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.viewShow = false;
|
||||||
|
this.$emit("close")
|
||||||
|
},
|
||||||
|
//不需要验证必填的保存
|
||||||
|
saveForm() {
|
||||||
|
let _this = this
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.loading = true
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.recordStatus = "draft";
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
if (formData.toolId) {
|
||||||
|
updateTool(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let wf_receivers = [];
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: _this.userInfo.userName,
|
||||||
|
receiveUserOrgId: _this.userInfo.deptId
|
||||||
|
});
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procTitle: formData.toolName,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: _this.pListData.actDefName,
|
||||||
|
wf_nextActDefId: _this.pListData.actDefId,
|
||||||
|
},
|
||||||
|
type: formData.type,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
};
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
addTool(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.form.toolId = res.data.businessKey;
|
||||||
|
_this.procInstInfoAndStatus(res.data.procInstId)
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteForm(){
|
||||||
|
let _this = this
|
||||||
|
_this.$modal.confirm('撤销后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
|
||||||
|
.then(()=> {
|
||||||
|
_this.loading = true
|
||||||
|
let formData = {
|
||||||
|
toolId: _this.form.toolId,
|
||||||
|
bpmClientInputModel: {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procInstId: _this.pListData.procInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
review: false,
|
||||||
|
recordStatus: 'cancel',
|
||||||
|
editStatus: false
|
||||||
|
}
|
||||||
|
addTool(formData).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("撤销成功");
|
||||||
|
this.close(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
async submitForm() {
|
||||||
|
let _this = this
|
||||||
|
// 首先页签调整为 信息内容
|
||||||
|
_this.activeName = 'info'
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let dialogVisible = true
|
||||||
|
//审核
|
||||||
|
if (_this.attributeModelBool('approve')) {
|
||||||
|
if (_this.formSubmit.pass==='') {
|
||||||
|
_this.$modal.msgError(_this.submitLabel+"结论不能为空!");
|
||||||
|
return true;
|
||||||
|
} else if (!_this.formSubmit.pass&&!_this.formSubmit.summary) {
|
||||||
|
_this.$modal.msgError("请填写"+_this.submitLabel+"意见");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!!_this.$refs["form"]) {
|
||||||
|
let valid = await _this.$refs["form"].validate()
|
||||||
|
if (!valid) {
|
||||||
|
dialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.searchQuery.pass = _this.formSubmit.pass
|
||||||
|
let defaultStaff = []
|
||||||
|
this.defaultStaff=defaultStaff
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//提交表单和流程数据
|
||||||
|
handleWorkflowSubmit() {
|
||||||
|
let _this = this
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
let wf_receivers = [];
|
||||||
|
if (_this.$refs.prochild.receiveUserList.length < 1 &&_this.$refs.prochild.nextData.actDefType!=='endEvent') {
|
||||||
|
_this.$message.warning("请选择人员!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.$refs.prochild.receiveUserList.forEach((element) => {
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: element.id,
|
||||||
|
receiveUserOrgId: element.parentId,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let wf_nextActDefId = _this.$refs.prochild.nextData.actDefId;
|
||||||
|
let wf_nextActDefName = _this.$refs.prochild.nextData.actDefName;
|
||||||
|
// 显示加载中
|
||||||
|
_this.flowStepLoading = true
|
||||||
|
_this.detailLoading = true
|
||||||
|
if (_this.pListData && _this.pListData.procInstId) {
|
||||||
|
//流程执行参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procTitle: formData.toolName,
|
||||||
|
wf_curActInstId: _this.pListData.curActInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_curComment: _this.formSubmit.summary,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
applyStatus: _this.formSubmit.pass,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
//创建流程参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procTitle: formData.toolName,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (_this.$refs.prochild.nextData.actDefType==='endEvent') {
|
||||||
|
//办结
|
||||||
|
formData.recordStatus = 'done'
|
||||||
|
} else {
|
||||||
|
//进行中
|
||||||
|
formData.recordStatus = 'doing'
|
||||||
|
}
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
addTool(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '流程提交成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
onClose:()=>{
|
||||||
|
_this.flowStepLoading = false
|
||||||
|
_this.detailLoading = false
|
||||||
|
_this.dialogVisible = false;
|
||||||
|
_this.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMonitor() {
|
||||||
|
this.monitorDrawerVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.monitorDrawer.init(this.pListData.procInstId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(dataList,index){
|
||||||
|
dataList.splice(index,1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 新增上传附件
|
||||||
|
*/
|
||||||
|
handleDocAdd() {
|
||||||
|
this.addDocShow = true
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 打开新增页面的回调事件
|
||||||
|
*/
|
||||||
|
openEvent() {
|
||||||
|
this.loading = true
|
||||||
|
this.docQueryParams.toolId = '1111'
|
||||||
|
listDocument(this.queryParams).then(response => {
|
||||||
|
this.docList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
getDeptName(items, id) {
|
||||||
|
let label = ''
|
||||||
|
items.forEach(item => {
|
||||||
|
if(item['id'] == id){
|
||||||
|
label = item['label']
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(label == ''){
|
||||||
|
items.forEach(item => {
|
||||||
|
if (item.children) {
|
||||||
|
label = this.getDeptName(item.children, id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return label
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
607
src/views/workflowList/addWorkflow/use_apply.vue
Normal file
607
src/views/workflowList/addWorkflow/use_apply.vue
Normal file
@ -0,0 +1,607 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading||detailLoading">
|
||||||
|
<div class="drawer-head">
|
||||||
|
<div class="cell-title">
|
||||||
|
<div>
|
||||||
|
<p class="title">新增工具</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cell-btn">
|
||||||
|
<el-button v-if="pListData&&pListData.procInstId" @click="handleMonitor">流程监控</el-button>
|
||||||
|
<el-button v-if="editStatus&&pListData.procInstId" type="danger" @click="deleteForm">撤销</el-button>
|
||||||
|
<el-button v-if="(editStatus||workflowStatus)" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
<el-button v-if="editStatus" type="primary" @click="saveForm" >保存</el-button>
|
||||||
|
<el-button @click="close">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-tabs v-if="pListData&&pListData.procInstId" v-model="activeName">
|
||||||
|
<el-tab-pane label="信息内容" name="info"></el-tab-pane>
|
||||||
|
<el-tab-pane label="审批记录" name="log"></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div class="el-form-border" v-show="activeName==='info'">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
基本信息
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="申请人" prop="userName">
|
||||||
|
<el-input v-if="editStatus" v-model="form.userName" placeholder="请输入申请人"/>
|
||||||
|
<span v-else>{{form.userName}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="申请部门" prop="deptId">
|
||||||
|
<el-input v-if="editStatus" v-model="form.deptId" placeholder="请选择申请部门" maxlength="11"/>
|
||||||
|
<span v-else>{{form.deptId}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="申请理由" prop="reason">
|
||||||
|
<el-input :readonly="!editStatus" v-model="form.reason" type="textarea" :rows="3" maxlength="1000" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="box-title">
|
||||||
|
申请工具
|
||||||
|
</div>
|
||||||
|
<el-table :data="dataList" style="width: 100%">
|
||||||
|
<el-table-column label="工具编号" prop="toolCode" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="工具名称" prop="toolName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="归属单位" prop="toolRespDept" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="负责人" prop="toolPrincipalsName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="工具类别" prop="toolType" :show-overflow-tooltip="true" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div v-if="attributeModelBool('approve')&&workflowStatus">
|
||||||
|
<div class="box-title">
|
||||||
|
{{submitLabel}}
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'结论:'" prop="pass">
|
||||||
|
<el-radio-group v-model.trim="formSubmit.pass">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in passoptions"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.value"
|
||||||
|
>{{ dict.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row >
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item :label="submitLabel+'意见:'">
|
||||||
|
<el-input
|
||||||
|
v-model="formSubmit.summary"
|
||||||
|
type="textarea"
|
||||||
|
:placeholder="'请输入'+submitLabel+'意见'"
|
||||||
|
maxlength="200"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div><!--el-form-border 表单-->
|
||||||
|
<div v-show="activeName==='log'">
|
||||||
|
<workflow-logs :procInstId = "pListData.procInstId"></workflow-logs>
|
||||||
|
</div>
|
||||||
|
<!-- 流程选择下一环节及人员 开始 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择下一环节及人员"
|
||||||
|
v-if="dialogVisible" :visible.sync="dialogVisible"
|
||||||
|
width="60%"
|
||||||
|
append-to-body
|
||||||
|
v-loading = flowStepLoading
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
>
|
||||||
|
<processcode
|
||||||
|
ref="prochild"
|
||||||
|
:searchQuery="searchQuery"
|
||||||
|
:pListData="pListData"
|
||||||
|
:isSummary="isSummary"
|
||||||
|
></processcode>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleWorkflowSubmit"
|
||||||
|
>提 交</el-button
|
||||||
|
>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 流程选择下一环节及人员 结束 -->
|
||||||
|
<monitor-drawer
|
||||||
|
v-if="monitorDrawerVisible"
|
||||||
|
ref="monitorDrawer"
|
||||||
|
></monitor-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { listDocument } from "@/api/document/document";
|
||||||
|
import processcode from "@/views/workflowList/processcode/index.vue";
|
||||||
|
import {
|
||||||
|
workflowprocesskey,
|
||||||
|
getStartActdef,
|
||||||
|
getExtAttributeModel,
|
||||||
|
procInstInfoAndStatus,
|
||||||
|
} from '@/api/my_business/workflow'
|
||||||
|
import WorkflowLogs from '@/views/workflowList/workflowLogs/index.vue'
|
||||||
|
import AddDoc from '@/views/tool/AddDoc.vue'
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
|
import { deptTreeSelect } from "@/api/system/user";
|
||||||
|
import { addApply, getInfoByBpmcId, updateApply } from '@/api/tool/userApply'
|
||||||
|
import { listItem } from '@/api/tool/userApplyItem'
|
||||||
|
// PDF本地文件预览
|
||||||
|
export default {
|
||||||
|
dicts: ['sys_normal_disable','tool_type'],
|
||||||
|
components: {
|
||||||
|
Treeselect, AddDoc,
|
||||||
|
WorkflowLogs,
|
||||||
|
processcode,
|
||||||
|
},
|
||||||
|
name: "Borrow_doc",
|
||||||
|
props: ['data'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 新增时的关联附件
|
||||||
|
dataList: [],
|
||||||
|
addDocShow: false,
|
||||||
|
docQueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
toolId: ''
|
||||||
|
},
|
||||||
|
defaultStaff: [],
|
||||||
|
yes: 'Y',
|
||||||
|
searchQuery: {},
|
||||||
|
deptList: [],
|
||||||
|
companyList: [],
|
||||||
|
deptOptions: [],
|
||||||
|
docClassList: [],
|
||||||
|
submitLabel:undefined,
|
||||||
|
passoptions: [
|
||||||
|
{ value: true, label: "通过" },
|
||||||
|
{ value: false, label: "不通过" },
|
||||||
|
],
|
||||||
|
formSubmit: { summary: "", actionType: "", pass: "" },
|
||||||
|
isSummary: false,
|
||||||
|
activeName: "info",
|
||||||
|
nodeDetail: [],
|
||||||
|
procDefKey: undefined,
|
||||||
|
viewId: "",
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
viewShow: false,
|
||||||
|
monitorDrawerVisible:false,
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: "申请人不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
deptId: [
|
||||||
|
{ required: true, message: '申请人不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
reason: [
|
||||||
|
{ required: true, message: '申请理由不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
kuozhanshuju: {},
|
||||||
|
kuozhanshujuBool: {},
|
||||||
|
kuozhanshujuLabel: {},
|
||||||
|
pListData: {},
|
||||||
|
editStatus:false,
|
||||||
|
workflowStatus: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
loading: false,
|
||||||
|
detailLoading: false,
|
||||||
|
flowStepLoading : false,
|
||||||
|
// 默认密码
|
||||||
|
initPassword: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
data (val) {
|
||||||
|
if (val) {
|
||||||
|
this.init(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.data) {
|
||||||
|
this.init(this.data)
|
||||||
|
}
|
||||||
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
|
this.initPassword = response.msg;
|
||||||
|
});
|
||||||
|
this.getDeptTree()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询部门下拉树结构 */
|
||||||
|
getDeptTree() {
|
||||||
|
deptTreeSelect().then(response => {
|
||||||
|
this.deptOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async init(row) {
|
||||||
|
let _this = this
|
||||||
|
_this.rest(row)
|
||||||
|
_this.loading = true
|
||||||
|
_this.procDefKey = 'Process_DCMGS6M9'
|
||||||
|
_this.form.type = row.type
|
||||||
|
//是否编辑模式
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
if (row && row.procInstId) {
|
||||||
|
let procInstId = row.procInstId
|
||||||
|
_this.workflowStatus = row.status == '1'
|
||||||
|
_this.procInstInfoAndStatus(procInstId)
|
||||||
|
_this.getDetail(procInstId)
|
||||||
|
} else {
|
||||||
|
_this.workflowStatus = true
|
||||||
|
_this.loading = false
|
||||||
|
_this.editStatus = true
|
||||||
|
_this.getWorkflowprocesskey();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getDetail(procInstId) {
|
||||||
|
let _this = this
|
||||||
|
_this.detailLoading = true
|
||||||
|
getInfoByBpmcId(procInstId).then(async (res) => {
|
||||||
|
let formData = res.data;
|
||||||
|
formData.type = _this.form.type
|
||||||
|
_this.form = formData
|
||||||
|
this.getItemList(res.data.id);
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.detailLoading = false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getItemList(id){
|
||||||
|
let _this = this
|
||||||
|
listItem({applyId:id}).then(res=>{
|
||||||
|
_this.dataList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
rest(data){
|
||||||
|
let _this = this
|
||||||
|
_this.activeName = "info"
|
||||||
|
this.dataList = [{...data}]
|
||||||
|
},
|
||||||
|
procInstInfoAndStatus(procInstId){
|
||||||
|
let _this = this
|
||||||
|
procInstInfoAndStatus(procInstId).then((res) => {
|
||||||
|
if (res) {
|
||||||
|
_this.pListData = res
|
||||||
|
}else {
|
||||||
|
_this.pListData = {procInstId:procInstId}
|
||||||
|
}
|
||||||
|
_this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getWorkflowprocesskey() {
|
||||||
|
let _this = this
|
||||||
|
_this.loading = true
|
||||||
|
_this.pListData = {}
|
||||||
|
if (_this.procDefKey) {
|
||||||
|
workflowprocesskey(_this.procDefKey).then((data) => {
|
||||||
|
getStartActdef(data.data.procDefId).then((res) => {
|
||||||
|
_this.pListData = res.data;
|
||||||
|
this.getExtAttributeModel()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.$message.warning("该文件类型尚未进行流程设置,将无法发起流程!");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getExtAttributeModel(){
|
||||||
|
let _this = this
|
||||||
|
let procDefId = _this.pListData.procDefId
|
||||||
|
let curActDefId = _this.pListData.curActDefId || _this.pListData.actDefId
|
||||||
|
if (procDefId&&curActDefId) {
|
||||||
|
getExtAttributeModel(
|
||||||
|
procDefId,
|
||||||
|
curActDefId
|
||||||
|
).then((res) => {
|
||||||
|
let kuozhanshujuBool = {}
|
||||||
|
let kuozhanshuju = {}
|
||||||
|
let kuozhanshujuLabel = {}
|
||||||
|
res.data.forEach(item=>{
|
||||||
|
kuozhanshujuLabel[item.objKey] = item.objName
|
||||||
|
if (item.objType==='Boolean') {
|
||||||
|
kuozhanshujuBool[item.objKey] = item.objValue
|
||||||
|
} else {
|
||||||
|
kuozhanshuju[item.objKey] = item.objValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
_this.kuozhanshujuBool = kuozhanshujuBool;
|
||||||
|
_this.kuozhanshuju = kuozhanshuju;
|
||||||
|
_this.kuozhanshujuLabel = kuozhanshujuLabel;
|
||||||
|
_this.editStatus =_this.attributeModelBool('edit')&&_this.workflowStatus
|
||||||
|
_this.submitLabel = _this.attributeModelLabel('approve')
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
_this.kuozhanshujuBool = {}
|
||||||
|
_this.kuozhanshuju = {}
|
||||||
|
_this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModelBool(val){
|
||||||
|
if (this.kuozhanshujuBool&&this.kuozhanshujuBool!=={}) {
|
||||||
|
let obj = this.kuozhanshujuBool[val]
|
||||||
|
return obj?obj==='true':false
|
||||||
|
}else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
attributeModel(val){
|
||||||
|
return this.kuozhanshuju[val]
|
||||||
|
},
|
||||||
|
attributeModelLabel(val){
|
||||||
|
return this.kuozhanshujuLabel[val]
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.viewShow = false;
|
||||||
|
this.$emit("close")
|
||||||
|
},
|
||||||
|
//不需要验证必填的保存
|
||||||
|
saveForm() {
|
||||||
|
let _this = this
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.loading = true
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.itemList = _this.dataList
|
||||||
|
formData.recordStatus = "draft";
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
if (formData.toolId) {
|
||||||
|
updateApply(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
let wf_receivers = [];
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: _this.userInfo.userName,
|
||||||
|
receiveUserOrgId: _this.userInfo.deptId
|
||||||
|
});
|
||||||
|
let wf_procTitle = _this.dataList[0].toolName
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: _this.pListData.actDefName,
|
||||||
|
wf_nextActDefId: _this.pListData.actDefId,
|
||||||
|
},
|
||||||
|
type: formData.type,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
};
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
addApply(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.form.id = res.data.businessKey;
|
||||||
|
_this.procInstInfoAndStatus(res.data.procInstId)
|
||||||
|
_this.$message({
|
||||||
|
message: '保存成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deleteForm(){
|
||||||
|
let _this = this
|
||||||
|
_this.$modal.confirm('撤销后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
|
||||||
|
.then(()=> {
|
||||||
|
_this.loading = true
|
||||||
|
let formData = {
|
||||||
|
toolId: _this.form.toolId,
|
||||||
|
bpmClientInputModel: {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procInstId: _this.pListData.procInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
review: false,
|
||||||
|
recordStatus: 'cancel',
|
||||||
|
editStatus: false
|
||||||
|
}
|
||||||
|
addApply(formData).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$modal.msgSuccess("撤销成功");
|
||||||
|
this.close(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交
|
||||||
|
async submitForm() {
|
||||||
|
let _this = this
|
||||||
|
// 首先页签调整为 信息内容
|
||||||
|
_this.activeName = 'info'
|
||||||
|
if (!_this.procDefKey) {
|
||||||
|
_this.$message.warning("尚未进行流程设置,将无法发起流程!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let dialogVisible = true
|
||||||
|
//审核
|
||||||
|
if (_this.attributeModelBool('approve')) {
|
||||||
|
if (_this.formSubmit.pass==='') {
|
||||||
|
_this.$modal.msgError(_this.submitLabel+"结论不能为空!");
|
||||||
|
return true;
|
||||||
|
} else if (!_this.formSubmit.pass&&!_this.formSubmit.summary) {
|
||||||
|
_this.$modal.msgError("请填写"+_this.submitLabel+"意见");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!!_this.$refs["form"]) {
|
||||||
|
let valid = await _this.$refs["form"].validate()
|
||||||
|
if (!valid) {
|
||||||
|
dialogVisible = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.searchQuery.pass = _this.formSubmit.pass
|
||||||
|
let defaultStaff = []
|
||||||
|
this.defaultStaff=defaultStaff
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
//提交表单和流程数据
|
||||||
|
handleWorkflowSubmit() {
|
||||||
|
let _this = this
|
||||||
|
let formData = JSON.parse(JSON.stringify(_this.form))
|
||||||
|
formData.itemList = _this.dataList
|
||||||
|
let wf_receivers = [];
|
||||||
|
if (_this.$refs.prochild.receiveUserList.length < 1 &&_this.$refs.prochild.nextData.actDefType!=='endEvent') {
|
||||||
|
_this.$message.warning("请选择人员!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_this.$refs.prochild.receiveUserList.forEach((element) => {
|
||||||
|
wf_receivers.push({
|
||||||
|
receiveUserId: element.id,
|
||||||
|
receiveUserOrgId: element.parentId,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let wf_nextActDefId = _this.$refs.prochild.nextData.actDefId;
|
||||||
|
let wf_nextActDefName = _this.$refs.prochild.nextData.actDefName;
|
||||||
|
// 显示加载中
|
||||||
|
_this.flowStepLoading = true
|
||||||
|
_this.detailLoading = true
|
||||||
|
let wf_procTitle = _this.dataList[0].toolName
|
||||||
|
if (_this.pListData && _this.pListData.procInstId) {
|
||||||
|
//流程执行参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_curActInstId: _this.pListData.curActInstId,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_curComment: _this.formSubmit.summary,
|
||||||
|
wf_curActDefId: _this.pListData.curActDefId,
|
||||||
|
wf_curActDefName: _this.pListData.curActDefName,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
applyStatus: _this.formSubmit.pass,
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type
|
||||||
|
};
|
||||||
|
}else{
|
||||||
|
//创建流程参数
|
||||||
|
formData.bpmClientInputModel = {
|
||||||
|
model: {
|
||||||
|
wf_procTitle: wf_procTitle,
|
||||||
|
wf_nextActDefId: wf_nextActDefId,
|
||||||
|
wf_procDefId: _this.pListData.procDefId,
|
||||||
|
wf_procDefKey: _this.procDefKey,
|
||||||
|
wf_sendUserId: _this.userInfo.userName,
|
||||||
|
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||||
|
wf_receivers: wf_receivers,
|
||||||
|
wf_curActDefName: _this.pListData.actDefName,
|
||||||
|
wf_curActDefId: _this.pListData.actDefId,
|
||||||
|
wf_nextActDefName: wf_nextActDefName,
|
||||||
|
},
|
||||||
|
review: _this.attributeModelBool('approve'),
|
||||||
|
type: formData.type,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (_this.$refs.prochild.nextData.actDefType==='endEvent') {
|
||||||
|
//办结
|
||||||
|
formData.recordStatus = 'done'
|
||||||
|
} else {
|
||||||
|
//进行中
|
||||||
|
formData.recordStatus = 'doing'
|
||||||
|
}
|
||||||
|
formData.editStatus = _this.editStatus
|
||||||
|
addApply(formData).then((res) => {
|
||||||
|
if (res.code===200) {
|
||||||
|
_this.$message({
|
||||||
|
message: '流程提交成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
onClose:()=>{
|
||||||
|
_this.flowStepLoading = false
|
||||||
|
_this.detailLoading = false
|
||||||
|
_this.dialogVisible = false;
|
||||||
|
_this.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleMonitor() {
|
||||||
|
this.monitorDrawerVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.monitorDrawer.init(this.pListData.procInstId);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete(dataList,index){
|
||||||
|
dataList.splice(index,1)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 新增上传附件
|
||||||
|
*/
|
||||||
|
handleDocAdd() {
|
||||||
|
this.addDocShow = true
|
||||||
|
},
|
||||||
|
getDeptName(items, id) {
|
||||||
|
let label = ''
|
||||||
|
items.forEach(item => {
|
||||||
|
if(item['id'] == id){
|
||||||
|
label = item['label']
|
||||||
|
return
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(label == ''){
|
||||||
|
items.forEach(item => {
|
||||||
|
if (item.children) {
|
||||||
|
label = this.getDeptName(item.children, id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return label
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
508
src/views/workflowList/processcode/index.vue
Normal file
508
src/views/workflowList/processcode/index.vue
Normal file
@ -0,0 +1,508 @@
|
|||||||
|
<template>
|
||||||
|
<div class="maincss" v-loading="loading">
|
||||||
|
<div class="title-box">
|
||||||
|
<div class="draw-title">
|
||||||
|
{{ title }}
|
||||||
|
</div>
|
||||||
|
<div class="draw-title">
|
||||||
|
</div>
|
||||||
|
<el-form
|
||||||
|
:model="formSubmit"
|
||||||
|
ref="formSubmit"
|
||||||
|
class="mt10"
|
||||||
|
:rules="formrules"
|
||||||
|
label-position="top"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
|
<div class="h28">办理步骤</div>
|
||||||
|
<el-tree
|
||||||
|
ref="myTree"
|
||||||
|
:data="processList"
|
||||||
|
:props="processProps"
|
||||||
|
node-key="actDefName"
|
||||||
|
@node-click="processNodeClick"
|
||||||
|
style="border: 1px solid rgb(230, 235, 245); height: 314px;overflow: auto"
|
||||||
|
highlight-current
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" v-show="processList&&processList.length>0&&nextData&&nextData.actDefType != 'endEvent'">
|
||||||
|
<div class="h28">待选用户
|
||||||
|
<!-- <el-button type="primary" style="float: right" size="mini" @click="handleSelect">通讯录</el-button>-->
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model.trim="userTreeName"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
prefix-icon="el-icon-search"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-tree
|
||||||
|
ref="userTree"
|
||||||
|
:data="userList"
|
||||||
|
:props="userProps"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
:highlight-current="true"
|
||||||
|
:default-expand-all="true"
|
||||||
|
@node-click="userNodeClick"
|
||||||
|
style="border: 1px solid rgb(230, 235, 245); height: 282px;overflow: auto"
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" v-show="processList&&processList.length>0&&nextData&&nextData.actDefType != 'endEvent'">
|
||||||
|
<div class="h28">已选用户</div>
|
||||||
|
<div
|
||||||
|
class="wordbox"
|
||||||
|
style="border: 1px solid rgb(230, 235, 245); height: 314px;overflow: auto"
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item, index) in receiveUserList" :key="index">
|
||||||
|
<div class="inli">
|
||||||
|
<i class="el-icon-s-custom"></i>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
<i v-if="editStatus" class="el-icon-close" @click="removeData(item)"></i>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" class="mt10" v-if="istongguo">
|
||||||
|
<el-form-item label="是否通过" prop="pass">
|
||||||
|
<el-radio-group v-model.trim="pass">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" class="mt10">
|
||||||
|
<el-form-item
|
||||||
|
label="是否加入档案:"
|
||||||
|
prop="joinDoc"
|
||||||
|
v-if="formSubmit.actDefId == 'EndEvent_0qwgu4i'"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model.trim="formSubmit.joinDoc">
|
||||||
|
<el-radio :label="true">是</el-radio>
|
||||||
|
<el-radio :label="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" v-if="isSummary" class="mt10">
|
||||||
|
<el-form-item label="审核意见:">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="formSubmit.summary"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入审核意见"
|
||||||
|
maxlength="200"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 4 }"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
workflowNextactsNew2,
|
||||||
|
getNextactuserByPending,
|
||||||
|
getNextActUsersByNew,
|
||||||
|
getExtAttributeModel,
|
||||||
|
selectUserStyle
|
||||||
|
} from "@/api/my_business/workflow";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
searchQuery:{
|
||||||
|
type: Object,
|
||||||
|
default: {},
|
||||||
|
},
|
||||||
|
hideNodeCode: {
|
||||||
|
type: Array,
|
||||||
|
default: ()=>[],
|
||||||
|
},
|
||||||
|
isSummary: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
defaultStaff: {
|
||||||
|
type: Object,
|
||||||
|
default: undefined,
|
||||||
|
},
|
||||||
|
pListData: {},
|
||||||
|
data: {},
|
||||||
|
title: {},
|
||||||
|
detatailsData: {},
|
||||||
|
promptContent: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
summary: "",
|
||||||
|
editStatus: true,
|
||||||
|
formSubmit: { summary: "" },
|
||||||
|
processList: [],
|
||||||
|
processProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "actDefName",
|
||||||
|
},
|
||||||
|
userProps: {
|
||||||
|
children: "children",
|
||||||
|
label: function (data, node) {
|
||||||
|
if (data.type == "USER") {
|
||||||
|
return data.id+' '+data.name
|
||||||
|
} else {
|
||||||
|
return data.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
formrules: {
|
||||||
|
summary: [{ required: true, message: " ", trigger: "change" }],
|
||||||
|
pass: [{ required: true, message: " ", trigger: "change" }],
|
||||||
|
},
|
||||||
|
userTreeName:undefined,
|
||||||
|
receiveUserList: [],
|
||||||
|
userList: [],
|
||||||
|
loading: true,
|
||||||
|
nextData: {},
|
||||||
|
procDefKey: "",
|
||||||
|
actionType: "",
|
||||||
|
wf_actionType: "",
|
||||||
|
actDefType: "", //actDefType: "endEvent" 判断流程到哪一步了
|
||||||
|
pass: "", //是否通过
|
||||||
|
kuozhanshuju: "",
|
||||||
|
istongguo: false,
|
||||||
|
morendta: undefined,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getOptionsList();
|
||||||
|
console.log("xuanren", this.pListData);
|
||||||
|
if (this.pListData.procDefKey != "") {
|
||||||
|
this.procDefKey = this.pListData.procDefKey;
|
||||||
|
}
|
||||||
|
//this.$emit("yingchanbohui", false);
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
actionType: function (val) {
|
||||||
|
this.wf_actionType = val;
|
||||||
|
},
|
||||||
|
"formSubmit.summary": function (val) {
|
||||||
|
this.summary = val;
|
||||||
|
//console.log(val);
|
||||||
|
},
|
||||||
|
pass(val) {
|
||||||
|
console.log(val);
|
||||||
|
},
|
||||||
|
// 根据名称筛选树
|
||||||
|
userTreeName(val) {
|
||||||
|
this.$refs.userTree.filter(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOptionsList() {
|
||||||
|
let _this = this
|
||||||
|
let searchQuery = this.searchQuery
|
||||||
|
searchQuery.procDefId = _this.pListData.procDefId
|
||||||
|
if (!!_this.pListData.curActInstId) {
|
||||||
|
searchQuery.curActInstId= _this.pListData.curActInstId
|
||||||
|
// 增加参数:当前环节定义ID【用于步骤已执行标记】
|
||||||
|
searchQuery.curActDefId = _this.pListData.curActDefId
|
||||||
|
}else{
|
||||||
|
searchQuery.curActDefId= _this.pListData.actDefId
|
||||||
|
}
|
||||||
|
// 增加参数:流程实例ID【用于步骤已执行标记】
|
||||||
|
searchQuery.procInstId = _this.pListData.procInstId
|
||||||
|
_this.loading = true
|
||||||
|
workflowNextactsNew2(searchQuery)
|
||||||
|
.then((res) => {
|
||||||
|
_this.processList = res.data.filter(item=>!_this.hideNodeCode.includes(item.actDefId));
|
||||||
|
// 关闭遮罩
|
||||||
|
_this.loading = false
|
||||||
|
// 自动识别是否默认选中第一个步骤
|
||||||
|
if(_this.processList.length > 0) {
|
||||||
|
// 默认选中第一个步骤
|
||||||
|
// 此方法内有打开遮罩和关闭遮罩
|
||||||
|
_this.processNodeClick(_this.processList[0]);
|
||||||
|
_this.actDefType = res.data[0].actDefType;
|
||||||
|
_this.$nextTick(() => {
|
||||||
|
// 步骤清单默认选中第一个步骤
|
||||||
|
_this.$refs.myTree.setCurrentKey(_this.processList[0].actDefName);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
_this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
processNodeClick(val){
|
||||||
|
let _this = this
|
||||||
|
if (!!_this.pListData.curActInstId) {
|
||||||
|
_this.processNodeClick1(val);
|
||||||
|
}else {
|
||||||
|
_this.processNodeClick2(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//流程节点点击触发 带出可选成员
|
||||||
|
processNodeClick1(val) {
|
||||||
|
let _this = this
|
||||||
|
if (this.nextData != "") {
|
||||||
|
if (val.actDefName == this.nextData.actDefName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.nextData = val;
|
||||||
|
this.userList = []; //代选
|
||||||
|
this.receiveUserList = []; //已选
|
||||||
|
let params = {
|
||||||
|
userOrgId: _this.userInfo.deptId,
|
||||||
|
curActInstId: this.pListData.curActInstId,
|
||||||
|
destActDefId: val.actDefId,
|
||||||
|
// 当前环节ID、流程定义ID、流程实例ID
|
||||||
|
curActDefId: this.pListData.curActDefId,
|
||||||
|
procDefKey: this.pListData.procDefKey,
|
||||||
|
procInstId: this.pListData.procInstId,
|
||||||
|
};
|
||||||
|
_this.loading = true
|
||||||
|
getNextactuserByPending(params)
|
||||||
|
.then((res) => {
|
||||||
|
// 获取流程待选人员展示方式
|
||||||
|
_this.loading = true
|
||||||
|
selectUserStyle(params).then((selectRes) => {
|
||||||
|
if(selectRes.data == 'tree') {
|
||||||
|
// 树形结构展示
|
||||||
|
_this.userList = this.handleTree(res.data, "id");
|
||||||
|
} else {
|
||||||
|
// 平铺结构展示
|
||||||
|
_this.userList = res.data.filter(item => item.type==='USER')
|
||||||
|
if (_this.defaultStaff&&_this.defaultStaff.length>0) {
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
JSON.parse(item.users).forEach(item=>{
|
||||||
|
let user = _this.userList.find(user=>user.id===item.userName)
|
||||||
|
if (!user) {
|
||||||
|
_this.userList.push({
|
||||||
|
type: 'USER',
|
||||||
|
id:item.userName,
|
||||||
|
realId: item.userName,
|
||||||
|
parentId: item.deptId,
|
||||||
|
name: item.nickName,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let defaultStaffIds = []
|
||||||
|
if (_this.defaultStaff&&_this.defaultStaff.length>0) {
|
||||||
|
//设定了流程默认执行人
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
defaultStaffIds = JSON.parse(item.users).map(user=>user.userName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (defaultStaffIds.length>0) {
|
||||||
|
let userList = []
|
||||||
|
_this.defaultUserList(userList,defaultStaffIds,_this.userList)
|
||||||
|
userList.forEach(user=>{
|
||||||
|
_this.userNodeClick(user);
|
||||||
|
})
|
||||||
|
_this.editStatus = true
|
||||||
|
} else {
|
||||||
|
_this.editStatus = true
|
||||||
|
//如果待选人员里就一个人,自动加入到已选人员名单里z
|
||||||
|
this.rtuserList(res.data);
|
||||||
|
if (this.morendta) {
|
||||||
|
this.userNodeClick(this.morendta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 关闭遮挡
|
||||||
|
_this.loading = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
_this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
processNodeClick2(val) {
|
||||||
|
let _this = this
|
||||||
|
console.log("业务数据====>", this.pListData);
|
||||||
|
if (this.nextData != "") {
|
||||||
|
if (val.actDefName == this.nextData.actDefName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.nextData = val;
|
||||||
|
console.log("nextData", this.nextData);
|
||||||
|
this.userList = []; //代选
|
||||||
|
this.receiveUserList = []; //已选
|
||||||
|
let params = {
|
||||||
|
procDefId:this.pListData.procDefId,
|
||||||
|
userOrgId: this.userInfo.deptId,
|
||||||
|
curActDefId: this.pListData.actDefId,
|
||||||
|
destActDefId: val.actDefId,
|
||||||
|
};
|
||||||
|
_this.loading = true
|
||||||
|
getNextActUsersByNew(params).then((res) => {
|
||||||
|
// 获取流程待选人员展示方式
|
||||||
|
selectUserStyle(params).then((selectRes) => {
|
||||||
|
if(selectRes.data == 'tree') {
|
||||||
|
// 树形结构展示
|
||||||
|
_this.userList = this.handleTree(res.data, "id");
|
||||||
|
} else {
|
||||||
|
// 平铺结构展示
|
||||||
|
_this.userList = res.data.filter(item => item.type==='USER')
|
||||||
|
if (_this.defaultStaff&&_this.defaultStaff.length>0) {
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
JSON.parse(item.users).forEach(item=>{
|
||||||
|
let user = _this.userList.find(user=>user.id===item.userName)
|
||||||
|
if (!user) {
|
||||||
|
_this.userList.push({
|
||||||
|
type: 'USER',
|
||||||
|
id:item.userName,
|
||||||
|
realId: item.userName,
|
||||||
|
parentId: item.deptId,
|
||||||
|
name: item.nickName,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let defaultStaffIds = []
|
||||||
|
if (_this.defaultStaff) {
|
||||||
|
//设定了流程默认执行人
|
||||||
|
let item=_this.defaultStaff.find(item=>item.nodeCode===val.actDefId)
|
||||||
|
if (item&&item.users) {
|
||||||
|
defaultStaffIds = JSON.parse(item.users).map(user=>user.userName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (defaultStaffIds.length>0) {
|
||||||
|
let userList = []
|
||||||
|
_this.defaultUserList(userList,defaultStaffIds,_this.userList)
|
||||||
|
userList.forEach(user=>{
|
||||||
|
this.userNodeClick(user);
|
||||||
|
})
|
||||||
|
_this.editStatus = false
|
||||||
|
} else {
|
||||||
|
_this.editStatus = true
|
||||||
|
//如果待选人员里就一个人,就自己加入到已选人员名单里z
|
||||||
|
this.rtuserList(res.data);
|
||||||
|
if (this.morendta) {
|
||||||
|
this.userNodeClick(this.morendta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_this.loading = false
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//点击成员 导入可选成员
|
||||||
|
userNodeClick(val) {
|
||||||
|
// console.log("val", val);
|
||||||
|
if (val.type == "USER"&&this.editStatus) {
|
||||||
|
if (this.nextData.multi){
|
||||||
|
// 多人处理环节
|
||||||
|
let arr = this.receiveUserList.filter((x) => x.id === val.id);
|
||||||
|
if (arr.length <= 0) {
|
||||||
|
this.receiveUserList.push(val);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
// 单人处理环节
|
||||||
|
this.receiveUserList = [val]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//移除成员
|
||||||
|
removeData(item) {
|
||||||
|
var arr = [];
|
||||||
|
this.receiveUserList.forEach((element) => {
|
||||||
|
if (element.id != item.id) {
|
||||||
|
arr.push(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.receiveUserList = arr;
|
||||||
|
},
|
||||||
|
defaultUserList(userList,ids,data) {
|
||||||
|
data.forEach(item=>{
|
||||||
|
if (ids.includes(item.id)) {
|
||||||
|
userList.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
rtuserList(originalData) {
|
||||||
|
let userList = originalData.filter(item => item.type==='USER')
|
||||||
|
if (userList.length == 1) {
|
||||||
|
// 若是用户节点直接设置成为已选用户
|
||||||
|
this.morendta = userList[0];
|
||||||
|
} else {
|
||||||
|
this.morendta = undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 从组织用户结构树中寻找叶子节点,不需要的
|
||||||
|
filterUserNode(data) {
|
||||||
|
if(data.type == "USER") {
|
||||||
|
// 若是用户节点就返回
|
||||||
|
return data
|
||||||
|
} else if(data.hasOwnProperty("children")) {
|
||||||
|
let list = data.children;
|
||||||
|
for(var i=0;i<list.length;i++) {
|
||||||
|
let item = list[i];
|
||||||
|
if(item.type != "USER") {
|
||||||
|
let res = this.filterUserNode(item)
|
||||||
|
if(res != null) {
|
||||||
|
// 返回出方法
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 若是用户节点就返回
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.id.toLowerCase().indexOf(value.toLowerCase()) !== -1||data.name.toLowerCase().indexOf(value.toLowerCase()) !== -1
|
||||||
|
},
|
||||||
|
handleSelect() {
|
||||||
|
let _this = this
|
||||||
|
_this.$nextTick(()=>{
|
||||||
|
_this.$refs.userList.init(null,null,null)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmitUser(source,index,user) {
|
||||||
|
let val = {
|
||||||
|
type: 'USER',
|
||||||
|
id: user.userName,
|
||||||
|
name: user.nickName,
|
||||||
|
parentId: user.dept.deptId,
|
||||||
|
realId: user.userName,
|
||||||
|
}
|
||||||
|
this.userNodeClick(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.h28{
|
||||||
|
height: 28px;line-height: 28px
|
||||||
|
}
|
||||||
|
</style>
|
60
src/views/workflowList/workflowLogs/index.vue
Normal file
60
src/views/workflowList/workflowLogs/index.vue
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container document_changeindex el-card is-always-shadow">
|
||||||
|
<el-card class="gray-card" style="width: 60%">
|
||||||
|
<el-table v-loading="loading" :data="dataList">
|
||||||
|
<el-table-column label="环节" align="left" prop="actDefName" width="200px"/>
|
||||||
|
<el-table-column label="意见" align="left" prop="opinion" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span :style="{color:passList[scope.row.pass].color}">{{ passList[scope.row.pass].label }}</span><br/>
|
||||||
|
<span>{{ scope.row.opinion }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作信息" align="left" prop="createTime" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.deptName }}</span>
|
||||||
|
<span style="margin-left:10px;">{{ scope.row.nickName }}</span>
|
||||||
|
<span style="margin-left:20px;color:#AAAAAA">{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { selectLogByProcInstId } from "@/api/my_business/workflow";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "WorkflowLogs",
|
||||||
|
props: ["procInstId"],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
dataList: [],
|
||||||
|
passList: { 'true':{label:'通过',color:'#70B603'},'false':{label:'不通过',color:'#D9001B'}},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
procInstId (val) {
|
||||||
|
if (val) {
|
||||||
|
this.getList(val)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
if (this.procInstId) {
|
||||||
|
this.getList(this.procInstId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询岗位列表 */
|
||||||
|
getList(procInstId) {
|
||||||
|
this.loading = true;
|
||||||
|
selectLogByProcInstId({procInstId:procInstId,review:true}).then(response => {
|
||||||
|
this.dataList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
51
src/views/workflowList/workflowRouter.vue
Normal file
51
src/views/workflowList/workflowRouter.vue
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<template>
|
||||||
|
<main-component ref="mainComponent" :code="code" :data="data" @close="handleCloseChange"></main-component>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MainComponent from "@/components/mainComponent/index.vue";
|
||||||
|
export default {
|
||||||
|
name: "workflowRouter",
|
||||||
|
dicts: [],
|
||||||
|
components: {
|
||||||
|
MainComponent,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
path: 'views/workflowList/addWorkflow/',
|
||||||
|
code: '',
|
||||||
|
data: undefined,
|
||||||
|
status: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.handleDetails(this.$route.query);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetails(row) {
|
||||||
|
let _this = this
|
||||||
|
if (row.type&&_this.status) {
|
||||||
|
_this.code = _this.path + row.type
|
||||||
|
_this.data = row
|
||||||
|
}
|
||||||
|
},
|
||||||
|
init(row){
|
||||||
|
let _this = this
|
||||||
|
_this.code = _this.path + row.type
|
||||||
|
_this.data = row
|
||||||
|
_this.status = false
|
||||||
|
},
|
||||||
|
handleCloseChange() {
|
||||||
|
let _this = this
|
||||||
|
if (_this.status) {
|
||||||
|
window.parent.postMessage({type:"close"})
|
||||||
|
}else{
|
||||||
|
_this.$emit("closeDrawer")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
@ -1,542 +1,277 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container"><!--从这一层开始嵌入页面-->
|
<div class="app-container"><!--从这一层开始嵌入页面-->
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form label-width="80px">
|
<el-form label-width="80px">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form-item label="流程标题">
|
<el-form-item label="流程标题">
|
||||||
<el-input placeholder="输入流程标题"></el-input>
|
<el-input placeholder="输入流程标题" v-model.trim="queryParams.title"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh-left">重置</el-button>
|
<el-button icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
|
||||||
</div><!--search 搜索-->
|
</div><!--search 搜索-->
|
||||||
</el-form><!--el-form-->
|
</el-form><!--el-form-->
|
||||||
</el-card><!--el-card-->
|
</el-card><!--el-card-->
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-tabs v-model="activeName3" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="state">
|
||||||
<el-tab-pane label="待办(4)" name="first">
|
<el-tab-pane :label="'待办('+ statustotal+')'" name="taskToDo">
|
||||||
<el-table :data="tableData5" style="width: 100%" height="529">
|
<el-table :data="postList" style="width: 100%" height="529">
|
||||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
<el-table-column prop="procDefName" label="流程类型"></el-table-column>
|
||||||
<el-table-column prop="prop2" label="流程标题">【使用申请】工具名称11</el-table-column>
|
<el-table-column prop="title" label="流程标题"></el-table-column>
|
||||||
<el-table-column prop="prop3" label="当前环节"></el-table-column>
|
<el-table-column prop="curActDefName" label="当前环节"></el-table-column>
|
||||||
<el-table-column prop="prop4" label="上一环节"></el-table-column>
|
<el-table-column prop="prevActDefName" label="上一环节"></el-table-column>
|
||||||
<el-table-column prop="prop5" label="上一环节处理人"></el-table-column>
|
<el-table-column prop="sendUserName" label="上一环节处理人"></el-table-column>
|
||||||
<el-table-column prop="prop6" label="发起人"></el-table-column>
|
<el-table-column prop="startUserName" label="发起人"></el-table-column>
|
||||||
<el-table-column prop="prop7" label="接收时间"></el-table-column>
|
<el-table-column prop="sendTime" label="接收时间">
|
||||||
<el-table-column label="操作" width="100" >
|
|
||||||
<el-button type="text" icon="el-icon-info" @click="drawer1 = true">详情</el-button>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
<el-pagination :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400"></el-pagination>
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
<el-tab-pane label="已办(10)" name="second">
|
|
||||||
<el-table :data="tableData6" style="width: 100%" height="529">
|
|
||||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="流程标题"><a>【使用申请】工具名称1</a></el-table-column>
|
|
||||||
<el-table-column prop="prop8" label="流程状态">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :class="getClassName(scope.row.prop8)">{{ scope.row.prop8 }}</span>
|
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="prop3" label="处理环节"></el-table-column>
|
|
||||||
<el-table-column prop="prop4" label="上一环节"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="上一环节处理人"></el-table-column>
|
|
||||||
<el-table-column prop="prop6" label="发起人"></el-table-column>
|
|
||||||
<el-table-column prop="prop7" label="接收时间"></el-table-column>
|
|
||||||
<el-table-column label="操作" width="100" >
|
<el-table-column label="操作" width="100" >
|
||||||
<el-button type="text" icon="el-icon-info" @click="drawer1 = true">详情</el-button>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
<el-pagination :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400"></el-pagination>
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
<el-tab-pane label="办结(10)" name="third">
|
|
||||||
<el-table :data="tableData7" style="width: 100%" height="529">
|
|
||||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="流程标题">【使用申请】工具名称1</el-table-column>
|
|
||||||
<el-table-column label="流程状态">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :class="getClassName(scope.row.prop3)">{{ scope.row.prop3 }}</span>
|
<el-button type="text" icon="el-icon-info" @click="handleDeal(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table><!--el-table-->
|
||||||
|
<el-pagination @current-change="getListData" v-show="total > 0" :current-page="queryParams.pageNumber" :page-sizes="pageSizes" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||||
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
|
<el-tab-pane :label="'已办('+doneTotal+')'" name="taskDealed">
|
||||||
|
<el-table :data="postList" style="width: 100%" height="529">
|
||||||
|
<el-table-column prop="procDefName" label="流程类型"></el-table-column>
|
||||||
|
<el-table-column prop="title" label="流程标题"></el-table-column>
|
||||||
|
<el-table-column prop="curActDefName" label="处理环节"></el-table-column>
|
||||||
|
<el-table-column prop="prevActDefName" label="上一环节"></el-table-column>
|
||||||
|
<el-table-column prop="sendUserName" label="上一环节处理人"></el-table-column>
|
||||||
|
<el-table-column prop="startUserName" label="发起人"></el-table-column>
|
||||||
|
<el-table-column prop="sendTime" label="接收时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="prop4" label="发起人"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="发起时间"></el-table-column>
|
|
||||||
<el-table-column prop="prop6" label="接收时间"></el-table-column>
|
|
||||||
<el-table-column label="操作" width="100" >
|
<el-table-column label="操作" width="100" >
|
||||||
<el-button type="text" icon="el-icon-info" @click="drawer1 = true">详情</el-button>
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" icon="el-icon-info" @click="handleDeal(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table><!--el-table-->
|
</el-table><!--el-table-->
|
||||||
<el-pagination :current-page="currentPage4" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400"></el-pagination>
|
<el-pagination @current-change="getListData" v-show="total > 0" :current-page="queryParams.pageNumber" :page-sizes="pageSizes" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||||
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
|
<el-tab-pane :label="'办结('+finishedTotal+')'" name="taskFinish">
|
||||||
|
<el-table :data="postList" style="width: 100%" height="529">
|
||||||
|
<el-table-column prop="procDefName" label="流程类型"></el-table-column>
|
||||||
|
<el-table-column prop="title" label="流程标题"></el-table-column>
|
||||||
|
<el-table-column prop="startUserName" label="发起人"></el-table-column>
|
||||||
|
<el-table-column prop="startTime" label="发起时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startTime,'{y}-{m}-{d}')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="sendTime" label="接收时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" icon="el-icon-info" @click="handleDeal(scope.row)">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table><!--el-table-->
|
||||||
|
<el-pagination @current-change="getListData" v-show="total > 0" :current-page="queryParams.pageNumber" :page-sizes="pageSizes" :page-size="queryParams.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
</el-tab-pane><!--el-tab-pane-->
|
||||||
</el-tabs><!--el-tabs-->
|
</el-tabs><!--el-tabs-->
|
||||||
</el-card><!--el-card-->
|
</el-card>
|
||||||
|
<!-- 流程处理抽屉组件 -->
|
||||||
<el-drawer :visible.sync="drawer1" :direction="direction" :before-close="handleClose" size="75%">
|
<DealDrawer v-if="dealDrawerShow" ref="dealDrawer" @closeDrawer="handleCloseChange"></DealDrawer>
|
||||||
<template #title>
|
</div>
|
||||||
<span>申请使用</span>
|
|
||||||
<div class="drawer-head-btn">
|
|
||||||
<el-button @click="drawer2 = true">流程监控</el-button>
|
|
||||||
<el-button type="primary" v-if="activeName3 == 'first'">提交</el-button>
|
|
||||||
<el-button>取消</el-button>
|
|
||||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
|
||||||
</template>
|
|
||||||
<el-tabs v-model="activeName1" @tab-click="handleClick">
|
|
||||||
<el-tab-pane label="信息内容" name="first">
|
|
||||||
<div class="el-form-border">
|
|
||||||
<el-form ref="form" label-width="150px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请人">张莹</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请部门">信息部</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="申请理由">
|
|
||||||
<el-input type="textarea" maxlength="1000" placeholder="工作需要额外申请,请批准!" :disabled="true"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form><!--el-form-->
|
|
||||||
</div><!--el-form-border 表单-->
|
|
||||||
<div class="divide double"></div><!--divide 分隔-->
|
|
||||||
<div class="tboper">
|
|
||||||
<div class="tit">申请工具</div>
|
|
||||||
</div><!--tboper 标题与操作按钮-->
|
|
||||||
<el-table :data="tableData2" style="width: 100%">
|
|
||||||
<el-table-column prop="prop1" label="工具编号"></el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="工具名称"></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="工具类别" ></el-table-column>
|
|
||||||
<el-table-column prop="prop3" label="归属单位"> </el-table-column>
|
|
||||||
<el-table-column prop="prop4" label="负责人"></el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
<div class="divide double"></div><!--divide 分隔-->
|
|
||||||
<div class="tboper" v-if="activeName3 == 'first'">
|
|
||||||
<div class="tit">审批信息</div>
|
|
||||||
</div><!--tboper 标题与操作按钮-->
|
|
||||||
<div class="el-form-border" v-if="activeName3 == 'first'">
|
|
||||||
<el-form ref="form" label-width="150px">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="审批结论">
|
|
||||||
<el-radio-group v-model="radio1">
|
|
||||||
<el-radio label="1">通过</el-radio>
|
|
||||||
<el-radio label="2" >不通过</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="审批理由">
|
|
||||||
<el-input type="textarea" rows="4" maxlength="1000" placeholder="请输入" show-word-limit></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form><!--el-form-->
|
|
||||||
</div><!--el-form-border 表单-->
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
<el-tab-pane label="审批记录" name="second">
|
|
||||||
<el-table :data="tableData4" style="width: 100%">
|
|
||||||
<el-table-column prop="prop4" label="处理人"></el-table-column>
|
|
||||||
<el-table-column prop="prop3" label="处理环节"> </el-table-column>
|
|
||||||
<el-table-column prop="prop2" label="接收人"></el-table-column>
|
|
||||||
<el-table-column prop="prop1" label="接收环节"></el-table-column>
|
|
||||||
<el-table-column prop="prop7" label="处理时间" ></el-table-column>
|
|
||||||
<el-table-column prop="prop5" label="审批意见" ></el-table-column>
|
|
||||||
</el-table><!--el-table-->
|
|
||||||
</el-tab-pane><!--el-tab-pane-->
|
|
||||||
</el-tabs><!--el-tabs-->
|
|
||||||
</el-drawer><!--el-drawer 申请详情-抽屉-->
|
|
||||||
|
|
||||||
<el-drawer :visible.sync="drawer2" :direction="direction" :before-close="handleClose" size="75%">
|
|
||||||
<template #title>
|
|
||||||
<span>流程监控</span>
|
|
||||||
</template>
|
|
||||||
<div class="lctitle">流程标题:【申请使用】工具名称1 ,流程定义名称:申请使用流程</div><!--lctitle-->
|
|
||||||
<img style="width:auto; max-width: 100%;" src="../../../../public/images/lcjk1.jpg" />
|
|
||||||
</el-drawer><!--el-drawer 流程监控-抽屉-->
|
|
||||||
</div><!--app-container-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import { workflowToDoList } from "@/api/my_business/workflow";
|
||||||
name: 'dispose',
|
import DealDrawer from "@/components/DealDrawer";
|
||||||
|
export default {
|
||||||
|
name: "Post",
|
||||||
|
dicts: ["sys_normal_disable", "sys_operterType"],
|
||||||
|
components: {
|
||||||
|
DealDrawer
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
drawer1: false,
|
pageSizes: [10,20,50,100],
|
||||||
drawer2: false,
|
dealDrawerShow: false,
|
||||||
activeName1: 'first',
|
boxClass: false,
|
||||||
activeName2: 'second',
|
// 遮罩层
|
||||||
activeName3: 'first',
|
loading: true,
|
||||||
radio1: '1',
|
// 显示搜索条件
|
||||||
tableData1: [
|
showSearch: true,
|
||||||
{
|
// 总条数
|
||||||
prop1: '使用申请',
|
total: 0,
|
||||||
prop2: '进行中',
|
// 表格数据
|
||||||
prop3: '直接领导审核',
|
postList: [],
|
||||||
prop4: '赵宇',
|
// 弹出层标题
|
||||||
prop5: '2024/02/09 12:00',
|
title: "",
|
||||||
prop6: '2024/02/09 12:00',
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
title: "",
|
||||||
|
status: 1,
|
||||||
},
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
postName: [
|
||||||
{
|
{
|
||||||
prop1: '使用申请',
|
required: true,
|
||||||
prop2: '已办结',
|
message: "不能为空",
|
||||||
prop3: '直接领导审核',
|
trigger: "blur",
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '进行中',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop2: '已办结',
|
|
||||||
prop3: '直接领导审核',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData2: [
|
|
||||||
{
|
|
||||||
prop1: '0021',
|
|
||||||
prop2: '工具名称1',
|
|
||||||
prop3: '人力资源部/培训组',
|
|
||||||
prop4: '赵宇',
|
|
||||||
prop5: '网络工具',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '0022',
|
|
||||||
prop2: '工具名称2',
|
|
||||||
prop3: '人力资源部/招聘组',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '网络工具',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '0023',
|
|
||||||
prop2: '工具名称3',
|
|
||||||
prop3: '人力资源部/薪资组',
|
|
||||||
prop4: '孙瑶',
|
|
||||||
prop5: '网络工具',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData3: [
|
|
||||||
{
|
|
||||||
prop1: '总监批准',
|
|
||||||
prop2: '不通过',
|
|
||||||
prop3: '赵宇 ',
|
|
||||||
prop4: '总裁办',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '部门领导审核',
|
|
||||||
prop2: '通过',
|
|
||||||
prop3: '钱多多',
|
|
||||||
prop4: '设备部',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '管理员审核',
|
|
||||||
prop2: '通过',
|
|
||||||
prop3: '孙瑶',
|
|
||||||
prop4: '人力资源部',
|
|
||||||
prop5: '2024/02/09 12:00',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData4: [
|
|
||||||
{
|
|
||||||
prop1: '部门领导审核',
|
|
||||||
prop2: '张宇',
|
|
||||||
prop3: '管理员审核 ',
|
|
||||||
prop4: '赵定',
|
|
||||||
prop5: '同意',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
prop7: '2024/02/09 12:03',
|
|
||||||
prop8: '耗时0天',
|
|
||||||
prop9: '已完成',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '管理员审核',
|
|
||||||
prop2: '赵定',
|
|
||||||
prop3: '直接领导审核 ',
|
|
||||||
prop4: '钱多多',
|
|
||||||
prop5: '同意',
|
|
||||||
prop6: '2024/02/09 12:00',
|
|
||||||
prop7: '2024/02/09 12:03',
|
|
||||||
prop8: '耗时0天',
|
|
||||||
prop9: '已完成',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData5: [
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '总经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张庆幸',
|
|
||||||
prop6: '王慧',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '总监审核',
|
|
||||||
prop4: '部门经理审核',
|
|
||||||
prop5: '刘宁',
|
|
||||||
prop6: '赵媛',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
}
|
|
||||||
],
|
|
||||||
tableData6: [
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '总经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张庆幸',
|
|
||||||
prop6: '王慧',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '总监审核',
|
|
||||||
prop4: '部门经理审核',
|
|
||||||
prop5: '刘宁',
|
|
||||||
prop6: '赵媛',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '不通过',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '不通过',
|
|
||||||
prop3: '总经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张庆幸',
|
|
||||||
prop6: '王慧',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '总监审核',
|
|
||||||
prop4: '部门经理审核',
|
|
||||||
prop5: '刘宁',
|
|
||||||
prop6: '赵媛',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '部门经理审核',
|
|
||||||
prop4: '直接领导审核',
|
|
||||||
prop5: '张鑫辉',
|
|
||||||
prop6: '张慧玉',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop8: '通过',
|
|
||||||
prop3: '管理员审核',
|
|
||||||
prop4: '总监审核',
|
|
||||||
prop5: '柳青',
|
|
||||||
prop6: '刘青',
|
|
||||||
prop7: '2022/10/10 12:00',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
tableData7: [
|
postCode: [
|
||||||
{
|
{
|
||||||
prop1: '使用申请',
|
required: true,
|
||||||
prop3: '通过',
|
message: "不能为空",
|
||||||
prop4: '张鑫辉',
|
trigger: "blur",
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '不通过',
|
|
||||||
prop4: '柳青',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '张庆幸',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '刘宁',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '不通过',
|
|
||||||
prop4: '张鑫辉',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '柳青',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '张庆幸',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '刘宁',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '张鑫辉',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop1: '使用申请',
|
|
||||||
prop3: '通过',
|
|
||||||
prop4: '柳青',
|
|
||||||
prop5: '2024/02/08 07:00',
|
|
||||||
prop6: '2024/02/10 12:00',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
postSort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "不能为空",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
doneTotal: 0,
|
||||||
|
finishedTotal: 0,
|
||||||
|
taskData: [], // 任务数据
|
||||||
|
deptOptions: [],
|
||||||
|
drawer: false,
|
||||||
|
taskFormData: {},
|
||||||
|
varChangeColor1: true,
|
||||||
|
varChangeColor2: false,
|
||||||
|
pListData: {},
|
||||||
|
statustotal: "",
|
||||||
|
adUpdateDisuseDetails: "",
|
||||||
|
userInfo: this.$store.getters.userInfo,
|
||||||
|
activeName: "taskToDo",
|
||||||
|
classLevelOptions: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 初始化获取待办清单
|
||||||
|
this.getListData()
|
||||||
|
// 获取已办、办结统计页签数量
|
||||||
|
this.getOtherActiveCount()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getClassName(prop2) {
|
// 流程处理事件
|
||||||
// 根据不同的文本内容返回不同的类名
|
handleDeal(row) {
|
||||||
if (prop2 === '进行中') {
|
this.dealDrawerShow = true;
|
||||||
return 'blue';
|
let flowUrl = this.buildFlowUrl(row)
|
||||||
} else if (prop2 === '已办结') {
|
// alert(flowUrl)
|
||||||
return 'green';
|
//window.open(flowUrl)
|
||||||
}else if (prop2 === '不通过') {
|
/* */
|
||||||
return 'red';
|
this.$nextTick(() => {
|
||||||
} else if (prop2 === '通过') {
|
this.$refs.dealDrawer.init(flowUrl);
|
||||||
return 'green';
|
});
|
||||||
}
|
|
||||||
|
//
|
||||||
},
|
},
|
||||||
|
buildFlowUrl(row) {
|
||||||
|
let res = row.url;
|
||||||
|
//待办=1、已办=2、办结=3
|
||||||
|
res += "&invokeFrom=list&status="+row.status
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
getOtherActiveCount() {
|
||||||
|
// 获取已办统计数量
|
||||||
|
this.loading = true
|
||||||
|
let params = {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
status: 2,
|
||||||
|
};
|
||||||
|
workflowToDoList(params).then((response) => {
|
||||||
|
this.doneTotal = response.data.totalCount || 0;
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
// 获取办结统计数量
|
||||||
|
this.loading = true
|
||||||
|
let params2 = {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
status: 3,
|
||||||
|
};
|
||||||
|
workflowToDoList(params2).then((response) => {
|
||||||
|
this.finishedTotal = response.data.totalCount || 0;
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询列表 */
|
||||||
|
getListData() {
|
||||||
|
this.loading = true;
|
||||||
|
this.postList = [];
|
||||||
|
workflowToDoList(this.queryParams).then((response) => {
|
||||||
|
if (this.activeName == "taskToDo") {
|
||||||
|
// 待办
|
||||||
|
this.statustotal = response.data.totalCount;
|
||||||
|
// this.$store.commit("SET_THINGNUMBER", response.data.totalCount || 0);
|
||||||
|
this.total = response.data.totalCount;
|
||||||
}
|
}
|
||||||
|
if (this.activeName == "taskDealed") {
|
||||||
|
// 已办
|
||||||
|
this.doneTotal = response.data.totalCount;
|
||||||
|
this.total = response.data.totalCount;
|
||||||
}
|
}
|
||||||
|
if (this.activeName == "taskFinish") {
|
||||||
|
// 办结
|
||||||
|
this.finishedTotal = response.data.totalCount;
|
||||||
|
this.total = response.data.totalCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.postList = response.data.result;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
handleCloseChange() {
|
||||||
|
this.dealDrawerShow = false
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNumber = 1;
|
||||||
|
this.getListData();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.pageNumber = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.title = "";
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 详情按钮操作 */
|
||||||
|
handleDetails(row) {
|
||||||
|
|
||||||
|
},
|
||||||
|
state(tab) {
|
||||||
|
let p = Number(tab.index) + 1;
|
||||||
|
if (p == 1) {
|
||||||
|
this.varChangeColor1 = true;
|
||||||
|
this.varChangeColor2 = false;
|
||||||
|
}
|
||||||
|
if (p == 2 || p == 3) {
|
||||||
|
this.varChangeColor1 = false;
|
||||||
|
this.varChangeColor2 = true;
|
||||||
|
}
|
||||||
|
this.queryParams.status = p;
|
||||||
|
this.queryParams.pageNumber = 1;
|
||||||
|
this.queryParams.title = "";
|
||||||
|
this.total = 0;
|
||||||
|
this.getListData();
|
||||||
|
// this.getshulian();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user