Date: Sat, 2 Jul 2022 12:46:10 +0800
Subject: [PATCH 04/11] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?=
=?UTF-8?q?=E9=A1=B9=E6=94=B6=E9=9B=86-=E5=88=87=E6=8D=A2=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E6=97=A5=E5=BF=97-=E7=BC=96=E8=BE=91=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ParamsCollectManifestUserTypeLogEOServiceImpl.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java
index 9d34288d8..1eb8f8523 100644
--- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java
+++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestUserTypeLogEOServiceImpl.java
@@ -1,5 +1,6 @@
package com.jero.modules.cert.collect.service.impl;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jero.modules.cert.collect.entity.ParamsCollectManifestUserTypeLogEO;
import com.jero.modules.cert.collect.mapper.ParamsCollectManifestUserTypeLogEOMapper;
@@ -41,6 +42,14 @@ public class ParamsCollectManifestUserTypeLogEOServiceImpl extends ServiceImpl
Date: Sat, 2 Jul 2022 13:41:51 +0800
Subject: [PATCH 05/11] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/com/jero/modules/report/enums/ContentTemplateEnum.java | 1 -
1 file changed, 1 deletion(-)
diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java
index 08679a039..26fa31c6d 100644
--- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java
+++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/enums/ContentTemplateEnum.java
@@ -1,6 +1,5 @@
package com.jero.modules.report.enums;
-import com.sun.tools.doclets.formats.html.resources.standard;
/**
* @description
From 0c7e693472f1e264397600c74bd742191599eac7 Mon Sep 17 00:00:00 2001
From: liyawei
Date: Sat, 2 Jul 2022 13:45:49 +0800
Subject: [PATCH 06/11] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E5=8F=82=E6=95=B0?=
=?UTF-8?q?=E6=B8=85=E5=8D=95-=E9=85=8D=E7=BD=AE=E6=A0=A1=E9=AA=8C?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/TaskParameterCollection.vue | 3 +-
.../projectManagement/dialog/configure.vue | 53 +++++++++++--------
2 files changed, 31 insertions(+), 25 deletions(-)
diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue
index dda041031..941b85887 100644
--- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue
+++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue
@@ -275,9 +275,8 @@
// 配置
configure(item) {
this.itemId = item.id
-
this.itemRow = item
- this.$refs.configureRef.addModel(item.id)
+ this.$refs.configureRef.addModel(item.id,item)
},
handleCancel(val) {
this.areaVisible = val
diff --git a/jero-web/src/views/projectManagement/dialog/configure.vue b/jero-web/src/views/projectManagement/dialog/configure.vue
index b0ae4022b..71e7e0c24 100644
--- a/jero-web/src/views/projectManagement/dialog/configure.vue
+++ b/jero-web/src/views/projectManagement/dialog/configure.vue
@@ -95,7 +95,7 @@
- {{$t('addConfiguration')}}
+ {{$t('addConfiguration')}}
{{$t('deleteConfiguration')}}
@@ -146,6 +146,7 @@
formInline: {},
confirmLoading: false,
visible: false,
+ loading:false,
rules: {
// nioNumber:[
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
@@ -155,7 +156,7 @@
projectNameList: [],
title: '',
stateOne: '',
- configFlag:'',
+ conFlag:'',
contentList: [],
paramsConfigEOList: [
{
@@ -187,19 +188,13 @@
}
})
},
- addModel(id) {
+ addModel(id,item) {
this.paramsConfigEOList = []
this.visible = true
this.title = this.$t('MaintainConfigureInfo')
this.formInline = {}
this.getconList(id)
- getAction(this.url.configurelist, { paramsManifestId: this.itemRow.id }).then((res) => {
- if (res.success) {
- this.configFlag = res.result
- } else {
- this.$message.warning(res.message)
- }
- })
+
},
getconList(id) {
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
@@ -226,19 +221,29 @@
})
},
addConfiguration(item) {
- console.log(this.configFlag)
- if (this.configFlag == true) {
- this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
- id: '',
- configName: '', // 配置名称
- version: '', // 版本
- carType: '', // 车型
- battery: '', // 电池
- motor: '' // 电机
- })
- } else {
- this.$message.warning(this.$t('Theselectedconfiguration'))
- }
+ this.loading = true
+ getAction(this.url.configurelist, { paramsManifestId: this.itemRow.id }).then((res) => {
+ if (res.success) {
+ this.conFlag = res.result
+ if (this.conFlag == true) {
+ this.paramsConfigEOList.splice(item.displaySeq + 1, 0, {
+ id: '',
+ configName: '', // 配置名称
+ version: '', // 版本
+ carType: '', // 车型
+ battery: '', // 电池
+ motor: '' // 电机
+ })
+ this.loading = false
+ } else {
+ this.loading = false
+ this.$message.warning(this.$t('Theselectedconfiguration'))
+ }
+ } else {
+ this.$message.warning(res.message)
+ }
+ })
+
},
deleteConfiguration(displaySeq, index) {
if (this.paramsConfigEOList.length === 1) {
@@ -262,6 +267,8 @@
},
handleCancel() {
this.visible = false
+ this.$refs.ruleForm.clearValidate()
+ this.conFlag = ''
},
handleSubmit() {
let flag = 1
From 6d70cc7e905146f3edebb420d2d880fcfe156853 Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Sat, 2 Jul 2022 13:57:11 +0800
Subject: [PATCH 07/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?=
=?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/tableCollection/index.vue | 35 ++++++++++++-------
.../ParameterItemCollectionList.vue | 2 +-
2 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue
index 7ee83c1f0..cc7ae0aa4 100644
--- a/jero-web/src/components/tableCollection/index.vue
+++ b/jero-web/src/components/tableCollection/index.vue
@@ -261,7 +261,8 @@
watch: {
currentPersonRole: {
handler: function() {
- this.getTableList();
+ console.log(123)
+ this.getTableList()
},
immediate: true
}
@@ -377,7 +378,7 @@
this.areaVisible = true
// this.$refs.ruleForm.clearValidate()
this.$nextTick(() => {
- this.Dateline = {...this.Dateline}
+ this.Dateline = { ...this.Dateline }
this.getquerySdtList(record)
this.$refs.ruleForm.clearValidate()
})
@@ -406,17 +407,19 @@
getAndUserId(result) {
let query = {
paramsManifestId: this.$route.query.id,
- projectId:this.$route.query.projectId,
+ projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
getAction('/params/userTypeLog/queryCurrentType', query).then((res) => {
if (res.success) {
- if (res.result && res.result.userType){
+ if (res.result && res.result.userType) {
this.getTableList(res.result.userType)
- }else{
+ console.log(11)
+ } else {
+ console.log(222)
this.getTableList(result[0].value)
}
- this.$emit('LoginUserType', result, this.currentPersonRole,res.result.userType)
+ this.$emit('LoginUserType', result, this.currentPersonRole, res.result.userType)
} else {
}
@@ -532,7 +535,9 @@
this.dataSource = tt
this.total = res.result.total
this.selectedRowKeys = []
- this.loading = false
+ setTimeout(() => {
+ this.loading = false
+ }, 500)
} else {
this.loading = false
}
@@ -616,7 +621,9 @@
this.selectedRowrowValue = []
this.$emit('value', this.selectedRowKeys)
this.$emit('rowValue', this.selectedRowrowValue)
- this.loading = false
+ setTimeout(() => {
+ this.loading = false
+ }, 500)
} else {
this.loading = false
}
@@ -638,7 +645,7 @@
detailClick(item, index) {
// this.$emit('detailClick', item)
}
- },
+ }
}
diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
index 2ee7d3388..ca847d402 100644
--- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
+++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
@@ -817,7 +817,7 @@
LoginUserType(val, currentPersonRole,userType) {
this.RoleType = []
if (this.currentPersonRole == '') {
- this.currentPersonRole = val.length >= 1 ? val[0].value : ''
+ this.currentPersonRole = currentPersonRole || userType || val[0].value
}
this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
From f163558c0c20e41131613b8680beb6036d6e0b32 Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Sat, 2 Jul 2022 14:19:03 +0800
Subject: [PATCH 08/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?=
=?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/tableCollection/index.vue | 1 +
.../ParameterItemCollectionList.vue | 66 ++++++++++++++++++-
2 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue
index cc7ae0aa4..ffb6d6052 100644
--- a/jero-web/src/components/tableCollection/index.vue
+++ b/jero-web/src/components/tableCollection/index.vue
@@ -621,6 +621,7 @@
this.selectedRowrowValue = []
this.$emit('value', this.selectedRowKeys)
this.$emit('rowValue', this.selectedRowrowValue)
+ this.$emit('getDataSource', this.dataSource)
setTimeout(() => {
this.loading = false
}, 500)
diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
index ca847d402..2d1e8886f 100644
--- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
+++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
@@ -130,6 +130,11 @@
{{$t('referenceparameter')}}
+
+
+
+ {{$t('preservation')}}
+
@@ -157,7 +162,9 @@
@@ -503,9 +510,15 @@
},
mounted() {
this.GetgetLoginUserType()
+ this.time = setInterval(() => {
+ this.handlePreservation()
+ }, 10000)
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
},
+ beforeDestroy() {
+ clearInterval(this.time);
+ },
methods: {
...mapGetters(['userInfo']),
handleCancelRoleSwitching() {
@@ -814,7 +827,7 @@
}
return flag
},
- LoginUserType(val, currentPersonRole,userType) {
+ LoginUserType(val, currentPersonRole, userType) {
this.RoleType = []
if (this.currentPersonRole == '') {
this.currentPersonRole = currentPersonRole || userType || val[0].value
@@ -1001,6 +1014,55 @@
this.NoEngineer = 1
}
},
+ getDataSource(data) {
+ this.dataSource = data
+ },
+ handlePreservation(num) {
+ let _this = this
+ let postDate = []
+ let data = JSON.parse(JSON.stringify(this.dataSource))
+ let selectedRowKeysValue = []
+ data.forEach(res => {
+ if (res.state == 'Wait Fill' || res.state == '待填写') {
+ selectedRowKeysValue.push(res)
+ }
+ })
+ for (let i = 0; i < selectedRowKeysValue.length; i++) {
+ let postDateobj = {}
+ let itemIn = Object.keys(selectedRowKeysValue[i])
+ for (let j = 0; j < itemIn.length; j++) {
+ if (itemIn[j] !== 'sdt') {
+ if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
+ postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]]
+ for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
+ if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
+ selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
+ }
+ if (selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
+ selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
+ }
+ }
+ }
+ }
+ }
+ postDateobj.id = selectedRowKeysValue[i].id
+ postDate.push(postDateobj)
+ }
+ let configDataList = { configDataList: postDate }
+ if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
+ postAction('/params/collectManifest/save', configDataList).then((res) => {
+ if (res.success) {
+ if (num && num == 1) {
+ _this.$message.success(_this.$t('OperationSuccessful'))
+ }
+ } else {
+ if (num && num == 1) {
+ _this.$message.warning(_this.$t('operationFailed'))
+ }
+ }
+ })
+ }
+ },
// 提交数据
ishandleSubmit() {
let _this = this
From a1b453f82d962cef294d44fd08fabebe6b792c38 Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Sat, 2 Jul 2022 14:23:57 +0800
Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?=
=?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/CollectionType/index.vue | 28 ++++++++++++++-----
.../ParameterItemCollectionList.vue | 7 ++++-
2 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue
index b1667ab35..6e8313cf6 100644
--- a/jero-web/src/components/CollectionType/index.vue
+++ b/jero-web/src/components/CollectionType/index.vue
@@ -99,7 +99,9 @@
-
@@ -114,7 +116,9 @@
-
@@ -141,7 +145,9 @@
-
@@ -453,7 +461,9 @@
-
@@ -475,7 +485,9 @@
-
@@ -497,7 +509,9 @@
-
diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
index 2d1e8886f..e85d4ffaa 100644
--- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
+++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
@@ -517,7 +517,7 @@
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
},
beforeDestroy() {
- clearInterval(this.time);
+ clearInterval(this.time)
},
methods: {
...mapGetters(['userInfo']),
@@ -1050,14 +1050,19 @@
}
let configDataList = { configDataList: postDate }
if (selectedRowKeysValue && selectedRowKeysValue.length > 0) {
+ if (num && num == 1) {
+ this.textLoading = true
+ }
postAction('/params/collectManifest/save', configDataList).then((res) => {
if (res.success) {
if (num && num == 1) {
_this.$message.success(_this.$t('OperationSuccessful'))
+ this.textLoading = false
}
} else {
if (num && num == 1) {
_this.$message.warning(_this.$t('operationFailed'))
+ this.textLoading = false
}
}
})
From 614d99a5e1006d1e7aba44165caa6768b93656a8 Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Sat, 2 Jul 2022 15:23:43 +0800
Subject: [PATCH 10/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?=
=?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jero-web/src/components/AssignedBy/index.vue | 4 +
.../components/ReferenceParameter/index.vue | 3 +
.../SynchronousSubmissionLibrary/index.vue | 4 +
.../src/components/TaskCutOffTime/index.vue | 3 +
jero-web/src/main.js | 3 +-
jero-web/src/utils/socketVuexOne.js | 116 ++++++++++++++++++
.../ParameterItemCollectionList.vue | 4 +-
.../components/TaskParameterCollection.vue | 26 +++-
8 files changed, 157 insertions(+), 6 deletions(-)
create mode 100644 jero-web/src/utils/socketVuexOne.js
diff --git a/jero-web/src/components/AssignedBy/index.vue b/jero-web/src/components/AssignedBy/index.vue
index 90bcdd144..7d6973111 100644
--- a/jero-web/src/components/AssignedBy/index.vue
+++ b/jero-web/src/components/AssignedBy/index.vue
@@ -178,6 +178,7 @@ export default {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
let param = {ids: this.selectedRowKeysArray, paramsManifestId:this.$route.query.id ,projectId: this.$route.query.projectId, dre:this.selectedRowKeysDate[0].username }
+ this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/updateDreBatch',
method: 'post',
@@ -199,14 +200,17 @@ export default {
_this.$message.success(_this.$t('OperationSuccessful'))
// 填写人
// 获取当前登陆人
+ this.confirmLoading = false
this.$emit('GetgetLoginUserType')
this.$emit('GetgetTableList')
this.$emit('areaVisibleAssignedbyflag', false)
}else{
+ this.confirmLoading = false
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch( (error) =>{
+ this.confirmLoading = false
console.log(error);
});
}
diff --git a/jero-web/src/components/ReferenceParameter/index.vue b/jero-web/src/components/ReferenceParameter/index.vue
index 94db39bf8..0e2ca7182 100644
--- a/jero-web/src/components/ReferenceParameter/index.vue
+++ b/jero-web/src/components/ReferenceParameter/index.vue
@@ -231,13 +231,16 @@ export default {
this.formInline.targetConfigIds = this.formInline.targetConfigIds.join(',')
}
let param = {ids: this.selectedRowKeysArray, ...this.formInline }
+ this.confirmLoading = true
postAction('params/collectManifest/referParams', param).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('areaVisibleAssignedbyflag', false)
this.$emit('GetgetTableList')
+ this.confirmLoading = false
} else {
this.$message.warning(res.message)
+ this.confirmLoading = false
}
})
}})
diff --git a/jero-web/src/components/SynchronousSubmissionLibrary/index.vue b/jero-web/src/components/SynchronousSubmissionLibrary/index.vue
index 7edd7ad05..a3f002ce2 100644
--- a/jero-web/src/components/SynchronousSubmissionLibrary/index.vue
+++ b/jero-web/src/components/SynchronousSubmissionLibrary/index.vue
@@ -92,6 +92,7 @@ export default {
handleSubmit() {
let _this = this
let param = {ids: this.selectedRowKeysArray, paramsManifestId: this.paramsManifest.id }
+ this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/syncReport',
method: 'post',
@@ -114,12 +115,15 @@ export default {
_this.$message.success(_this.$t('OperationSuccessful'))
this.$emit('areaVisibsynchronous', false)
this.$emit('GetgetTableList')
+ this.confirmLoading = false
}else{
_this.$message.warning(_this.$t('operationFailed'))
+ this.confirmLoading = false
}
})
.catch( (error) =>{
console.log(error);
+ this.confirmLoading = false
});
}
}
diff --git a/jero-web/src/components/TaskCutOffTime/index.vue b/jero-web/src/components/TaskCutOffTime/index.vue
index 7ca73d419..e1e570155 100644
--- a/jero-web/src/components/TaskCutOffTime/index.vue
+++ b/jero-web/src/components/TaskCutOffTime/index.vue
@@ -107,12 +107,15 @@ export default {
handleSubmit() {
let _this = this
let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
+ this.confirmLoading = true
postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
if (res.success) {
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$message.success(res.message)
+ this.confirmLoading = false
} else {
this.$message.warning(res.message)
+ this.confirmLoading = false
}
})
},
diff --git a/jero-web/src/main.js b/jero-web/src/main.js
index f0bdff612..171fe1fb7 100644
--- a/jero-web/src/main.js
+++ b/jero-web/src/main.js
@@ -50,9 +50,10 @@ import {
import config from '@/defaultSettings'
//引入
import socketPublic from '@/utils/socketVuex.js'
-
+import socketPublicOne from '@/utils/socketVuexOne.js'
//挂载
Vue.prototype.$socketPublic = socketPublic
+Vue.prototype.$socketPublicOne = socketPublicOne
import JDictSelectTag from './components/dict/index.js'
import hasPermission from '@/utils/hasPermission'
import vueBus from '@/utils/vueBus'
diff --git a/jero-web/src/utils/socketVuexOne.js b/jero-web/src/utils/socketVuexOne.js
new file mode 100644
index 000000000..5e1e6a4ae
--- /dev/null
+++ b/jero-web/src/utils/socketVuexOne.js
@@ -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)
+ }
+ }
+})
\ No newline at end of file
diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
index e85d4ffaa..5a9322ba1 100644
--- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
+++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
@@ -511,7 +511,9 @@
mounted() {
this.GetgetLoginUserType()
this.time = setInterval(() => {
- this.handlePreservation()
+ if (this.currentPersonRole == "dre"){
+ this.handlePreservation()
+ }
}, 10000)
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
diff --git a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue
index 941b85887..0c1b447f0 100644
--- a/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue
+++ b/jero-web/src/views/projectManagement/components/TaskParameterCollection.vue
@@ -65,7 +65,8 @@
{{$t('configure')}}
{{$t('edit')}}
- {{$t('deleteLib')}}
+ {{$t('deleteLib')}}
{{$t('historicalVersion')}}
@@ -114,6 +115,7 @@
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import eventBUs from '@/common/event'
+ import store from '@/store/'
export default {
name: 'TaskParameterCollection',
@@ -199,7 +201,7 @@
conList: 'params/config/list',
changeExtension: 'params/manifest/changeExtension',
verifyConfig: 'params/manifest/verifyConfig',
- configurelist:'params/manifest/getConfigFlag',
+ configurelist: 'params/manifest/getConfigFlag'
},
loading: false,
dataSource: [],
@@ -215,7 +217,7 @@
version: 0,
itemId: '', // 配置id
itemRow: {}, // 配置一行数据
- configFlag:'',
+ configFlag: '',
historicalVisible: false,
historicalRow: {}, // 历史版本得数据
drawerVisible: false,
@@ -224,6 +226,22 @@
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() {
this.getlist()
},
@@ -276,7 +294,7 @@
configure(item) {
this.itemId = item.id
this.itemRow = item
- this.$refs.configureRef.addModel(item.id,item)
+ this.$refs.configureRef.addModel(item.id, item)
},
handleCancel(val) {
this.areaVisible = val
From 0dda7f354b94439881364f296f6717d12d777555 Mon Sep 17 00:00:00 2001
From: qq787203167 <787203167@qq.com>
Date: Sat, 2 Jul 2022 15:27:19 +0800
Subject: [PATCH 11/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?=
=?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../parameter/ParameterTemplate/index.vue | 2 +
.../parameter/escalationlibrary/index.vue | 576 +++++++++---------
.../views/parameter/parameterexport/index.vue | 2 +
.../views/parameter/parameterlist/index.vue | 2 +
4 files changed, 297 insertions(+), 285 deletions(-)
diff --git a/jero-web/src/views/parameter/ParameterTemplate/index.vue b/jero-web/src/views/parameter/ParameterTemplate/index.vue
index 3929a5a96..0cd0284c7 100644
--- a/jero-web/src/views/parameter/ParameterTemplate/index.vue
+++ b/jero-web/src/views/parameter/ParameterTemplate/index.vue
@@ -1,6 +1,7 @@
+
@@ -29,6 +30,7 @@
+
diff --git a/jero-web/src/views/parameter/escalationlibrary/index.vue b/jero-web/src/views/parameter/escalationlibrary/index.vue
index 65bf2c916..1759cc496 100644
--- a/jero-web/src/views/parameter/escalationlibrary/index.vue
+++ b/jero-web/src/views/parameter/escalationlibrary/index.vue
@@ -1,32 +1,34 @@
-
-
-
-
-
{{$t('entryName')}}
+
+
+
+
+
+ {{$t('entryName')}}
+
+
-
-
-
-
-
-
-
{{$t('ListTitle')}}
+
+
+
+
+ {{$t('ListTitle')}}
+
+
-
-
-
-
+
+
{{$t('query')}}
{{$t('reset')}}
-
+
+
\ No newline at end of file
diff --git a/jero-web/src/views/parameter/parameterexport/index.vue b/jero-web/src/views/parameter/parameterexport/index.vue
index bda62d382..bad629984 100644
--- a/jero-web/src/views/parameter/parameterexport/index.vue
+++ b/jero-web/src/views/parameter/parameterexport/index.vue
@@ -1,6 +1,7 @@
+
@@ -18,6 +19,7 @@
+
diff --git a/jero-web/src/views/parameter/parameterlist/index.vue b/jero-web/src/views/parameter/parameterlist/index.vue
index f1a41648e..c9f6242be 100644
--- a/jero-web/src/views/parameter/parameterlist/index.vue
+++ b/jero-web/src/views/parameter/parameterlist/index.vue
@@ -1,6 +1,7 @@