Commit 81d7711e authored by xioln's avatar xioln

更新了任务组件的过滤和修改功能

修复了任务提交时的错误
优化了任务详情处理逻辑
删除了无用的代码和流程任务组件
修改了用户密码的修改功能
添加了项目创建的功能
parent d8a5834e
...@@ -801,38 +801,38 @@ export function getDocVersion (id) { ...@@ -801,38 +801,38 @@ export function getDocVersion (id) {
// ########### // ###########
// 查询业务处理表单 // 查询业务处理表单
export function getBizForm(params) { export function getBizForm (params) {
return get('/workflow/task/getBizForm', params) return get('/workflow/task/getBizForm', params)
} }
// 查询可设置的环节参与人信息 // 查询可设置的环节参与人信息
export function getParticipant(params) { export function getParticipant (params) {
return get('/workflow/activity/teamInfoList', params) return get('/workflow/activity/teamInfoList', params)
} }
// 查询流程实例详情 // 查询流程实例详情
export function instDetail(instId) { export function instDetail (instId) {
return get(`/workflow/inst/${instId}`) return get(`/workflow/inst/${instId}`)
} }
// 获取任务详情 // 获取任务详情
export function getTaskDetail(params, processFlag = false, taskFlag = false) { export function getTaskDetail (params, processFlag = false, taskFlag = false) {
return get(`/workflow/task/${params}?processFlag=${processFlag}&taskFlag=${taskFlag}`) return get(`/workflow/task/${params}?processFlag=${processFlag}&taskFlag=${taskFlag}`)
} }
// 完成任务 // 完成任务
export function completeTask(params) { export function completeTask (params) {
return post('/workflow/template/operation', params) return post('/workflow/template/operation', params)
// return post(`/workflow/task/${params.id}/complete`, params.obj) // return post(`/workflow/task/${params.id}/complete`, params.obj)
} }
// 查询可设置的环节参与人信签审人员 // 查询可设置的环节参与人信签审人员
export function getParticipantRole(params) { export function getParticipantRole (params) {
return get('/workflow/participant/', params) return get('/workflow/participant/', params)
} }
// 查询流程任务历史 // 查询流程任务历史
export function getInstTaskHisTory(instId, page, size) { export function getInstTaskHisTory (instId, page, size) {
if (page && size) { if (page && size) {
return get('/workflow/task/hisTaskList', { return get('/workflow/task/hisTaskList', {
instId: instId, instId: instId,
...@@ -847,26 +847,26 @@ export function getInstTaskHisTory(instId, page, size) { ...@@ -847,26 +847,26 @@ export function getInstTaskHisTory(instId, page, size) {
} }
// 获取流程实例详情-PBO信息 // 获取流程实例详情-PBO信息
export function getInstancePbo(params) { export function getInstancePbo (params) {
return get(`/workflow/inst/${params}/bizPBO`) return get(`/workflow/inst/${params}/bizPBO`)
} }
/** *608-5g */ /** *608-5g */
export function findByCondition(params) { export function findByCondition (params) {
return post('DxApplication/findByCondition', params) return post('DxApplication/findByCondition', params)
} }
// 分片上传准备 // 分片上传准备
export function uploadPartPrepare(params) { export function uploadPartPrepare (params) {
return post('/dfs/fileManager/uploadPartPrepare', params, true) return post('/dfs/fileManager/uploadPartPrepare', params, true)
} }
// 获取表单配置 // 获取表单配置
export function getLayOut(params) { export function getLayOut (params) {
return get('/DxModelComponent/findModelComponent', params) return get('/DxModelComponent/findModelComponent', params)
} }
// 获取字典 // 获取字典
export function getDictListByCode(code, parentKey, attr) { export function getDictListByCode (code, parentKey, attr) {
const params = { const params = {
searchParams: { dictState: 'ENABLE' }, searchParams: { dictState: 'ENABLE' },
sort: { dictSeq: 'asc' } sort: { dictSeq: 'asc' }
...@@ -878,3 +878,12 @@ export function getDictListByCode(code, parentKey, attr) { ...@@ -878,3 +878,12 @@ export function getDictListByCode(code, parentKey, attr) {
} }
return post('/DictData/search', setSearchParams(params)) return post('/DictData/search', setSearchParams(params))
} }
// 获取流程实例详情-历史记录
export function getInstanceHistory (instId, params) {
return get('/workflow/task/hisTaskList', {
instId: instId,
page: 1,
size: 9999
})
}
...@@ -103,7 +103,8 @@ export default { ...@@ -103,7 +103,8 @@ export default {
// 判断value不是对象 // 判断value不是对象
return typeof value !== 'object' ? value : '' return typeof value !== 'object' ? value : ''
} else { } else {
return form[key] || '' return typeof form[key] === 'object' ? form[key]?.name
: form[key]
} }
} }
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
:name="name" :name="name"
:label="label" :label="label"
:type="itemObj.type" :type="itemObj.type"
:required="rules && !!rules[name]"
:rules="rules && rules[name]"
> >
<div v-if="itemObj.verifyIcon" slot="button"> <div v-if="itemObj.verifyIcon" slot="button">
<img :src="itemObj.verifyIcon" @click="getVerifyCode" /> <img :src="itemObj.verifyIcon" @click="getVerifyCode" />
...@@ -39,6 +41,10 @@ export default { ...@@ -39,6 +41,10 @@ export default {
label: { label: {
type: String, type: String,
default: '' default: ''
},
rules: {
type: Object,
default: () => null
} }
}, },
components: { components: {
......
...@@ -7,7 +7,8 @@ const state = { ...@@ -7,7 +7,8 @@ const state = {
{ key: 'DeeFlowDxDocumentAttrsEdit', title: '是否归档' }, { key: 'DeeFlowDxDocumentAttrsEdit', title: '是否归档' },
{ key: 'DeeFlowSecretConfirm', title: '密级确认' }, { key: 'DeeFlowSecretConfirm', title: '密级确认' },
{ key: 'DeeFlowDxDocumentEditReplyComments', title: '答复意见' }, { key: 'DeeFlowDxDocumentEditReplyComments', title: '答复意见' },
{ key: 'DeeFlowDxDocumentAttrsEditWhetherApplied', title: '封面铁皮' }, { key: 'DeeFlowExtSendOrderEditFeedBack', title: '答复意见' },
{ key: 'DeeFlowDxDocumentAttrsEditWhetherApplied', title: '封面贴皮' },
{ key: 'taskHistory', title: '签审历史' } { key: 'taskHistory', title: '签审历史' }
] ]
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<script> <script>
import Pdf from '@/components/pdf/index' import Pdf from '@/components/pdf/index'
import { getInstancePbo, getLayOut, getDictListByCode } from '@/api/taskDetail' import { getInstancePbo, getLayOut } from '@/api/taskDetail'
import DeeForm from '@/components/form/form' import DeeForm from '@/components/form/form'
export default { export default {
...@@ -40,27 +40,95 @@ export default { ...@@ -40,27 +40,95 @@ export default {
dxContentItems: {}, dxContentItems: {},
url: '', url: '',
form: {}, form: {},
formData: [ formData: []
]
} }
}, },
created () { created () {
}, },
async mounted () { async mounted () {
await this.getFormData() if (this.$route.query.type === 'ISTART') {
await this.getForm() this.tabs = [{ title: '基本信息', key: 'baseInfo' }]
this.activeTab = 'baseInfo'
await this.getIstartFormData()
console.log('222', JSON.parse(localStorage.getItem('taskInfo')))
} else {
await this.getFormData()
await this.getForm()
}
}, },
methods: { methods: {
async getForm () { getMessageFormData () {
getLayOut({ modelDefName: 'XT', layoutType: 'defaultView' }).then((res) => {
if (res.items.content.length) {
const jsonparse = JSON.parse(res.items.content[0].configDetails)
this.fiiterData(jsonparse.formData)
}
})
// this.$set(this, 'formData', formData)
// this.$set(this, 'form', JSON.parse(localStorage.getItem('taskInfo')))
},
getIstartFormData () {
const formData = [
{
data: [
{
title: '实例ID',
key: 'id',
component: {
name: 'readable'
}
},
{
title: '实例名称',
key: 'title',
component: {
name: 'readable'
}
},
{
title: '状态',
key: 'status',
component: {
name: 'readable'
}
},
{
title: '当前任务',
key: 'name',
component: {
name: 'readable'
}
},
{
title: '处理人',
key: 'instItem.ownerName',
component: {
name: 'readable'
}
},
{
title: '流程启动时间',
key: 'time',
component: {
name: 'readable'
}
}
]
}
]
this.$set(this, 'formData', formData)
this.$set(this, 'form', JSON.parse(localStorage.getItem('taskInfo')))
},
async getForm (oid) {
let id = '' let id = ''
await getInstancePbo(this.$route.query.oid).then((res) => { this.$route.query.type === 'MESSAGE' ? id = this.$route.query.oid : await getInstancePbo(this.$route.query.oid).then((res) => {
id = res.items.id id = res.items.id
}) })
const params = { const params = {
pageFrom: 1, pageFrom: 1,
pageSize: 1, pageSize: 1,
searchItems: { items: [{ fieldName: 'id', operator: 'EQ', value: id }] }, searchItems: { items: [{ fieldName: 'id', operator: 'EQ', value: oid || id }] },
sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }], sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }],
openProps: [{ name: 'dxContext' }, { name: 'objFileLinks', openProps: [{ name: 'target', pageFrom: 1, pageSize: 9999 }] }] openProps: [{ name: 'dxContext' }, { name: 'objFileLinks', openProps: [{ name: 'target', pageFrom: 1, pageSize: 9999 }] }]
} }
......
...@@ -213,6 +213,20 @@ export default { ...@@ -213,6 +213,20 @@ export default {
this.$refs.searchList.style.height = 'calc(100vh - 190px)' this.$refs.searchList.style.height = 'calc(100vh - 190px)'
this.$refs.searchModel.style.transitionDuration = '.5s' this.$refs.searchModel.style.transitionDuration = '.5s'
this.iconButton = 'arrow-down' this.iconButton = 'arrow-down'
},
goDetailsInfo (item) {
console.log(item, JSON.parse(item.businessObject))
const itemObj = JSON.parse(item.businessObject)
const dxClassname = itemObj?.dxClassname.split('vo.')[1]?.slice(0, -2)
this.$router.push({
path: `/InfoDetail-${itemObj.id}`,
query: {
oid: itemObj.id,
title: itemObj.name,
dxClassname: dxClassname,
type: 'MESSAGE'
}
})
} }
} }
} }
......
<template>
<div class="dee-flowExtSendOrderEditFeedBack">
<dee-form
ref="flowExtSendOrderEditFeedBack"
:form="form"
:form-data="formData"
:rules="rulesShow ? rules : {}"
/>
</div>
</template>
<script>
import DeeForm from '@/components/form/form'
export default {
props: {
basicData: {
type: Object,
require: true
},
flowData: {
type: Object,
require: true
},
selectRoute: {
type: String
}
},
components: {
DeeForm
},
data () {
return {
form: {},
formData: [
{
data: [
{
title: '答复意见',
key: 'feedback',
component: {
name: 'el-input',
type: 'textarea'
}
}
]
}
],
selectRadio: null,
rules: {
feedback: [{ required: true, message: '请输入', trigger: 'blur' }]
},
backFlowData: null
}
},
watch: {
},
computed: {
rulesShow () {
return this.selectRoute === 'deal'
}
},
created () { },
mounted () { },
methods: {
validate () {
return new Promise((resolve, reject) => {
this.$refs.flowExtSendOrderEditFeedBack.validate().then(() => {
const flowData = this.backFlowData ? this.backFlowData : this.flowData
const form = { ...flowData, ...this.form, operator: 'MODIFY' }
this.$api
.recursion('ExtSendOrder', form)
.then((res) => {
if (res) {
this.backFlowData = res.items
resolve(true)
}
})
.catch(() => {
resolve(false)
})
}).catch(() => {
resolve(false)
})
})
}
}
}
</script>
<style lang='scss'>
.dee-flowExtSendOrderEditFeedBack {
margin: 0 10px;
textarea {
border: 0.5px;
border-radius: 5px;
background-color: rgba(241, 241, 241, 0.5);
padding: 5px;
resize: none;
}
.pc-tips {
color: #999;
font-size: 12px;
margin-top: 10px;
margin-left: 20px;
}
}
</style>
...@@ -47,7 +47,6 @@ export default { ...@@ -47,7 +47,6 @@ export default {
methods: { methods: {
initData (data) { initData (data) {
const x = this.basicData const x = this.basicData
console.log('this.flowData?.dxClassname', this.flowData.dxClassname)
const dxClassname = this.flowData?.dxClassname.split('vo.')[1]?.slice(0, -2) const dxClassname = this.flowData?.dxClassname.split('vo.')[1]?.slice(0, -2)
const formItemData = [] const formItemData = []
formItemData.push({ formItemData.push({
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
this.$set(this, 'basicData', res.items) this.$set(this, 'basicData', res.items)
res.items.formInfo && res.items.formInfo &&
res.items.formInfo.forEach((item) => { res.items.formInfo.forEach((item) => {
if (item.configName && this.$store.state.tabs.tabs.find(x => x.key === item.configName) && !item.configName.includes('DeeFlowCheckItems')) { if (item.configName && this.$store.state.tabs.tabs.find(x => item.configName.includes(x.key))) {
this.dynamicComponents.push(item.configName.split('/')[1]) this.dynamicComponents.push(item.configName.split('/')[1])
} }
}) })
...@@ -181,48 +181,104 @@ export default { ...@@ -181,48 +181,104 @@ export default {
finishTask () { finishTask () {
const validateArray = [] const validateArray = []
let vlot = false let vlot = false
this.dynamicComponents.forEach(item => { this.dynamicComponents.forEach(item => {
const refCom = this.$refs[item] const refCom = this.$refs[item]
this.basicData.formInfo && this.basicData.formInfo.forEach(x => { if (this.basicData.formInfo) {
if (x.configName.includes(item) && x.comType === 'privateComponent' && (!refCom || !refCom[0])) { this.basicData.formInfo.forEach(x => {
vlot = true if (x.configName.includes(item) && x.comType === 'privateComponent' && (!refCom || !refCom[0])) {
} vlot = true
}) }
})
}
if (!refCom || !refCom[0] || vlot) return if (!refCom || !refCom[0] || vlot) return
const vm = refCom[0] const vm = refCom[0]
if ('validate' in vm) { if ('validate' in vm) {
validateArray.push(vm.validate()) validateArray.push(vm.validate())
} }
}) })
if (vlot) { if (vlot) {
this.$utils.showMessage('请填写必填项', 'warning') this.$utils.showMessage('请填写必填项', 'warning')
this.$refs.taskBtnRef.comLoading = false this.$refs.taskBtnRef.comLoading = false
return return
} }
this.dynamicComponents.forEach(item => { this.dynamicComponents.forEach(item => {
const refCom = this.$refs[item] const refCom = this.$refs[item]
if (refCom && 'validate' in refCom[0]) { if (refCom && 'validate' in refCom[0]) {
refCom[0] && refCom[0].validate() refCom[0].validate()
this.$refs.taskBtnRef.comLoading = false this.$refs.taskBtnRef.comLoading = false
} }
}) })
if (this.dynamicComponents.includes('GetParticipant')) { if (this.dynamicComponents.includes('GetParticipant')) {
const participants = { ...this.participant } const participants = { ...this.participant }
Object.keys(participants) && Object.keys(participants).forEach(key => { Object.keys(participants).forEach(key => {
if (participants[key].length === 0) { if (participants[key].length === 0) {
delete participants[key] delete participants[key]
} }
}) })
if (!participants) { if (!participants) {
this.$utils.showMessage('请设置参与者', 'warning') this.$utils.showMessage('请设置参与者', 'warning')
this.$refs.taskBtnRef.comLoading = false this.$refs.taskBtnRef.comLoading = false
return return
} }
this.participants = participants this.participants = participants
} }
Promise.all(validateArray).then(asd => { Promise.all(validateArray).then(asd => {
this.completeTask() this.completeTask()
}) })
// const validateArray = []
// let vlot = false
// this.dynamicComponents.forEach(item => {
// const refCom = this.$refs[item]
// this.basicData.formInfo && this.basicData.formInfo.forEach(x => {
// if (x.configName.includes(item) && x.comType === 'privateComponent' && (!refCom || !refCom[0])) {
// vlot = true
// }
// })
// if (!refCom || !refCom[0] || vlot) return
// const vm = refCom[0]
// if ('validate' in vm) {
// validateArray.push(vm.validate())
// }
// })
// if (vlot) {
// this.$utils.showMessage('请填写必填项', 'warning')
// this.$refs.taskBtnRef.comLoading = false
// return
// }
// this.dynamicComponents.forEach(item => {
// const refCom = this.$refs[item]
// if (refCom && 'validate' in refCom[0]) {
// refCom[0] && refCom[0].validate()
// this.$refs.taskBtnRef.comLoading = false
// }
// })
// if (this.dynamicComponents.includes('GetParticipant')) {
// const participants = { ...this.participant }
// Object.keys(participants) && Object.keys(participants).forEach(key => {
// if (participants[key].length === 0) {
// delete participants[key]
// }
// })
// if (!participants) {
// this.$utils.showMessage('请设置参与者', 'warning')
// this.$refs.taskBtnRef.comLoading = false
// return
// }
// this.participants = participants
// }
// Promise.all(validateArray).then(asd => {
// this.completeTask()
// })
}, },
completeTask () { completeTask () {
const taskDetailHandleFrom = this.$refs.taskDetailHandle[0].form const taskDetailHandleFrom = this.$refs.taskDetailHandle[0].form
......
...@@ -28,9 +28,9 @@ export default { ...@@ -28,9 +28,9 @@ export default {
userAccount: { userAccount: {
type: String, type: String,
default: '' default: ''
}, }
}, },
data() { data () {
return { return {
show: false, show: false,
form: {}, form: {},
...@@ -68,17 +68,17 @@ export default { ...@@ -68,17 +68,17 @@ export default {
clearable: true, clearable: true,
border: true border: true
} }
}, }
] ]
}], }],
rules: { oldPsd: [{ required: true, message: '请填写' }] } rules: { oldPsd: [{ required: true, message: '请填写' }] }
} }
}, },
methods: { methods: {
showPopup() { showPopup () {
this.show = true this.show = true
}, },
beforeClose(action, done) { beforeClose (action, done) {
if (action === 'confirm') { if (action === 'confirm') {
if (!(this.form.oldPassword && this.form.newPassword && this.form.newPasswordCon)) { if (!(this.form.oldPassword && this.form.newPassword && this.form.newPasswordCon)) {
this.$utils.showMessage('请输入!', 'warning') this.$utils.showMessage('请输入!', 'warning')
...@@ -95,13 +95,12 @@ export default { ...@@ -95,13 +95,12 @@ export default {
} }
revisePassword(params).then(res => { revisePassword(params).then(res => {
this.$utils.showMessage('修改成功!', 'success') this.$utils.showMessage('修改成功!', 'success')
done(); done()
this.$store.dispatch('user/logout') this.$store.dispatch('user/logout')
}) })
} else { } else {
done(); done()
} }
} }
} }
} }
...@@ -113,4 +112,4 @@ export default { ...@@ -113,4 +112,4 @@ export default {
margin: 10px; margin: 10px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
</div> </div>
</template> </template>
<script> <script>
import {
getInstanceHistory
} from '@/api/taskDetail'
export default { export default {
name: 'TodoListLazyCell', // name写在组件的最前方,自定义组件为必填 name: 'TodoListLazyCell', // name写在组件的最前方,自定义组件为必填
props: { props: {
...@@ -62,18 +64,31 @@ export default { ...@@ -62,18 +64,31 @@ export default {
methods: { methods: {
// 跳转详情页面 // 跳转详情页面
goDetailsInfo (item) { goDetailsInfo (item) {
this.$router.push({ console.log('item', item)
path: `/taskDetails-${item.id}`, if (this.$route.query.title === '我发起的任务') {
query: { localStorage.setItem('taskInfo', JSON.stringify(item))
id: item.id, this.$router.push({
procInstId: item.processInstanceId, path: `/InfoDetail-${item.id}`,
title: item.title, query: {
taskType: this.$route.query.title, id: item.id,
procDefId: item.processDefinitionId, title: item.name,
taskKey: item.taskDefinitionKey, type: 'ISTART'
description: '' }
} })
}) } else {
this.$router.push({
path: `/taskDetails-${item.id}`,
query: {
id: item.id,
procInstId: item.processInstanceId || item.instItem.procDefId.split(':')[2],
title: item.title,
taskType: this.$route.query.title,
procDefId: item.processDefinitionId,
taskKey: item.taskDefinitionKey,
description: ''
}
})
}
}, },
dealWithtaskData () { dealWithtaskData () {
if (this.allList.length > 10 * this.curr) { if (this.allList.length > 10 * this.curr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment