提交代码
This commit is contained in:
parent
1928ad7e58
commit
bdd5f9d11d
|
@ -86,4 +86,33 @@ export function getBusUserrLabelStatistics(query) {
|
|||
method: 'post',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导入复训记录
|
||||
export function importRecurrentTraining(data) {
|
||||
return request({
|
||||
url: '/admin/busRecurrentTraining/import',
|
||||
method: 'post',
|
||||
data,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前用户复训记录
|
||||
export function currentUserRecurrentTraining(data) {
|
||||
return request({
|
||||
url: '/admin/busRecurrentTraining/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户生效标签
|
||||
export function getUserLabels() {
|
||||
return request({
|
||||
url: '/admin/busUserLabel/getUserLabels',
|
||||
method: 'post',
|
||||
})
|
||||
}
|
BIN
src/assets/images/messageIcon.png
Normal file
BIN
src/assets/images/messageIcon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 380 B |
|
@ -35,6 +35,10 @@
|
|||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
</template> -->
|
||||
<el-badge is-dot class="myBadge">
|
||||
<img :src="messageIcon" class="custom-icon" />
|
||||
</el-badge>
|
||||
|
||||
|
||||
<el-dropdown @command="handleCommand" class="avatar-container right-menu-item hover-effect" trigger="hover">
|
||||
<div class="avatar-wrapper">
|
||||
|
@ -45,10 +49,10 @@
|
|||
<el-dropdown-menu>
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
</router-link>
|
||||
<el-dropdown-item divided command="logout">
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
|
@ -68,6 +72,8 @@
|
|||
|
||||
<script setup>
|
||||
import systemlogo from '@/assets/logo/systemLogo.png'
|
||||
|
||||
import messageIcon from '@/assets/images/messageIcon.png'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
|
@ -254,5 +260,31 @@ function toggleTheme() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.myBadge {
|
||||
margin-right: 16px;
|
||||
|
||||
.custom-icon {
|
||||
// margin: 0 10px 6px 0;
|
||||
margin-bottom: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
:deep(.el-badge__content) {
|
||||
border: none;
|
||||
}
|
||||
|
||||
:deep(.el-badge__content.is-dot) {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: #DDA100;
|
||||
}
|
||||
:deep(.el-badge__content.is-fixed) {
|
||||
top: 20px;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -333,6 +333,20 @@ export const dynamicRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/labelManage/adminApprovalImport',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['labelManage:adminApproval:importFxForm'],
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/labelManage/adminApproval/importForm'),
|
||||
name: 'adminApprovalImportForm',
|
||||
meta: { title: '导入复训记录', activeMenu: '/labelManage/adminApproval' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/safetyReview/examinerTasksForm',
|
||||
component: Layout,
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
<div class="organization-item" v-for="item in tableData">
|
||||
<div class="fileContainer">
|
||||
<img :src="baseUrl + item.organPic" />
|
||||
<div class="optionBtns" v-hasPermi="['databaseLibary:edit']">
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:edit']"
|
||||
<div class="optionBtns" v-hasPermi="['databaseLibary:orgUpdate']">
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:orgUpdate']"
|
||||
@click="handleEdit(item.id)">
|
||||
<img :src="editIcon" class="editIconBtnicon" />
|
||||
</el-button>
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:delete']"
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:orgDeleted']"
|
||||
@click="handleDetele(item.id)">
|
||||
<img :src="deleteIcon" class="editIconBtnicon" />
|
||||
</el-button>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
</div>
|
||||
|
||||
<!-- 文档列表 -->
|
||||
<div class="document-list" v-loading="loading" v-if="tableData.length > 0">
|
||||
<div class="document-card" v-for="item in tableData" >
|
||||
<div class="document-list" v-loading="loading">
|
||||
<div class="document-card" v-for="item in tableData" v-if="tableData.length > 0">
|
||||
<div class="document-header" @click="handleViewDetail(item.id)">
|
||||
<span class="document-title">{{ item.title }}</span>
|
||||
<span class="document-tag">{{ item.category }}</span>
|
||||
|
@ -20,15 +20,19 @@
|
|||
<div class="document-footer">
|
||||
<span class="publish-date">发布于{{ item.createTime }}</span>
|
||||
<div class="publish-btns" v-hasPermi="['databaseLibary:edit']">
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:edit']" @click="handleEdit(item.id)">
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:edit']"
|
||||
@click="handleEdit(item.id)">
|
||||
<img :src="editIcon" class="editIconBtnicon" />
|
||||
</el-button>
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:delete']" @click="handleDetele(item.id)">
|
||||
<el-button type="primary" class="editIconBtn" v-hasPermi="['databaseLibary:delete']"
|
||||
@click="handleDetele(item.id)">
|
||||
<img :src="deleteIcon" class="editIconBtnicon" />
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-empty :image-size="200" v-if="tableData.length == 0" />
|
||||
</div>
|
||||
<!-- 加载更多按钮 -->
|
||||
<div class="moreoptionBtn" v-if="tableData.length > 0">
|
||||
|
@ -36,7 +40,6 @@
|
|||
加载更多…
|
||||
</el-button>
|
||||
</div>
|
||||
<el-empty :image-size="200" v-if="tableData.length == 0" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -66,8 +69,8 @@ const getBusEncyclopediaDatabasePageList = () => {
|
|||
console.log('查询结果', res)
|
||||
if (res.code == 200) {
|
||||
if (res.data.list.length > 0) tableData.value = tableData.value.concat(res.data.list)
|
||||
else {
|
||||
if(queryParams.value.pageIndex > 1) queryParams.value.pageIndex = queryParams.value.pageIndex - 1
|
||||
else {
|
||||
if (queryParams.value.pageIndex > 1) queryParams.value.pageIndex = queryParams.value.pageIndex - 1
|
||||
proxy.$modal.msgSuccess("没有更多了")
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +85,7 @@ const handleLoadMore = () => {
|
|||
getBusEncyclopediaDatabasePageList()
|
||||
}
|
||||
// 删除
|
||||
const handleDetele = (recordId) => {
|
||||
const handleDetele = (recordId) => {
|
||||
proxy.$modal.confirm('是否确认删除该项数据项?').then(function () {
|
||||
return deleteBusEncyclopediaDatabase(recordId)
|
||||
}).then(() => {
|
||||
|
@ -98,7 +101,7 @@ const handleEdit = (recordId) => {
|
|||
router.push('/databaseLibaryForm/' + recordId)
|
||||
}
|
||||
const handleViewDetail = (recordId) => {
|
||||
console.log('点击预览', recordId)
|
||||
console.log('点击预览', recordId)
|
||||
router.push('/libaryDetail/' + recordId)
|
||||
}
|
||||
|
||||
|
|
280
src/views/labelManage/adminApproval/importForm.vue
Normal file
280
src/views/labelManage/adminApproval/importForm.vue
Normal file
|
@ -0,0 +1,280 @@
|
|||
<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="applyFormContainer">
|
||||
<el-form-item prop="employeeNumber">
|
||||
<el-upload class="upload-demo" drag action="#" :http-request="requestDocUpload"
|
||||
:file-list="docUploadList" :before-upload="beforeDocUpload"
|
||||
:on-remove="removeDocUpload">
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">
|
||||
将文件拖曳至此区域,或 <em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__text">
|
||||
支持扩展名:.xlsx
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<div class="submitTool">
|
||||
<el-button class="cancelApplyBtn" @click="handleCancel">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { UploadFilled } from '@element-plus/icons-vue'
|
||||
|
||||
import { importRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
|
||||
const router = useRouter()
|
||||
const levelList = ref([
|
||||
{ title: '标签管理', path: '/labelManage' },
|
||||
{ title: '标签审核员审批', path: '/labelManage/adminApproval' },
|
||||
{ title: '导入复训信息', path: '/labelManage/adminApprovalImport' }
|
||||
])
|
||||
const { proxy } = getCurrentInstance()
|
||||
const data = reactive({
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
},
|
||||
})
|
||||
const { ruleForm, rules } = toRefs(data)
|
||||
|
||||
const docUploadList = ref([])
|
||||
|
||||
// 自定义上传文件资料
|
||||
const requestDocUpload = (options) => {
|
||||
const { file } = options
|
||||
var formData = new FormData();
|
||||
formData.append('file', file);
|
||||
importRecurrentTraining(formData).then(res => {
|
||||
if (res.code == 200) {
|
||||
router.push({
|
||||
path: '/labelManage/adminApproval'
|
||||
})
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
//自定义上传文件资料校验
|
||||
const beforeDocUpload = (file) => {
|
||||
const type = [
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||
];
|
||||
const isXlsx = type.includes(file.type);
|
||||
// 检验文件格式
|
||||
if (!isXlsx) {
|
||||
proxy.$modal.msgError("文件格式错误,请上传.xlsx后缀的文件。");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 移除已上传文件列表
|
||||
const removeDocUpload = (file, fileList) => {
|
||||
docUploadList.value = docUploadList.value.filter(
|
||||
item => item.name != file.name
|
||||
);
|
||||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
proxy.resetForm("ruleFormRef")
|
||||
router.push({
|
||||
path: '/labelManage/adminApproval'
|
||||
})
|
||||
}
|
||||
</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: 0px 20px 0 20px !important;
|
||||
}
|
||||
|
||||
.el-card.is-always-shadow {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.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__content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.el-upload-dragger {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
border-radius: 6px 6px 6px 6px;
|
||||
background: #0090ff05;
|
||||
padding: 140px 450px !important;
|
||||
}
|
||||
|
||||
.el-form-item__error {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
|
@ -55,9 +55,15 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="optionBtn">
|
||||
<el-button type="primary" class="qualificationApplyBtn"
|
||||
v-hasPermi="['labelManage:adminApproval:importFxForm']" @click="handleOpenImportForm">
|
||||
<img :src="importIcon" class="custom-icon" />
|
||||
导入复训记录
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="borderLine"></div>
|
||||
<el-table v-loading="loading" :data="tableData" height="calc(100% - 176px)" style="width: 100%">
|
||||
<el-table v-loading="loading" :data="tableData" height="calc(100% - 220px)" style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
<template #default="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
|
@ -102,6 +108,7 @@
|
|||
import { onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import importIcon from '@/assets/images/ImportIcon.png'
|
||||
import { deptTreeSelect, listUser } from "@/api/system/user"
|
||||
import { getUserLabelPageList } from "@/api/labelManage/labelManage"
|
||||
|
||||
|
@ -215,6 +222,10 @@ const handleApproval = (record) => {
|
|||
console.log('fsafasf', record)
|
||||
router.push('/labelManage/adminApprovalForm/' + record.id)
|
||||
}
|
||||
const handleOpenImportForm = () => {
|
||||
router.push('/labelManage/adminApprovalImport')
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.app-main {
|
||||
|
@ -241,6 +252,10 @@ const handleApproval = (record) => {
|
|||
margin-right: 0 !important;
|
||||
}
|
||||
|
||||
.optionBtn {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.qualificationApplyBtn {
|
||||
// width: 84px !important;
|
||||
height: 32px;
|
||||
|
|
|
@ -228,7 +228,7 @@ const getLabelApprovalRecord = (_id) => {
|
|||
const handleCancel = () => {
|
||||
proxy.resetForm("ruleFormRef")
|
||||
router.push({
|
||||
path: '/labelManage/labelEscApproval'
|
||||
path: '/labelManage/escApproval'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -266,7 +266,7 @@ const handleApplyStateChange = (value) => {
|
|||
const handleCancel = () => {
|
||||
proxy.resetForm("ruleFormRef")
|
||||
router.push({
|
||||
path: '/labelManage/labelEscApproval'
|
||||
path: '/labelManage/escApproval'
|
||||
})
|
||||
}
|
||||
const handleSubmit = () => {
|
||||
|
@ -276,7 +276,7 @@ const handleSubmit = () => {
|
|||
updateStatusBusUserLabel(ruleForm.value).then(res => {
|
||||
if (res.code == 200) {
|
||||
router.push({
|
||||
path: '/labelManage/labelEscApproval'
|
||||
path: '/labelManage/escApproval'
|
||||
})
|
||||
} else {
|
||||
proxy.$modal.msgSuccess(res.msg)
|
||||
|
|
|
@ -52,15 +52,10 @@
|
|||
<el-table-column prop="expireDate" label="到期日期" min-width="130">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.expireDate"> {{ moment(scope.row.expireDate).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fileContent" label="标定信息" min-width="230">
|
||||
<template #default="scope">
|
||||
<div v-for="item in JSON.parse(scope.row.fileContent)" class="fileLink">{{ item.name }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="状态" min-width="100">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.state == 0" type="success" class="successText">正常</el-text>
|
||||
|
@ -68,13 +63,18 @@
|
|||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="130">
|
||||
<el-table-column prop="fileContent" label="标定信息" min-width="360">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text class="replayTextBtn"
|
||||
v-hasPermi="['ppeTool:edit']" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<div v-for="item in JSON.parse(scope.row.fileContent)" class="fileLink"> {{ item.name }} </div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="130" v-hasPermi="['ppeTool:edit']">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text class="replayTextBtn" v-hasPermi="['ppeTool:edit']"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-divider direction="vertical" class="verticalLine" />
|
||||
<el-button type="primary" text class="deleteTextBtn"
|
||||
v-hasPermi="['ppeTool:delete']" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button type="primary" text class="deleteTextBtn" v-hasPermi="['ppeTool:delete']"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -150,13 +150,13 @@ const filterDisabledDept = (deptList) => {
|
|||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageIndex = 1
|
||||
queryParams.value.pageIndex = 1
|
||||
getPPEToolPageList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryParams.value.pageIndex = 1
|
||||
const resetQuery = () => {
|
||||
queryParams.value.pageIndex = 1
|
||||
queryParams.value.deptId = undefined
|
||||
queryParams.value.dependencyId = undefined
|
||||
queryParams.value.toolName = undefined
|
||||
|
@ -350,6 +350,12 @@ const handleDelete = (record) => {
|
|||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #4388ff;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
/* 限制行数 */
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
// cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -79,8 +79,18 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="headerTitle" v-if="ruleForm.labelId">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">申请信息</div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="100" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
|
@ -104,7 +114,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -114,7 +124,7 @@
|
|||
<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>
|
||||
|
@ -140,6 +150,7 @@ import { getBusDependencyPage } from "@/api/system/dependency"
|
|||
import { getSysSectionPage } from "@/api/system/section"
|
||||
import { submitBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getUserCertificateList } from "@/api/qualification/myQualifications"
|
||||
import { currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
|
||||
|
@ -255,6 +266,16 @@ const getSysSectionData = () => {
|
|||
})
|
||||
}
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: ruleForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 姓名选择事件
|
||||
const selectChanged = async (value) => {
|
||||
const curUser = allUsers.value.find(item => item.userId == value)
|
||||
|
@ -269,7 +290,9 @@ const selectChanged = async (value) => {
|
|||
ruleForm.value.dependencyId = curUser.dependencyId;
|
||||
ruleForm.value.escUserName = curUser.escUserName;
|
||||
|
||||
if (ruleForm.value.labelId) {
|
||||
if(curUser.workNo) getCurrentUserRecurrentTraining()
|
||||
|
||||
if (ruleForm.value.labelId) {
|
||||
requiredQualifications.value = qualificationsMap[ruleForm.value.labelId] || [];
|
||||
loading.value = true;
|
||||
const res = await getUserQualification();
|
||||
|
@ -279,7 +302,7 @@ const selectChanged = async (value) => {
|
|||
tableData.value = res.filter(item =>
|
||||
requiredQualifications.value.some(qualification =>
|
||||
item.qualificationName === qualification
|
||||
))
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,6 +357,11 @@ const handleCancel = () => {
|
|||
const handleSubmit = () => {
|
||||
proxy.$refs["ruleFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (userRecurrentTrainingData.value.length == 0) {
|
||||
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
if (qualificArr.length < requiredQualifications.value.length) {
|
||||
|
|
|
@ -79,8 +79,18 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="headerTitle" v-if="ruleForm.labelId">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">申请信息</div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="100" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
|
@ -104,7 +114,7 @@
|
|||
<template #default="scope">
|
||||
<span v-if="scope.row.startTime"> {{
|
||||
moment(scope.row.startTime).format('YYYY-MM-DD')
|
||||
}}</span>
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -114,7 +124,7 @@
|
|||
<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>
|
||||
|
@ -140,6 +150,7 @@ 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 { currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
|
||||
|
@ -272,6 +283,17 @@ const getSysSectionData = () => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({ workNo: ruleForm.value.workNo }).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 姓名选择事件
|
||||
const selectChanged = async (value) => {
|
||||
const curUser = allUsers.value.find(item => item.userId == value)
|
||||
|
@ -286,6 +308,8 @@ const selectChanged = async (value) => {
|
|||
ruleForm.value.dependencyId = curUser.dependencyId;
|
||||
ruleForm.value.escUserName = curUser.escUserName;
|
||||
|
||||
if (curUser.workNo) getCurrentUserRecurrentTraining()
|
||||
|
||||
if (ruleForm.value.labelId) {
|
||||
requiredQualifications.value = qualificationsMap[ruleForm.value.labelId] || [];
|
||||
loading.value = true;
|
||||
|
|
|
@ -59,8 +59,18 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="headerTitle" v-if="ruleForm.labelId">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">申请信息</div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="100" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
|
@ -115,6 +125,7 @@ import { getBusDependencyPage } from "@/api/system/dependency"
|
|||
import { getSysSectionPage } from "@/api/system/section"
|
||||
import { submitBusUserLabel } from "@/api/labelManage/labelManage"
|
||||
import { getCurrentUserList } from "@/api/qualification/myQualifications"
|
||||
import { currentUserRecurrentTraining } from "@/api/labelManage/labelManage"
|
||||
import moment from 'moment'
|
||||
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
@ -149,12 +160,13 @@ onMounted(() => {
|
|||
getBusDependencyData()
|
||||
getDeptTree()
|
||||
getSysSectionData()
|
||||
getCurrentUserRecurrentTraining()
|
||||
});
|
||||
// 获取当前登录用户详情
|
||||
const getUserInfos = () => {
|
||||
getUserInfo().then(response => {
|
||||
console.log('用户详情', response)
|
||||
if (response.code == 200) {
|
||||
if (response.code == 200) {
|
||||
ruleForm.value.node = 0
|
||||
ruleForm.value.userId = response.data.userId
|
||||
ruleForm.value.workNo = response.data.workNo
|
||||
|
@ -216,6 +228,16 @@ const getSysSectionData = () => {
|
|||
})
|
||||
}
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({}).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 申请标签选择
|
||||
const handleChoseLabl = async (val) => {
|
||||
loading.value = true;
|
||||
|
@ -270,19 +292,24 @@ const handleCancel = () => {
|
|||
const handleSubmit = () => {
|
||||
proxy.$refs["ruleFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
const qualificArr = tableData.value.filter(item=> item.certificateUrl)
|
||||
if (userRecurrentTrainingData.value.length == 0) {
|
||||
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
|
||||
return false;
|
||||
}
|
||||
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
if(qualificArr.length < requiredQualifications.value.length) {
|
||||
if (qualificArr.length < requiredQualifications.value.length) {
|
||||
proxy.$modal.msgError(`资质证书不全,请在"高压资质培训信息"上传资质证书!`)
|
||||
return false;
|
||||
}
|
||||
const qualificStateArr = tableData.value.filter(item=> item.status == 2)
|
||||
const qualificStateArr = tableData.value.filter(item => item.status == 2)
|
||||
console.log('是否有资质证书', qualificStateArr)
|
||||
if(qualificStateArr.length > 0) {
|
||||
if (qualificStateArr.length > 0) {
|
||||
proxy.$modal.msgError(`资质过期,请更新资质证书后再申请!`)
|
||||
return false;
|
||||
}
|
||||
ruleForm.value.qualificationCertificateIds = tableData.value.map(item=> item.id)
|
||||
ruleForm.value.qualificationCertificateIds = tableData.value.map(item => item.id)
|
||||
console.log('sdafasdfas', ruleForm.value)
|
||||
submitBusUserLabel(ruleForm.value).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
|
|
@ -59,8 +59,18 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="headerTitle" v-if="ruleForm.labelId">申请信息</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">今年复训信息</div>
|
||||
<el-table :data="userRecurrentTrainingData" style="width: 100%">
|
||||
<el-table-column prop="year" label="年度" align="center" />
|
||||
<el-table-column prop="workNo" label="工号" align="center" />
|
||||
<el-table-column prop="userName" label="员工姓名" />
|
||||
<el-table-column prop="state" label="复训状态" />
|
||||
<el-table-column prop="trainTime" label="复训时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="applyFormContainer" v-if="ruleForm.labelId">
|
||||
<div class="headerTitle">申请信息</div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="qualificationName" label="资质名称" width="100" />
|
||||
<el-table-column prop="certificateUrl" label="资质证书" align="center">
|
||||
|
@ -83,7 +93,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>
|
||||
|
@ -92,7 +102,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>
|
||||
|
@ -144,17 +154,18 @@ const tableData = ref([])
|
|||
const baseUrl = import.meta.env.VITE_APP_BASE_API
|
||||
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
onMounted(() => {
|
||||
getBusDependencyData()
|
||||
getDeptTree()
|
||||
getSysSectionData()
|
||||
});
|
||||
getCurrentUserRecurrentTraining()
|
||||
});
|
||||
|
||||
// 获取详情
|
||||
const getLableDetailInfo = (_id) => {
|
||||
getBusUserLabelDetail(_id).then(res => {
|
||||
if (res.code == 200) {
|
||||
ruleForm.value = res.data
|
||||
ruleForm.value = res.data
|
||||
ruleForm.value.node = 0
|
||||
tableData.value = res.data.userQualificationCertificateList
|
||||
console.log('标签详情', ruleForm.value)
|
||||
|
@ -210,6 +221,17 @@ const getSysSectionData = () => {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
const userRecurrentTrainingData = ref([])
|
||||
// 获取本人当年复训数据
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
currentUserRecurrentTraining({}).then(res => {
|
||||
if (res.code == 200) {
|
||||
userRecurrentTrainingData.value = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 申请标签选择
|
||||
const handleChoseLabl = async (val) => {
|
||||
loading.value = true;
|
||||
|
@ -264,19 +286,19 @@ const handleCancel = () => {
|
|||
const handleSubmit = () => {
|
||||
proxy.$refs["ruleFormRef"].validate(valid => {
|
||||
if (valid) {
|
||||
const qualificArr = tableData.value.filter(item=> item.certificateUrl)
|
||||
const qualificArr = tableData.value.filter(item => item.certificateUrl)
|
||||
console.log('是否有资质证书', qualificArr)
|
||||
if(qualificArr.length < requiredQualifications.value.length) {
|
||||
if (qualificArr.length < requiredQualifications.value.length) {
|
||||
proxy.$modal.msgError(`资质证书不全,请在"高压资质培训信息"上传资质证书!`)
|
||||
return false;
|
||||
}
|
||||
const qualificStateArr = tableData.value.filter(item=> item.status == 2)
|
||||
const qualificStateArr = tableData.value.filter(item => item.status == 2)
|
||||
console.log('是否有资质证书', qualificStateArr)
|
||||
if(qualificStateArr.length > 0) {
|
||||
if (qualificStateArr.length > 0) {
|
||||
proxy.$modal.msgError(`资质过期,请更新资质证书后再申请!`)
|
||||
return false;
|
||||
}
|
||||
ruleForm.value.qualificationCertificateIds = tableData.value.map(item=> item.id)
|
||||
ruleForm.value.qualificationCertificateIds = tableData.value.map(item => item.id)
|
||||
console.log('sdafasdfas', ruleForm.value)
|
||||
reApplyBusUserLabel(ruleForm.value).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
|
|
@ -67,8 +67,8 @@
|
|||
<el-avatar shape="square" :size="16" :src="jobNumberIcon" />
|
||||
</span>
|
||||
<span class="infoLable">资质名称</span>
|
||||
<span class="infoValue">CESC+LLP</span>
|
||||
</div>
|
||||
<span class="infoValue">{{ myLabel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-splitter-panel>
|
||||
|
@ -100,6 +100,8 @@ import QualificationTrain from './components/QualificationTrain.vue'
|
|||
import VehicleTrain from './components/VehicleTrain.vue'
|
||||
import QualificationApply from './components/QualificationApply.vue'
|
||||
import LableApply from './components/LableApply.vue'
|
||||
|
||||
import { getUserLabels } from "@/api/labelManage/labelManage"
|
||||
// import { addMenu, delMenu, getMenu, listMenu, updateMenu } from "@/api/system/menu"
|
||||
import { getUserInfo } from "@/api/system/user"
|
||||
import jobNumberIcon from '@/assets/images/job-number-icon.png'
|
||||
|
@ -110,6 +112,7 @@ const baseUrl = import.meta.env.VITE_APP_BASE_API
|
|||
// 初始化
|
||||
onMounted(() => {
|
||||
getUserInfos()
|
||||
getCurrentUserRecurrentTraining()
|
||||
});
|
||||
|
||||
// 获取当前登录用户详情
|
||||
|
@ -119,6 +122,15 @@ const getUserInfos = () => {
|
|||
if (response.code == 200) curUserInfo.value = response.data
|
||||
})
|
||||
}
|
||||
// 获取当前用户有效标签
|
||||
const myLabel = ref('-')
|
||||
const getCurrentUserRecurrentTraining = () => {
|
||||
getUserLabels().then(res => {
|
||||
if(res.code == 200) {
|
||||
myLabel.value = res.data ? res.data : '-'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 按钮组配置
|
||||
const ToolOptions = ref(['高压资质培训信息', '高压车型培训信息', '资质申请', '标签申请'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user