diff --git a/frontend/package.json b/frontend/package.json
index 6c2a079e3b..08b8939883 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -71,6 +71,7 @@
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"file-writer": "^1.0.2",
+ "html-webpack-inline-source-plugin": "0.0.10",
"vue-template-compiler": "2.6.14"
},
"eslintConfig": {
diff --git a/frontend/src/template/report/plan/PlanReport.vue b/frontend/src/template/report/plan/PlanReport.vue
new file mode 100644
index 0000000000..ae6db19c83
--- /dev/null
+++ b/frontend/src/template/report/plan/PlanReport.vue
@@ -0,0 +1,46 @@
+
+
+
+ {{test}}
+ sdfds
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/template/report/plan/plan-report.html b/frontend/src/template/report/plan/plan-report.html
new file mode 100644
index 0000000000..d33689c7a0
--- /dev/null
+++ b/frontend/src/template/report/plan/plan-report.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+ Test Plan Report
+
+
+
+
+
diff --git a/frontend/src/template/report/plan/plan-report.js b/frontend/src/template/report/plan/plan-report.js
new file mode 100644
index 0000000000..b29b38c08e
--- /dev/null
+++ b/frontend/src/template/report/plan/plan-report.js
@@ -0,0 +1,27 @@
+import Vue from 'vue';
+import ElementUI, {Button, Col, Form, FormItem, Input, Row} from 'element-ui';
+import '@/assets/theme/index.css';
+import '@/common/css/menu-header.css';
+import '@/common/css/main.css';
+import PlanReport from "./PlanReport.vue";
+import i18n from "@/i18n/i18n";
+import chart from "@/common/js/chart";
+
+
+Vue.use(ElementUI, {
+ i18n: (key, value) => i18n.t(key, value)
+});
+
+Vue.use(Row);
+Vue.use(Col);
+Vue.use(Form);
+Vue.use(FormItem);
+Vue.use(Input);
+Vue.use(Button);
+Vue.use(chart);
+
+new Vue({
+ el: '#planReport',
+ i18n,
+ render: h => h(PlanReport)
+});
diff --git a/frontend/vue.config.js b/frontend/vue.config.js
index 745766efec..f5a8c6d2c9 100644
--- a/frontend/vue.config.js
+++ b/frontend/vue.config.js
@@ -1,4 +1,5 @@
const path = require('path');
+const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin')
function resolve(dir) {
return path.join(__dirname, dir);
@@ -31,7 +32,12 @@ module.exports = {
document: {
entry: "src/document/document.js",
template: "src/document/document.html",
- filename: "document.html"
+ filename: "document.html",
+ },
+ planReport: {
+ entry: "src/template/report/plan/plan-report.js",
+ template: "src/template/report/plan/plan-report.html",
+ filename: "plan-report.html",
}
},
configureWebpack: {
@@ -40,9 +46,19 @@ module.exports = {
alias: {
'@': resolve('src')
}
- }
+ },
},
- chainWebpack(config) {
+ chainWebpack: config => {
+ // 报告模板打包成一个html
+ config.plugin('html-planReport')
+ .tap(args => {
+ args[0].inlineSource = '.(js|css)$';
+ return args;
+ });
+ config.plugin('inline-source-html-planReport')
+ .after('html-planReport')
+ .use(HtmlWebpackInlineSourcePlugin);
+
config.plugins.delete('prefetch');
}
};