ソースを参照

数据服务模式Iframe

zhangxc 6 年 前
コミット
a233c5fb52
5 ファイル変更67 行追加5 行削除
  1. 5 5
      src/css/landscape.css
  2. 9 0
      src/css/landscapePage.css
  3. 21 0
      src/html/landscapePage.html
  4. 18 0
      src/landscapePage.js
  5. 14 0
      webpack.config.js

+ 5 - 5
src/css/landscape.css

@@ -1,9 +1,9 @@
 .bodyWrap {
-  width: 1000px;
+  /* width: 1000px; */
   height: 128px;
   overflow: hidden;
   font-size: 13px;
-  padding: 13px 0
+  /* padding: 13px 0 */
 }
 .iframeWrap {
     /* margin: 10px auto 50px;
@@ -12,14 +12,14 @@
     height: 100%;
   }
   .push {
-    width: 60%;
+    width: 55%;
     float: left;
-    padding: 13px 0;
+    padding: 13px 0
   }
   .treat {
     width: 35%;
     float: left;
-    padding: 13px 0;
+    padding: 13px 0
   }
   .iframeWrap .conditionHintPub {
     /* border: 1px solid #F2F2F2; */

+ 9 - 0
src/css/landscapePage.css

@@ -0,0 +1,9 @@
+p {
+    color: blueviolet;
+  }
+  .iframeContainer {
+    width: 1000px;
+    height: 128px;
+    margin: 0 auto;
+    border: 1px solid #ccc;
+  }

ファイルの差分が大きいため隠しています
+ 21 - 0
src/html/landscapePage.html


+ 18 - 0
src/landscapePage.js

@@ -0,0 +1,18 @@
+require('./css/landscapePage.css');
+const $ = require("jquery");
+
+var lis = [
+  {
+    detailName: "HGB*3/HCT",
+    maxValue: "",
+    minValue: "",
+    name: "血常规",
+    otherValue: "",
+    source: "0",
+    time: "2019-05-07 17:11",
+    uniqueName: "血常规-HGB*3/HCT",
+    units: "",
+    value: "4"
+  }
+];
+$(".iframeContainer").attr("src",'landscape.html?age=22&lisJson='+JSON.stringify(lis)+'&diagJson=糖尿病&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常, 报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg')

+ 14 - 0
webpack.config.js

@@ -7,6 +7,7 @@ const webpack = require('webpack');
 const proxyHost = "http://192.168.2.236:5050";
 module.exports = {
   entry: {
+    landscapePage: path.resolve(__dirname, 'src', 'landscapePage.js'),
     landscape: path.resolve(__dirname, 'src', 'landscape.js'),
     index: path.resolve(__dirname, 'src', 'index.js'),
     page: path.resolve(__dirname, 'src', 'page.js'),
@@ -79,6 +80,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'landscapePage',
+      template: path.resolve(__dirname, 'src/html', 'landscapePage.html'),
+      filename: 'landscapePage.html',
+      chunks: ['landscapePage', 'vendor', 'common'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: 'information',
       template: path.resolve(__dirname, 'src/html', 'information.html'),