对接项目库列表
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<span>{{$t('entryName')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('entryName')"
|
||||
v-model="queryParam.entryName"></a-input>
|
||||
v-model="queryParam.projectName"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -40,7 +40,7 @@
|
||||
<span>{{$t('StudioEngineer')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('StudioEngineer')"
|
||||
v-model="queryParam.StudioEngineer"></a-input>
|
||||
v-model="queryParam.studioEngineer"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
</template>
|
||||
@@ -98,12 +98,12 @@
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<addModel ref="addModelRef"/>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import addModel from '../components/addModel'
|
||||
|
||||
export default {
|
||||
@@ -122,11 +122,11 @@
|
||||
dataSource: [],
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list:'project/projectLibraryBase/list',
|
||||
add:'project/projectLibraryBase/add',
|
||||
edit:'project/projectLibraryBase/edit',
|
||||
deleteBatch:'project/projectLibraryBase/delete',
|
||||
deleteAll:'project/projectLibraryBase/deleteBatch',
|
||||
list: 'project/projectLibraryBase/page',
|
||||
add: 'project/projectLibraryBase/add',
|
||||
edit: 'project/projectLibraryBase/edit',
|
||||
deleteBatch: 'project/projectLibraryBase/delete',
|
||||
deleteAll: 'project/projectLibraryBase/deleteBatch'
|
||||
},
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
@@ -142,37 +142,32 @@
|
||||
{
|
||||
title: this.$t('targetMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'targetMarket'
|
||||
dataIndex: 'targetMarket_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('projectStatus'),
|
||||
align: 'center',
|
||||
dataIndex: 'projectStatus'
|
||||
dataIndex: 'projectStatus_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('StudioEngineer'),
|
||||
align: 'center',
|
||||
dataIndex: 'studioEngineer'
|
||||
dataIndex: 'studioEngineerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('certifiedEngineer'),
|
||||
align: 'center',
|
||||
dataIndex: 'certificationEngineer'
|
||||
dataIndex: 'certificationEngineerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('CertificationTime'),
|
||||
title: this.$t('ModelPlatform'),
|
||||
align: 'center',
|
||||
dataIndex: 'createTime'
|
||||
dataIndex: 'vehiclePlatform_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('NTplatform'),
|
||||
title: this.$t('DigitalPlatform'),
|
||||
align: 'center',
|
||||
dataIndex: 'NTplatform'
|
||||
},
|
||||
{
|
||||
title: this.$t('NPplatform'),
|
||||
align: 'center',
|
||||
dataIndex: 'NPplatform'
|
||||
dataIndex: 'digitalPlatform_dictText'
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
@@ -186,7 +181,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
handleToggleSearch() {
|
||||
@@ -201,56 +196,99 @@
|
||||
},
|
||||
//批量删除
|
||||
handleDel() {
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/ProjectDetails',
|
||||
query: {}
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
if (this.selectedRowKeys.length > 0) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmBatchDeletion'),
|
||||
onOk() {
|
||||
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
|
||||
deleteAction(_this.url.deleteAll, { ids: idList.join(',') }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.selectedRowKeys = []
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
edit(item) {
|
||||
this.title = '编辑'
|
||||
this.formInline = item
|
||||
this.visible = true
|
||||
},
|
||||
//撤回
|
||||
withdraw() {
|
||||
|
||||
},
|
||||
//维护清单
|
||||
maintenanceList() {
|
||||
|
||||
},
|
||||
//订阅
|
||||
subscribe() {
|
||||
|
||||
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item)))
|
||||
},
|
||||
//删除
|
||||
deleteLib(item) {
|
||||
|
||||
deleteLib(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
onOk() {
|
||||
deleteAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.getList()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//虚拟清单名称事件
|
||||
entryNameClick(item) {
|
||||
|
||||
let newUrl = this.$router.resolve({
|
||||
path: '/ProjectDetails',
|
||||
query: item
|
||||
})
|
||||
window.open(newUrl.href, '_blank')
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
searchReset() {
|
||||
this.pageNo = 1
|
||||
this.queryParam = {}
|
||||
this.getList()
|
||||
},
|
||||
pageOnChange(page, pageSize) {
|
||||
this.pageNo = page
|
||||
this.getList()
|
||||
},
|
||||
SizeChange(page, pageSize) {
|
||||
this.pageNo = 1
|
||||
this.pageSize = pageSize
|
||||
this.getList()
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
addModelList() {
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
handleSubmit() {
|
||||
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
...this.queryParam
|
||||
}
|
||||
this.loading = true
|
||||
postAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
if (res.result.current > 1 && res.result.records.length == 0) {
|
||||
this.pageNo = res.result.current - 1
|
||||
this.getList()
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.records || []
|
||||
this.total = res.result.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user