修复用户、角色、权限、添加或修改报错时再次添加后关联数据重复的问题

This commit is contained in:
郑杰
2018-12-26 17:31:28 +08:00
parent 68c60a48f1
commit ad34f06ad1
7 changed files with 10 additions and 1 deletions

View File

@@ -11,7 +11,7 @@
<div id="console" :style="'height:'+ height" class="console">
<div v-for="item in data" :key="item.time">
<span>{{ item.name }}</span>
<span style="color:#CD0066 ">{{ item.timestamp+' ' }}</span>
<span style="color:#CD0066 ">{{ time(item.timestamp)+' ' }}</span>
<span style="color: #00CD00">{{ item.threadName+' ' }}</span>
<span :style="'color:'+ getColor(item.level) ">
{{ item.level+' ' }}
@@ -58,6 +58,9 @@ export default {
clearInterval(this.timer)
},
methods: {
time(date) {
return parseTime(date)
},
initWebSocket() {
this.connection(this)
// 断开重连机制,尝试发送消息,捕获异常发生时重连

View File

@@ -87,6 +87,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
const role = { id: data }

View File

@@ -103,6 +103,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
const role = { id: data }

View File

@@ -50,6 +50,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.permissions = []
const _this = this
this.permissionIds.forEach(function(data, index) {
const permission = { id: data }

View File

@@ -68,6 +68,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.permissions = []
const _this = this
this.permissionIds.forEach(function(data, index) {
const permission = { id: data }

View File

@@ -62,6 +62,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
const role = { id: data }

View File

@@ -78,6 +78,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
const role = { id: data }