提交代码
This commit is contained in:
parent
88113922d3
commit
8ea8098a93
|
@ -2,7 +2,7 @@
|
|||
<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 != 0" class="link-redirect" @click="handleJump(item.path)">{{
|
||||
<span v-if="index != 0" class="link-redirect">{{
|
||||
item.meta.title }}</span>
|
||||
<span v-else class="no-redirect">{{ item.meta.title }}</span>
|
||||
</el-breadcrumb-item>
|
||||
|
|
|
@ -164,6 +164,34 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/qualification/escViewDetail',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['qualification:viewDetail'],
|
||||
children: [
|
||||
{
|
||||
path: ':Id(\\d+)?',
|
||||
component: () => import('@/views/qualification/escTask/components/QualificationDetailForm'),
|
||||
name: 'escApprovalDetail',
|
||||
meta: { title: 'ESC资质查看详情' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/escLable/viewDetail',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['qualification:viewDetail'],
|
||||
children: [
|
||||
{
|
||||
path: ':Id(\\d+)?',
|
||||
component: () => import('@/views/qualification/escTask/components/LableDetaiForm'),
|
||||
name: 'myESCLableDetail',
|
||||
meta: { title: 'ESC标签查看详情' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/lable/viewDetail',
|
||||
component: Layout,
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -125,14 +125,23 @@
|
|||
<template v-else>
|
||||
<span v-if="scope.row.expireTime"> {{
|
||||
moment(scope.row.expireTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<div class="applyFormContainer">
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
|
||||
|
@ -173,7 +182,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord } from "@/api/labelManage/labelManage"
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import moment from 'moment'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
@ -208,6 +217,16 @@ const getDetailInfo = (_id) => {
|
|||
if (res.code == 200) {
|
||||
detailForm.value = res.data
|
||||
console.log('标签详情', detailForm.value)
|
||||
getCurrentUserRecurrentTraining()
|
||||
}
|
||||
})
|
||||
}
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: detailForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -124,14 +124,23 @@
|
|||
<template v-else>
|
||||
<span v-if="scope.row.expireTime"> {{
|
||||
moment(scope.row.expireTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<div class="applyFormContainer">
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
|
||||
|
@ -194,7 +203,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, updateStatusBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, updateStatusBusUserLabel, currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import moment from 'moment'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
@ -240,6 +249,16 @@ const getDetailInfo = (_id) => {
|
|||
if (res.code == 200) {
|
||||
detailForm.value = res.data
|
||||
console.log('标签详情', detailForm.value)
|
||||
getCurrentUserRecurrentTraining()
|
||||
}
|
||||
})
|
||||
}
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: detailForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
</template>
|
||||
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-position="top">
|
||||
<div class="applyFormContainer">
|
||||
<el-form-item prop="employeeNumber">
|
||||
<el-form-item prop="employeeNumber">
|
||||
<el-button class="downloadTemplateBtn3" text @click="downloadDocxTemplate">下载导入模板</el-button>
|
||||
<el-upload class="upload-demo" drag action="#" :http-request="requestDocUpload"
|
||||
:file-list="docUploadList" :before-upload="beforeDocUpload"
|
||||
:on-remove="removeDocUpload">
|
||||
|
@ -45,7 +46,7 @@
|
|||
<script setup>
|
||||
import { reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
|
||||
import { importRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
|
||||
|
@ -65,6 +66,15 @@ const { ruleForm, rules } = toRefs(data)
|
|||
const handleJump = (goLink) => {
|
||||
if (goLink) router.push({ path: goLink })
|
||||
}
|
||||
|
||||
const downloadDocxTemplate = (val) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = '/复训记录导入模板.xlsx'
|
||||
link.download = '复训记录导入模板.xlsx' // 设置下载文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
const docUploadList = ref([])
|
||||
|
||||
// 自定义上传文件资料
|
||||
|
@ -280,4 +290,21 @@ const handleCancel = () => {
|
|||
.el-form-item__error {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
|
||||
.downloadTemplateBtn3 {
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #409eff !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.downloadTemplateBtn3:hover {
|
||||
background: transparent !important;
|
||||
color: #409eff !important;
|
||||
}
|
||||
</style>
|
|
@ -115,7 +115,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -125,14 +125,23 @@
|
|||
<template v-else>
|
||||
<span v-if="scope.row.expireTime"> {{
|
||||
moment(scope.row.expireTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<div class="applyFormContainer">
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
|
||||
|
@ -173,7 +182,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord } from "@/api/labelManage/labelManage"
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import moment from 'moment'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
@ -208,6 +217,16 @@ const getDetailInfo = (_id) => {
|
|||
if (res.code == 200) {
|
||||
detailForm.value = res.data
|
||||
console.log('标签详情', detailForm.value)
|
||||
getCurrentUserRecurrentTraining()
|
||||
}
|
||||
})
|
||||
}
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: detailForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -124,14 +124,23 @@
|
|||
<template v-else>
|
||||
<span v-if="scope.row.expireTime"> {{
|
||||
moment(scope.row.expireTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<div class="applyFormContainer">
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
|
||||
|
@ -194,7 +203,7 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, updateStatusBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, updateStatusBusUserLabel, currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import moment from 'moment'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
|
@ -240,6 +249,16 @@ const getDetailInfo = (_id) => {
|
|||
if (res.code == 200) {
|
||||
detailForm.value = res.data
|
||||
console.log('标签详情', detailForm.value)
|
||||
getCurrentUserRecurrentTraining()
|
||||
}
|
||||
})
|
||||
}
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: detailForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -63,9 +63,9 @@
|
|||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
v-hasPermi="['qualification:lableApplyForm']" @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 }">
|
||||
<router-link :to="'/escLable/viewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<el-button type="primary" text class="replayTextBtn" v-hasPermi="['qualification:viewDetail']">
|
||||
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
|
||||
<a class="replayTextBtn" :href="href">查看</a>
|
||||
</el-button>
|
||||
</router-link>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
|
@ -287,7 +287,7 @@ const getSysSectionData = () => {
|
|||
}
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: ruleForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -381,11 +381,11 @@ const handleSubmit = () => {
|
|||
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
if (passTrainRecord.length == 0) {
|
||||
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
// const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
// if (passTrainRecord.length == 0) {
|
||||
// proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
// return false;
|
||||
// }
|
||||
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
|
|
575
src/views/qualification/escTask/components/LableDetaiForm.vue
Normal file
575
src/views/qualification/escTask/components/LableDetaiForm.vue
Normal file
|
@ -0,0 +1,575 @@
|
|||
<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 != 0" class="link-redirect" @click="handleJump(item.path)">{{
|
||||
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="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle" v-if="detailForm.labelId">申请信息</div>
|
||||
<el-table :data="detailForm.userQualificationCertificateList" style="width: 100%">
|
||||
<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.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="status" label="是否过期" width="120">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.status == 1 && scope.row.certificateUrl" type="success"
|
||||
class="successText">正常</el-text>
|
||||
<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"> {{
|
||||
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.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>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="applyFormContainer">
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<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, currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const levelList = ref([
|
||||
{ title: '资质管理' },
|
||||
{ title: 'ESC任务', path: '/qualification/escTask' },
|
||||
{ title: '详情' }
|
||||
])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const data = reactive({
|
||||
detailForm: {},
|
||||
ruleForm: {
|
||||
state: '',
|
||||
remark: ''
|
||||
},
|
||||
rules: {
|
||||
state: [{ required: true, message: "请选择审批结果", trigger: "change" }],
|
||||
remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }]
|
||||
},
|
||||
})
|
||||
const handleJump = (goLink) => {
|
||||
if (goLink) router.push({ path: goLink })
|
||||
}
|
||||
// 审批记录
|
||||
const tableData = ref([])
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
// 获取审批记录
|
||||
const getLabelApprovalRecord = (_id) => {
|
||||
var queryParamsRecord = {
|
||||
pageIndex: 1,
|
||||
pageSize: 50,
|
||||
userLabelId: _id
|
||||
}
|
||||
getBusUserrLabelRecord(queryParamsRecord).then(res => {
|
||||
console.log('审批记录', res.data.list)
|
||||
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
|
||||
console.log('标签详情', detailForm.value)
|
||||
getCurrentUserRecurrentTraining()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: detailForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log('详情', res.data)
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
</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;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.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 24px;
|
||||
}
|
||||
|
||||
.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: 24px;
|
||||
}
|
||||
|
||||
.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>
|
|
@ -80,7 +80,7 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
|
@ -303,7 +303,7 @@ const getSysSectionData = () => {
|
|||
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: ruleForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -398,11 +398,11 @@ const handleSubmit = () => {
|
|||
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
if (passTrainRecord.length == 0) {
|
||||
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
// const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
// if (passTrainRecord.length == 0) {
|
||||
// proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
// return false;
|
||||
// }
|
||||
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
|
|
|
@ -67,9 +67,9 @@
|
|||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
v-hasPermi="['qualification:qualificationApply']" @click="handleReplay(scope.row)">重新申请</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
|
||||
<router-link :to="'/qualification/viewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<router-link :to="'/qualification/escViewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<el-button type="primary" text class="replayTextBtn" v-hasPermi="['qualification:viewDetail']">
|
||||
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
|
||||
<a class="replayTextBtn" :href="href">查看</a>
|
||||
</el-button>
|
||||
</router-link>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
|
||||
|
|
|
@ -299,7 +299,8 @@ const router = useRouter()
|
|||
const { proxy } = getCurrentInstance()
|
||||
const { target_qualification } = proxy.useDict("target_qualification")
|
||||
console.log('目标资质', target_qualification)
|
||||
|
||||
const certificatePhotoRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
const data = reactive({
|
||||
ruleForm: {
|
||||
qualificationId: undefined,
|
||||
|
@ -499,25 +500,32 @@ const getUserQualification = (_userId) => {
|
|||
|
||||
// 申请目标资质选择
|
||||
const handleChoseQualification = (val) => {
|
||||
if (val == 'LLP') {
|
||||
const jjzInfo = choseUserQualification.value.filter(item => item.qualificationName === '急救证')[0]
|
||||
if (jjzInfo && jjzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = jjzInfo.startTime
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = jjzInfo.expireTime
|
||||
nextTick(() => {
|
||||
if (val == 'LLP') {
|
||||
const jjzInfo = choseUserQualification.value.filter(item => item.qualificationName === '急救证')[0]
|
||||
if (jjzInfo && jjzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = jjzInfo.startTime
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = jjzInfo.expireTime
|
||||
firstCertificateFileRef.value.setFileInfo(jjzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
firstCertificateFileRef.value.setFileInfo(undefined)
|
||||
}
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
const dgzInfo = choseUserQualification.value.filter(item => item.qualificationName === '电工证')[0]
|
||||
if (dgzInfo && dgzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.collectionDate = dgzInfo.startTime
|
||||
ruleForm.value.beforeCondition.reviewDate = dgzInfo.expireTime
|
||||
certificatePhotoRef.value.setFileInfo(dgzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
certificatePhotoRef.value.setFileInfo(undefined)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const dgzInfo = choseUserQualification.value.filter(item => item.qualificationName === '电工证')[0]
|
||||
if (dgzInfo && dgzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.collectionDate = dgzInfo.startTime
|
||||
ruleForm.value.beforeCondition.reviewDate = dgzInfo.expireTime
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 用户数据
|
||||
const allUsers = ref([])
|
||||
|
|
|
@ -0,0 +1,843 @@
|
|||
<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 != 0" class="link-redirect" @click="handleJump(item.path)">{{
|
||||
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.qualificationName }}</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.sourceQualificationName ? detailForm.sourceQualificationName :
|
||||
'-' }}
|
||||
</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" :model="beforeConditionInfo" label-position="top">
|
||||
<div class="headerTitle">前置条件</div>
|
||||
<div class="applyFormContainer" v-if="detailForm.qualificationId">
|
||||
<div v-if="detailForm.qualificationId == 'SH'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.collectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证初领日期"
|
||||
style="width: 100%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证复审日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.reviewDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证复审日期"
|
||||
style="width: 100%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证状态">
|
||||
<template v-if="isAfterToday()">
|
||||
<div class="hightSatusNomar"></div>
|
||||
<div class="statusLabel">正常</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="hightSatusDanger"> </div>
|
||||
<div class="statusLabel">过期</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="培训紧迫程度">
|
||||
<el-radio-group v-model="beforeConditionInfo.urgency" disabled>
|
||||
<el-radio value="1">紧急</el-radio>
|
||||
<el-radio value="2">一般</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证">
|
||||
<img :src="beforeConditionInfo.certificatePhoto.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.certificatePhoto"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ES'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.collectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证初领日期"
|
||||
style="width: 100%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证复审日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.reviewDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证复审日期"
|
||||
style="width: 100%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证状态">
|
||||
<template v-if="isAfterToday()">
|
||||
<div class="hightSatusNomar"></div>
|
||||
<div class="statusLabel">正常</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="hightSatusDanger"> </div>
|
||||
<div class="statusLabel">过期</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="培训紧迫程度">
|
||||
<el-radio-group v-model="beforeConditionInfo.urgency" disabled>
|
||||
<el-radio value="1">紧急</el-radio>
|
||||
<el-radio value="2">一般</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证">
|
||||
<img :src="beforeConditionInfo.certificatePhoto.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.certificatePhoto"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单">
|
||||
<img :src="beforeConditionInfo.qualificationForm.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.qualificationForm"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.qualificationForm)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="6个月实操经验">
|
||||
<el-radio-group v-model="beforeConditionInfo.practicalExperience" disabled>
|
||||
<el-radio value="0">无</el-radio>
|
||||
<el-radio value="1">有</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="beforeConditionInfo.practicalExperience == '1'">
|
||||
<el-form-item label="实操经验表单">
|
||||
<img :src="beforeConditionInfo.experienceFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.experienceFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.experienceFile)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ESC' || detailForm.qualificationId == 'CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.collectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证初领日期"
|
||||
style="width: 100%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证复审日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.reviewDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择电工证复审日期"
|
||||
style="width: 100%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证状态">
|
||||
<template v-if="isAfterToday()">
|
||||
<div class="hightSatusNomar"></div>
|
||||
<div class="statusLabel">正常</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="hightSatusDanger"> </div>
|
||||
<div class="statusLabel">过期</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="培训紧迫程度">
|
||||
<el-radio-group v-model="beforeConditionInfo.urgency" disabled>
|
||||
<el-radio value="1">紧急</el-radio>
|
||||
<el-radio value="2">一般</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="电工证">
|
||||
<img :src="beforeConditionInfo.certificatePhoto.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.certificatePhoto"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<img :src="beforeConditionInfo.esFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.esFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.esFile)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单">
|
||||
<img :src="beforeConditionInfo.qualificationForm.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.qualificationForm"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.qualificationForm)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'LLP'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="非电池生产线员工/电池生产线员工">
|
||||
<el-radio-group v-model="beforeConditionInfo.batteryLine">
|
||||
<el-radio value="0">非电池生产线员工</el-radio>
|
||||
<el-radio value="1">电池生产线员工</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="具备资质">
|
||||
<el-checkbox-group v-model="beforeConditionInfo.hasQualified" disabled>
|
||||
<el-checkbox v-if="beforeConditionInfo.batteryLine == 1" label="SH"
|
||||
value="SH" />
|
||||
<el-checkbox label="ES" value="ES" />
|
||||
<el-checkbox label="ESC" value="ESC" />
|
||||
<el-checkbox label="CESC" value="CESC" />
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="急救证发证日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.firstCollectionDate" type="date"
|
||||
format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择急救证发证日期"
|
||||
style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="急救证到期日期">
|
||||
<el-date-picker v-model="beforeConditionInfo.firstCollectionExpireDate"
|
||||
type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="健康证明" prop="beforeConditionInfo.healthCertificate">
|
||||
<img :src="beforeConditionInfo.healthCertificate.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.healthCertificate"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.healthCertificate)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="急救证" prop="beforeConditionInfo.firstCertificateFile">
|
||||
<img :src="beforeConditionInfo.firstCertificateFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.firstCertificateFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.firstCertificateFile)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资质申请表单">
|
||||
<img :src="beforeConditionInfo.qualificationForm.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.qualificationForm"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.qualificationForm)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<!-- 图片预览 -->
|
||||
<el-dialog v-model="dialogVisible" title="图片预览">
|
||||
<img v-if="isImageFile(dialogImageUrl)" :src="dialogImageUrl" class="preview-image" alt="Preview Image" />
|
||||
<div v-else class="unsupported-file">
|
||||
<pdf-preview :pdf-url="dialogImageUrl" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserQualificationDetail, getBusUserQualificationRecord } from "@/api/qualification/myQualifications"
|
||||
import { useRouter } from 'vue-router'
|
||||
import pdfIcon from '@/assets/images/pdfIcon.png'
|
||||
import PdfPreview from './PdfPreview.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
const suffix = ref('')
|
||||
const router = useRouter()
|
||||
const levelList = ref([
|
||||
{ title: '资质管理' },
|
||||
{ title: 'ESC任务', path: '/qualification/escTask' },
|
||||
{ title: '详情' }
|
||||
])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const data = reactive({
|
||||
detailForm: {
|
||||
qualificationName: '',
|
||||
sourceQualificationName: '',
|
||||
deptName: '',
|
||||
sectionName: '',
|
||||
workNo: '',
|
||||
userName: '',
|
||||
englishName: '',
|
||||
dependencyName: '',
|
||||
escUserName: '',
|
||||
createTime: '',
|
||||
state: null,
|
||||
node: null,
|
||||
qualificationId: ''
|
||||
},
|
||||
beforeConditionInfo: {
|
||||
collectionDate: null,
|
||||
reviewDate: null,
|
||||
urgency: '',
|
||||
certificatePhoto: '',
|
||||
qualificationForm: '',
|
||||
shFile: '',
|
||||
esFile: '',
|
||||
batteryLine: '',
|
||||
hasQualified: [],
|
||||
firstCollectionDate: null,
|
||||
firstCollectionExpireDate: null,
|
||||
healthCertificate: '',
|
||||
firstCertificateFile: '',
|
||||
practicalExperience: '',
|
||||
experienceFile: ''
|
||||
},
|
||||
ruleForm: {
|
||||
state: '',
|
||||
remark: ''
|
||||
},
|
||||
rules: {
|
||||
state: [{ required: true, message: "请选择审批结果", trigger: "change" }],
|
||||
remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }]
|
||||
},
|
||||
})
|
||||
const handleJump = (goLink) => {
|
||||
if (goLink) router.push({ path: goLink })
|
||||
}
|
||||
// 审批记录
|
||||
const tableData = ref([])
|
||||
// 获取审批记录
|
||||
const getQualificationApprovalRecord = (_id) => {
|
||||
var queryParamsRecord = {
|
||||
pageIndex: 1,
|
||||
pageSize: 50,
|
||||
userQualificationId: _id
|
||||
}
|
||||
getBusUserQualificationRecord(queryParamsRecord).then(res => {
|
||||
if (res.code == 200) tableData.value = res.data.list
|
||||
})
|
||||
}
|
||||
|
||||
const { ruleForm, detailForm, beforeConditionInfo, rules } = toRefs(data)
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
const id = route.params && route.params.Id
|
||||
if (id) {
|
||||
console.log('接收id', id)
|
||||
ruleForm.value.id = id
|
||||
getDetailInfo(id)
|
||||
getQualificationApprovalRecord(id)
|
||||
} else {
|
||||
ruleForm.value.id = null
|
||||
}
|
||||
});
|
||||
// 判断是否为图片文件
|
||||
const isImageFile = (filePath) => {
|
||||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
|
||||
suffix.value = filePath.split('.').pop();
|
||||
console.log('后缀', filePath.split('.').pop())
|
||||
return ['jpeg', 'jpg', 'png'].includes(suffix.value?.toLowerCase())
|
||||
}
|
||||
// 预览
|
||||
const handleCardPreview = (filePath) => {
|
||||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
suffix.value = filePath.split('.').pop();
|
||||
dialogImageUrl.value = baseUrl + filePath
|
||||
dialogVisible.value = true
|
||||
}
|
||||
// 获取详情
|
||||
const getDetailInfo = (_id) => {
|
||||
var _queryParams = {
|
||||
id: _id,
|
||||
node: 1
|
||||
}
|
||||
getBusUserQualificationDetail(_queryParams).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, beforeConditionInfo.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 对比日期是否在今天之后
|
||||
const isAfterToday = () => {
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0); // 清除时间部分
|
||||
const dateToCompare = new Date(beforeConditionInfo.value.reviewDate);
|
||||
return dateToCompare > today;
|
||||
};
|
||||
const handleCancel = () => {
|
||||
router.push({
|
||||
path: '/qualification/escApproval'
|
||||
})
|
||||
}
|
||||
|
||||
</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;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.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>
|
|
@ -94,7 +94,7 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { onMounted, nextTick, ref } from 'vue'
|
||||
import pdfIcon from '@/assets/images/pdfIcon.png'
|
||||
import myFileUpload from './myFileUpload.vue'
|
||||
import PdfPreview from './PdfPreview.vue'
|
||||
|
@ -220,10 +220,13 @@ const handleEdit = (record) => {
|
|||
form.value = res.data
|
||||
if (form.value.expireTime) form.value.expireFlag = 1 // 默认值
|
||||
else form.value.expireFlag = 0
|
||||
form.value.qualificationName = record.qualificationName
|
||||
if (res.data.certificateUrl) qualifcationFileRef.value.setFileInfo(res.data.certificateUrl)
|
||||
form.value.qualificationName = record.qualificationName
|
||||
open.value = true
|
||||
title.value = "编辑"
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
qualifcationFileRef.value.setFileInfo(res.data.certificateUrl)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,10 @@ const suffix = ref('')
|
|||
|
||||
const setFileInfo = (filePath) => {
|
||||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
if (!filePath || filePath.indexOf('.') === -1) {
|
||||
fileList.value = []
|
||||
return '';
|
||||
}
|
||||
|
||||
var suffix = filePath.split('.').pop();
|
||||
fileList.value = [{
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
|
||||
<router-link :to="'/lable/viewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<el-button type="primary" text class="replayTextBtn" v-hasPermi="['qualification:viewDetail']">
|
||||
<a class="replayTextBtn" :href="href" target="_blank">查看</a>
|
||||
<a class="replayTextBtn" :href="href">查看</a>
|
||||
</el-button>
|
||||
</router-link>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
|
@ -246,7 +246,7 @@ const getSysSectionData = () => {
|
|||
}
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
// 获取本人近三年年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({}).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -313,11 +313,11 @@ const handleSubmit = () => {
|
|||
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
if (passTrainRecord.length == 0) {
|
||||
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
// const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
// if (passTrainRecord.length == 0) {
|
||||
// proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
// return false;
|
||||
// }
|
||||
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<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">{{
|
||||
<span v-if="index != 0" class="link-redirect" @click="handleJump(item.path)">{{
|
||||
item.title }}</span>
|
||||
<span v-else class="no-redirect">{{ item.title }}</span>
|
||||
</el-breadcrumb-item>
|
||||
|
@ -90,8 +90,8 @@
|
|||
</div>
|
||||
</el-form>
|
||||
<el-form ref="beforeConditionInfoRef" label-position="top">
|
||||
<div class="headerTitle" v-if="detailForm.labelId">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle" v-if="detailForm.labelId">申请信息</div>
|
||||
<el-table :data="detailForm.userQualificationCertificateList" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="100" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
|
@ -133,8 +133,18 @@
|
|||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<div class="applyFormContainer" v-if="detailForm.labelId">
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="applyFormContainer">
|
||||
<div class="headerTitle">审批记录</div>
|
||||
<el-table :data="tableData" style="width: 100%;margin-bottom: 20px;">
|
||||
<el-table-column label="序号" width="160">
|
||||
<template #default="scope">
|
||||
|
@ -169,16 +179,16 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive } from 'vue'
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord } from "@/api/labelManage/labelManage"
|
||||
import { getBusUserLabelDetail, getBusUserrLabelRecord, currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const levelList = ref([
|
||||
{ title: '资质管理', path: '/qualification' },
|
||||
{ title: '我的资质', path: '/qualification/escApproval' },
|
||||
{ title: '审批详情', path: '/qualification/escApproval/approvalDetail' }
|
||||
{ title: '资质管理' },
|
||||
{ title: '我的资质', path: '/qualification/myQualifications' },
|
||||
{ title: '详情' }
|
||||
])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const data = reactive({
|
||||
|
@ -192,6 +202,9 @@ const data = reactive({
|
|||
remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }]
|
||||
},
|
||||
})
|
||||
const handleJump = (goLink) => {
|
||||
if (goLink) router.push({ path: goLink })
|
||||
}
|
||||
// 审批记录
|
||||
const tableData = ref([])
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
|
@ -226,12 +239,23 @@ onMounted(() => {
|
|||
const getDetailInfo = (_id) => {
|
||||
getBusUserLabelDetail(_id).then(res => {
|
||||
if (res.code == 200) {
|
||||
detailForm.value = res.data
|
||||
detailForm.value = res.data
|
||||
console.log('标签详情', detailForm.value)
|
||||
getCurrentUserRecurrentTraining()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人最近三年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: detailForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
console.log('详情', res.data)
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
|
@ -276,6 +300,7 @@ const getDetailInfo = (_id) => {
|
|||
cursor: text;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<div class="headerTitle">复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
|
@ -299,11 +299,11 @@ const handleSubmit = () => {
|
|||
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
if (passTrainRecord.length == 0) {
|
||||
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
// const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
|
||||
// if (passTrainRecord.length == 0) {
|
||||
// proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
|
||||
// return false;
|
||||
// }
|
||||
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 9" />
|
||||
<router-link :to="'/qualification/viewDetail/' + scope.row.id" custom v-slot="{ href }">
|
||||
<el-button type="primary" text class="replayTextBtn" v-hasPermi="['qualification:viewDetail']">
|
||||
<a class="replayTextBtn" :href="href"
|
||||
target="_blank">查看</a>
|
||||
<a class="replayTextBtn" :href="href" >查看</a>
|
||||
</el-button>
|
||||
</router-link>
|
||||
<el-divider direction="vertical" class="verticalLine" v-if="scope.row.state == 1" />
|
||||
|
|
|
@ -267,6 +267,8 @@ import moment from 'moment'
|
|||
const emit = defineEmits(['refresh'])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { target_qualification } = proxy.useDict("target_qualification")
|
||||
const certificatePhotoRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
const data = reactive({
|
||||
ruleForm: {
|
||||
qualificationId: undefined,
|
||||
|
@ -430,30 +432,36 @@ const getCurUserQualification = () => {
|
|||
pageSize: 10,
|
||||
}).then(res => {
|
||||
if (res.code == 200) curUserQualification.value = res.data
|
||||
}).catch(() => {
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
// 申请目标资质选择
|
||||
const handleChoseQualification = (val) => {
|
||||
if (val == 'LLP') {
|
||||
const jjzInfo = choseUserQualification.value.filter(item => item.qualificationName === '急救证')[0]
|
||||
if (jjzInfo && jjzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = jjzInfo.startTime
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = jjzInfo.expireTime
|
||||
const handleChoseQualification = (val) => {
|
||||
nextTick(() => {
|
||||
if (val == 'LLP') {
|
||||
const jjzInfo = curUserQualification.value.filter(item => item.qualificationName === '急救证')[0]
|
||||
if (jjzInfo && jjzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = jjzInfo.startTime
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = jjzInfo.expireTime
|
||||
firstCertificateFileRef.value.setFileInfo(jjzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
firstCertificateFileRef.value.setFileInfo(undefined)
|
||||
}
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
const dgzInfo = curUserQualification.value.filter(item => item.qualificationName === '电工证')[0]
|
||||
if (dgzInfo && dgzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.collectionDate = dgzInfo.startTime
|
||||
ruleForm.value.beforeCondition.reviewDate = dgzInfo.expireTime
|
||||
certificatePhotoRef.value.setFileInfo(dgzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
certificatePhotoRef.value.setFileInfo(undefined)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const dgzInfo = choseUserQualification.value.filter(item => item.qualificationName === '电工证')[0]
|
||||
if (dgzInfo && dgzInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.collectionDate = dgzInfo.startTime
|
||||
ruleForm.value.beforeCondition.reviewDate = dgzInfo.expireTime
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取当前登录用户详情
|
||||
const getUserInfos = () => {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<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">{{
|
||||
<span v-if="index != 0" class="link-redirect" @click="handleJump(item.path)">{{
|
||||
item.title }}</span>
|
||||
<span v-else class="no-redirect">{{ item.title }}</span>
|
||||
</el-breadcrumb-item>
|
||||
|
@ -387,9 +387,9 @@ const dialogVisible = ref(false)
|
|||
const suffix = ref('')
|
||||
const router = useRouter()
|
||||
const levelList = ref([
|
||||
{ title: '资质管理', path: '/qualification' },
|
||||
{ title: '我的资质', path: '/qualification/escApproval' },
|
||||
{ title: '审批详情', path: '/qualification/escApproval/approvalDetail' }
|
||||
{ title: '资质管理' },
|
||||
{ title: '我的资质', path: '/qualification/myQualifications' },
|
||||
{ title: '详情' }
|
||||
])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const data = reactive({
|
||||
|
@ -434,6 +434,9 @@ const data = reactive({
|
|||
remark: [{ required: true, message: "审批意见不能为空", trigger: "blur" }]
|
||||
},
|
||||
})
|
||||
const handleJump = (goLink) => {
|
||||
if (goLink) router.push({ path: goLink })
|
||||
}
|
||||
// 审批记录
|
||||
const tableData = ref([])
|
||||
// 获取审批记录
|
||||
|
@ -565,6 +568,7 @@ const handleCancel = () => {
|
|||
cursor: text;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
<el-table v-loading="loading" :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="110" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.certificateUrl">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.certificateUrl">
|
||||
<el-image v-if="isImageFile(scope.row.certificateUrl)"
|
||||
style="width: 70px; height: 44px;line-height: 50px;cursor: pointer;" :src="baseUrl + scope.row.certificateUrl"
|
||||
fit="fill" @click.stop="handleCardPreview(scope.row.certificateUrl)" />
|
||||
style="width: 70px; height: 44px;line-height: 50px;cursor: pointer;"
|
||||
:src="baseUrl + scope.row.certificateUrl" fit="fill"
|
||||
@click.stop="handleCardPreview(scope.row.certificateUrl)" />
|
||||
<img v-else :src="pdfIcon" class="avatar viewFile" style="cursor: pointer;"
|
||||
@click.stop="handleCardPreview(scope.row.certificateUrl)" />
|
||||
</template>
|
||||
|
@ -51,7 +52,7 @@
|
|||
<pdf-preview :pdf-url="dialogImageUrl" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :title="title" v-model="open" width="800px" append-to-body>
|
||||
<el-dialog :title="title" v-model="open" width="800px" append-to-body >
|
||||
<el-form ref="postRef" :model="form" :rules="rules" label-width="150px">
|
||||
<el-form-item label="证书名称" prop="factoryArea">
|
||||
<el-input v-model="form.qualificationName" disabled />
|
||||
|
@ -77,7 +78,7 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { onMounted, nextTick, ref } from 'vue'
|
||||
import { getCurrentUserList, updateCurrentCertificate, getCurrentCertificateDetail } from "@/api/qualification/myQualifications"
|
||||
import pdfIcon from '@/assets/images/pdfIcon.png'
|
||||
import myFileUpload from './myFileUpload.vue'
|
||||
|
@ -146,6 +147,7 @@ const reset = () => {
|
|||
expireTime: undefined,
|
||||
expireFlag: 1
|
||||
}
|
||||
qualifcationFileRef.value = null
|
||||
proxy.resetForm("postRef")
|
||||
}
|
||||
/** 提交按钮 */
|
||||
|
@ -171,9 +173,12 @@ const handleEdit = (record) => {
|
|||
if (form.value.expireTime) form.value.expireFlag = 1 // 默认值
|
||||
else form.value.expireFlag = 0
|
||||
form.value.qualificationName = record.qualificationName
|
||||
if (res.data.certificateUrl) qualifcationFileRef.value.setFileInfo(res.data.certificateUrl)
|
||||
open.value = true
|
||||
title.value = "编辑"
|
||||
nextTick(() => {
|
||||
// 初始化主题样式
|
||||
qualifcationFileRef.value.setFileInfo(res.data.certificateUrl)
|
||||
})
|
||||
})
|
||||
}
|
||||
const handleSetQualifcationFile = (filePath) => {
|
||||
|
|
|
@ -49,7 +49,10 @@ const suffix = ref('')
|
|||
|
||||
const setFileInfo = (filePath) => {
|
||||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
if (!filePath || filePath.indexOf('.') === -1) {
|
||||
fileList.value = []
|
||||
return '';
|
||||
}
|
||||
|
||||
var suffix = filePath.split('.').pop();
|
||||
fileList.value = [{
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
</template>
|
||||
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-position="top">
|
||||
<div class="applyFormContainer">
|
||||
<el-button class="downloadTemplateBtn" text @click="downloadDocxTemplate">下载导入模板</el-button>
|
||||
<el-form-item prop="employeeNumber">
|
||||
<el-upload class="upload-demo" drag action="#" :http-request="requestDocUpload"
|
||||
:file-list="docUploadList" :before-upload="beforeDocUpload"
|
||||
|
@ -103,14 +102,6 @@ const removeDocUpload = (file, fileList) => {
|
|||
item => item.name != file.name
|
||||
);
|
||||
}
|
||||
const downloadDocxTemplate = (val) => {
|
||||
const link = document.createElement('a')
|
||||
link.href = '/复训记录导入模板.xlsx'
|
||||
link.download = '复训记录导入模板.xlsx' // 设置下载文件名
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
const handleCancel = () => {
|
||||
proxy.resetForm("ruleFormRef")
|
||||
router.push({
|
||||
|
@ -291,19 +282,4 @@ const handleCancel = () => {
|
|||
font-size: 16px;
|
||||
}
|
||||
|
||||
.downloadTemplateBtn {
|
||||
width: 100px;
|
||||
height: 36px;
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #409eff !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
.downloadTemplateBtn:hover {
|
||||
background: transparent !important;
|
||||
color: #409eff !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user