Merge branch 'dev_third_stage'

This commit is contained in:
lixuetao
2022-07-05 19:49:26 +08:00
9 changed files with 139 additions and 122 deletions
@@ -1409,7 +1409,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
if (ccDtoAfterDistinct.size() < ccDtoList.size()) {
// 取差集
String reduceOne = ccDtoList.stream()
.filter(e->!ccDtoAfterDistinct.contains(e)).map(CertCategoryParamsInfoCnImport::getNioNumber).collect(Collectors.joining(","));
.filter(e->!ccDtoAfterDistinct.contains(e))
.map(CertCategoryParamsInfoCnImport::getNioNumber).distinct()
.collect(Collectors.joining(","));
if (StringUtils.isNotBlank(reduceOne)) {
if (CutEnum.CN.getValue().equals(cut)) {
stringMessage.add("导入数据中NIO编号:" + reduceOne + "下存在重复认证类别;");
@@ -1428,7 +1430,9 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
if (ccDtoAfterDistinctTwo.size() < certCategoryParamsInfoEOList.size()) {
// 取差集
String reduceTwo = certCategoryParamsInfoEOList.stream()
.filter(e->!ccDtoAfterDistinctTwo.contains(e)).map(CertCategoryParamsInfoCnImport::getNioNumber).collect(Collectors.joining(","));
.filter(e->!ccDtoAfterDistinctTwo.contains(e))
.map(CertCategoryParamsInfoCnImport::getNioNumber).distinct()
.collect(Collectors.joining(","));
if (StringUtils.isNotBlank(reduceTwo)) {
if (CutEnum.CN.getValue().equals(cut)) {
stringMessage.add("导入数据中NIO编号:" + reduceTwo + "下存在重复认证编号;");
+1
View File
@@ -178,6 +178,7 @@ module.exports = {
ButtonsPermissions: 'Buttons / permissions',
ConventionalExport:'Conventional export',
CustomExport:'Custom export',
CustomTemplateName:'Custom template name',
assembly: 'Assembly',
route: 'Route',
AddSubmenu: 'Add submenu',
+1
View File
@@ -180,6 +180,7 @@ module.exports = {
ButtonsPermissions: '按钮/权限',
ConventionalExport:'常规导出',
CustomExport:'自定义导出',
CustomTemplateName:'自定义模板名称',
assembly: '组件',
route: '路径',
AddSubmenu: '添加子菜单',
@@ -28,10 +28,8 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
event.returnValue="false"
ondragenter="return false"
onblur="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
@@ -182,12 +180,10 @@
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
event.returnValue="false"
:disabled="item.isLock == '1' ? true: false"
ondragenter="return false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onblur="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
@@ -280,10 +276,8 @@
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
event.returnValue="false"
ondragenter="return false"
onblur="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
v-model="item.dataValue"/>
@@ -390,12 +384,10 @@
<div v-else-if="item.controlVerify == '2'">
<a-input class="box-input inputWid"
:maxLength="1000"
event.returnValue="false"
ondragenter="return false"
:disabled="item.isLock == '1' ? true: false"
onblur="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
:placeholder="$t('pleaseEnter')+$t('chinese')"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
@@ -556,11 +548,9 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:maxLength="1000"
event.returnValue="false"
ondragenter="return false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onblur="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
@@ -202,7 +202,10 @@ export default {
this.loadData()
},
dowloadfile(item){
downloadFile('/sys/common/downLoadFile', item.exportFileName, {id:item.exportFileId})
let query = {
id: item.exportFileId
}
downloadFile('/sys/common/downLoadFile', item.exportFileName, query, this.Deselect)
},
loadData() {
let _this = this
@@ -101,30 +101,31 @@
<div class="text-field">
<span class="text-field-left" :title="$t('configurationName')">{{$t('configurationName')}}:</span>
<span class="text-field-right"
:title="configDetail.configName"
>{{configDetail.configName}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('Model')">{{$t('Model')}}:</span>
<span class="text-field-right"
<span class="text-field-right" :title="configDetail.carType"
>{{configDetail.carType}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('electricMachinery')">{{$t('electricMachinery')}}:</span>
<span class="text-field-right"
<span class="text-field-right" :title="configDetail.motor"
>{{configDetail.motor}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('Version')">{{$t('Version')}}:</span>
<span class="text-field-right"
<span class="text-field-right" :title="configDetail.version"
>{{configDetail.version}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('Battery')">{{$t('Battery')}}:</span>
<span class="text-field-right"
<span class="text-field-right" :title="configDetail.battery"
>{{configDetail.battery}}</span>
</div>
</div>
@@ -52,7 +52,7 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: true}"
:scroll="{x: '100%',y:'calc(100vh - 130px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -60,7 +60,7 @@
>
<span slot="projectName" slot-scope="text,record" :title="text">
<a @click="entryNameClick(record)">
{{ text && text.length > 30 ? text.slice(0, 29) + '...' : text }}
{{ text }}
</a>
</span>
<span slot="titleName" slot-scope="text,record" :title="text">
@@ -157,31 +157,37 @@ export default {
{
title: this.$t('zoneOfApplication'),
align: 'center',
width: '10%',
width: 160,
ellipsis: true,
dataIndex: 'region_dictText',
},
{
title: this.$t('parameterTemplate'),
align: 'center',
width: 180,
ellipsis: true,
dataIndex: 'paramsTemplateName',
scopedSlots: { customRender: 'projectName' }
},
{
title: this.$t('contentDescription'),
align: 'center',
ellipsis: true,
dataIndex: 'description',
scopedSlots: { customRender: 'titleName' }
// scopedSlots: { customRender: 'titleName' }
},
{
title: this.$t('createTime'),
align: 'center',
width: '10%',
dataIndex: 'createTime'
dataIndex: 'createTime',
width: 160,
ellipsis: true,
},
{
title: this.$t('updateTime'),
align: 'center',
width: '10%',
width: 160,
ellipsis: true,
dataIndex: 'updateTime'
},
{
@@ -1,46 +1,38 @@
<!--常规导出-->
<template>
<div>
<a-drawer
<a-modal
:title="title"
:maskClosable="false"
:width="1000"
:width="750"
placement="right"
:closable="true"
@close="handleCancel"
@cancel="handleCancel"
:visible="visible"
style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-spin :spinning="confirmLoading">
<a-form>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="12">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
<div class="title-text" :title="$t('configure')">
<span>{{$t('configure')}}</span>
</div>
<a-form-model-item class="itemModel" prop="templateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.templateName"
:placeholder="$t('PleaseEnter')+$t('templateName')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('status')">{{$t('status')}}</span>
</div>
<a-form-model-item class="itemModel" prop="state">
<a-select allowClear :placeholder="$t('PleaseSelect')+$t('status')" v-model='formInline.state'>
<a-select-option :key="'0'" :value="'0'">{{$t('Enable')}}
</a-select-option>
<a-select-option :key="'1'" :value="'1'">{{$t('disable')}}
<a-form-model-item class="itemModel" prop="configIds">
<a-select v-model="formInline.configIds" class="code-mode-select" :placeholder="$t('PleaseSelect')+$t('configure')">
<a-select-option
v-for="mode in dictOptions"
:key="mode.value"
:value="mode.value">
{{ mode.label }}
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.configIds"-->
<!-- :options="dictOptions"-->
<!-- :placeholder="$t('PleaseSelect')+$t('configure')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'cert_category'"/>-->
</a-form-model-item>
</div>
</a-col>
@@ -48,48 +40,29 @@
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<div class="title-text" :title="$t('CustomTemplateName')">
<span>{{$t('CustomTemplateName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="certCategory">
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
:placeholder="$t('PleaseSelect')+$t('CustomTemplateName')"
:type="'select'"
@input="certCategoryName"
:triggerChange="false" :dictCode="'cert_category'"/>
</a-form-model-item>
<span class="title-text-text"
:title="$t('contentDescription')">{{$t('contentDescription')}}</span>
</div>
<a-form-model-item class="itemModel" prop="description">
<a-input class="box-input add-input"
type="textarea"
:disabled="disabled"
v-model="formInline.description"
:placeholder="$t('PleaseEnter')+$t('contentDescription')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="fileConnectId">
<a-button type="primary" class="button-text"
v-model='formInline.fileConnectId'
@click="clickButtonToUpload('fileTemplateConnectId')">
{{ (formInline.fileConnectId === 'null' || formInline.fileConnectId === '' ||
formInline.fileConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-form>
</a-spin>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('export')}}</a-button>
</div>
</a-drawer>
</a-modal>
<uploadFileChange ref="uploadFile" :accept="'.doc,.doxc,.xls,.xlsx'" @uploadSuccess="uploadSuccess"></uploadFileChange>
</div>
</template>
@@ -98,6 +71,7 @@
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFileChange from '@/components/uploadFileChange/file'
import {initDictOptions, filterDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'addModel',
@@ -108,13 +82,30 @@ export default {
props: ['url'],
data() {
return {
formInline: {},
formInline: {
},
confirmLoading: false,
description:false,
dictOptions:[],
visible: false,
required:false,
disabled:false,
rules: {
templateName:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('parameterTemplate'), trigger: 'change' },
{ min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('characters'), trigger: 'blur' },
separator:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('MergeSeparator'), trigger: 'change' },
// { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' },
],
certCategory:[
{ required: true, message: this.$t('PleaseEnter')+this.$t('certificationCategory'), trigger: 'change' },
// { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' },
],
combineFlag:[
{ required: true, message: this.$t('PleaseSelect')+this.$t('WhetherMergeParameters'), trigger: 'change' },
// { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' },
],
configIds:[
{ required: true, message: this.$t('PleaseSelect')+this.$t('configure'), trigger: 'change' },
// { min:1, max: 50, message: this.$t('cantExeed')+'50'+this.$t('MergeSeparator'), trigger: 'blur' },
],
description:[
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
@@ -126,7 +117,6 @@ export default {
{ required: true, message: this.$t('PleaseSelect')+this.$t('attachmentTemplate'), trigger: 'change' },
],
},
disabled: false,
projectNameList: [],
title: ''
}
@@ -170,12 +160,27 @@ export default {
this.visible = true
this.title = this.$t('CustomExport')
this.formInline = {}
this.formInline.state = '0'
this.formInline.separator = ','
this.formInline = {...this.formInline}
this.getConfigure()
this.$nextTick(() => {
this.$refs['ruleForm'].clearValidate()
})
},
getConfigure(){
let pram = {
paramsManifestId: this.$route.query.id
}
getAction('report/detail/getConfigLabelList', pram).then((res) => {
if (res.success) {
console.log(res.result)
this.dictOptions = res.result
} else {
// this.$refs.uploadFile.perentHandleFunc()
}
})
},
editModel(value) {
this.visible = true
this.title = '编辑'
@@ -185,40 +190,41 @@ export default {
},
handleCancel() {
this.visible = false
this.$refs.ruleForm.resetFields()
},
certCategoryName(value){
getAction('sys/dict/getDictItems/cert_category', { }).then((res) => {
if (res.success) {
let tt = ''
res.result.forEach((item) => {
if(item.value == value){
tt=item.title
}
})
this.contentListStart = tt
console.log(this.contentListStart)
}
})
console.log(value)
},
handleSubmit() {
if(this.formInline.paramsTemplateName !== undefined) {
this.formInline.paramsTemplateName = this.formInline.paramsTemplateName.trim()
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let url = ''
let Action
if (this.formInline.id) {
url = this.url.edit
Action = postAction
} else {
url = this.url.add
Action = postAction
}
let url = this.url.ConventionalExport
let Action = getAction
let query = JSON.parse(JSON.stringify(this.formInline))
Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',')
}
})
if(this.contentListStart){
query.certCategoryName = this.contentListStart
}
query.paramsManifestId = this.$route.query.id
this.confirmLoading = true
Action(url, query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.$emit('addModelList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
downloadFile('report/detail/exportNormal', this.$t('GeneralExportInformation')+'.zip', query)
this.confirmLoading = false
}
})
},
@@ -72,7 +72,7 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
:scroll="{x: '100%',y:'calc(100vh - 130px)'}"
rowKey="id"
:data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -155,20 +155,23 @@ export default {
{
title: this.$t('NiONumber'),
align: 'center',
width: 100,
width: 130,
dataIndex: 'nioNumber',
sorter: true
sorter: true,
ellipsis: true,
},
{
title: this.$t('ParameterName'),
align: 'center',
dataIndex: 'paramsName',
width: 160,
ellipsis: true,
},
{
title: this.$t('ParameterDescription'),
align: 'center',
dataIndex: 'description',
ellipsis: true,
// scopedSlots: { customRender: 'titleName' }
},
{
@@ -176,12 +179,14 @@ export default {
align: 'center',
dataIndex: 'dutyTerritory_dictText',
width: 150,
ellipsis: true,
},
{
title: this.$t('createTime'),
align: 'center',
dataIndex: 'createTime',
width: 110,
width: 180,
ellipsis: true,
},
{
title: this.$t('operation'),