调整更新
This commit is contained in:
parent
493420642b
commit
87b48badde
@ -427,14 +427,17 @@ const onSetting = (row: any) => {
|
||||
// 申请处理函数
|
||||
const handleApply = async (row: any) => {
|
||||
try {
|
||||
// 更新状态为已申请
|
||||
const updateData = { ...row, status: 1 }
|
||||
await abpmApi.updateabpm(updateData)
|
||||
|
||||
// 更新本地数据
|
||||
row.status = 1
|
||||
|
||||
ElMessage.success(`${row.name} 申请成功`)
|
||||
const userinfo = await getUserProfile()
|
||||
const orginfo = await OrgApi.getOrg(userinfo.orgid)
|
||||
if (orginfo.parentOrgId != null) {
|
||||
const updateData = { ...row, status: 1, managerorg: orginfo.parentOrgId }
|
||||
await abpmApi.updateabpm(updateData)
|
||||
ElMessage.success(`${row.name} 申请成功`)
|
||||
getList()
|
||||
} else {
|
||||
ElMessage.error('无上级机构')
|
||||
return
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('申请失败:', error)
|
||||
ElMessage.error('申请失败,请重试')
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态" align="center" min-width="70">
|
||||
<template #default="{ row }">
|
||||
<el-link v-if="row.status === '1'" type="success" :underline="false" disabled
|
||||
<el-link v-if="row.status == '1'" type="success" :underline="false" disabled
|
||||
>已申请</el-link
|
||||
>
|
||||
<el-link v-else type="primary" @click="handleApply(row)">申请</el-link>
|
||||
@ -258,14 +258,16 @@ const onViewReport = (row: any) => {
|
||||
|
||||
const handleApply = async (row: any) => {
|
||||
try {
|
||||
// 更新状态为已分析
|
||||
const updateData = { ...row, status: 1 }
|
||||
await StaticecgApi.updateStaticecg(updateData)
|
||||
|
||||
// 更新本地数据
|
||||
row.status = 1
|
||||
|
||||
ElMessage.success(`${row.name} 申请成功`)
|
||||
cc
|
||||
if (orginfo.parentOrgId != null) {
|
||||
const updateData = { ...row, status: 1, managerorg: orginfo.parentOrgId }
|
||||
await StaticecgApi.updateStaticecg(updateData)
|
||||
ElMessage.success(`${row.name} 申请成功`)
|
||||
getList()
|
||||
} else {
|
||||
ElMessage.error('无上级机构')
|
||||
return
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('申请失败:', error)
|
||||
ElMessage.error('申请失败,请重试')
|
||||
|
||||
@ -327,7 +327,7 @@
|
||||
@click="handleApply(row)"
|
||||
>
|
||||
<Icon icon="ep:document-add" />
|
||||
未申请
|
||||
申请
|
||||
</el-button>
|
||||
<el-tag v-else type="success" class="status-tag"> 已申请 </el-tag>
|
||||
</template>
|
||||
@ -622,6 +622,7 @@ import { ecgdataApi, ecgdataVO } from '@/api/ecgdata'
|
||||
import { Search, Refresh, Plus, Download } from '@element-plus/icons-vue'
|
||||
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
||||
import { uploadFileInChunks } from '@/utils/upload'
|
||||
import { OrgApi } from '@/api/org'
|
||||
|
||||
defineOptions({ name: 'AnalysisHolter' })
|
||||
const Profilevo = ref<ProfileVO>({} as ProfileVO) //当前登录人信息
|
||||
@ -1467,13 +1468,16 @@ const handleApply = async (row) => {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
|
||||
// 这里调用申请API
|
||||
await ecgdataApi.applySuperiorReview(row.id, row.orgid)
|
||||
|
||||
ElMessage.success('申请已提交,等待上级审核')
|
||||
// 刷新列表数据
|
||||
getList()
|
||||
const userinfo = await getUserProfile()
|
||||
const orginfo = await OrgApi.getOrg(userinfo.orgid)
|
||||
if (orginfo.parentOrgId != null) {
|
||||
await ecgdataApi.applySuperiorReview(row.id, orginfo.parentOrgId)
|
||||
ElMessage.success('申请已提交,等待上级审核')
|
||||
getList()
|
||||
} else {
|
||||
ElMessage.error('无上级机构')
|
||||
return
|
||||
}
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
console.error('申请失败:', error)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user