增加手机端pre-homo流程历史记录
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
</span>
|
||||
</div>
|
||||
<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"-->
|
||||
<!-- v-has="'projectComment:list'"-->
|
||||
<!-- @click="globalReplacementClick">-->
|
||||
<!-- <a-icon type="qrcode"/>-->
|
||||
<!-- {{ $t('globalReplacement') }}-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="operator-text"-->
|
||||
<!-- v-if="textTitle === $t('listOfRegulations')"-->
|
||||
<!-- v-has="'projectComment:list'"-->
|
||||
@@ -184,45 +184,45 @@
|
||||
<historicalVersionList ref="historicalVersionListRef"/>
|
||||
<commentList ref="commentListRef"/>
|
||||
<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>
|
||||
<!-- <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>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -79,6 +79,10 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
<div class="table-operator">
|
||||
<div @click="globalReplacementClick" v-has="'projectRelatedPersonnel:globalReplacement'" class="operator-text">
|
||||
<a-icon type="qrcode"/>
|
||||
{{$t('globalReplacement')}}
|
||||
</div>
|
||||
<div @click="handleModule" v-has="'projectRelatedPersonnel:exportTemplate'" class="operator-text">
|
||||
<a-icon type="download"/>
|
||||
{{$t('templateDownload')}}
|
||||
@@ -269,12 +273,52 @@
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
<personBatting ref="personBattingRef" @personBattingTable="personBattingTable"/>
|
||||
<SelectedBy ref="SelectedByRef"
|
||||
:isSingleChoice="true"
|
||||
:title="$t('PersonnelSelection')"
|
||||
@SelectedByForm="SelectedByForm"/>
|
||||
<a-drawer
|
||||
:title="$t('globalReplacement')"
|
||||
:maskClosable="false"
|
||||
:width="900"
|
||||
placement="right"
|
||||
:closable="true"
|
||||
@close="selecthandleCancel"
|
||||
: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="selectDataSource"
|
||||
:columns="selectColumns"
|
||||
>
|
||||
<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="PersonnelSelectionOneChange"
|
||||
v-model="record.newUserIdName"/>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
<a-button @click="selecthandleCancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>
|
||||
<a-button @click="selecthandleSubmit" type="primary" :loading="submitLoading">{{ $t('submit') }}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import SelectedBy from '@/components/SelectedBy/index'
|
||||
import personBatting from './personBatting'
|
||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||
import ImportFile from '@/components/ImportFile/index'
|
||||
@@ -286,7 +330,8 @@
|
||||
components: {
|
||||
PersonnelSelection,
|
||||
ImportFile,
|
||||
personBatting
|
||||
personBatting,
|
||||
SelectedBy
|
||||
},
|
||||
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||
data() {
|
||||
@@ -294,6 +339,9 @@
|
||||
toggleSearchStatus: false,
|
||||
visible: false,
|
||||
queryParam: {},
|
||||
selectVisible: false,
|
||||
submitLoading: false,
|
||||
selectLoading: false,
|
||||
columnsAll: [
|
||||
{
|
||||
title: this.$t('statisticalNodes'),
|
||||
@@ -359,7 +407,41 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
selectColumns: [
|
||||
{
|
||||
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'}
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
selectDataSource:[],
|
||||
loading: false,
|
||||
editVisible: false,
|
||||
confirmLoading: false,
|
||||
@@ -433,7 +515,9 @@
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
dictOptionsValue: [],
|
||||
administrators: false
|
||||
administrators: false,
|
||||
userIds:'',
|
||||
userName:'',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -465,6 +549,81 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
PersonnelSelectionOneChange(value, id, index){
|
||||
this.selectDataSource[index][value] = id
|
||||
this.selectDataSource = [...this.selectDataSource]
|
||||
},
|
||||
selecthandleCancel(){
|
||||
this.selectVisible = false
|
||||
},
|
||||
selecthandleSubmit(){
|
||||
if (this.selectDataSource.length > 0) {
|
||||
let replacementUserList = []
|
||||
this.selectDataSource.forEach(res => {
|
||||
replacementUserList.push({
|
||||
dutyTerritory: res.value,
|
||||
newUserId: res.newUserId || '',
|
||||
newUserName: res.newUserIdName || ''
|
||||
})
|
||||
})
|
||||
let query = {
|
||||
userId: this.userIds,
|
||||
projectLibraryId: this.$route.query.id,
|
||||
userName: this.userName,
|
||||
replacementUserList: replacementUserList
|
||||
}
|
||||
this.submitLoading = true
|
||||
postAction('/project/projectLibraryBase/overallReplacementUser', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.submitLoading = false
|
||||
this.selectVisible = false
|
||||
this.selectDataSource = []
|
||||
this.userName = ''
|
||||
this.userIds = ''
|
||||
this.getList()
|
||||
} else {
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.submitLoading = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(this.$t('thereReplaceableData'))
|
||||
}
|
||||
},
|
||||
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.selectDataSource = res.result || []
|
||||
this.selectDataSource.forEach(val => {
|
||||
val.newUserId = ''
|
||||
val.userName = this.userName
|
||||
val.maxLength = this.selectDataSource.length
|
||||
})
|
||||
this.selectLoading = false
|
||||
} else {
|
||||
this.selectDataSource = []
|
||||
this.selectLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
personBattingTable() {
|
||||
this.selectedRowKeys = []
|
||||
this.getList()
|
||||
|
||||
Reference in New Issue
Block a user