ota数据导入 模板下载

This commit is contained in:
zyx.net
2023-03-25 18:15:31 +08:00
parent 3973fe69dd
commit f1d6152bac
6 changed files with 84 additions and 33 deletions
@@ -2,10 +2,9 @@
<div class="box">
<div class="table-operator">
<div class="operator-text">
<a-icon type="import" :rotate="270"/>
{{$t('dataimport')}}
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
</div>
<div class="operator-text">
<div @click='handleModule' class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
@@ -220,11 +219,13 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index'
export default {
name: 'basicInformation',
components:{
ImportFile
},
// props:['otaId'],
data() {
@@ -234,6 +235,10 @@
formInline:{},
projectNameList:[],
formRules:[],
url: {
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
form:{},
projectNameList1:['传统动力汽车','节能汽车','新能源汽车','其他'],
projectNameList2:[],
@@ -247,6 +252,10 @@
this.getData()
},
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getSelect(){
getAction('/ota/otaBaCxList/list').then(res=>{
if(res.code==200){
@@ -2,10 +2,9 @@
<div class="box">
<div class="table-operator">
<div class="operator-text">
<a-icon type="import" :rotate="270"/>
{{$t('dataimport')}}
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
</div>
<div class="operator-text">
<div @click='handleModule' class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
@@ -103,16 +102,22 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index'
import uploadFile from '@/components/uploadFile/file'
export default {
name: 'beupgradedonline',
components:{
uploadFile
uploadFile,
ImportFile
},
data() {
return {
url: {
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
dataSource: [
{
gnmc:'前向碰撞预警(FCW)'
@@ -281,6 +286,10 @@
this.getData()
},
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
@@ -2,10 +2,9 @@
<div class="box">
<div class="table-operator">
<div class="operator-text">
<a-icon type="import" :rotate="270"/>
{{$t('dataimport')}}
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
</div>
<div class="operator-text">
<div @click='handleModule' class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
@@ -279,18 +278,24 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index'
import uploadFile from '@/components/uploadFile/file'
export default {
name: 'upgradeRequirements',
components:{
uploadFile
uploadFile,
ImportFile
},
props:['otaId'],
data() {
return {
radioList:9,
url: {
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
dataSource: [
{
key: 'wlaqyqSl',
@@ -857,6 +862,10 @@ export default {
this.getData()
},
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
getAction('/ota/otaBaCxJsfzbacs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
console.log(res);
@@ -2,10 +2,9 @@
<div class="box">
<div class="table-operator">
<div class="operator-text">
<a-icon type="import" :rotate="270"/>
{{$t('dataimport')}}
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
</div>
<div class="operator-text">
<div @click='handleModule' class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
@@ -44,17 +43,23 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index'
import uploadFile from '@/components/uploadFile/file'
export default {
name: 'safetyPrecautions',
components:{
uploadFile
uploadFile,
ImportFile
},
props:['otaId'],
data() {
return {
url: {
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
dataSource: [
{
key: '1',
@@ -166,6 +171,10 @@
this.getData()
},
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
getAction('/ota/otaBaCxAqcs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code == 200){
@@ -2,12 +2,11 @@
<div class="box">
<div class="table-operator">
<div class="operator-text">
<a-icon type="import" :rotate="270" />
{{ $t('dataimport') }}
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
</div>
<div class="operator-text">
<a-icon type="download" />
{{ $t('templateDownload') }}
<div @click='handleModule' class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
</div>
<a-table ref="table" size="middle" :pagination="false" :scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="key"
@@ -33,16 +32,22 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index'
import uploadFile from '@/components/uploadFile/file'
export default {
name: 'upgradeRequirements',
components: {
uploadFile
uploadFile,
ImportFile
},
data() {
return {
url: {
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
dataSource: [
{
key: '1',
@@ -115,8 +120,6 @@ export default {
certifyingmaterials: '',
},
],
url: {
},
queryParam: {},
columns: [
{
@@ -197,7 +200,10 @@ export default {
this.getData()
},
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
console.log(localStorage.getItem('otaId'));
getAction('/ota/otaBaCxZxsjyq/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
@@ -2,10 +2,9 @@
<div class="box">
<div class="table-operator">
<div class="operator-text">
<a-icon type="import" :rotate="270"/>
{{$t('dataimport')}}
<ImportFile :url="url" :dummyInventoryBaseId="$route.query.id" :isTrue="true" :accept="'.zip'" />
</div>
<div class="operator-text">
<div @click='handleModule' class="operator-text">
<a-icon type="download"/>
{{$t('templateDownload')}}
</div>
@@ -99,16 +98,22 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import ImportFile from '@/components/ImportFileData/index'
import uploadFile from '@/components/uploadFile/file'
export default {
name: 'upgradedonline',
components:{
uploadFile,
ImportFile
},
data() {
return {
url: {
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
dataSource: [
{
xtlb:'动力系统'
@@ -276,6 +281,10 @@
this.getData()
},
methods: {
// 模板下载
handleModule() {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
console.log(res);