Commit 5b5f1d55 authored by Wallen姚文辉's avatar Wallen姚文辉

新增默认抄送人

parent fdb9e228
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.233aa2e8.js"></script><script defer="defer" src="/js/app.74ff0d5e.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.3954dbdf.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.233aa2e8.js"></script><script defer="defer" src="/js/app.c7f1d60f.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.3954dbdf.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -13,7 +13,6 @@ import UploadCae from '@/views/tool/UploadCae.vue'; ...@@ -13,7 +13,6 @@ import UploadCae from '@/views/tool/UploadCae.vue';
import TestReport from '@/views/tool/TestReport'; import TestReport from '@/views/tool/TestReport';
import Echarts from "vue-echarts"; import Echarts from "vue-echarts";
import 'echarts'; import 'echarts';
import ECharts from 'vue-echarts';
import ViewUIPlus from 'view-ui-plus'; import ViewUIPlus from 'view-ui-plus';
...@@ -23,7 +22,6 @@ import 'view-ui-plus/dist/styles/viewuiplus.css' ...@@ -23,7 +22,6 @@ import 'view-ui-plus/dist/styles/viewuiplus.css'
axios.defaults.withCredentials = true axios.defaults.withCredentials = true
axios.defaults.baseURL = '/api' axios.defaults.baseURL = '/api'
// axios.defaults.baseURL = 0 ? 'http://172.22.25.173/api' : 'http://47.57.235.86:10001'
app.config.globalProperties.$http = axios app.config.globalProperties.$http = axios
app.component('v-chart', Echarts) app.component('v-chart', Echarts)
...@@ -69,12 +67,6 @@ axios.interceptors.request.use(function (config) { ...@@ -69,12 +67,6 @@ axios.interceptors.request.use(function (config) {
return config; return config;
}); });
// axios.interceptors.response.use(function (response) {
// if (response.data.code != 41000) return response;
// this.$Message.error("登录已过期")
// store.commit("settoken", '');
// router.push('/login')
// })
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
...@@ -90,15 +82,10 @@ router.beforeEach(async (to, from, next) => { ...@@ -90,15 +82,10 @@ router.beforeEach(async (to, from, next) => {
} }
} }
const findMenu = (menu, each) => { const findMenu = (menu, each) => {
for (let ele of menu) {
menu.forEach(element => { if (ele.router == each && each) return true
if (element.router == each && each) return true if (ele.children && findMenu(ele.children, each)) return true
if (element.children && findMenu(element.children)) return true }
});
// for (let ele of menu) {
// if (ele.router == each) return true
// if (ele.children) return findMenu(ele.children, each)
// }
} }
if (to.path == '/login') return next(); if (to.path == '/login') return next();
if (localStorage.getItem('token')) { if (localStorage.getItem('token')) {
...@@ -110,7 +97,7 @@ router.beforeEach(async (to, from, next) => { ...@@ -110,7 +97,7 @@ router.beforeEach(async (to, from, next) => {
userinfo = JSON.parse(userinfo) userinfo = JSON.parse(userinfo)
} }
const menu = userinfo.menu const menu = userinfo.menu
if (findMenu(menu, to.name) && !router.hasRoute(to.name)) { if (findMenu(menu, to.fullPath.split('/').pop()) && !router.hasRoute(to.name)) {
a(menu) a(menu)
return next(to) return next(to)
} }
......
...@@ -10,6 +10,17 @@ ...@@ -10,6 +10,17 @@
<template #name="{ row }"> <template #name="{ row }">
<strong>{{ row.name }}</strong> <strong>{{ row.name }}</strong>
</template> </template>
<template v-if="elements.indexOf('5-3') != -1" name="默认抄送人" #defaultCC="{ row }">
<Switch :model-value="row.default_cc" :true-value="1" :false-value="0"
@on-change="(status) => { changeDefaultCC(row, status) }">
<template #open>
<span></span>
</template>
<template #close>
<span></span>
</template>
</Switch>
</template>
<template v-if="elements.indexOf('5-2') != -1" name="编辑列" #action="{ row }"> <template v-if="elements.indexOf('5-2') != -1" name="编辑列" #action="{ row }">
<Button type="primary" size="small" style="margin-right: 5px" <Button type="primary" size="small" style="margin-right: 5px"
@click="addinfo = JSON.parse(JSON.stringify(row)); modlShow = true">编辑</Button> @click="addinfo = JSON.parse(JSON.stringify(row)); modlShow = true">编辑</Button>
...@@ -79,7 +90,7 @@ export default { ...@@ -79,7 +90,7 @@ export default {
name: null, name: null,
address: null address: null
}, },
this.modlShow = false; this.modlShow = false;
}, },
async addEmail() { async addEmail() {
...@@ -104,6 +115,9 @@ export default { ...@@ -104,6 +115,9 @@ export default {
this.$request("post", "/tool/testport/editemailuser", this.addinfo, this, () => { this.getEmail(); this.closeShow() }) this.$request("post", "/tool/testport/editemailuser", this.addinfo, this, () => { this.getEmail(); this.closeShow() })
}, },
changeDefaultCC(row, status) {
this.$request("post", "/tool/testport/changedefaultCC/" + row.id, null, this)
},
delEmail(id_) { delEmail(id_) {
this.$request("delete", "/tool/testport/deleteemailuser/" + id_, null, this, () => { this.getEmail(); }) this.$request("delete", "/tool/testport/deleteemailuser/" + id_, null, this, () => { this.getEmail(); })
}, },
...@@ -112,6 +126,17 @@ export default { ...@@ -112,6 +126,17 @@ export default {
watch: { watch: {
elements(value) { elements(value) {
if (value.indexOf('5-3') != -1 && this.columns.findIndex(each => { return each.title == '默认抄送人' }) == -1) {
this.columns.push({
title: '默认抄送人',
slot: 'defaultCC',
width: 300,
align: 'center'
})
} else {
const index = this.columns.findIndex(ele => { return ele.title == '默认抄送人' })
index != -1 && this.columns.splice(index, 1)
}
if (value.indexOf('5-2') != -1 && this.columns.findIndex(each => { return each.title == '编辑' }) == -1) { if (value.indexOf('5-2') != -1 && this.columns.findIndex(each => { return each.title == '编辑' }) == -1) {
this.columns.push({ this.columns.push({
title: '编辑', title: '编辑',
...@@ -120,9 +145,10 @@ export default { ...@@ -120,9 +145,10 @@ export default {
align: 'center' align: 'center'
}) })
} else { } else {
const index = this.columns.findIndex(ele => { return ele.title == 'Action' }) const index = this.columns.findIndex(ele => { return ele.title == '编辑' })
index != -1 && this.columns.splice(index, 1) index != -1 && this.columns.splice(index, 1)
} }
} }
}, },
created() { created() {
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
<div>{{ row.create_date }}</div> <div>{{ row.create_date }}</div>
</template> </template>
<template v-if="elements.indexOf('4-2') != -1" name="禁用" #action="{ row }"> <template v-if="elements.indexOf('4-2') != -1" name="禁用" #action="{ row }">
<Switch :model-value="row.disable" @on-change="(status) => { changeDisable(row, status) }"> <Switch :model-value="row.disable" :true-value="1" :false-value="0"
@on-change="(status) => { changeDisable(row, status) }">
<template #open> <template #open>
<span></span> <span></span>
</template> </template>
......
...@@ -221,6 +221,7 @@ export default { ...@@ -221,6 +221,7 @@ export default {
modlShow: false, modlShow: false,
sendto: [], sendto: [],
sendcc: [], sendcc: [],
defaultcc: [],
emailList: [], emailList: [],
bug_p_column: { bug_p_column: {
title: { title: {
...@@ -452,11 +453,11 @@ export default { ...@@ -452,11 +453,11 @@ export default {
if (this.fugailu < 100) return this.$Message.error("用例覆盖率不足100%(每个需求必须关联测试用例)") if (this.fugailu < 100) return this.$Message.error("用例覆盖率不足100%(每个需求必须关联测试用例)")
this.edit = false; this.edit = false;
this.getallEmail(); this.getallEmail();
this.getdefaultCC();
this.modlShow = true; this.modlShow = true;
}, },
show() { show() {
var info = '' var info = ''
console.info(this.testResult)
if (this.testResult.includes("测试不通过")) { if (this.testResult.includes("测试不通过")) {
const a = this.testResult.split("测试不通过") const a = this.testResult.split("测试不通过")
for (var i = 0; i < a.length; i++) { for (var i = 0; i < a.length; i++) {
...@@ -471,7 +472,6 @@ export default { ...@@ -471,7 +472,6 @@ export default {
} else { } else {
info = '<span>' + this.testResult + '</span>' info = '<span>' + this.testResult + '</span>'
} }
console.info(info)
document.getElementById("jielun").innerHTML = info document.getElementById("jielun").innerHTML = info
}, },
searchCaseBykey(key) { searchCaseBykey(key) {
...@@ -496,6 +496,7 @@ export default { ...@@ -496,6 +496,7 @@ export default {
this.$request('get', 'tool/testport/iteration/' + project, null, this, (data) => { this.iterations = data.data }) this.$request('get', 'tool/testport/iteration/' + project, null, this, (data) => { this.iterations = data.data })
}, getReportInfo() { }, getReportInfo() {
if (!this.ReC.iteration) return if (!this.ReC.iteration) return
if (this.edit) this.edit = !this.edit
this.$request('get', 'tool/testport/reportinfo', this.ReC, this, (data) => { this.$request('get', 'tool/testport/reportinfo', this.ReC, this, (data) => {
this.bug = data.data.bug this.bug = data.data.bug
this.case = data.data.testcase this.case = data.data.testcase
...@@ -514,6 +515,9 @@ export default { ...@@ -514,6 +515,9 @@ export default {
if (this.statusMap[k] == '完成' || this.statusMap[k] == '已完成') return k if (this.statusMap[k] == '完成' || this.statusMap[k] == '已完成') return k
} }
}, },
getdefaultCC() {
this.$request('get', '/tool/testport/defaultCClist', null, this, (data) => { this.defaultcc = data.data })
},
render() { render() {
this.report = true this.report = true
setTimeout(() => { setTimeout(() => {
...@@ -584,6 +588,13 @@ export default { ...@@ -584,6 +588,13 @@ export default {
}, 50); }, 50);
} }
}, },
defaultcc: {
handler(value) {
value.forEach(element => {
if (!this.sendcc.includes(element.address)) this.sendcc.push(element.address)
});
}, deep: true
},
bug: { bug: {
handler(value) { handler(value) {
this.bug_p_column.series[0].data = [] this.bug_p_column.series[0].data = []
......
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
this.clearProcess(); this.clearProcess();
this.running = true this.running = true
this.upload(this.makecase, this.relevancycase) this.upload(this.makecase, this.relevancycase)
// this.upload(() => { }, () => { })
}, },
clearProcess() { clearProcess() {
this.step = null; this.step = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment