修改禅道已知bug
This commit is contained in:
@@ -178,6 +178,7 @@ export default {
|
|||||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||||
} else {
|
} else {
|
||||||
let param = {ids: this.selectedRowKeysArray, paramsManifestId:this.$route.query.id ,projectId: this.$route.query.projectId, dre:this.selectedRowKeysDate[0].username }
|
let param = {ids: this.selectedRowKeysArray, paramsManifestId:this.$route.query.id ,projectId: this.$route.query.projectId, dre:this.selectedRowKeysDate[0].username }
|
||||||
|
this.confirmLoading = true
|
||||||
axios({
|
axios({
|
||||||
url: '/jero-boot/params/collectManifest/updateDreBatch',
|
url: '/jero-boot/params/collectManifest/updateDreBatch',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -199,14 +200,17 @@ export default {
|
|||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
// 填写人
|
// 填写人
|
||||||
// 获取当前登陆人
|
// 获取当前登陆人
|
||||||
|
this.confirmLoading = false
|
||||||
this.$emit('GetgetLoginUserType')
|
this.$emit('GetgetLoginUserType')
|
||||||
this.$emit('GetgetTableList')
|
this.$emit('GetgetTableList')
|
||||||
this.$emit('areaVisibleAssignedbyflag', false)
|
this.$emit('areaVisibleAssignedbyflag', false)
|
||||||
}else{
|
}else{
|
||||||
|
this.confirmLoading = false
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch( (error) =>{
|
.catch( (error) =>{
|
||||||
|
this.confirmLoading = false
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,13 +231,16 @@ export default {
|
|||||||
this.formInline.targetConfigIds = this.formInline.targetConfigIds.join(',')
|
this.formInline.targetConfigIds = this.formInline.targetConfigIds.join(',')
|
||||||
}
|
}
|
||||||
let param = {ids: this.selectedRowKeysArray, ...this.formInline }
|
let param = {ids: this.selectedRowKeysArray, ...this.formInline }
|
||||||
|
this.confirmLoading = true
|
||||||
postAction('params/collectManifest/referParams', param).then((res) => {
|
postAction('params/collectManifest/referParams', param).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.$emit('areaVisibleAssignedbyflag', false)
|
this.$emit('areaVisibleAssignedbyflag', false)
|
||||||
this.$emit('GetgetTableList')
|
this.$emit('GetgetTableList')
|
||||||
|
this.confirmLoading = false
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
this.confirmLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}})
|
}})
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ export default {
|
|||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
let _this = this
|
let _this = this
|
||||||
let param = {ids: this.selectedRowKeysArray, paramsManifestId: this.paramsManifest.id }
|
let param = {ids: this.selectedRowKeysArray, paramsManifestId: this.paramsManifest.id }
|
||||||
|
this.confirmLoading = true
|
||||||
axios({
|
axios({
|
||||||
url: '/jero-boot/params/collectManifest/syncReport',
|
url: '/jero-boot/params/collectManifest/syncReport',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -114,12 +115,15 @@ export default {
|
|||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
this.$emit('areaVisibsynchronous', false)
|
this.$emit('areaVisibsynchronous', false)
|
||||||
this.$emit('GetgetTableList')
|
this.$emit('GetgetTableList')
|
||||||
|
this.confirmLoading = false
|
||||||
}else{
|
}else{
|
||||||
_this.$message.warning(_this.$t('operationFailed'))
|
_this.$message.warning(_this.$t('operationFailed'))
|
||||||
|
this.confirmLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch( (error) =>{
|
.catch( (error) =>{
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
this.confirmLoading = false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,12 +107,15 @@ export default {
|
|||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
let _this = this
|
let _this = this
|
||||||
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
||||||
|
this.confirmLoading = true
|
||||||
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.confirmLoading = false
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
this.confirmLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,9 +50,10 @@ import {
|
|||||||
import config from '@/defaultSettings'
|
import config from '@/defaultSettings'
|
||||||
//引入
|
//引入
|
||||||
import socketPublic from '@/utils/socketVuex.js'
|
import socketPublic from '@/utils/socketVuex.js'
|
||||||
|
import socketPublicOne from '@/utils/socketVuexOne.js'
|
||||||
//挂载
|
//挂载
|
||||||
Vue.prototype.$socketPublic = socketPublic
|
Vue.prototype.$socketPublic = socketPublic
|
||||||
|
Vue.prototype.$socketPublicOne = socketPublicOne
|
||||||
import JDictSelectTag from './components/dict/index.js'
|
import JDictSelectTag from './components/dict/index.js'
|
||||||
import hasPermission from '@/utils/hasPermission'
|
import hasPermission from '@/utils/hasPermission'
|
||||||
import vueBus from '@/utils/vueBus'
|
import vueBus from '@/utils/vueBus'
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import Vuex from 'vuex'
|
||||||
|
import store from '@/store/'
|
||||||
|
|
||||||
|
Vue.use(Vuex)
|
||||||
|
// console.log(window._CONFIG['domianWebSocketURL'])
|
||||||
|
|
||||||
|
export default new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
ws: null, //建立的连接
|
||||||
|
lockReconnect: false, //是否真正建立连接
|
||||||
|
timeout: 15000, //15秒一次心跳
|
||||||
|
timeoutObj: null, //心跳心跳倒计时
|
||||||
|
serverTimeoutObj: null, //心跳倒计时
|
||||||
|
timeoutnum: null, //断开 重连倒计时
|
||||||
|
msg: null //接收到的信息
|
||||||
|
|
||||||
|
},
|
||||||
|
getters: {
|
||||||
|
// 获取接收的信息
|
||||||
|
socketMsgs: state => {
|
||||||
|
return state.msg
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
//初始化ws 用户登录后调用
|
||||||
|
webSocketInit(state) {
|
||||||
|
let that = this
|
||||||
|
//this 创建一个state.ws对象【发送、接收、关闭socket都由这个对象操作】
|
||||||
|
const userId = store.getters.userInfo.id
|
||||||
|
state.ws = new WebSocket(window._CONFIG['domianWebSocketURL'].replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/socketServer')
|
||||||
|
state.ws.onopen = function(res) {
|
||||||
|
console.log('Connection success...')
|
||||||
|
/**
|
||||||
|
* 启动心跳检测
|
||||||
|
*/
|
||||||
|
that.commit('start')
|
||||||
|
}
|
||||||
|
state.ws.onmessage = function(res) {
|
||||||
|
if (res.data === 'heartCheck') {
|
||||||
|
// 收到服务器信息,心跳重置
|
||||||
|
that.commit('reset')
|
||||||
|
} else {
|
||||||
|
state.msg = res
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state.ws.onclose = function(res) {
|
||||||
|
//重连
|
||||||
|
that.commit('reconnect')
|
||||||
|
}
|
||||||
|
state.ws.onerror = function(res) {
|
||||||
|
//重连
|
||||||
|
that.commit('reconnect')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reconnect(state) {
|
||||||
|
//重新连接
|
||||||
|
let that = this
|
||||||
|
if (state.lockReconnect) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.lockReconnect = true
|
||||||
|
//没连接上会一直重连,30秒重试请求重连,设置延迟避免请求过多
|
||||||
|
state.timeoutnum &&
|
||||||
|
clearTimeout(state.timeoutnum)
|
||||||
|
state.timeoutnum = setTimeout(() => {
|
||||||
|
//新连接
|
||||||
|
that.commit('webSocketInit')
|
||||||
|
state.lockReconnect = false
|
||||||
|
}, 5000)
|
||||||
|
},
|
||||||
|
reset(state) {
|
||||||
|
//重置心跳
|
||||||
|
let that = this
|
||||||
|
//清除时间
|
||||||
|
clearTimeout(state.timeoutObj)
|
||||||
|
clearTimeout(state.serverTimeoutObj)
|
||||||
|
//重启心跳
|
||||||
|
that.commit('start')
|
||||||
|
},
|
||||||
|
start(state) {
|
||||||
|
//开启心跳
|
||||||
|
var self = this
|
||||||
|
state.timeoutObj &&
|
||||||
|
clearTimeout(state.timeoutObj)
|
||||||
|
state.serverTimeoutObj &&
|
||||||
|
clearTimeout(state.serverTimeoutObj)
|
||||||
|
state.timeoutObj = setTimeout(() => {
|
||||||
|
//这里发送一个心跳,后端收到后,返回一个心跳消息,
|
||||||
|
if (state.ws.readyState === 1) {
|
||||||
|
//如果连接正常
|
||||||
|
state.ws.send('heartCheck')
|
||||||
|
} else {
|
||||||
|
//否则重连
|
||||||
|
self.commit('reconnect')
|
||||||
|
}
|
||||||
|
state.serverTimeoutObj = setTimeout(function() {
|
||||||
|
//超时关闭
|
||||||
|
state.ws.close()
|
||||||
|
}, state.timeout)
|
||||||
|
}, state.timeout)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
webSocketInit({
|
||||||
|
commit
|
||||||
|
}, url) {
|
||||||
|
commit('webSocketInit', url)
|
||||||
|
},
|
||||||
|
webSocketSend({
|
||||||
|
commit
|
||||||
|
}, p) {
|
||||||
|
commit('webSocketSend', p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -511,7 +511,9 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.GetgetLoginUserType()
|
this.GetgetLoginUserType()
|
||||||
this.time = setInterval(() => {
|
this.time = setInterval(() => {
|
||||||
this.handlePreservation()
|
if (this.currentPersonRole == "dre"){
|
||||||
|
this.handlePreservation()
|
||||||
|
}
|
||||||
}, 10000)
|
}, 10000)
|
||||||
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
|
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
|
||||||
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
|
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
|
||||||
|
|||||||
@@ -65,7 +65,8 @@
|
|||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation" @click="configure(record)" v-has="'params:config:list'">{{$t('configure')}}</a>
|
<a class="text-operation" @click="configure(record)" v-has="'params:config:list'">{{$t('configure')}}</a>
|
||||||
<a class="text-operation" @click="edit(record)" v-has="'params:manifest:edit'">{{$t('edit')}}</a>
|
<a class="text-operation" @click="edit(record)" v-has="'params:manifest:edit'">{{$t('edit')}}</a>
|
||||||
<a class="text-operation" @click="deleteLib(record)" v-has="'params:manifest:delete'">{{$t('deleteLib')}}</a>
|
<a class="text-operation" @click="deleteLib(record)"
|
||||||
|
v-has="'params:manifest:delete'">{{$t('deleteLib')}}</a>
|
||||||
<a class="text-operation" @click="historicalVersion(record)" v-has="'params:manifest:history'">{{$t('historicalVersion')}}</a>
|
<a class="text-operation" @click="historicalVersion(record)" v-has="'params:manifest:history'">{{$t('historicalVersion')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -114,6 +115,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import eventBUs from '@/common/event'
|
import eventBUs from '@/common/event'
|
||||||
|
import store from '@/store/'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TaskParameterCollection',
|
name: 'TaskParameterCollection',
|
||||||
@@ -199,7 +201,7 @@
|
|||||||
conList: 'params/config/list',
|
conList: 'params/config/list',
|
||||||
changeExtension: 'params/manifest/changeExtension',
|
changeExtension: 'params/manifest/changeExtension',
|
||||||
verifyConfig: 'params/manifest/verifyConfig',
|
verifyConfig: 'params/manifest/verifyConfig',
|
||||||
configurelist:'params/manifest/getConfigFlag',
|
configurelist: 'params/manifest/getConfigFlag'
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -215,7 +217,7 @@
|
|||||||
version: 0,
|
version: 0,
|
||||||
itemId: '', // 配置id
|
itemId: '', // 配置id
|
||||||
itemRow: {}, // 配置一行数据
|
itemRow: {}, // 配置一行数据
|
||||||
configFlag:'',
|
configFlag: '',
|
||||||
historicalVisible: false,
|
historicalVisible: false,
|
||||||
historicalRow: {}, // 历史版本得数据
|
historicalRow: {}, // 历史版本得数据
|
||||||
drawerVisible: false,
|
drawerVisible: false,
|
||||||
@@ -224,6 +226,22 @@
|
|||||||
selectedRowKeysvalArray: []
|
selectedRowKeysvalArray: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
if (store.getters.userInfo) {
|
||||||
|
this.$socketPublicOne.dispatch('webSocketInit')//初始化ws
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
'$socketPublicOne.state.msg': {
|
||||||
|
//处理接收到的消息
|
||||||
|
handler: function(res) {
|
||||||
|
let that = this
|
||||||
|
if (res.data == '1'){
|
||||||
|
this.getlist()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getlist()
|
this.getlist()
|
||||||
},
|
},
|
||||||
@@ -276,7 +294,7 @@
|
|||||||
configure(item) {
|
configure(item) {
|
||||||
this.itemId = item.id
|
this.itemId = item.id
|
||||||
this.itemRow = item
|
this.itemRow = item
|
||||||
this.$refs.configureRef.addModel(item.id,item)
|
this.$refs.configureRef.addModel(item.id, item)
|
||||||
},
|
},
|
||||||
handleCancel(val) {
|
handleCancel(val) {
|
||||||
this.areaVisible = val
|
this.areaVisible = val
|
||||||
|
|||||||
Reference in New Issue
Block a user