[add] 市场法规清单新增

This commit is contained in:
lideqin
2024-06-17 14:24:49 +08:00
parent 70a0c024b6
commit c0b2227819
8 changed files with 1151 additions and 45 deletions
+5
View File
@@ -132,6 +132,9 @@ const getFileInfo = (params) => getAction('/sys/oss/file/queryById', params)
// 标准选择框,分页查询标准数据
const getStandardList = (params) => getAction('/laws/standard/common/getManyStandardSelectionBox', params)
// 市场法规清单选择框,分页查询数据(无权限)
const getMarketRegulationsList = (params) => getAction('', params)
// 内部工作组,左侧树查询
const getWorkGroupTreeList = (params) => getAction('/sys/lawsWorkingGroup/list', params)
@@ -232,6 +235,8 @@ export {
getStandardList,
getMarketRegulationsList,
getWorkGroupTreeList,
getEnterpriseLevelMapList,
@@ -106,5 +106,26 @@ module.exports = {
rectifyFinishingDate: '整改完成日期',
viewMarketList: '查看市场清单',
viewTroubleshootingResults: '查看排查结果'
}
},
// 市场清单详情列表字段
marketListField: {
standardEnglishName: '标准英文名称',
newProductionVehicleImplementationDate: '新生产车实施日期',
newCertifiedVehicleImplementationDate: '新认证车实施日期',
dateOfRegistration: '注册日期',
applicableCountryRegion: '适用国家/地区',
applicableVehicleType: '适用车型',
authenticationObject: '认证对象',
certifiedDeliverables: '认证交付物',
type: '类型',
dynamicType: '动力类型',
mainControlDepartment: '主控部门',
masterControlDepartmentProfessionalModule: '主控部门专业模块',
relatedDepartment: '关联部门',
associateDepartmentSpecializedModules: '关联部门专业模块',
batchRestriction: '批量限制',
automaticDrivingLevel: '自动驾驶等级',
requirementType: '要求类型',
},
}
+4 -21
View File
@@ -201,27 +201,6 @@ module.exports = {
applicableCountryRegion: '适用国家/地区',
applicableVehicleType: '适用车型'
},
// 市场清单详情列表字段
marketListField: {
standardEnglishName: '标准英文名称',
newProductionVehicleImplementationDate: '新生产车实施日期',
newCertifiedVehicleImplementationDate: '新认证车实施日期',
dateOfRegistration: '注册日期',
applicableCountryRegion: '适用国家/地区',
applicableVehicleType: '适用车型',
authenticationObject: '认证对象',
certifiedDeliverables: '认证交付物',
type: '类型',
dynamicType: '动力类型',
mainControlDepartment: '主控部门',
masterControlDepartmentProfessionalModule: '主控部门专业模块',
relatedDepartment: '关联部门',
associateDepartmentSpecializedModules: '关联部门专业模块',
batchRestriction: '批量限制',
automaticDrivingLevel: '自动驾驶等级',
requirementType: '要求类型',
},
// 树右键
treeRight: {
addFolder: '新增文件夹',
@@ -625,6 +604,10 @@ module.exports = {
textState: '标准状态',
evaluationState: '评估状态'
},
// 市场法规清单选择器
marketRegulationsListSelect: {
marketRegulationsListSelection: '市场法规清单选择'
},
// 条款选择器
clauseSelect: {
selectClause: '选择条款',
@@ -0,0 +1,134 @@
<template>
<div class="selection-wrapper">
<div class="box-title-text">
<a-input class="box-input"
:value="nameStr || value"
:title="value"
@input="indexClick($event)"
:disabled="disabled || selectOnly"
:max-length="500"
:placeholder="placeholder">
<a-icon v-if="(nameStr || value) && !disabled" slot="suffix" class="close-icon" type="close-circle" theme="filled" @click="clearInput" />
</a-input>
<a-button v-if="!disabled" type="primary" class="button-box" @click="listClick">
{{ $t('marketRegulationsListSelect.marketRegulationsListSelection') }}
</a-button>
</div>
<market-regulations-list-selection-modal
ref="marketRegulationsListSelectionModal"
v-bind="$attrs"
:value="value"
@change="modalInput"
@nameChange="modalNameChange"
@listChange="modalListChange">
</market-regulations-list-selection-modal>
</div>
</template>
<script>
import MarketRegulationsListSelectionModal from './MarketRegulationsListSelectionModal'
export default {
name: 'MarketRegulationsListSelection',
components: { MarketRegulationsListSelectionModal },
props: {
value: {
type: String,
default: ''
},
placeholder: {
type: String,
default: ''
},
disabled: {
type: Boolean,
default: false
},
// 是否只能选择
selectOnly: {
type: Boolean,
required: false,
default: false
},
// 自定义点击标准选择按钮的事件
customClickFunc: {
type: Function
},
// 回显内容的字符串
nameStr: {
type: String,
required: false,
default: null
}
},
methods: {
// 点击选择法规清单按钮
listClick () {
if (this.customClickFunc && typeof this.customClickFunc === 'function') {
this.customClickFunc(() => {
this.$refs.marketRegulationsListSelectionModal.open()
})
return
}
this.$refs.marketRegulationsListSelectionModal.open()
},
// 清空输入框
clearInput () {
console.log('输入框清空了')
this.$emit('change', '')
this.$emit('nameChange', '')
this.$emit('listChange', [])
},
// 输入框输入监听
indexClick (event) {
this.$emit('change', event.target.value)
},
modalInput (value) {
this.$emit('change', value)
},
modalNameChange (value) {
this.$emit('nameChange', value)
},
modalListChange (value) {
this.$emit('listChange', value)
}
},
model: {
prop: 'value',
event: 'change'
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.selection-wrapper {
height: 40px;
line-height: 40px;
}
.box-title-text {
height: 100%;
display: flex;
align-items: center;
.box-input {
width: 100%;
}
.button-box {
margin-left: 10px;
}
}
.close-icon {
font-size: 12px;
color: rgba(0, 0, 0, 0.25);
transition: color 0.3s;
}
.close-icon:hover {
color: rgba(0, 0, 0, 0.45);
}
</style>
@@ -0,0 +1,369 @@
<template>
<a-drawer
:title="$t('marketRegulationsListSelect.marketRegulationsListSelection')"
:maskClosable="false"
:width="1000"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
class="custom-drawer-style">
<div class="custom-drawer-style-scroll">
<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('standardRegulationLibrary.marketRegulationsList.listNumber')">
<j-input
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listNumber')"
v-model="queryParam.listNumber"></j-input>
</a-form-item>
</a-col>
<!-- 清单名称 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.listName')">
<j-input
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.listName')"
v-model="queryParam.listName"></j-input>
</a-form-item>
</a-col>
<!-- 国家/地区 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.countryRegion')">
<j-dict-select-tag
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.countryRegion')"
v-model="queryParam.countryRegion"
dict-code="market_state"></j-dict-select-tag>
</a-form-item>
</a-col>
<!-- 驾驶位置 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.drivingPosition')">
<j-dict-select-tag
:placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketRegulationsList.drivingPosition')"
v-model="queryParam.drivingPosition"
dict-code="driving_position"></j-dict-select-tag>
</a-form-item>
</a-col>
<!-- 作者 -->
<a-col :md="6" :sm="8">
<a-form-item :label="$t('standardRegulationLibrary.marketRegulationsList.author')">
<j-input
:placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketRegulationsList.author')"
v-model="queryParam.author"></j-input>
</a-form-item>
</a-col>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<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>
<a-table
:columns="columns"
rowKey="standardNumber"
:scroll="{x: 900}"
:data-source="dataList"
:pagination="ipagination"
:row-selection="{ type: type, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:loading="loading"
@change="handleTableChange">
<template slot="text" slot-scope="text">
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
<div class="table-text">{{ text || text === 0 ? text : global.emptyLine }}</div>
</a-tooltip>
</template>
<!-- 清单编号/清单名称 -->
<template v-slot:toDetail="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="handleGoDetail(record)">{{ text }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</a-tooltip>
</template>
</a-table>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{ $t('submit') }}</a-button>
</div>
</a-drawer>
</template>
<script>
import JDictSelectTag from '../dict/JDictSelectTag'
import { StandardSource } from '../../enums/commonEnums'
import { getMarketRegulationsList } from '@/api/api'
export default {
name: 'MarketRegulationsListSelectionModal',
components: { JDictSelectTag },
props: {
value: {
type: String,
default: ''
},
type: {
type: String,
required: false,
default: 'checkbox'
},
// 列表数据不包含的标准
excludeStandardNumbers: {
type: String,
required: false,
default: null
},
// 过滤条件
filters: {
type: Object,
required: false,
default: () => {
return {}
}
}
},
data () {
return {
visible: false,
confirmLoading: false,
labelCol: {
sm: 8
},
wrapperCol: {
sm: 14
},
selectedRowKeys: [],
selectedRowList: [],
loading: false,
queryParam: {},
/* 分页参数 */
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
},
columns: [
{ // 国家/地区
title: this.$t('standardRegulationLibrary.marketRegulationsList.countryRegion'),
align: 'center',
width: 180,
dataIndex: 'countryRegion',
scopedSlots: { customRender: 'text' }
},
{ // 清单编号
title: this.$t('standardRegulationLibrary.marketRegulationsList.listNumber'),
align: 'center',
width: 180,
dataIndex: 'listNumber',
scopedSlots: { customRender: 'toDetail' }
},
{ // 清单编号
title: this.$t('standardRegulationLibrary.marketRegulationsList.listName'),
align: 'center',
width: 180,
dataIndex: 'listName',
scopedSlots: { customRender: 'toDetail' }
},
{ // 驾驶位置
title: this.$t('standardRegulationLibrary.marketRegulationsList.drivingPosition'),
align: 'center',
width: 180,
dataIndex: 'drivingPosition',
scopedSlots: { customRender: 'text' }
},
{ // 清单版本
title: this.$t('standardRegulationLibrary.marketRegulationsList.listVersion'),
align: 'center',
width: 180,
dataIndex: 'listVersion',
scopedSlots: { customRender: 'text' }
},
{ // 发布时间
title: this.$t('standardRegulationLibrary.marketRegulationsList.releaseTime'),
align: 'center',
width: 180,
dataIndex: 'releaseTime',
scopedSlots: { customRender: 'text' }
},
{ // 作者
title: this.$t('standardRegulationLibrary.marketRegulationsList.author'),
align: 'center',
width: 180,
dataIndex: 'author',
scopedSlots: { customRender: 'text' }
},
{ // 清单状态
title: this.$t('standardRegulationLibrary.marketRegulationsList.listState'),
align: 'center',
width: 180,
dataIndex: 'listState',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 170
}
],
dataList: []
}
},
methods: {
open () {
this.visible = true
this.queryParam = {}
this.$nextTick(() => {
this.replacePage()
})
},
// 获取表格数据
replacePage (arg) {
if (arg === 1) {
this.ipagination.current = 1
}
const query = {
...this.queryParam,
...this.filters,
pageNo: this.ipagination.current,
pageSize: this.ipagination.pageSize,
excludeStandardNumbers: this.excludeStandardNumbers
}
// this.selectedRowKeys = []
this.loading = true
getMarketRegulationsList(query).then((res) => {
if (res.success) {
this.dataList = res.result.records
this.ipagination.total = res.result.total
this.selectedRowKeys = this.value ? this.value.split(',') : (this.selectedRowKeys || [])
} else {
this.dataList = []
}
}).finally(() => {
this.loading = false
})
},
searchQuery () {
this.replacePage(1)
},
searchReset () {
// 如果禁用来源,就不重置来源
if (this.disabledSourceSearch) {
this.queryParam = {}
} else {
this.queryParam = {}
}
this.replacePage(1)
},
// 表格选择改变
onSelectChange (selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
// this.selectedRowList = row
if (this.type === 'checkbox') {
if (selectedRowKeys.length > this.selectedRowList.length) {
// 说明是增加了数据
for (const rowIndex in selectedRows) {
if (!this.selectedRowList.find(item => item.standardNumber === selectedRows[rowIndex].standardNumber)) {
// 不存在,追加
this.selectedRowList.push(selectedRows[rowIndex])
}
}
} else {
// 说明是删除了数据
if (selectedRowKeys && selectedRowKeys.length > 0) {
// 没有选中数据,说明这一页没有选中数据了
for (let i = 0; i < this.selectedRowList.length; i++) {
if (!selectedRowKeys.find(item => item === this.selectedRowList[i].standardNumber)) {
// 表格选中中没有找到这一条数据,说明已经被删了
this.selectedRowList.splice(i, 1)
i--
}
}
} else {
this.selectedRowList = []
}
}
console.log(this.selectedRowList)
} else {
this.selectedRowList = selectedRows
}
},
handleTableChange (pagination) {
// 分页、排序、筛选变化时触发
this.ipagination = pagination
this.replacePage()
},
handleCancel () {
this.close()
},
handleSubmit () {
const serialNumber = []
const serialNameArr = []
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.selectedRowList.forEach(res => {
serialNumber.push(res.standardNumber)
serialNameArr.push(res.standardName)
})
this.$emit('change', this.selectedRowKeys.join(','))
this.$emit('nameChange', serialNameArr.join(','))
this.$emit('listChange', this.selectedRowList)
this.close()
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
close () {
this.visible = false
this.selectedRowKeys = []
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
}
},
handleTypeChange () {
this.$forceUpdate()
},
// 点击跳转标准详情
handleGoDetail (record) {
let path = ''
this.$openPageNewSheet({
path: path,
query: {
id: record.id
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,281 @@
<template>
<internal-detail-page :title="$route.query.title" :content-padding="0" :loading="loading">
<div class="content-wrapper">
<a-row>
<!-- 国家/地区 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.countryRegion') }}</label>
<span>{{ model.countryRegion }}</span>
</a-col>
<!-- 清单编号 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.listNumber') }}</label>
<span>{{ model.listNumber }}</span>
</a-col>
<!-- 清单名称 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.listName') }}</label>
<span>{{ model.listName }}</span>
</a-col>
<!-- 驾驶位置 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.drivingPosition') }}</label>
<span>{{ model.drivingPosition }}</span>
</a-col>
<!-- 密级 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.securityClass') }}</label>
<span>{{ model.securityClass }}</span>
</a-col>
<!-- 清单说明 -->
<a-col :span="12">
<label>{{ $t('standardRegulationLibrary.marketRegulationsList.listDeclaration') }}</label>
<span>{{ model.listDeclaration }}</span>
</a-col>
<!-- 附件 -->
<a-col :span="12">
<label>{{ $t('attach') }}</label>
<file-echo :fileIds="model.attach"/>
</a-col>
</a-row>
<!-- 市场法规清单 -->
<div class="process-part-title">{{ $t('marketRegulationsList') }}</div>
<!-- 查询区域 -->
<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>
<div style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
<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>
<!-- 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>
<template v-slot:action="{text, record}">
<a @click="handleEdit(record)">{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record.id)" class="table-ope-btn">{{ $t('delete') }}</a>
</template>
</j-table>
</div>
<!-- table区域-end -->
</div>
</internal-detail-page>
</template>
<script>
import InternalDetailPage from '../../../components/InternalDetailPage'
import FileEcho from '../../../components/FileEcho'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
export default {
name: 'MarketRegulationsDetailPage',
components: { InternalDetailPage, FileEcho },
mixins: [JeroListMixin],
data () {
return {
model: {},
columns: [
{ // 序号
title: this.$t('serialNumber'),
dataIndex: '',
key: 'rowIndex',
align: 'center',
width: 80,
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
{ // 标准编号
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('standardRegulationLibrary.marketListField.standardEnglishName'),
align: 'center',
width: 180,
dataIndex: 'standardEnglishName',
scopedSlots: { customRender: 'text' }
},
{ // 新生产车实施日期
title: this.$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate'),
align: 'center',
width: 180,
dataIndex: 'newProductionVehicleImplementationDate',
scopedSlots: { customRender: 'text' }
},
{ // 新认证车实施日期
title: this.$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate'),
align: 'center',
width: 180,
dataIndex: 'newCertifiedVehicleImplementationDate',
scopedSlots: { customRender: 'text' }
},
{ // 注册日期
title: this.$t('standardRegulationLibrary.marketListField.dateOfRegistration'),
align: 'center',
width: 180,
dataIndex: 'dateOfRegistration',
scopedSlots: { customRender: 'text' }
},
{ // 适用国家/地区
title: this.$t('standardRegulationLibrary.marketListField.applicableCountryRegion'),
align: 'center',
width: 180,
dataIndex: 'applicableCountryRegion',
scopedSlots: { customRender: 'text' }
},
{ // 适用车型
title: this.$t('standardRegulationLibrary.marketListField.applicableVehicleType'),
align: 'center',
width: 180,
dataIndex: 'applicableVehicleType',
scopedSlots: { customRender: 'text' }
},
{ // 认证对象
title: this.$t('standardRegulationLibrary.marketListField.authenticationObject'),
align: 'center',
width: 180,
dataIndex: 'authenticationObject',
scopedSlots: { customRender: 'text' }
},
{ // 认证交付物
title: this.$t('standardRegulationLibrary.marketListField.certifiedDeliverables'),
align: 'center',
width: 180,
dataIndex: 'certifiedDeliverables',
scopedSlots: { customRender: 'text' }
},
{ // 类型
title: this.$t('standardRegulationLibrary.marketListField.type'),
align: 'center',
width: 180,
dataIndex: 'type',
scopedSlots: { customRender: 'text' }
},
{ // 动力类型
title: this.$t('standardRegulationLibrary.marketListField.dynamicType'),
align: 'center',
width: 180,
dataIndex: 'dynamicType',
scopedSlots: { customRender: 'text' }
},
{ // 主控部门
title: this.$t('standardRegulationLibrary.marketListField.mainControlDepartment'),
align: 'center',
width: 180,
dataIndex: 'mainControlDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 主控部门专业模块
title: this.$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule'),
align: 'center',
width: 180,
dataIndex: 'masterControlDepartmentProfessionalModule',
scopedSlots: { customRender: 'text' }
},
{ // 关联部门
title: this.$t('standardRegulationLibrary.marketListField.relatedDepartment'),
align: 'center',
width: 180,
dataIndex: 'relatedDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 关联部门专业模块
title: this.$t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules'),
align: 'center',
width: 180,
dataIndex: 'associateDepartmentSpecializedModules',
scopedSlots: { customRender: 'text' }
},
{ // 批量限制
title: this.$t('standardRegulationLibrary.marketListField.batchRestriction'),
align: 'center',
width: 180,
dataIndex: 'batchRestriction',
scopedSlots: { customRender: 'text' }
},
{ // 自动驾驶等级
title: this.$t('standardRegulationLibrary.marketListField.automaticDrivingLevel'),
align: 'center',
width: 180,
dataIndex: 'automaticDrivingLevel',
scopedSlots: { customRender: 'text' }
},
{ // 要求类型
title: this.$t('standardRegulationLibrary.marketListField.requirementType'),
align: 'center',
width: 180,
dataIndex: 'requirementType',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
fixed: 'right',
width: 170
}
]
}
}
}
</script>
<style scoped>
</style>
@@ -124,9 +124,8 @@
<!-- 批量删除 -->
<a-button icon="delete" type="primary" ghost @click="batchDel">{{ $t('batchDelete') }}</a-button>
<!-- 导入 -->
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
:data="importData" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="download" ghost @click="handleImport">{{ $t('import') }}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button icon="download" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 模板下载 -->
<a-button type="primary" icon="download" ghost
@@ -175,6 +174,13 @@
<!-- 提交 -->
<a-button type="primary" :loading="loading" @click="handleSubmit">{{ $t('submit') }}</a-button>
</div>
<!-- 新增编辑弹框 -->
<market-regulations-modal ref="marketRegulationsModal" @ok="modalFormOk"/>
<!-- 调取弹框 -->
<standard-selection-modal ref="transferModal" @ok="transferOk"/>
<!-- 复制弹框 -->
<market-regulations-list-selection-modal ref="copyModal" @ok="copyOk"/>
</internal-detail-page>
</template>
@@ -182,10 +188,13 @@
import InternalDetailPage from '@/components/InternalDetailPage'
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '../../../mixins/JeroListMixin'
import MarketRegulationsModal from './modules/MarketRegulationsModal'
import StandardSelectionModal from '../../../components/selection/StandardSelectionModal'
import MarketRegulationsListSelectionModal from '../../../components/selection/MarketRegulationsListSelectionModal'
export default {
name: 'MarketRegulationsFormPage',
components: { InternalDetailPage, JTable },
components: { MarketRegulationsListSelectionModal, StandardSelectionModal, InternalDetailPage, JTable, MarketRegulationsModal },
mixins: [JeroListMixin],
data () {
return {
@@ -260,119 +269,119 @@ export default {
scopedSlots: { customRender: 'toDetail' }
},
{ // 标准英文名称
title: this.$t('marketListField.standardEnglishName'),
title: this.$t('standardRegulationLibrary.marketListField.standardEnglishName'),
align: 'center',
width: 180,
dataIndex: 'standardEnglishName',
scopedSlots: { customRender: 'text' }
},
{ // 新生产车实施日期
title: this.$t('marketListField.newProductionVehicleImplementationDate'),
title: this.$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate'),
align: 'center',
width: 180,
dataIndex: 'newProductionVehicleImplementationDate',
scopedSlots: { customRender: 'text' }
},
{ // 新认证车实施日期
title: this.$t('marketListField.newCertifiedVehicleImplementationDate'),
title: this.$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate'),
align: 'center',
width: 180,
dataIndex: 'newCertifiedVehicleImplementationDate',
scopedSlots: { customRender: 'text' }
},
{ // 注册日期
title: this.$t('marketListField.dateOfRegistration'),
title: this.$t('standardRegulationLibrary.marketListField.dateOfRegistration'),
align: 'center',
width: 180,
dataIndex: 'dateOfRegistration',
scopedSlots: { customRender: 'text' }
},
{ // 适用国家/地区
title: this.$t('marketListField.applicableCountryRegion'),
title: this.$t('standardRegulationLibrary.marketListField.applicableCountryRegion'),
align: 'center',
width: 180,
dataIndex: 'applicableCountryRegion',
scopedSlots: { customRender: 'text' }
},
{ // 适用车型
title: this.$t('marketListField.applicableVehicleType'),
title: this.$t('standardRegulationLibrary.marketListField.applicableVehicleType'),
align: 'center',
width: 180,
dataIndex: 'applicableVehicleType',
scopedSlots: { customRender: 'text' }
},
{ // 认证对象
title: this.$t('marketListField.authenticationObject'),
title: this.$t('standardRegulationLibrary.marketListField.authenticationObject'),
align: 'center',
width: 180,
dataIndex: 'authenticationObject',
scopedSlots: { customRender: 'text' }
},
{ // 认证交付物
title: this.$t('marketListField.certifiedDeliverables'),
title: this.$t('standardRegulationLibrary.marketListField.certifiedDeliverables'),
align: 'center',
width: 180,
dataIndex: 'certifiedDeliverables',
scopedSlots: { customRender: 'text' }
},
{ // 类型
title: this.$t('marketListField.type'),
title: this.$t('standardRegulationLibrary.marketListField.type'),
align: 'center',
width: 180,
dataIndex: 'type',
scopedSlots: { customRender: 'text' }
},
{ // 动力类型
title: this.$t('marketListField.dynamicType'),
title: this.$t('standardRegulationLibrary.marketListField.dynamicType'),
align: 'center',
width: 180,
dataIndex: 'dynamicType',
scopedSlots: { customRender: 'text' }
},
{ // 主控部门
title: this.$t('marketListField.mainControlDepartment'),
title: this.$t('standardRegulationLibrary.marketListField.mainControlDepartment'),
align: 'center',
width: 180,
dataIndex: 'mainControlDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 主控部门专业模块
title: this.$t('marketListField.masterControlDepartmentProfessionalModule'),
title: this.$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule'),
align: 'center',
width: 180,
dataIndex: 'masterControlDepartmentProfessionalModule',
scopedSlots: { customRender: 'text' }
},
{ // 关联部门
title: this.$t('marketListField.relatedDepartment'),
title: this.$t('standardRegulationLibrary.marketListField.relatedDepartment'),
align: 'center',
width: 180,
dataIndex: 'relatedDepartment',
scopedSlots: { customRender: 'text' }
},
{ // 关联部门专业模块
title: this.$t('marketListField.associateDepartmentSpecializedModules'),
title: this.$t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules'),
align: 'center',
width: 180,
dataIndex: 'associateDepartmentSpecializedModules',
scopedSlots: { customRender: 'text' }
},
{ // 批量限制
title: this.$t('marketListField.batchRestriction'),
title: this.$t('standardRegulationLibrary.marketListField.batchRestriction'),
align: 'center',
width: 180,
dataIndex: 'batchRestriction',
scopedSlots: { customRender: 'text' }
},
{ // 自动驾驶等级
title: this.$t('marketListField.automaticDrivingLevel'),
title: this.$t('standardRegulationLibrary.marketListField.automaticDrivingLevel'),
align: 'center',
width: 180,
dataIndex: 'automaticDrivingLevel',
scopedSlots: { customRender: 'text' }
},
{ // 要求类型
title: this.$t('marketListField.requirementType'),
title: this.$t('standardRegulationLibrary.marketListField.requirementType'),
align: 'center',
width: 180,
dataIndex: 'requirementType',
@@ -388,8 +397,9 @@ export default {
],
showList: false, // 是否展示清单
url: {
list: ''
}
importExcelUrl: ''
},
disableMixinCreated: true
}
},
methods: {
@@ -397,9 +407,33 @@ export default {
handleNext () {
this.showList = true
},
// 新增
handleAdd () {
this.$refs.marketRegulationsModal.add()
},
// 调取
handleTransfer () {
this.$refs.transferModal.open()
},
// 复制
handleCopy () {
this.$refs.copyModal.open()
},
// 新增完成
modalFormOk (value) {
this.dataSource.unshift(value)
},
// 取消
handleCancel () {
},
// 调取完成
transferOk () {
},
// 复制完成
copyOk () {
},
// 提交
handleSubmit () {
@@ -427,4 +461,8 @@ export default {
overflow: auto;
padding: 32px 20px;
}
.center-operate-box {
text-align: right;
}
</style>
@@ -0,0 +1,275 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="true"
@close="handleCancel"
:visible="visible"
:maskClosable="false"
destroyOnClose
class="custom-drawer-style"
>
<div class="custom-drawer-style-scroll">
<a-spin :spinning="confirmLoading" style="width: 100%;height:100%">
<a-form :form="form">
<!-- 标准编号 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardNumber')">
<standard-selection :placeholder="$t('pleaseSelect') + $t('standardNumber')"
type="radio"
v-decorator.trim="[ 'standardId', validatorRules.standardId ]" />
</a-form-item>
<!-- 标准名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardName')">
<a-input :placeholder="$t('pleaseEnter') + $t('standardName')"
disabled
v-decorator.trim="[ 'standardName', validatorRules.standardName ]" />
</a-form-item>
<!-- 标准英文名称 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.standardEnglishName')">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketListField.standardEnglishName')"
disabled
v-decorator.trim="[ 'standardEnglishName', validatorRules.standardEnglishName ]" />
</a-form-item>
<!-- 类型 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.type')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.type')"
disabled
dict-code="type"
v-decorator.trim="[ 'type', validatorRules.type ]" />
</a-form-item>
<!-- 新生产车实施日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')">
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')"
v-decorator.trim="[ 'newProductionVehicleImplementationDate', validatorRules.newProductionVehicleImplementationDate ]" />
</a-form-item>
<!-- 新认证车实施日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')">
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')"
v-decorator.trim="[ 'newCertifiedVehicleImplementationDate', validatorRules.newCertifiedVehicleImplementationDate ]" />
</a-form-item>
<!-- 注册日期 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.dateOfRegistration')">
<j-multiple-date-picker :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.dateOfRegistration')"
v-decorator.trim="[ 'dateOfRegistration', validatorRules.dateOfRegistration ]" />
</a-form-item>
<!-- 适用国家/地区 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableCountryRegion')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.applicableCountryRegion')"
dict-code="market_state"
v-decorator.trim="[ 'applicableCountryRegion', validatorRules.applicableCountryRegion ]" />
</a-form-item>
<!-- 认证对象 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.authenticationObject')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.authenticationObject')"
dict-code="authentication_object"
v-decorator.trim="[ 'authenticationObject', validatorRules.authenticationObject ]" />
</a-form-item>
<!-- 认证交付物 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.certifiedDeliverables')">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.marketListField.certifiedDeliverables')"
:maxLength="50"
v-decorator.trim="[ 'certifiedDeliverables', validatorRules.certifiedDeliverables ]" />
</a-form-item>
<!-- 主控部门 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.mainControlDepartment')">
<j-select-depart :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.mainControlDepartment')"
:backDepart="true"
v-decorator.trim="[ 'mainControlDepartment', validatorRules.mainControlDepartment ]" />
</a-form-item>
<!-- 主控部门专业模块 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')"
dict-code="master_control_department_professional_module"
v-decorator.trim="[ 'masterControlDepartmentProfessionalModule', validatorRules.masterControlDepartmentProfessionalModule ]" />
</a-form-item>
<!-- 关联部门 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.relatedDepartment')">
<j-select-depart :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.relatedDepartment')"
:backDepart="true"
v-decorator.trim="[ 'relatedDepartment', validatorRules.relatedDepartment ]" />
</a-form-item>
<!-- 关联部门专业模块 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.associateDepartmentSpecializedModules')"
dict-code="master_control_department_professional_module"
v-decorator.trim="[ 'associateDepartmentSpecializedModules', validatorRules.associateDepartmentSpecializedModules ]" />
</a-form-item>
<!-- 适用车型 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.applicableVehicleType')">
<j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.applicableVehicleType')"
dict-code="applicable_vehicle_type"
v-decorator.trim="[ 'applicableVehicleType', validatorRules.applicableVehicleType ]" />
</a-form-item>
<!-- 动力类型 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.dynamicType')">
<j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.dynamicType')"
dict-code="dynamic_type"
v-decorator.trim="[ 'dynamicType', validatorRules.dynamicType ]" />
</a-form-item>
<!-- 批量限制 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.batchRestriction')">
<j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.batchRestriction')"
dict-code="batch_restriction"
v-decorator.trim="[ 'batchRestriction', validatorRules.batchRestriction ]" />
</a-form-item>
<!-- 自动驾驶等级 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.automaticDrivingLevel')">
<j-multi-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.automaticDrivingLevel')"
dict-code="automatic_driving_level"
v-decorator.trim="[ 'automaticDrivingLevel', validatorRules.automaticDrivingLevel ]" />
</a-form-item>
<!-- 要求类型 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.marketListField.requirementType')">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('standardRegulationLibrary.marketListField.requirementType')"
dict-code="requirement_type"
v-decorator.trim="[ 'requirementType', validatorRules.requirementType ]" />
</a-form-item>
</a-form>
</a-spin>
</div>
<div class="custom-drawer-style-bottom-btn">
<a-button @click="handleOk" type="primary" style="margin-bottom: 0;">
{{ $t('determine') }}
</a-button>
<a-button @click="handleCancel" style="margin-bottom: 0;">{{ $t('cancel') }}</a-button>
</div>
</a-drawer>
</template>
<script>
import StandardSelection from '@/components/selection/StandardSelection'
import JMultipleDatePicker from '../../../../components/JMultipleDatePicker'
export default {
name: 'MarketRegulationsModal',
components: { JMultipleDatePicker, StandardSelection },
data () {
return {
title: this.$t('newlyAdded'),
width: 800,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
validatorRules: {
// 标准编号
standardId: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardNumber')
}],
validateTrigger: 'change'
},
// 标准名称
standardName: {
rules: [{
required: true,
message: this.$t('pleaseEnter') + this.$t('standardName')
}],
validateTrigger: 'blur'
},
// 新生产车实施日期
newProductionVehicleImplementationDate: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.newProductionVehicleImplementationDate')
}],
validateTrigger: 'change'
},
// 新认证车实施日期
newCertifiedVehicleImplementationDate: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.newCertifiedVehicleImplementationDate')
}],
validateTrigger: 'change'
},
// 注册日期
dateOfRegistration: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.dateOfRegistration')
}],
validateTrigger: 'change'
},
// 适用国家/地区
applicableCountryRegion: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.applicableCountryRegion')
}],
validateTrigger: 'change'
},
// 认证对象
authenticationObject: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.authenticationObject')
}],
validateTrigger: 'change'
},
// 主控部门
mainControlDepartment: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.mainControlDepartment')
}],
validateTrigger: 'change'
},
// 主控部门专业模块
masterControlDepartmentProfessionalModule: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.masterControlDepartmentProfessionalModule')
}],
validateTrigger: 'change'
},
// 适用车型
applicableVehicleType: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.applicableVehicleType')
}],
validateTrigger: 'change'
},
// 动力类型
dynamicType: {
rules: [{
required: true,
message: this.$t('pleaseSelect') + this.$t('standardRegulationLibrary.marketListField.dynamicType')
}],
validateTrigger: 'change'
}
}
}
},
methods: {
add () {
this.visible = true
},
handleOk () {
},
handleCancel () {
this.close()
},
close () {
this.visible = false
}
}
}
</script>
<style scoped>
</style>