Files
laws_weilai/jero-web/src/views/projectManagement/components/projectStatus.vue
T
2023-10-24 17:47:34 +08:00

110 lines
4.0 KiB
Java

<template>
<a-card :bordered="false">
<!-- <div class="table-operator" style="margin-bottom: 10px">-->
<!-- <div @click="versionStatisticsClick"-->
<!-- v-if="!this.$route.query.parentId && $t('Parametercollection')!= activeKey"-->
<!-- class="operator-text">-->
<!-- <a-icon type="plus"/>-->
<!-- {{$t('versionStatistics')}}-->
<!-- </div>-->
<!-- <div v-else-->
<!-- class="operator-text">-->
<!-- </div>-->
<!-- </div>-->
<a-tabs type="card" v-model="activeKey" @change="activeKeyChange" class="ant-tabs">
<a-tab-pane :key="$t('regulatoryComplianceManagement')" :tab="$t('regulatoryComplianceManagement')">
<regulatoryCompliance @currentStatus="currentStatus"
:idList="idList"
v-if="activeKey == $t('regulatoryComplianceManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('certificationActivityManagement')" :tab="$t('certificationActivityManagement')">
<certificationActivity @currentStatus="currentStatus" :idList="idList"
v-if="activeKey == $t('certificationActivityManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('parameterCollectionProgressManagement')" :tab="$t('parameterCollectionProgressManagement')">
<parameterCollectionProgress @currentStatus="currentStatus" :idList="[]"
v-if="activeKey == $t('parameterCollectionProgressManagement')"/>
</a-tab-pane>
<a-tab-pane :key="$t('otastatus')" :tab="$t('otastatus')">
<otastatus @currentStatus="currentStatus" :idList="idList" v-if="activeKey == $t('otastatus')"/>
</a-tab-pane>
<a-tab-pane :key="$t('Problemanagement')" :tab="$t('Problemanagement')">
<nonConformance ref="nonConformanceRef" @currentStatus="currentStatus"
v-if="activeKey == $t('Problemanagement')"/>
</a-tab-pane>
</a-tabs>
</a-card>
</template>
<script>
import regulatoryCompliance from './regulatoryCompliance'
import certificationActivity from './certificationActivity'
import parameterCollectionProgress from './parameterCollectionProgress'
import nonConformance from './nonConformance'
import otastatus from './otastatus'
import { getAction, postAction } from '@/api/manage'
export default {
name: 'projectStatus',
components: {
parameterCollectionProgress,
regulatoryCompliance,
certificationActivity,
nonConformance,
otastatus
},
data() {
return {
activeKey: this.$t('regulatoryComplianceManagement'),
selectedRowKeys: [],
idList: [],
queryForm: {}
}
},
methods: {
getData(data) {
this.queryForm = data
this.queryForm = { ...this.queryForm }
if (this.$refs.nonConformanceRef) {
this.$refs.nonConformanceRef.getData(this.queryForm)
}
},
activeKeyChange() {
this.$emit('projectStatusForm', this.activeKey)
if (this.activeKey == this.$t('Problemanagement')) {
this.$nextTick(() => {
this.$refs.nonConformanceRef.getData(this.queryForm)
})
}
},
currentStatus(item) {
this.$emit('currentStatus', item)
},
versionStatisticsClick() {
this.$refs.versionStatisticsRef.addModel(JSON.parse(JSON.stringify(this.selectedRowKeys)))
},
versionStatisticsForm(value) {
this.idList = []
let activeKey = JSON.parse(JSON.stringify(this.activeKey))
this.activeKey = ''
if (value && value.length > 0) {
value.forEach(res => {
this.idList.push(JSON.parse(res).id)
})
}
this.selectedRowKeys = JSON.parse(JSON.stringify(value))
this.$nextTick(() => {
this.activeKey = activeKey
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
::v-deep .ant-card-body {
padding: 0 0 24px 0;
}
</style>