车型备案-数据导入、模板下载、历史记录对接接口

This commit is contained in:
zyx.net
2023-03-25 16:18:47 +08:00
parent 8f1c176659
commit f495f10883
7 changed files with 73 additions and 342 deletions
@@ -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:'batjs'})"
@change="dateChange({db_field_name:'batjsj'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.batjs"
v-model="formInline.batjsj"
:disabled="false"
style="width: 100%"/>
</a-form-model-item>
@@ -76,7 +76,7 @@ export default {
visible: false,
confirmLoading: false,
formInline: {
batjs:'',
batjsj:'',
},
rules: {
// listConfirmation: [
@@ -129,7 +129,7 @@ export default {
// }
// ]
},
ids: []
ids: ''
}
},
mounted() {
@@ -137,11 +137,12 @@ export default {
methods: {
edit(row) {
if(row instanceof Array){
this.ids = row
this.ids = row.join(',')
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.batjsj = row.batjsj
this.formInline.bz = row.bz
this.ids = row.id
}
this.visible = true
this.$nextTick(() => {
@@ -153,12 +154,10 @@ export default {
if (valid) {
let query = {
...this.formInline,
id:this.ids.join(',')
ids:this.ids.join(',')
}
this.confirmLoading = true
postAction('ota/otaBaSjList/batchRecord', {
recordList :query
}).then((res) => {
postAction('ota/otaBaSjList/batchRecord', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
@@ -174,9 +173,9 @@ export default {
},
handleCancel() {
this.formInline = {
batjs:''
batjsj:''
}
this.ids = []
this.ids = ''
this.visible = false
},
dateChange(item) {
@@ -281,7 +281,7 @@ export default {
align: 'left',
ellipsis: true,
width: 140,
dataIndex: 'batjs'
dataIndex: 'batjsj'
},
{
title: this.$t('createTime'),
@@ -2,29 +2,14 @@
<div class="box">
<a-row :gutter="24" style='margin-top: 30px'>
<a-col :span="24">
<div class="box-title-text">
<div class="box-title-text" v-for='(item,index) in dataSource'>
<div class="title-text">
<span class="dot"></span>
<span class="title-text-text"
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
:title="item.sjzt">{{item.sjzt}}</span>
<div class='titlebox'>
<span class='titlebox-text'>提交审批</span>
<span class='titlebox-text-text'>2023-02-02 14:13:21</span>
</div>
</div>
</div>
</a-col>
</a-row>
<a-row :gutter="24" style='margin-top: 30px'>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="dot"></span>
<span class="title-text-text"
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
<div class='titlebox'>
<span class='titlebox-text'>提交审批</span>
<span class='titlebox-text-text'>2023-02-02 14:13:21</span>
<span class='titlebox-text'>{{item.sjzt}}</span>
<span class='titlebox-text-text'>{{item.updateTime}}</span>
</div>
</div>
</div>
@@ -47,70 +32,7 @@
return {
dataSource: [],
loading: false,
url: {
list: '/todoCenter/projectProcess/doneProcess'
},
queryParam: {},
columns: [
{
title: this.$t('RelatedItems'),
align: 'left',
dataIndex: 'projectName',
ellipsis: true,
scopedSlots: { customRender: 'RelatedItems' },
width: 170
},
{
title: this.$t('standardInformation'),
align: 'left',
dataIndex: 'standardInfo',
ellipsis: true,
scopedSlots: { customRender: 'standardInformation' },
width: 170
},
{
title: this.$t('taskType'),
align: 'left',
dataIndex: 'flowTypeShow',
ellipsis: true,
width: 170
},
{
title: this.$t('Sponsor'),
align: 'left',
dataIndex: 'createBy',
ellipsis: true,
width: 170
},
{
title: this.$t('CurrentProcessor'),
align: 'left',
dataIndex: 'assigneeName',
ellipsis: true,
width: 170
},
{
title: this.$t('TaskCutOffTime'),
align: 'left',
dataIndex: 'endTime',
ellipsis: true,
width: 170
},
{
title: this.$t('taskStatus'),
align: 'left',
dataIndex: 'statusShow',
ellipsis: true,
width: 170
},
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 120,
scopedSlots: { customRender: 'operation' }
}
],
selectedRowKeys: [],
pageSize: 10,
pageNo: 1,
@@ -124,213 +46,16 @@
back(){
this.$emit('historicalrecordup')
},
monitoringProcessClick(row){
let newUrl = this.$router.resolve({
path: '/processDetails',
query: {
prcNum: row.prcNum,
prcType:row.flowType,
prcId:row.actiProcInstId,
}
})
window.open(newUrl.href, '_blank')
},
RelatedItemsClick(item) {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
id: item.projectLibraryId,
projectName: item.projectName,
projectNameId: item.projectNameId,
targetMarket: item.targetMarket,
studioEngineer:item.studioEngineer,
}
})
window.open(newUrl.href, '_blank')
},
standardInformationClick(item){
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.bussDocumentLibraryId,
}
})
window.open(newUrl.href, '_blank')
},
viewClick(row) {
let query = {}
row.router = this.$route.path
if (row.flowType == '1') {
query = {
taskDefinitionKey:row.taskDefinitionKey,
taskIds:row.taskId,
prcType:row.flowType,
prcNum:row.prcNum,
isTrue:false,
}
let newUrl = this.$router.resolve({
path: '/handshakeProcess',
query: query
})
window.open(newUrl.href, '_blank')
}else if(row.flowType == '10'){
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
id: row.projectLibraryId,
projectName: row.projectName,
projectNameId: row.projectNameId,
targetMarket: row.targetMarket,
studioEngineer:row.studioEngineer,
type:'102',
}
})
window.open(newUrl.href, '_blank')
}else if(row.flowType == '2'){
row.taskId = row.taskId + ''
if (row.taskId.length > 30) {
row.taskId = ''
}
query = {
router: row.router,
taskIds:row.taskId,
actiProcInstId: row.actiProcInstId,
projectTaskInventoryId: row.projectLawsInventoryId,
projectLibraryId:row.projectLibraryId,
id: row.projectLibraryId,
studioEngineer: row.studioEngineer,
serialNumber: row.serialNumber,
TaskKey: row.taskDefinitionKey,
isDisplay: false,
flowType: 2,
Sponsor: 'designInitiatorName',
personLiable: 'designDutyName',
typeOfDeliverables: 'designDeliverableTypeName',
deliverableTemplate: 'designDeliverableTemplate',
DueDate: 'designDueDate',
remarks: 'designRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId,
PersonChargeFeedback: row.personChargeFeedback
}
let newUrl = this.$router.resolve({
path: '/taskListProcess',
query: query
})
window.open(newUrl.href, '_blank')
}else if(row.flowType == '3'){
row.taskId = row.taskId + ''
if (row.taskId.length > 30) {
row.taskId = ''
}
query = {
router: row.router,
taskIds:row.taskId,
actiProcInstId: row.actiProcInstId,
projectTaskInventoryId: row.projectLawsInventoryId,
studioEngineer: row.studioEngineer,
projectLibraryId:row.projectLibraryId,
serialNumber: row.serialNumber,
TaskKey: row.taskDefinitionKey,
flowType: 3,
isDisplay: false,
id: row.projectLibraryId,
Sponsor: 'prehomoInitiatorName',
personLiable: 'prehomoDutyName',
typeOfDeliverables: 'prehomoDeliverableTypeName',
deliverableTemplate: 'prehomoDeliverableTemplate',
DueDate: 'prehomoDueDate',
remarks: 'prehomoRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId,
PersonChargeFeedback: row.personChargeFeedback
}
let newUrl = this.$router.resolve({
path: '/taskListProcess',
query: query
})
window.open(newUrl.href, '_blank')
}else if(row.flowType == '4'){
row.taskId = row.taskId + ''
if (row.taskId.length > 30) {
row.taskId = ''
}
query = {
router: row.router,
taskIds: row.taskId,
actiProcInstId: row.actiProcInstId,
id: row.projectLibraryId,
projectLibraryId: row.projectLibraryId,
studioEngineer: row.studioEngineer,
serialNumber: row.serialNumber,
projectTaskInventoryId: row.projectLawsInventoryId,
TaskKey: row.taskDefinitionKey,
flowType: 4,
isDisplay: false,
Sponsor: 'verifyInitiatorName',
personLiable: 'verifyDutyName',
typeOfDeliverables: 'verifyDeliverableTypeName',
deliverableTemplate: 'verifyDeliverableTemplate',
DueDate: 'verifyDueDate',
remarks: 'verifyRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId,
PersonChargeFeedback: row.personChargeFeedback
}
let newUrl = this.$router.resolve({
path: '/taskListProcess',
query: query
})
window.open(newUrl.href, '_blank')
}
},
searchQuery(value) {
this.queryParam = value
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
pageOnChange(page) {
this.pageNo = page
this.getList()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
if (queryParam[val] instanceof Array) {
queryParam[val] = queryParam[val].join(',')
}
})
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...queryParam
}
this.loading = true
getAction(this.url.list, query).then((res) => {
getAction('ota/otaBaCxLsjl/list', 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.records || []
this.total = res.result.total
this.dataSource = res.result || []
this.loading = false
} else {
this.loading = false
@@ -294,4 +294,8 @@
color: #00B3BE;
border-color: #00B3BE;
}
::v-deep .ant-table-row:first-child {
background: #fff !important;
opacity: 3.9 !important;
}
</style>
@@ -37,7 +37,11 @@
</span>
<!-- 上传附件-->
<span slot="architecturetopologydiagram" slot-scope="text,record">
<a-button @click="clickButtonToUpload" type="primary">{{$t('uploadattachment')}}</a-button>
<a-button @click="clickButtonToUpload(record.tpt,record.key)" type="primary">
{{ (record.tpt === 'null' || record.tpt === '' ||
record.tpt == null) ? $t('uploadattachment') : $t('viewUploadedFiles')
}}
</a-button>
</span>
<span slot="electronicController" slot-scope="text,record">
<a-input :placeholder="$t('ifNot')" v-model="record.kzqmc"></a-input>
@@ -248,7 +252,8 @@
scopedSlots: { customRender: 'operation' }
}
],
form:[{}]
form:[{}],
type:'',
}
},
mounted() {
@@ -292,22 +297,31 @@
this.$emit('upgradedonlinedown')
},
uploadSuccess(data) {
// let attIdList = []
// if (data && data.length > 0) {
// data.map(item => {
// attIdList.push({
// id:item.id,
// fileName:item.fileName
// })
// })
// }
console.log(data)
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
// /** 赋值给当前对应的表单文件 */
// this.fileList.uploadName = attIdList
// this.fileList.uploadName = attIdList.join(',')
// this.fileList.certifyingmaterials = this.$t('viewFile')
},
clickButtonToUpload() {
clickButtonToUpload(current,index) {
console.log(current)
this.type = index
console.log(this.type)
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = current
getAction('sys/common/getFileInfos', { id: current }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
//中间加
addlineAtMid(record){
@@ -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:'batjs'})"
@change="dateChange({db_field_name:'batjsj'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.batjs"
v-model="formInline.batjsj"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -75,7 +75,9 @@ export default {
visible: false,
confirmLoading: false,
formInline: {
batjs:'',
bazt:'',
batjsj:'',
bz:'',
},
rules: {
// listConfirmation: [
@@ -128,7 +130,7 @@ export default {
// }
// ]
},
ids: []
ids: ''
}
},
mounted() {
@@ -136,11 +138,12 @@ export default {
methods: {
edit(row) {
if(row instanceof Array){
this.ids = row
this.ids = row.join(',')
}else{
this.formInline.bazt = row.bazt
this.formInline.batjs = row.batjs
this.formInline.batjsj = row.batjsj
this.formInline.bz = row.bz
this.ids = row.id
}
this.visible = true
this.$nextTick(() => {
@@ -152,12 +155,10 @@ export default {
if (valid) {
let query = {
...this.formInline,
id:this.ids.join(',')
ids:this.ids
}
this.confirmLoading = true
postAction('ota/otaBaCxList/batchRecord', {
recordList: query
}).then((res) => {
postAction('ota/otaBaCxList/batchRecord', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
@@ -173,9 +174,10 @@ export default {
},
handleCancel() {
this.formInline = {
batjs:''
}
this.ids = []
bazt:'',
batjsj:'',
bz:'',}
this.ids = ''
this.visible = false
},
dateChange(item) {
@@ -137,7 +137,7 @@
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { getAction, postAction, deleteAction,downloadFile } from '@/api/manage'
import maintenance from './components/maintenance'
import { mapGetters } from 'vuex'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
@@ -156,7 +156,8 @@ export default {
url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/page',
deleteBatch: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/deleteBatch',
exportData: ''
exportData: '/ota/otaBaCxList/exportData',
importZipUrl: '/ota/otaBaCxList/importData',//导入
},
visible: false,
loading: false,
@@ -248,7 +249,7 @@ export default {
align: 'left',
ellipsis: true,
width: 140,
dataIndex: 'batjs'
dataIndex: 'batjsj'
},
{
title: this.$t('createTime'),
@@ -343,7 +344,7 @@ export default {
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
deleteAction('ota/otaBaCxList/delete', { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
@@ -370,26 +371,12 @@ export default {
},
// 导出
handleExport(row) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let text = ''
let text = '车型及功能备案' + row.ggpc
let flag
if (this.activeTab == this.$t('ImplementationDate')) {
flag = 0
text = this.$t('ImplementationDate')
} else {
text = this.$t('vehicleInProductionDate')
flag = 1
}
let query = {
id: selectedRowKeys.join(','),
...this.searchParmes,
flag: flag
otaId: row.id
}
downloadFile(this.url.exportData, text + '.xls', query, this.Deselect)
},
// 结束升级
endUpgrade() {
this.$refs.upgradecompletionRef.addModel()
downloadFile(this.url.exportData, text + '.zip', query, this.Deselect)
},
// 查看
detailclick() {
@@ -409,7 +396,7 @@ export default {
},
// 模板下载
handleModule() {
downloadFile('params/paramsInfo/exportTemplate', this.$t('parameterTemplateExportName') + '.xlsx', {})
downloadFile('ota/otaBaCxList/exportTemplate', '车型及功能备案' + '.zip', {})
},
}
}