feat: There is no way the Transfer and withdrawal

This commit is contained in:
super_liu
2021-09-02 15:20:34 +08:00
parent 7ae9e262e8
commit f197165cbb
5 changed files with 212 additions and 58 deletions
@@ -29,7 +29,6 @@
v-if="tzclrEnable" v-if="tzclrEnable"
class="common-button-default" class="common-button-default"
@click="adjustmentHandler" @click="adjustmentHandler"
v-btn-permission="'39ETS7LEANXL8GG9MH8T'"
round round
>调整处理人</el-button> >调整处理人</el-button>
<!--临时屏蔽 start--> <!--临时屏蔽 start-->
@@ -113,17 +112,24 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<loading :loading="loading">流程列表加载中</loading> <loading :loading="loading">流程列表加载中</loading>
<!-- 上汽全公司选人解决方案 --> <!-- 福田全公司选人解决方案 -->
<org-table <Role-tree
title="调整处理人" check-box
:visible.sync="drawerModal" :is-title="drawerTitle"
dialog-model :is-visible.sync="drawerModal"
:config="orgTableConfig" @checkedRole="checkedRole"
:max-selected="1" :nodeList="nodeList"
max-selected-tips="处理人只能选择一个用户" ></Role-tree>
:excludeUser="excludeUser" <!-- <org-table-->
@confirm="addTree" <!-- title="调整处理人"-->
></org-table> <!-- :visible.sync="drawerModal"-->
<!-- dialog-model-->
<!-- :config="orgTableConfig"-->
<!-- :max-selected="1"-->
<!-- max-selected-tips="处理人只能选择一个用户"-->
<!-- :excludeUser="excludeUser"-->
<!-- @confirm="addTree"-->
<!-- ></org-table>-->
</div> </div>
</div> </div>
</template> </template>
@@ -140,6 +146,8 @@ export default {
loginPeople: '', loginPeople: '',
// 调整处理人抽屉状态 // 调整处理人抽屉状态
drawerModal: false, drawerModal: false,
drawerTitle: '',
nodeList: [],
tasksName: '', tasksName: '',
selectPeople: '', selectPeople: '',
// loading // loading
@@ -167,6 +175,25 @@ export default {
} }
}, },
methods: { methods: {
checkedRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({
taskId: this.selectPeople.id, // 任务id
assignee: data[0].id, // 被委托人
userId: this.selectPeople.assigneeId, // 委托人
pId: this.selectPeople.processInstanceId // 流程实例
}).then(res => {
this.assigneeNewLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.processNum()
this.processTable()
} else {
this.$message.warning(res.message)
}
})
},
/** /**
* @author liruohao * @author liruohao
* @date 2019/4/22 * @date 2019/4/22
@@ -821,6 +848,7 @@ export default {
adjustmentHandler () { adjustmentHandler () {
if (this.tableRow.length === 1 && !this.tableRow[0].endTime) { if (this.tableRow.length === 1 && !this.tableRow[0].endTime) {
this.drawerModal = true this.drawerModal = true
this.drawerTitle = '调整处理人'
this.selectPeople = this.tableRow[0] this.selectPeople = this.tableRow[0]
} else { } else {
this.$message.warning('请选择一条未完成的数据') this.$message.warning('请选择一条未完成的数据')
@@ -40,11 +40,10 @@ export default {
title: '已发流程', title: '已发流程',
name: 'AlreadySend' name: 'AlreadySend'
}, },
{ // {
title: '监控流程', // title: '监控流程',
name: 'MonitorProcess', // name: 'MonitorProcess',
permission: 'XYK2MHR5UMBL6SJ5BCHV' // },
},
{ {
title: '草稿', title: '草稿',
name: 'TaskDraft' name: 'TaskDraft'
@@ -128,6 +128,7 @@
<i class="iconfont">&#xe61e;</i> <i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '查看']" v-btn-permission="'b9abd00768c8ed97be89547c2da3f0eb'">查看</el-dropdown-item> <el-dropdown-item :command="[scope.row, '查看']" v-btn-permission="'b9abd00768c8ed97be89547c2da3f0eb'">查看</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '强制撤回']">强制撤回</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
@@ -173,6 +174,33 @@ export default {
case '查看': case '查看':
this.dealWith(command[0]) this.dealWith(command[0])
break break
case '强制撤回':
this.rejectTaskToStart(command[0])
break
}
},
// 强制撤回
rejectTaskToStart (rows) {
if (rows.isEnd === '0') {
this.$confirm('您确认要强制撤回该任务吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
this.$http.get('lawss/activiti/forceRecall', {
prcId: rows.prcId
}, {
_this: this
}, res => {
this.$message.success('撤回成功')
this.queryProcess()
}, e => {
})
})
} else {
this.$message.warning('当前流程数据已完成,请选择未完成的流程数据')
} }
}, },
resetSelect () { //清空 resetSelect () { //清空
@@ -134,6 +134,7 @@
<i class="iconfont">&#xe61e;</i> <i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '办理']">办理</el-dropdown-item> <el-dropdown-item :command="[scope.row, '办理']">办理</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '转办']">转办</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
@@ -149,13 +150,24 @@
@pageChange="pageChange" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination> @pageSizeChange="pageSizeChange"></pagination>
<loading :loading="loading">数据获取中</loading> <loading :loading="loading">数据获取中</loading>
<!-- 福田全公司选人解决方案 -->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="drawerModal"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {mapMutations, mapActions} from 'vuex' import {mapMutations, mapActions} from 'vuex'
import { changeAssigneeNew } from 'api/process'
import ProcessMixin from '../../../components/ProcessMixin' import ProcessMixin from '../../../components/ProcessMixin'
import axios from 'axios'
export default { export default {
name: 'ProcessCenter', name: 'ProcessCenter',
mixins: [ProcessMixin], mixins: [ProcessMixin],
@@ -166,6 +178,12 @@ export default {
prcNum: '', prcNum: '',
prcType: '' prcType: ''
}, },
assigneeNewLoading: false, // 调整处理人确定loading
// 调整处理人抽屉状态
drawerModal: false,
drawerTitle: '',
nodeList: [],
selectPeople:'',
total: 0, total: 0,
pageNo: 1, pageNo: 1,
loading: false, loading: false,
@@ -174,11 +192,54 @@ export default {
} }
}, },
methods: { methods: {
checkedRole (data) {
this.assigneeNewLoading = true
changeAssigneeNew({
taskId: this.selectPeople.taskIds, // 任务id
assignee: data[0].id, // 被委托人
userId: this.selectPeople.taskAssignee, // 委托人
pId: this.selectPeople.prcId // 流程实例
}).then(res => {
this.assigneeNewLoading = false
if (res.success) {
this.drawerModal = false
this.$message.success('调整成功')
this.processNum()
this.queryProcess()
} else {
this.$message.warning(res.message)
}
})
},
// 请求转换流程图
processNum (row) {
axios.request({
url: '/api/lawss/activiti/getImg?_t=' + new Date().getTime(),
responseType: 'blob',
method: 'get',
params: {
prcNum: this.selectPeople.prcNum
}
}).then(res => {
// let blob = new Blob([res.data], {type: 'image/jpg'})
// let url = window.URL.createObjectURL(res.data)
this.processStep = window.URL.createObjectURL(res.data)
})
},
// 调整处理人
adjustmentHandler (row) {
this.drawerModal = true
this.drawerTitle = '调整处理人'
this.selectPeople = row
},
handleCommand (command) { handleCommand (command) {
switch (command[1]) { switch (command[1]) {
case '办理': case '办理':
this.dealWith(command[0]) this.dealWith(command[0])
break break
case '转办':
this.adjustmentHandler(command[0])
break
} }
}, },
resetSelect () { //清空 resetSelect () { //清空
@@ -127,7 +127,7 @@
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i> <i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '办理']" v-btn-permission="'fa19fb2dc2cf3055a64732dab6c40cb9'">办理</el-dropdown-item> <el-dropdown-item :command="[scope.row, '办理']">办理</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
@@ -215,9 +215,11 @@ export default {
//草稿办理待开发 //草稿办理待开发
const { prcType, id } = row const { prcType, id } = row
const mes = JSON.parse(row.mes) const mes = JSON.parse(row.mes)
console.log(mes)
switch (prcType) { switch (prcType) {
// 标准入库、 // 标准入库、
case '1': case '1':
if(mes !== null && mes.taskInfo !== null){
if (mes.taskInfo === '申请人发起') { if (mes.taskInfo === '申请人发起') {
this.$router.push({ this.$router.push({
name: 'bzrkStep1', name: 'bzrkStep1',
@@ -238,6 +240,17 @@ export default {
} }
}) })
} }
}else {
this.$router.push({
name: 'bzrkStep1',
query: {
type: '1',
processName: '申请人发起流程',
bpnId: id,
verifySarStandard: true,
}
})
}
break break
// 法规入库及评估流程 // 法规入库及评估流程
case '2': case '2':
@@ -262,6 +275,7 @@ export default {
}) })
break break
case '4': case '4':
if(mes !== null && mes.taskInfo !== null){
if (mes.taskInfo === '引入法规标准清单') { if (mes.taskInfo === '引入法规标准清单') {
this.$router.push({ this.$router.push({
name: 'bzqdfbStep1-1', name: 'bzqdfbStep1-1',
@@ -282,8 +296,20 @@ export default {
} }
}) })
} }
}else {
this.$router.push({
name: 'bzqdfbStep1-1',
query: {
type: '4',
processName: '标准清单发布流程',
bpnId: id,
verifySarStandard: true,
}
})
}
break break
case '5': case '5':
if(mes !== null && mes.taskInfo !== null){
if (mes.taskInfo === '选择已拆分标准') { if (mes.taskInfo === '选择已拆分标准') {
this.$router.push({ this.$router.push({
name: 'xmpgStep1-1', name: 'xmpgStep1-1',
@@ -314,6 +340,18 @@ export default {
// } // }
// }) // })
// } // }
}else {
this.$router.push({
name: 'xmpgStep1-1',
query: {
type: '5',
processName: '项目合规评估流程-标准',
bpnId: id,
verifySarStandard: true,
}
})
}
break break
case '6': case '6':
this.$router.push({ this.$router.push({