[update] 认证参数收集-删除

This commit is contained in:
zhaomeijing
2022-05-06 22:03:18 +08:00
parent cafe37bcc3
commit 9672e53b52
@@ -28,10 +28,14 @@
<a-icon type="bulb"/> <a-icon type="bulb"/>
{{$t('changeExtension')}} {{$t('changeExtension')}}
</div> </div>
<div @click="handleDel" class="operator-text"> <div @click="handleCody" class="operator-text">
<a-icon type="copy"/> <a-icon type="copy"/>
{{$t('copy')}}{{$t('parameter')}}{{ $t('detailedList') }} {{$t('copy')}}{{$t('parameter')}}{{ $t('detailedList') }}
</div> </div>
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
<a-icon type="delete"/>
{{$t('BatchDelete')}}
</div>
</div> </div>
<div style="width: 100%"> <div style="width: 100%">
<a-table <a-table
@@ -46,17 +50,6 @@
:scroll='{x: 600}' :scroll='{x: 600}'
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'> @change='handleTableChange'>
<!-- <a-table-->
<!-- ref="table"-->
<!-- :loading="loading"-->
<!-- :pagination="false"-->
<!-- :scroll="{x: true}"-->
<!-- rowKey="id"-->
<!-- :data-source="dataSource"-->
<!-- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
<!-- :columns="columns"-->
<!-- @change='handleTableChange'-->
<!-- >-->
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a> <a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
@@ -83,7 +76,8 @@
<script> <script>
import ImportFile from '@/components/ImportFile/index' import ImportFile from '@/components/ImportFile/index'
import ParameterTemplate from '../dialog/ParameterTemplate' import ParameterTemplate from '../dialog/ParameterTemplate'
import { getAction } from '../../../api/manage' import { getAction,postAction } from '../../../api/manage'
import axios from 'axios'
export default { export default {
name: 'TaskParameterCollection', name: 'TaskParameterCollection',
@@ -152,14 +146,28 @@
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
selectedRowKeysArray: '',
} }
}, },
mounted() { mounted() {
this.getlist() this.getlist()
}, },
methods:{ methods:{
deleteLib() { deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction(_this.url.deleteBatch, { id: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
}, },
handleTableChange() { handleTableChange() {
@@ -177,8 +185,9 @@
this.pageNo = 1 this.pageNo = 1
this.getlist() this.getlist()
}, },
onSelectChange(val,valdate) { onSelectChange(val) {
this.selectedRowKeys = val this.selectedRowKeys = val
this.selectedRowKeysArray = val.join(',')
}, },
edit(edit){ edit(edit){
@@ -193,6 +202,29 @@
}, },
handleDel(){ handleDel(){
let param={
ids: this.selectedRowKeysArray
}
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
postAction(_this.url.deleteAll, param).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getlist()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
handleCody() {
}, },
getPersonnelList(){ getPersonnelList(){