[update 功能安全中心] 列表、成员单位部分接口对接
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<page-header-title :img-for-icon="IconDraftingGruop"></page-header-title>
|
||||
<page-header-title v-if="$route.query.id" :is-level-one="false" :level-two-title="$route.query.title"></page-header-title>
|
||||
<page-header-title v-else :img-for-icon="IconDraftingGruop"></page-header-title>
|
||||
<a-card :bordered="false">
|
||||
<!-- 查询区域-start -->
|
||||
<div class="table-page-search-wrapper">
|
||||
@@ -64,12 +65,15 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="goUnderStudyProject(record)" v-has="'draftingGroup:underStudyProject'">在研项目</a>
|
||||
<!-- 研究组可以点击在研项目显示项目组的信息 -->
|
||||
<a @click="goUnderStudyProject(record)" v-has="'draftingGroup:underStudyProject'"
|
||||
v-if="record.projectType === SafetyCenterProjectTypeEnums.studyGroup.value">在研项目</a>
|
||||
<a @click="goFilesMaintenance(record)" v-has="'draftingGroup:fileMaintenance'">其他分发资料</a>
|
||||
<a @click="goConferenceMaintenance(record)" v-has="'draftingGroup:meetingMaintenance'">项目会议</a>
|
||||
<a @click="handleCopy(record.id)" v-has="'draftingGroup:copy'">复制</a>
|
||||
<!--<a @click="handleCopy(record.id)" v-has="'draftingGroup:copy'">复制</a>-->
|
||||
<a @click="handleEdit(record)" v-has="'draftingGroup:edit'">基本信息维护</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'draftingGroup:delete'">删除</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'draftingGroup:delete'"
|
||||
v-if="record.projectType === SafetyCenterProjectTypeEnums.projectGroup.value">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -85,10 +89,9 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconDraftingGruop from '@/assets/imgs/icon/icon_drafting_group.png'
|
||||
import {copyDraftingGroup} from '@api/incomePaymentsApi'
|
||||
import { getAction } from '@api/manage'
|
||||
import SafetyCenterModule from '@views/functionalSafetyCenter/modules/SafetyCenterModule'
|
||||
import {MeetTypeEnums} from '@/enums/commonEnums'
|
||||
import {MeetingTypeEnums, SafetyCenterProjectTypeEnums} from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
name: 'FunctionalSafetyCenter',
|
||||
@@ -96,6 +99,7 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
SafetyCenterProjectTypeEnums,
|
||||
IconDraftingGruop,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@@ -106,9 +110,9 @@ export default {
|
||||
sm: { span: 10 }
|
||||
},
|
||||
url: {
|
||||
list: '/FunctionalSafetyCenter/page',
|
||||
delete: '/FunctionalSafetyCenter/delete',
|
||||
deleteBatch: '/FunctionalSafetyCenter/deleteBatch'
|
||||
list: '/SafetyCenter/page',
|
||||
delete: '/SafetyCenter/delete',
|
||||
deleteBatch: '/SafetyCenter/deleteBatch'
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
@@ -140,8 +144,7 @@ export default {
|
||||
}
|
||||
],
|
||||
queryParam: {},
|
||||
lastQueryParam: {},
|
||||
operateData: [] // 进行操作权限校验时使用的数据
|
||||
lastQueryParam: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -174,36 +177,8 @@ export default {
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
// 判断登录用户是否为负责人B 2021-10-13:修改为后端在列表字段返回checkoutOperation字段控制,1--可操作,2--不可操作
|
||||
// if (this.dataSource.length > 0) {
|
||||
// for (let index = 0; index < this.dataSource.length; index++) {
|
||||
// this.checkWorkingGroupPrincipal(index).then((res) => {
|
||||
// res.showOperate = true
|
||||
// this.$set(this.dataSource, index, res)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 判断登录用户是否为负责人B
|
||||
*/
|
||||
// checkWorkingGroupPrincipal(index) {
|
||||
// let item = this.dataSource[index]
|
||||
// // (负责人B不可操作)
|
||||
// return new Promise(resolve => {
|
||||
// checkoutWorkingGroupPrincipal({ id: item.id }).then(res => {
|
||||
// // 不可操作则置否
|
||||
// if (res.success) {
|
||||
// item.canOperate = true
|
||||
// } else {
|
||||
// item.canOperate = false
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// resolve(item)
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
/**
|
||||
* 文件维护
|
||||
* @param record
|
||||
@@ -229,25 +204,10 @@ export default {
|
||||
projectName: record.projectName,
|
||||
projectId: record.id,
|
||||
canOperate: true,
|
||||
meetingType: MeetTypeEnums.safetyCenter.value
|
||||
meetingType: MeetingTypeEnums.safetyCenter.value
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 复制
|
||||
* @param id
|
||||
*/
|
||||
handleCopy (id) {
|
||||
copyDraftingGroup({ id: id }).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loadData()
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 成员维护
|
||||
* @param record
|
||||
@@ -275,9 +235,10 @@ export default {
|
||||
* 在研项目
|
||||
* @param record
|
||||
*/
|
||||
sgoUnderStudyProject(record) {
|
||||
goUnderStudyProject(record) {
|
||||
console.log(record)
|
||||
this.$router.push({
|
||||
path: '/functionalSafetyCenter/FunctionalSafetyUnderStudyProject',
|
||||
path: '/functionalSafetyCenter',
|
||||
query: {
|
||||
title: record.projectName,
|
||||
id: record.id
|
||||
|
||||
Reference in New Issue
Block a user