release-v1.0 #1
@ -7,14 +7,14 @@ ENV = 'development'
|
||||
VUE_APP_CONTEXT_PATH = '/tool-tech'
|
||||
|
||||
# 工具与技术交流管理系统/开发环境
|
||||
VUE_APP_BASE_API = 'http://192.168.2.85:8080/tool-tech-admin'
|
||||
VUE_APP_WS_URL = 'ws://192.168.2.85:8080/tool-tech-admin/websocket'
|
||||
VUE_APP_BASE_API = 'http://localhost:8080/tool-tech-admin'
|
||||
VUE_APP_WS_URL = 'ws://localhost:8080/tool-tech-admin/websocket'
|
||||
|
||||
# 文档在线预览服务
|
||||
VUE_APP_TOOL_TECH_FILE_VIEW_API = 'http://192.168.1.2:8012/tool-tech-file-view'
|
||||
VUE_APP_TOOL_TECH_FILE_VIEW_API = 'http://localhost:8012/tool-tech-file-view'
|
||||
|
||||
# 流程管理服务地址
|
||||
VUE_APP_WORKFLOW_MANAGE_URL = 'http://192.168.1.2:8080/ebpm-process-manage'
|
||||
VUE_APP_WORKFLOW_MANAGE_URL = 'http://192.168.2.18:8085/ebpm-process-manage'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
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) {
|
||||
return request({
|
||||
url: '/tool',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: data,
|
||||
timeout: 30*60*1000
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工具信息
|
||||
export function updateTool(data) {
|
||||
return request({
|
||||
url: '/tool',
|
||||
method: 'put',
|
||||
url: '/tool/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@ -42,3 +51,11 @@ export function delTool(toolId) {
|
||||
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>
|
180
src/components/tool-selector/index.vue
Normal file
180
src/components/tool-selector/index.vue
Normal file
@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="工具选择"
|
||||
:visible.sync="visible"
|
||||
:close-on-click-modal="false"
|
||||
width="80%"
|
||||
append-to-body>
|
||||
<div class="el-card__body">
|
||||
<el-form :model="queryParams" ref="queryForm" v-show="showSearch" label-width="68px" :inline="true">
|
||||
<el-form-item label="工具编号" prop="toolCode">
|
||||
<el-input
|
||||
v-model.trim="queryParams.toolCode"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工具名称" prop="toolName">
|
||||
<el-input
|
||||
v-model.trim="queryParams.toolName"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card class="gray-card">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
ref="multipleTable"
|
||||
header-align="left"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" v-if="multiple" :selectable="(row,index)=>selectableFun(row,index,toolData,selectInfoData)"/>
|
||||
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode"/>
|
||||
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName":show-overflow-tooltip="true" />
|
||||
<el-table-column label="工具类别" align="center" key="toolType" 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-column label="归属单位" align="center" key="toolRespDeptName" prop="toolRespDeptName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" />
|
||||
<el-table-column label="操作" v-if="!multiple" width="100px" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="selectHandle(scope.row)"
|
||||
>选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<div slot="footer" v-if="multiple">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="selectHandle(selectInfoData)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listTool } from '@/api/tool/tool'
|
||||
export default {
|
||||
name: "ToolSelector",
|
||||
components: {},
|
||||
dicts:['tool_type'],
|
||||
props: {
|
||||
toolData: {
|
||||
type: Array,
|
||||
default: ()=>[],
|
||||
},
|
||||
selectableFun: {
|
||||
type: Function,
|
||||
default: (row, index, toolData, selectInfoData)=>{
|
||||
if (toolData) {
|
||||
return toolData.findIndex(item=>item.id===row.id)<0
|
||||
}else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
},
|
||||
selectValidate:{
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
source: undefined,
|
||||
index: undefined,
|
||||
multiple: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
dataList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
toolCode: undefined,
|
||||
toolName: undefined,
|
||||
status: undefined,
|
||||
recordStatus: 'done',
|
||||
},
|
||||
selectInfoData: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//来源、序号、是否多选
|
||||
init(source,index,multiple){
|
||||
this.visible = true
|
||||
this.source = source
|
||||
this.index = index
|
||||
this.multiple= multiple
|
||||
this.resetQuery()
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listTool(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.dataList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.selectInfoData = selection;
|
||||
},
|
||||
selectHandle(data){
|
||||
let _this = this
|
||||
if (_this.selectValidate) {
|
||||
this.$emit("selectHandle", this.source, this.index, data,(res)=>{_this.visible = !res})
|
||||
}else{
|
||||
this.$emit("selectHandle", this.source, this.index, data)
|
||||
_this.visible = false
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -276,15 +276,16 @@
|
||||
return result;
|
||||
},
|
||||
submitForm() {
|
||||
let checkedUserArr = []
|
||||
let checkedUser = {}
|
||||
this.checkedUsers.forEach(userName => {
|
||||
checkedUser['userName'] = userName
|
||||
checkedUser['userId'] = this.getUserIdByUserName(userName)
|
||||
checkedUser['nickName'] = this.getNickNameByUserName(userName)
|
||||
checkedUserArr.push(checkedUser)
|
||||
})
|
||||
this.$emit("submit", checkedUserArr); //返回username和nickname
|
||||
// let checkedUserArr = []
|
||||
// let checkedUser = {}
|
||||
// this.checkedUsers.forEach(userName => {
|
||||
// checkedUser['userName'] = userName
|
||||
// checkedUser['userId'] = this.getUserIdByUserName(userName)
|
||||
// checkedUser['nickName'] = this.getNickNameByUserName(userName)
|
||||
// checkedUserArr.push(checkedUser)
|
||||
// })
|
||||
// this.$emit("submit", checkedUserArr); //返回username和nickname
|
||||
this.$emit("submit", JSON.parse(JSON.stringify(this.selectedUserList)));
|
||||
},
|
||||
cancel() {
|
||||
this.$emit('cancel');
|
||||
|
@ -8,6 +8,7 @@ import '../public/css/poctstyle.css'
|
||||
import '../public/css/tool.css'
|
||||
import '@/assets/styles/index.scss' // global css
|
||||
import '@/assets/styles/ruoyi.scss' // ruoyi css
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
@ -38,6 +39,8 @@ import DictTag from '@/components/DictTag'
|
||||
import VueMeta from 'vue-meta'
|
||||
// 字典数据组件
|
||||
import DictData from '@/components/DictData'
|
||||
// 图形监控组件
|
||||
import MonitorDrawer from "@/components/MonitorDrawer"
|
||||
|
||||
// 全局方法挂载
|
||||
Vue.prototype.getDicts = getDicts
|
||||
@ -58,6 +61,7 @@ Vue.component('Editor', Editor)
|
||||
Vue.component('FileUpload', FileUpload)
|
||||
Vue.component('ImageUpload', ImageUpload)
|
||||
Vue.component('ImagePreview', ImagePreview)
|
||||
Vue.component('MonitorDrawer', MonitorDrawer)
|
||||
|
||||
Vue.use(directive)
|
||||
Vue.use(plugins)
|
||||
|
@ -41,6 +41,12 @@ export const constantRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// 统一流程处理前端页面(涉及待办、已办、办结)
|
||||
path: '/workflowRouter',
|
||||
component: (resolve) => require(['@/views/workflowList/workflowRouter.vue'], resolve),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login'),
|
||||
|
@ -7,6 +7,8 @@ const getters = {
|
||||
cachedViews: state => state.tagsView.cachedViews,
|
||||
token: state => state.user.token,
|
||||
avatar: state => state.user.avatar,
|
||||
userId: state => state.user.id,
|
||||
userInfo: state => state.user.info,
|
||||
name: state => state.user.name,
|
||||
nickName: state => state.user.nickName,
|
||||
introduction: state => state.user.introduction,
|
||||
|
@ -7,6 +7,7 @@ const user = {
|
||||
id: '',
|
||||
name: '',
|
||||
nickName: '',
|
||||
info: {},
|
||||
avatar: '',
|
||||
roles: [],
|
||||
permissions: []
|
||||
@ -33,6 +34,9 @@ const user = {
|
||||
},
|
||||
SET_PERMISSIONS: (state, permissions) => {
|
||||
state.permissions = permissions
|
||||
},
|
||||
SET_INFO:(state, info) => {
|
||||
state.info = info
|
||||
}
|
||||
},
|
||||
|
||||
@ -70,6 +74,8 @@ const user = {
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_NICK_NAME', user.nickName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
commit('SET_INFO', user)
|
||||
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
@ -155,7 +155,6 @@ import { getToken } from "@/utils/auth";
|
||||
import { Base64 } from 'js-base64'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import blUserSelector from "@/components/user-selector/src/user-selector";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import toolDetail from "./toolDetail";
|
||||
|
||||
export default {
|
||||
|
@ -159,7 +159,6 @@
|
||||
<script>
|
||||
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "Dept",
|
||||
|
@ -275,7 +275,6 @@
|
||||
<script>
|
||||
import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import IconSelect from "@/components/IconSelect";
|
||||
|
||||
export default {
|
||||
|
@ -224,7 +224,6 @@
|
||||
|
||||
<script>
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
components: { Treeselect },
|
||||
|
@ -325,7 +325,6 @@ import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUs
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { Base64 } from 'js-base64'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
|
@ -89,28 +89,23 @@
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>工具发布</el-button>
|
||||
<!-- <el-button type="primary" icon="el-icon-position">发布</el-button> -->
|
||||
<!-- <el-button icon="el-icon-thumb" @click="applyUse()">申请使用</el-button> -->
|
||||
<el-button icon="el-icon-delete">批量删除</el-button>
|
||||
<el-button icon="el-icon-download" @click="exoportDrawerOpen = true">导出</el-button>
|
||||
<el-button icon="el-icon-delete" @click="handleDelete(selection)">批量删除</el-button>
|
||||
<el-button icon="el-icon-download" @click="handleOpenExport()">导出</el-button>
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column type="selection" width="50" align="center" :selectable="selectable"/>
|
||||
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode" v-if="columns[0].visible" />
|
||||
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="工具类别" align="center" key="toolType" prop="toolType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<template v-for="dict in dict.type.tool_type">
|
||||
<span v-if="scope.row.toolType == dict.value">{{ dict.label }}</span>
|
||||
</template>
|
||||
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="归属单位" align="center" key="toolRespDeptName" prop="toolRespDeptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="负责人" align="center" key="toolPrincipalsName" prop="toolPrincipalsName" v-if="columns[4].visible" width="120" />
|
||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status == '0'">正常</el-tag>
|
||||
<el-tag type="info" v-if="scope.row.status == '1'">禁用</el-tag>
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
||||
@ -125,16 +120,14 @@
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-info" @click="applyUse(scope.row)">申请使用</el-button>
|
||||
<el-button type="text" icon="el-icon-info" v-if="scope.row.recordStatus==='done'" @click="applyUse(scope.row)">申请使用</el-button>
|
||||
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
||||
<el-button type="text" icon="el-icon-download">下载</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['tool:edit', 'tool:remove']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus">下载</el-button>
|
||||
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right" >更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleUpdate" icon="el-icon-edit"
|
||||
v-hasPermi="['tool:edit']">编辑</el-dropdown-item>
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete"
|
||||
v-hasPermi="['tool:remove']">删除</el-dropdown-item>
|
||||
<el-dropdown-item command="handleUpdate" icon="el-icon-edit">编辑</el-dropdown-item>
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete">删除</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@ -150,215 +143,13 @@
|
||||
</div><!--rt 右-->
|
||||
</el-card><!--el-card-->
|
||||
|
||||
<!-- 添加或修改工具信息对话框 -->
|
||||
<el-drawer :visible.sync="addDrawerOpen" size="75%" @open="openEvent">
|
||||
<template #title>
|
||||
<span>新增工具</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<div class="el-form-border">
|
||||
<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-model="form.toolCode" placeholder="请输入工具编号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工具名称" prop="toolName">
|
||||
<el-input v-model="form.toolName" placeholder="请输入工具名称"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="toolPrincipals">
|
||||
<el-input v-model="form.toolPrincipalsName" placeholder="请选择负责人" maxlength="11" @focus="toolPrincipalsChoose = true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="归属部门" prop="toolRespDept">
|
||||
<treeselect 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-model="form.toolSource" placeholder="请输入工具来源"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工具用途" prop="toolUse">
|
||||
<el-input v-model="form.toolUse" placeholder="请输入工具用途" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工具类别">
|
||||
<el-select 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>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
: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="测试情况">
|
||||
<el-input 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 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 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 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 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>
|
||||
</el-form>
|
||||
<!-- 上传 -->
|
||||
<AddDoc :show.sync="addDocShow" toolId="1111" @callback="openEvent"/>
|
||||
</div><!--el-form-border 表单-->
|
||||
</el-drawer><!--el-drawer 新增抽屉-->
|
||||
|
||||
<!-- 工具申请使用对话框 -->
|
||||
<el-drawer :visible.sync="applyDrawerOpen" size="75%">
|
||||
<template #title>
|
||||
<span>申请使用</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button type="primary" icon="el-icon-check" @click="submitApply()">提交</el-button>
|
||||
<el-button icon="el-icon-close" @click="cancelApply()">取消</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<div class="el-form-border">
|
||||
<el-form ref="form" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请人" required>
|
||||
<el-input placeholder="张莹" ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请部门" required>信息部</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请理由">
|
||||
<el-input type="textarea" :rows="4" maxlength="1000" show-word-limit></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="归属单位" width="180"> </el-table-column>
|
||||
<el-table-column prop="prop4" label="负责人" width="100" ></el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-button type="text">删除</el-button>
|
||||
</el-table-column>
|
||||
</el-table><!--el-table-->
|
||||
</el-drawer><!--el-drawer 申请使用-->
|
||||
|
||||
<!-- 工具导出对话框 -->
|
||||
<el-drawer :visible.sync="exoportDrawerOpen" size="75%">
|
||||
<el-drawer :visible.sync="exoportDrawerOpen" size="75%" :show-close="false">
|
||||
<template #title>
|
||||
<span class="title">导出</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button type="primary">提交</el-button>
|
||||
<el-button>取消</el-button>
|
||||
<el-button type="primary" @click="handleExport">提交</el-button>
|
||||
<el-button @click="exoportDrawerOpen=false">取消</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<div class="el-form-border">
|
||||
@ -366,19 +157,19 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选择需要导出的字段信息">
|
||||
<el-checkbox-group v-model="checkList1">
|
||||
<el-checkbox label="A">工具名称</el-checkbox>
|
||||
<el-checkbox label="B">工具类别</el-checkbox>
|
||||
<el-checkbox label="C">工具来源</el-checkbox>
|
||||
<el-checkbox label="D">负责人</el-checkbox>
|
||||
<el-checkbox label="E">归属单位</el-checkbox>
|
||||
<el-checkbox label="F">状态</el-checkbox>
|
||||
<el-checkbox label="G">工具名称</el-checkbox>
|
||||
<el-checkbox label="H">工具类别</el-checkbox>
|
||||
<el-checkbox label="I">工具来源</el-checkbox>
|
||||
<el-checkbox label="J">负责人</el-checkbox>
|
||||
<el-checkbox label="K">归属单位</el-checkbox>
|
||||
<el-checkbox label="L">状态</el-checkbox>
|
||||
<el-checkbox-group v-model="checkList">
|
||||
<el-checkbox label="toolName">工具名称</el-checkbox>
|
||||
<el-checkbox label="toolType">工具类别</el-checkbox>
|
||||
<el-checkbox label="toolSource">工具来源</el-checkbox>
|
||||
<el-checkbox label="toolPrincipalsName">负责人</el-checkbox>
|
||||
<el-checkbox label="toolRespDeptName">归属单位</el-checkbox>
|
||||
<el-checkbox label="status">状态</el-checkbox>
|
||||
<el-checkbox label="toolUse">工具用途</el-checkbox>
|
||||
<el-checkbox label="testSituation">测评情况</el-checkbox>
|
||||
<el-checkbox label="functionDesc">功能描述</el-checkbox>
|
||||
<el-checkbox label="applyCondition">适用条件</el-checkbox>
|
||||
<el-checkbox label="operateExplain">操作说明</el-checkbox>
|
||||
<el-checkbox label="remark">备注</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -387,6 +178,19 @@
|
||||
</div><!--el-form-border 表单-->
|
||||
</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">
|
||||
<template #title>
|
||||
@ -395,28 +199,30 @@
|
||||
<tool-detail ref="toolDetailRef" :toolDetail="toolDetail"/>
|
||||
</el-drawer><!--el-drawer 详情-抽屉-->
|
||||
|
||||
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
||||
</div><!--app-container-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDocument } from "@/api/document/document";
|
||||
import { listTool, getTool, delTool, addTool, updateTool } from "@/api/tool/tool";
|
||||
import { deptTreeSelect } from "@/api/system/user";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { Base64 } from 'js-base64'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import blUserSelector from "@/components/user-selector/src/user-selector";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import toolDetail from "./toolDetail";
|
||||
import AddDoc from './AddDoc'
|
||||
import mainComponent from "@/components/mainComponent/index.vue";
|
||||
|
||||
export default {
|
||||
name: "User",
|
||||
dicts: ['sys_normal_disable', 'tool_type'],
|
||||
components: { Treeselect, blUserSelector, toolDetail, AddDoc },
|
||||
components: { Treeselect, toolDetail, AddDoc,mainComponent },
|
||||
data() {
|
||||
return {
|
||||
userInfo: this.$store.getters.userInfo,
|
||||
drawerShow: false,
|
||||
path: 'views/workflowList/addWorkflow/',
|
||||
code: '',
|
||||
data: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -427,6 +233,7 @@ export default {
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
selection: undefined,
|
||||
toolPrincipalsChoose: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
@ -437,12 +244,11 @@ export default {
|
||||
// 部门树选项
|
||||
deptOptions: undefined,
|
||||
toolPrincipalsData: [],
|
||||
tableData2: [],
|
||||
checkList1: [],
|
||||
columnList: ['toolName', 'toolType', 'toolSource', 'toolPrincipalsName', 'toolRespDeptName', 'status', 'toolUse', 'testSituation', 'functionDesc', 'applyCondition', 'operateExplain', 'remark'],
|
||||
checkList: [],
|
||||
toolDetail: {},
|
||||
// 是否显示弹出层
|
||||
addDrawerOpen: false,
|
||||
applyDrawerOpen: false,
|
||||
exoportDrawerOpen: false,
|
||||
detailDrawerOpen: false,
|
||||
detailActiveName: 'first',
|
||||
@ -483,7 +289,10 @@ export default {
|
||||
pageSize: 10,
|
||||
toolCode: undefined,
|
||||
toolName: undefined,
|
||||
status: undefined
|
||||
status: undefined,
|
||||
createBy: this.$store.getters.userId,
|
||||
permissionCheck: true,
|
||||
downloadCheck:true
|
||||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
@ -495,33 +304,8 @@ export default {
|
||||
{ key: 5, label: `状态`, visible: true },
|
||||
{ key: 6, label: `创建时间`, visible: true }
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
toolCode: [
|
||||
{ required: true, message: "工具编号不能为空", trigger: "blur" },
|
||||
{ min: 2, max: 30, message: '工具编号长度必须介于 2 和 30 之间', trigger: 'blur' }
|
||||
],
|
||||
toolName: [
|
||||
{ required: true, message: "工具名称不能为空", trigger: "blur" },
|
||||
{ max: 50, message: '工具名称不能超过50个字', trigger: 'blur' }
|
||||
],
|
||||
toolPrincipals: [
|
||||
{ required: true, message: "负责人不能为空", trigger: "blur" }
|
||||
],
|
||||
toolSource: [
|
||||
{ max: 50, message: '工具来源不能超过50个字', trigger: 'blur' }
|
||||
],
|
||||
toolUse: [
|
||||
{ max: 50, message: '工具用途不能超过50个字', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
// 新增时的关联附件
|
||||
docList: [],
|
||||
docQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
toolId: ''
|
||||
},
|
||||
addDocShow: false,
|
||||
viewDialogOpen: false,
|
||||
viewDialogTitle: '',
|
||||
@ -555,12 +339,6 @@ export default {
|
||||
},
|
||||
handleClick(){
|
||||
|
||||
},
|
||||
submitPeople(peopleList){
|
||||
console.log(peopleList);
|
||||
this.form.toolPrincipals = peopleList[0]['userId']
|
||||
this.form.toolPrincipalsName = peopleList[0]['nickName']
|
||||
this.toolPrincipalsChoose = false;
|
||||
},
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
@ -629,18 +407,11 @@ export default {
|
||||
},
|
||||
/**=============================申请使用Start================================*/
|
||||
applyUse(row){
|
||||
let toolIds = row?.id || '1'
|
||||
if(toolIds.length == 0){
|
||||
this.$modal.msgWarning("请选择需要申请使用的工具!");
|
||||
return
|
||||
}
|
||||
this.applyDrawerOpen = true
|
||||
let _this = this
|
||||
_this.handleOpen({...row,type:'use_apply',procInstId:undefined})
|
||||
},
|
||||
submitApply(){
|
||||
|
||||
},
|
||||
cancelApply(){
|
||||
this.applyDrawerOpen = false
|
||||
},
|
||||
/**=============================申请使用End================================*/
|
||||
/** 搜索按钮操作 */
|
||||
@ -658,9 +429,10 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.userId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
this.selection=selection
|
||||
// this.ids = selection.map(item => item.userId);
|
||||
// this.single = selection.length != 1;
|
||||
// this.multiple = !selection.length;
|
||||
},
|
||||
handleDetail(row){
|
||||
this.detailDrawerOpen = true
|
||||
@ -673,7 +445,7 @@ export default {
|
||||
this.handleUpdate(row);
|
||||
break;
|
||||
case "handleDelete":
|
||||
this.handleDelete(row);
|
||||
this.handleDelete([{...row}]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -681,77 +453,35 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
getTool().then(response => {
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.addDrawerOpen = true;
|
||||
this.title = "添加工具";
|
||||
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) {
|
||||
this.reset();
|
||||
const toolId = row.toolId || this.ids;
|
||||
getTool(toolId).then(response => {
|
||||
this.form = response.data;
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.$set(this.form, "postIds", response.postIds);
|
||||
this.$set(this.form, "roleIds", response.roleIds);
|
||||
this.addDrawerOpen = true;
|
||||
this.title = "修改工具";
|
||||
this.form.password = "";
|
||||
});
|
||||
let _this = this
|
||||
_this.handleOpen({type:'tool_release',procInstId:row.procInstId,status:'1'})
|
||||
},
|
||||
/** 发布按钮操作 */
|
||||
handlePublish(row) {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.userId != undefined) {
|
||||
updateTool(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.addDrawerOpen = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addTool(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.addDrawerOpen = false;
|
||||
this.getList();
|
||||
}).catch((e) => {
|
||||
if (e.response.data.code === 400001001) {
|
||||
let deptName = this.getDeptName(this.deptOptions, this.form.toolRespDept)
|
||||
this.$alert('<strong>' + deptName + '</strong> 下已存在编号为 <strong>' + this.form.toolCode + '</strong> 的工具,请勿重复添加!', '提示', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: '确定',
|
||||
callback: action => { }
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const toolIds = row.toolId || this.ids;
|
||||
this.$modal.confirm('是否确认删除?').then(function() {
|
||||
return delTool(toolIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
handleOpenExport() {
|
||||
if (this.checkList.length<1) {
|
||||
this.checkList = JSON.parse(JSON.stringify(this.columnList))
|
||||
}
|
||||
this.exoportDrawerOpen = true
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/user/export', {
|
||||
...this.queryParams
|
||||
}, `user_${new Date().getTime()}.xlsx`)
|
||||
let excludeFields = this.columnList.filter(item=>!this.checkList.includes(item))
|
||||
this.download('/tool/export', {
|
||||
...this.queryParams,
|
||||
downloadCheck:false,
|
||||
excludeFields:excludeFields,
|
||||
}, `工具信息数据_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
handleUseApply(){
|
||||
|
||||
@ -772,18 +502,41 @@ export default {
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
/**
|
||||
* 打开新增页面的回调事件
|
||||
*/
|
||||
openEvent() {
|
||||
this.loading = true
|
||||
this.docQueryParams.toolId = '1111'
|
||||
listDocument(this.queryParams).then(response => {
|
||||
this.docList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
handleClose(){
|
||||
this.drawerShow = false
|
||||
this.getList();
|
||||
},
|
||||
handleDelete(list){
|
||||
let _this = this
|
||||
if (!list||list.length<1) {
|
||||
return
|
||||
}
|
||||
_this.$modal.confirm('删除后,该流程待办任务将会被删除,请谨慎操作。是否确认执行?')
|
||||
.then(async() => {
|
||||
_this.loading = true
|
||||
for (let row of list) {
|
||||
let formData = {
|
||||
toolId: row.toolId,
|
||||
bpmClientInputModel: {
|
||||
model: {
|
||||
wf_procInstId: row.procInstId,
|
||||
wf_sendUserId: _this.userInfo.userName,
|
||||
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||
},
|
||||
},
|
||||
review: false,
|
||||
recordStatus: 'cancel',
|
||||
editStatus: false
|
||||
}
|
||||
await addTool(formData)
|
||||
}
|
||||
_this.$modal.msgSuccess("删除成功");
|
||||
_this.loading = false
|
||||
_this.getList();
|
||||
})
|
||||
},
|
||||
selectable(row,index){
|
||||
return row.recordStatus==='draft'&&row.createBy==this.userInfo.userId
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -6,18 +6,23 @@
|
||||
<div class="el-form-border">
|
||||
<el-form ref="form" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="12"> <el-form-item label="工具名称">工具名称2</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具类别">网络工具</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具来源">单位自建</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="负责人">赵宁宇</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="归属单位">人力资源部/员工关系组</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="状态"><span class="green">启用中</span></el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具用途">主要用于单位网络使用</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="测评情况">运行良好,可正常使用</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="功能描述">单位网络使用</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="适用条件">网络正常</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="操作说明">正常开启即可用</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="备注">工具使用完成后,请做好保养工作。</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具名称">{{toolDetail.toolName}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具类别"><dict-tag :options="dict.type.tool_type" :value="toolDetail.toolType"/></el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具来源">{{toolDetail.toolSource}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="负责人">{{toolDetail.toolPrincipalsName}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="归属单位">{{toolDetail.toolRespDeptName}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="状态"><dict-tag :options="dict.type.sys_normal_disable" :value="toolDetail.status"/></el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="工具用途">{{toolDetail.toolUse}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="测评情况">{{toolDetail.testSituation}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="功能描述">{{toolDetail.functionDesc}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="适用条件">{{toolDetail.applyCondition}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="操作说明">{{toolDetail.operateExplain}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="备注">{{toolDetail.remark}}</el-form-item> </el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="关联工具">
|
||||
<el-tag :key="tag.toolId" v-for="tag in JSON.parse(toolDetail.association)" type="info" style="margin-right: 5px">{{tag.toolName}}</el-tag>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form><!--el-form-->
|
||||
</div><!--el-form-border 表单-->
|
||||
@ -73,6 +78,7 @@
|
||||
export default {
|
||||
name: 'toolDetail',
|
||||
components: { editDocument, AddDoc },
|
||||
dicts:['sys_normal_disable','tool_type'],
|
||||
props: {
|
||||
toolDetail: {
|
||||
type: Object,
|
||||
|
796
src/views/workflowList/addWorkflow/tool_release.vue
Normal file
796
src/views/workflowList/addWorkflow/tool_release.vue
Normal file
@ -0,0 +1,796 @@
|
||||
<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="eForm" :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="toolPrincipals">
|
||||
<el-input v-if="editStatus" v-model="form.toolPrincipalsName" placeholder="请选择负责人" maxlength="11" @focus="toolPrincipalsChoose = true"/>
|
||||
<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" @select="handleSelectNode" :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="工具类别" prop="toolType">
|
||||
<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="状态" prop="status">
|
||||
<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="测试情况" prop="testSituation">
|
||||
<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="功能描述" prop="functionDesc">
|
||||
<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="适用条件" prop="applyCondition">
|
||||
<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="操作说明" prop="operateExplain">
|
||||
<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="备注" prop="remark">
|
||||
<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>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="关联工具" prop="association">
|
||||
<el-select
|
||||
:disabled="!editStatus"
|
||||
v-model="form.association"
|
||||
ref="selectHeadTool"
|
||||
multiple
|
||||
value-key="toolId"
|
||||
filterable
|
||||
remote
|
||||
placeholder="请选择关联工具"
|
||||
@focus="toolSelect">
|
||||
<el-option
|
||||
v-for="item in form.association"
|
||||
:key="item.toolId"
|
||||
:label="item.toolName"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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"/>
|
||||
</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>
|
||||
<tool-selector ref="toolSelect" @selectHandle="selectHandle"></tool-selector>
|
||||
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
||||
</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'
|
||||
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
|
||||
import ToolSelector from '@/components/tool-selector/index.vue'
|
||||
// PDF本地文件预览
|
||||
export default {
|
||||
dicts: ['sys_normal_disable','tool_type'],
|
||||
components: {
|
||||
ToolSelector,
|
||||
blUserSelector,
|
||||
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({toolId:_this.form.toolId,toolCode:_this.form.toolCode,toolRespDept:_this.form.toolRespDept}).then((response) => {
|
||||
if (response.data) {
|
||||
callback(new Error(_this.form.toolRespDeptName+"下已存在编号为"+_this.form.toolCode+'的工具,请勿重复添加!'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
toolPrincipalsChoose: false,
|
||||
// 新增时的关联附件
|
||||
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' }
|
||||
],
|
||||
toolPrincipals: [
|
||||
{ required: true, message: "负责人不能为空", trigger: "blur" }
|
||||
],
|
||||
toolRespDept: [
|
||||
{ required: true, message: "请选择归属部门", trigger: "blur" }
|
||||
],
|
||||
toolSource: [
|
||||
{ required: true, message: "请输入工具来源", trigger: "blur" },
|
||||
{ max: 50, message: '工具来源不能超过50个字', trigger: 'blur' }
|
||||
],
|
||||
toolType: [
|
||||
{ required: true, message: "请选择工具类别", trigger: "blur" }
|
||||
],
|
||||
toolUse: [
|
||||
{ required: true, message: "请输入工具用途", trigger: "blur" },
|
||||
{ max: 50, message: '工具用途不能超过50个字', trigger: 'blur' }
|
||||
],
|
||||
testSituation: [
|
||||
{ required: true, message: "请输入测试情况", trigger: "blur" },
|
||||
],
|
||||
functionDesc: [
|
||||
{ required: true, message: "请输入功能描述", trigger: "blur" },
|
||||
],
|
||||
applyCondition: [
|
||||
{ required: true, message: "请输入适用条件", trigger: "blur" },
|
||||
],
|
||||
operateExplain: [
|
||||
{ required: true, message: "请选择状态", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ 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()
|
||||
_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
|
||||
formData.association = JSON.parse(res.data.association)
|
||||
_this.form = formData
|
||||
_this.getDocumentList(res.data.toolId)
|
||||
}).finally(()=>{
|
||||
_this.detailLoading = false
|
||||
});
|
||||
},
|
||||
rest(){
|
||||
let _this = this
|
||||
_this.activeName = "info"
|
||||
},
|
||||
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
|
||||
formData.association = JSON.stringify(_this.form.association)
|
||||
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
|
||||
});
|
||||
let wf_procTitle = "【工具发布】" + (formData.toolName?formData.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
|
||||
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_procInstId: _this.pListData.procInstId,
|
||||
wf_sendUserId: _this.userInfo.userName,
|
||||
wf_sendUserOrgId: _this.userInfo.deptId,
|
||||
},
|
||||
},
|
||||
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["eForm"]) {
|
||||
let valid = await _this.$refs["eForm"].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.association = JSON.stringify(_this.form.association)
|
||||
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 = "【工具发布】" + (formData.toolName?formData.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
|
||||
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
|
||||
},
|
||||
getDocumentList(toolId) {
|
||||
this.loading = true
|
||||
this.docQueryParams.toolId = toolId
|
||||
listDocument(this.docQueryParams).then(response => {
|
||||
this.docList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
submitPeople(peopleList){
|
||||
this.$set(this.form,'toolPrincipals',peopleList[0]['userId'])
|
||||
this.$set(this.form,'toolPrincipalsName',peopleList[0]['nickName'])
|
||||
this.toolPrincipalsChoose = false;
|
||||
this.$refs['eForm'].validateField("toolPrincipals");
|
||||
},
|
||||
handleSelectNode(node){
|
||||
this.$set(this.form,'toolRespDeptName',node.label)
|
||||
},
|
||||
toolSelect(){
|
||||
this.$refs.selectHeadTool.blur();
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.toolSelect.init(null,null,true)
|
||||
})
|
||||
},
|
||||
selectHandle(source,index,data){
|
||||
let list = this.form.association
|
||||
if (!list) {
|
||||
list = []
|
||||
}
|
||||
data.forEach(itme=>{
|
||||
list.push({toolId:itme.toolId,toolName:itme.toolName})
|
||||
})
|
||||
this.form.association = list
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
600
src/views/workflowList/addWorkflow/use_apply.vue
Normal file
600
src/views/workflowList/addWorkflow/use_apply.vue
Normal file
@ -0,0 +1,600 @@
|
||||
<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="eForm" :model="form" :rules="rules" label-width="150px">
|
||||
<div>
|
||||
<div class="box-title">
|
||||
基本信息
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请人" prop="userId">
|
||||
<el-input v-if="editStatus" v-model="form.nickName" placeholder="请输入申请人" @focus="toolPrincipalsChoose = true"/>
|
||||
<span v-else>{{form.nickName}}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="申请部门" prop="deptId">
|
||||
<span>{{form.deptName}}</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>
|
||||
<bl-user-selector ref="peopleSelect" :type="'single'" :isCheck="true" :open="toolPrincipalsChoose" @cancel="toolPrincipalsChoose=false" @submit="submitPeople"></bl-user-selector>
|
||||
</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'
|
||||
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
|
||||
// PDF本地文件预览
|
||||
export default {
|
||||
dicts: ['sys_normal_disable','tool_type'],
|
||||
components: {
|
||||
blUserSelector,
|
||||
Treeselect, AddDoc,
|
||||
WorkflowLogs,
|
||||
processcode,
|
||||
},
|
||||
name: "Borrow_doc",
|
||||
props: ['data'],
|
||||
data() {
|
||||
return {
|
||||
toolPrincipalsChoose: false,
|
||||
// 新增时的关联附件
|
||||
dataList: [],
|
||||
addDocShow: false,
|
||||
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: {
|
||||
userId: [
|
||||
{ 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}]
|
||||
_this.form={
|
||||
userId:_this.userInfo.userId,
|
||||
nickName:_this.userInfo.nickName,
|
||||
deptId:_this.userInfo.deptId,
|
||||
deptName:_this.userInfo.dept.deptName,
|
||||
reason: ""
|
||||
}
|
||||
},
|
||||
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.id) {
|
||||
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 = {
|
||||
id: _this.form.id,
|
||||
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["eForm"]) {
|
||||
let valid = await _this.$refs["eForm"].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
|
||||
},
|
||||
submitPeople(peopleList){
|
||||
this.$set(this.form,'userId',peopleList[0]['userId'])
|
||||
this.$set(this.form,'nickName',peopleList[0]['nickName'])
|
||||
this.$set(this.form,'deptId',peopleList[0]['deptId'])
|
||||
this.$set(this.form,'deptName',peopleList[0].dept.deptName)
|
||||
this.toolPrincipalsChoose = false;
|
||||
this.$refs['eForm'].validateField("userId");
|
||||
},
|
||||
},
|
||||
};
|
||||
</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>
|
||||
<div class="app-container"><!--从这一层开始嵌入页面-->
|
||||
|
||||
<el-card>
|
||||
<el-form label-width="80px">
|
||||
<div class="search">
|
||||
<el-form-item label="流程标题">
|
||||
<el-input placeholder="输入流程标题"></el-input>
|
||||
<el-input placeholder="输入流程标题" v-model.trim="queryParams.title"></el-input>
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-left">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
|
||||
</div><!--search 搜索-->
|
||||
</el-form><!--el-form-->
|
||||
</el-card><!--el-card-->
|
||||
|
||||
<el-card>
|
||||
<el-tabs v-model="activeName3" @tab-click="handleClick">
|
||||
<el-tab-pane label="待办(4)" name="first">
|
||||
<el-table :data="tableData5" style="width: 100%" height="529">
|
||||
<el-table-column prop="prop1" label="流程类型"></el-table-column>
|
||||
<el-table-column prop="prop2" label="流程标题">【使用申请】工具名称11</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-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="流程状态">
|
||||
<el-tabs v-model="activeName" @tab-click="state">
|
||||
<el-tab-pane :label="'待办('+ statustotal+')'" name="taskToDo">
|
||||
<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 :class="getClassName(scope.row.prop8)">{{ scope.row.prop8 }}</span>
|
||||
<span>{{ parseTime(scope.row.sendTime,'{y}-{m}-{d}')}}</span>
|
||||
</template>
|
||||
</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-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">
|
||||
<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>
|
||||
</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-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><!--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-tabs><!--el-tabs-->
|
||||
</el-card><!--el-card-->
|
||||
|
||||
<el-drawer :visible.sync="drawer1" :direction="direction" :before-close="handleClose" size="75%">
|
||||
<template #title>
|
||||
<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-->
|
||||
</el-card>
|
||||
<!-- 流程处理抽屉组件 -->
|
||||
<DealDrawer v-if="dealDrawerShow" ref="dealDrawer" @closeDrawer="handleCloseChange"></DealDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'dispose',
|
||||
data() {
|
||||
return {
|
||||
drawer1: false,
|
||||
drawer2: false,
|
||||
activeName1: 'first',
|
||||
activeName2: 'second',
|
||||
activeName3: 'first',
|
||||
radio1: '1',
|
||||
tableData1: [
|
||||
{
|
||||
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',
|
||||
},
|
||||
{
|
||||
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: [
|
||||
{
|
||||
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',
|
||||
},
|
||||
{
|
||||
prop1: '使用申请',
|
||||
prop3: '通过',
|
||||
prop4: '柳青',
|
||||
prop5: '2024/02/08 07:00',
|
||||
prop6: '2024/02/10 12:00',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getClassName(prop2) {
|
||||
// 根据不同的文本内容返回不同的类名
|
||||
if (prop2 === '进行中') {
|
||||
return 'blue';
|
||||
} else if (prop2 === '已办结') {
|
||||
return 'green';
|
||||
}else if (prop2 === '不通过') {
|
||||
return 'red';
|
||||
} else if (prop2 === '通过') {
|
||||
return 'green';
|
||||
}
|
||||
import { workflowToDoList } from "@/api/my_business/workflow";
|
||||
import DealDrawer from "@/components/DealDrawer";
|
||||
export default {
|
||||
name: "Post",
|
||||
dicts: ["sys_normal_disable", "sys_operterType"],
|
||||
components: {
|
||||
DealDrawer
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageSizes: [10,20,50,100],
|
||||
dealDrawerShow: false,
|
||||
boxClass: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
postList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
title: "",
|
||||
status: 1,
|
||||
},
|
||||
}
|
||||
}
|
||||
// 表单校验
|
||||
rules: {
|
||||
postName: [
|
||||
{
|
||||
required: true,
|
||||
message: "不能为空",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
postCode: [
|
||||
{
|
||||
required: true,
|
||||
message: "不能为空",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
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: {
|
||||
// 流程处理事件
|
||||
handleDeal(row) {
|
||||
this.dealDrawerShow = true;
|
||||
let flowUrl = this.buildFlowUrl(row)
|
||||
// alert(flowUrl)
|
||||
//window.open(flowUrl)
|
||||
/* */
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dealDrawer.init(flowUrl);
|
||||
});
|
||||
|
||||
//
|
||||
},
|
||||
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>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user