项目详情添加全局替换
This commit is contained in:
@@ -1905,4 +1905,8 @@ module.exports = {
|
|||||||
knowledgeSharingHaveBeenStored:'Knowledge Sharing have been stored',
|
knowledgeSharingHaveBeenStored:'Knowledge Sharing have been stored',
|
||||||
regulationMonthlyReportHaveBeenStored:'Regulation Monthly Report have been stored',
|
regulationMonthlyReportHaveBeenStored:'Regulation Monthly Report have been stored',
|
||||||
sendBackOne:'Return',
|
sendBackOne:'Return',
|
||||||
|
globalReplacement:'Global Replacement',
|
||||||
|
replacedPerson:'Replaced person',
|
||||||
|
replacementPerson:'Replacement Person',
|
||||||
|
thereReplaceableData:'There is currently no replaceable data',
|
||||||
}
|
}
|
||||||
@@ -3862,4 +3862,8 @@ module.exports = {
|
|||||||
Notitleincluded:'不包含标题',
|
Notitleincluded:'不包含标题',
|
||||||
backToHomePage:'返回主页',
|
backToHomePage:'返回主页',
|
||||||
sendBackOne:'退回',
|
sendBackOne:'退回',
|
||||||
|
globalReplacement:'全局替换',
|
||||||
|
replacedPerson:'被替换人',
|
||||||
|
replacementPerson:'替换人',
|
||||||
|
thereReplaceableData:'当前没有可替换的数据',
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="Virtual-detail-text-right">
|
<div class="Virtual-detail-text-right">
|
||||||
|
<div class="operator-text"
|
||||||
|
v-has="'projectComment:list'"
|
||||||
|
@click="globalReplacementClick">
|
||||||
|
<a-icon type="qrcode"/>
|
||||||
|
{{$t('globalReplacement')}}
|
||||||
|
</div>
|
||||||
<!-- <div class="operator-text"-->
|
<!-- <div class="operator-text"-->
|
||||||
<!-- v-if="textTitle === $t('listOfRegulations')"-->
|
<!-- v-if="textTitle === $t('listOfRegulations')"-->
|
||||||
<!-- v-has="'projectComment:list'"-->
|
<!-- v-has="'projectComment:list'"-->
|
||||||
@@ -45,7 +51,7 @@
|
|||||||
<div @click="roleSwitchingClick(item.roleCode)"
|
<div @click="roleSwitchingClick(item.roleCode)"
|
||||||
v-for="(item,index) in roleSwitchingList"
|
v-for="(item,index) in roleSwitchingList"
|
||||||
class="operator-text-title"
|
class="operator-text-title"
|
||||||
:class="{'operator-text-title-color':item.roleName == roleSwitchName ? true : false}"
|
:class="{'operator-text-title-color' :item.roleName == roleSwitchName ? true : false}"
|
||||||
:title="item.roleName">
|
:title="item.roleName">
|
||||||
{{ item.roleName }}
|
{{ item.roleName }}
|
||||||
</div>
|
</div>
|
||||||
@@ -103,13 +109,13 @@
|
|||||||
<a-icon type="profile"/>
|
<a-icon type="profile"/>
|
||||||
{{$t('TaskParameterCollection')}}
|
{{$t('TaskParameterCollection')}}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="Virtual-detail-left-text"-->
|
<!-- <div class="Virtual-detail-left-text"-->
|
||||||
<!-- :title="$t('projectStatus')"-->
|
<!-- :title="$t('projectStatus')"-->
|
||||||
<!-- v-has="'projectLawsInventory:ProjectStatus'"-->
|
<!-- v-has="'projectLawsInventory:ProjectStatus'"-->
|
||||||
<!-- @click="textClick(5,$t('projectStatus'))">-->
|
<!-- @click="textClick(5,$t('projectStatus'))">-->
|
||||||
<!-- <a-icon type="cluster"/>-->
|
<!-- <a-icon type="cluster"/>-->
|
||||||
<!-- {{$t('projectStatus')}}-->
|
<!-- {{$t('projectStatus')}}-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<a-icon @click="textIconClick" type="menu-fold" class="text-icon"/>
|
<a-icon @click="textIconClick" type="menu-fold" class="text-icon"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isDisplay" class="Virtual-detail-left-One">
|
<div v-if="!isDisplay" class="Virtual-detail-left-One">
|
||||||
@@ -143,12 +149,12 @@
|
|||||||
@click="textClick(4,$t('TaskParameterCollection'))">
|
@click="textClick(4,$t('TaskParameterCollection'))">
|
||||||
<a-icon type="profile"/>
|
<a-icon type="profile"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="Virtual-detail-left-text"-->
|
<!-- <div class="Virtual-detail-left-text"-->
|
||||||
<!-- :title="$t('projectStatus')"-->
|
<!-- :title="$t('projectStatus')"-->
|
||||||
<!-- v-has="'projectLawsInventory:ProjectStatus'"-->
|
<!-- v-has="'projectLawsInventory:ProjectStatus'"-->
|
||||||
<!-- @click="textClick(5,$t('projectStatus'))">-->
|
<!-- @click="textClick(5,$t('projectStatus'))">-->
|
||||||
<!-- <a-icon type="cluster"/>-->
|
<!-- <a-icon type="cluster"/>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<a-icon @click="textIconClick" type="menu-unfold" class="text-icon-one"/>
|
<a-icon @click="textIconClick" type="menu-unfold" class="text-icon-one"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="Virtual-detail-right"
|
<div class="Virtual-detail-right"
|
||||||
@@ -159,12 +165,12 @@
|
|||||||
@getRoleSwitch="getRoleSwitch"
|
@getRoleSwitch="getRoleSwitch"
|
||||||
@getRoleSwitchingList="getRoleSwitchingList"
|
@getRoleSwitchingList="getRoleSwitchingList"
|
||||||
:areaOfResponsibilityList="areaOfResponsibilityList"/>
|
:areaOfResponsibilityList="areaOfResponsibilityList"/>
|
||||||
<!-- <TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"-->
|
<!-- <TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"-->
|
||||||
<!-- v-else-if="textTitle === $t('taskList')"/>-->
|
<!-- v-else-if="textTitle === $t('taskList')"/>-->
|
||||||
<TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/>
|
<TaskParameterCollection v-else-if="textTitle === $t('TaskParameterCollection')"/>
|
||||||
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
|
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
|
||||||
<!-- <projectStatus @TaskListChange="TaskListChange"-->
|
<!-- <projectStatus @TaskListChange="TaskListChange"-->
|
||||||
<!-- v-else-if="textTitle === $t('projectStatus')"/>-->
|
<!-- v-else-if="textTitle === $t('projectStatus')"/>-->
|
||||||
<certificationList ref="certificationListRef"
|
<certificationList ref="certificationListRef"
|
||||||
:isDisplayNum="isDisplayNum"
|
:isDisplayNum="isDisplayNum"
|
||||||
:areaOfResponsibility="areaOfResponsibility"
|
:areaOfResponsibility="areaOfResponsibility"
|
||||||
@@ -178,11 +184,51 @@
|
|||||||
<historicalVersionList ref="historicalVersionListRef"/>
|
<historicalVersionList ref="historicalVersionListRef"/>
|
||||||
<commentList ref="commentListRef"/>
|
<commentList ref="commentListRef"/>
|
||||||
<JLoading :loading="loading"></JLoading>
|
<JLoading :loading="loading"></JLoading>
|
||||||
|
<SelectedBy ref="SelectedByRef"
|
||||||
|
:isSingleChoice="true"
|
||||||
|
:title="$t('PersonnelSelection')"
|
||||||
|
@SelectedByForm="SelectedByForm"/>
|
||||||
|
<a-drawer
|
||||||
|
:title="$t('globalReplacement')"
|
||||||
|
:maskClosable="false"
|
||||||
|
:width="900"
|
||||||
|
placement="right"
|
||||||
|
:closable="true"
|
||||||
|
@close="handleCancel"
|
||||||
|
:visible="selectVisible"
|
||||||
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
|
<a-spin :spinning="submitLoading">
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
:loading="selectLoading"
|
||||||
|
:pagination="false"
|
||||||
|
:scroll="{x: '100%',y:'calc(100vh - 300px)'}"
|
||||||
|
rowKey="id"
|
||||||
|
:data-source="dataSource"
|
||||||
|
:columns="columns"
|
||||||
|
>
|
||||||
|
<span slot="replacementPerson"
|
||||||
|
slot-scope="text,record,index"
|
||||||
|
:title="text">
|
||||||
|
<PersonnelSelection :query="{db_field_name:'newUserId',db_field_txt:$t('personLiable'),subscript:index}"
|
||||||
|
:isSingleChoice="true"
|
||||||
|
:personneQuery="record"
|
||||||
|
@change="PersonnelSelectionChange"
|
||||||
|
v-model="record.newUserIdName"/>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</a-spin>
|
||||||
|
<div class="drawer-bootom-button">
|
||||||
|
<a-button @click="handleCancel" style="margin-right: 16px">{{$t('cancel')}}</a-button>
|
||||||
|
<a-button @click="handleSubmit" type="primary" :loading="submitLoading">{{$t('submit')}}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TaskList from '../components/TaskList'
|
import TaskList from '../components/TaskList'
|
||||||
|
import SelectedBy from '@/components/SelectedBy/index'
|
||||||
import listOfRegulations from '../components/listOfRegulations'
|
import listOfRegulations from '../components/listOfRegulations'
|
||||||
import ProjectDetailsName from '../components/ProjectDetails'
|
import ProjectDetailsName from '../components/ProjectDetails'
|
||||||
import TaskParameterCollection from '../components/TaskParameterCollection'
|
import TaskParameterCollection from '../components/TaskParameterCollection'
|
||||||
@@ -193,6 +239,7 @@
|
|||||||
import commentList from '../components/commentList'
|
import commentList from '../components/commentList'
|
||||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||||
import certificationList from '../components/certificationList/index'
|
import certificationList from '../components/certificationList/index'
|
||||||
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -207,15 +254,21 @@
|
|||||||
historicalVersionList,
|
historicalVersionList,
|
||||||
commentList,
|
commentList,
|
||||||
projectStatus,
|
projectStatus,
|
||||||
certificationList
|
certificationList,
|
||||||
|
SelectedBy,
|
||||||
|
PersonnelSelection
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
selectVisible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
submitLoading: false,
|
||||||
isDisplayNum: '',
|
isDisplayNum: '',
|
||||||
textTitle: '',
|
textTitle: '',
|
||||||
isTrue: true,
|
isTrue: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
selectLoading: false,
|
||||||
JTextLoading: false,
|
JTextLoading: false,
|
||||||
isDisplay: true,
|
isDisplay: true,
|
||||||
areaOfResponsibilityList: {},
|
areaOfResponsibilityList: {},
|
||||||
@@ -256,7 +309,43 @@
|
|||||||
engineeringInterfacePerson: '',
|
engineeringInterfacePerson: '',
|
||||||
roleSwitchName: '',
|
roleSwitchName: '',
|
||||||
roleSwitchingList: [],
|
roleSwitchingList: [],
|
||||||
visible: false
|
visible: false,
|
||||||
|
userIds: '',
|
||||||
|
userName: '',
|
||||||
|
dataSource: [],
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: this.$t('replacedPerson'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'userName',
|
||||||
|
width: 180,
|
||||||
|
customRender: (value, row, index) => {
|
||||||
|
const obj = {
|
||||||
|
children: value,
|
||||||
|
attrs: {}
|
||||||
|
}
|
||||||
|
if (index === 0) {
|
||||||
|
obj.attrs.rowSpan = row.maxLength
|
||||||
|
} else {
|
||||||
|
obj.attrs.rowSpan = 0
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('areaOfResponsibility'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'title',
|
||||||
|
width: 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('replacementPerson'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'replacementPerson',
|
||||||
|
width: 180,
|
||||||
|
scopedSlots: { customRender: 'replacementPerson' }
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -270,7 +359,7 @@
|
|||||||
this.textColor(this.$t('projectDetails'))
|
this.textColor(this.$t('projectDetails'))
|
||||||
this.textTitle = this.$t('projectDetails')
|
this.textTitle = this.$t('projectDetails')
|
||||||
} else if (this.$route.query.type == '102') {
|
} else if (this.$route.query.type == '102') {
|
||||||
if (this.$route.query.dutyTerritoryName){
|
if (this.$route.query.dutyTerritoryName) {
|
||||||
this.areaOfResponsibilityList = this.$route.query
|
this.areaOfResponsibilityList = this.$route.query
|
||||||
}
|
}
|
||||||
this.textColor(this.$t('listOfRegulations'))
|
this.textColor(this.$t('listOfRegulations'))
|
||||||
@@ -279,7 +368,7 @@
|
|||||||
// this.textColor(this.$t('taskList'))
|
// this.textColor(this.$t('taskList'))
|
||||||
// this.textTitle = this.$t('taskList')
|
// this.textTitle = this.$t('taskList')
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/projectRegulationTasks',
|
path: '/projectRegulationTasks'
|
||||||
})
|
})
|
||||||
} else if (this.$route.query.type == '104') {
|
} else if (this.$route.query.type == '104') {
|
||||||
// this.textColor(this.$t('nonConformance'))
|
// this.textColor(this.$t('nonConformance'))
|
||||||
@@ -288,7 +377,7 @@
|
|||||||
this.textColor(this.$t('TaskParameterCollection'))
|
this.textColor(this.$t('TaskParameterCollection'))
|
||||||
this.textTitle = this.$t('TaskParameterCollection')
|
this.textTitle = this.$t('TaskParameterCollection')
|
||||||
} else if (this.$route.query.type == '106') {
|
} else if (this.$route.query.type == '106') {
|
||||||
if (this.$route.query.dutyTerritoryName){
|
if (this.$route.query.dutyTerritoryName) {
|
||||||
this.areaOfResponsibility = this.$route.query
|
this.areaOfResponsibility = this.$route.query
|
||||||
}
|
}
|
||||||
this.textColor(this.$t('certificationList'))
|
this.textColor(this.$t('certificationList'))
|
||||||
@@ -307,10 +396,81 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
textIconClick() {
|
textIconClick() {
|
||||||
this.isDisplay = !this.isDisplay
|
this.isDisplay = !this.isDisplay
|
||||||
},
|
},
|
||||||
...mapGetters(['userInfo']),
|
globalReplacementClick() {
|
||||||
|
this.$refs.SelectedByRef.getPush()
|
||||||
|
},
|
||||||
|
SelectedByForm(userIds, userName) {
|
||||||
|
this.userIds = userIds
|
||||||
|
this.userName = userName
|
||||||
|
this.selectVisible = true
|
||||||
|
this.$refs.SelectedByRef.visible = false
|
||||||
|
this.$refs.SelectedByRef.submitLoading = false
|
||||||
|
this.getUserAllDutyTerritoryList()
|
||||||
|
},
|
||||||
|
getUserAllDutyTerritoryList() {
|
||||||
|
let query = {
|
||||||
|
projectLibraryId: this.$route.query.id,
|
||||||
|
userName: this.userName,
|
||||||
|
userId: this.userIds
|
||||||
|
}
|
||||||
|
this.selectLoading = true
|
||||||
|
getAction('/project/projectLibraryBase/getUserAllDutyTerritoryList', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result || []
|
||||||
|
this.dataSource.forEach(val => {
|
||||||
|
val.newUserId = ''
|
||||||
|
val.userName = this.userName
|
||||||
|
val.maxLength = this.dataSource.length
|
||||||
|
})
|
||||||
|
this.selectLoading = false
|
||||||
|
} else {
|
||||||
|
this.dataSource = []
|
||||||
|
this.selectLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.selectVisible = false
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
if (this.dataSource.length > 0) {
|
||||||
|
let replacementUserList = []
|
||||||
|
this.dataSource.forEach(res => {
|
||||||
|
replacementUserList.push({
|
||||||
|
dutyTerritory: res.value,
|
||||||
|
newUserId: res.newUserId || '',
|
||||||
|
newUserName: res.newUserIdName || ''
|
||||||
|
})
|
||||||
|
})
|
||||||
|
let query = {
|
||||||
|
userId: this.userIds,
|
||||||
|
projectLibraryId: this.$route.query.id,
|
||||||
|
replacementUserList: replacementUserList
|
||||||
|
}
|
||||||
|
this.submitLoading = true
|
||||||
|
getAction('/project/projectLibraryBase/overallReplacementUser', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
this.submitLoading = false
|
||||||
|
this.selectVisible = false
|
||||||
|
let textTitle = this.textTitle
|
||||||
|
this.textTitle = ''
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.textTitle = textTitle
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
this.submitLoading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('thereReplaceableData'))
|
||||||
|
}
|
||||||
|
},
|
||||||
textColor(name) {
|
textColor(name) {
|
||||||
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
|
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
|
||||||
if (textColor && textColor.length > 0) {
|
if (textColor && textColor.length > 0) {
|
||||||
@@ -466,6 +626,10 @@
|
|||||||
}
|
}
|
||||||
this.JTextLoading = false
|
this.JTextLoading = false
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
},
|
||||||
|
PersonnelSelectionChange(value, id, index) {
|
||||||
|
this.dataSource[index][value] = id
|
||||||
|
this.dataSource = [...this.dataSource]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -597,6 +761,19 @@
|
|||||||
.operator-text-title-color {
|
.operator-text-title-color {
|
||||||
color: #00B3BE;
|
color: #00B3BE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drawer-bootom-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 100;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.popconfirmDetails {
|
.popconfirmDetails {
|
||||||
|
|||||||
Reference in New Issue
Block a user