Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-03-07 18:02:52 +08:00
6 changed files with 379 additions and 45 deletions
+1
View File
@@ -1403,4 +1403,5 @@ module.exports = {
missionAccepted:'Mission Accepted',
missionRejection:'Mission Rejection',
turnToDo:'Turn To Do',
initiateTask:'Initiate a Task',
}
+1
View File
@@ -1504,4 +1504,5 @@ module.exports = {
missionAccepted:'任务接受',
missionRejection:'任务拒绝',
turnToDo:'转办',
initiateTask:'发起任务',
}
@@ -34,7 +34,7 @@
v-if="textTitle === $t('certificationList') || textTitle === $t('listOfRegulations')"
@click="roleSwitchingClick">
<a-icon type="select"/>
{{$t('roleSwitching')}}
{{roleSwitchName}}
</div>
</div>
</div>
@@ -59,12 +59,12 @@
<a-icon type="safety"/>
{{$t('certificationList')}}
</div>
<!-- <div class="Virtual-detail-left-text" :title="$t('taskList')"-->
<!-- v-has="'projectLawsInventory:taskList'"-->
<!-- @click="textClick(2,$t('taskList'))">-->
<!-- <a-icon type="safety"/>-->
<!-- {{$t('taskList')}}-->
<!-- </div>-->
<!-- <div class="Virtual-detail-left-text" :title="$t('taskList')"-->
<!-- v-has="'projectLawsInventory:taskList'"-->
<!-- @click="textClick(2,$t('taskList'))">-->
<!-- <a-icon type="safety"/>-->
<!-- {{$t('taskList')}}-->
<!-- </div>-->
<!-- <div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"-->
<!-- @click="textClick(3,$t('nonConformance'))">-->
<!-- <a-icon type="safety-certificate"/>-->
@@ -127,6 +127,7 @@
<ProjectDetailsName v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"
ref="listOfRegulationsRef"
@getRoleSwitch="getRoleSwitch"
:areaOfResponsibilityList="areaOfResponsibilityList"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
v-else-if="textTitle === $t('taskList')"/>
@@ -134,7 +135,9 @@
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
<projectStatus @TaskListChange="TaskListChange"
v-else-if="textTitle === $t('projectStatus')"/>
<certificationList ref="certificationListRef" v-else-if="textTitle === $t('certificationList')"/>
<certificationList ref="certificationListRef"
@getRoleSwitch="getRoleSwitch"
v-else-if="textTitle === $t('certificationList')"/>
</div>
</div>
</div>
@@ -187,8 +190,33 @@
historicalVersionUrl: '',
queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId'
},
roleSwitchListCn: {
'0': 'studio工程师',
'1': '法规工程师',
'2': '认证工程师',
'4': '法规工程师/认证工程师',
'11': '领导角色',
'12': '系统管理员',
'13': 'Viewer',
'14': '品牌管理员',
'20': '接口人',
'21': '责任人'
},
roleSwitchListEn: {
'0': 'R&H Studio',
'1': 'studio',
'2': 'homo',
'4': 'Regulatory Engineer/Certification Engineer',
'11': 'R&H Manager',
'12': 'admin',
'13': 'Viewer',
'14': 'BrandAdministrator',
'20': 'Interface person',
'21': 'Person liable'
},
areaOfResponsibility: {},
engineeringInterfacePerson: ''
engineeringInterfacePerson: '',
roleSwitchName: ''
}
},
created() {
@@ -360,6 +388,15 @@
} else {
this.$refs.certificationListRef.roleSwitchingClick()
}
},
getRoleSwitch(value) {
console.log(value)
let long = localStorage.getItem('language') || 'zh-cn'
if (long == 'zh-cn'){
this.roleSwitchName = this.roleSwitchListCn[value]
}else{
this.roleSwitchName = this.roleSwitchListEn[value]
}
}
}
}
@@ -208,7 +208,7 @@
this.disabled = true
}
} else {
if (val.roleCode == '2' || val.roleCode == '4') {
if (val.roleCode == '2') {
this.disabled = false
} else {
this.disabled = true
@@ -34,10 +34,10 @@
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="queryParam.flowStatus">
<a-select-option v-for="(item, key) in processStatusList"
:key="item.key"
:key="item.value"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
@@ -67,67 +67,95 @@
<div class="table-operator"
style="overflow:hidden;margin-bottom: 20px;text-align: left">
<div style="margin-top: 1px;float:left;">
<!-- 导出-->
<div @click="handleExport" v-if="roleSwitchingCode == 1 || roleSwitchingCode == 11 ||
roleSwitchingCode == 12 || roleSwitchingCode == 13 || roleSwitchingCode == 14"
class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
<div @click="transferClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="profile"/>
<!-- 保存-->
<div @click="preservationClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('preservation') }}
</div>
<!-- 调取-->
<div @click="transferClick" v-if="roleSwitchingCode == 0" class="operator-text">
<a-icon type="profile"/>
{{ $t('Transfer') }}
</div>
<!-- 批量设置-->
<div @click="BatchSettingClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2" class="operator-text">
<a-icon type="setting"/>
{{ $t('BatchSetting') }}
</div>
<!-- 认证目录-->
<div @click="certificationClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2" class="operator-text">
<a-icon type="profile"/>
{{ $t('CertificationDirectory') }}
</div>
<div @click="transferClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="profile"/>
<!-- 修改配置-->
<div @click="changeSettingClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="setting" />
{{ $t('changeSetting') }}
</div>
<div @click="transferClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<!-- 引用交付物-->
<div @click="referenceDeliverablesClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="profile"/>
{{ $t('referenceDeliverables') }}
</div>
<a-popconfirm overlayClassName="popconfirm" placement="bottomRight">
<template slot="title" id="popconfirm">
<div style="height:320px;overflow:scroll;overflow-x: auto;">
<!-- <div class="operator-text-title">-->
<!-- <ImportFile :url="url" :projectLibraryId=$route.query.id :isTrue="true" :accept="'.zip'"-->
<!-- @getList="getPersonnelList" />-->
<!-- </div>-->
<!-- 添加-->
<div @click="handleAdd"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
class="operator-text-title">
<a-icon type="plus"/>
{{ $t('add') }}
</div>
<!-- 模板下载-->
<div @click="handleModule"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2 || roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text-title">
<a-icon type="download"/>
{{ $t('templateDownload') }}
</div>
<!-- 导出-->
<div @click="handleExport"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2 || roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text-title">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
<!-- 导入-->
<div class="operator-text-title" v-if="roleSwitchingCode != 1">
<ImportFile :url="url" :projectLibraryId=$route.query.id :isTrue="true" :accept="'.zip'"
@getList="getPersonnelList"/>
</div>
<!-- 批量删除-->
<div @click="handleDel"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
class="operator-text-title">
<a-icon type="delete"/>
{{ $t('BatchDelete') }}
</div>
<!-- 流程重置-->
<div @click="processResetClick"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
class="operator-text-title">
@@ -143,46 +171,70 @@
</a-popconfirm>
</div>
<div style="margin-top: 1px;float:right;">
<!-- 发布-->
<div @click="releaseClick" v-if="roleSwitchingCode == 0" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('release') }}
</div>
<!-- 撤回-->
<div @click="withdrawClick" v-if="roleSwitchingCode == 0" class="operator-text">
<a-icon type="rollback"/>
{{ $t('withdraw') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 2" class="operator-text">
<!-- 发起任务-->
<div @click="initiatingProcessClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('initiatingProcess') }}
{{ $t('initiateTask') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
<!-- 退回至Studio-->
<div @click="returnToStudioClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle" />
{{ $t('returnToStudio') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 2" class="operator-text">
<!-- 审批通过-->
<div @click="ApprovedClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('Approved') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="check-circle"/>
<!-- 审批退回-->
<div @click="returnedForApprovalClick" v-if="roleSwitchingCode == 2" class="operator-text">
<a-icon type="close-circle" />
{{ $t('returnedForApproval') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<!-- 任务接受-->
<div @click="missionAcceptedClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="check-circle"/>
{{ $t('missionAccepted') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="check-circle"/>
<!-- 任务退回-->
<div @click="missionRejectionClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21"
class="operator-text">
<a-icon type="close-circle" />
{{ $t('missionRejection') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<!-- 提交-->
<div @click="submitClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="check-circle"/>
{{ $t('submit') }}
</div>
<div @click="releaseClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="check-circle"/>
<!-- 转办 -->
<div @click="turnToDoClick" v-if="roleSwitchingCode == 20 || roleSwitchingCode == 21" class="operator-text">
<a-icon type="undo" />
{{ $t('turnToDo') }}
</div>
<!-- 催办-->
<div @click="questionClick" v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2 || roleSwitchingCode == 20"
class="operator-text">
<a-icon type="sound"/>
@@ -204,7 +256,9 @@
:columns="columns"
>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)">
<a class="text-operation"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
@click="edit(record)">
{{ $t('edit') }}
</a>
<a class="text-operation"
@@ -212,10 +266,62 @@
{{ $t('modifyHistory') }}
</a>
<a class="text-operation"
v-if="roleSwitchingCode == 0 || roleSwitchingCode == 2"
@click="deleteLib(record)">
{{ $t('deleteLib') }}
</a>
</span>
<span slot="DeliverablesResult" slot-scope="text,record,index">
<a-button type="primary" class="button-text"
v-if="record.flowStatus == 'Results to be submitted'"
@click="clickButtonToUpload('deliveryResult',index)">
{{ (record.deliveryResult === 'null' || record.deliveryResult === '' ||
record.deliveryResult == null) ? $t('clickUpload') : $t('viewUploadedFiles')
}}
</a-button>
<span v-else>
<span v-if="record.deliveryResult">
{{$t('viewFile')}}
</span>
<span v-else>--</span>
</span>
</span>
<span slot="reportNo" slot-scope="text,record">
<a-input class="box-input-index"
v-if="roleSwitchingCode == 2"
:maxLength="200"
onkeyup="this.value=this.value.replace(/(^\s+)|(\s+$)/g, '')"
v-model.trim="record.reportNumber"
:placeholder="$t('PleaseEnter')+$t('reportNo')"/>
<span v-else>{{text}}</span>
</span>
<span slot="productModel" slot-scope="text,record">
<a-input class="box-input-index"
v-if="roleSwitchingCode == 2"
:maxLength="200"
onkeyup="this.value=this.value.replace(/(^\s+)|(\s+$)/g, '')"
v-model.trim="record.productModel"
:placeholder="$t('PleaseEnter')+$t('productModel')"/>
<span v-else>{{text}}</span>
</span>
<span slot="nameOfManufacturer" slot-scope="text,record">
<a-input class="box-input-index"
v-if="roleSwitchingCode == 2"
:maxLength="200"
onkeyup="this.value=this.value.replace(/(^\s+)|(\s+$)/g, '')"
v-model.trim="record.productionEnterpriseName"
:placeholder="$t('PleaseEnter')+$t('nameOfManufacturer')"/>
<span v-else>{{text}}</span>
</span>
<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>
</a-table>
</div>
<transferList :url="url" @transferListForm="transferListForm" ref="transferListRef"/>
@@ -223,6 +329,8 @@
<batSetting :url="url" ref="batSettingRef" @batSettingForm="batSettingForm"/>
<addModel ref="addModelRef" @addModelForm="addModelForm"/>
<modifyHistory ref="modifyHistoryRef"/>
<uploadFile ref="uploadFile" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
<TaskListModel @TaskListModelList="transferListForm" ref="TaskListModelRef"/>
<a-modal
:title="listTitle"
:width="500"
@@ -300,9 +408,11 @@
import certificationDirectory from '../certificationDirectory'
import ImportFile from '@/components/ImportFile/index'
import transferList from './components/transferList'
import uploadFile from '@/components/uploadFile/file'
import addModel from './components/addModel'
import batSetting from './components/batSetting'
import modifyHistory from './components/modifyHistoryList'
import TaskListModel from '../TaskListModel'
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
import moment from 'moment'
import { mapGetters } from 'vuex'
@@ -316,18 +426,29 @@
certificationDirectory,
batSetting,
addModel,
modifyHistory
modifyHistory,
uploadFile,
TaskListModel
},
data() {
return {
queryParam: {},
CertificationColor: {
'Test passed': 'accordColor',
'Test failed': 'nonConformityColor',
'In progress': 'TrackedColor',
'NA': 'notInvolvedColor',
'Not start': 'submittedColor'
},
fieldList: [],
disabled: false,
queryParamQuery: {},
formInline: {},
toggleSearchStatus: false,
confirmLoading: false,
listTitle: '',
visible: false,
processStatusList: [],
rules: {
endTime: [
{
@@ -348,7 +469,7 @@
AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit'
},
dataSource: [],
roleSwitchingCode:'',
roleSwitchingCode: '',
loading: false,
roleSwitchingList: [],
visibleRoleSwitching: false,
@@ -433,7 +554,8 @@
align: 'left',
dataIndex: 'deliveryResult',
width: 180,
ellipsis: true
// ellipsis: true,
scopedSlots: { customRender: 'DeliverablesResult' }
},
{
title: this.$t('closingDate'),
@@ -454,28 +576,32 @@
align: 'left',
dataIndex: 'reportNumber',
width: 180,
ellipsis: true
ellipsis: true,
scopedSlots: { customRender: 'reportNo' }
},
{
title: this.$t('productModel'),
align: 'left',
dataIndex: 'productModel',
width: 180,
ellipsis: true
ellipsis: true,
scopedSlots: { customRender: 'productModel' }
},
{
title: this.$t('nameOfManufacturer'),
align: 'left',
dataIndex: 'productionEnterpriseName',
width: 180,
ellipsis: true
width: 210,
ellipsis: true,
scopedSlots: { customRender: 'nameOfManufacturer' }
},
{
title: this.$t('CertificationProgress'),
align: 'left',
dataIndex: 'certificationProgress',
width: 180,
ellipsis: true
ellipsis: true,
scopedSlots: { customRender: 'CertificationProgress' }
},
{
title: this.$t('operation'),
@@ -487,11 +613,15 @@
],
selectedRowKeys: [],
selectedRowKeysList: [],
isDisplayNum: 2
isDisplayNum: 2,
long: ''
}
},
mounted() {
// this.getList()
this.long = localStorage.getItem('language') || 'zh-cn'
this.loading = true
this.getProcessStatus()
this.getRoleByUserId(() => {
this.getAndUserId()
})
@@ -508,11 +638,41 @@
}
}
}
if (this.roleSwitchingCode == 20 || this.roleSwitchingCode == 21 ||this.roleSwitchingCode == 11 ||
this.roleSwitchingCode == 12 || this.roleSwitchingCode == 13 || this.roleSwitchingCode == 14){
for (let i = 0; i < columns.length; i++) {
if (columns[i].title == this.$t('reportNo')) {
columns.splice(i, 1)
i--
}
if (columns[i].title == this.$t('productModel')) {
columns.splice(i, 1)
i--
}
if (columns[i].title == this.$t('nameOfManufacturer')) {
columns.splice(i, 1)
i--
}
if (columns[i].title == this.$t('CertificationProgress')) {
columns.splice(i, 1)
i--
}
}
}
return columns
}
},
methods: {
...mapGetters(['userInfo']),
getProcessStatus() {
getAction('/project/projectCertificationInventoryEO/getFlowStatusList', {}).then((res) => {
if (res.success) {
this.processStatusList = res.result || []
} else {
this.processStatusList = []
}
})
},
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
@@ -696,6 +856,7 @@
withdrawClick() {
},
//催办
questionClick() {
},
@@ -761,6 +922,7 @@
}
this.roleSwitchingCode = this.formInlineRoleSwitching.roleSwitchingCode
this.getList()
this.$emit('getRoleSwitch',this.roleSwitchingCode)
} else {
this.JLoading = false
}
@@ -798,6 +960,7 @@
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
this.getList()
this.$emit('getRoleSwitch',this.roleSwitchingCode)
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
@@ -808,6 +971,80 @@
},
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
//保存
preservationClick() {
},
//引用交付物
referenceDeliverablesClick() {
},
//修改配置
changeSettingClick() {
},
//发起流程
initiatingProcessClick() {
},
//退回至Studio
returnToStudioClick() {
},
//审批通过
ApprovedClick() {
},
//审批退回
returnedForApprovalClick() {
},
//任务接受
missionAcceptedClick() {
},
//任务退回
missionRejectionClick() {
},
//提交
submitClick() {
},
//转办
turnToDoClick() {
},
clickButtonToUpload(item, index) {
this.$refs.uploadFile.perentHandleFunc()
this.$refs.uploadFile.visible = true
this.uploadName = item
this.uploadIndex = index
getAction('sys/common/getFileInfos', { id: this.dataSource[this.uploadIndex][this.uploadName] }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
/** 上传文件的回调 */
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
/** 赋值给当前对应的表单文件 */
this.dataSource[this.uploadIndex][this.uploadName] = attIdList.join(',')
this.dataSource = [...this.dataSource]
},
CertificationProgressClick(val) {
let item = JSON.parse(JSON.stringify(val))
item.roleCode = this.roleSwitchingCode
this.$refs.TaskListModelRef.getData(item, this.$t('CertificationProgress'))
}
}
}
@@ -1098,6 +1335,62 @@
padding-bottom: 0 !important;
overflow: scroll !important;
}
.button-text {
height: 38px;
width: calc(100%);
line-height: 38px;
background: #fff;
border: 1px #00B3BE solid;
color: #00B3BE;
}
.box-input-index {
display: inline-block;
height: 38px;
width: 100%;
}
.box-content-Progress {
width: 88px;
height: 32px;
display: inline-block;
text-align: center;
line-height: 32px;
border-radius: 4px;
background: #f1f3f5;
color: #919399;
}
.box-content-cou {
cursor: pointer;
}
.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;
}
</style>
<style lang="less">
.box-input .ant-select-selection {
@@ -1529,6 +1529,7 @@ export default {
this.isRoleSwitching = false
}
}
this.$emit('getRoleSwitch',this.formInlineRoleSwitching.roleSwitchingCode)
this.getList()
// this.JLoading = false
} else {
@@ -1787,6 +1788,7 @@ export default {
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
this.$emit('getRoleSwitch',this.formInlineRoleSwitching.roleSwitchingCode)
this.getList()
} else {
this.confirmLoadingRoleSwitching = false