<template>
|
<div class="bodyBox">
|
<div class="titleBox">
|
<span>{{ state.routeData.name }}审批详情</span>
|
</div>
|
<div class="ctnBox">
|
<el-scrollbar style="width: 100%; height: 77vh" ref="scrollViewContainer">
|
<template v-if="state.routeData.name == '标杆'">
|
<!-- <informationBasicViewScem
|
ref="informationBasicViewScemRef" :customerInfo="state.detailsData">
|
</informationBasicViewScem> -->
|
<informationBasicNewViewOptionPut
|
ref="informationBasicNewViewOptionPutRef"></informationBasicNewViewOptionPut>
|
</template>
|
<template v-if="state.routeData.name == '知识'">
|
<!-- <informationBasicViewResult
|
ref="informationBasicViewResultRef" :customerInfo="state.detailsData">
|
</informationBasicViewResult> -->
|
<informationBasicNewViewResult ref="informationBasicNewViewResultRef"
|
></informationBasicNewViewResult>
|
</template>
|
<template v-if="state.routeData.name == '产品'">
|
<template v-if="state.routeData.dataSource=='1'">
|
<informationBasicViewProduct
|
ref="informationBasicViewProductRef" :customerInfo="state.detailsData">
|
</informationBasicViewProduct>
|
</template>
|
<template v-else>
|
<informationBasicNewViewProduct ref="informationBasicNewViewProductRef"
|
></informationBasicNewViewProduct>
|
</template>
|
</template>
|
<!-- <div class="chanpinxxDiv">
|
<div class="titDiv">{{ state.routeData.name }}基本信息</div>
|
<div class="ctnDiv">
|
<div class="childBox1">
|
<div class="childDiv">
|
<div>{{ state.routeData.name }}名称:</div>
|
<div>{{ state.detailsData.name }}</div>
|
</div>
|
</div>
|
<div class="childBox1">
|
<div class="childDiv">
|
<div>场景方向:</div>
|
<div>{{ state.detailsData.sceneName }}</div>
|
</div>
|
|
<div class="childDiv">
|
<div>产业链方向:</div>
|
<div>{{ state.detailsData.industrialChainName }}</div>
|
</div>
|
|
<div class="childDiv">
|
<div>重点领域:</div>
|
<div>{{ state.detailsData.importantAreaName }}</div>
|
</div>
|
</div>
|
<div class="childBox1">
|
<div class="childDiv">
|
<div>提报单位:</div>
|
<div>{{ state.detailsData.submissionUnit }}</div>
|
</div>
|
|
<div class="childDiv">
|
<div>提报时间:</div>
|
<div>{{ state.detailsData.createTime }}</div>
|
</div>
|
|
<div class="childDiv">
|
<div>提报人:</div>
|
<div>{{ state.detailsData.createBy }}</div>
|
</div>
|
</div>
|
</div>
|
</div> -->
|
<!-- <div class="richTextBox">
|
<div class="titDiv">方案正文</div>
|
<div
|
class="childDiv"
|
v-for="(item, index) in state.richTextData"
|
:key="item.id"
|
>
|
<div class="topDiv">
|
<span>章节标题:{{ item.chapterHead }}</span>
|
</div>
|
<div class="btmDivspxq" v-html="item.chapterContent"></div>
|
</div>
|
</div> -->
|
<div class="shenPiDiv">
|
<div class="titDiv">审批意见<span style="color: red;margin-left: 3px">*</span></div>
|
<div class="ctnDiv">
|
<el-input
|
class="ipt"
|
v-model="state.opinion"
|
:rows="3"
|
type="textarea"
|
placeholder="请输入审批意见"
|
/>
|
</div>
|
<div>
|
<el-button size="large" @click.stop="backClick" icon="ArrowLeft">返回</el-button>
|
<el-button size="large" type="primary" @click="approvalPassFun"
|
>审批通过</el-button
|
>
|
<el-button size="large" type="primary" @click="approvalRejectedFun">驳回</el-button>
|
<el-button size="large" @click="backClick">关闭 </el-button>
|
</div>
|
</div>
|
</el-scrollbar>
|
</div>
|
</div>
|
</template>
|
<script lang="ts">
|
export default {
|
name: 'approveDetails',
|
}
|
</script>
|
<script setup lang="ts">
|
import type Node from 'element-plus/es/components/tree/src/model/node'
|
import { Search } from '@element-plus/icons-vue'
|
import router from '@/router'
|
import { ElMessageBox, ElNotification } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
import { useRoute } from 'vue-router'
|
import Base64 from '@/utils/base64'
|
import bus from '@/utils/mitt'
|
import approvalService from '@/api/zhongjian/approvalApi'
|
import subscriptionApi from '@/api/subscription'
|
import { useNavTabs } from '@/stores/modules/navTabs' // 标签导航
|
import informationBasicViewScem from '@/views/safetyManage/optionPutManage/optionPut/components/informationBasicView.vue'
|
import informationBasicViewProduct from '@/views/safetyManage/performanceManage/meritRatingManage/components/informationBasicView.vue'
|
import informationBasicNewViewProduct from '@/views/safetyManage/performanceManage/meritRatingManage/components/newApprovalView.vue'
|
import informationBasicNewViewOptionPut from '@/views/safetyManage/optionPutManage/optionPut/components/newApprovalView.vue'
|
import informationBasicNewViewResult from '@/views/safetyManage/safetyArchiveManage/fileBoxManage/components/newApprovalView.vue'
|
// import informationBasicViewResult from '@/views/safetyManage/safetyArchiveManage/fileBoxManage/components/informationBasicView.vue'
|
const navTabsStore = useNavTabs()
|
const route = useRoute()
|
const state = reactive<any>({
|
routeData: {}, // 路由传参
|
operationType: '', // 操作类型 pass rejected
|
opinion: '', // 意见
|
taskId: '', // 任务id
|
detailsData: {}, // 详情数据
|
richTextData: [], // 富文本数据
|
})
|
const scrollViewContainer = ref()
|
const informationBasicNewViewProductRef = ref()
|
const informationBasicNewViewResultRef= ref() //知识
|
const informationBasicNewViewOptionPutRef = ref()//标杆
|
// 回退
|
const backClick = () => {
|
// router.back()
|
// router.go(-1)
|
scrollViewContainer.value.scrollTo({ top: 0 })
|
nextTick(()=>{
|
if (state.routeData.name == '标杆') {
|
// router.push({
|
// path: '/approve/schemeManage/schemeApproval',
|
// })
|
|
const routes: any = {
|
path: '/approve/schemeManage/schemeApproval',
|
}
|
navTabsStore.closeTab(routes)
|
navTabsStore.deleteCachedViews('approveDetails')
|
router.back()
|
|
// back
|
bus.emit('routerBack1', '1')
|
|
return
|
}
|
|
if (state.routeData.name == '知识') {
|
// router.push({
|
// path: '/approve/resultManage/resultApproval',
|
// })
|
|
const routes: any = {
|
path: '/approve/resultManage/resultApproval',
|
}
|
navTabsStore.closeTab(routes)
|
navTabsStore.deleteCachedViews('approveDetails')
|
router.back()
|
|
// back
|
bus.emit('routerBack2', '2')
|
|
return
|
}
|
|
if (state.routeData.name == '产品') {
|
// router.push({
|
// path: '/approve/productManage/productApproval',
|
// })
|
|
const routes: any = {
|
path: '/approve/productManage/productApproval',
|
}
|
navTabsStore.closeTab(routes)
|
navTabsStore.deleteCachedViews('approveDetails')
|
router.back()
|
|
// back
|
bus.emit('routerBack3', '3')
|
|
return
|
}
|
})
|
|
}
|
|
// 标杆详情
|
const getSchemeIdListUrlFun = () => {
|
const data = {
|
id: state.routeData.id,
|
}
|
approvalService.getSchemeIdListUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
state.detailsData = {}
|
state.detailsData = res.data
|
|
state.richTextData = []
|
state.richTextData = res.data.schemeSubmissionDetailDOList
|
}
|
})
|
}
|
// 知识详情
|
const getResultIdListUrlFun = () => {
|
const data = {
|
id: state.routeData.id,
|
}
|
approvalService.getResultIdListUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
state.detailsData = {}
|
state.detailsData = res.data
|
|
state.richTextData = []
|
state.richTextData = res.data.resultSubmissionDetailDOList
|
}
|
})
|
}
|
|
// 产品详情
|
const getProductIdListUrlFun = () => {
|
const data = {
|
id: state.routeData.id,
|
}
|
approvalService.getProductIdListUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
state.detailsData = {}
|
state.detailsData = res.data
|
|
state.richTextData = []
|
state.richTextData = res.data.productSubmissionDetailDOList
|
}
|
})
|
}
|
|
// 开通详情
|
const getProductAccessIdListUrlFun = () => {
|
const data = {
|
id: state.routeData.id,
|
}
|
approvalService.getProductAccessIdListUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
state.detailsData = {}
|
state.detailsData = res.data
|
|
state.richTextData = []
|
state.richTextData = res.data.productSubmissionDetailDOList
|
}
|
})
|
}
|
|
// 审批通过-标杆
|
const approvalPassbg = () => {
|
ElMessageBox.confirm('确定要审批吗?', '提醒', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning',
|
})
|
.then(() => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'pass',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.schemeAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '审批成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
})
|
.catch(() => {})
|
}
|
|
// 驳回-标杆
|
const approvalRejectedbg = () => {
|
ElMessageBox.confirm('确定要驳回吗?', '提醒', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning',
|
})
|
.then(() => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'rejected',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.schemeAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '驳回成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
})
|
.catch(() => {})
|
}
|
|
// 审批通过-知识
|
const approvalPasszs = () => {
|
ElMessageBox.confirm('确定要审批吗?', '提醒', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning',
|
})
|
.then(() => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'pass',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.resultAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '审批成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
})
|
.catch(() => {})
|
}
|
|
// 驳回-知识
|
const approvalRejectedzs = () => {
|
ElMessageBox.confirm('确定要驳回吗?', '提醒', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning',
|
})
|
.then(() => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'rejected',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.resultAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '驳回成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
})
|
.catch(() => {})
|
}
|
|
// 审批通过-产品
|
const approvalPasscp = () => {
|
ElMessageBox.confirm('确定要审批吗?', '提醒', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning',
|
})
|
.then(() => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'pass',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.productAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '审批成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
})
|
.catch(() => {})
|
}
|
|
// 驳回-产品
|
const approvalRejectedcp = () => {
|
ElMessageBox.confirm('确定要驳回吗?', '提醒', {
|
confirmButtonText: '确定',
|
cancelButtonText: '取消',
|
type: 'warning',
|
})
|
.then(() => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'rejected',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.productAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '驳回成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
})
|
.catch(() => {})
|
}
|
// 订阅详情
|
const getSubscriptionDetail = () => {
|
const data = {
|
userUseId: state.routeData.useId,
|
}
|
subscriptionApi.getSubscriptionDetail({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
state.detailsData = {}
|
state.detailsData = res.data
|
state.richTextData = []
|
state.richTextData = res.data.productSubmissionDetailDOList
|
}
|
})
|
}
|
const subscriptionPasskt = (type: string) => {
|
const data = {
|
id: state.routeData.id,
|
operationType: type,
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
subscriptionApi.setAuditingComplete({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '操作成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
}
|
// 审批通过-开通
|
const approvalPasskt = () => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'pass',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.productAccessAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '操作成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
}
|
|
// 驳回-开通
|
const approvalRejectedkt = () => {
|
const data = {
|
id: state.routeData.id,
|
operationType: 'rejected',
|
opinion: state.opinion,
|
taskId: state.routeData.taskId,
|
}
|
approvalService.productAccessAuditingUrl({ ...data }).then((res: any) => {
|
if (res.code == 200) {
|
ElNotification({
|
type: 'success',
|
message: '操作成功!',
|
})
|
// 回退
|
backClick()
|
}
|
})
|
}
|
|
// 审批通过点击
|
const approvalPassFun = () => {
|
if (state.routeData.name == '标杆') {
|
// 审批通过-标杆
|
approvalPassbg()
|
return
|
}
|
|
if (state.routeData.name == '知识') {
|
// 审批通过-知识
|
approvalPasszs()
|
return
|
}
|
|
if (state.routeData.name == '产品') {
|
// 审批通过-产品
|
approvalPasscp()
|
return
|
}
|
|
if (state.routeData.name == '开通') {
|
// 审批通过-开通
|
approvalPasskt()
|
return
|
}
|
if (state.routeData.name == '订阅') {
|
// 审批通过
|
subscriptionPasskt('pass')
|
return
|
}
|
}
|
// 驳回点击
|
const approvalRejectedFun = () => {
|
if (state.routeData.name == '标杆') {
|
// 驳回-标杆
|
approvalRejectedbg()
|
|
return
|
}
|
|
if (state.routeData.name == '知识') {
|
// 驳回-知识
|
approvalRejectedzs()
|
|
return
|
}
|
|
if (state.routeData.name == '产品') {
|
// 驳回-产品
|
approvalRejectedcp()
|
|
return
|
}
|
|
if (state.routeData.name == '开通') {
|
// 驳回-开通
|
approvalRejectedkt()
|
return
|
}
|
if (state.routeData.name == '订阅') {
|
// 驳回
|
subscriptionPasskt('rejected')
|
return
|
}
|
}
|
|
onActivated(() => {
|
state.routeData = JSON.parse(Base64.decode(route.query.info))
|
if (state.routeData.name == '标杆') {
|
//标杆详情
|
// getSchemeIdListUrlFun()
|
nextTick(()=>{
|
informationBasicNewViewOptionPutRef.value?.setData(state.routeData)
|
})
|
}
|
|
if (state.routeData.name == '知识') {
|
//知识详情
|
// getResultIdListUrlFun()
|
nextTick(()=>{
|
informationBasicNewViewResultRef.value?.setData(state.routeData)
|
})
|
}
|
|
if (state.routeData.name == '产品') {
|
if(state.routeData.dataSource=='1'){
|
// 旧的 产品详情
|
getProductIdListUrlFun()
|
}else{
|
nextTick(()=>{
|
informationBasicNewViewProductRef.value?.setData(state.routeData)
|
})
|
}
|
}
|
|
if (state.routeData.name == '开通') {
|
//开通详情
|
getProductAccessIdListUrlFun()
|
}
|
if (state.routeData.name == '订阅') {
|
//订阅详情
|
getSubscriptionDetail()
|
}
|
})
|
</script>
|
<style lang="scss">
|
.btmDivspxq img {
|
max-width: 100%;
|
}
|
</style>
|
<style scoped lang="scss">
|
.bodyBox {
|
width: 100%;
|
//height: 700px;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: space-between;
|
// padding: 0 15px 15px 15px;
|
border: 1px solid #ededed;
|
|
.titleBox {
|
width: 100%;
|
height: 40px;
|
// border: 1px solid #f2f2f2;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
padding: 0 15px;
|
top: 0;
|
z-index: 200;
|
background-color: #dce6f4;
|
color: #656d9a;
|
font-weight: 600;
|
font-size: 17px;
|
// margin-bottom: 10px;
|
|
span {
|
font-size: 16px;
|
}
|
}
|
|
.ctnBox {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
// border-radius: 5px;
|
// background-color: #efefef;
|
overflow-y: auto;
|
|
.chanpinxxDiv {
|
width: 100%;
|
//height: 300px;
|
border: 1px solid #ededed;
|
border-radius: 5px;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
background-color: #fff;
|
margin-top: 20px;
|
|
.titDiv {
|
width: 100%;
|
height: 40px;
|
border-bottom: 1px solid #ededed;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
font-size: 16px;
|
font-weight: bold;
|
padding-left: 20px;
|
}
|
|
.ctnDiv {
|
width: 90%;
|
height: 150px;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
|
.childBox1 {
|
width: 100%;
|
height: 50px;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
//justify-content: space-between;
|
|
.childDiv {
|
width: 32%;
|
height: 100%;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
//justify-content: space-between;
|
font-size: 14px;
|
padding-left: 10px;
|
white-space: nowrap; /* 给文本设置不换行在一行中显示 */
|
overflow: hidden; /* 文本超出的部分隐藏 */
|
text-overflow: ellipsis; /* 文本超出的部分用省略号代替 */
|
|
div:nth-child(2) {
|
margin-left: 12px;
|
white-space: nowrap; /* 给文本设置不换行在一行中显示 */
|
overflow: hidden; /* 文本超出的部分隐藏 */
|
text-overflow: ellipsis; /* 文本超出的部分用省略号代替 */
|
}
|
}
|
}
|
}
|
}
|
|
|
|
.shenPiDiv {
|
width: 100%;
|
//height: 300px;
|
// border: 1px solid #ededed;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
background-color: #fff;
|
margin-top: 15px;
|
padding-bottom: 10px;
|
|
.titDiv {
|
width: 100%;
|
height: 40px;
|
// border-bottom: 1px solid #ededed;
|
display: flex;
|
flex-direction: row;
|
align-items: center;
|
font-weight: bold;
|
padding-left: 20px;
|
background-color: #dce6f4;
|
color: #656d9a;
|
font-size: 17px;
|
|
}
|
|
.ctnDiv {
|
width: 90%;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
margin: 5px 0 15px;
|
|
.ipt {
|
width: 100%;
|
margin-top: 10px;
|
}
|
}
|
}
|
}
|
}
|
</style>
|