申请方 新增终止功能 审批方能力申请 改为驳回

This commit is contained in:
a0049873 2022-08-02 17:23:07 +08:00
parent 4a4a4b3d35
commit c889fe069f
6 changed files with 187 additions and 44 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-29 15:59:51 * @Date: 2022-06-29 15:59:51
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-28 17:23:05 * @LastEditTime: 2022-08-02 16:06:20
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!-- 流程业务表单 --> <!-- 流程业务表单 -->
@ -102,8 +102,8 @@
<el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button> <el-radio-button label="退回" class="redAll" @click="showDialog('退回')">退回</el-radio-button>
</el-radio-group> --> </el-radio-group> -->
<el-button type="primary" @click="showDialog('同意')">同意</el-button> <el-button type="primary" @click="showDialog('同意')">同意</el-button>
<el-button type="danger" plain @click="showDialog('拒绝')" <el-button type="danger" plain @click="showDialog('驳回')"
>拒绝</el-button >驳回</el-button
> >
<!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input> <!-- <el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input> <el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
@ -411,13 +411,13 @@ export default {
}) })
}) })
.catch(() => {}) .catch(() => {})
} else if (this.dialogType === '拒绝') { } else if (this.dialogType === '驳回') {
const params = qs.stringify({ const params = qs.stringify({
taskId: this.dataForm.taskId, taskId: this.dataForm.taskId,
comment: this.input comment: this.input
}) })
this.$http this.$http
.post('/act/task/endProcess?', params) .post('/act/task/backToFirst?', params)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.$message.error(res.msg) this.$message.error(res.msg)

View File

@ -275,3 +275,12 @@ export function AbilityToPullDownPages(params) {
params, params,
}) })
} }
//
export function endProcess(params) {
return request({
url: '/act/task/endProcess',
method: 'post',
params,
})
}

View File

@ -2,8 +2,51 @@
<div class="ability-to-apply-for" :class="{ all: falg }"> <div class="ability-to-apply-for" :class="{ all: falg }">
<div class="title"> <div class="title">
<span>申请能力</span> <span>申请能力</span>
<span class="btn" @click="falg = !falg" v-show="!falg">展开</span> <div class="btnBox" v-show="!falg">
<span class="btn" @click="falg = !falg" v-show="falg">收起</span> <svg
t="1659419933164"
class="btn"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="5926"
width="20"
height="20"
@click="falg = !falg"
>
<path
d="M512 565.12a45.44 45.44 0 0 1-32.64-13.44l-448-451.84a45.44 45.44 0 0 1 64-64L512 454.4 931.84 35.2a46.08 46.08 0 0 1 64 0 45.44 45.44 0 0 1 0 64L545.28 551.68a45.44 45.44 0 0 1-33.28 13.44z"
fill="#13227a"
p-id="5927"
></path>
<path
d="M512 1016.96a45.44 45.44 0 0 1-32.64-13.44l-448-451.84a45.44 45.44 0 0 1 64-64L512 906.24l419.2-419.2a46.08 46.08 0 0 1 64 0 45.44 45.44 0 0 1 0 64l-449.92 452.48a45.44 45.44 0 0 1-33.28 13.44z"
fill="#13227a"
p-id="5928"
></path>
</svg>
<span class="btn" @click="falg = !falg">展开</span>
</div>
<div class="btnBox" v-show="falg">
<svg
t="1659420014519"
class="btn"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="9781"
width="20"
height="20"
@click="falg = !falg"
>
<path
d="M498.095 146.134l403.416 403.415c17.387 17.387 45.576 17.387 62.963 0s17.387-45.576 0-62.963L499.888 22 35.302 486.586c-17.388 17.387-17.388 45.575 0 62.963 17.387 17.387 45.576 17.387 62.964 0L498.095 146.134zM498.817 592.073l402.693 402.693c17.387 17.387 45.576 17.387 62.963 0s17.387-45.576 0-62.963L499.888 467.219 35.302 931.804c-17.388 17.387-17.388 45.576 0 62.963 17.387 17.387 45.576 17.387 62.964 0L498.817 592.073z"
p-id="9782"
fill="#13227a"
></path>
</svg>
<span class="btn" @click="falg = !falg">收起</span>
</div>
</div> </div>
<div <div
v-for="(item, index) in dataForm" v-for="(item, index) in dataForm"
@ -50,7 +93,7 @@
{{ {{
val.description || val.description ||
((val.note1 || '') && ((val.note1 || '') &&
( JSON.parse(val.note1)[0].channelName || '--') + (JSON.parse(val.note1)[0].channelName || '--') +
'等' + '等' +
JSON.parse(val.note1).length + JSON.parse(val.note1).length +
'个摄像头') || '个摄像头') ||
@ -248,6 +291,7 @@
.btn { .btn {
cursor: pointer; cursor: pointer;
margin-left: 10px;
} }
.tx { .tx {
@ -285,4 +329,8 @@
background: url('~@/assets/home/ywzj_square.png') no-repeat; background: url('~@/assets/home/ywzj_square.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.btnBox {
display: flex;
align-items: center;
}
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44 * @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-08-01 10:49:31 * @LastEditTime: 2022-08-02 16:34:42
* @Description:我的申请 能力申请 查看详情 * @Description:我的申请 能力申请 查看详情
--> -->
<template> <template>
@ -52,7 +52,33 @@
<span class="img"></span> <span class="img"></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
<div class="oddNumbers">子单号{{ item.instanceId }}</div> <div
style="
display: flex;
justify-content: space-between;
align-items: center;
"
>
<div class="oddNumbers">子单号{{ item.instanceId }}</div>
<div style="display: flex; align-items: center">
<a-button type="primary" @click="modify(item.instanceId)">
修改
</a-button>
<a-popconfirm
v-if="!item.ended"
title="是否终止此流程?"
ok-text="是"
cancel-text="否"
@confirm="endThis(item.instanceId)"
@cancel="cancel"
>
<a-button type="primary" danger style="margin-left: 10px">
流程终止
</a-button>
</a-popconfirm>
</div>
</div>
<div class="box" v-if="item.list.length > 0"> <div class="box" v-if="item.list.length > 0">
<div class="ability" v-for="val in item.list" :key="val.id"> <div class="ability" v-for="val in item.list" :key="val.id">
<div <div
@ -82,30 +108,32 @@
<div class="right"> <div class="right">
<div class="ability-top"> <div class="ability-top">
<div class="name"> <div class="name">
{{ val.name }} <div class="name">
<span class="type"> <span class="channelName">{{ val.name }}</span>
{{ <span class="type">
val.type == '应用资源' {{
? '应用资源' val.type == '应用资源'
: val.infoList.filter( ? '应用资源'
(val2) => val2.attrType == '组件类型' : val.infoList.filter(
)[0].attrValue == '智能算法' (val2) => val2.attrType == '组件类型'
? '智能算法' )[0].attrValue == '智能算法'
: val.infoList.filter( ? '智能算法'
(val2) => val2.attrType == '组件类型' : val.infoList.filter(
)[0].attrValue == '图层服务' (val2) => val2.attrType == '组件类型'
? '图层服务' )[0].attrValue == '图层服务'
: val.infoList.filter( ? '图层服务'
(val2) => val2.attrType == '组件类型' : val.infoList.filter(
)[0].attrValue == '开发组件' (val2) => val2.attrType == '组件类型'
? '开发组件' )[0].attrValue == '开发组件'
: val.infoList.filter( ? '开发组件'
(val2) => val2.attrType == '组件类型' : val.infoList.filter(
)[0].attrValue == '业务组件' (val2) => val2.attrType == '组件类型'
? '业务组件' )[0].attrValue == '业务组件'
: '--' ? '业务组件'
}} : '--'
</span> }}
</span>
</div>
</div> </div>
<div></div> <div></div>
<!-- <div class="btn" v-if="val.type == '组件服务'">技术文档</div> --> <!-- <div class="btn" v-if="val.type == '组件服务'">技术文档</div> -->
@ -127,7 +155,7 @@
<div class="right"> <div class="right">
<div class="ability-top"> <div class="ability-top">
<div class="name"> <div class="name">
{{ val.channelName }} <span class="channelName">{{ val.channelName }}</span>
<span class="type">基础设施</span> <span class="type">基础设施</span>
</div> </div>
</div> </div>
@ -156,6 +184,9 @@
</template> </template>
<script setup> <script setup>
import { ref, defineProps } from 'vue' import { ref, defineProps } from 'vue'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { endProcess } from '@/api/personalCenter.js'
const backUrl = ref(window.SITE_CONFIG.apiURL + '/') const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
const props = defineProps({ const props = defineProps({
refObj: { type: Object, default: null }, refObj: { type: Object, default: null },
@ -169,6 +200,19 @@
} }
const showArr = ref([]) const showArr = ref([])
console.log(props.refObj, '=====================================') console.log(props.refObj, '=====================================')
const endThis = (instanceId) => {
endProcess({ instanceId: instanceId }).then((res) => {
if (res.data.code == 0) {
message.success('流程终止成功!')
mybus.emit('closeModal', { type: '能力申请', index: 0 })
} else {
message.warning('流程终止失败!')
}
})
}
const modify = (instanceId) => {
console.log('修改==============>', instanceId)
}
if (props.refObj.resourceApplication) { if (props.refObj.resourceApplication) {
showArr.value = [] showArr.value = []
for (const key in props.refObj.resourceApplication) { for (const key in props.refObj.resourceApplication) {
@ -318,15 +362,21 @@
.name { .name {
width: 6rem; width: 6rem;
height: 0.2rem; height: 0.2rem;
overflow: hidden; display: flex;
text-overflow: ellipsis; .channelName {
display: -webkit-box; max-width: 5rem;
-webkit-line-clamp: 1; height: 0.2rem;
-webkit-box-orient: vertical; overflow: hidden;
word-break: break-all; text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
}
.type { .type {
background: #0087ff; background: #0087ff;
color: #fff; color: #fff;
line-height: 14px;
padding: 2px 10px; padding: 2px 10px;
border-radius: 10px; border-radius: 10px;
margin-left: 0.1rem; margin-left: 0.1rem;

View File

@ -304,7 +304,7 @@
<script setup> <script setup>
// import qs from 'qs' // import qs from 'qs'
import { onMounted, reactive, ref } from 'vue' import { onMounted, reactive, ref, onBeforeUnmount } from 'vue'
import { import {
getMyProcessInstancePage, getMyProcessInstancePage,
// getTaskHandleDetailInfo, // getTaskHandleDetailInfo,
@ -325,6 +325,7 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import ApplyDetails from '@/views/personalCenter/components/ApplyDetails' import ApplyDetails from '@/views/personalCenter/components/ApplyDetails'
import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
let typeList = ref([ let typeList = ref([
'能力申请', '能力申请',
@ -755,6 +756,13 @@
} }
}) })
} }
mybus.on('closeModal', (obj) => {
detailsVisible.value = false
changeType(obj.type, obj.index)
})
onBeforeUnmount(() => {
mybus.off('closeModal')
})
onMounted(() => { onMounted(() => {
getApplyList() getApplyList()
}) })

View File

@ -2,12 +2,27 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44 * @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 16:25:57 * @LastEditTime: 2022-08-02 15:48:15
* @Description:我的申请 能力申请 查看详情 * @Description:我的申请 能力申请 查看详情
--> -->
<template> <template>
<div class="top"> <div class="top">
<div class="title">基本信息</div> <div
style="display: flex; justify-content: space-between; align-items: center"
>
<div class="title">基本信息</div>
<a-popconfirm
v-if="!props.refObj.ended"
title="是否终止此流程?"
ok-text="是"
cancel-text="否"
@confirm="endThis"
@cancel="cancel"
>
<a-button type="primary" danger>流程终止</a-button>
</a-popconfirm>
<div v-else></div>
</div>
<div class="main"> <div class="main">
<div> <div>
<p class="item"> <p class="item">
@ -29,10 +44,23 @@
</template> </template>
<script setup> <script setup>
import { ref, defineProps } from 'vue' import { ref, defineProps } from 'vue'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { endProcess } from '@/api/personalCenter.js'
const props = defineProps({ const props = defineProps({
refObj: { type: Object, default: null }, refObj: { type: Object, default: null },
}) })
console.log(props.refObj, '=====================================') console.log(props.refObj, '=====================================')
const endThis = () => {
endProcess({ instanceId: props.refObj.processInstanceId }).then((res) => {
if (res.data.code == 0) {
message.success('流程终止成功!')
mybus.emit('closeModal', { type: '能力上架', index: 2 })
} else {
message.warning('流程终止失败!')
}
})
}
// if (props.refObj.resourceApplication) { // if (props.refObj.resourceApplication) {
// showArr.value = [] // showArr.value = []
// for (const key in props.refObj.resourceApplication) { // for (const key in props.refObj.resourceApplication) {