市场认证清单-导入,导入成功后没有自动刷新列表

This commit is contained in:
范强强
2023-03-24 15:02:59 +08:00
parent 018b59fd6b
commit 0d4544f85c
5 changed files with 50 additions and 23 deletions
+1 -1
View File
@@ -1708,6 +1708,6 @@ module.exports = {
vehicleshavenotcompletedonlineupgrade:'The reason why some vehicles have not completed online upgrade',
cause:'cause',
implementationrecords:'Fault handling measures and emergency response implementation records',
onlyDataWithListStatusDraftCanBeDeleted:'Only data with a list status of Draft can be deleted',
}
+1
View File
@@ -1808,4 +1808,5 @@ module.exports = {
vehicleshavenotcompletedonlineupgrade:'部分车辆未完在线升级的原因',
cause:'原因',
implementationrecords:'故障处置措施和应急响应实施记录',
onlyDataWithListStatusDraftCanBeDeleted:'只能删除清单状态为草稿的数据',
}
@@ -55,7 +55,7 @@
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
rowKey="id"
:rowKey="(record)=>JSON.stringify(record)"
:data-source="dataSource"
@change="tableOnChange"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@@ -69,13 +69,13 @@
<a class="text-operation" @click="edit(record)"
v-has="'dummyInventoryBase:deleteBatch'"
:disabled="record.state == 1?true:false">{{$t('edit')}}</a>
<!-- v-if="record.createBy == userData.username || administrators"-->
<!-- v-if="record.createBy == userData.username || administrators"-->
<a class="text-operation"
v-has="'dummyInventoryBase:issue'"
@click="withdraw(record)">
{{record.state == 2 ? $t('release') : $t('withdraw')}}
</a>
<!-- v-if="record.createBy == userData.username || administrators"-->
<!-- v-if="record.createBy == userData.username || administrators"-->
<a class="text-operation" :disabled="record.state == 1?true:false"
v-has="'dummyInventoryBase:deleteBatch'"
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
@@ -84,7 +84,7 @@
:disabled="record.state == 2?true:false" @click="subscribe(record)">
{{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</a>
<!-- v-if="record.createBy == userData.username || administrators"-->
<!-- v-if="record.createBy == userData.username || administrators"-->
<a class="text-operation" :disabled="record.state == 1?true:false"
v-has="'dummyInventoryBase:deleteBatch'"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
@@ -248,7 +248,7 @@
}
],
queryParam: {},
administrators:false,
administrators: false,
orderBy: '1',
orderByField: ''
}
@@ -282,7 +282,12 @@
setCreatorClick() {
if (this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.$refs.setCreatorRef.getPush(selectedRowKeys.join(','))
let idList = []
for (let i = 0; i < selectedRowKeys.length; i++) {
selectedRowKeys[i] = JSON.parse(selectedRowKeys[i])
idList.push(selectedRowKeys[i].id)
}
this.$refs.setCreatorRef.getPush(idList.join(','))
} else {
this.$message.warning(this.$t('PleaseSelectData'))
}
@@ -300,21 +305,37 @@
handleDel() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
let idList = []
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
for (let i = 0; i < selectedRowKeys.length; i++) {
selectedRowKeys[i] = JSON.parse(selectedRowKeys[i])
if (selectedRowKeys[i].state == 1) {
isTrue = false
break
} else {
isTrue = true
idList.push(selectedRowKeys[i].id)
}
})
}
if (isTrue) {
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
getAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
} else {
this.$message.warning(this.$t('onlyDataWithListStatusDraftCanBeDeleted'))
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
@@ -280,6 +280,7 @@
let _this = this
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
let idList = []
for (let i = 0; i < selectedRowKeys.length; i++) {
selectedRowKeys[i] = JSON.parse(selectedRowKeys[i])
if (selectedRowKeys[i].state == 1) {
@@ -287,13 +288,13 @@
break
} else {
isTrue = true
idList.push(selectedRowKeys[i].id)
}
}
if (isTrue){
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
@@ -306,7 +307,7 @@
}
})
}else{
this.$message.warning(this.$t(''))
this.$message.warning(this.$t('onlyDataWithListStatusDraftCanBeDeleted'))
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
@@ -103,6 +103,7 @@
<!-- v-if="isTrue"-->
<div v-if="isTrue" class="operator-text" v-has="'dummyInventoryInfo:importData'">
<ImportFile :url="url" :authDummyInventoryBaseId="$route.query.id" :isTrue="true"
@getList="getPersonnelList"
:accept="'.zip'"/>
</div>
<!-- 模板下载-->
@@ -498,6 +499,9 @@
}
this.getList()
},
getPersonnelList(){
this.getList()
},
getList() {
let query = {
...this.queryParam,