批量修改状态弹框
This commit is contained in:
@@ -106,6 +106,8 @@
|
||||
:pagination="false"
|
||||
:scroll="{x: true}"
|
||||
:data-source="dataSource"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
<div slot="standardInformation" slot-scope="text,result" class="box-left">
|
||||
@@ -184,11 +186,37 @@
|
||||
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
|
||||
<TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
|
||||
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
|
||||
<batchChangeModel ref="batchChangeModelRef"/>
|
||||
<batchModel ref="batchModelRef"/>
|
||||
<!-- 错误数据提示-->
|
||||
<a-modal
|
||||
:title="$t('operationFailed')"
|
||||
:width="860"
|
||||
v-model="visibleoperationFailed"
|
||||
:maskClosable="false"
|
||||
@cancel='cancleoperationFailed'
|
||||
:footer="null"
|
||||
>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<span style='font-size: 16px;margin-bottom: 20px;' v-for='(item,key) in NotSelectedNoEngineerValue'>
|
||||
<span>{{ item.nioNumber }}</span>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="imports-footer">
|
||||
<div class="imports-footer-wrap">
|
||||
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import certificationDirectory from './certificationDirectory'
|
||||
import batchChangeModel from './batchChangeModel'
|
||||
import batchModel from './batchModel'
|
||||
import TaskListModel from './TaskListModel'
|
||||
import taskBatSetting from './taskBatSetting'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
@@ -200,6 +228,8 @@
|
||||
components: {
|
||||
certificationDirectory,
|
||||
TaskListModel,
|
||||
batchChangeModel,
|
||||
batchModel,
|
||||
taskBatSetting
|
||||
},
|
||||
props: ['isDisplayNum', 'areaOfResponsibility'],
|
||||
@@ -265,6 +295,7 @@
|
||||
}
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
|
||||
status: {
|
||||
'NotDone': '待办',
|
||||
'haveDone': '已办',
|
||||
@@ -311,7 +342,11 @@
|
||||
exportXls: '/project/projectTaskInventoryEO/exportXls'
|
||||
},
|
||||
loading: false,
|
||||
visibleoperationFailed:false,
|
||||
NotSelectedNoEngineerValue:[],
|
||||
dataSource: [],
|
||||
selectionRowsArray:[],
|
||||
roleCodes:[],
|
||||
long: ''
|
||||
}
|
||||
},
|
||||
@@ -358,8 +393,9 @@
|
||||
taskBatSettingForm() {
|
||||
this.getList()
|
||||
},
|
||||
onSelectChange(value) {
|
||||
onSelectChange(value, selectionRows) {
|
||||
this.selectedRowKeys = value
|
||||
this.selectionRowsArray = selectionRows
|
||||
},
|
||||
handleExport() {
|
||||
let query = {
|
||||
@@ -456,6 +492,7 @@
|
||||
CertificationDirectory() {
|
||||
this.$refs.certificationDirectoryRef.addModel()
|
||||
},
|
||||
|
||||
getList() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
@@ -490,6 +527,68 @@
|
||||
let item = JSON.parse(JSON.stringify(val))
|
||||
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
|
||||
},
|
||||
//批量维护进度
|
||||
|
||||
BatchMaintenanceProgress() {
|
||||
if(this.selectionRowsArray.length <1){
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else{
|
||||
let query = {}
|
||||
let projectLawsInventoryIds = []
|
||||
let roleCodes = []
|
||||
this.selectionRowsArray.forEach((item,index) => {
|
||||
projectLawsInventoryIds.push(item.projectLawsInventoryId)
|
||||
roleCodes.push(item.roleCode)
|
||||
})
|
||||
query = {
|
||||
roleCodes: roleCodes.join(','),
|
||||
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
|
||||
}
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.batchModelRef.getData(this.selectedRowKeys)
|
||||
} else {
|
||||
this.NotSelectedNoEngineerValue = res.result
|
||||
this.visibleoperationFailed = true
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
//批量修改状态
|
||||
BatchChangeStatus() {
|
||||
if(this.selectionRowsArray.length <1){
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else{
|
||||
let query = {}
|
||||
let projectLawsInventoryIds = []
|
||||
let roleCodes = []
|
||||
this.selectionRowsArray.forEach((item,index) => {
|
||||
projectLawsInventoryIds.push(item.projectLawsInventoryId)
|
||||
roleCodes.push(item.roleCode)
|
||||
})
|
||||
query = {
|
||||
roleCodes: roleCodes.join(','),
|
||||
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
|
||||
}
|
||||
getAction(this.url.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$refs.batchChangeModelRef.getData(this.selectionRowsArray)
|
||||
} else {
|
||||
this.NotSelectedNoEngineerValue = res.result
|
||||
this.visibleoperationFailed = true
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
cancleoperationFailed(){
|
||||
this.visibleoperationFailed = false
|
||||
},
|
||||
TaskListModelList() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user