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', returntofill:'Return to fill',
thereAreCurrentlyNoRegulationsToHandle:'There are currently no regulations to handle', thereAreCurrentlyNoRegulationsToHandle:'There are currently no regulations to handle',
certificationSubmission:'Certification Submission', 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:'催办流程', expeditionProcess:'催办流程',
thereAreCurrentlyNoRegulationsToHandle:'当前没有可处理的法规', thereAreCurrentlyNoRegulationsToHandle:'当前没有可处理的法规',
certificationSubmission:'认证提交', certificationSubmission:'认证提交',
upgradecompletion:'升级完成情况',
implementedupgrade:'实施的升级是否和备案一致',
numberofvehicles:'完成升级的车辆数',
vehicleshavenotcompletedonlineupgrade:'部分车辆未完在线升级的原因',
cause:'原因',
implementationrecords:'故障处置措施和应急响应实施记录',
} }
@@ -19,7 +19,7 @@
{{$t('recordstatus')}}</span> {{$t('recordstatus')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="recordstatus"> <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')" :placeholder="$t('PleaseSelect')+$t('recordstatus')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'recordstatus'"/> :triggerChange="false" :dictCode="'recordstatus'"/>
@@ -36,10 +36,10 @@
<a-form-model-item class="itemModel" prop="filingtime"> <a-form-model-item class="itemModel" prop="filingtime">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')" :placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'filingtime'})" @change="dateChange({db_field_name:'batjs'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.filingtime" v-model="formInline.batjs"
:disabled="false" :disabled="false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
@@ -54,7 +54,7 @@
</div> </div>
<a-form-model-item class="itemModel" prop="remarks"> <a-form-model-item class="itemModel" prop="remarks">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')" <a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
v-model="formInline.remark" v-model="formInline.bz"
:rows="4"/> :rows="4"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -75,7 +75,9 @@ export default {
return { return {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
formInline: {}, formInline: {
batjs:'',
},
rules: { rules: {
// listConfirmation: [ // listConfirmation: [
// { // {
@@ -134,7 +136,13 @@ export default {
}, },
methods: { methods: {
edit(row) { 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.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
@@ -145,14 +153,17 @@ export default {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline, ...this.formInline,
id:this.ids.join(',')
} }
this.confirmLoading = true this.confirmLoading = true
postAction('', query).then((res) => { postAction('ota/otaBaSjList/batchRecord', {
recordList :query
}).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.$emit('settingListForm') this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
@@ -162,7 +173,10 @@ export default {
}) })
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {
batjs:''
}
this.ids = []
this.visible = false this.visible = false
}, },
dateChange(item) { dateChange(item) {
@@ -163,7 +163,7 @@
/> />
</div> </div>
</div> </div>
<maintenance ref="maintenanceRef"/> <maintenance @getList="getList" ref="maintenanceRef"/>
<upgradecompletion ref="upgradecompletionRef"/> <upgradecompletion ref="upgradecompletionRef"/>
</a-card> </a-card>
</template> </template>
@@ -351,14 +351,14 @@ export default {
...queryParam ...queryParam
} }
this.loading = true this.loading = true
getAction('/ota/otaBaSjList/list', query).then((res) => { getAction('/ota/otaBaSjList/page', query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
return return
} }
this.dataSource = res.result || [] this.dataSource = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -437,7 +437,7 @@ export default {
if(this.selectedRowKeys.length < 1){ if(this.selectedRowKeys.length < 1){
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ }else{
this.$refs.maintenanceRef.edit() this.$refs.maintenanceRef.edit(this.selectedRowKeys)
} }
}, },
// 模板下载 // 模板下载
@@ -36,11 +36,10 @@
<a-form-model-item class="itemModel" prop="filingtime"> <a-form-model-item class="itemModel" prop="filingtime">
<a-date-picker class="box-input" <a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('filingtime')" :placeholder="$t('PleaseSelect')+$t('filingtime')"
@change="dateChange({db_field_name:'filingtime'})" @change="dateChange({db_field_name:'batjs'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode" :getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.batjs" v-model="formInline.batjs"
:disabled="false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -75,7 +74,9 @@ export default {
return { return {
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
formInline: {}, formInline: {
batjs:'',
},
rules: { rules: {
// listConfirmation: [ // listConfirmation: [
// { // {
@@ -134,8 +135,12 @@ export default {
}, },
methods: { methods: {
edit(row) { edit(row) {
if(row){ if(row instanceof Array){
this.formInline = {...row} this.ids = row
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.bz = row.bz
} }
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
@@ -147,14 +152,17 @@ export default {
if (valid) { if (valid) {
let query = { let query = {
...this.formInline, ...this.formInline,
id:this.ids.join(',')
} }
this.confirmLoading = true this.confirmLoading = true
postAction('', query).then((res) => { postAction('ota/otaBaCxList/batchRecord', {
recordList: query
}).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.confirmLoading = false this.confirmLoading = false
this.$emit('settingListForm') this.$emit('getList')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
@@ -164,7 +172,10 @@ export default {
}) })
}, },
handleCancel() { handleCancel() {
this.formInline = {} this.formInline = {
batjs:''
}
this.ids = []
this.visible = false this.visible = false
}, },
dateChange(item) { dateChange(item) {
@@ -161,7 +161,7 @@
/> />
</div> </div>
</div> </div>
<maintenance ref="maintenanceRef"/> <maintenance @getList="getList" ref="maintenanceRef"/>
</a-card> </a-card>
</template> </template>
@@ -346,14 +346,14 @@ export default {
...queryParam ...queryParam
} }
this.loading = true this.loading = true
getAction('/ota/otaBaCxList/list', query).then((res) => { getAction('/ota/otaBaCxList/page', query).then((res) => {
if (res.success) { if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) { if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = 1 this.pageNo = 1
this.getList() this.getList()
return return
} }
this.dataSource = res.result || [] this.dataSource = res.result.records || []
this.total = res.result.total this.total = res.result.total
this.loading = false this.loading = false
} else { } else {
@@ -432,7 +432,7 @@ export default {
if(this.selectedRowKeys.length < 1){ if(this.selectedRowKeys.length < 1){
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
}else{ }else{
this.$refs.maintenanceRef.edit() this.$refs.maintenanceRef.edit(this.selectedRowKeys)
} }
}, },
// 模板下载 // 模板下载