CN-1705 fix: 缩放等级变更时的交互

This commit is contained in:
chenjinsong
2024-09-13 18:05:08 +08:00
parent 202a5707c0
commit d986170c55
9 changed files with 54 additions and 40 deletions

View File

@@ -13,9 +13,9 @@
:api="url"
>
<template #top-tool-left>
<button id="cancleFollows" class="business-button business-button--light margin-r-10"
:disabled="disableCancle" @click="cancleFollowBatch">
<span>{{ $t('location.cancleFollow') }}</span>
<button id="cancelFollows" class="business-button business-button--light margin-r-10"
:disabled="disableCancel" @click="cancelFollowBatch">
<span>{{ $t('location.cancelFollow') }}</span>
</button>
</template>
<template #default>
@@ -64,7 +64,7 @@ export default {
return {
url: api.location.followedSubscriber,
tableId: 'myFollowTable',
disableCancle: true
disableCancel: true
}
},
mounted () {
@@ -113,9 +113,9 @@ export default {
this.batchDeleteObjs.push(obj)
}
})
this.disableCancle = this.batchDeleteObjs.length < 1
this.disableCancel = this.batchDeleteObjs.length < 1
},
cancleFollowBatch() {
cancelFollowBatch() {
const ids = []
if (this.batchDeleteObjs && this.batchDeleteObjs.length > 0) {
this.batchDeleteObjs.forEach(item => {
@@ -125,7 +125,7 @@ export default {
this.toggleLoading(true)
axios.delete(api.location.follow + '?subscriberIds=' + ids.join(',')).then(response => {
if (response.status === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('location.cancleFollow.success') })
this.$message({ duration: 2000, type: 'success', message: this.$t('location.cancelFollow.success') })
this.batchDeleteObjs.forEach(item => {
item.isFollowed = 0
})
@@ -136,7 +136,7 @@ export default {
this.$message.error(e.response.data.message)
}).finally(() => {
this.toggleLoading(false)
this.$emit('handleCancleFollowBatch', this.batchDeleteObjs)
this.$emit('handleCancelFollowBatch', this.batchDeleteObjs)
})
},
/* 关闭弹框 */

View File

@@ -48,7 +48,7 @@
</template>
</template>
<template v-else-if="item.prop === 'isFollowed'" >
<span class="follow-cursor" v-if="scope.row[item.prop] === 1" @click="cancleFollow(scope.row)"><i class="cn-icon cn-icon-follow-fill"></i></span>
<span class="follow-cursor" v-if="scope.row[item.prop] === 1" @click="cancelFollow(scope.row)"><i class="cn-icon cn-icon-follow-fill"></i></span>
<span class="follow-cursor" v-else @click="follow(scope.row)"><i class="cn-icon cn-icon-follow"></i></span>
</template>
<span v-else>{{scope.row[item.prop] || '-'}}</span>
@@ -109,10 +109,10 @@ export default {
}
},
methods: {
cancleFollow(item) {
cancelFollow(item) {
axios.delete(api.location.follow + '?subscriberIds=' + item.subscriberId).then(res => {
if (res.status === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('location.cancleFollow.success') })
this.$message({ duration: 2000, type: 'success', message: this.$t('location.cancelFollow.success') })
/* 刷新列表 */
item.isFollowed = 0
this.$refs.dataTable.toggleRowSelection(item, false)

View File

@@ -220,7 +220,7 @@
</el-form>
</div>
<div class="dialog-footer">
<button @click="cancle" class="business-button business-button--light">{{ $t('overall.cancel') }}</button>
<button @click="cancel" class="business-button business-button--light">{{ $t('overall.cancel') }}</button>
<button @click="submitConfirm" class="business-button">{{ $t('tip.confirm') }}</button>
</div>
</template>
@@ -590,7 +590,7 @@ export default {
submit () {
this.$refs.knowledgeUpload.submit()
},
cancle () {
cancel () {
this.showAddUpdateDialog = false
},
clickCard (data, event) {

View File

@@ -221,7 +221,7 @@
</el-form>
</div>
<div class="dialog-footer">
<el-button @click="cancle">{{ $t('overall.cancel') }}</el-button>
<el-button @click="cancel">{{ $t('overall.cancel') }}</el-button>
<el-button type="primary" @click="submitConfirm">{{ $t('tip.confirm') }}</el-button>
</div>
</template>
@@ -550,7 +550,7 @@ export default {
submit () {
this.$refs.knowledgeUpload.submit()
},
cancle () {
cancel () {
this.showAddUpdateDialog = false
},
clickCard (data, event) {
@@ -698,7 +698,7 @@ export default {
this.switchKnowledgeId = id
return false
},
cancleSwitch () {
cancelSwitch () {
this.showConfirmSwitch = false
},
switchLearning () {