diff --git a/src/api/api.js b/src/api/api.js
index 52b4ef1..9502738 100644
--- a/src/api/api.js
+++ b/src/api/api.js
@@ -120,6 +120,8 @@ export const transitRESTful = {
const getContactsByCompany = (params) => getAction('/company/payContactsManagement/queryByCompany', params)
// 通过企业名称获取该企业下的联系人无权限接口
const getContactsByCompanyNoLimit = (params) => getAction('/company/payContactsManagement/queryByCompanyMeeting', params)
+// 通过企业名称获取该企业下的联系人 功能安全中心接口只能看到父级的
+const getContactsByCompanyBySafetyCenter = (params) => getAction('/company/payContactsManagement/queryBySafetyCenter', params)
// 通过联系人id获取联系人信息
const getContactsById = (param) => getAction('/company/payContactsManagement/queryByIdMeeting', param)
// 企业管理员重置密码
@@ -203,7 +205,8 @@ export {
ssLoginEnterTerminal,
companyAdminResetPassword,
companyAdminEnable,
- queryCompanyInfoById
+ queryCompanyInfoById,
+ getContactsByCompanyBySafetyCenter
}
diff --git a/src/components/company/BusinessSelect.vue b/src/components/company/BusinessSelect.vue
index 1154699..4998dd8 100644
--- a/src/components/company/BusinessSelect.vue
+++ b/src/components/company/BusinessSelect.vue
@@ -77,6 +77,18 @@ export default {
type:Boolean,
required:false,
default:false
+ },
+ // 自定义列表接口(功能安全中心只能看到父级已添加的企业)
+ customListUrl: {
+ type: String,
+ required: false,
+ default: ''
+ },
+ // 自定义列表查询参数,功能安全中心会议
+ customListParams: {
+ type: Object,
+ required: false,
+ default: () => ({})
}
},
data() {
@@ -133,7 +145,16 @@ export default {
params.memberNature = this.memberNature
}
this.loading = true
- getAction(this.url.list, params).then((res) => {
+ let url = this.url.list
+ // 如果有自定义的查询列表接口,就用自定义的查询以及查询参数
+ if (this.customListUrl) {
+ url = this.customListUrl
+ }
+ // 如果有自定义查询参数,就将参数合并进去
+ if (this.customListParams) {
+ Object.assign(params, this.customListParams)
+ }
+ getAction(url, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records || res.result
diff --git a/src/components/company/SelectContacts.vue b/src/components/company/SelectContacts.vue
index 911f959..17e566f 100644
--- a/src/components/company/SelectContacts.vue
+++ b/src/components/company/SelectContacts.vue
@@ -72,6 +72,18 @@ export default {
type: Boolean,
required: false,
default: false
+ },
+ // 自定义列表接口(功能安全中心只能看到父级已添加的企业)
+ customListFn: {
+ type: [Function, null],
+ required: false,
+ default: null
+ },
+ // 自定义列表查询参数,功能安全中心会议
+ customListParams: {
+ type: Object,
+ required: false,
+ default: () => ({})
}
},
data() {
@@ -126,6 +138,22 @@ export default {
} else {
params.companyId = null
}
+ // 如果有自定义查询参数,就将参数合并进去
+ if (this.customListParams) {
+ Object.assign(params, this.customListParams)
+ }
+ // 如果有自定义查询接口,就用自定义的
+ if (this.customListFn) {
+ return new Promise(resolve => {
+ this.customListFn(params).then(res => {
+ this.contactsList = res.result
+ if (this.initContacts && this.initContacts.id) {
+ this.contactsList.push(this.initContacts)
+ }
+ resolve()
+ })
+ })
+ }
// 是否调用无权限接口
if (this.isLimit) {
// 调用无权限接口
diff --git a/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue b/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue
index c8a179c..8a5305c 100644
--- a/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue
+++ b/src/views/functionalSafetyCenter/FunctionalSafetyCenter.vue
@@ -67,13 +67,13 @@
在研项目
+ v-if="record.projectType + '' === SafetyCenterProjectTypeEnums.studyGroup.value">在研项目
其他分发资料
项目会议
基本信息维护
删除
+ v-if="record.projectType + '' === SafetyCenterProjectTypeEnums.projectGroup.value">删除
diff --git a/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue b/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue
index 67d054e..55d94a0 100644
--- a/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue
+++ b/src/views/functionalSafetyCenter/FunctionalSafetyMemberUnitMaintenance.vue
@@ -126,7 +126,8 @@
-
+
+
@@ -138,7 +139,7 @@ import ProjectDetailModal from '../../components/ProjectDetailModal'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import PreviewFile from '../../components/jero/PreviewFile'
-import { ProjectTypeEnums } from '@/enums/commonEnums'
+import {ProjectTypeEnums, SafetyCenterProjectTypeEnums} from '@/enums/commonEnums'
import SafetyCenterMemberUnitModule
from '@views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule'
@@ -157,6 +158,10 @@ export default {
computed: {
importExcelUrl: function () {
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
+ },
+ // projectType是否功能安全中心, 1功能安全中心 2研究组 3项目组
+ isSafetyCenter () {
+ return this.detail.projectType + '' === SafetyCenterProjectTypeEnums.safetyCenter.value
}
},
data() {
diff --git a/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue b/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue
index a6abf79..e67eefe 100644
--- a/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue
+++ b/src/views/functionalSafetyCenter/modules/SafetyCenterMemberUnitModule.vue
@@ -17,6 +17,8 @@
v-decorator="['chargeCompany',validatorRules.chargeCompany]"
:disabled="disabledCompany"
@change="companyChange"
+ :customListUrl="isSafetyCenter ? '' : companyList"
+ :customListParams="isSafetyCenter ? {} : customListParams"
:maxLength='50'>
@@ -32,6 +34,8 @@
v-decorator="[`contactsList[${index}].contactsId`, {rules: [{ required: index === 0, validator: index === 0 ? validateContactRequired : validateContact }],validateTrigger: 'change'}]"
:maxLength='50'
:ref="`selectContacts${index}`"
+ :customListFn="isSafetyCenter ? null : getContactsByCompanyBySafetyCenter"
+ :customListParams="isSafetyCenter ? {} : customListParams"
@ok="addContactsOneOk">
@@ -77,11 +81,20 @@ import SelectContacts from '@comp/company/SelectContacts'
import {getAllDraftProjects} from '@api/incomePaymentsApi'
import { addZero } from '@/utils/util'
import { CalcAmountMixin } from '@/mixins/CalcAmountMixin'
+import {getContactsByCompanyBySafetyCenter} from '@api/api'
export default {
name: 'SafetyCenterMemberUnitModule',
components: { CompanySelect, SelectContacts },
mixins: [CalcAmountMixin],
+ props: {
+ // 是否安全中心,控制添加成员 只能选择上级的成员还是选择全部
+ isSafetyCenter: {
+ type: Boolean,
+ default: false,
+ required: false,
+ }
+ },
data() {
return {
title: '操作',
@@ -132,6 +145,12 @@ export default {
add: '/SafetyCenterSubitem/add',
edit: '/SafetyCenterSubitem/edit'
},
+ // 成员单位列表(只能选上级选过的)
+ companyList: '/company/payCompanyManagement/listSafetyCenter',
+ // 需要带上当前项目id
+ customListParams: {
+ projectId: this.$route.query.projectId
+ },
// 默认的联系人数据
defaultPayWorkingGroupSubItemContact: {
contactsId: undefined,
@@ -142,6 +161,7 @@ export default {
},
methods: {
addZero,
+ getContactsByCompanyBySafetyCenter,
add() {
this.edit({})
},