585 lines
18 KiB
Java
585 lines
18 KiB
Java
<template>
|
|
<a-card :bordered="false">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row :gutter="24">
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" :title="$t('standard')">
|
|
<span>{{$t('standard')}}</span>
|
|
</div>
|
|
<j-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standard')"
|
|
v-model="queryParam.serialNumber"></j-input>
|
|
</div>
|
|
</a-col>
|
|
<a-col :md="6" :sm="8">
|
|
<div class="box-title-text">
|
|
<div class="title-text" style="width: 64px" :title="$t('areaOfResponsibility')">
|
|
<span>{{$t('areaOfResponsibility')}}</span>
|
|
</div>
|
|
<j-dict-select-tag class="box-input" v-model="queryParam.dutyTerritory"
|
|
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
|
:type="'select'"
|
|
:triggerChange="false" :dictCode="'duty_territory'"/>
|
|
</div>
|
|
</a-col>
|
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
|
</a-col>
|
|
</span>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<div class="table-operator">
|
|
<div @click="CertificationDirectory" class="operator-text">
|
|
<a-icon type="bulb"/>
|
|
{{$t('CertificationDirectory')}}
|
|
</div>
|
|
<div @click="handleExport" class="operator-text">
|
|
<a-icon type="export" :rotate="-90"/>
|
|
{{$t('export')}}
|
|
</div>
|
|
</div>
|
|
<div style="width: 100%">
|
|
<a-table
|
|
ref="table"
|
|
bordered
|
|
:loading="loading"
|
|
:pagination="false"
|
|
:scroll="{x: true}"
|
|
:data-source="dataSource"
|
|
:columns="columns"
|
|
>
|
|
<div slot="standardInformation" slot-scope="text,result" class="box-left">
|
|
<div class="content">
|
|
<a class="box-content-a">{{result.serialNumber}}</a><br/>
|
|
<a>{{result.title}}</a>
|
|
</div>
|
|
</div>
|
|
<div slot="areaOfResponsibility" slot-scope="text,result" class="box-left">
|
|
<div class="content" v-if="result.dutyTerritory_dictText">
|
|
<span v-for="(item,index) in result.dutyTerritory_dictText.split(',')">
|
|
<span class="box-content-index">{{item}}</span><br/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div slot="confirmationOfDesignConformity" slot-scope="text,result" class="box-left">
|
|
<div class="content" v-if="result.designTaskStatus" @click="verifyTaskClick(result,1,false)">
|
|
<span class="box-content">{{$t('Deadline')}}: {{result.designDueDate}}</span><br/>
|
|
<span class="box-content">{{$t('ProcessStatus')}}: {{result.designStatus}}</span><br/>
|
|
<span class="box-content-color"
|
|
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
|
|
:class="color[result.designFlowTaskStatus]">
|
|
{{statusText[result.designFlowTaskStatus]}}
|
|
</span>
|
|
</div>
|
|
<div class="content-box" v-if="result.designTaskStatus == 'NotDone'" @click="verifyTaskClick(result,1,true)">
|
|
<div class="content-box-jiao"></div>
|
|
</div>
|
|
</div>
|
|
<div slot="PrehomoConfirmation" slot-scope="text,result" class="box-left">
|
|
<div class="content" v-if="result.prehomoTaskStatus" @click="verifyTaskClick(result,2,false)">
|
|
<span class="box-content">{{$t('Deadline')}}: {{result.prehomoDueDate}}</span><br/>
|
|
<span class="box-content">{{$t('ProcessStatus')}}: {{result.prehomoStatus}}</span><br/>
|
|
<span class="box-content-color"
|
|
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
|
|
:class="color[result.prehomoFlowTaskStatus]">
|
|
{{statusText[result.prehomoFlowTaskStatus]}}
|
|
</span>
|
|
</div>
|
|
<div class="content-box" v-if="result.prehomoTaskStatus == 'NotDone'" @click="verifyTaskClick(result,2,true)">
|
|
<div class="content-box-jiao"></div>
|
|
</div>
|
|
</div>
|
|
<div slot="verificationAndConformityconfirmation" slot-scope="text,result" class="box-left">
|
|
<div class="content" v-if="result.verifyTaskStatus" @click="verifyTaskClick(result,3,false)">
|
|
<span class="box-content">{{$t('Deadline')}}: {{result.verifyDueDate}}</span><br/>
|
|
<span class="box-content">{{$t('ProcessStatus')}}: {{result.verifyStatus}}</span><br/>
|
|
<span class="box-content-color"
|
|
:style="{'width':long=='zh-cn'?'78px' : '138px'}"
|
|
:class="color[result.verifyFlowTaskStatus]">
|
|
{{statusText[result.verifyFlowTaskStatus]}}
|
|
</span>
|
|
</div>
|
|
<div class="content-box" v-if="result.verifyTaskStatus == 'NotDone'" @click="verifyTaskClick(result,3,true)">
|
|
<div class="content-box-jiao"></div>
|
|
</div>
|
|
</div>
|
|
<div slot="CertificationProgress" slot-scope="text,result">
|
|
<span class="box-content-Progress box-content-cou"
|
|
:style="{'width':long=='zh-cn'?'88px' : '108px'}"
|
|
:class="CertificationColor[result.certificationProgress]"
|
|
@click="CertificationProgressClick(result)"
|
|
>
|
|
{{result.certificationProgress_dictText ? result.certificationProgress_dictText : $t('maintainProgress')}}
|
|
</span>
|
|
</div>
|
|
<div slot="CurrentProjectStatusEvaluation" slot-scope="text,result">
|
|
<div class="Current-color box-content-cou" :style="{'background':CurrentColor[result.projectStatusAssess]}"
|
|
@click="CurrentProjectClick(result)">
|
|
<div class="Current-color-box" :style="{'background':CurrentColorBox[result.projectStatusAssess]}"></div>
|
|
</div>
|
|
</div>
|
|
</a-table>
|
|
</div>
|
|
<certificationDirectory :url="url" ref="certificationDirectoryRef"/>
|
|
<TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
|
|
</a-card>
|
|
</template>
|
|
|
|
<script>
|
|
import certificationDirectory from './certificationDirectory'
|
|
import TaskListModel from './TaskListModel'
|
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
|
import { mapGetters } from 'vuex'
|
|
|
|
export default {
|
|
name: 'TaskList',
|
|
components: {
|
|
certificationDirectory,
|
|
TaskListModel
|
|
},
|
|
data() {
|
|
return {
|
|
columns: [
|
|
{
|
|
title: this.$t('number'),
|
|
align: 'center',
|
|
width: 70,
|
|
customRender: function(t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
},
|
|
{
|
|
title: this.$t('standardInformation'),
|
|
align: 'center',
|
|
dataIndex: 'standard',
|
|
width: 202,
|
|
scopedSlots: { customRender: 'standardInformation' }
|
|
},
|
|
{
|
|
title: this.$t('areaOfResponsibility'),
|
|
align: 'center',
|
|
width: 180,
|
|
dataIndex: 'areaOfResponsibility',
|
|
scopedSlots: { customRender: 'areaOfResponsibility' }
|
|
},
|
|
{
|
|
title: this.$t('confirmationOfDesignConformity'),
|
|
align: 'center',
|
|
width: 240,
|
|
dataIndex: 'confirmationOfDesignConformity',
|
|
scopedSlots: { customRender: 'confirmationOfDesignConformity' }
|
|
},
|
|
{
|
|
title: this.$t('PrehomoConfirmation'),
|
|
align: 'center',
|
|
width: 240,
|
|
dataIndex: 'PrehomoConfirmation',
|
|
scopedSlots: { customRender: 'PrehomoConfirmation' }
|
|
},
|
|
{
|
|
title: this.$t('verificationAndConformityconfirmation'),
|
|
align: 'center',
|
|
width: 240,
|
|
dataIndex: 'verificationAndConformityconfirmation',
|
|
scopedSlots: { customRender: 'verificationAndConformityconfirmation' }
|
|
},
|
|
{
|
|
title: this.$t('CertificationProgress'),
|
|
align: 'center',
|
|
width: 150,
|
|
dataIndex: 'CertificationProgress',
|
|
scopedSlots: { customRender: 'CertificationProgress' }
|
|
},
|
|
{
|
|
title: this.$t('CurrentProjectStatusEvaluation'),
|
|
align: 'center',
|
|
width: 150,
|
|
dataIndex: 'CurrentProjectStatusEvaluation',
|
|
scopedSlots: { customRender: 'CurrentProjectStatusEvaluation' }
|
|
}
|
|
],
|
|
selectedRowKeys: [],
|
|
status: {
|
|
'NotDone': '待办',
|
|
'haveDone': '已办',
|
|
'showData': '展示数据'
|
|
},
|
|
color: {
|
|
'Compliance': 'accordColor',
|
|
'Non-Compliance': 'nonConformityColor',
|
|
'To be tracked': 'TrackedColor',
|
|
'NA': 'notInvolvedColor',
|
|
'No rating': 'submittedColor',
|
|
'Termination of task': 'nonConformityColor'
|
|
},
|
|
statusText: {
|
|
'Compliance': this.$t('accord'),
|
|
'Non-Compliance': this.$t('nonConformity'),
|
|
'To be tracked': this.$t('Tracked'),
|
|
'NA': this.$t('notInvolved'),
|
|
'No rating': this.$t('toBeConfirmed'),
|
|
'Termination of task': this.$t('taskTermination')
|
|
},
|
|
CertificationColor: {
|
|
'Test passed': 'accordColor',
|
|
'Test failed': 'nonConformityColor',
|
|
'In progress': 'TrackedColor',
|
|
'NA': 'notInvolvedColor',
|
|
'Not start': 'submittedColor'
|
|
},
|
|
queryParam: {},
|
|
CurrentColor: {
|
|
'1': '#f3dddd',
|
|
'2': '#f6ebdb',
|
|
'3': '#dbf6e2',
|
|
'4': '#ddf3f4'
|
|
},
|
|
CurrentColorBox: {
|
|
'1': '#E83030',
|
|
'2': '#FDA71C',
|
|
'3': '#26BD4B',
|
|
'4': '#00B3BE'
|
|
},
|
|
url: {
|
|
list: '/project/projectTaskInventoryEO/list',
|
|
exportXls: '/project/projectTaskInventoryEO/exportXls'
|
|
},
|
|
loading: false,
|
|
dataSource: [],
|
|
long: ''
|
|
}
|
|
},
|
|
mounted() {
|
|
this.getList()
|
|
this.long = localStorage.getItem('language') || 'zh-cn'
|
|
|
|
},
|
|
methods: {
|
|
...mapGetters(['userInfo']),
|
|
searchQuery() {
|
|
this.getList()
|
|
},
|
|
searchReset() {
|
|
this.queryParam = {}
|
|
this.getList()
|
|
},
|
|
onSelectChange() {
|
|
|
|
},
|
|
handleExport() {
|
|
let query = {
|
|
...this.queryParam,
|
|
projectLibraryId: this.$route.query.id
|
|
}
|
|
downloadFile(this.url.exportXls, this.$t('taskList') + '.xls', query, this.Deselect)
|
|
},
|
|
verifyTaskClick(val, num, isTrue) {
|
|
let query = {}
|
|
switch (num) {
|
|
case 1:
|
|
query = {
|
|
taskIds: val.designTaskId,
|
|
actiProcInstId: val.designPId,
|
|
projectTaskInventoryId: val.projectLawsInventoryId,
|
|
projectLibraryId: this.$route.query.id,
|
|
id: this.$route.query.id,
|
|
studioEngineer: this.$route.query.studioEngineer,
|
|
serialNumber: val.serialNumber,
|
|
TaskKey: val.designTaskDefinitionKey,
|
|
isDisplay: isTrue,
|
|
flowType: 2,
|
|
Sponsor: 'designInitiatorName',
|
|
personLiable: 'designDutyName',
|
|
typeOfDeliverables: 'designDeliverableType_dictText',
|
|
deliverableTemplate: 'designDeliverableTemplate',
|
|
DueDate: 'designDueDate',
|
|
remarks: 'designRemark',
|
|
projectName: this.$route.query.projectName,
|
|
projectNameId: this.$route.query.projectNameId,
|
|
primaryKeyId: val.designTaskDetailId,
|
|
PersonChargeFeedback: val.designPersonChargeFeedback
|
|
}
|
|
break
|
|
case 2:
|
|
query = {
|
|
taskIds: val.prehomoTaskId,
|
|
actiProcInstId: val.prehomoPId,
|
|
projectTaskInventoryId: val.projectLawsInventoryId,
|
|
studioEngineer: this.$route.query.studioEngineer,
|
|
projectLibraryId: this.$route.query.id,
|
|
serialNumber: val.serialNumber,
|
|
TaskKey: val.prehomoTaskDefinitionKey,
|
|
flowType: 3,
|
|
isDisplay: isTrue,
|
|
id: this.$route.query.id,
|
|
Sponsor: 'prehomoInitiatorName',
|
|
personLiable: 'prehomoDutyName',
|
|
typeOfDeliverables: 'prehomoDeliverableType_dictText',
|
|
deliverableTemplate: 'prehomoDeliverableTemplate',
|
|
DueDate: 'prehomoDueDate',
|
|
remarks: 'prehomoRemark',
|
|
projectName: this.$route.query.projectName,
|
|
projectNameId: this.$route.query.projectNameId,
|
|
primaryKeyId: val.prehomoTaskDetailId,
|
|
PersonChargeFeedback: val.prehomoPersonChargeFeedback
|
|
}
|
|
break
|
|
case 3:
|
|
query = {
|
|
taskIds: val.verifyTaskId,
|
|
actiProcInstId: val.verifyPId,
|
|
id: this.$route.query.id,
|
|
projectLibraryId: this.$route.query.id,
|
|
studioEngineer: this.$route.query.studioEngineer,
|
|
serialNumber: val.serialNumber,
|
|
projectTaskInventoryId: val.projectLawsInventoryId,
|
|
TaskKey: val.verifyTaskDefinitionKey,
|
|
flowType: 4,
|
|
isDisplay: isTrue,
|
|
Sponsor: 'verifyInitiatorName',
|
|
personLiable: 'verifyDutyName',
|
|
typeOfDeliverables: 'verifyDeliverableType_dictText',
|
|
deliverableTemplate: 'verifyDeliverableTemplate',
|
|
DueDate: 'verifyDueDate',
|
|
remarks: 'verifyRemark',
|
|
projectName: this.$route.query.projectName,
|
|
projectNameId: this.$route.query.projectNameId,
|
|
primaryKeyId: val.verifyTaskDetailId,
|
|
PersonChargeFeedback: val.verifyPersonChargeFeedback
|
|
}
|
|
break
|
|
}
|
|
let newUrl = this.$router.resolve({
|
|
path: '/taskListProcess',
|
|
query: query
|
|
})
|
|
window.open(newUrl.href, '_blank')
|
|
},
|
|
CertificationDirectory() {
|
|
this.$refs.certificationDirectoryRef.addModel()
|
|
},
|
|
getList() {
|
|
let query = {
|
|
projectLibraryId: this.$route.query.id,
|
|
...this.queryParam
|
|
}
|
|
this.loading = true
|
|
getAction(this.url.list, query).then((res) => {
|
|
if (res.success) {
|
|
this.dataSource = res.result
|
|
this.loading = false
|
|
// this.dataSource = [{}]
|
|
} else {
|
|
this.dataSource = []
|
|
this.loading = false
|
|
}
|
|
})
|
|
},
|
|
CertificationProgressClick(val) {
|
|
let item = JSON.parse(JSON.stringify(val))
|
|
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
|
|
},
|
|
CurrentProjectClick(val) {
|
|
let item = JSON.parse(JSON.stringify(val))
|
|
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentProjectStatusEvaluation'))
|
|
},
|
|
TaskListModelList() {
|
|
this.getList()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@assets/less/common.less';
|
|
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.title-text {
|
|
width: 32px;
|
|
color: #000F16;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
margin-top: 3px;
|
|
text-align: right;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
width: 70%;
|
|
height: 38px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.box-button {
|
|
height: 38px;
|
|
}
|
|
|
|
.text-operation {
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.page {
|
|
text-align: right;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.operator-text-left {
|
|
font-size: 14px;
|
|
margin-right: 20px;
|
|
background: #eff1f3;
|
|
padding: 8px 8px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.box-left {
|
|
position: relative;
|
|
display: block;
|
|
height: 100%;
|
|
text-align: left;
|
|
}
|
|
|
|
.content {
|
|
text-align: left;
|
|
margin: 0 auto;
|
|
display: inline-block;
|
|
}
|
|
|
|
.content-box {
|
|
position: absolute;
|
|
width: calc(100% + 32px);
|
|
height: calc(100% + 32px);
|
|
top: -16px;
|
|
left: -16px;
|
|
border: 1px #00B3BE solid;
|
|
}
|
|
|
|
.content-box-jiao {
|
|
position: absolute;
|
|
right: 0;
|
|
width: 0;
|
|
height: 0;
|
|
border-right: 14px solid #00B3BE;
|
|
border-bottom: 14px solid transparent
|
|
}
|
|
|
|
.box-content {
|
|
margin-bottom: 8px;
|
|
display: inline-block;
|
|
text-align: left;
|
|
font-weight: 400;
|
|
color: #040B29;
|
|
}
|
|
|
|
.box-content-a {
|
|
margin-bottom: 8px;
|
|
display: inline-block;
|
|
text-align: left;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.box-content-index {
|
|
margin-bottom: 8px;
|
|
display: inline-block;
|
|
text-align: left;
|
|
font-weight: 400;
|
|
color: #040B29;
|
|
}
|
|
|
|
.box-content-index:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.box-content-color {
|
|
width: 138px;
|
|
height: 32px;
|
|
display: inline-block;
|
|
border-radius: 4px;
|
|
text-align: center;
|
|
font-size: 14px;
|
|
line-height: 32px;
|
|
}
|
|
|
|
.box-content-Progress {
|
|
width: 88px;
|
|
height: 32px;
|
|
display: inline-block;
|
|
text-align: center;
|
|
line-height: 32px;
|
|
border-radius: 4px;
|
|
background: #dbf6e2;
|
|
color: #26BD4B;
|
|
}
|
|
|
|
.accordColor {
|
|
background: #dbf6e2;
|
|
color: #26BD4B;
|
|
}
|
|
|
|
.nonConformityColor {
|
|
background: #f3dddd;
|
|
color: #E83030;
|
|
}
|
|
|
|
.TrackedColor {
|
|
background: #f6ebdb;
|
|
color: #FDA71C;
|
|
}
|
|
|
|
.notInvolvedColor {
|
|
background: #eef1f4;
|
|
color: #707486;
|
|
}
|
|
|
|
.submittedColor {
|
|
color: #00B3BE;
|
|
background: #ddf3f4;
|
|
}
|
|
|
|
.Current-color {
|
|
display: inline-block;
|
|
width: 28px;
|
|
height: 28px;
|
|
line-height: 32px;
|
|
text-align: center;
|
|
background: #ddf3f4;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.Current-color-box {
|
|
display: inline-block;
|
|
width: 14px;
|
|
height: 14px;
|
|
background: #00B3BE;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.box-content-cou {
|
|
cursor: pointer;
|
|
}
|
|
|
|
</style>
|
|
<style>
|
|
.box-input .ant-select-selection {
|
|
height: 38px !important;
|
|
}
|
|
|
|
.box-input .ant-select-selection__rendered {
|
|
line-height: 38px;
|
|
}
|
|
</style> |