提交本地代码
This commit is contained in:
parent
dfd41d0e95
commit
adcf8a8066
|
@ -90,8 +90,8 @@
|
|||
</div>
|
||||
</el-form>
|
||||
|
||||
<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">
|
||||
|
@ -142,8 +142,8 @@
|
|||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</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">
|
||||
|
|
|
@ -89,8 +89,8 @@
|
|||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<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">
|
||||
|
@ -141,8 +141,8 @@
|
|||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</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">
|
||||
|
|
|
@ -90,8 +90,8 @@
|
|||
</div>
|
||||
</el-form>
|
||||
|
||||
<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">
|
||||
|
@ -142,8 +142,8 @@
|
|||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</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">
|
||||
|
|
|
@ -89,8 +89,8 @@
|
|||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<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">
|
||||
|
@ -141,8 +141,8 @@
|
|||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="headerTitle">审批记录</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">
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ES'">
|
||||
|
@ -183,7 +183,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<el-form-item label="SH资质">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
|
@ -213,7 +213,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ESC' || detailForm.qualificationId == 'CESC'">
|
||||
<div v-if="detailForm.qualificationId == 'ESC/CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
|
@ -257,7 +257,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<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)" />
|
||||
|
@ -307,6 +307,28 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="beforeConditionInfo.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<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" v-if="beforeConditionInfo.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.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"
|
||||
v-if="beforeConditionInfo.hasQualified.includes('ESC') || beforeConditionInfo.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<img :src="beforeConditionInfo.escFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.escFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.escFile)" />
|
||||
</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"
|
||||
|
@ -475,7 +497,6 @@ 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())
|
||||
}
|
||||
// 预览
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ES'">
|
||||
|
@ -183,7 +183,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<el-form-item label="SH资质">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
|
@ -213,7 +213,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ESC' || ruleForm.qualificationId == 'CESC'">
|
||||
<div v-if="detailForm.qualificationId == 'ESC/CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
|
@ -257,7 +257,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<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)" />
|
||||
|
@ -307,6 +307,28 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="beforeConditionInfo.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<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" v-if="beforeConditionInfo.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.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"
|
||||
v-if="beforeConditionInfo.hasQualified.includes('ESC') || beforeConditionInfo.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<img :src="beforeConditionInfo.escFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.escFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.escFile)" />
|
||||
</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"
|
||||
|
@ -496,7 +518,6 @@ 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())
|
||||
}
|
||||
// 预览
|
||||
|
@ -544,7 +565,7 @@ const isAfterToday = () => {
|
|||
return dateToCompare > today;
|
||||
};
|
||||
// 审批状态改变
|
||||
const handleApplyStateChange = (value) => {
|
||||
const handleApplyStateChange = (value) => {
|
||||
if (value == 2) ruleForm.value.remark = '同意'
|
||||
if (value == 9) ruleForm.value.remark = ''
|
||||
}
|
||||
|
|
|
@ -81,13 +81,16 @@
|
|||
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" v-if="scope.row.state == 1 && scope.row.node == 1" text
|
||||
v-hasPermi="['qualification:approval']" class="replayTextBtn"
|
||||
@click="handleApproval(scope.row)">审批</el-button>
|
||||
<el-button type="primary" text class="replayTextBtn" v-else
|
||||
v-hasPermi="['qualification:viewDetail']" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button type="primary" text class="deleteTextBtn"
|
||||
v-hasPermi="['qualification:qualificationDelete']"
|
||||
@click="handleDetele(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -102,7 +105,7 @@ import { useRouter } from 'vue-router'
|
|||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import exprotIcon from '@/assets/images/exprotIcon.png'
|
||||
import { customerDeptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getBusUserQualification, exportBusUserQualification } from "@/api/qualification/myQualifications"
|
||||
import { getBusUserQualification, exportBusUserQualification, deleteBusUserQualification } from "@/api/qualification/myQualifications"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const router = useRouter()
|
||||
|
@ -237,6 +240,16 @@ const handleExportExcel = () => {
|
|||
})
|
||||
|
||||
}
|
||||
// 删除
|
||||
const handleDetele = (record) => {
|
||||
const rowId = record.id
|
||||
proxy.$modal.confirm('是否确认删除该项数据项?').then(function () {
|
||||
return deleteBusUserQualification(rowId)
|
||||
}).then(() => {
|
||||
getBusUserQualificationPageList();
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => { })
|
||||
}
|
||||
const handleView = (record) => {
|
||||
router.push('/qualification/approvalDetail/' + record.id)
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
@ -424,8 +424,7 @@ const isImageFile = (filePath) => {
|
|||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
|
||||
suffix.value = filePath.split('.').pop();
|
||||
console.log('后缀', filePath.split('.').pop())
|
||||
suffix.value = filePath.split('.').pop();
|
||||
return ['jpeg', 'jpg', 'png'].includes(suffix.value?.toLowerCase())
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
@ -441,8 +441,7 @@ const isImageFile = (filePath) => {
|
|||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
|
||||
suffix.value = filePath.split('.').pop();
|
||||
console.log('后缀', filePath.split('.').pop())
|
||||
suffix.value = filePath.split('.').pop();
|
||||
return ['jpeg', 'jpg', 'png'].includes(suffix.value?.toLowerCase())
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
v-hasPermi="['qualification:qualificationApply']" @click="handleReplay(scope.row)">重新申请</el-button>
|
||||
|
@ -72,8 +72,8 @@
|
|||
<a class="replayTextBtn" :href="href">查看</a>
|
||||
</el-button>
|
||||
</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"
|
||||
<el-divider direction="vertical" class="verticalLine" />
|
||||
<el-button type="primary" text class="deleteTextBtn"
|
||||
v-hasPermi="['qualification:qualificationDelete']" @click="handleDetele(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传" prop="beforeCondition.shFile">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -203,7 +203,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeCondition.esFile">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -229,7 +229,8 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="具备资质" prop="beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified"
|
||||
@change="handleChoseQualification">
|
||||
<el-checkbox v-if="ruleForm.beforeCondition.batteryLine == 1" label="SH"
|
||||
value="SH" />
|
||||
<el-checkbox label="ES" value="ES" />
|
||||
|
@ -253,6 +254,22 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
v-if="ruleForm.beforeCondition.hasQualified.includes('ESC') || ruleForm.beforeCondition.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<myFileUpload ref="escFileRef" @set-form-file="handleSetESCFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="健康证明" prop="beforeCondition.healthCertificate">
|
||||
<myFileUpload ref="healthCertificateRef"
|
||||
|
@ -301,6 +318,9 @@ const { target_qualification } = proxy.useDict("target_qualification")
|
|||
console.log('目标资质', target_qualification)
|
||||
const certificatePhotoRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
const shFileRef = ref(null)
|
||||
const esFileRef = ref(null)
|
||||
const escFileRef = ref(null)
|
||||
const data = reactive({
|
||||
ruleForm: {
|
||||
qualificationId: undefined,
|
||||
|
@ -317,6 +337,7 @@ const data = reactive({
|
|||
urgency: undefined,
|
||||
certificatePhoto: undefined,
|
||||
esFile: undefined,
|
||||
escFile: undefined,
|
||||
shFile: undefined,
|
||||
practicalExperience: undefined,
|
||||
experienceFile: undefined,
|
||||
|
@ -354,6 +375,9 @@ const data = reactive({
|
|||
esFile: [
|
||||
{ required: true, message: 'ES资质不能为空', trigger: 'change' }
|
||||
],
|
||||
escFile: [
|
||||
{ required: true, message: 'ESC/CESC资质不能为空', trigger: 'change' }
|
||||
],
|
||||
shFile: [
|
||||
{ required: true, message: 'SH资质不能为空', trigger: 'change' }
|
||||
],
|
||||
|
@ -411,6 +435,10 @@ const handleSetShFile = (filePath) => {
|
|||
const handleSetESFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.esFile = filePath
|
||||
}
|
||||
|
||||
const handleSetESCFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.escFile = filePath
|
||||
}
|
||||
// 设置资质表单路径
|
||||
const handleSetQualificationForm = (filePath) => {
|
||||
console.log('接收资质表单照片', filePath)
|
||||
|
@ -501,28 +529,62 @@ const getUserQualification = (_userId) => {
|
|||
// 申请目标资质选择
|
||||
const handleChoseQualification = (val) => {
|
||||
nextTick(() => {
|
||||
if (val == 'LLP') {
|
||||
if (firstCertificateFileRef.value) {
|
||||
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)
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = jjzInfo.certificateUrl
|
||||
firstCertificateFileRef.value?.setFileInfo(jjzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
firstCertificateFileRef.value.setFileInfo(undefined)
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = undefined
|
||||
firstCertificateFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (certificatePhotoRef.value) {
|
||||
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)
|
||||
ruleForm.value.beforeCondition.certificatePhoto = dgzInfo.certificateUrl
|
||||
certificatePhotoRef.value?.setFileInfo(dgzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
certificatePhotoRef.value.setFileInfo(undefined)
|
||||
ruleForm.value.beforeCondition.certificatePhoto = undefined
|
||||
certificatePhotoRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const shInfo = choseUserQualification.value.filter(item => item.qualificationName === 'SH')[0]
|
||||
if (shInfo && shInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.shFile = shInfo.certificateUrl
|
||||
shFileRef.value?.setFileInfo(shInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.shFile = undefined
|
||||
shFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
const esInfo = choseUserQualification.value.filter(item => item.qualificationName === 'ES')[0]
|
||||
if (esInfo && esInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.esFile = esInfo.certificateUrl
|
||||
esFileRef.value?.setFileInfo(esInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.esFile = undefined
|
||||
esFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
const escInfo = choseUserQualification.value.filter(item => item.qualificationName === 'ESC/CESC')[0]
|
||||
if (escInfo && escInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.escFile = escInfo.certificateUrl
|
||||
escFileRef.value?.setFileInfo(escInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.escFile = undefined
|
||||
escFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -581,7 +643,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
@ -595,8 +657,7 @@ const handleCancel = () => {
|
|||
}
|
||||
const handleSubmit = () => {
|
||||
proxy.$refs["ruleFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
if (valid) {
|
||||
const submitForm = ruleForm.value
|
||||
submitForm.beforeCondition = JSON.stringify(ruleForm.value.beforeCondition)
|
||||
submitForm.node = 1
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
<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>
|
||||
class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="detailForm.state == 1 && detailForm.node == 1" type="info"
|
||||
class="infoinfoText">待审核</el-text>
|
||||
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"
|
||||
|
@ -136,7 +136,7 @@
|
|||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ES'">
|
||||
|
@ -183,7 +183,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<el-form-item label="SH资质">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
|
@ -257,7 +257,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<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)" />
|
||||
|
@ -307,6 +307,28 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="beforeConditionInfo.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<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" v-if="beforeConditionInfo.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.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"
|
||||
v-if="beforeConditionInfo.hasQualified.includes('ESC') || beforeConditionInfo.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<img :src="beforeConditionInfo.escFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.escFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.escFile)" />
|
||||
</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"
|
||||
|
@ -360,7 +382,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
@ -471,7 +493,6 @@ 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())
|
||||
}
|
||||
// 预览
|
||||
|
@ -518,12 +539,12 @@ const isAfterToday = () => {
|
|||
const dateToCompare = new Date(beforeConditionInfo.value.reviewDate);
|
||||
return dateToCompare > today;
|
||||
};
|
||||
const handleCancel = () => {
|
||||
const handleCancel = () => {
|
||||
router.push({
|
||||
path: '/qualification/escApproval'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.certificateUrl">
|
||||
<el-image v-if="isImageFile(scope.row.certificateUrl)"
|
||||
<el-image v-if="scope.row.certificateUrl && ['jpeg', 'jpg', 'png'].includes(scope.row.certificateUrl.split('.').pop().toLowerCase())"
|
||||
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;"
|
||||
<img v-else :src="pdfIcon" class="avatar" style="width: 70px; height: 70px; cursor: pointer;"
|
||||
@click.stop="handleCardPreview(scope.row.certificateUrl)" />
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
|
@ -239,8 +239,7 @@ const isImageFile = (filePath) => {
|
|||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
|
||||
suffix.value = filePath.split('.').pop();
|
||||
console.log('后缀', filePath.split('.').pop())
|
||||
suffix.value = filePath.split('.').pop();
|
||||
return ['jpeg', 'jpg', 'png'].includes(suffix.value?.toLowerCase())
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="目标资质" prop="qualificationId">
|
||||
<el-select v-model="ruleForm.qualificationId" placeholder="请选择目标资质" clearable>
|
||||
<el-select v-model="ruleForm.qualificationId" placeholder="请选择目标资质"
|
||||
@change="handleChoseQualification" clearable>
|
||||
<el-option v-for="dict in target_qualification" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
|
@ -108,7 +109,7 @@
|
|||
<myFileUpload ref="certificatePhotoRef"
|
||||
@set-form-file="handleSetCertificatePhoto" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="ruleForm.qualificationId == 'ES'">
|
||||
|
@ -142,7 +143,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传" prop="beforeCondition.shFile">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -201,7 +202,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeCondition.esFile">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -227,7 +228,8 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="具备资质" prop="beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified"
|
||||
@change="handleChoseQualification">
|
||||
<el-checkbox v-if="ruleForm.beforeCondition.batteryLine == 1" label="SH"
|
||||
value="SH" />
|
||||
<el-checkbox label="ES" value="ES" />
|
||||
|
@ -251,6 +253,22 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
v-if="ruleForm.beforeCondition.hasQualified.includes('ESC') || ruleForm.beforeCondition.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<myFileUpload ref="escFileRef" @set-form-file="handleSetESCFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="健康证明" prop="beforeCondition.healthCertificate">
|
||||
<myFileUpload ref="healthCertificateRef"
|
||||
|
@ -287,7 +305,7 @@ import { onMounted, reactive, ref } from 'vue'
|
|||
import { customerDeptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getBusDependencyPage } from "@/api/system/dependency"
|
||||
import { getSysSectionPage } from "@/api/system/section"
|
||||
import { reApplyBusUserQualification, getBusUserQualificationDetail } from "@/api/qualification/myQualifications"
|
||||
import { getUserCertificateList, reApplyBusUserQualification, getBusUserQualificationDetail } from "@/api/qualification/myQualifications"
|
||||
import myFileUpload from './myFileUpload.vue'
|
||||
import moment from 'moment'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
@ -297,6 +315,7 @@ const qualificationFormRef = ref(null)
|
|||
const shFileRef = ref(null)
|
||||
const experienceFileRef = ref(null)
|
||||
const esFileRef = ref(null)
|
||||
const escFileRef = ref(null)
|
||||
const healthCertificateRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
|
||||
|
@ -323,6 +342,7 @@ const data = reactive({
|
|||
certificatePhoto: undefined,
|
||||
esFile: undefined,
|
||||
shFile: undefined,
|
||||
escFile: undefined,
|
||||
practicalExperience: undefined,
|
||||
experienceFile: undefined,
|
||||
batteryLine: '0',
|
||||
|
@ -359,6 +379,9 @@ const data = reactive({
|
|||
esFile: [
|
||||
{ required: true, message: 'ES资质不能为空', trigger: 'change' }
|
||||
],
|
||||
escFile: [
|
||||
{ required: true, message: 'ESC/CESC资质不能为空', trigger: 'change' }
|
||||
],
|
||||
shFile: [
|
||||
{ required: true, message: 'SH资质不能为空', trigger: 'change' }
|
||||
],
|
||||
|
@ -421,6 +444,10 @@ const handleSetQualificationForm = (filePath) => {
|
|||
console.log('接收资质表单照片', filePath)
|
||||
ruleForm.value.beforeCondition.qualificationForm = filePath
|
||||
}
|
||||
|
||||
const handleSetESCFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.escFile = filePath
|
||||
}
|
||||
// 设置实操经验表单
|
||||
const handleSetExperienceFile = (filePath) => {
|
||||
console.log('接收资质表单照片', filePath)
|
||||
|
@ -457,6 +484,8 @@ const selectChanged = (value) => {
|
|||
ruleForm.value.sectionId = curUser.sectionId;
|
||||
ruleForm.value.dependencyId = curUser.dependencyId;
|
||||
ruleForm.value.escUserName = curUser.escUserName;
|
||||
|
||||
getUserQualification(curUser.userId)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -473,6 +502,21 @@ onMounted(() => {
|
|||
getQualificationInfo(id, node)
|
||||
}
|
||||
});
|
||||
|
||||
const choseUserQualification = ref([])
|
||||
const getUserQualification = (_userId) => {
|
||||
getUserCertificateList({
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
userId: _userId
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
choseUserQualification.value = res.data
|
||||
if (ruleForm.value.qualificationId) handleChoseQualification(ruleForm.value.qualificationId)
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
const getQualificationInfo = (detailId, _node) => {
|
||||
console.log('接收参数', detailId)
|
||||
var _queryParams = {
|
||||
|
@ -504,19 +548,84 @@ const getQualificationInfo = (detailId, _node) => {
|
|||
}
|
||||
ruleForm.value.beforeCondition = JSON.parse(res.data.beforeCondition)
|
||||
nextTick(() => {
|
||||
if (ruleForm.value.beforeCondition.certificatePhoto) certificatePhotoRef.value.setFileInfo(ruleForm.value.beforeCondition.certificatePhoto)
|
||||
if (ruleForm.value.beforeCondition.qualificationForm) qualificationFormRef.value.setFileInfo(ruleForm.value.beforeCondition.qualificationForm)
|
||||
if (ruleForm.value.beforeCondition.shFile) shFileRef.value.setFileInfo(ruleForm.value.beforeCondition.shFile)
|
||||
if (ruleForm.value.beforeCondition.experienceFile) experienceFileRef.value.setFileInfo(ruleForm.value.beforeCondition.experienceFile)
|
||||
if (ruleForm.value.beforeCondition.esFile) esFileRef.value.setFileInfo(ruleForm.value.beforeCondition.esFile)
|
||||
if (ruleForm.value.beforeCondition.healthCertificate) healthCertificateRef.value.setFileInfo(ruleForm.value.beforeCondition.healthCertificate)
|
||||
if (ruleForm.value.beforeCondition.firstCertificateFile) firstCertificateFileRef.value.setFileInfo(ruleForm.value.beforeCondition.firstCertificateFile)
|
||||
if (ruleForm.value.beforeCondition.certificatePhoto) certificatePhotoRef.value?.setFileInfo(ruleForm.value.beforeCondition.certificatePhoto)
|
||||
if (ruleForm.value.beforeCondition.qualificationForm) qualificationFormRef.value?.setFileInfo(ruleForm.value.beforeCondition.qualificationForm)
|
||||
if (ruleForm.value.beforeCondition.shFile) shFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.shFile)
|
||||
if (ruleForm.value.beforeCondition.experienceFile) experienceFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.experienceFile)
|
||||
if (ruleForm.value.beforeCondition.esFile) esFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.esFile)
|
||||
if (ruleForm.value.beforeCondition.escFile) escFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.escFile)
|
||||
if (ruleForm.value.beforeCondition.healthCertificate) healthCertificateRef.value?.setFileInfo(ruleForm.value.beforeCondition.healthCertificate)
|
||||
if (ruleForm.value.beforeCondition.firstCertificateFile) firstCertificateFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.firstCertificateFile)
|
||||
});
|
||||
|
||||
console.log('资质详情', ruleForm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 申请目标资质选择
|
||||
const handleChoseQualification = (val) => {
|
||||
nextTick(() => {
|
||||
if (firstCertificateFileRef.value) {
|
||||
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
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = jjzInfo.certificateUrl
|
||||
firstCertificateFileRef.value?.setFileInfo(jjzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = undefined
|
||||
firstCertificateFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
if (certificatePhotoRef.value) {
|
||||
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
|
||||
ruleForm.value.beforeCondition.certificatePhoto = dgzInfo.certificateUrl
|
||||
certificatePhotoRef.value?.setFileInfo(dgzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
ruleForm.value.beforeCondition.certificatePhoto = undefined
|
||||
certificatePhotoRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const shInfo = choseUserQualification.value.filter(item => item.qualificationName === 'SH')[0]
|
||||
if (shInfo && shInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.shFile = shInfo.certificateUrl
|
||||
shFileRef.value?.setFileInfo(shInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.shFile = undefined
|
||||
shFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
const esInfo = choseUserQualification.value.filter(item => item.qualificationName === 'ES')[0]
|
||||
if (esInfo && esInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.esFile = esInfo.certificateUrl
|
||||
esFileRef.value?.setFileInfo(esInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.esFile = undefined
|
||||
esFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
const escInfo = choseUserQualification.value.filter(item => item.qualificationName === 'ESC/CESC')[0]
|
||||
if (escInfo && escInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.escFile = escInfo.certificateUrl
|
||||
escFileRef.value?.setFileInfo(escInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.escFile = undefined
|
||||
escFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 用户数据
|
||||
const allUsers = ref([])
|
||||
// 获取所有用户 ,后期可能替换为当前属地下负责的用户
|
||||
|
@ -571,7 +680,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.certificateUrl">
|
||||
<el-image v-if="isImageFile(scope.row.certificateUrl)"
|
||||
<el-image v-if="scope.row.certificateUrl && ['jpeg', 'jpg', 'png'].includes(scope.row.certificateUrl.split('.').pop().toLowerCase())"
|
||||
style="width: 70px; height: 44px;line-height: 50px;cursor: pointer;"
|
||||
:src="baseUrl + scope.row.certificateUrl" fit="fill"
|
||||
@click.stop="handleCardPreview(scope.row.certificateUrl)" />
|
||||
|
@ -237,7 +237,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
@ -349,8 +349,7 @@ const isImageFile = (filePath) => {
|
|||
// 处理无后缀名情况
|
||||
if (!filePath || filePath.indexOf('.') === -1) return '';
|
||||
|
||||
suffix.value = filePath.split('.').pop();
|
||||
console.log('后缀', filePath.split('.').pop())
|
||||
suffix.value = filePath.split('.').pop();
|
||||
return ['jpeg', 'jpg', 'png'].includes(suffix.value?.toLowerCase())
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,15 @@
|
|||
<el-table-column prop="qualificationName" label="资质名称" width="110" />
|
||||
<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" />
|
||||
<template v-if="scope.row.certificateUrl">
|
||||
<el-image
|
||||
v-if="scope.row.certificateUrl && ['jpeg', 'jpg', 'png'].includes(scope.row.certificateUrl.split('.').pop().toLowerCase())"
|
||||
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>
|
||||
<span v-else>请在"高压资质培训信息"上传资质证书</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -93,7 +99,7 @@
|
|||
<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>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -102,7 +108,7 @@
|
|||
<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>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</template>
|
||||
|
@ -222,7 +228,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
@ -337,7 +343,6 @@ 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())
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="workNo" label="工号" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="sourceQualificationName" label="当前资质" />
|
||||
<el-table-column prop="qualificationName" label="目标资质" />
|
||||
<el-table-column prop="sourceQualificationName" label="当前资质" width="110" />
|
||||
<el-table-column prop="qualificationName" label="目标资质" width="110" />
|
||||
<el-table-column prop="state" label="状态" width="160">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.state == 1 && scope.row.node == 0" type="info"
|
||||
|
@ -29,7 +29,7 @@
|
|||
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<el-table-column label="操作" width="210">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text class="replayTextBtn" v-if="scope.row.state == 9"
|
||||
v-hasPermi="['qualification:qualificationApply']"
|
||||
|
@ -37,11 +37,11 @@
|
|||
<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" >查看</a>
|
||||
<a class="replayTextBtn" :href="href">查看</a>
|
||||
</el-button>
|
||||
</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"
|
||||
<el-divider direction="vertical" class="verticalLine" />
|
||||
<el-button type="primary" text class="deleteTextBtn"
|
||||
v-hasPermi="['qualification:qualificationDelete']"
|
||||
@click="handleDetele(scope.row)">删除</el-button>
|
||||
</template>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传" prop="beforeCondition.shFile">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -178,7 +178,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeCondition.esFile">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -203,7 +203,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="具备资质" prop="beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified" @change="handleChoseQualification">
|
||||
<el-checkbox v-if="ruleForm.beforeCondition.batteryLine == '1'" label="SH"
|
||||
value="SH" />
|
||||
<el-checkbox label="ES" value="ES" />
|
||||
|
@ -226,6 +226,21 @@
|
|||
style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('ESC') || ruleForm.beforeCondition.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<myFileUpload ref="escFileRef" @set-form-file="handleSetESCFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="健康证明" prop="beforeCondition.healthCertificate">
|
||||
<myFileUpload ref="healthCertificateRef" @set-form-file="handleSetHealthCertificate" />
|
||||
|
@ -269,6 +284,9 @@ const { proxy } = getCurrentInstance()
|
|||
const { target_qualification } = proxy.useDict("target_qualification")
|
||||
const certificatePhotoRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
const shFileRef = ref(null)
|
||||
const esFileRef = ref(null)
|
||||
const escFileRef = ref(null)
|
||||
const data = reactive({
|
||||
ruleForm: {
|
||||
qualificationId: undefined,
|
||||
|
@ -286,6 +304,7 @@ const data = reactive({
|
|||
certificatePhoto: undefined,
|
||||
esFile: undefined,
|
||||
shFile: undefined,
|
||||
escFile: undefined,
|
||||
practicalExperience: undefined,
|
||||
experienceFile: undefined,
|
||||
batteryLine: '0',
|
||||
|
@ -322,6 +341,9 @@ const data = reactive({
|
|||
esFile: [
|
||||
{ required: true, message: 'ES资质不能为空', trigger: 'change' }
|
||||
],
|
||||
escFile: [
|
||||
{ required: true, message: 'ESC/CESC资质不能为空', trigger: 'change' }
|
||||
],
|
||||
shFile: [
|
||||
{ required: true, message: 'SH资质不能为空', trigger: 'change' }
|
||||
],
|
||||
|
@ -369,6 +391,9 @@ const handleSetShFile = (filePath) => {
|
|||
const handleSetESFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.esFile = filePath
|
||||
}
|
||||
const handleSetESCFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.escFile = filePath
|
||||
}
|
||||
// 设置资质表单路径
|
||||
const handleSetQualificationForm = (filePath) => {
|
||||
console.log('接收资质表单照片', filePath)
|
||||
|
@ -437,30 +462,64 @@ const getCurUserQualification = () => {
|
|||
}
|
||||
// 申请目标资质选择
|
||||
const handleChoseQualification = (val) => {
|
||||
nextTick(() => {
|
||||
if (val == 'LLP') {
|
||||
nextTick(() => {
|
||||
if (firstCertificateFileRef.value) {
|
||||
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)
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = jjzInfo.certificateUrl
|
||||
firstCertificateFileRef.value?.setFileInfo(jjzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
firstCertificateFileRef.value.setFileInfo(undefined)
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = undefined
|
||||
firstCertificateFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (certificatePhotoRef.value) {
|
||||
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)
|
||||
ruleForm.value.beforeCondition.certificatePhoto = dgzInfo.certificateUrl
|
||||
certificatePhotoRef.value?.setFileInfo(dgzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
certificatePhotoRef.value.setFileInfo(undefined)
|
||||
ruleForm.value.beforeCondition.certificatePhoto = undefined
|
||||
certificatePhotoRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
const shInfo = curUserQualification.value.filter(item => item.qualificationName === 'SH')[0]
|
||||
if (shInfo && shInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.shFile = shInfo.certificateUrl
|
||||
shFileRef.value?.setFileInfo(shInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.shFile = undefined
|
||||
shFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
const esInfo = curUserQualification.value.filter(item => item.qualificationName === 'ES')[0]
|
||||
if (esInfo && esInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.esFile = esInfo.certificateUrl
|
||||
esFileRef.value?.setFileInfo(esInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.esFile = undefined
|
||||
esFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
|
||||
const escInfo = curUserQualification.value.filter(item => item.qualificationName === 'ESC/CESC')[0]
|
||||
if (escInfo && escInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.escFile = escInfo.certificateUrl
|
||||
escFileRef.value?.setFileInfo(escInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.escFile = undefined
|
||||
escFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
// 获取当前登录用户详情
|
||||
|
@ -519,7 +578,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
<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>
|
||||
class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="detailForm.state == 1 && detailForm.node == 1" type="info"
|
||||
class="infoinfoText">待审核</el-text>
|
||||
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"
|
||||
|
@ -136,7 +136,7 @@
|
|||
@click.stop="handleCardPreview(beforeConditionInfo.certificatePhoto)" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ES'">
|
||||
|
@ -183,7 +183,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<el-form-item label="SH资质">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
|
@ -213,7 +213,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ESC' || detailForm.qualificationId == 'CESC'">
|
||||
<div v-if="detailForm.qualificationId == 'ESC/CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
|
@ -257,7 +257,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<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)" />
|
||||
|
@ -307,6 +307,28 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="beforeConditionInfo.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<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" v-if="beforeConditionInfo.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.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"
|
||||
v-if="beforeConditionInfo.hasQualified.includes('ESC') || beforeConditionInfo.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<img :src="beforeConditionInfo.escFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.escFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.escFile)" />
|
||||
</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"
|
||||
|
@ -360,7 +382,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
@ -471,7 +493,6 @@ 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())
|
||||
}
|
||||
// 预览
|
||||
|
@ -518,12 +539,12 @@ const isAfterToday = () => {
|
|||
const dateToCompare = new Date(beforeConditionInfo.value.reviewDate);
|
||||
return dateToCompare > today;
|
||||
};
|
||||
const handleCancel = () => {
|
||||
const handleCancel = () => {
|
||||
router.push({
|
||||
path: '/qualification/escApproval'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目标资质" prop="qualificationId">
|
||||
<el-select v-model="ruleForm.qualificationId" placeholder="请选择目标资质" clearable>
|
||||
<el-select v-model="ruleForm.qualificationId" placeholder="请选择目标资质"
|
||||
@change="handleChoseQualification" clearable>
|
||||
<el-option v-for="dict in target_qualification" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
|
@ -121,7 +122,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传" prop="beforeCondition.shFile">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -177,7 +178,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeCondition.esFile">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -202,7 +203,8 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="具备资质" prop="beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified">
|
||||
<el-checkbox-group v-model="ruleForm.beforeCondition.hasQualified"
|
||||
@change="handleChoseQualification">
|
||||
<el-checkbox v-if="ruleForm.beforeCondition.batteryLine == '1'" label="SH"
|
||||
value="SH" />
|
||||
<el-checkbox label="ES" value="ES" />
|
||||
|
@ -225,6 +227,22 @@
|
|||
style="width: 100%;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<myFileUpload ref="shFileRef" @set-form-file="handleSetShFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="ruleForm.beforeCondition.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.esFile">
|
||||
<myFileUpload ref="esFileRef" @set-form-file="handleSetESFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8"
|
||||
v-if="ruleForm.beforeCondition.hasQualified.includes('ESC') || ruleForm.beforeCondition.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<myFileUpload ref="escFileRef" @set-form-file="handleSetESCFile" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="健康证明" prop="beforeCondition.healthCertificate">
|
||||
<myFileUpload ref="healthCertificateRef" @set-form-file="handleSetHealthCertificate" />
|
||||
|
@ -257,7 +275,7 @@ import { onMounted, reactive, defineEmits, defineExpose, ref, nextTick } from 'v
|
|||
import { customerDeptTreeSelect } from "@/api/system/user"
|
||||
import { getBusDependencyPage } from "@/api/system/dependency"
|
||||
import { getSysSectionPage } from "@/api/system/section"
|
||||
import { reApplyBusUserQualification, getBusUserQualificationDetail } from "@/api/qualification/myQualifications"
|
||||
import { getCurrentUserList, reApplyBusUserQualification, getBusUserQualificationDetail } from "@/api/qualification/myQualifications"
|
||||
import myFileUpload from './myFileUpload.vue'
|
||||
import moment from 'moment'
|
||||
|
||||
|
@ -266,6 +284,7 @@ const qualificationFormRef = ref(null)
|
|||
const shFileRef = ref(null)
|
||||
const experienceFileRef = ref(null)
|
||||
const esFileRef = ref(null)
|
||||
const escFileRef = ref(null)
|
||||
const healthCertificateRef = ref(null)
|
||||
const firstCertificateFileRef = ref(null)
|
||||
|
||||
|
@ -290,6 +309,7 @@ const data = reactive({
|
|||
certificatePhoto: undefined,
|
||||
esFile: undefined,
|
||||
shFile: undefined,
|
||||
escFile: undefined,
|
||||
practicalExperience: undefined,
|
||||
experienceFile: undefined,
|
||||
batteryLine: '0',
|
||||
|
@ -325,6 +345,9 @@ const data = reactive({
|
|||
],
|
||||
esFile: [
|
||||
{ required: true, message: 'ES资质不能为空', trigger: 'change' }
|
||||
],
|
||||
escFile: [
|
||||
{ required: true, message: 'ESC/CESC资质不能为空', trigger: 'change' }
|
||||
],
|
||||
shFile: [
|
||||
{ required: true, message: 'SH资质不能为空', trigger: 'change' }
|
||||
|
@ -373,6 +396,10 @@ const handleSetShFile = (filePath) => {
|
|||
const handleSetESFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.esFile = filePath
|
||||
}
|
||||
|
||||
const handleSetESCFile = (filePath) => {
|
||||
ruleForm.value.beforeCondition.escFile = filePath
|
||||
}
|
||||
// 设置资质表单路径
|
||||
const handleSetQualificationForm = (filePath) => {
|
||||
console.log('接收资质表单照片', filePath)
|
||||
|
@ -402,11 +429,23 @@ const handleFirstCollectionDateChange = (val) => {
|
|||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getCurUserQualification()
|
||||
getBusDependencyData()
|
||||
getDeptTree()
|
||||
getSysSectionData()
|
||||
});
|
||||
|
||||
const curUserQualification = ref([])
|
||||
// 获取 当前用户资质上传情况
|
||||
const getCurUserQualification = () => {
|
||||
getCurrentUserList({
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
}).then(res => {
|
||||
if (res.code == 200) curUserQualification.value = res.data
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
const getQualificationInfo = (detailId, _node) => {
|
||||
console.log('接收参数', detailId)
|
||||
var _queryParams = {
|
||||
|
@ -438,13 +477,14 @@ const getQualificationInfo = (detailId, _node) => {
|
|||
}
|
||||
ruleForm.value.beforeCondition = JSON.parse(res.data.beforeCondition)
|
||||
nextTick(() => {
|
||||
if (ruleForm.value.beforeCondition.certificatePhoto) certificatePhotoRef.value.setFileInfo(ruleForm.value.beforeCondition.certificatePhoto)
|
||||
if (ruleForm.value.beforeCondition.qualificationForm) qualificationFormRef.value.setFileInfo(ruleForm.value.beforeCondition.qualificationForm)
|
||||
if (ruleForm.value.beforeCondition.shFile) shFileRef.value.setFileInfo(ruleForm.value.beforeCondition.shFile)
|
||||
if (ruleForm.value.beforeCondition.experienceFile) experienceFileRef.value.setFileInfo(ruleForm.value.beforeCondition.experienceFile)
|
||||
if (ruleForm.value.beforeCondition.esFile) esFileRef.value.setFileInfo(ruleForm.value.beforeCondition.esFile)
|
||||
if (ruleForm.value.beforeCondition.healthCertificate) healthCertificateRef.value.setFileInfo(ruleForm.value.beforeCondition.healthCertificate)
|
||||
if (ruleForm.value.beforeCondition.firstCertificateFile) firstCertificateFileRef.value.setFileInfo(ruleForm.value.beforeCondition.firstCertificateFile)
|
||||
if (ruleForm.value.beforeCondition.certificatePhoto) certificatePhotoRef.value?.setFileInfo(ruleForm.value.beforeCondition.certificatePhoto)
|
||||
if (ruleForm.value.beforeCondition.qualificationForm) qualificationFormRef.value?.setFileInfo(ruleForm.value.beforeCondition.qualificationForm)
|
||||
if (ruleForm.value.beforeCondition.shFile) shFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.shFile)
|
||||
if (ruleForm.value.beforeCondition.experienceFile) experienceFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.experienceFile)
|
||||
if (ruleForm.value.beforeCondition.esFile) esFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.esFile)
|
||||
if (ruleForm.value.beforeCondition.escFile) escFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.escFile)
|
||||
if (ruleForm.value.beforeCondition.healthCertificate) healthCertificateRef.value?.setFileInfo(ruleForm.value.beforeCondition.healthCertificate)
|
||||
if (ruleForm.value.beforeCondition.firstCertificateFile) firstCertificateFileRef.value?.setFileInfo(ruleForm.value.beforeCondition.firstCertificateFile)
|
||||
});
|
||||
|
||||
console.log('资质详情', ruleForm.value)
|
||||
|
@ -452,6 +492,68 @@ const getQualificationInfo = (detailId, _node) => {
|
|||
})
|
||||
}
|
||||
|
||||
// 申请目标资质选择
|
||||
const handleChoseQualification = (val) => {
|
||||
nextTick(() => {
|
||||
if (firstCertificateFileRef.value) {
|
||||
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
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = jjzInfo.certificateUrl
|
||||
firstCertificateFileRef.value?.setFileInfo(jjzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.firstCollectionDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCollectionExpireDate = undefined
|
||||
ruleForm.value.beforeCondition.firstCertificateFile = undefined
|
||||
firstCertificateFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
}
|
||||
if (certificatePhotoRef.value) {
|
||||
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
|
||||
ruleForm.value.beforeCondition.certificatePhoto = dgzInfo.certificateUrl
|
||||
certificatePhotoRef.value?.setFileInfo(dgzInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.collectionDate = undefined
|
||||
ruleForm.value.beforeCondition.reviewDate = undefined
|
||||
ruleForm.value.beforeCondition.certificatePhoto = undefined
|
||||
certificatePhotoRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
}
|
||||
|
||||
const shInfo = curUserQualification.value.filter(item => item.qualificationName === 'SH')[0]
|
||||
if (shInfo && shInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.shFile = shInfo.certificateUrl
|
||||
shFileRef.value?.setFileInfo(shInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.shFile = undefined
|
||||
shFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
const esInfo = curUserQualification.value.filter(item => item.qualificationName === 'ES')[0]
|
||||
if (esInfo && esInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.esFile = esInfo.certificateUrl
|
||||
esFileRef.value?.setFileInfo(esInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.esFile = undefined
|
||||
esFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
|
||||
const escInfo = curUserQualification.value.filter(item => item.qualificationName === 'ESC/CESC')[0]
|
||||
if (escInfo && escInfo.startTime) {
|
||||
ruleForm.value.beforeCondition.escFile = escInfo.certificateUrl
|
||||
escFileRef.value?.setFileInfo(escInfo.certificateUrl)
|
||||
} else {
|
||||
ruleForm.value.beforeCondition.escFile = undefined
|
||||
escFileRef.value?.setFileInfo(undefined)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
// 属地数据
|
||||
const busDependencyData = ref([])
|
||||
// 获取属地数据
|
||||
|
@ -493,7 +595,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.certificateUrl">
|
||||
<el-image v-if="isImageFile(scope.row.certificateUrl)"
|
||||
<el-image v-if="scope.row.certificateUrl && ['jpeg', 'jpg', 'png'].includes(scope.row.certificateUrl.split('.').pop().toLowerCase())"
|
||||
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;"
|
||||
<img v-else :src="pdfIcon" class="avatar" style="width: 70px; height: 70px; cursor: pointer;"
|
||||
@click.stop="handleCardPreview(scope.row.certificateUrl)" />
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
|
@ -184,17 +184,15 @@ const handleEdit = (record) => {
|
|||
const handleSetQualifcationFile = (filePath) => {
|
||||
console.log('接收资质证件', filePath)
|
||||
form.value.certificateUrl = filePath
|
||||
}
|
||||
}
|
||||
// 判断是否为图片文件
|
||||
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) => {
|
||||
// 处理无后缀名情况
|
||||
|
|
|
@ -74,9 +74,9 @@
|
|||
<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>
|
||||
class="infoinfoText">待审核</el-text>
|
||||
<el-text v-if="detailForm.state == 1 && detailForm.node == 1" type="info"
|
||||
class="infoinfoText">待审核</el-text>
|
||||
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"
|
||||
|
@ -183,7 +183,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<el-form-item label="SH资质">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
|
@ -213,7 +213,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ESC' || detailForm.qualificationId == 'CESC'">
|
||||
<div v-if="detailForm.qualificationId == 'ESC/CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
|
@ -257,7 +257,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<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)" />
|
||||
|
@ -307,6 +307,29 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="beforeConditionInfo.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<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" v-if="beforeConditionInfo.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.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"
|
||||
v-if="beforeConditionInfo.hasQualified.includes('ESC') || beforeConditionInfo.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<img :src="beforeConditionInfo.escFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.escFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.escFile)" />
|
||||
</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"
|
||||
|
@ -360,7 +383,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
|
@ -475,7 +498,6 @@ 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())
|
||||
}
|
||||
// 预览
|
||||
|
@ -522,12 +544,12 @@ const isAfterToday = () => {
|
|||
const dateToCompare = new Date(beforeConditionInfo.value.reviewDate);
|
||||
return dateToCompare > today;
|
||||
};
|
||||
const handleCancel = () => {
|
||||
const handleCancel = () => {
|
||||
router.push({
|
||||
path: '/qualification/trainApproval'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="SH资质上传">
|
||||
<el-form-item label="SH资质">
|
||||
<img :src="beforeConditionInfo.shFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.shFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.shFile)" />
|
||||
|
@ -213,7 +213,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div v-if="detailForm.qualificationId == 'ESC' || detailForm.qualificationId == 'CESC'">
|
||||
<div v-if="detailForm.qualificationId == 'ESC/CESC'">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="电工证初领日期">
|
||||
|
@ -257,7 +257,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="ES资质上传" prop="beforeConditionInfo.esFile">
|
||||
<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)" />
|
||||
|
@ -307,6 +307,29 @@
|
|||
placeholder="请选择急救证到期日期" style="width: 60%;" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" v-if="beforeConditionInfo.hasQualified.includes('SH')">
|
||||
<el-form-item label="SH资质" prop="beforeCondition.shFile">
|
||||
<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" v-if="beforeConditionInfo.hasQualified.includes('ES')">
|
||||
<el-form-item label="ES资质" prop="beforeCondition.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"
|
||||
v-if="beforeConditionInfo.hasQualified.includes('ESC') || beforeConditionInfo.hasQualified.includes('CESC')">
|
||||
<el-form-item label="ESC/CESC资质" prop="beforeCondition.escFile">
|
||||
<img :src="beforeConditionInfo.escFile.split('.').pop() == 'pdf' ? pdfIcon : baseUrl + beforeConditionInfo.escFile"
|
||||
class="avatar viewFile"
|
||||
@click.stop="handleCardPreview(beforeConditionInfo.escFile)" />
|
||||
</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"
|
||||
|
@ -496,7 +519,6 @@ 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())
|
||||
}
|
||||
// 预览
|
||||
|
@ -545,7 +567,7 @@ const isAfterToday = () => {
|
|||
};
|
||||
|
||||
// 审批状态改变
|
||||
const handleApplyStateChange = (value) => {
|
||||
const handleApplyStateChange = (value) => {
|
||||
if (value == 2) ruleForm.value.remark = '同意'
|
||||
if (value == 9) ruleForm.value.remark = ''
|
||||
}
|
||||
|
|
|
@ -77,13 +77,16 @@
|
|||
<el-text v-if="scope.row.state == 9" type="danger" class="dangerText">驳回</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="130">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" v-if="scope.row.state == 1 && scope.row.node == 2" text
|
||||
v-hasPermi="['qualification:approval']" class="replayTextBtn"
|
||||
@click="handleApproval(scope.row)">审批</el-button>
|
||||
<el-button type="primary" text class="replayTextBtn" v-else
|
||||
v-hasPermi="['qualification:viewDetail']" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button type="primary" text class="deleteTextBtn"
|
||||
v-hasPermi="['qualification:qualificationDelete']"
|
||||
@click="handleDetele(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -98,7 +101,7 @@ import { useRouter } from 'vue-router'
|
|||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import exprotIcon from '@/assets/images/exprotIcon.png'
|
||||
import { customerDeptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getBusUserQualification, exportBusUserQualification } from "@/api/qualification/myQualifications"
|
||||
import { getBusUserQualification, exportBusUserQualification, deleteBusUserQualification } from "@/api/qualification/myQualifications"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const router = useRouter()
|
||||
|
@ -233,6 +236,17 @@ const handleExportExcel = () => {
|
|||
})
|
||||
|
||||
}
|
||||
|
||||
// 删除
|
||||
const handleDetele = (record) => {
|
||||
const rowId = record.id
|
||||
proxy.$modal.confirm('是否确认删除该项数据项?').then(function () {
|
||||
return deleteBusUserQualification(rowId)
|
||||
}).then(() => {
|
||||
getBusUserQualificationPageList();
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => { })
|
||||
}
|
||||
const handleView = (record) => {
|
||||
router.push('/qualification/trainApprovalDetail/' + record.id)
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
|
|
@ -139,7 +139,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getCustomerSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
|
|
@ -424,7 +424,7 @@ const sectionData = ref([])
|
|||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
pageSize: 9999,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
|
|
Loading…
Reference in New Issue
Block a user