Commit 62cb2efa authored by ztf's avatar ztf

任务中心,任务详情添加反馈信息,添加ICM相关技术单添加

parent 437c7776
<template>
<div class="ExtICMPlanDocLinkAdd">
<!-- 搜索条件 -->
<dee-as-com
ref="search"
:lay-config="{
layKey:'ExtICMPlanDocLink-Query',
typeName:'DxDocument'
}"
@searchEvent="searchEvent"
/>
<dee-as-com
ref="tableRef"
:lay-config="{
layKey:'ExtICMPlanDocLink-addlist',
typeName:'DxDocument'
}"
:dis-business="true"
:result-data="tableData"
@selectionChange="selectionChange"
/>
<div class="btns">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">确定</el-button>
<el-button type="primary" @click="$emit('cancel')">取消</el-button>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ExtICMPlanDocLinkAdd',
componentName: 'ICM相关联系单-添加',
props: {
basicData: {
type: Object,
default: () => {}
},
componentProp: {
type: Object,
default: () => {}
}
},
data() {
return {
selections: [],
searchForm: [],
tableData: []
}
},
computed: {
isDisable() {
return Boolean(this.selections.length)
},
queryParams() {
// 基本参数
let searchItems = [{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'ContactList'
}
]
// 过滤参数
const { items } = this.searchForm
if (items && items.length > 0) {
searchItems = [...searchItems, ...items]
}
return {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'items': searchItems,
'operator': 'AND'
},
'sortItem': [{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}]
}
}
},
mounted() {
},
methods: {
getData() {
const params = this.queryParams
post('/DxDocument/search', params).then(res => {
this.tableData = res.items.content
})
},
searchEvent(searchForm) {
this.searchForm = searchForm
this.getData()
},
selectionChange(data) {
this.selections = data
},
tosubmit() {
const params = {
sourceId: this.basicData.id, // 计划id
targetId: this.selections[0].id// 联系单id
}
if (this.selections && this.selections.length === 1) {
post('/ExtICMPlanDocLink/bindPlanAndDoc', params).then(res => {
if (res.items) {
this.$utils.showMessageSuccess('添加成功!')
this.$emit('completeEven')
}
})
} else {
this.$message.error('一次只能添加一个技术联系单')
}
}
}
}
</script>
<style lang='scss' scoped>
.ExtICMPlanDocLinkAdd{
height: calc(80%);
.btns{
text-align: center;
margin-top: 30px;
}
.submitBTN{
margin-right: 20px;
}
}
</style>
......@@ -58,6 +58,7 @@ export default {
const status = this.form.state
const subTypeName = this.subTypeName === 'ExtProgram' ? 'ExtProgram' : 'DxContext'
post(`/${subTypeName}/lifecycle/changeStatus?id=${id}&status=${status}&isValid=true`).then(res => {
this.$utils.showMessageSuccess('修改成功')
this.$emit('completeEven')
})
},
......
......@@ -56,6 +56,19 @@
/>
</div>
</div>
<div
v-if="basicData&& basicData.businessObject &&basicData.businessObject.subTypeName&& basicData.businessObject.subTypeName==='ExtPlanFeedback'"
>
<div class="sub-title" style="padding-bottom:12px">计划反馈</div>
<dee-as-com
:lay-config="{
typeName: 'ExtPlanReply',
layKey: 'task-ExtPlanReply'
}"
:form="ExtPlanReplyLinkform"
@on-submit="toSubmitExtPlanReply"
/>
</div>
<div v-if="basicData && basicData.basicInfo && !basicData.basicInfo.forwardFlag && (!isCheckTaskState || (isCheckTaskState && basicData.basicInfo.state==='BE_RESOLVED' && !basicData.basicInfo.parentTaskId))">
<div class="sub-title" style="padding-bottom:12px">任务处理</div>
<div v-for="(name,index) in dynamicComponents" :key="index">
......@@ -175,7 +188,7 @@ import { getInstancePbo, getInstanceInfo, getBizForm } from '@/api/workflow/user
import { getLayouts } from '@/api/workflow/config.js'
import { changeExamination, getCounterSignDeleteList } from '../../api/workflow/userSettings'
import addExaminationUserSelect from '@/views/workflow/task-center/task/addExaminationUserSelect'
import { post } from '@/utils/http'
export default {
components: {
TaskDetailBasicInfo,
......@@ -200,6 +213,8 @@ export default {
},
data() {
return {
isExtPlanReplyLinkBindSuccess: false, // 反馈计划是否绑定成功
ExtPlanReplyLinkform: {},
// 是否已经保持盘点结果
isSaveBeforeSubmit: true,
tabProps: {
......@@ -565,6 +580,7 @@ export default {
}
]
}
console.log('layoutId', res.items.layoutId)
this.layoutId = res.items.layoutId || ''
if (res.items.otherFormInfo && res.items.otherFormInfo.length) {
this.editableTabs = this.editableTabs.concat(res.items.otherFormInfo.filter(r => r.isShow).map((r, index) => {
......@@ -599,6 +615,7 @@ export default {
'taskKey': basicInfo.taskDefinitionKey
}
this.getBizForm()
// this.dynamicComponents = [
// {
// 'configName': 'test-doc',
......@@ -755,6 +772,9 @@ export default {
return r
})
}
if (businessObject.subTypeName && businessObject.subTypeName === 'ExtPlanFeedback') {
this.initExtPlanReplyForm()
}
this.routes = routes
})
})
......@@ -783,9 +803,19 @@ export default {
})
},
// 完成任务
finishTask(flag, params, callback, errCallBack) {
// 反馈计划完成任务之前要先判断是否绑定反馈信息
finishPlanReplyTask(flag, params, callback, errCallBack) {
if (this.isExtPlanReplyLinkBindSuccess) {
this.finishTaskhandle(flag, params, callback, errCallBack)
} else {
this.$message.error('请填写反馈信息,绑定成功后即可完成任务')
}
},
finishTaskhandle(flag, params, callback, errCallBack) {
this.$nextTick(function() {
const validateArray = []
// 反馈计划信息 必须是已完成才能完成任务
// 审批对象表单
this.approvalObject.forEach(item => {
const refCom = this.$refs[item.refKey]
......@@ -819,6 +849,13 @@ export default {
})
})
},
finishTask(flag, params, callback, errCallBack) {
if (this.basicData.businessObject.subTypeName && this.basicData.businessObject.subTypeName === 'ExtPlanFeedback') {
this.finishPlanReplyTask(flag, params, callback, errCallBack)
} else {
this.finishTaskhandle(flag, params, callback, errCallBack)
}
},
handleFinish(params, callback, errCallBack) {
completeTask(params).then(res => {
this.$utils.showMessageSuccess(res.message || '操作成功')
......@@ -853,27 +890,53 @@ export default {
}
})
},
finishTaskClick(flag) {
this.$nextTick(function() {
if (this.taskDetailHandleForm.radio === '终止流程') {
this.finishTask()
} else {
const validateArray = []
this.dynamicComponents.forEach(name => {
if (this.$refs.hasOwnProperty(name)) {
if (this.$refs[name][0].hasOwnProperty('validate')) {
validateArray.push(this.$refs[name][0].validate())
// 初始化进度计划反馈信息表格
initExtPlanReplyForm() {
const params = {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [],
'items': [{
'fieldName': 'sourceId',
'operator': 'EQ',
'value': this.basicData.businessObject.id
},
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'ExtPlanReplyLink'
}],
'operator': 'AND'
},
'openProps': [
{
name: 'target'
}
],
'sortItem': [{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}]
}
})
validateArray.push(this.$refs.form.validate())
Promise.all([flag, ...validateArray]).then(asd => {
if (!asd.includes(false)) {
this.finishTask()
post('/ExtPlanReplyLink/search', params).then(res => {
if (res.items.content.length > 0 && res.items.content[0].target) {
console.log('查询的接口', res.items.content)
this.isExtPlanReplyLinkBindSuccess = true
this.ExtPlanReplyLinkform = res.items.content[0].target || {}
}
}).catch(e => {
})
},
// 进度计划反馈信息提交
toSubmitExtPlanReply() {
const params = {
target: this.ExtPlanReplyLinkform,
sourceId: this.basicData.businessObject.id,
opertar: 'AND'
}
console.log('计划反馈信息', params)
post('/ExtPlanReplyLink/recursion', params).then(res => {
this.$utils.showMessageSuccess('保存成功')
})
}
},
......
......@@ -3,6 +3,17 @@
<div class="processTask-list-page ">
<div class="processTask-table">
<div v-if="searchQuery">这里是高级搜索的表格
<dee-search-box
:form-data="formData"
v-bind="searchQueryForm"
@searchEvent="searchEvent"
/>
</div>
<div class="table-tool">
<dee-tools :tools="tools" mode="normal" :collapse="false" />
<dee-tools :tools="searchTools" mode="normal" :collapse="false" />
</div>
<dee-table
ref="processTaskTable"
:columns="tableColums"
......@@ -10,13 +21,10 @@
:data="tableData"
:options="tableOption"
:pagination="pagination"
:selection-row="selectionRow"
@pagination-current-change="paginationCurrentChange"
@pagination-size-change="handleSizeChange"
@selection-change="selectionChange"
>
<dee-tools slot="header" :tools="tools" mode="normal" :collapse="false" />
</dee-table>
/>
<dee-drawer
title="流程信息"
:dialog-visible.sync="drawerDialogVisible"
......@@ -45,6 +53,20 @@ export default {
},
data() {
return {
searchTools: [
{
name: '高级搜索',
icon: '/icons/filter.png',
handler: {
click: () => {
this.searchQuery = !this.searchQuery
// this.$refs.groupTree.editGroup(false, null)
}
}
}
],
searchQuery: false,
searchQueryForm: {},
itemData: null,
drawerDialogVisible: false,
clickItem: null,
......@@ -106,7 +128,6 @@ export default {
// { title: '流程完成时间', key: 'gmtFinished', align: 'center', Width: 180 }
// ],
selectionRow: [],
taskState: ''
}
},
......@@ -230,9 +251,9 @@ export default {
}
})
},
selectionChange(val) {
this.selectionRow = val
},
// selectionChange(val) {
// this.selectionRow = val
// },
paginationCurrentChange(currentPage) {
this.pagination.currentPage = currentPage
this.getTableData(this.taskState)
......@@ -276,7 +297,10 @@ export default {
padding: 14px;
margin-bottom: 6px;
overflow:auto
}
.table-tool{
display: flex;
justify-content: space-between;
}
.detail-content{
width: 100%;
......
<!-- 流程任务 -->
<template>
<div class="processTask-list-page ">
<div class="processTask-table">
<div v-if="!ifShow" class="processTask-table">
<div v-if="searchQuery">这里是高级搜索的表格
<dee-search-box
:form-data="formData"
v-bind="searchQueryForm"
@searchEvent="searchEvent"
/>
</div>
<div class="table-tool">
<dee-tools :tools="tools" mode="normal" :collapse="false" />
<dee-tools :tools="searchTools" mode="normal" :collapse="false" />
</div>
<dee-table
ref="processTaskTable"
:columns="tableColums"
......@@ -9,13 +20,9 @@
:data="tableData"
:options="tableOption"
:pagination="pagination"
:selection-row="selectionRow"
@pagination-current-change="paginationCurrentChange"
@pagination-size-change="handleSizeChange"
@selection-change="selectionChange"
>
<dee-tools slot="header" :tools="tools" mode="normal" :collapse="false" />
</dee-table>
/>
</div>
<div v-if="ifShow" class="detail-content">
<img class="down-pic" src="/icons/d-down.png" @click="handleCloseDetail">
......@@ -42,6 +49,78 @@ export default {
},
data() {
return {
searchTools: [
{
name: '高级搜索',
icon: '/icons/filter.png',
handler: {
click: () => {
this.searchQuery = !this.searchQuery
// this.$refs.groupTree.editGroup(false, null)
}
}
}
],
searchQuery: false,
searchQueryForm: {},
formData: [{
'title': '',
'split': 3,
'data': [{
'title': '项目代号',
'key': 'projectCode',
'width': 1,
'component': {
'name': 'el-input',
'fixedItem': true,
'defaultItem': true
},
'filedMatch': {
'relation': 'LIKE'
}
}, {
'title': '业务对象',
'key': 'taskTitle',
'width': 1,
'component': {
'name': 'el-input',
'fixedItem': true,
'defaultItem': true
},
'type': false,
'filedMatch': {
'relation': 'LIKE'
}
},
{
'title': '业务对象类型',
'key': 'name',
'width': 1,
'component': {
'name': 'el-input',
'fixedItem': true,
'defaultItem': true
},
'type': false,
'filedMatch': {
'relation': 'LIKE'
}
},
{
'title': '任务创建者',
'key': 'creator.userName',
'width': 1,
'component': {
'name': 'el-input',
'fixedItem': true,
'defaultItem': true
},
'type': false,
'filedMatch': {
'relation': 'LIKE'
}
}]
}],
itemData: null,
ifShow: false,
tableData: [],
......@@ -59,8 +138,9 @@ export default {
align: 'center',
width: '70'
},
selectionRow: [],
taskState: ''
// selectionRow: [],
taskState: '',
showQueryFormState: false
}
},
computed: {
......@@ -103,7 +183,7 @@ export default {
const commonColums = [
{ title: '项目代号', key: 'projectCode', align: 'center', minWidth: 180 },
{
title: '任务名称', key: '', align: 'center', minWidth: 140,
title: '任务名称', key: '', align: 'center', width: 80,
component: {
render: (h, params) => {
return h('div', [
......@@ -125,7 +205,7 @@ export default {
}
}
},
{ title: '业务对象', key: 'taskTitle', align: 'center', minWidth: 140
{ title: '业务对象', key: 'taskTitle', align: 'center', minWidth: 200
},
{ title: '接收时间', key: 'startTime', align: 'center', minWidth: 180 },
{ title: '业务对象类型', key: 'name', align: 'center', minWidth: 140, formatter(row, column) {
......@@ -203,6 +283,7 @@ export default {
deep: true,
handler(val) {
if (val) {
this.ifShow = false
this.taskState = val
this.getTableData(val)
}
......@@ -233,13 +314,14 @@ export default {
return item
})
console.log('this.tableData', this.tableData)
this.$emit('total', res.items.totalElements)
this.pagination.total = res.items.totalElements
}
})
},
selectionChange(val) {
this.selectionRow = val
},
// selectionChange(val) {
// this.selectionRow = val
// },
paginationCurrentChange(currentPage) {
this.pagination.currentPage = currentPage
this.getTableData(this.taskState)
......@@ -259,6 +341,9 @@ export default {
gotoTaskDeatil(params) {
this.itemData = params
this.ifShow = true
},
searchEvent() {
console.log('开始搜索了')
}
}
}
......@@ -282,7 +367,10 @@ export default {
.processTask-table{
padding: 14px;
margin-bottom: 6px;
// overflow:auto
.table-tool{
display: flex;
justify-content: space-between;
}
}
.detail-content{
......@@ -292,17 +380,27 @@ export default {
right: 0;
border-top: 1px solid #ddd;
background: #Fff;
z-index: 10;
overflow: auto;
.down-pic{
position: absolute;
left:0;
right: 0;
top: 0;
z-index: 100;
margin:0 auto;
cursor: pointer;
}
.icon-box {
display: flex;
width: 100%;
justify-content: flex-end;
}
.icon-btn {
font-size: 18px;
margin-left: 6px;
margin-top: 5px;
cursor: pointer;
color: #2f90e2;
}
}
}
......
......@@ -3,7 +3,7 @@
<dee-fold-pane
:min-percent="5"
:max-percent="30"
:default-percent="22"
:default-percent="15"
split="vertical"
class="detail-pane"
>
......@@ -27,6 +27,7 @@
<img v-if="data.icon" width="21px" height="21px" :src="data.icon" alt="">
<span v-if="node.label" class="change-text">
{{ node.label }}
<!-- <span>{{ node.data.num }}</span> -->
</span>
</div>
......@@ -37,7 +38,7 @@
</template>
<template #paneR>
<div class="right-panel">
<ProcessTaskTable v-if="initdata.componentName==='ProcessTaskTable'" :initdata="initdata" />
<ProcessTaskTable v-if="initdata.componentName==='ProcessTaskTable'" :initdata="initdata" @total="getProcessTaskTotalNum" />
<MyProcessTaskTable v-if="initdata.componentName==='MyProcessTaskTable'" :initdata="initdata" />
<IEDTaskTable v-if="initdata.componentName==='IEDTaskTable'" :initdata="initdata" />
<PuchaseTaskTable v-if="initdata.componentName==='PuchaseTaskTable'" :initdata="initdata" />
......@@ -95,6 +96,10 @@ export default {
} else {
this.initdata = data
}
},
getProcessTaskTotalNum(value) {
console.log('获取数量', value)
this.todoNum = value
}
}
}
......
......@@ -2,7 +2,15 @@ export default {
props: {},
data() {
return {
treeData: [
todoNum: null
}
},
mounted() {
},
computed: {
treeData() {
return [
{
name: '流程任务',
icon: '/icons/dee-project/plan.png',
......@@ -14,7 +22,8 @@ export default {
name: '待处理',
componentName: 'ProcessTaskTable',
icon: '/icons/dee-project/team.png',
state: 'todo'
state: 'todo',
num: this.todoNum
},
{
name: '已完成',
......@@ -23,8 +32,8 @@ export default {
state: 'finished'
},
{
// /workflow/inst?
name: '我发起的流程',
ifClick: false,
componentName: 'MyProcessTaskTable',
icon: '/icons/dee-project/team.png',
state: '',
......@@ -124,9 +133,11 @@ export default {
name: '分发任务',
icon: '/icons/dee-project/baseline.png',
componentName: 'DistributeTable',
ifClick: false,
children: [
{
name: '待处理',
ifClick: false,
componentName: 'PlanTeam',
icon: '/icons/dee-project/team.png',
type: 'Pending',
......@@ -153,6 +164,7 @@ export default {
componentName: 'PlanTeam',
icon: '/icons/dee-project/team.png',
type: 'Done',
ifClick: false,
children: [
{
name: '主办',
......@@ -173,6 +185,7 @@ export default {
},
{
name: '我发起的分发',
ifClick: false,
componentName: 'DistributeTable',
icon: '/icons/dee-project/team.png',
children: [
......@@ -214,9 +227,6 @@ export default {
}
]
}
},
mounted() {
},
methods: {
......
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