对接ESC任务标签重新申请
This commit is contained in:
parent
fa831a794e
commit
2d89a18d59
|
@ -117,7 +117,7 @@ export const dynamicRoutes = [
|
|||
path: ':Id(\\d+)?/:node',
|
||||
component: () => import('@/views/qualification/escTask/components/QualificationReApplyForm'),
|
||||
name: 'qualificationReApplyForm',
|
||||
meta: { title: 'ESC重新申请申请', activeMenu: '/qualification/escTask' }
|
||||
meta: { title: 'ESC重新申请资质', activeMenu: '/qualification/escTask' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -135,6 +135,21 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/qualification/escTask/LableReApplyForm',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['qualification:escTask:qualificationApply'],
|
||||
children: [
|
||||
{
|
||||
path: ':Id(\\d+)?',
|
||||
component: () => import('@/views/qualification/escTask/components/LableReApplyForm'),
|
||||
name: 'LableReApplyForm',
|
||||
meta: { title: 'ESC重新申请标签', activeMenu: '/qualification/escTask' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/qualification/viewDetail',
|
||||
component: Layout,
|
||||
|
|
|
@ -147,8 +147,8 @@
|
|||
<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 == 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>
|
||||
|
|
|
@ -146,8 +146,8 @@
|
|||
<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 == 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>
|
||||
|
|
|
@ -147,8 +147,8 @@
|
|||
<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 == 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>
|
||||
|
|
|
@ -146,8 +146,8 @@
|
|||
<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 == 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>
|
||||
|
|
|
@ -175,6 +175,7 @@ const handleOpenApplyForm = () => {
|
|||
|
||||
// 重新申请资质表单
|
||||
const handleReplay = (record) => {
|
||||
router.push('/qualification/escTask/LableReApplyForm/' + record.id)
|
||||
// router.push({
|
||||
// name: 'qualificationReApplyForm',
|
||||
// params: { Id: record.id, node: record.node } // 传递两个参数
|
||||
|
|
|
@ -171,6 +171,17 @@ const queryParams = ref({
|
|||
pageSize: 10,
|
||||
})
|
||||
const requiredQualifications = ref([])
|
||||
// Define the qualifications mapping
|
||||
const qualificationsMap = {
|
||||
'SH': ['电工证', 'SH'],
|
||||
'ES': ['电工证', 'ES'],
|
||||
'ESC': ['电工证', 'ESC'],
|
||||
'CESC': ['电工证', 'CESC'],
|
||||
'SH+LLP': ['电工证', 'SH', 'LLP', '急救证'],
|
||||
'ES+LLP': ['电工证', 'ES', 'LLP', '急救证'],
|
||||
'ESC+LLP': ['电工证', 'ESC', 'LLP', '急救证'],
|
||||
'CESC+LLP': ['电工证', 'CESC', 'LLP', '急救证']
|
||||
};
|
||||
const loading = ref(true)
|
||||
const tableData = ref([])
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
|
@ -258,33 +269,23 @@ const selectChanged = async (value) => {
|
|||
ruleForm.value.dependencyId = curUser.dependencyId;
|
||||
ruleForm.value.escUserName = curUser.escUserName;
|
||||
|
||||
loading.value = true;
|
||||
const res = await getUserQualification();
|
||||
console.log('获取接口完毕', res);
|
||||
loading.value = false;
|
||||
// Filter the data
|
||||
tableData.value = res.filter(item =>
|
||||
requiredQualifications.value.some(qualification =>
|
||||
item.qualificationName === qualification
|
||||
))
|
||||
|
||||
if (ruleForm.value.labelId) {
|
||||
requiredQualifications.value = qualificationsMap[ruleForm.value.labelId] || [];
|
||||
loading.value = true;
|
||||
const res = await getUserQualification();
|
||||
console.log('获取接口完毕', res);
|
||||
loading.value = false;
|
||||
// Filter the data
|
||||
tableData.value = res.filter(item =>
|
||||
requiredQualifications.value.some(qualification =>
|
||||
item.qualificationName === qualification
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
// 申请标签选择
|
||||
const handleChoseLabl = async (val) => {
|
||||
const handleChoseLabl = async (val) => {
|
||||
try {
|
||||
// Define the qualifications mapping
|
||||
const qualificationsMap = {
|
||||
'SH': ['电工证', 'SH'],
|
||||
'ES': ['电工证', 'ES'],
|
||||
'ESC': ['电工证', 'ESC'],
|
||||
'CESC': ['电工证', 'CESC'],
|
||||
'SH+LLP': ['电工证', 'SH', 'LLP', '急救证'],
|
||||
'ES+LLP': ['电工证', 'ES', 'LLP', '急救证'],
|
||||
'ESC+LLP': ['电工证', 'ESC', 'LLP', '急救证'],
|
||||
'CESC+LLP': ['电工证', 'CESC', 'LLP', '急救证']
|
||||
};
|
||||
|
||||
// Get the required qualifications or default to empty array
|
||||
requiredQualifications.value = qualificationsMap[val] || [];
|
||||
console.log('rwerwe', requiredQualifications)
|
||||
|
|
590
src/views/qualification/escTask/components/LableReApplyForm.vue
Normal file
590
src/views/qualification/escTask/components/LableReApplyForm.vue
Normal file
|
@ -0,0 +1,590 @@
|
|||
<template>
|
||||
<div class="app-page-container">
|
||||
<el-breadcrumb class="app-breadcrumb" separator=">">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
|
||||
<span v-if="index == levelList.length - 1" class="link-redirect">{{
|
||||
item.title }}</span>
|
||||
<span v-else class="no-redirect">{{ item.title }}</span>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
<div class="rootContainer clearBoth">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>标签申请</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-position="top">
|
||||
<div class="headerTitle">基本信息</div>
|
||||
<div class="applyFormContainer">
|
||||
<el-row class="myRow" :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请标签" prop="labelId">
|
||||
<el-select v-model="ruleForm.labelId" placeholder="请选择申请标签" clearable
|
||||
@change="handleChoseLabl">
|
||||
<el-option v-for="dict in bus_label" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="员工姓名(中文)" prop="userId">
|
||||
<el-select v-model="ruleForm.userId" filterable placeholder="请选择员工姓名(中文)"
|
||||
@change="selectChanged">
|
||||
<el-option v-for="item in allUsers" :key="item.userId"
|
||||
:label="`${item.nickName}(${item.dept?.deptName || '无部门'})`"
|
||||
:value="item.userId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="员工姓名(英文)" prop="englishName">
|
||||
<el-input v-model="ruleForm.englishName" placeholder="请输入员工姓名(英文)" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="员工工号" prop="workNo">
|
||||
<el-input v-model="ruleForm.workNo" placeholder="请输入员工工号" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="deptId">
|
||||
<el-tree-select v-model="ruleForm.deptId" :data="enabledDeptOptions" disabled
|
||||
:props="{ value: 'id', label: 'label', children: 'children' }" value-key="id"
|
||||
placeholder="请选择部门" check-strictly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="科室" prop="sectionId">
|
||||
<el-select v-model="ruleForm.sectionId" placeholder="请选择科室" disabled>
|
||||
<el-option v-for="item in sectionData" :key="item.sectionId"
|
||||
:label="item.sectionName" :value="item.sectionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="属地" prop="dependencyId">
|
||||
<el-select v-model="ruleForm.dependencyId" placeholder="请选择属地" disabled>
|
||||
<el-option v-for="item in busDependencyData" :key="item.id"
|
||||
:label="item.dependencyName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="属地ESC" prop="escUserName">
|
||||
<el-input v-model="ruleForm.escUserName" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="headerTitle" v-if="ruleForm.labelId">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="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>请在"ESC任务->资质上传"上传资质证书</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>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div class="submitTool">
|
||||
<el-button class="cancelApplyBtn" @click="handleCancel">取消</el-button>
|
||||
<el-button class="submitApplyBtn" @click="handleSubmit">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { deptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getBusDependencyPage } from "@/api/system/dependency"
|
||||
import { getSysSectionPage } from "@/api/system/section"
|
||||
import { getBusUserLabelDetail, reApplyBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getUserCertificateList } from "@/api/qualification/myQualifications"
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const levelList = ref([
|
||||
{ title: '资质管理', path: '/qualification' },
|
||||
{ title: 'ESC任务', path: '/qualification/escTask' },
|
||||
{ title: '标签申请', path: '/qualification/escTask/lableApplyForm' }
|
||||
])
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { bus_label } = proxy.useDict("bus_label")
|
||||
const data = reactive({
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
labelId: [{ required: true, message: "申请标签不能为空", trigger: "change" }],
|
||||
workNo: [{ required: true, message: "员工工号不能为空", trigger: "blur" }],
|
||||
userName: [{ required: true, message: "员工姓名(中文)不能为空", trigger: "blur" }],
|
||||
englishName: [{ required: true, message: "员工姓名(英文)", trigger: "blur" }],
|
||||
deptId: [{ required: true, message: "部门不能为空", trigger: "change" }],
|
||||
sectionId: [{ required: true, message: "科室不能为空", trigger: "change" }],
|
||||
dependencyId: [{ required: true, message: "属地不能为空", trigger: "change" }],
|
||||
escUserName: [{ required: true, message: "属地ESC不能为空", trigger: "blur" }],
|
||||
},
|
||||
})
|
||||
const { ruleForm, rules } = toRefs(data)
|
||||
const queryParams = ref({
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
})
|
||||
const requiredQualifications = ref([])
|
||||
// Define the qualifications mapping
|
||||
const qualificationsMap = {
|
||||
'SH': ['电工证', 'SH'],
|
||||
'ES': ['电工证', 'ES'],
|
||||
'ESC': ['电工证', 'ESC'],
|
||||
'CESC': ['电工证', 'CESC'],
|
||||
'SH+LLP': ['电工证', 'SH', 'LLP', '急救证'],
|
||||
'ES+LLP': ['电工证', 'ES', 'LLP', '急救证'],
|
||||
'ESC+LLP': ['电工证', 'ESC', 'LLP', '急救证'],
|
||||
'CESC+LLP': ['电工证', 'CESC', 'LLP', '急救证']
|
||||
};
|
||||
const loading = ref(true)
|
||||
const tableData = ref([])
|
||||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getAllUser()
|
||||
getBusDependencyData()
|
||||
getDeptTree()
|
||||
getSysSectionData()
|
||||
const id = route.params && route.params.Id
|
||||
if (id) {
|
||||
getLableDetailInfo(id)
|
||||
}
|
||||
});
|
||||
// 获取详情
|
||||
const getLableDetailInfo = (_id) => {
|
||||
getBusUserLabelDetail(_id).then(res => {
|
||||
if (res.code == 200) {
|
||||
ruleForm.value = res.data
|
||||
ruleForm.value.node = 0
|
||||
requiredQualifications.value = qualificationsMap[ruleForm.value.labelId] || [];
|
||||
tableData.value = res.data.userQualificationCertificateList
|
||||
console.log('标签详情', ruleForm.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 用户数据
|
||||
const allUsers = ref([])
|
||||
// 获取所有用户 ,后期可能替换为当前属地下负责的用户
|
||||
const getAllUser = () => {
|
||||
listUser({
|
||||
status: '0',
|
||||
pageNum: 1,
|
||||
pageSize: 5000
|
||||
}).then(res => {
|
||||
allUsers.value = res.rows
|
||||
})
|
||||
}
|
||||
|
||||
// 属地数据
|
||||
const busDependencyData = ref([])
|
||||
// 获取属地数据
|
||||
const getBusDependencyData = () => {
|
||||
getBusDependencyPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
}).then(response => {
|
||||
if (response.code == 200) {
|
||||
busDependencyData.value = response.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 部门数据
|
||||
const enabledDeptOptions = ref(undefined)
|
||||
// 获取部门数据
|
||||
const getDeptTree = () => {
|
||||
deptTreeSelect().then(res => {
|
||||
enabledDeptOptions.value = filterDisabledDept(JSON.parse(JSON.stringify(res.data)))
|
||||
})
|
||||
}
|
||||
/** 过滤禁用的部门 */
|
||||
const filterDisabledDept = (deptList) => {
|
||||
return deptList.filter(dept => {
|
||||
if (dept.disabled) {
|
||||
return false
|
||||
}
|
||||
if (dept.children && dept.children.length) {
|
||||
dept.children = filterDisabledDept(dept.children)
|
||||
}
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// 科室数据
|
||||
const sectionData = ref([])
|
||||
// 获取科室数据
|
||||
const getSysSectionData = () => {
|
||||
getSysSectionPage({
|
||||
pageIndex: 1,
|
||||
pageSize: 100,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
sectionData.value = res.data.list
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 姓名选择事件
|
||||
const selectChanged = async (value) => {
|
||||
const curUser = allUsers.value.find(item => item.userId == value)
|
||||
console.log('当前用户信息', curUser)
|
||||
//传入UserId 代表是ESC代替员工申请
|
||||
ruleForm.value.userId = curUser.userId;
|
||||
ruleForm.value.workNo = curUser.workNo;
|
||||
ruleForm.value.userName = curUser.nickName;
|
||||
ruleForm.value.englishName = curUser.englishName;
|
||||
ruleForm.value.deptId = curUser.deptId;
|
||||
ruleForm.value.sectionId = curUser.sectionId;
|
||||
ruleForm.value.dependencyId = curUser.dependencyId;
|
||||
ruleForm.value.escUserName = curUser.escUserName;
|
||||
|
||||
if (ruleForm.value.labelId) {
|
||||
requiredQualifications.value = qualificationsMap[ruleForm.value.labelId] || [];
|
||||
loading.value = true;
|
||||
const res = await getUserQualification();
|
||||
console.log('获取接口完毕', res);
|
||||
loading.value = false;
|
||||
// Filter the data
|
||||
tableData.value = res.filter(item =>
|
||||
requiredQualifications.value.some(qualification =>
|
||||
item.qualificationName === qualification
|
||||
))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 申请标签选择
|
||||
const handleChoseLabl = async (val) => {
|
||||
try {
|
||||
// Get the required qualifications or default to empty array
|
||||
requiredQualifications.value = qualificationsMap[val] || [];
|
||||
console.log('rwerwe', requiredQualifications)
|
||||
|
||||
if (ruleForm.value.userId) {
|
||||
loading.value = true;
|
||||
const res = await getUserQualification();
|
||||
console.log('获取接口完毕', res);
|
||||
|
||||
// Filter the data
|
||||
tableData.value = res.filter(item =>
|
||||
requiredQualifications.value.some(qualification =>
|
||||
item.qualificationName === qualification
|
||||
))
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
console.error('获取失败', error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
// 获取用户证书情况
|
||||
const getUserQualification = async () => {
|
||||
try {
|
||||
queryParams.value.userId = ruleForm.value.userId
|
||||
const res = await getUserCertificateList(queryParams.value);
|
||||
console.log('diao');
|
||||
return res.code === 200 ? res.data : [];
|
||||
} catch (error) {
|
||||
console.error('获取用户证书失败', error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
proxy.resetForm("ruleFormRef")
|
||||
router.push({
|
||||
path: '/qualification/escTask',
|
||||
query: {
|
||||
activeIndex: 2,
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleSubmit = () => {
|
||||
proxy.$refs["ruleFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
if (qualificArr.length < requiredQualifications.value.length) {
|
||||
proxy.$modal.msgError(`资质证书不全,请在"ESC任务->资质上传"上传资质证书!`)
|
||||
return false;
|
||||
}
|
||||
const qualificStateArr = tableData.value.filter(item => item.status == 2)
|
||||
console.log('是否有资质证书', qualificStateArr)
|
||||
if (qualificStateArr.length > 0) {
|
||||
proxy.$modal.msgError(`资质过期,请更新资质证书后再申请!`)
|
||||
return false;
|
||||
}
|
||||
ruleForm.value.qualificationCertificateIds = tableData.value.map(item => item.id)
|
||||
console.log('sdafasdfas', ruleForm.value)
|
||||
ruleForm.value.node = 1
|
||||
reApplyBusUserLabel(ruleForm.value).then(res => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess("提交成功")
|
||||
router.push({
|
||||
path: '/qualification/escTask',
|
||||
query: {
|
||||
activeIndex: 2,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
proxy.$modal.msgSuccess(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
font-size: 18px;
|
||||
background: #f8f8f8;
|
||||
|
||||
.el-breadcrumb__item {
|
||||
.el-breadcrumb__separator {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #000000 !important;
|
||||
margin: 0 9px;
|
||||
}
|
||||
}
|
||||
|
||||
.no-redirect {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #000000;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.link-redirect {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #0090FF;
|
||||
cursor: text;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.clearBoth {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.rootContainer {
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
height: calc(100vh - 216px);
|
||||
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: 20px 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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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-top .el-form-item__label {
|
||||
font-family: Microsoft YaHei;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
</style>
|
|
@ -469,8 +469,7 @@ onMounted(() => {
|
|||
getSysSectionData()
|
||||
const id = route.params && route.params.Id
|
||||
const node = route.params && route.params.node;
|
||||
if (id) {
|
||||
ruleForm.value.id = id
|
||||
if (id) {
|
||||
getQualificationInfo(id, node)
|
||||
}
|
||||
});
|
||||
|
|
|
@ -147,8 +147,8 @@
|
|||
<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 == 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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user