平台件项目库新增修改

This commit is contained in:
zyx.net
2023-10-09 16:13:18 +08:00
parent e4f72182ff
commit bc887fe189
2 changed files with 141 additions and 67 deletions
@@ -15,42 +15,52 @@
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('entryName')">{{$t('entryName')}}</span>
<span class="text-field-right" :title="queryForm.projectNameId"
>{{queryForm.projectNameId}}</span>
<span class="text-field-left" :title="$t('power')">{{$t('power')}}</span>
<span class="text-field-right" :title="queryForm.power"
>{{queryForm.power}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('producer')">{{$t('producer')}}</span>
<span class="text-field-right" :title="queryForm.producer"
>{{queryForm.producer}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('targetMarket')">{{$t('targetMarket')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.targetMarket"
>{{queryForm.targetMarket}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('brand')">{{$t('brand')}}</span>
<span class="text-field-right" :title="queryForm.brandText"
>{{queryForm.brandText}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('configurationItem')">{{$t('configurationItem')}}</span>
<span class="text-field-left" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.ipdInfo"
@click="urlClick(queryForm.ipdInfo)"
>{{queryForm.ipdInfo}}</span>
:title="queryForm.projectStatus"
>{{queryForm.projectStatus}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.dutyTerritory"
>{{queryForm.dutyTerritory}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
<span class="text-field-right" :title="queryForm.createBy"
>{{queryForm.createBy}}</span>
<span class="text-field-right" :title="queryForm.regulationOwnerIdName"
>{{queryForm.regulationOwnerIdName}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>
<span class="text-field-left" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.vehicleDevelopmentPlan"
@click="urlClick(queryForm.vehicleDevelopmentPlan)"
>{{queryForm.vehicleDevelopmentPlan}}</span>
</div>
<div class="text-field">
<span class="text-field-left" :title="$t('certificationProgram')">{{$t('certificationProgram')}}</span>
<span class="text-field-right text-field-right-color"
:title="queryForm.attestationPlan"
@click="urlClick(queryForm.attestationPlan)"
>{{queryForm.attestationPlan}}</span>
:title="queryForm.engineeringInterfacePersonName"
>{{queryForm.engineeringInterfacePersonName}}</span>
</div>
</div>
<div class="content-text">
@@ -60,6 +70,31 @@
>{{queryForm.explanation}}</span>
</div>
</div>
<div class="content-text">
<div class="text-field">
<span class="text-field-left" :title="$t('Nameplatelabel')">{{$t('Nameplatelabel')}}</span>
<div>
<!-- brandLabel-->
<a-upload
:action="uploadAction+'?cut='+cut"
list-type="picture-card"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
>
<div v-if="fileList.length < 20">
<a-icon type="plus" />
<div class="ant-upload-text">
<!-- Upload-->
</div>
</div>
</a-upload>
<a-modal :visible="previewVisible" :footer="null" @cancel="handleCancelimg">
<img alt="example" style="width: 100%" :src="previewImage" />
</a-modal>
</div>
</div>
</div>
<div class="box-text" style="margin-top: 10px;margin-bottom: 10px">
<div class="header-text">
{{$t('complianceCertificationProgram')}}
@@ -136,12 +171,31 @@
},
selectedRowKeys: [],
idList: [],
previewVisible: false,
previewImage: '',
fileList: [],
projectNameList: [],
firstLevelDutyTerritoryList:[],
title: '',
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
regulatoryCertificationTaskPlanList: []
}
},
mounted() {
this.getForm()
this.administrators = false
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
this.activeKey = this.$t('regulatoryComplianceManagement')
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
@@ -201,7 +255,20 @@
downloadFile('/platform/projectLibraryBase/exportProjectProgressStatisticsXls',
this.queryForm.projectNameId+'-'+this.queryForm.projectVersion+'-'+this.$t('projectProgressStatistics') + '.xls', query)
},
handleCancelimg() {
this.previewVisible = false;
},
async handlePreview(file) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
},
handleChange({ fileList }) {
this.fileList = fileList;
console.log(this.fileList)
},
versionStatisticsClick() {
this.$refs.versionStatisticsRef.addModel(JSON.parse(JSON.stringify(this.selectedRowKeys)))
},
@@ -77,7 +77,7 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="Required">*</span>
<span class="title-text-text" :title="$t('projectStatus')">{{$t('projectStatus')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="projectStatus">
@@ -100,7 +100,6 @@
allowClear
show-search
mode="multiple"
class="box-input"
optionFilterProp="label"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.dutyTerritory">
@@ -121,7 +120,7 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="Required">*</span>
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'regulationOwnerIdName'">
@@ -136,14 +135,15 @@
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyIdName">
<PersonnelSelection :query="{db_field_name:'designDutyId',db_field_txt:$t('regulatoryEngineer')}"
<a-form-model-item class="itemModel" prop="engineeringInterfacePersonName">
<PersonnelSelection :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('regulatoryEngineer')}"
:isSingleChoice="true"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.designDutyIdName"/>
v-model="formInline.engineeringInterfacePersonName"/>
</a-form-model-item>
</div>
</a-col>
@@ -156,12 +156,14 @@
</div>
<a-form-model-item class="itemModelimg" prop="explanation">
<div>
<!-- brandLabel-->
<a-upload
:action="uploadAction+'?cut='+cut"
:action="uploadAction+'?state='+state+'&cut='+cut"
list-type="picture-card"
:file-list="fileList"
@preview="handlePreview"
@change="handleChange"
:headers="headers"
>
<div v-if="fileList.length < 20">
<a-icon type="plus" />
@@ -179,21 +181,6 @@
</a-col>
</a-row>
<a-row :gutter="24">
<!-- <a-col :span="12">-->
<!-- <div class="box-title-text">-->
<!-- <div class="title-text">-->
<!-- <span class="title-text-text"-->
<!-- :title="$t('dehicleDevelopmentPlan')">{{$t('dehicleDevelopmentPlan')}}</span>-->
<!-- </div>-->
<!-- <a-form-model-item class="itemModel" :prop="'vehicleDevelopmentPlan'">-->
<!-- <a-input class="box-input"-->
<!-- :disabled="disabled"-->
<!-- :maxLength="200"-->
<!-- v-model="formInline.vehicleDevelopmentPlan"-->
<!-- :placeholder="$t('PleaseEnter')+$t('dehicleDevelopmentPlan')"/>-->
<!-- </a-form-model-item>-->
<!-- </div>-->
<!-- </a-col>-->
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
@@ -203,7 +190,7 @@
<a-textarea :placeholder="$t('pleaseEnter')+$t('explain')"
v-model="formInline.explanation"
:maxLength="500"
:rows="4"/>
:rows="2"/>
</a-form-model-item>
</div>
</a-col>
@@ -235,7 +222,7 @@
</div>
<a-form-model-item class="itemModel" prop="Electriccellproductionenterprises">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Electriccellproductionenterprises')"
v-model="formInline.Electriccellproductionenterprises"></a-input>
v-model="formInline.cellEnterprise"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -248,7 +235,7 @@
</div>
<a-form-model-item class="itemModel-multi" prop="Assemblymanufacturer">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Assemblymanufacturer')"
v-model="formInline.Assemblymanufacturer"></a-input>
v-model="formInline.assemblyEnterprise"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -259,7 +246,7 @@
</div>
<a-form-model-item class="itemModel" prop="PartNumberCN">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('PartNumberCN')"
v-model="formInline.PartNumberCN"></a-input>
v-model="formInline.partNumberCn"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -272,7 +259,7 @@
</div>
<a-form-model-item class="itemModel-multi" prop="PartNumberEU">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('PartNumberEU')"
v-model="formInline.PartNumberEU"></a-input>
v-model="formInline.part_numberEn"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -289,7 +276,7 @@
</div>
<a-form-model-item class="itemModel" prop="bitfilecode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('bitfilecode')"
v-model="formInline.bitfilecode"></a-input>
v-model="formInline.filingCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -300,7 +287,7 @@
</div>
<a-form-model-item class="itemModel" prop="endorcode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Vendorcode') + '(13)'"
v-model="formInline.endorcode"></a-input>
v-model="formInline.supplierCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -313,7 +300,7 @@
</div>
<a-form-model-item class="itemModel" prop="Productclasscode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Productclasscode') + '(4)'"
v-model="formInline.Productclasscode"></a-input>
v-model="formInline.productTypeCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -324,7 +311,7 @@
</div>
<a-form-model-item class="itemModel" prop="Batterytypecode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Batterytypecode') + '(5)'"
v-model="formInline.Batterytypecode"></a-input>
v-model="formInline.batteryTypeCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -337,7 +324,7 @@
</div>
<a-form-model-item class="itemModel-multi" prop="Specificationcode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Specificationcode') + '(67)'"
v-model="formInline.Specificationcode"></a-input>
v-model="formInline.specificationCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -348,7 +335,7 @@
</div>
<a-form-model-item class="itemModel-multi" prop="Traceinformationcode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Traceinformationcode') + '(814)'"
v-model="formInline.Traceinformationcode"></a-input>
v-model="formInline.traceabilityCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -361,7 +348,7 @@
</div>
<a-form-model-item class="itemModel-multi" prop="Productionyearmonthdateserialnumber">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Productionyearmonthdateserialnumber') + '(1520)'"
v-model="formInline.Productionyearmonthdateserialnumber"></a-input>
v-model="formInline.ymdNumber"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -378,7 +365,7 @@
</div>
<a-form-model-item class="itemModel" prop="dimension">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('dimension')"
v-model="formInline.dimension"></a-input>
v-model="formInline.size"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -389,7 +376,7 @@
</div>
<a-form-model-item class="itemModel" prop="Ratedcapacity">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Ratedcapacity')"
v-model="formInline.Ratedcapacity"></a-input>
v-model="formInline.ratedCapacity"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -402,7 +389,7 @@
</div>
<a-form-model-item class="itemModel" prop="Nominalvoltage">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Nominalvoltage')"
v-model="formInline.Nominalvoltage"></a-input>
v-model="formInline.nominalVoltage"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -413,7 +400,7 @@
</div>
<a-form-model-item class="itemModel" prop="Ratedmass">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Ratedmass')"
v-model="formInline.Ratedmass"></a-input>
v-model="formInline.ratedMass"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -426,7 +413,7 @@
</div>
<a-form-model-item class="itemModel" prop="Numbercontainedmodules">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Numbercontainedmodules')"
v-model="formInline.Numbercontainedmodules"></a-input>
v-model="formInline.moduleNumber"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -437,7 +424,7 @@
</div>
<a-form-model-item class="itemModel" prop="Moduleseriesparallelmode">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Moduleseriesparallelmode')"
v-model="formInline.Moduleseriesparallelmode"></a-input>
v-model="formInline.connectionType"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -450,7 +437,7 @@
</div>
<a-form-model-item class="itemModel" prop="modulspecificationcodeused">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('modulspecificationcodeused')"
v-model="formInline.modulspecificationcodeused"></a-input>
v-model="formInline.moduleSpecificationCode"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -461,7 +448,7 @@
</div>
<a-form-model-item class="itemModel" prop="dimension">
<a-input class="box-input" :maxLength="200" :placeholder="$t('PleaseEnter')+$t('Coolingmode')"
v-model="formInline.Coolingmode"></a-input>
v-model="formInline.coolingMethod"></a-input>
</a-form-model-item>
</div>
</a-col>
@@ -479,10 +466,10 @@
<a-form-model-item class="itemModel" prop="designDueDate">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('Filingcompletiontime')"
@change="dateChange({db_field_name:'designDueDate'})"
@change="dateChange({db_field_name:'filingCompletionTime'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.designDueDate"
v-model="formInline.filingCompletionTime"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -498,7 +485,7 @@
<a-textarea
:placeholder="$t('remarks')"
:maxLength="500"
v-model="formInline.remark" :rows="4"/>
v-model="formInline.remark" :rows="2"/>
</a-form-model-item>
</div>
</a-col>
@@ -514,9 +501,11 @@
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import { mapGetters } from 'vuex'
import moment from 'moment'
import Vue from 'vue'
function getBase64(file) {
return new Promise((resolve, reject) => {
@@ -691,7 +680,7 @@
trigger: 'change'
}
],
designDutyIdName: [
engineeringInterfacePersonName: [
{
required: true,
message: this.$t('engineeringInterfacePerson') + this.$t('cannotEmpty'),
@@ -707,6 +696,7 @@
projectNameList: [],
firstLevelDutyTerritoryList:[],
title: '',
headers: {},
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
@@ -715,6 +705,9 @@
downLoadImgUrl: window._CONFIG['domianWebImgURL'] + '/sys/common/download',
}
},
created() {
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
this.getNameList()
let long = localStorage.getItem('language')
@@ -740,6 +733,17 @@
handleChange({ fileList }) {
this.fileList = fileList;
console.log(this.fileList)
let filelist = []
let filelistId = []
this.fileList.forEach((item => {
filelist.push(item.response)
}))
console.log(filelist,'111')
filelist.forEach((item => {
filelistId.push(item.result.id)
}))
this.formInline.brandLabel = filelistId.join(',')
this.formInline = { ...this.formInline }
},
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
@@ -776,6 +780,9 @@
this.formInline = {}
this.getNameList()
this.getFirstLevelDutyTerritory()
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
console.log(this.headers)
this.formInline.regulationOwnerIdName = this.userInfo().username
this.formInline.regulationOwnerId = this.userInfo().id
this.formInline.projectVersion = '00'