diff --git a/back/public/index.html b/back/public/index.html index 6dfeafc1..8d7d520c 100644 --- a/back/public/index.html +++ b/back/public/index.html @@ -1,8 +1,8 @@ @@ -39,7 +39,8 @@ window.SITE_CONFIG['previewUrl'] = _global.config.previewUrl; window.SITE_CONFIG['apiURL'] = _global.config.apiURL; // WebSocket地址 - window.SITE_CONFIG['socketURL'] =_global.config.socketURL; + // window.SITE_CONFIG['socketURL'] =_global.config.socketURL; + window.SITE_CONFIG['websocketURL'] = _global.config.websocketURL
diff --git a/back/src/views/main-navbar.vue b/back/src/views/main-navbar.vue index 0df84d2c..5538c710 100644 --- a/back/src/views/main-navbar.vue +++ b/back/src/views/main-navbar.vue @@ -105,8 +105,9 @@ import { messages } from '@/i18n' import screenfull from 'screenfull' import UpdatePassword from './main-navbar-update-password' import { clearLoginInfo } from '@/utils' -// import Cookies from 'js-cookie' -// var socket = null +import Cookies from 'js-cookie' +import bus from '@/views/bus.js' +var socket = null export default { inject: ['refresh'], data () { @@ -120,29 +121,32 @@ export default { UpdatePassword }, created () { - // var vue = this - // socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}?token=${Cookies.get('token')}`) - // socket.onopen = function () {} - // socket.onerror = function () { - // vue.$notify.error({ - // title: vue.$t('notice.disconnect'), - // message: vue.$t('notice.disconnectMessage') - // }) - // } - // socket.onmessage = function (evt) { - // const result = JSON.parse(evt.data) - - // // 如果是有新文本通知,则提示有新通知 - // if (result.type === 0) { - // vue.messageTip = true - // vue.$notify({ - // title: vue.$t('notice.new'), - // message: result.msg, - // type: 'info', - // duration: 5000 - // }) - // } - // } + const that = this + socket = new WebSocket(`${window.SITE_CONFIG.websocketURL}?token=${Cookies.get('ucsToken')}`) + socket.onopen = function () {} + socket.onerror = function () {} + socket.onmessage = function (res) { + switch (that.$route.name) { + case 'myAgent-CompetencyApplication': + bus.$emit('competencyApplicationInit') + break + case 'myAgent-AbilityResourceShelf': + bus.$emit('abilityResourceShelfInit') + break + case 'myAgent-ApplicationforCompetencyRequirements': + bus.$emit('applicationforRequirementsInit') + break + case 'myAgent-AbilityResourcesRemoved': + bus.$emit('AbilityResourcesRemovedInit') + break + case 'myAgent-CommentModeration': + bus.$emit('commentInit') + break + case 'activiti-RoomExamineAdmin': + bus.$emit('roomExamineAdminInit') + break + } + } // 未读通知数 this.getUnReadCount() diff --git a/back/src/views/modules/ability/bsabilityai.vue b/back/src/views/modules/ability/bsabilityai.vue index 3941f793..b9e28967 100644 --- a/back/src/views/modules/ability/bsabilityai.vue +++ b/back/src/views/modules/ability/bsabilityai.vue @@ -271,7 +271,7 @@ export default { radio: '', showPutOnTheShelfFlag: false, showPutOnTheShelfFlag2: false, - routePath: '', + // routePath: '', submitFrom: { type: '组件服务', deptId: '', @@ -329,8 +329,8 @@ export default { this.dataForm.name = '' this.dataForm.type = '组件服务' this.$http.get('/sys/user/info').then(res => { - console.log('res', res.data.data, !res.data.data.superAdmin, this.$store.state.user.roleIdList) this.superAdmin = res.data.data.superAdmin + }) }, mounted () { @@ -341,7 +341,6 @@ export default { // 置顶 toppingCapacity (item) { this.$http.put('/resource/pin_top/' + item.id).then(res => { - console.log('置顶', res.data.code) if (res.data.code == 0) { this.$message({ message: '置顶成功', @@ -421,7 +420,6 @@ export default { }) this.dataList[index].infoList2 = dataListSinforList }) - console.log('this.dataList', this.dataList) this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 @@ -443,8 +441,12 @@ export default { } }, showDetail (val) { +<<<<<<< HEAD + window.open(window.SITE_CONFIG.previewUrl + '#/details?id=' + val.id) +======= console.log(val) window.open(window.SITE_CONFIG.previewUrl + '#/details?id=' + val.id + '&&hiddenBackFlag=true') +>>>>>>> 1e4d145fe03902c4ae099d8c968b93c472595a68 // this.addOrUpdateHandle(id) // this.addOrUpdateVisible = true // this.disabled = false @@ -491,7 +493,6 @@ export default { this.uuidTwo = this.uuid(13, 16) this.uuidSnum = this.uuidOne + this.uuidTwo this.uuidSnum = this.uuidSnum.replace(/\s+/g, '') - console.log('this.uuidOne', this.uuidSnum) }, showDocument (val) { // 第一步:创建文档 @@ -630,8 +631,12 @@ export default { }, // 新上架 clear () { +<<<<<<< HEAD this.$router.push(this.routePath) +======= + // this.$router.push(this.routePath) console.log('清空----------------------------------------') +>>>>>>> 1e4d145fe03902c4ae099d8c968b93c472595a68 this.notFilled = [] this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag2 = false @@ -661,7 +666,7 @@ export default { }) }, showPutOnTheShelfVue () { - this.routePath = this.$route.path + // this.routePath = this.$route.path this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag2 = true this.submitFrom.infoList[0].attrValue = this.radio @@ -670,7 +675,6 @@ export default { )[0].children }, changeInfoList (obj) { - console.log(obj, this.submitFrom) this.submitFrom.infoList = this.submitFrom.infoList.filter( (item) => item.attrType !== obj.attrType ) @@ -694,14 +698,12 @@ export default { }, // 完全删除 deleteCompletely (row) { - console.log('完全删除===', row) this.$confirm('确认是否删除?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { this.$http.post('/resource/delResBySuAd?id=' + row.id).then(res => { - console.log('删除结果', res.data) if (res.data.code == 0) { this.$message({ type: 'success', @@ -718,7 +720,6 @@ export default { }) }, submitData () { - console.log('提交11111111111===============>', this.putOnTheShelfList, this.submitFrom) const arr = [] this.putOnTheShelfList.map((item) => { item.children.map((child) => { @@ -728,6 +729,7 @@ export default { child.name === '应用场景' || child.name === '功能介绍' ) { + arr.push(child.name) if ( this.submitFrom.infoList.filter( @@ -827,6 +829,7 @@ export default { } }) }) + this.submitFrom.infoList = this.submitFrom.infoList.sort( (a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType) ) @@ -875,7 +878,6 @@ export default { if ((this.radio === '业务组件' || this.radio === '开发组件') && (!this.submitFrom.infoList.filter(val => val.attrType === '组件地址')[0] || !this.submitFrom.infoList.filter(val => val.attrType === '组件地址')[0].attrValue)) { this.notFilled.push('组件地址') } - console.log(this.submitFrom, this.notFilled, '表单验证') if (this.notFilled.length > 0) { this.$message({ message: '请填写必填字段!', @@ -889,8 +891,6 @@ export default { val.attrValue = this.radio } }) - console.log('编辑===============>', this.submitFrom) - console.log(this.submitFrom.infoList, '===============abc') // 去重 const newArr = this.submitFrom.infoList.filter( (element, index, self) => { @@ -914,7 +914,6 @@ export default { }) .catch(() => {}) } else { - console.log('提交11111111111===============>', this.putOnTheShelfList, this.submitFrom) this.$http .post('/resource/insert?source= b', this.submitFrom) .then(({ data: res }) => { @@ -926,7 +925,7 @@ export default { } }) .catch(() => {}) - } + } } }, // 新修改 diff --git a/back/src/views/modules/ability/bsabilityservice.vue b/back/src/views/modules/ability/bsabilityservice.vue index dc13a1f2..11f43505 100644 --- a/back/src/views/modules/ability/bsabilityservice.vue +++ b/back/src/views/modules/ability/bsabilityservice.vue @@ -271,7 +271,7 @@ export default { insertList: [], putOnTheShelfList: [], showPutOnTheShelfFlag2: false, - routePath: '', + // routePath: '', submitFrom: { type: '应用资源', deptId: '', @@ -595,7 +595,7 @@ export default { }, // 新上架 clear () { - this.$router.push(this.routePath) + // this.$router.push(this.routePath) this.notFilled = [] this.showPutOnTheShelfFlag2 = false this.insertList = [] @@ -617,7 +617,7 @@ export default { }, // 上架 showPutOnTheShelf () { - this.routePath = this.$route.path + // this.routePath = this.$route.path this.showPutOnTheShelfFlag2 = true this.$http.get('/category/getCategoryTree').then(res => { this.insertList = res.data.data.filter(item => item.name === '应用资源')[0] diff --git a/back/src/views/modules/activiti/RoomExamineAdmin.vue b/back/src/views/modules/activiti/RoomExamineAdmin.vue index 214018a1..78fdadb9 100644 --- a/back/src/views/modules/activiti/RoomExamineAdmin.vue +++ b/back/src/views/modules/activiti/RoomExamineAdmin.vue @@ -215,6 +215,7 @@ diff --git a/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue b/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue index 3f4e7f4a..91b1b6c7 100644 --- a/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue +++ b/back/src/views/modules/putOnTheShelf/components/inputSelectCheckbox.vue @@ -26,7 +26,7 @@ js: :placeholder="'请选择' + name">- {{ configure.name }}-{{ index + 1 }} - -
-
- {{ attr.name }}
-
-
-
+ {{ configure.name }}-{{ index + 1 }} + +
+
+ {{ attr.name }}
+
+
+