diff --git a/src/locales/cn.js b/src/locales/cn.js index e0fdf32ead2da8d533802301d44dcfd403d198d2..7ec21d86a24da42f6bef42a15c0dcda690a30bbf 100644 --- a/src/locales/cn.js +++ b/src/locales/cn.js @@ -92,6 +92,7 @@ const cn = { addFail: '添加失败', addSuccess: '添加成功', modifyFail: '修改失败', + patternWrong: '配置参数模式错误,格式必须为键值对,并且以;分开', submitSuccess: '提交成功', manualTip: '自动化用例已完成,还有手动用例,需等待管理员手工完成', noCase: '此场景没有用例', @@ -111,6 +112,7 @@ const cn = { configIdEmpty: '配置项不能不选!', nameLength: '长度为1-16位', deleteContrubuteCase: '是否要继续删除贡献用例?', + deleteconfig: '是否继续删除该配置项?', confirmdeleteTask: '是否要继续删除测试任务?', moreThan2: '只能上传不超过2MB的文件!', uploadSuc: '上传成功', diff --git a/src/locales/en.js b/src/locales/en.js index a0896a5d23edd3f2b14994963ec47ed797d0c50f..1a86cec54a424cd8756ad81b68883c4044b1c09f 100644 --- a/src/locales/en.js +++ b/src/locales/en.js @@ -94,6 +94,7 @@ const en = { addSuccess: 'Add successful', modifySuccess: 'Successfully modified', modifyFail: 'Fail to modify', + patternWrong: 'config param pattern wrong,each param must split by ; and key value must split by =', submitSuccess: 'Submitted successfully', manualTip: 'There are also manual use cases, which need to be completed manually by the administrator', noCase: 'There is no use case for this scenario', @@ -113,6 +114,7 @@ const en = { configIdEmpty: 'Please select a configuration item!', nameLength: '1-16 digits in length', deleteContrubuteCase: ' Do you want to continue to delete the contribution use case?', + deleteconfig: 'Whether to continue to delete this configuration item?', confirmdeleteTask: 'Do you want to continue deleting the test task?', moreThan2: 'Can only upload no more than 2MB!', uploadSuc: 'Upload Succcess', diff --git a/src/pages/home/ContributionList.vue b/src/pages/home/ContributionList.vue index 03b39fe4c2faa8c25cfc8024a2bd8a3232bf2031..856640b66d53958a8c85b6b9828bfb1ee5847335 100644 --- a/src/pages/home/ContributionList.vue +++ b/src/pages/home/ContributionList.vue @@ -214,6 +214,12 @@ export default { }) this.pageData = data }).catch(() => { + this.$message({ + showClose: true, + duration: 2000, + message: this.$t('promptMessage.addFail'), + type: 'warning' + }) this.dataLoading = false }) }, diff --git a/src/pages/home/addConfigDig.vue b/src/pages/home/addConfigDig.vue index 771cab8bb8e6e5e84b39abe1ab4097c88878fed4..1d8b723dfc0d7a93d7be31daf6215b1016f0c38b 100644 --- a/src/pages/home/addConfigDig.vue +++ b/src/pages/home/addConfigDig.vue @@ -5,6 +5,7 @@ :title="this.operate==='add'? $t('home.addConfig'):$t('home.modifyConfig')" :close-on-click-modal="false" class="addConfig" + :show-close="false" >

@@ -175,6 +176,7 @@ title="提示" width="25%" class="prompt-dialog" + :show-close="false" >

- {{ $t('promptMessage.deleteContrubuteCase') }} + {{ $t('promptMessage.deleteconfig') }}

{ + if (error.response.data.message === 'config param pattern wrong,each param must split by ; and key value must split by =') { + this.$message({ + showClose: true, + duration: 2000, + type: 'warning', + message: this.$t('promptMessage.patternWrong') + }) + } else { + this.$message({ + showClose: true, + duration: 2000, + type: 'warning', + message: this.$t('promptMessage.addFail') + }) + } }) } else { Taskmgmt.modifyConfigApi(this.modifyId, params).then(res => { @@ -419,6 +437,22 @@ export default { message: this.$t('promptMessage.modifySuccess') }) this.$parent.getConfigList() + }).catch(error => { + if (error.response.data.message === 'config param pattern wrong,each param must split by ; and key value must split by =') { + this.$message({ + showClose: true, + duration: 2000, + type: 'warning', + message: this.$t('promptMessage.patternWrong') + }) + } else { + this.$message({ + showClose: true, + duration: 2000, + type: 'warning', + message: this.$t('promptMessage.modifyFail') + }) + } }) } this.$nextTick(() => { diff --git a/src/pages/myApp/ATPReport.vue b/src/pages/myApp/ATPReport.vue index 2a8fd9d721bf49ebc60e85b2e3c81e98f5028b45..c0c931cecce17230e37dd1ab63f6924f6d55d1e3 100644 --- a/src/pages/myApp/ATPReport.vue +++ b/src/pages/myApp/ATPReport.vue @@ -303,7 +303,7 @@ export default { }, beforeDestroy () { window.onresize = null - } + }, methods: { getTaskId () { if (this.currUrl.includes('language')) { diff --git a/src/pages/myApp/ATPTask.vue b/src/pages/myApp/ATPTask.vue index e47c7f1ec0fb8d2814ae6a5dad9749d2eacad525..983cc4ef24102b85bc27a223cf2ef8e31f3b663b 100644 --- a/src/pages/myApp/ATPTask.vue +++ b/src/pages/myApp/ATPTask.vue @@ -55,6 +55,7 @@ class="common-btn" @click="deleteTask" :disabled="ids.length===0?true:false" + v-if="isAdmin" > {{ $t('common.delete') }} @@ -299,7 +300,8 @@ export default { limitSize: 5, offsetPage: 0, listTotal: 0, - currentPage: 1 + currentPage: 1, + isAdmin: false } }, beforeMount () { @@ -334,6 +336,12 @@ export default { next() }, methods: { + initUser () { + let _authorities = sessionStorage.getItem('authorities') + if (_authorities && _authorities.length > 0) { + this.isAdmin = _authorities.includes('ROLE_ATP_ADMIN') + } + }, selectList () { sessionStorage.setItem('currentPage', 1) this.getTaskList() diff --git a/src/pages/myApp/TestScenarios.vue b/src/pages/myApp/TestScenarios.vue index 16f2a6e23cc85d98dc5b2b444619085c0006f110..a7b6919fea19a1ef5769f5046650f37ef3d368e7 100644 --- a/src/pages/myApp/TestScenarios.vue +++ b/src/pages/myApp/TestScenarios.vue @@ -650,7 +650,7 @@ export default { position: relative; background-color: #4e3494; .scenariosLogo{ - min-height: 213px; + height: 213px; .sceneimage{ display: block; width: 100%; @@ -737,7 +737,7 @@ export default { span{ color: #4b4b66 !important; } - } + } } .el-dialog{ .el-collapse {