[add] 法规符合性评估库

This commit is contained in:
lideqin
2024-06-18 18:07:07 +08:00
parent d59c540c42
commit 5867a72ef6
8 changed files with 597 additions and 2 deletions
+9
View File
@@ -177,6 +177,15 @@ module.exports = {
successfullyDelete: '删除成功',
cannotAddAgain: '不能重复添加',
noFileAvailableForPreview: '暂无可预览的文件',
enterpriseStandard: '企业标准',
pleaseAtLeastSelectOneUser: '请至少选择一个用户',
next: '下一步',
marketRegulationsList: '市场法规清单',
transfer: '调取',
batchClose: '批量关闭',
clauseNo: '条款号',
clauseName: '条款名称',
clauseContent: '条款内容',
// 树右键
treeRight: {
addFolder: 'Create New Folder',
@@ -0,0 +1,34 @@
// 法规符合性评估库的所有翻译
module.exports = {
// 法规符合性评估库
assessmentLibrary: {
applicableMarket: '适用市场',
dateOfEvaluation: '评估日期',
exportName: '法规符合性评估库表',
clauseNumber: '条款号',
vehicleType: '车型',
evaluationResult: '评估结果',
responsibleDepartment: '责任部门',
appraiser: '评估人',
clauseContent: '条款内容',
modelStatus: '车型状态',
theStatusNotMeetRequirements: '不满足要求的现状',
rectificationPlan: '整改方案',
rectificationCycle: '整改周期',
rectificationCost: '整改费用',
sharedWithOtherProjects: '与其他项目共用性',
costOfThisItemAfterSharing: '共用后本项目所需费用',
supportingMaterial: '佐证材料'
},
// 不符合项库
nonmatchItem: {
vehicleType: '车型',
responsibleDepartment: '责任部门',
rectificationState: '整改状态',
pcrNumber: 'PCR编号',
modelStatus: '车型状态',
appraiser: '评估人',
problemType: '问题类型',
rectificationCompletionDate: '整改完成日期'
}
}
@@ -0,0 +1,34 @@
// 法规符合性评估库的所有翻译
module.exports = {
// 法规符合性评估库
assessmentLibrary: {
applicableMarket: '适用市场',
dateOfEvaluation: '评估日期',
exportName: '法规符合性评估库表',
clauseNumber: '条款号',
vehicleType: '车型',
evaluationResult: '评估结果',
responsibleDepartment: '责任部门',
appraiser: '评估人',
clauseContent: '条款内容',
modelStatus: '车型状态',
theStatusNotMeetRequirements: '不满足要求的现状',
rectificationPlan: '整改方案',
rectificationCycle: '整改周期',
rectificationCost: '整改费用',
sharedWithOtherProjects: '与其他项目共用性',
costOfThisItemAfterSharing: '共用后本项目所需费用',
supportingMaterial: '佐证材料'
},
// 不符合项库
nonmatchItem: {
vehicleType: '车型',
responsibleDepartment: '责任部门',
rectificationState: '整改状态',
pcrNumber: 'PCR编号',
modelStatus: '车型状态',
appraiser: '评估人',
problemType: '问题类型',
rectificationCompletionDate: '整改完成日期'
}
}
+7
View File
@@ -6,6 +6,7 @@ const businessSupport = require('./businessSupport/zh')
const projectLibrary = require('./projectLibrary/zh.js')
const dashboard = require('./dashboard/zh')
const workCenter = require('./workCenter/zh')
const regulatoryComplianceAssessmentDatabase = require('./regulatoryComplianceAssessmentDatabase/zh')
module.exports = {
// 共用
@@ -192,6 +193,10 @@ module.exports = {
next: '下一步',
marketRegulationsList: '市场法规清单',
transfer: '调取',
batchClose: '批量关闭',
clauseNo: '条款号',
clauseName: '条款名称',
clauseContent: '条款内容',
// 标准字段
standardField: {
standardEnglishName: '标准英文名称',
@@ -706,6 +711,8 @@ module.exports = {
dashboard,
// 工作中心
workCenter,
// 法规符合性评估库
regulatoryComplianceAssessmentDatabase,
onlineEditor: {
missRequireField: '缺少必填字段'
}
@@ -0,0 +1,173 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 标准编号 -->
<a-col :md="6" :sm="12">
<a-form-item :label="$t('standardNumber')">
<j-input
:placeholder="$t('pleaseEnter') + $t('standardNumber')"
v-model="queryParam.standardNumber"></j-input>
</a-form-item>
</a-col>
<!-- 标准名称 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('standardName')">
<j-input
:placeholder="$t('pleaseEnter') + $t('standardName')"
v-model="queryParam.standardName"></j-input>
</a-form-item>
</a-col>
<!-- 适用市场 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.applicableMarket')">
<j-dict-select-tag
:placeholder="$t('pleaseSelect') + $t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.applicableMarket')"
v-model="queryParam.applicableMarket"
dict-code="market_state"></j-dict-select-tag>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<!-- 评估日期 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.dateOfEvaluation')">
<a-range-picker
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-model="queryParam.dateOfEvaluation" />
</a-form-item>
</a-col>
</template>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<a @click="handleToggleSearch">
{{ toggleSearchStatus ? $t('putAway') : $t('open') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button type="primary" @click="searchQuery" icon="search">{{ $t('query') }}</a-button>
<a-button type="primary" ghost @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<div class="table-operator">
<!-- 导出 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls($t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.exportName'))">
{{ $t('export') }}
</a-button>
</div>
<!-- table区域-begin -->
<div>
<j-table
:can-drag="true"
:scroll="{x: '100%', y: yScrollHeight}"
ref="table"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- 标准编号标准名称 -->
<template v-slot:toDetail="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a class="link-a" @click="toDetail(record)">{{ text }}</a>
</a-tooltip>
</template>
</j-table>
</div>
<!-- table区域-end -->
<!-- 查看弹框 -->
<assessment-look-modal ref="assessmentLookModal"/>
</a-card>
</template>
<script>
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import AssessmentLookModal from './modules/AssessmentLookModal'
export default {
name: 'RegulatoryComplianceAssessmentList',
components: { JTable, AssessmentLookModal },
mixins: [JeroListMixin],
data () {
return {
columns: [
{ // 标准编号
title: this.$t('standardNumber'),
align: 'center',
width: 180,
dataIndex: 'standardNumber',
scopedSlots: { customRender: 'toDetail' }
},
{ // 标准名称
title: this.$t('standardName'),
align: 'center',
width: 180,
dataIndex: 'standardName',
scopedSlots: { customRender: 'toDetail' }
},
{ // 适用市场
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.applicableMarket'),
align: 'center',
width: 180,
dataIndex: 'applicableMarket',
scopedSlots: { customRender: 'text' }
},
{ // 评估日期
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.dateOfEvaluation'),
align: 'center',
width: 180,
dataIndex: 'dateOfEvaluation',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 170
}
],
operationList: [
// 查看
{
text: this.$t('view'),
clickEvent: 'handleLook',
has: ''
}
],
url: {
list: ''
}
}
},
methods: {
toDetail (record) {
},
// 查看
handleLook (record) {
this.$refs.assessmentLookModal.open(record)
}
}
}
</script>
<style scoped>
</style>
@@ -0,0 +1,338 @@
<template>
<j-modal
:title="title"
:maskClosable="true"
:width="1200"
:closable="true"
switchFullscreen
:footer="false"
@cancel="handleCancel"
:visible="visible">
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- 条款号 -->
<a-col :sm="8">
<a-form-item :label="$t('clauseNo')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:placeholder="$t('pleaseEnter') + $t('clauseNo')"
v-model="queryParam.clauseNo">
</a-input>
</a-form-item>
</a-col>
<!-- 车型 -->
<a-col :sm="8">
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.vehicleType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:placeholder="$t('pleaseEnter') + $t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.vehicleType')"
v-model="queryParam.vehicleType">
</a-input>
</a-form-item>
</a-col>
<!-- 评估结果 -->
<a-col :sm="8">
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.evaluationResult')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:placeholder="$t('pleaseEnter') + $t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.evaluationResult')"
v-model="queryParam.evaluationResult">
</a-input>
</a-form-item>
</a-col>
<!-- 责任部门 -->
<a-col :sm="8">
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.responsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.responsibleDepartment"
:maxTagCount="1"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + $t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.responsibleDepartment')"
treeCheckable
treeCheckStrictly
show-search
:filterTreeNode="filterTreeOption"
/>
</a-form-item>
</a-col>
<!-- 评估人 -->
<a-col :sm="8">
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.appraiser')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:placeholder="$t('pleaseEnter') + $t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.appraiser')"
v-model="queryParam.appraiser">
</a-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-button class="box-button" type="primary" icon="search" @click="searchQuery">{{ $t('query') }}</a-button>
<a-button class="box-button" icon="reload" style="margin-left: 8px" @click="searchReset">{{ $t('reset') }}</a-button>
</div>
</a-row>
</a-form>
</div>
<j-table
ref="table"
rowKey="id"
:can-drag="true"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:scroll="{x: '100%', y: 'calc(100vh - 500px)'}"
@change="handleTableChange">
<!-- 佐证材料 -->
<template v-slot:file="{text, record}">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<a v-if="text" class="link-a" @click="previewFile(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</j-table>
<!-- 预览图片的容器 -->
<div id="images">
<div class="image" v-viewer="{movable: false}">
<img v-show="image" :src="imageUrl">
</div>
</div>
</j-modal>
</template>
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import Vue from 'vue'
import { previewPdf } from '@/utils/previewPdf'
import { kkFilePreview } from '@/utils/kkFilePreview'
import { downloadFile, getFileAccessHttpUrl } from '@/api/manage'
import { queryDepartTreeList } from '../../../../api/api'
import JTable from '@/components/jero/JTable'
import { ACCESS_TOKEN } from '@/store/mutation-types'
// 支持预览的文件后缀
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
const FILE_TYPE_PDF = 'pdf'
export default {
name: 'AssessmentLookModal',
components: { JTable },
mixins: [JeroListMixin],
data () {
return {
title: this.$t('view'),
visible: true,
categoryTreeList: [], // 组织机构下拉框数据
columns: [
{
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 条款号
title: this.$t('clauseNo'),
align: 'center',
width: 180,
dataIndex: 'clauseNo',
scopedSlots: { customRender: 'text' }
},
{ // 条款内容
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.clauseContent'),
align: 'center',
width: 180,
dataIndex: 'clauseContent',
scopedSlots: { customRender: 'text' }
},
{ // 车型
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.vehicleType'),
align: 'center',
width: 180,
dataIndex: 'vehicleType',
scopedSlots: { customRender: 'text' }
},
{ // 车型状态
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.modelStatus'),
align: 'center',
width: 180,
dataIndex: 'modelStatus',
scopedSlots: { customRender: 'text' }
},
{ // 责任部门
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.responsibleDepartment'),
align: 'center',
width: 180,
dataIndex: 'responsibleDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 评估人
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.appraiser'),
align: 'center',
width: 180,
dataIndex: 'appraiser',
scopedSlots: { customRender: 'text' }
},
{ // 评估结果
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.evaluationResult'),
align: 'center',
width: 180,
dataIndex: 'evaluationResult',
scopedSlots: { customRender: 'text' }
},
{ // 不满足要求的现状
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.theStatusNotMeetRequirements'),
align: 'center',
width: 180,
dataIndex: 'theStatusNotMeetRequirements',
scopedSlots: { customRender: 'text' }
},
{ // 整改方案
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.rectificationPlan'),
align: 'center',
width: 180,
dataIndex: 'rectificationPlan',
scopedSlots: { customRender: 'text' }
},
{ // 整改周期
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.rectificationCycle'),
align: 'center',
width: 180,
dataIndex: 'rectificationCycle',
scopedSlots: { customRender: 'text' }
},
{ // 整改费用
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.rectificationCost'),
align: 'center',
width: 180,
dataIndex: 'rectificationCost',
scopedSlots: { customRender: 'text' }
},
{ // 与其他项目共用性
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.sharedWithOtherProjects'),
align: 'center',
width: 180,
dataIndex: 'sharedWithOtherProjects',
scopedSlots: { customRender: 'text' }
},
{ // 共用后本项目所需费用
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.costOfThisItemAfterSharing'),
align: 'center',
width: 180,
dataIndex: 'costOfThisItemAfterSharing',
scopedSlots: { customRender: 'text' }
},
{ // 备注
title: this.$t('remarks'),
align: 'center',
width: 180,
dataIndex: 'remarks',
scopedSlots: { customRender: 'text' }
},
{ // 佐证材料
title: this.$t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.supportingMaterial'),
align: 'center',
width: 180,
dataIndex: 'supportingMaterial',
scopedSlots: { customRender: 'file' }
}
],
disableMixinCreated: true,
image: false,
imageUrl: ''
}
},
mounted () {
this.getSysCategoryTree()
},
methods: {
open (record) {
this.visible = true
this.loadData()
},
// 获取组织机构树
getSysCategoryTree () {
queryDepartTreeList().then((res) => {
if (res.success) {
this.categoryTreeList = res.result
} else {
this.categoryTreeList = []
}
})
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
previewFile (record) {
// 截取文件后缀名
const fileSuffix = record.fileId_dictText ? record.fileId_dictText.split('.')[record.fileId_dictText.split('.').length - 1].toLowerCase() : ''
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
// 判断是否为可预览格式的文件
if (!canPreview) {
this.$message.loading('该文件类型不支持预览,正在为您准备下载...').then(() => {
this.handleDownload(record)
})
return
}
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.fileId}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileId_dictText}`
// 图片预览,使用自己添加的组件
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
this.imageUrl = getFileAccessHttpUrl(record.fileId)
// 获取viewer实例
const viewer = this.$el.querySelector('.image').$viewer
// 调用show方法进行显示预览图
viewer.show()
// this.$refs.imagePreviewModal.open(file)
return
}
// pdf预览
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
const url = previewPdf(record.fileId)
window.open(url)
return
}
// 其余可预览文件仍使用KKFile进行预览
kkFilePreview(fileFullUrl)
},
// 下载
handleDownload (record) {
// 下载文件
downloadFile(`/sys/common/download/${record.fileId}`, record.fileId_dictText)
},
handleCancel () {
this.close()
},
close () {
this.visible = false
this.queryParam = {}
this.ipagination = {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + total + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
}
}
}
}
</script>
<style scoped>
</style>
@@ -138,7 +138,7 @@ export default {
dataIndex: 'listNumber',
scopedSlots: { customRender: 'toDetail' }
},
{ // 清单编号
{ // 清单名称
title: this.$t('standardRegulationLibrary.marketRegulationsList.listName'),
align: 'center',
width: 180,
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<j-modal
v-model="show"
:visible="show"
:width="900"
:keyboard="false"
:closable="false"