Commit b2877895 authored by Wallen姚文辉's avatar Wallen姚文辉

新增邮件回复功能

parent d4237c3c
<!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="stylesheet" href="/dist/plugins/css/pluginsCss.css"/><link rel="stylesheet" href="/dist/plugins/plugins.css"/><link rel="stylesheet" href="/dist/css/luckysheet.css"/><link rel="stylesheet" href="/dist/assets/iconfont/iconfont.css"/><script src="/dist/plugins/js/plugin.js"></script><script src="/dist/luckysheet.umd.js"></script><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.4a1cb455.js"></script><script defer="defer" src="/js/app.c9bff266.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.57e60919.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
<!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="stylesheet" href="/dist/plugins/css/pluginsCss.css"/><link rel="stylesheet" href="/dist/plugins/plugins.css"/><link rel="stylesheet" href="/dist/css/luckysheet.css"/><link rel="stylesheet" href="/dist/assets/iconfont/iconfont.css"/><script src="/dist/plugins/js/plugin.js"></script><script src="/dist/luckysheet.umd.js"></script><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.e401b6aa.js"></script><script defer="defer" src="/js/app.9cdd9aac.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.57e60919.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
"use strict";(self["webpackChunkyinhe_test"]=self["webpackChunkyinhe_test"]||[]).push([[10],{7010:function(e,n,t){t.r(n),t.d(n,{default:function(){return a}});var r=t(5796);function c(e,n,t,c,o,s){const u=(0,r.resolveComponent)("Exception");return(0,r.openBlock)(),(0,r.createBlock)(u,{type:"404"})}var o={},s=t(1241);const u=(0,s.A)(o,[["render",c]]);var a=u}}]);
//# sourceMappingURL=10.2289adbe.js.map
\ No newline at end of file
//# sourceMappingURL=10.6d4e528e.js.map
\ No newline at end of file
{"version":3,"file":"js/10.2289adbe.js","mappings":"0QACIA,EAAAA,EAAAA,aAAwBC,EAAA,CAAbC,KAAK,O,CAGhB,OAEC,E,UCDL,MAAMC,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,KAEpE,O","sources":["webpack://yinhe_test/./src/views/error/index.vue","webpack://yinhe_test/./src/views/error/index.vue?45db"],"sourcesContent":["<template>\n <Exception type=\"404\" />\n</template>\n<script>\n export default {\n \n }\n</script>","import { render } from \"./index.vue?vue&type=template&id=fda2373e\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["_createBlock","_component_Exception","type","__exports__","render"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"file":"js/10.6d4e528e.js","mappings":"0QACIA,EAAAA,EAAAA,aAAwBC,EAAA,CAAbC,KAAK,O,CAGhB,OAEC,E,UCDL,MAAMC,GAA2B,OAAgB,EAAQ,CAAC,CAAC,SAASC,KAEpE,O","sources":["webpack://yinhe_test/./src/views/error/index.vue","webpack://yinhe_test/./src/views/error/index.vue?45db"],"sourcesContent":["<template>\n <Exception type=\"404\" />\n</template>\n<script>\n export default {\n \n }\n</script>","import { render } from \"./index.vue?vue&type=template&id=fda2373e\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["_createBlock","_component_Exception","type","__exports__","render"],"sourceRoot":""}
\ 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.
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.
......@@ -20,6 +20,25 @@
<Button type="primary" v-if="pagestatus == 0 || pagestatus == 1" @click="breforerunjenkins"
style="width:130px;margin-left: 10px;">回归脚本运行</Button>
</div>
<div style="text-align: left;margin-top: 10px;">
<DatePicker v-model="receive_time" type="date" :options="options1" placeholder="邮件收件时间"
style="width: 200px" />
<Select v-model="mail_id" style="width:200px;margin-left: 10px;" placeholder="请选择回复邮件">
<Option v-for="item in receive_mails" :value="item.id">
<slot>
<p style="font-size: 15px;font-weight: bold">{{ item.sub }}</p>
<div
style="display:flex;justify-content: space-between;margin-right: 8px;margin-left: 8px;margin-top: 3px;">
<div style="">{{ item.from }}</div>
<div style="color: #808695;">{{ item.receive_time }}</div>
</div>
</slot>
</Option>
</Select>
</div>
</template>
<template #content>
<div></div>
......@@ -94,8 +113,8 @@
<span>未关闭bug数:</span>
<span v-if="bug.filter(ele => { return ele.statusId != getStatuSuccessId() }).length == 0"
style="color: #19be6b;">{{
bug.filter(ele => { return ele.statusId != getStatuSuccessId() }).length }}</span>
<span v-else style="color: #ed4014;">{{ bug.filter(ele => {
bug.filter(ele => { return ele.statusId != getStatuSuccessId() }).length}}</span>
<span v-else style="color: #ed4014;">{{bug.filter(ele => {
return ele.statusId != getStatuSuccessId()
}).length
}}</span>
......@@ -349,6 +368,8 @@
<v-chart :option="bug_user_column" style="height: 300px"></v-chart></Col>
</Row>
</div>
<div style="background-color: #e8eaec;" v-html="mailbody">
</div>
<Spin size="large" fix :show="spinShow"></Spin>
</Card>
<Space wrap>
......@@ -370,23 +391,23 @@
<Checkbox v-for="item in all_script" :label="item.name" border style="margin-top: 10px;"></Checkbox>
</CheckboxGroup>
<template #footer>
<Button @click="runscriptShow=false">取消</Button>
<Button @click="runscriptShow = false">取消</Button>
<Button type="primary" @click="runscript">确认</Button>
</template>
</Modal>
<Modal title="保存" v-model="stagingshow" class-name="vertical-center-modal"
@on-cancel="stagingshow = false;this.remark=null">
@on-cancel="stagingshow = false; this.remark = null">
备注:<Input v-model="remark" maxlength="200" show-word-limit type="textarea" :rows="4"
placeholder="请输入备注消息" />
<template #footer>
<Button @click="stagingshow = false;this.remark=null">取消</Button>
<Button type="primary" @click="stagingreport(0,()=>{stagingshow = false;})">确认</Button>
<Button @click="stagingshow = false; this.remark = null">取消</Button>
<Button type="primary" @click="stagingreport(0, () => { stagingshow = false; })">确认</Button>
</template>
</Modal>
<Modal v-model="auditshow">
<p>自动化脚本通过率未全部达到100%,需要提交审核</p>
<template #footer>
<Button @click="stagingshow = false;this.remark=null">取消</Button>
<Button @click="stagingshow = false; this.remark = null">取消</Button>
<Button type="primary" @click="toaudit">提交审核</Button>
</template>
</Modal>
......@@ -421,6 +442,27 @@ export default {
remark: null,
api_urls: [''],
apitestinfos: [{}],
receive_time: null,
receive_mails: [],
mail_id: null,
options1: {
shortcuts: [
{
text: '今日',
value() {
return new Date();
}
},
{
text: '昨日',
value() {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
return date;
}
}
]
},
jenkins_columns: [
{
title: '脚本名',
......@@ -703,10 +745,24 @@ export default {
caseCount: 0,
fugailu: 0,
timeoutFun: [],
mailbody: null,
quit: false,
}
},
methods: {
dateToString(date) {
var year = date.getFullYear();
var month = (date.getMonth() + 1).toString();
var day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length == 1) {
day = "0" + day;
}
var dateTime = year + "-" + month + "-" + day;
return dateTime;
},
getreportbyid(id) {
this.$request("get", "/tool/testport/getreport/" + id, null, this, (data) => {
this.remark = data.data.save_remark
......@@ -877,7 +933,7 @@ export default {
this.$request('get', 'tool/testport/view/' + project, null, this, (data) => { this.views = data.data; this.ReC.iteration = null })
},
getiterations(view) {
if (view==null) return
if (view == null) return
this.$request('get', 'tool/testport/iteration/' + view, null, this, (data) => { this.iterations = data.data })
}, getReportInfo() {
this.spinShow = true
......@@ -911,15 +967,15 @@ export default {
}, 50);
},
backdoor(){
backdoor() {
console.info(this.bug_s_column.series[0].data)
const a=this.bug_s_column.series[0].data.filter(item=>{if (item.name=='严重') return item})
const a = this.bug_s_column.series[0].data.filter(item => { if (item.name == '严重') return item })
console.info(a)
if (a.length>0){
const sub= '测试报告存在严重bug预警'
const info = '报告对象:'+this.info.project + "-" + this.info.sprint + "测试报告\n严重bug数:"+a[0].value
const target=['nanci.cxn@galaxyoversea.com','eifel.dpf@galaxyoversea.com','betty.zww@galaxyoversea.com']
this.$request("post", "/tool/testport/sendport", { to: target, subject: sub,cc:[],contents: info })
if (a.length > 0) {
const sub = '测试报告存在严重bug预警'
const info = '报告对象:' + this.info.project + "-" + this.info.sprint + "测试报告\n严重bug数:" + a[0].value
const target = ['nanci.cxn@galaxyoversea.com', 'eifel.dpf@galaxyoversea.com', 'betty.zww@galaxyoversea.com']
this.$request("post", "/tool/testport/sendport", { to: target, subject: sub, cc: [], contents: info })
}
},
async send() {
......@@ -949,8 +1005,11 @@ export default {
x: 0,
y: window.pageYOffset
}).then((canvas) => {
const sendinfo = this.receive_mails.filter(each => { return each.id == this.mail_id })[0]
console.info(sendinfo)
const m = `<img src='${canvas.toDataURL("image/png")}'/>`
const result = c + m
const q = `<p></p><p></p><p>${sendinfo.from}${sendinfo.receive_time}写道:</P>`
const result = c + m + q + this.mailbody
const sub = this.info.project + "-" + this.info.sprint + "测试报告"
this.closeShow()
this.backdoor()
......@@ -1107,6 +1166,24 @@ export default {
}
},
deep: true
},
receive_time: {
handler(value) {
if (value) {
this.$request('get', '/tool/testport/getMail', { date: this.dateToString(value) }, this, (data) => {
this.receive_mails = data.data
})
}
}, deep: true
},
mail_id: {
handler(value) {
if (value) {
this.$request('get', '/tool/testport/getMailDeatil/' + value, null, this, (data) => {
this.mailbody = data.data
})
}
}
}
},
created() {
......
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