对接标签申请、删除、详情查看

This commit is contained in:
wangchengming 2025-07-08 21:07:11 +08:00
parent e4988e1d5e
commit a49f91d1a5
8 changed files with 910 additions and 165 deletions

View File

@ -0,0 +1,80 @@
import request from '@/utils/request'
// 本人获取标签申请记录列表
export function getcurrentUserPageList(query) {
return request({
url: '/admin/busUserLabel/currentUserPageList',
method: 'post',
data: query
})
}
// ESC任务获取标签申请记录列表
export function getUserLabelPageList(query) {
return request({
url: '/admin/busUserLabel/pageList',
method: 'post',
data: query
})
}
// 提交标签申请记录
export function submitBusUserLabel(query) {
return request({
url: '/admin/busUserLabel/submit',
method: 'post',
data: query
})
}
// 查询一条标签申请记录详情
export function getBusUserLabelDetail(labelId) {
return request({
url: '/admin/busUserLabel/detail/' + labelId,
method: 'get'
})
}
// 修改标签
export function updateBusUserLabel(query) {
return request({
url: '/admin/busUserLabel/update',
method: 'post',
data: query
})
}
// 删除标签申请记录
export function deleteBusUserLabel(labelId) {
return request({
url: '/admin/busUserLabel/delete/' + labelId,
method: 'post'
})
}
// 重新申请标签
export function reApplyBusUserLabel(query) {
return request({
url: '/admin/busUserLabel/reApply',
method: 'post',
data: query
})
}
// ESC/培训中心审批标签
export function updateStatusBusUserLabel(query) {
return request({
url: '/admin/busUserLabel/checkStatus',
method: 'post',
params: query
})
}
// ESC/培训中心获取标签审批记录列表
export function getBusUserrLabelRecord(query) {
return request({
url: '/admin/busUserLabelRecord/getBusUserLabelRecordPage',
method: 'post',
data: query
})
}

View File

@ -82,7 +82,7 @@ export function submitBusUserQualification(query) {
})
}
// 修改(重新申请)资质 待替换接口
// 修改资质
export function updateBusUserQualification(query) {
return request({
url: '/admin/busUserQualification/updateBusUserQualification',

View File

@ -148,6 +148,20 @@ export const dynamicRoutes = [
meta: { title: '我的资质查看详情' }
}
]
},
{
path: '/lable/viewDetail',
component: Layout,
hidden: true,
permissions: ['qualification:escApproval:approvalDetail'],
children: [
{
path: ':Id(\\d+)?',
component: () => import('@/views/qualification/myQualifications/components/LableDetaiForm'),
name: 'myLableDetail',
meta: { title: '我的标签查看详情' }
}
]
},
{
path: '/qualification/approvalForm',

View File

@ -7,29 +7,34 @@
</el-button>
</div>
<div class="borderLine"></div>
<el-table :data="tableData" height="calc(100% - 170px)" style="width: 100%">
<el-table v-loading="loading" :data="tableData" height="calc(100vh - 332px)" style="width: 100%">
<el-table-column label="序号" width="60">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="jobNumber" label="工号" />
<el-table-column prop="name" label="员工姓名" />
<el-table-column prop="curQualification" label="当前标签" />
<el-table-column prop="objectiveQualification" label="申请标签" />
<el-table-column prop="status" label="状态" width="120">
<el-table-column prop="workNo" label="工号" />
<el-table-column prop="userName" label="员工姓名" />
<el-table-column prop="sourceLabelId" label="当前标签" />
<el-table-column prop="labelId" label="申请标签" />
<el-table-column prop="state" label="状态" width="120">
<template #default="scope">
<el-text v-if="scope.row.status == 0" type="info" class="infoinfoText">待审核</el-text>
<el-text v-if="scope.row.status == 3" type="info" class="infoinfoText">待ESC审核</el-text>
<el-text v-if="scope.row.status == 1" type="success" class="successText">通过</el-text>
<el-text v-if="scope.row.status == 2" type="danger" class="dangerText">驳回</el-text>
<el-text v-if="scope.row.state == 1" type="info" class="infoinfoText">待审核</el-text>
<el-text v-if="scope.row.state == 2" type="success" class="successText">通过</el-text>
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
<el-table-column label="操作" width="180">
<template #default="scope">
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.status != 1">重新申请</el-button>
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.status != 1" />
<el-button type="primary" text class="deleteTextBtn">删除</el-button>
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
@click="handleReplay(scope.row)">重新申请</el-button>
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
<router-link :to="'/lable/viewDetail/' + scope.row.id" custom v-slot="{ href }">
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
</router-link>
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
<el-button type="primary" text class="deleteTextBtn" v-if="scope.row.state == 1"
@click="handleDetele(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -37,47 +42,69 @@
<lable-apply-form v-else ref="lableApplyFormRef" @refresh="reloadList" />
</template>
<script setup>
import { ref } from 'vue'
import { onMounted, ref, nextTick } from 'vue'
import applyIcon from '@/assets/images/applyIcon.png'
import LableApplyForm from './LableApplyForm.vue';
import { getcurrentUserPageList, deleteBusUserLabel } from "@/api/labelManage/labelManage"
const { proxy } = getCurrentInstance()
const isShowForm = ref(false)
const tableData = [
{
jobNumber: '3523213',
name: '赵丽娟',
curQualification: '-',
objectiveQualification: 'SH',
status: 0
},
{
jobNumber: '3523213',
name: '赵丽娟',
curQualification: '-',
objectiveQualification: 'SH',
status: 1
},
{
jobNumber: '3523213',
name: '赵丽娟',
curQualification: '-',
objectiveQualification: 'SH',
status: 2
},
{
jobNumber: '3523213',
name: '赵丽娟',
curQualification: '-',
objectiveQualification: 'SH',
status: 3
},
]
const queryParams = ref({
pageIndex: 1,
pageSize: 10,
node: 0
})
const loading = ref(true)
const total = ref(0)
const tableData = ref([])
//
onMounted(() => {
getCurUserLablePageList();
});
const getCurUserLablePageList = () => {
loading.value = true
getcurrentUserPageList(queryParams.value).then(res => {
console.log('标签申请结果', res)
if (res.code == 200) {
tableData.value = res.data.list
total.value = res.data.total
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
//
const handleOpenApplyForm = () => {
isShowForm.value = true
}
//
const reloadList = () => {
const reloadList = () => {
isShowForm.value = false
getCurUserLablePageList()
}
//
const handleReplay = (record) => {
// isShowReForm.value = true
nextTick(() => {
// reApplyFormRef.value.getQualificationInfo(record.id, record.node);
});
}
//
const handleDetele = (record) => {
const rowId = record.id
proxy.$modal.confirm('是否确认删除该项数据项?').then(function () {
return deleteBusUserLabel(rowId)
}).then(() => {
getCurUserLablePageList();
proxy.$modal.msgSuccess("删除成功")
}).catch(() => { })
}
</script>
<style lang='scss'>

View File

@ -6,88 +6,95 @@
<div class="applyFormContainer">
<el-row class="myRow" :gutter="20">
<el-col :span="8">
<el-form-item label="申请标签" prop="targetQualification">
<el-select v-model="ruleForm.targetQualification" placeholder="请选择申请标签">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
<el-form-item label="申请标签" prop="labelId">
<el-select v-model="ruleForm.labelId" placeholder="请选择申请标签" clearable
@change="handleChoseLabl">
<el-option v-for="dict in bus_label" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工工号" prop="employeeNumber">
<el-input v-model="ruleForm.employeeNumber" placeholder="请输入员工工号" />
<el-form-item label="员工工号" prop="workNo">
<el-input v-model="ruleForm.workNo" placeholder="请输入员工工号" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工姓名(中文)" prop="employeeChineseName">
<el-input v-model="ruleForm.employeeChineseName" placeholder="请输入员工姓名(中文)" />
<el-form-item label="员工姓名(中文)" prop="userName">
<el-input v-model="ruleForm.userName" placeholder="请输入员工姓名(中文)" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工姓名(英文)" prop="employeeEnglishName">
<el-input v-model="ruleForm.employeeEnglishName" placeholder="请输入员工姓名(英文)" />
<el-form-item label="员工姓名(英文)" prop="englishName">
<el-input v-model="ruleForm.englishName" placeholder="请输入员工姓名(英文)" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="departmentName">
<el-select v-model="ruleForm.departmentName" placeholder="请选择部门">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
<el-form-item label="部门" prop="deptId">
<el-tree-select v-model="ruleForm.deptId" :data="enabledDeptOptions" disabled
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id"
placeholder="请选择部门" check-strictly />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="科室" prop="sectionId">
<el-select v-model="ruleForm.sectionId" placeholder="请选择科室" disabled>
<el-option v-for="item in sectionData" :key="item.sectionId" :label="item.sectionName"
:value="item.sectionId" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="科室" prop="officeName">
<el-select v-model="ruleForm.officeName" placeholder="请选择科室">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
<el-form-item label="属地" prop="dependencyId">
<el-select v-model="ruleForm.dependencyId" placeholder="请选择属地" disabled>
<el-option v-for="item in busDependencyData" :key="item.id" :label="item.dependencyName"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="属地" prop="localityName">
<el-select v-model="ruleForm.localityName" placeholder="请选择属地">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="属地ESC" prop="localityManager">
<el-input v-model="ruleForm.localityManager" />
<el-form-item label="属地ESC" prop="escUserName">
<el-input v-model="ruleForm.escUserName" disabled />
</el-form-item>
</el-col>
</el-row>
</div>
<div class="headerTitle">前置条件</div>
<div class="applyFormContainer">
<div class="headerTitle" v-if="ruleForm.labelId">前置条件</div>
<div class="applyFormContainer" v-if="ruleForm.labelId">
<el-table :data="tableData" style="width: 100%">
<el-table-column prop="name" label="资质名称" width="100" />
<el-table-column prop="certificate" label="资质证书" align="center">
<el-table-column prop="qualificationName" label="资质名称" width="100" />
<el-table-column prop="certificateUrl" label="资质证书" align="center">
<template #default="scope">
<el-image v-if="scope.row.certificate" style="width: 70px; height: 44px;line-height: 50px;"
:src="scope.row.certificate" fit="fill" />
<el-image v-if="scope.row.certificateUrl"
style="width: 70px; height: 44px;line-height: 50px;"
:src="baseUrl + scope.row.certificateUrl" fit="fill" />
<span v-else>请在"高压资质培训信息"上传资质证书</span>
</template>
</el-table-column>
<el-table-column prop="expired" label="是否过期" width="120">
<el-table-column prop="status" label="是否过期" width="120">
<template #default="scope">
<el-text v-if="scope.row.expired == false && scope.row.certificate" type="success"
<el-text v-if="scope.row.status == 1 && scope.row.certificateUrl" type="success"
class="successText">正常</el-text>
<el-text v-if="scope.row.expired == true && scope.row.certificate" type="danger"
<el-text v-else-if="scope.row.status == 2 && scope.row.certificateUrl" type="danger"
class="dangerText">过期</el-text>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="startTime" label="有效开始日期" width="150">
<template #default="scope">
<span v-if="scope.row.startTime && scope.row.certificate"> {{ scope.row.startTime }}</span>
<span v-if="scope.row.startTime"> {{ moment(scope.row.startTime).format('YYYY-MM-DD')
}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="expireTime" label="到期日期" width="130">
<template #default="scope">
<span v-if="scope.row.expireTime && scope.row.certificate"> {{ scope.row.expireTime
}}</span>
<span v-else>-</span>
<span v-if="scope.row.expireFlag == 0">长期</span>
<template v-else>
<span v-if="scope.row.expireTime"> {{ moment(scope.row.expireTime).format('YYYY-MM-DD')
}}</span>
<span v-else>-</span>
</template>
</template>
</el-table-column>
</el-table>
@ -102,74 +109,160 @@
</div>
</template>
<script setup>
import { reactive, defineEmits } from 'vue'
import { onMounted, reactive, defineEmits, ref } from 'vue'
import { deptTreeSelect, getUserInfo } from "@/api/system/user"
import { getBusDependencyPage } from "@/api/system/dependency"
import { getSysSectionPage } from "@/api/system/section"
import { submitBusUserLabel } from "@/api/labelManage/labelManage"
import { getCurrentUserList } from "@/api/qualification/myQualifications"
import moment from 'moment'
const emit = defineEmits(['refresh'])
const { proxy } = getCurrentInstance()
const { bus_label } = proxy.useDict("bus_label")
const data = reactive({
ruleForm: {},
rules: {
targetQualification: [{ required: true, message: "目标资质不能为空", trigger: "change" }],
employeeNumber: [{ required: true, message: "员工工号不能为空", trigger: "blur" }],
employeeChineseName: [{ required: true, message: "员工姓名(中文)不能为空", trigger: "blur" }],
employeeEnglishName: [{ required: true, message: "员工姓名(英文)", trigger: "blur" }],
departmentName: [{ required: true, message: "部门不能为空", trigger: "change" }],
officeName: [{ required: true, message: "科室不能为空", trigger: "change" }],
localityName: [{ required: true, message: "属地不能为空", trigger: "change" }],
localityManager: [{ required: true, message: "属地ESC不能为空", trigger: "blur" }],
labelId: [{ required: true, message: "目标资质不能为空", trigger: "change" }],
workNo: [{ required: true, message: "员工工号不能为空", trigger: "blur" }],
userName: [{ required: true, message: "员工姓名(中文)不能为空", trigger: "blur" }],
englishName: [{ required: true, message: "员工姓名(英文)", trigger: "blur" }],
deptId: [{ required: true, message: "部门不能为空", trigger: "change" }],
sectionId: [{ required: true, message: "科室不能为空", trigger: "change" }],
dependencyId: [{ required: true, message: "属地不能为空", trigger: "change" }],
escUserName: [{ required: true, message: "属地ESC不能为空", trigger: "blur" }],
},
})
const tableData = [
{
name: '电工证',
certificate: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
expired: false,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
{
name: 'SH',
certificate: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
expired: false,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
{
name: 'ES',
certificate: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
expired: false,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
{
name: 'ESC',
certificate: null,
expired: null,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
{
name: 'CESC',
certificate: null,
expired: null,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
{
name: '急救证',
certificate: null,
expired: null,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
{
name: 'LLP',
certificate: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
expired: true,
startTime: '2016-05-03',
expireTime: '2019-05-03',
},
]
const { ruleForm, rules } = toRefs(data)
const queryParams = ref({
pageIndex: 1,
pageSize: 10,
})
const requiredQualifications = ref([])
const loading = ref(true)
const tableData = ref([])
const baseUrl = import.meta.env.VITE_APP_BASE_API
//
onMounted(() => {
getUserInfos()
getBusDependencyData()
getDeptTree()
getSysSectionData()
});
//
const getUserInfos = () => {
getUserInfo().then(response => {
console.log('用户详情', response)
if (response.code == 200) {
ruleForm.value.node = 0
ruleForm.value.userId = response.data.userId
ruleForm.value.workNo = response.data.workNo
ruleForm.value.userName = response.data.nickName
ruleForm.value.englishName = response.data.englishName
ruleForm.value.deptId = response.data.deptId
ruleForm.value.sectionId = response.data.sectionId
ruleForm.value.dependencyId = response.data.dependencyId
ruleForm.value.escUserName = response.data.escUserName
}
})
}
//
const busDependencyData = ref([])
//
const getBusDependencyData = () => {
getBusDependencyPage({
pageIndex: 1,
pageSize: 100,
}).then(response => {
if (response.code == 200) {
busDependencyData.value = response.data.list
}
})
}
//
const enabledDeptOptions = ref(undefined)
//
const getDeptTree = () => {
deptTreeSelect().then(res => {
enabledDeptOptions.value = filterDisabledDept(JSON.parse(JSON.stringify(res.data)))
})
}
/** 过滤禁用的部门 */
const filterDisabledDept = (deptList) => {
return deptList.filter(dept => {
if (dept.disabled) {
return false
}
if (dept.children && dept.children.length) {
dept.children = filterDisabledDept(dept.children)
}
return true
})
}
//
const sectionData = ref([])
//
const getSysSectionData = () => {
getSysSectionPage({
pageIndex: 1,
pageSize: 100,
}).then(res => {
if (res.code == 200) {
sectionData.value = res.data.list
}
})
}
//
const handleChoseLabl = async (val) => {
loading.value = true;
try {
const res = await getCurUserQualification();
console.log('获取接口完毕', res);
// Define the qualifications mapping
const qualificationsMap = {
'SH': ['电工证', 'SH'],
'ES': ['电工证', 'ES'],
'ESC': ['电工证', 'ESC'],
'CESC': ['电工证', 'CESC'],
'SH+LLP': ['电工证', 'SH', 'LLP', '急救证'],
'ES+LLP': ['电工证', 'ES', 'LLP', '急救证'],
'ESC+LLP': ['电工证', 'ESC', 'LLP', '急救证'],
'CESC+LLP': ['电工证', 'CESC', 'LLP', '急救证']
};
// Get the required qualifications or default to empty array
requiredQualifications.value = qualificationsMap[val] || [];
console.log('rwerwe', requiredQualifications)
// Filter the data
tableData.value = res.filter(item =>
requiredQualifications.value.some(qualification =>
item.qualificationName === qualification
))
} catch (error) {
console.error('获取失败', error);
} finally {
loading.value = false;
}
};
//
const getCurUserQualification = async () => {
try {
const res = await getCurrentUserList(queryParams.value);
console.log('diao');
return res.code === 200 ? res.data : [];
} catch (error) {
console.error('获取用户证书失败', error);
return [];
}
};
const handleCancel = () => {
proxy.resetForm("ruleFormRef")
emit('refresh')
@ -177,21 +270,28 @@ const handleCancel = () => {
const handleSubmit = () => {
proxy.$refs["ruleFormRef"].validate(valid => {
if (valid) {
// if (form.value.roleId != undefined) {
// form.value.menuIds = getMenuAllCheckedKeys()
// updateRole(form.value).then(response => {
// proxy.$modal.msgSuccess("")
// open.value = false
// getList()
// })
// } else {
// form.value.menuIds = getMenuAllCheckedKeys()
// addRole(form.value).then(response => {
// proxy.$modal.msgSuccess("")
// open.value = false
// getList()
// })
// }
const qualificArr = tableData.value.filter(item=> item.certificateUrl)
console.log('是否有资质证书', qualificArr)
if(qualificArr.length < requiredQualifications.value.length) {
proxy.$modal.msgError(`资质证书不全,请在"高压资质培训信息"上传资质证书!`)
return false;
}
const qualificStateArr = tableData.value.filter(item=> item.status == 2)
console.log('是否有资质证书', qualificStateArr)
if(qualificStateArr.length > 0) {
proxy.$modal.msgError(`资质过期,请更新资质证书后再申请!`)
return false;
}
ruleForm.value.qualificationCertificateIds = tableData.value.map(item=> item.id)
console.log('sdafasdfas', ruleForm.value)
submitBusUserLabel(ruleForm.value).then(res => {
if (res.code == 200) {
proxy.$modal.msgSuccess("提交成功")
emit('refresh')
} else {
proxy.$modal.msgSuccess(res.msg)
}
})
}
})
}

View File

@ -0,0 +1,525 @@
<template>
<div class="app-page-container">
<el-breadcrumb class="app-breadcrumb" separator=">">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
<span v-if="index == levelList.length - 1" class="link-redirect">{{
item.title }}</span>
<span v-else class="no-redirect">{{ item.title }}</span>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
<div class="rootContainer clearBoth">
<el-card>
<template #header>
<div class="card-header">
<span>申请标签{{ detailForm.labelName }}</span>
</div>
</template>
<el-form ref="detailFormRef" :model="detailForm" label-position="left">
<!-- <div class="headerTitle">基本信息</div> -->
<div class="applyFormContainer">
<el-row class="myRow" :gutter="20">
<el-col :span="20">
<el-row class="myRow" :gutter="20">
<el-col :span="8">
<el-form-item label="当前标签:">
{{ detailForm.sourceLabelName ? detailForm.sourceLabelName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门:">
{{ detailForm.deptName ? detailForm.deptName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="科室:">
{{ detailForm.sectionName ? detailForm.sectionName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工工号:">
{{ detailForm.workNo ? detailForm.workNo : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工姓名(中文):">
{{ detailForm.userName ? detailForm.userName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="员工姓名(英文):">
{{ detailForm.englishName ? detailForm.englishName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="属地:">
{{ detailForm.dependencyName ? detailForm.dependencyName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="属地ESC:">
{{ detailForm.escUserName ? detailForm.escUserName : '-' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
{{ detailForm.createTime ? detailForm.createTime : '-' }}
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="4">
<el-form-item label="审批状态" label-position="top" class="myFormItemLable">
<template v-if="detailForm.state">
<el-text v-if="detailForm.state == 1 && detailForm.node == 0" type="info"
class="infoinfoText">待审核</el-text>
<el-text v-if="detailForm.state == 1 && detailForm.node == 1" type="info"
class="infoinfoText">待审核</el-text>
<el-text v-if="detailForm.state == 1 && detailForm.node == 2" type="info"
class="infoinfoText">待培训中心审核</el-text>
<el-text v-if="detailForm.state == 2" type="success"
class="successText">通过</el-text>
<el-text v-if="detailForm.state == 9" type="danger"
class="dangerText">驳回</el-text>
</template>
<template v-else>-</template>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<el-form ref="beforeConditionInfoRef" label-position="top">
<div class="headerTitle">前置条件</div>
<div class="applyFormContainer" v-if="detailForm.qualificationId">
</div>
</el-form>
<div class="headerTitle">审批记录</div>
<div class="applyFormContainer">
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
<el-table-column label="序号" width="160">
<template #default="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="checkNode" label="节点名称" width="260">
<template #default="scope">
<span v-if="scope.row.checkNode == 0 && scope.row.checkStatus == 1">提交申请</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 1">提交申请</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 2">ESC审核通过</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 9">ESC驳回</span>
<span v-if="scope.row.checkNode == 2 && scope.row.checkStatus == 2">培训中心审核通过</span>
<span v-if="scope.row.checkNode == 2 && scope.row.checkStatus == 9">培训中心驳回</span>
<span v-if="scope.row.checkNode == 0 && scope.row.checkStatus == 3">用户重新申请</span>
<span v-if="scope.row.checkNode == 1 && scope.row.checkStatus == 3">ESC代替用户重新申请</span>
</template>
</el-table-column>
<el-table-column prop="remark" label="审批意见" min-width="100" align="left" />
<el-table-column prop="createTime" label="审批时间" width="230">
<template #default="scope">
<span v-if="scope.row.createTime"> {{ scope.row.createTime }}</span>
<span v-else>-</span>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
</div>
</div>
</template>
<script setup>
import { onMounted, reactive } from 'vue'
import { getBusUserLabelDetail, getBusUserrLabelRecord } from "@/api/labelManage/labelManage"
import { useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const levelList = ref([
{ title: '资质管理', path: '/qualification' },
{ title: '我的资质', path: '/qualification/escApproval' },
{ title: '审批详情', path: '/qualification/escApproval/approvalDetail' }
])
const { proxy } = getCurrentInstance()
const data = reactive({
detailForm: { },
ruleForm: {
state: '',
remark: ''
},
rules: {
state: [{ required: true, message: "请选择审批结果", trigger: "change" }],
remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }]
},
})
//
const tableData = ref([])
//
const getLabelApprovalRecord = (_id) => {
var queryParamsRecord = {
pageIndex: 1,
pageSize: 50,
userLabelId: _id
}
getBusUserrLabelRecord(queryParamsRecord).then(res => {
if (res.code == 200) tableData.value = res.data.list
})
}
const { ruleForm, detailForm, rules } = toRefs(data)
//
onMounted(() => {
const id = route.params && route.params.Id
if (id) {
console.log('接收id', id)
ruleForm.value.id = id
getDetailInfo(id)
getLabelApprovalRecord(id)
} else {
ruleForm.value.id = null
}
});
//
const getDetailInfo = (_id) => {
getBusUserLabelDetail(_id).then(res => {
if (res.code == 200) {
detailForm.value = res.data
// detailForm.value = {
// qualificationName: res.data.qualificationName,
// sourceQualificationName: res.data.sourceQualificationName,
// deptName: res.data.deptName,
// sectionName: res.data.sectionName,
// workNo: res.data.workNo,
// userName: res.data.userName,
// englishName: res.data.englishName,
// dependencyName: res.data.dependencyName,
// escUserName: res.data.escUserName,
// createTime: res.data.createTime,
// state: res.data.state,
// node: res.data.node,
// qualificationId: res.data.qualificationId,
// }
// beforeConditionInfo.value = JSON.parse(res.data.beforeCondition)
console.log('标签详情', detailForm.value)
}
})
}
</script>
<style lang='scss'>
.app-main {
height: 100vh;
width: 100%;
position: relative;
overflow: hidden;
background-color: #F8F8F8;
}
.app-breadcrumb.el-breadcrumb {
width: 1200px;
margin: 0 auto;
height: 44px;
line-height: 44px;
font-size: 18px;
background: #f8f8f8;
.el-breadcrumb__item {
.el-breadcrumb__separator {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #000000 !important;
margin: 0 9px;
}
}
.no-redirect {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #000000;
cursor: text;
}
.link-redirect {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #0090FF;
cursor: text;
text-decoration: underline;
text-underline-offset: 4px;
}
}
.clearBoth {
clear: both;
}
.rootContainer {
width: 1200px;
margin: 0 auto;
height: calc(100vh - 134px);
overflow-y: auto;
overflow-x: hidden;
background: #ffffff;
}
.el-card {
border: none;
}
.el-card__header {
min-height: 50px;
font-family: Microsoft YaHei;
font-weight: 700;
font-size: 20px;
text-align: left;
color: #000000;
border-bottom: 1px solid #DCDCDC;
box-sizing: border-box;
padding: 10px 20px 17px 20px;
}
.el-card__body {
padding: 0px 20px 0 20px !important;
}
.el-card.is-always-shadow {
box-shadow: none;
}
.headerTitle {
font-family: Microsoft YaHei;
font-weight: 700;
font-size: 18px;
text-align: left;
color: #000000;
background: #e9e9e9;
padding: 6px 14px;
}
.infoinfoText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #DD9200;
}
.successText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #00B32A;
}
.dangerText {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
color: #E13434;
}
.hightSatusNomar {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 8px;
background: #00B32A;
}
.hightSatusDanger {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 8px;
background: #E13434;
}
.statusLabel {
display: inline-block;
padding-left: 10px;
}
.applyFormContainer {
padding-top: 20px;
overflow: hidden;
}
.submitTool {
width: 100%;
height: 76px;
position: absolute;
top: calc(100% - 76px);
background: #ffffff;
box-shadow: 1px 2px 10px 0 #93939333;
text-align: center;
line-height: 76px;
}
.cancelApplyBtn {
width: 100px;
height: 36px;
border-radius: 4px 4px 4px 4px;
background: #ea9f0e;
font-family: Microsoft YaHei;
font-weight: 700;
font-size: 16px;
text-align: center;
color: #FFFFFF;
}
.cancelApplyBtn:hover {
background: #ea9f0e;
color: #FFFFFF;
}
.submitApplyBtn {
width: 100px;
height: 36px;
border-radius: 4px 4px 4px 4px;
background: #4276d1;
font-family: Microsoft YaHei;
font-weight: 700;
font-size: 16px;
text-align: center;
color: #FFFFFF;
}
.submitApplyBtn:hover {
background: #4276d1;
color: #FFFFFF;
}
.myRow {
margin-left: 0 !important;
margin-right: 0 !important;
}
.el-form-item--default {
margin-bottom: 20px !important;
}
.el-form-item--label-left .el-form-item__label {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 16px;
text-align: left;
color: #787878;
padding: 0 10px 0 0;
}
.myFormItemLable {
padding-top: 22px;
}
.myFormItemLable .el-form-item__label {
font-family: Microsoft YaHei !important;
font-weight: 400 !important;
font-size: 16px !important;
text-align: left !important;
color: #787878 !important;
padding: 0 10px 0 44px;
}
.myFormItemLable .el-form-item__content {
font-family: Arial !important;
font-weight: 400 !important;
font-size: 18px !important;
text-align: left !important;
color: #000000 !important;
padding-left: 44px;
}
.el-form-item--label-left .el-form-item__content {
font-family: Arial;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.el-form-item--label-top .el-form-item__label {
font-family: Microsoft YaHei;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #666666;
}
.el-form-item--label-top .el-form-item__content {
font-family: Arial;
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.el-form-item--label-top .el-textarea__inner {
font-family: Arial;
font-weight: 400;
font-size: 18px;
color: #000000;
}
.el-input__inner {
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.el-select__wrapper {
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.el-form-item__error {
font-size: 16px;
}
.el-radio__inner {
width: 16px !important;
height: 16px !important;
}
.el-radio__label {
font-weight: 400;
font-size: 18px;
text-align: left;
color: #000000;
}
.el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: var(--el-color-primary);
border-color: var(--el-color-primary);
}
.el-radio__input.is-disabled.is-checked .el-radio__inner:after {
background-color: var(--el-color-white);
}
.preview-image {
width: 100%;
max-height: 70vh;
object-fit: contain;
}
.unsupported-file {
padding: 0px;
text-align: center;
color: #999;
height: 70vh;
}
.viewFile {
width: 148px;
height: 148px;
border: 1px solid #dedede;
border-radius: 6px;
}
</style>

View File

@ -270,7 +270,6 @@ import moment from 'moment'
const emit = defineEmits(['refresh'])
const { proxy } = getCurrentInstance()
const { target_qualification } = proxy.useDict("target_qualification")
console.log('目标资质', target_qualification)
const data = reactive({
ruleForm: {
qualificationId: undefined,

View File

@ -144,7 +144,7 @@ function submitForm() {
updateCurrentCertificate(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功")
open.value = false
getList()
getCurUserQualification()
})
}
}