v1.2 版本发布,代码同步后端v1.2版本
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import SockJS from 'sockjs-client'
|
||||
import Stomp from 'stompjs'
|
||||
import { parseTime } from '@/utils/index'
|
||||
@@ -38,6 +39,11 @@ export default {
|
||||
INFO: '#0000ff', WARN: '#FFFF00', ERROR: '#FF0000', DEBUG: '#DEA000'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'socketApi'
|
||||
])
|
||||
},
|
||||
// 监听控制滚动条
|
||||
watch: {
|
||||
data: {
|
||||
@@ -75,8 +81,7 @@ export default {
|
||||
},
|
||||
connection(_this) {
|
||||
// 建立连接对象,注意部署到线上后也要修改对应的地址
|
||||
// const socket = new SockJS('http://localhost:/websocket?token=kl')// 连接服务端提供的通信接口,连接以后才可以订阅广播消息和个人消息
|
||||
const socket = new SockJS('http://localhost:8000/websocket?token=kl')// 连接服务端提供的通信接口,连接以后才可以订阅广播消息和个人消息
|
||||
const socket = new SockJS(this.socketApi)// 连接服务端提供的通信接口,连接以后才可以订阅广播消息和个人消息
|
||||
// 获取STOMP子协议的客户端对象
|
||||
this.stompClient = Stomp.over(socket)
|
||||
// 定义客户端的认证信息,按需求配置
|
||||
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
del(row.key).then(res => {
|
||||
this.delLoading = false
|
||||
row.delPopover = false
|
||||
this.init(search.data().query)
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确认</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -22,7 +22,7 @@ import { add } from '@/api/redis'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '新增缓存',
|
||||
loading: false, dialog: false, title: '新增缓存',
|
||||
form: { key: '', value: '' },
|
||||
rules: {
|
||||
key: [
|
||||
@@ -41,6 +41,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
add(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
@@ -48,7 +49,11 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确认</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '编辑缓存',
|
||||
loading: false, dialog: false, title: '编辑缓存',
|
||||
form: { key: '', value: '' },
|
||||
rules: {
|
||||
key: [
|
||||
@@ -57,6 +57,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const _this = this
|
||||
edit(this.form).then(res => {
|
||||
this.resetForm()
|
||||
@@ -65,7 +66,11 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
_this.sup_this.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user