luolei 4 rokov pred
rodič
commit
d524fbd68b
4 zmenil súbory, kde vykonal 108 pridanie a 0 odobranie
  1. 0 0
      src/css/check.less
  2. 13 0
      src/html/check.html
  3. 81 0
      src/js/check.js
  4. 14 0
      webpack.config.js

+ 0 - 0
src/css/check.less


+ 13 - 0
src/html/check.html

@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+</head>
+<body>
+  <div class="">
+
+  </div>
+</body>
+</html>

+ 81 - 0
src/js/check.js

@@ -0,0 +1,81 @@
+if(!Promise){
+  var Promise = require("bluebird");
+  Promise.config({
+    longStackTraces: true,
+    warnings: true
+  })
+}
+
+const $ = require("jquery");
+const { post,config,getUrlArgObject } = require('./promise.js');
+let mrId = getUrlArgObject('mrId')
+let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
+let msg;
+
+function getMRInfo() {
+   return post(config.getMr2,{mrId:mrId})
+}
+$('.empty').css("display","none")
+if(mrId){
+  getMRInfo().then(res =>{
+    if(res.data.code == '0'){
+        msg = res.data.data ||{}
+        window.msg = msg
+        renderPushData()
+    }
+  }).catch(function (err) {
+      console.log(err);
+  })
+} else{
+
+}
+
+
+
+let disName=""
+function handleShow(){
+  const newinConf = {
+    width: '600',   //窗口的文档显示区的宽度。以像素计。
+    height: '826',  //窗口文档显示区的高度。以像素计。
+    left: '0',  //窗口的 x 坐标。以像素计。
+    top: '0',    //窗口的 y 坐标。以像素计。
+    openMode: "_blank"  //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
+  }
+  const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
+  window.open('./emergency.html?disName='+disName, newinConf.openMode, newWindowLocation)
+}
+$(document).on('click',".allDis .allName",function(){
+  handleShow()
+})
+$(document).on('click',".singleDis",function(){
+  $(this).next().css("display","block")
+  $(this).css("display","none")
+})
+$(document).on('click',".allDis .right,.allDis .secDis",function(){
+  $(".allDis").css("display","none")
+  $(".singleDis").css("display","block")
+})
+
+
+function renderPushData(){
+  return getPushInfo().then(res =>{
+    if(res.data.code == "0"){
+      const result = res.data.data.debug['数据']
+      let allData = {}
+      allData.chiefLabel = result.chiefLabel //主诉
+      allData.presentLabel = result.presentLabel //现病史
+      allData.pastLabel = result.pastLabel //既往史
+      allData.personalLabel = result.personalLabel //个人史
+      allData.familyLabel = result.familyLabel //家族史
+      allData.maritalLabel = result.maritalLabel //婚育史
+      allData.menstrualLabel = result.menstrualLabel //月经史
+      allData.vitalLabel = result.vitalLabel //体格
+      console.log(allData)
+      
+    }
+  })
+}
+
+function getPushInfo() {
+  return  post(config.pushInner,Object.assign({},msg,{featureType: '1,4,5,6,7,8,9,10',hospitalId:hospitalIdUrl||msg.hospitalId,ruleType:config.ruleTypeMap['22']}))
+}

+ 14 - 0
webpack.config.js

@@ -27,6 +27,7 @@ module.exports = {
     caseWriteStandard: path.resolve(__dirname, 'src/js', 'caseWriteStandard.js'),
     generalTreat:path.resolve(__dirname, 'src/js', 'generalTreat.js'),
     cdssPlan:path.resolve(__dirname, 'src/js', 'cdssPlan.js'),
+    check:path.resolve(__dirname, 'src/js', 'check.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -52,6 +53,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'index',
+      template: path.resolve(__dirname, 'src/html', 'check.html'),
+      filename: 'check.html',
+      chunks: ['check', 'vendor', 'common'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: '智能警示',
       template: path.resolve(__dirname, 'src/html', 'smartAlert.html'),