ota管理 维护对接接口

This commit is contained in:
高嵩
2023-03-23 15:51:22 +08:00
parent ef128a7eb0
commit 4f6a11bb4d
6 changed files with 63 additions and 25 deletions
+7
View File
@@ -1701,5 +1701,12 @@ module.exports = {
returntofill:'Return to fill',
thereAreCurrentlyNoRegulationsToHandle:'There are currently no regulations to handle',
certificationSubmission:'Certification Submission',
upgradecompletion:'Upgrade completion',
implementedupgrade:'Whether the implemented upgrade is consistent with the record',
numberofvehicles:'Number of vehicles that have completed upgrades',
vehicleshavenotcompletedonlineupgrade:'The reason why some vehicles have not completed online upgrade',
cause:'cause',
implementationrecords:'Fault handling measures and emergency response implementation records',
}
+6
View File
@@ -1801,4 +1801,10 @@ module.exports = {
expeditionProcess:'催办流程',
thereAreCurrentlyNoRegulationsToHandle:'当前没有可处理的法规',
certificationSubmission:'认证提交',
upgradecompletion:'升级完成情况',
implementedupgrade:'实施的升级是否和备案一致',
numberofvehicles:'完成升级的车辆数',
vehicleshavenotcompletedonlineupgrade:'部分车辆未完在线升级的原因',
cause:'原因',
implementationrecords:'故障处置措施和应急响应实施记录',
}
@@ -19,7 +19,7 @@
{{$t('recordstatus')}}</span>
</div>
<a-form-model-item class="itemModel" prop="recordstatus">
<j-dict-select-tag class="box-input" v-model="formInline.recordstatus"
<j-dict-select-tag class="box-input" v-model="formInline.bazt"
:placeholder="$t('PleaseSelect')+$t('recordstatus')"
:type="'select'"
:triggerChange="false" :dictCode="'recordstatus'"/>
@@ -36,10 +36,10 @@
<a-form-model-item class="itemModel" prop="filingtime">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'filingtime'})"
@change="dateChange({db_field_name:'batjs'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.filingtime"
v-model="formInline.batjs"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
@@ -54,7 +54,7 @@
</div>
<a-form-model-item class="itemModel" prop="remarks">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
v-model="formInline.remark"
v-model="formInline.bz"
:rows="4"/>
</a-form-model-item>
</div>
@@ -75,7 +75,9 @@ export default {
return {
visible: false,
confirmLoading: false,
formInline: {},
formInline: {
batjs:'',
},
rules: {
// listConfirmation: [
// {
@@ -134,7 +136,13 @@ export default {
},
methods: {
edit(row) {
console.log(row)
if(row instanceof Array){
this.ids = row
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.bz = row.bz
}
this.visible = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
@@ -145,14 +153,17 @@ export default {
if (valid) {
let query = {
...this.formInline,
id:this.ids.join(',')
}
this.confirmLoading = true
postAction('', query).then((res) => {
postAction('ota/otaBaSjList/batchRecord', {
recordList :query
}).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('settingListForm')
this.$emit('getList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
@@ -162,7 +173,10 @@ export default {
})
},
handleCancel() {
this.formInline = {}
this.formInline = {
batjs:''
}
this.ids = []
this.visible = false
},
dateChange(item) {
@@ -163,7 +163,7 @@
/>
</div>
</div>
<maintenance ref="maintenanceRef"/>
<maintenance @getList="getList" ref="maintenanceRef"/>
<upgradecompletion ref="upgradecompletionRef"/>
</a-card>
</template>
@@ -351,14 +351,14 @@ export default {
...queryParam
}
this.loading = true
getAction('/ota/otaBaSjList/list', query).then((res) => {
getAction('/ota/otaBaSjList/page', query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1
this.getList()
return
}
this.dataSource = res.result || []
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
@@ -437,7 +437,7 @@ export default {
if(this.selectedRowKeys.length < 1){
this.$message.warning(this.$t('selectLeastOne'))
}else{
this.$refs.maintenanceRef.edit()
this.$refs.maintenanceRef.edit(this.selectedRowKeys)
}
},
// 模板下载
@@ -36,11 +36,10 @@
<a-form-model-item class="itemModel" prop="filingtime">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'filingtime'})"
@change="dateChange({db_field_name:'batjs'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.batjs"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -75,7 +74,9 @@ export default {
return {
visible: false,
confirmLoading: false,
formInline: {},
formInline: {
batjs:'',
},
rules: {
// listConfirmation: [
// {
@@ -134,8 +135,12 @@ export default {
},
methods: {
edit(row) {
if(row){
this.formInline = {...row}
if(row instanceof Array){
this.ids = row
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.bz = row.bz
}
this.visible = true
this.$nextTick(() => {
@@ -147,14 +152,17 @@ export default {
if (valid) {
let query = {
...this.formInline,
id:this.ids.join(',')
}
this.confirmLoading = true
postAction('', query).then((res) => {
postAction('ota/otaBaCxList/batchRecord', {
recordList: query
}).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('settingListForm')
this.$emit('getList')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
@@ -164,7 +172,10 @@ export default {
})
},
handleCancel() {
this.formInline = {}
this.formInline = {
batjs:''
}
this.ids = []
this.visible = false
},
dateChange(item) {
@@ -161,7 +161,7 @@
/>
</div>
</div>
<maintenance ref="maintenanceRef"/>
<maintenance @getList="getList" ref="maintenanceRef"/>
</a-card>
</template>
@@ -346,14 +346,14 @@ export default {
...queryParam
}
this.loading = true
getAction('/ota/otaBaCxList/list', query).then((res) => {
getAction('/ota/otaBaCxList/page', query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1
this.getList()
return
}
this.dataSource = res.result || []
this.dataSource = res.result.records || []
this.total = res.result.total
this.loading = false
} else {
@@ -432,7 +432,7 @@ export default {
if(this.selectedRowKeys.length < 1){
this.$message.warning(this.$t('selectLeastOne'))
}else{
this.$refs.maintenanceRef.edit()
this.$refs.maintenanceRef.edit(this.selectedRowKeys)
}
},
// 模板下载