对接法规意见收集、法规技术评估的删除

This commit is contained in:
范强强
2022-09-08 13:48:16 +08:00
parent d832dca0bb
commit 79c5c228e8
4 changed files with 139 additions and 12 deletions
+2 -1
View File
@@ -1284,5 +1284,6 @@ module.exports = {
collectionLegislativeComments:'Collection of Legislative Comments',
regulatoryAndTechnicalAssessment:'Regulatory and technical assessment',
listConfirmationRejectionReason:'List confirmation rejection reason',
taskConfirmationRejectionReason:'Task confirmation rejection reason'
taskConfirmationRejectionReason:'Task confirmation rejection reason',
onlyCompletedDataCanBeDeleted:'Only completed data can be deleted',
}
+1
View File
@@ -1298,6 +1298,7 @@ module.exports = {
onlyFilesUploaded: '只能上传.docx.doc文件',
uploadedbyyourself: '只能删除自己上传的文件数据',
doNotHavePermissionDeleteData: '没有权限删除此数据',
onlyCompletedDataCanBeDeleted:'只能删除已完成的数据',
Parametercollection: '参数收集',
Collectlist: '收集清单',
Statisticalmodels: '统计模式',
@@ -78,6 +78,12 @@
<a-icon type="apartment"/>
{{$t('initiatingProcess')}}
</div>
<div @click="BatchDelete"
v-has="'regulatoryComments:batchDelete'"
class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</div>
<div>
<a-table
@@ -98,6 +104,10 @@
<a class="text-operation" @click="viewProcessClick(record)">{{$t('viewProcess')}}</a>
<a class="text-operation" v-if="record.gatherResult == 'Completed'"
@click="evaluationResultsClick(record)">{{$t('evaluationResults')}}</a>
<a class="text-operation"
v-if="record.gatherResult == 'Completed'"
v-has="'regulatoryComments:delete'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
@@ -119,7 +129,7 @@
<script>
import evaluationResultsList from './components/evaluationResultsList'
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction, deleteAction } from '@/api/manage'
export default {
name: 'index',
@@ -131,11 +141,13 @@
//url传参严格按照当前命名
url: {
list: '/lawsOpinionGather/lawsOpinionGatherEO/page',
getSysCategoryTree: '/sys/category/getSysCategoryTree'
getSysCategoryTree: '/sys/category/getSysCategoryTree',
deleteBatch: '/lawsOpinionGather/lawsOpinionGatherEO/deleteBatch'
},
loading: false,
toggleSearchStatus: false,
dataSource: [],
selectedRowKeysRecord: [],
selectedRowKeys: [],
total: 0,
pageSize: 10,
@@ -201,7 +213,7 @@
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 260,
width: 320,
scopedSlots: { customRender: 'operation' }
}
]
@@ -221,6 +233,54 @@
}
})
},
BatchDelete() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = []
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
if (selectedRowKeysRecord[i].gatherResult == 'Completed') {
idList.push(selectedRowKeysRecord[i].id)
}
}
if (idList.length > 0) {
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
} else {
_this.$message.warning(_this.$t('onlyCompletedDataCanBeDeleted'))
}
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
@@ -274,8 +334,9 @@
}
})
},
onSelectChange(value) {
onSelectChange(value, record) {
this.selectedRowKeys = value
this.selectedRowKeysRecord = record
},
initiatingProcessClick() {
let newUrl = this.$router.resolve({
@@ -352,12 +413,13 @@
.text-operation {
margin-right: 8px;
}
::v-deep .ant-table-row:first-child {
background: #fff!important;
background: #fff !important;
opacity: 0.9;
}
::v-deep .ant-table-body {
background: transparent!important;
background: transparent !important;
}
</style>
@@ -75,10 +75,18 @@
</a-form>
</div>
<div class="table-operator">
<div @click="initiatingProcessClick" class="operator-text">
<div @click="initiatingProcessClick"
v-has="'regulatoryAndTechnicalAssessment:initiationProcess'"
class="operator-text">
<a-icon type="apartment"/>
{{$t('initiatingProcess')}}
</div>
<div @click="BatchDelete"
v-has="'regulatoryAndTechnicalAssessment:batchDelete'"
class="operator-text">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</div>
<div>
<a-table
@@ -97,6 +105,10 @@
<a class="text-operation" @click="viewProcessClick(record)">{{$t('viewProcess')}}</a>
<a class="text-operation" v-if="record.flowStatus == 'Completed'"
@click="evaluationResultsClick(record)">{{$t('evaluationResults')}}</a>
<a class="text-operation"
v-if="record.flowStatus == 'Completed'"
v-has="'regulatoryAndTechnicalAssessment:delete'"
@click="deleteData(record)">{{$t('delete')}}</a>
</span>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
@@ -154,7 +166,7 @@
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction ,deleteAction} from '@/api/manage'
import processInformation from './components/processInformation'
export default {
@@ -167,13 +179,15 @@
//url传参严格按照当前命名
url: {
list: '/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/page',
getSysCategoryTree: '/sys/category/getSysCategoryTree'
getSysCategoryTree: '/sys/category/getSysCategoryTree',
deleteBatch:'/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/deleteBatch',
},
visible: false,
loading: false,
toggleSearchStatus: false,
dataSource: [],
selectedRowKeys: [],
selectedRowKeysRecord:[],
serialNumber: '',
total: 0,
pageSize: 10,
@@ -271,7 +285,7 @@
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 260,
width: 320,
scopedSlots: { customRender: 'operation' }
}
]
@@ -291,6 +305,54 @@
}
})
},
deleteData(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
deleteAction(_this.url.deleteBatch, { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
BatchDelete() {
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
let idList = []
let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord))
for (let i = 0; i < selectedRowKeysRecord.length; i++) {
if (selectedRowKeysRecord[i].flowStatus == 'Completed') {
idList.push(selectedRowKeysRecord[i].id)
}
}
if (idList.length > 0) {
deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
} else {
_this.$message.warning(_this.$t('onlyCompletedDataCanBeDeleted'))
}
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
@@ -344,8 +406,9 @@
}
})
},
onSelectChange(value) {
onSelectChange(value,record) {
this.selectedRowKeys = value
this.selectedRowKeysRecord = record
},
handleOk() {
this.$refs.ruleForm.validate(valid => {