修复问题

This commit is contained in:
wangchengming 2025-08-04 13:45:19 +08:00
parent f853632424
commit caf41c9a1a
10 changed files with 110 additions and 28 deletions

View File

@ -39,4 +39,13 @@ export function deleteBusPpeTools(ppeId) {
url: '/admin/busPpeTools/deleteBusPpeTools/' + ppeId,
method: 'post'
})
}
// 公用下载文件接口
export function downFile(fileName) {
return request({
url: '/common/download?fileName='+ encodeURIComponent(fileName),
method: 'get',
responseType: 'blob'
})
}

View File

@ -161,7 +161,7 @@ onBeforeUnmount(() => {
//
const isLink = (msgType) => {
return [10, 20, 30, 40, 50].includes(msgType)
return [10, 20, 22, 30, 32, 40, 42, 50].includes(msgType)
}
@ -278,10 +278,16 @@ const handleOpenLink = (messageId, msgType) => {
if (msgType == 10) router.push('/system/userApproval')
// esc
if (msgType == 20) router.push('/qualification/qualificationEscApproval')
//
if (msgType == 22) router.push('/qualification/trainApproval')
// esc
if (msgType == 30) router.push('/labelManage/escApproval')
//
if (msgType == 32) router.push('/labelManage/adminApproval')
// esc
if (msgType == 40) router.push('/safetyReview/examinerEscTask')
//
if (msgType == 42) router.push('/safetyReview/examinerApproval')
// esc
if (msgType == 50) router.push('/ppeTool')
closeMessage()
@ -543,12 +549,12 @@ function toggleTheme() {
}
:deep(.el-dialog__body) {
max-height: 760px !important;
// max-height: 760px !important;
padding: 0 !important;
color: var(--el-text-color-regular);
font-size: var(--el-dialog-content-font-size);
word-break: break-all;
overflow-y: auto;
// overflow-y: auto;
}
.cursor-pointer {
@ -575,6 +581,8 @@ function toggleTheme() {
list-style: none;
padding: 0px !important;
margin: 6px 0px;
max-height: 710px;
overflow-y: auto;
}
.message-item {

View File

@ -33,7 +33,7 @@
<div class="section-title">相关文档</div>
<ul class="resource-list">
<li v-for="(doc, index) in docUploadList" :key="'doc-' + index"
class="resource-link">
class="resource-link" @click="handleDownFile(doc.name, doc.name)">
<span class="documentIcon">#</span>
<span class="documentName">{{ doc.name }}</span>
</li>
@ -64,7 +64,7 @@
<script setup>
import { onMounted, reactive, ref } from 'vue'
import { getBusEncyclopediaDatabase } from "@/api/databaseLibary"
// import { DocumentText as DocumentIcon, Link as LinkIcon } from '@element-plus/icons-vue';
import { downFile } from "@/api/ppeTool"
const route = useRoute()
const levelList = ref([
@ -100,6 +100,18 @@ const getDetailInfo = (id) => {
}
})
}
const handleDownFile = (fileName, downLoadName) => {
downFile(fileName).then(res => {
// a
const a = document.createElement('a')
a.href = URL.createObjectURL(res)
// adownload
a.setAttribute('download', downLoadName)
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
})
}
</script>
<style lang='scss'>

View File

@ -54,7 +54,7 @@
:label="item.label" :value="item.value" @change="handleChangeTwoType(item.value)" />
</el-checkbox-group>
</el-form-item>
<el-form-item label="组织架构图" prop="organPic" v-show="ruleForm.category == '组织架构'">
<el-form-item label="组织架构图" :prop="ruleForm.category == '组织架构' ? 'organPic' : null" v-show="ruleForm.category == '组织架构'">
<myFileUpload ref="organPicRef" @set-form-file="handleSetorganPic" />
</el-form-item>
<el-form-item label="正文内容" prop="mainText">
@ -99,20 +99,17 @@
<template #default="scope">
<div v-show="!scope.row.editFlag">
<el-button link type="primary"
@click="handleEditClick(scope.row, scope.$index)"
v-hasPermi="['system:config:edit']">编辑</el-button>
@click="handleEditClick(scope.row, scope.$index)">编辑</el-button>
<el-divider direction="vertical" class="verticalLine" />
<el-button link type="primary" @click="handleRemove(scope.$index)"
v-hasPermi="['system:config:remove']">删除</el-button>
<el-button link type="primary"
@click="handleRemove(scope.$index)">删除</el-button>
</div>
<div v-show="scope.row.editFlag">
<el-button link type="primary"
@click="handleSaveClick(scope.row, scope.$index)"
v-hasPermi="['system:config:edit']">保存</el-button>
@click="handleSaveClick(scope.row, scope.$index)">保存</el-button>
<el-divider direction="vertical" class="verticalLine" />
<el-button link type="primary"
@click="handleCancelClick(scope.row, scope.$index)"
v-hasPermi="['system:config:remove']">取消</el-button>
@click="handleCancelClick(scope.row, scope.$index)">取消</el-button>
</div>
</template>
</el-table-column>
@ -366,10 +363,15 @@ const handleCancel = () => {
})
}
const handleSubmit = () => {
console.log('提交', ruleForm.value)
proxy.$refs["ruleFormRef"].validate(valid => {
console.log('提交valid', valid)
if (valid) {
console.log('提交', ruleForm.value)
ruleForm.value.fileContent = JSON.stringify(docUploadList.value)
ruleForm.value.encyclopediaDatabaseLinkList = showTableData.value
console.log('提交', ruleForm.value)
if (ruleForm.value.id != undefined) {
updateBusEncyclopediaDatabase(ruleForm.value).then(response => {
proxy.$modal.msgSuccess("修改成功")

View File

@ -65,7 +65,8 @@
</el-table-column>
<el-table-column prop="fileContent" label="标定信息" min-width="360">
<template #default="scope">
<div v-for="item in JSON.parse(scope.row.fileContent)" class="fileLink"> {{ item.name }} </div>
<div v-for="item in JSON.parse(scope.row.fileContent)" class="fileLink" @click="handleDownFile(item.url, item.name)">
{{ item.name }} </div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="130" v-hasPermi="['ppeTool:edit']">
@ -90,7 +91,7 @@ import Breadcrumb from '@/components/Breadcrumb'
import addIcon from '@/assets/images/addIcon.png'
import { customerDeptTreeSelect } from "@/api/system/user"
import { getBusDependencyPage } from "@/api/system/dependency"
import { busPpeToolsPageList, deleteBusPpeTools } from "@/api/ppeTool"
import { busPpeToolsPageList, deleteBusPpeTools, downFile } from "@/api/ppeTool"
import moment from 'moment'
const router = useRouter()
@ -190,6 +191,18 @@ const handleDelete = (record) => {
proxy.$modal.msgSuccess("删除成功")
}).catch(() => { })
}
const handleDownFile = (fileName, downLoadName) => {
downFile(fileName).then(res => {
// a
const a = document.createElement('a')
a.href = URL.createObjectURL(res)
// adownload
a.setAttribute('download', downLoadName)
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
})
}
</script>
<style lang='scss'>
.app-main {
@ -356,6 +369,6 @@ const handleDelete = (record) => {
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
// cursor: pointer;
cursor: pointer;
}
</style>

View File

@ -114,7 +114,7 @@
<template #default="scope">
<span v-if="scope.row.startTime"> {{
moment(scope.row.startTime).format('YYYY-MM-DD')
}}</span>
}}</span>
<span v-else>-</span>
</template>
</el-table-column>
@ -124,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>
@ -290,7 +290,7 @@ const selectChanged = async (value) => {
ruleForm.value.dependencyId = curUser.dependencyId;
ruleForm.value.escUserName = curUser.escUserName;
if(curUser.workNo) getCurrentUserRecurrentTraining()
if (curUser.workNo) getCurrentUserRecurrentTraining()
if (ruleForm.value.labelId) {
requiredQualifications.value = qualificationsMap[ruleForm.value.labelId] || [];
@ -361,6 +361,11 @@ const handleSubmit = () => {
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
return false;
}
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
if (passTrainRecord.length == 0) {
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
return false;
}
const qualificArr = tableData.value.filter(item => item.certificateUrl)
console.log('是否有资质证书', qualificArr)

View File

@ -114,7 +114,7 @@
<template #default="scope">
<span v-if="scope.row.startTime"> {{
moment(scope.row.startTime).format('YYYY-MM-DD')
}}</span>
}}</span>
<span v-else>-</span>
</template>
</el-table-column>
@ -124,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>
@ -376,6 +376,16 @@ const handleCancel = () => {
const handleSubmit = () => {
proxy.$refs["ruleFormRef"].validate(valid => {
if (valid) {
if (userRecurrentTrainingData.value.length == 0) {
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
return false;
}
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
if (passTrainRecord.length == 0) {
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
return false;
}
const qualificArr = tableData.value.filter(item => item.certificateUrl)
console.log('是否有资质证书', qualificArr)
if (qualificArr.length < requiredQualifications.value.length) {

View File

@ -93,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>
@ -102,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>
@ -296,6 +296,11 @@ const handleSubmit = () => {
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
return false;
}
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
if (passTrainRecord.length == 0) {
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
return false;
}
const qualificArr = tableData.value.filter(item => item.certificateUrl)
console.log('是否有资质证书', qualificArr)

View File

@ -93,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>
@ -102,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>
@ -287,6 +287,16 @@ const handleCancel = () => {
const handleSubmit = () => {
proxy.$refs["ruleFormRef"].validate(valid => {
if (valid) {
if (userRecurrentTrainingData.value.length == 0) {
proxy.$modal.msgError(`未找到您的复训信息,不能提交申请!`)
return false;
}
const passTrainRecord = userRecurrentTrainingData.value.filter(item => item.state == '通过')
if (passTrainRecord.length == 0) {
proxy.$modal.msgError(`您今年的复训未通过,不能提交申请!`)
return false;
}
const qualificArr = tableData.value.filter(item => item.certificateUrl)
console.log('是否有资质证书', qualificArr)
if (qualificArr.length < requiredQualifications.value.length) {

View File

@ -48,6 +48,12 @@
<el-text v-if="scope.row.level == 4" type="danger" class="yxText">优秀项</el-text>
</template>
</el-table-column>
<el-table-column prop="correctionFlag" label="是否整改" align="center" width="120">
<template #default="scope">
<el-text v-if="scope.row.correctionFlag == 1" type="danger" class="dangerText"></el-text>
<el-text v-if="scope.row.correctionFlag == 0" type="danger" class="successText"></el-text>
</template>
</el-table-column>
<el-table-column prop="planDoneTime" label="计划完成时间" width="150">
<template #default="scope">
<span v-if="scope.row.planDoneTime"> {{ scope.row.planDoneTime }}</span>
@ -64,11 +70,13 @@
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="100">
<template #default="scope">
<el-button type="primary" v-if="(scope.row.state == 0 || scope.row.state == 9) && scope.row.correctionFlag == 1" text
<el-button type="primary"
v-if="(scope.row.state == 0 || scope.row.state == 9) && scope.row.correctionFlag == 1" text
class="replayTextBtn" v-hasPermi="['examinerEscTask:correction']"
@click="handleCorrection(scope.row)">立即整改</el-button>
<el-button type="primary" v-if="scope.row.state == 1 || scope.row.state == 2 || scope.row.correctionFlag == 0" text
<el-button type="primary"
v-if="scope.row.state == 1 || scope.row.state == 2 || scope.row.correctionFlag == 0" text
class="replayTextBtn" v-hasPermi="['examinerEscTask:viewDetail']"
@click="handleView(scope.row)">查看</el-button>
</template>