This commit is contained in:
yuekuo
2023-03-25 18:19:45 +08:00
parent f1d6152bac
commit f8533b953c
8 changed files with 126 additions and 34 deletions
@@ -274,7 +274,7 @@
if(localStorage.getItem('otaId') == null){
return
}else{
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code == 200){
this.form=res.result
if(res.result.dllx1 == null ){
@@ -298,7 +298,7 @@
},
async save(){
postAction('/ota/otaBaCxJbxx/add',{otaId:localStorage.getItem('otaId'),...this.form}).then( res => {
postAction('/ota/otaBaCxJbxx/add',{ otaId:localStorage.getItem('otaId'),...this.form}).then( res => {
if(res.code == 200){
localStorage.setItem('otaId', res.result.otaId)
}
@@ -319,8 +319,42 @@ import ImportFile from '@/components/ImportFileData/index'
})
},
getData(){
getAction('/ota/otaBaCxKsjjsmccs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
console.log(res);
getAction('/ota/otaBaCxKsjjsmccs/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code==200){
if(res.result.length==0){
this.dataSource=[
{
gnmc:'前向碰撞预警(FCW)'
},
{
gnmc:'车道偏离预警(LDW)'
},
{
gnmc:'百区监测(BSD)'
},
{
gnmc:'驻员疲劳篮澳CDFM)'
},
{
gnmc:'自动紧急制动(AEB)'
},
{
gnmc:'自适应巡航控制(ACC)'
},
{
gnmc:'自适应巡航控制(ACC)'
},
{
gnmc:'智能泊车辅助(IPA)'
},
{
gnmc:'交通拥堵辅助(TJA)'
},
]
}else{
this.dataSource=res.result
}
}
})
},
save(){
@@ -51,7 +51,7 @@ export default {
},
methods: {
getData(){
getAction('/ota/otaBaCxQt/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
getAction('/ota/otaBaCxQt/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
console.log(res);
})
}
@@ -867,8 +867,8 @@ export default {
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
getAction('/ota/otaBaCxJsfzbacs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
console.log(res);
getAction('/ota/otaBaCxJsfzbacs/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
if(res == 200 ) {}
})
},
@@ -176,12 +176,12 @@ import ImportFile from '@/components/ImportFileData/index'
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
getAction('/ota/otaBaCxAqcs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
getAction('/ota/otaBaCxAqcs/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code == 200){
this.dataSource[0].info =res.result.bhjz
this.dataSource[1].info =res.result.fsxjz
this.dataSource[2].info= res.result.sjsbcs
this.dataSource[3].info=res.result.xxaqjz
this.dataSource[0].info = Number(res.result.bhjz)
this.dataSource[1].info =Number(res.result.fsxjz)
this.dataSource[2].info= Number(res.result.sjsbcs)
this.dataSource[3].info=Number(res.result.xxaqjz)
}
})
@@ -206,17 +206,17 @@ export default {
},
getData(){
console.log(localStorage.getItem('otaId'));
getAction('/ota/otaBaCxZxsjyq/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
this.dataSource[0].relevantverification =res.result.bhsjb
this.dataSource[1].relevantverification=res.result.bhclbb
this.dataSource[2].relevantverification=res.result.clgxnl
this.dataSource[3].relevantverification=res.result.clsjtj
this.dataSource[4].relevantverification=res.result.clsjdl
this.dataSource[5].relevantverification=res.result.sjbhaq
this.dataSource[6].relevantverification=res.result.sjantj
this.dataSource[7].relevantverification=res.result.sjsbaq
this.dataSource[8].relevantverification=res.result.sjgg
this.dataSource[9].relevantverification=res.result.sjzt
getAction('/ota/otaBaCxZxsjyq/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
this.dataSource[0].relevantverification =Number(res.result.bhsjb)
this.dataSource[1].relevantverification=Number(res.result.bhclbb)
this.dataSource[2].relevantverification=Number(res.result.clgxnl)
this.dataSource[3].relevantverification=Number(res.result.clsjtj)
this.dataSource[4].relevantverification=Number(res.result.clsjdl)
this.dataSource[5].relevantverification=Number(res.result.sjbhaq)
this.dataSource[6].relevantverification=Number(res.result.sjantj)
this.dataSource[7].relevantverification=Number(res.result.sjsbaq)
this.dataSource[8].relevantverification=Number(res.result.sjgg)
this.dataSource[9].relevantverification=Number(res.result.sjzt)
this.$forceUpdate()
})
@@ -116,22 +116,28 @@ import ImportFile from '@/components/ImportFileData/index'
},
dataSource: [
{
xtlb:'动力系统'
xtlb:'动力系统',
key:'1'
},
{
xtlb:'传动系统'
xtlb:'传动系统',
key:'2'
},
{
xtlb:'转向系统'
xtlb:'转向系统',
key:'3'
},
{
xtlb:'制动系统'
xtlb:'制动系统',
key:'4'
},
{
xtlb:'车身系统'
xtlb:'车身系统',
key:'5'
},
{
xtlb:'车载能源系统'
xtlb:'车载能源系统',
key:'6'
},
],
columns: [
@@ -286,8 +292,42 @@ import ImportFile from '@/components/ImportFileData/index'
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
getData(){
getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaId:localStorage.getItem('otaId')}).then(res=>{
console.log(res);
getAction('/ota/otaBaCxKsjxtmccs/queryByOtaId',{otaIdT:localStorage.getItem('otaIdT'),otaId:localStorage.getItem('otaId')}).then(res=>{
if(res.code==200){
if(res.result.length==0){
this.dataSource= [
{
xtlb:'动力系统',
key:'1'
},
{
xtlb:'传动系统',
key:'2'
},
{
xtlb:'转向系统',
key:'3'
},
{
xtlb:'制动系统',
key:'4'
},
{
xtlb:'车身系统',
key:'5'
},
{
xtlb:'车载能源系统',
key:'6'
},
]
}else{
res.result.forEach(item =>{
item.sfksj =Number(item.sfksj)
})
this.dataSource=res.result
}
}
})
},
getList() {
@@ -355,12 +395,15 @@ import ImportFile from '@/components/ImportFileData/index'
},
//中间加
addlineAtMid(record){
let obj = {xtlb:record.xtlb}
let randomNum=Math.floor(Math.random()*99999999999+1)
let obj = {xtlb:record.xtlb,key:randomNum}
this.dataSource.splice(this.dataSource.indexOf(record)+1,0,obj)
},
//最后一行加
addlineAtBot(){
let obj={}
let randomNum=Math.floor(Math.random()*99999999999+1)
let obj={key:randomNum}
this.dataSource.push(obj)
},
deleteData(record){
@@ -357,7 +357,22 @@ export default {
},
// 引用备案
citeforrecord() {
if( this.selectedRowKeys.length == 0 ){
this.$message.warning(this.$t('selectLeastOne'))
}else{
if ( this.selectedRowKeys.length > 1){
this.$message.warning(this.$t('OnlyOneSelected'))
}else{
localStorage.removeItem('otaIdt')
localStorage.removeItem('otaId')
localStorage.setItem('otaIdt',this.selectedRowKeys[0])
this.$router.push({
path: '/vehicleinformation',
query: {}
})
}
}
},
// 创建车型
createvehicleandfunctionrecords() {