Files
laws_weilai/jero-web/src/views/toDoCenter/projectRegulationTasks/components/dealtWith.vue
T

638 lines
18 KiB
Java

<template>
<div class="box">
<a-table
ref="table"
size="middle"
:components="drag(columns,'columns')"
:loading="loading"
:pagination="false"
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
:rowKey="(record)=>JSON.stringify(record)"
:data-source="dataSource"
:columns="columns"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
>
<!-- -->
<span slot="endTime" slot-scope="text,record">
<span :title="text" :class="{'activeRed':record.endTimePastDueFlag}">{{text}}</span>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation"
@click="ProcessingClick(record)">{{$t('Processing')}}</a>
</span>
<span slot="RelatedItems" slot-scope="text,record">
<a @click="RelatedItemsClick(record)" :title="text">{{text}}</a>
</span>
<span slot="standardInformation" slot-scope="text,record">
<a @click="standardInformationClick(record)" v-if="text && text != '--'" :title="text">
{{text}}
</a>
<span v-else>--</span>
</span>
<span slot="taskStatus" slot-scope="text,record">
<span>{{text ? text : '--'}}</span>
</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>
<designCompliance ref="designComplianceRef" @designComplianceList="designComplianceList"/>
<confirmation-drawer ref="confirmationdrawer"
@confirmationdrawerList="confirmationdrawerList"></confirmation-drawer>
</div>
</template>
<script>
import { getAction, postAction, deleteAction } from '@/api/manage'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import designCompliance from './designCompliance'
import confirmationDrawer from './confirmationDrawer'
export default {
name: 'dealtWith',
components: {
confirmationDrawer,
designCompliance
},
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
return {
visible: false,
title: '',
queryForm: {},
dataSource: [],
loading: false,
columns: [
{
title: this.$t('RelatedItems'),
align: 'left',
dataIndex: 'projectName',
ellipsis: true,
scopedSlots: { customRender: 'RelatedItems' },
width: 150
},
{
title: this.$t('standardInformation'),
align: 'left',
dataIndex: 'standardInfo',
ellipsis: true,
scopedSlots: { customRender: 'standardInformation' },
width: 260
},
{
title: this.$t('taskType'),
align: 'left',
dataIndex: 'flowTypeShow',
ellipsis: true,
width: 170
},
{
title: this.$t('Tasknode'),
align: 'left',
dataIndex: 'taskDefinitionKeyName',
ellipsis: true,
width: 170
},
{
title: this.$t('typeOfDeliverables'),
align: 'left',
dataIndex: 'deliverableTypeName',
ellipsis: true,
width: 170
},
{
title: this.$t('Sponsor'),
align: 'left',
dataIndex: 'createBy',
ellipsis: true,
width: 100
},
{
title: this.$t('TaskCutOffTime'),
align: 'left',
dataIndex: 'endTime',
ellipsis: true,
width: 160,
scopedSlots: { customRender: 'endTime' }
},
// {
// title: this.$t('taskStatus'),
// align: 'left',
// dataIndex: 'statusShow',
// ellipsis: true,
// width: 170,
// scopedSlots: { customRender: 'taskStatus' }
// },
{
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 120,
scopedSlots: { customRender: 'operation' }
}
],
Historycolumns: [
{
title: this.$t('Operator'),
align: 'left',
dataIndex: '',
ellipsis: true,
width: 170
},
{
title: this.$t('Tasknode'),
align: 'left',
dataIndex: '',
ellipsis: true,
width: 170
},
{
title: this.$t('OperationTime'),
align: 'left',
dataIndex: '',
ellipsis: true,
width: 170
},
{
title: this.$t('resultofhandling'),
align: 'left',
dataIndex: '',
ellipsis: true,
width: 170
},
{
title: this.$t('OperationContent'),
align: 'left',
dataIndex: '',
ellipsis: true,
width: 210
}
],
selectedRowKeys: [],
pageSize: 10,
pageNo: 1,
total: 0,
url: {
list: '/todoCenter/projectProcess/todoTaskList',
urlFrom: 'project/projectLibraryBase/queryById'
},
queryParam: {},
regulatoryCertificationTaskPlanList: []
}
},
mounted() {
if (this.$route.query.projectName) {
this.queryParam.projectName = this.$route.query.projectName
}
this.getList()
},
methods: {
getData(name) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.confirmationdrawer.confirmation(JSON.parse(JSON.stringify(this.selectedRowKeys)), name)
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
onSelectChange(value) {
this.selectedRowKeys = value
},
designComplianceList() {
this.getList()
},
confirmationdrawerList() {
this.selectedRowKeys = []
this.getList()
},
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')
},
ProcessingClick(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: true
}
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 == '21') {
let newUrl = this.$router.resolve({
path: '/ProjectDetails',
query: {
id: row.projectLibraryId,
projectName: row.projectName,
projectNameId: row.projectNameId,
targetMarket: row.targetMarket,
studioEngineer: row.studioEngineer,
type: '106'
}
})
window.open(newUrl.href, '_blank')
} else if (row.flowType == '2') {
row.taskId = row.taskId + ''
if (row.taskId.length > 30) {
row.taskId = ''
}
let designDueDate = ''
if (row.taskDefinitionKey == 'zrrqr' || row.taskDefinitionKey == 'dezrrqr') {
designDueDate = 'endTime'
} else {
designDueDate = 'designDueDate'
}
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: true,
flowType: 2,
Sponsor: 'regulationOwnerName',
personLiable: 'designDutyIdName',
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')
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), this.$t('designComplianceReview'))
} 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: true,
id: row.projectLibraryId,
Sponsor: 'regulationOwnerName',
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 = ''
}
let verifyDueDate = ''
if (row.taskDefinitionKey == 'zrrqr' || row.taskDefinitionKey == 'dezrrqr') {
verifyDueDate = 'endTime'
} else {
verifyDueDate = 'verifyDueDate'
}
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: true,
Sponsor: 'regulationOwnerName',
personLiable: 'verifyDutyIdName',
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')
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), this.$t('verificationComplianceReview'))
}
},
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) => {
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
}
})
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.page {
text-align: right;
margin-top: 20px;
}
.activeRed {
color: red;
}
.header-text {
/*font-size: 16px;*/
font-size: 14px;
font-weight: bold;
/*margin-left: 15px;*/
/*border-bottom: 1px #d9d9d9 dashed;*/
/*height: 30px;*/
height: 24px;
/*margin-bottom: 30px;*/
margin-bottom: 20px;
}
.text-field-left {
width: 124px;
display: inline-block;
font-size: 14px;
font-weight: 400;
color: #6F7385;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
margin-right: 24px;
}
.content-text {
width: 100%;
display: flex;
flex-wrap: wrap;
.text-field {
width: 50%;
margin-bottom: 8px;
.text-field-right {
width: calc(100% - 200px);
display: inline-block;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-break: break-word;
color: #040B29;
font-weight: 400;
}
.text-field-right-url {
color: #00B3BE !important;
cursor: pointer;
}
}
}
.itemModel {
width: 100%;
display: inline-block;
margin-top: 2px;
margin-bottom: 12px;
}
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 88px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 48px;
color: #000F16;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
//.box-input {
// display: inline-block;
// height: 38px;
// width: 100%;
//}
//
//.button-text {
// height: 38px;
// width: calc(100% - 250px);
// line-height: 38px;
// background: #fff;
// border: 1px #00B3BE solid;
// color: #00B3BE;
//}
.process-content {
margin-top: 4px;
position: relative;
margin-bottom: 20px;
.process-content-content {
background: #fff;
z-index: 1;
padding: 0 20px;
.process-content-left {
float: left;
}
.process-content-right {
float: left;
margin-left: 7px;
.process-content-right-top {
font-size: 14px;
font-weight: 400;
color: #040B29;
max-width: 155px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
//.process-content-right-button {
// max-width: 155px;
// font-size: 12px;
// font-weight: 400;
// color: #6F7385;
// margin-top: -4px;
//}
}
}
.process-content-content:first-child {
padding: 0 20px 0 0;
}
.process-content-content:last-child {
padding: 0 0 0 20px;
}
.process-content-right-xian {
height: 2px;
width: calc(100% - 27px);
background: #E6E6E9;
position: absolute;
top: 16px;
}
}
.drawer-bootom-button {
position: absolute;
bottom: 0;
z-index: 100;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>