This commit is contained in:
zhaomeijing
2022-06-27 14:13:29 +08:00
parent 245506a546
commit 6e7ec4b800
3 changed files with 10 additions and 5 deletions
@@ -111,11 +111,11 @@ export default {
.then( (res) =>{ .then( (res) =>{
console.log(res,'res') console.log(res,'res')
if (res.data.success) { if (res.data.success) {
_this.$message.success(res.data.message) _this.$message.success(_this.$t('OperationSuccessful'))
this.$emit('areaVisibsynchronous', false) this.$emit('areaVisibsynchronous', false)
this.$emit('GetgetTableList') this.$emit('GetgetTableList')
}else{ }else{
_this.$message.warning(res.data.message) _this.$message.warning(_this.$t('operationFailed'))
} }
}) })
.catch( (error) =>{ .catch( (error) =>{
@@ -477,6 +477,9 @@
this.dataSource = res.result this.dataSource = res.result
this.total = res.result.total this.total = res.result.total
this.selectedRowKeys = [] this.selectedRowKeys = []
this.selectedRowrowValue = []
this.$emit('value', this.selectedRowKeys)
this.$emit('rowValue', this.selectedRowrowValue)
this.loading = false this.loading = false
} else { } else {
this.loading = false this.loading = false
@@ -486,10 +489,12 @@
onChange(page, pageSize) { onChange(page, pageSize) {
}, },
onSelectChange(value, rowValue) { onSelectChange(value, rowValue) {
this.selectedRowKeys = []
this.selectedRowrowValue = []
this.selectedRowKeys = value this.selectedRowKeys = value
this.selectedRowrowValue = rowValue this.selectedRowrowValue = rowValue
this.$emit('value', value) this.$emit('value', this.selectedRowKeys)
this.$emit('rowValue', rowValue) this.$emit('rowValue', this.selectedRowrowValue)
}, },
OperationClick(ol, item) { OperationClick(ol, item) {
// this.$emit(ol.ClickEvent, item) // this.$emit(ol.ClickEvent, item)
@@ -286,7 +286,7 @@
this.$message.warning(_this.$t('pleaseSelectData')) this.$message.warning(_this.$t('pleaseSelectData'))
}else if(this.selectedRowKeys.length > 1){ }else if(this.selectedRowKeys.length > 1){
this.$message.warning(_this.$t('OnlyOneSelected')) this.$message.warning(_this.$t('OnlyOneSelected'))
} else if(this.selectedRowKeysvalArray[0].state === '已完成'){ } else if(this.selectedRowKeysvalArray[0].state === '已完成'|| this.selectedRowKeysvalArray[0].state ==='Finished'){
getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => { getAction(_this.url.changeExtension, { id: this.selectedRowKeys[0] }).then((res) => {
if (res.success) { if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful')) _this.$message.success(_this.$t('OperationSuccessful'))