Files
laws_weilai/jero-web/src/views/toDoCenter/regulatoryAssessmentTasks/components/dealtWith.vue
T
2022-10-21 11:25:16 +08:00

203 lines
5.3 KiB
Java

<template>
<div class="box">
<a-table
ref="table"
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
rowKey="id"
:data-source="dataSource"
:columns="columns"
>
<!-- -->
<span slot="operation" slot-scope="text,record">
<a class="text-operation"
@click="ProcessingClick(record)">{{$t('Processing')}}</a>
</span>
<span slot="standardInformation" slot-scope="text,record">
<a @click="standardInformationClick(record)" :title="text">{{text}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
export default {
name: 'dealtWith',
data() {
return {
dataSource: [],
loading: false,
columns: [
{
title: this.$t('standardInformation'),
align: 'center',
dataIndex: 'serialNumber',
scopedSlots: { customRender: 'standardInformation' },
ellipsis: true,
width: 170
},
{
title: this.$t('taskType'),
align: 'center',
dataIndex: 'flowTypeShow',
ellipsis: true,
width: 170
},
{
title: this.$t('Sponsor'),
align: 'center',
dataIndex: 'createBy',
ellipsis: true,
width: 170
},
{
title: this.$t('TaskCutOffTime'),
align: 'center',
dataIndex: 'endTime',
ellipsis: true,
width: 170
},
{
title: this.$t('taskStatus'),
align: 'center',
dataIndex: 'statusShow',
ellipsis: true,
width: 170
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 120,
scopedSlots: { customRender: 'operation' }
}
],
selectedRowKeys: [],
pageSize: 10,
pageNo: 1,
url: {
list: '/todoCenter/lawsAssess/todoTaskList'
},
total: 0,
queryParam: {}
}
},
methods: {
standardInformationClick(item) {
let newUrl = this.$router.resolve({
path: '/docManage/library/detail',
query: {
id: item.bussDocumentLibraryId
}
})
window.open(newUrl.href, '_blank')
},
searchQuery(value) {
this.queryParam = value
this.pageNo = 1
this.getList()
},
searchReset() {
this.queryParam = {}
this.pageNo = 1
this.getList()
},
ProcessingClick(row){
row.router = this.$route.path
let query = {}
if (row.flowType == '5') {
query = {
prcId:row.actiProcInstId,
taskIds:row.taskId,
prcType:row.flowType,
router:row.router,
prcNum:row.prcNum,
taskDefinitionKey:row.taskDefinitionKey,
isDisabled:false
}
let newUrl = this.$router.resolve({
path: '/regulatoryProcessReview',
query: query
})
window.open(newUrl.href, '_blank')
} else if (row.flowType == '6') {
query = {
taskDefinitionKey:row.taskDefinitionKey,
taskIds:row.taskId,
prcType:row.flowType,
prcNum:row.prcNum,
prcId:row.actiProcInstId,
router:row.router,
isDisabled:false,
}
let newUrl = this.$router.resolve({
path: '/evaluationProcess',
query: query
})
window.open(newUrl.href, '_blank')
}
},
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) => {
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.loading = false
} else {
this.loading = false
}
})
}
}
}
</script>
<style scoped>
.page {
text-align: right;
margin-top: 20px;
}
</style>