Merge pull request 'fix : 修复退回节点弹窗' (#668) from dd into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/668
This commit is contained in:
@@ -2,29 +2,50 @@
|
|||||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||||
<div class="oper-page-btn" style="display: flex">
|
<div class="oper-page-btn" style="display: flex">
|
||||||
<el-select v-if="taskUserOptionList?.length>0" v-model="backNode" placeholder="请选择退回节点" clearable style="width: 150px;margin-right: 10px">
|
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||||
<el-option
|
|
||||||
v-for="item in taskUserOptionList"
|
|
||||||
:key="item.nodeId"
|
|
||||||
:label="item.nodeName + (item.userInfo ? ':' + item.userInfo.name : '')"
|
|
||||||
:value="item.nodeId">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-button type="danger" @click="rollbackHandler">驳回</el-button>
|
|
||||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-dialog v-model="showBackNode" title="选择退回节点" width="400">-->
|
<div class="opinion-dialog">
|
||||||
<!-- <el-select v-model="backNode" placeholder="请选择退回节点" clearable filterable>-->
|
<el-dialog v-model="showBackNode" title="请选择退回节点" width="400">
|
||||||
<!-- <el-option-->
|
<el-table :data="taskUserOptionList" style="width: 100%"
|
||||||
<!-- v-for="item in taskUserOptionList"-->
|
:header-cell-style="{background:'#f5f7fa'}">
|
||||||
<!-- :key="item.nodeId"-->
|
<el-table-column width="55">
|
||||||
<!-- :label="item.nodeName + ':' + item.userInfo.name"-->
|
<template #default="scope">
|
||||||
<!-- :value="item.nodeId">-->
|
<el-radio
|
||||||
<!--<!– {{item.nodeName }} : {{item.userInfo.name}}–>-->
|
class="radio"
|
||||||
<!-- </el-option>-->
|
:label="scope.row"
|
||||||
<!-- </el-select>-->
|
v-model="backNode"
|
||||||
<!-- <el-button type="danger" @click="rollbackHandler">确认</el-button>-->
|
>   
|
||||||
<!-- </el-dialog>-->
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nodeName"
|
||||||
|
label="节点名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="操作者">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.userInfo" type="success">{{ scope.row.userInfo.name }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="oper" style="display: flex;justify-content: flex-end;margin-top: 10px">
|
||||||
|
<el-button type="danger" @click="rollbackHandler">确定</el-button>
|
||||||
|
<el-button @click="showBackNode=false">取消</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- <el-select v-if="taskUserOptionList?.length>0" v-model="backNode" placeholder="请选择退回节点" clearable>-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="item in taskUserOptionList"-->
|
||||||
|
<!-- :key="item.nodeId"-->
|
||||||
|
<!-- :label="item.nodeName + (item.userInfo ? ':' + item.userInfo.name : '')"-->
|
||||||
|
<!-- :value="item.nodeId">-->
|
||||||
|
<!-- </el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- <el-button type="danger" @click="rollbackHandler">确认</el-button>-->
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
@@ -56,7 +77,7 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const backNode = ref('')
|
const backNode = ref({})
|
||||||
const showBackNode = ref(false)
|
const showBackNode = ref(false)
|
||||||
const schema = computed(() => {
|
const schema = computed(() => {
|
||||||
return [
|
return [
|
||||||
@@ -147,32 +168,8 @@ const back = () => {
|
|||||||
}
|
}
|
||||||
// 驳回
|
// 驳回
|
||||||
const handleReject = async () => {
|
const handleReject = async () => {
|
||||||
// const values = form.value.getValues()
|
|
||||||
showBackNode.value = true
|
showBackNode.value = true
|
||||||
// if (!_value.value) {
|
backNode.value = {}
|
||||||
// ElNotification({
|
|
||||||
// title: '提示',
|
|
||||||
// message: '请填写审核意见',
|
|
||||||
// type: 'warning'
|
|
||||||
// })
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// const params = {
|
|
||||||
// taskId: props.taskId,
|
|
||||||
// // ...values
|
|
||||||
// auditOpinion: _value.value
|
|
||||||
// }
|
|
||||||
// // console.log('params', params)
|
|
||||||
// const res = await rejectTask(params)
|
|
||||||
// ElNotification({
|
|
||||||
// title: '提示',
|
|
||||||
// message: res.msg,
|
|
||||||
// type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
// })
|
|
||||||
// if (res.code === 1000){
|
|
||||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
|
||||||
// back()
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
//回退节点
|
//回退节点
|
||||||
const rollbackHandler = async () => {
|
const rollbackHandler = async () => {
|
||||||
@@ -189,7 +186,7 @@ const rollbackHandler = async () => {
|
|||||||
taskId: props.taskId,
|
taskId: props.taskId,
|
||||||
// ...values
|
// ...values
|
||||||
auditOpinion: _value.value,
|
auditOpinion: _value.value,
|
||||||
rollBackId: backNode.value
|
rollBackId: backNode.value.nodeId
|
||||||
}
|
}
|
||||||
// console.log('params', params)
|
// console.log('params', params)
|
||||||
const res = await rejectTask(params)
|
const res = await rejectTask(params)
|
||||||
@@ -224,6 +221,10 @@ const handleAgree = async () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
|
.opinion-dialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,17 +2,50 @@
|
|||||||
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
<!-- <baseTitle title="审核意见"></baseTitle>-->
|
||||||
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
<!-- <fvForm :schema="schema" @getInstance="(e)=>form = e"></fvForm>-->
|
||||||
<div class="oper-page-btn" style="display: flex">
|
<div class="oper-page-btn" style="display: flex">
|
||||||
<el-select v-if="taskUserOptionList?.length>0" v-model="backNode" placeholder="请选择退回节点" clearable style="width: 150px;margin-right: 10px">
|
<el-button type="danger" @click="handleReject">驳回</el-button>
|
||||||
<el-option
|
|
||||||
v-for="item in taskUserOptionList"
|
|
||||||
:key="item.nodeId"
|
|
||||||
:label="item.nodeName + (item.userInfo ? ':' + item.userInfo.name : '')"
|
|
||||||
:value="item.nodeId">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-button type="danger" @click="rollbackHandler">驳回</el-button>
|
|
||||||
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
<el-button color="#DED0B2" @click="handleAgree">同意</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="opinion-dialog">
|
||||||
|
<el-dialog v-model="showBackNode" title="请选择退回节点" width="300">
|
||||||
|
<el-table :data="taskUserOptionList" style="width: 100%"
|
||||||
|
:header-cell-style="{background:'#f5f7fa'}">
|
||||||
|
<el-table-column width="55">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-radio
|
||||||
|
class="radio"
|
||||||
|
:label="scope.row"
|
||||||
|
v-model="backNode"
|
||||||
|
>   
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nodeName"
|
||||||
|
label="节点名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
label="操作者">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.userInfo" type="success">{{ scope.row.userInfo.name }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="oper" style="display: flex;justify-content: flex-end;margin-top: 10px">
|
||||||
|
<el-button type="danger" @click="rollbackHandler">确定</el-button>
|
||||||
|
<el-button @click="showBackNode=false">取消</el-button>
|
||||||
|
</div>
|
||||||
|
<!-- <el-select v-if="taskUserOptionList?.length>0" v-model="backNode" placeholder="请选择退回节点" clearable>-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="item in taskUserOptionList"-->
|
||||||
|
<!-- :key="item.nodeId"-->
|
||||||
|
<!-- :label="item.nodeName + (item.userInfo ? ':' + item.userInfo.name : '')"-->
|
||||||
|
<!-- :value="item.nodeId">-->
|
||||||
|
<!-- </el-option>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- <el-button type="danger" @click="rollbackHandler">确认</el-button>-->
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="jsx">
|
<script setup lang="jsx">
|
||||||
@@ -43,7 +76,8 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const backNode = ref('')
|
const backNode = ref({})
|
||||||
|
const showBackNode = ref(false)
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const schema = computed(() => {
|
const schema = computed(() => {
|
||||||
return [
|
return [
|
||||||
@@ -134,30 +168,8 @@ const back = () => {
|
|||||||
}
|
}
|
||||||
// 驳回
|
// 驳回
|
||||||
const handleReject = async () => {
|
const handleReject = async () => {
|
||||||
// const values = form.value.getValues()
|
showBackNode.value = true
|
||||||
if (!_value.value) {
|
backNode.value = {}
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: '请填写审核意见',
|
|
||||||
type: 'warning'
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const params = {
|
|
||||||
taskId: props.taskId,
|
|
||||||
// ...values
|
|
||||||
auditOpinion: _value.value
|
|
||||||
}
|
|
||||||
// console.log('params', params)
|
|
||||||
const res = await rejectTask(params)
|
|
||||||
ElNotification({
|
|
||||||
title: '提示',
|
|
||||||
message: res.msg,
|
|
||||||
type: res.code === 1000 ? 'success' : 'error'
|
|
||||||
})
|
|
||||||
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
|
||||||
location.reload()
|
|
||||||
// back()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//回退节点
|
//回退节点
|
||||||
@@ -175,7 +187,7 @@ const rollbackHandler = async () => {
|
|||||||
taskId: props.taskId,
|
taskId: props.taskId,
|
||||||
// ...values
|
// ...values
|
||||||
auditOpinion: _value.value,
|
auditOpinion: _value.value,
|
||||||
rollBackId: backNode.value
|
rollBackId: backNode.value.nodeId
|
||||||
}
|
}
|
||||||
// console.log('params', params)
|
// console.log('params', params)
|
||||||
const res = await rejectTask(params)
|
const res = await rejectTask(params)
|
||||||
@@ -208,6 +220,10 @@ const handleAgree = async () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
|
.opinion-dialog {
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user