Browse Source

老版本alldone

Your Name 1 year ago
parent
commit
926ffe6a16
6 changed files with 998 additions and 23 deletions
  1. 80 1
      build/webpack.base.conf.js
  2. 867 14
      package-lock.json
  3. 9 3
      package.json
  4. 4 0
      src/components/DiagCalc.vue
  5. 32 5
      src/components/RegPatinfo.vue
  6. 6 0
      src/main.js

+ 80 - 1
build/webpack.base.conf.js

@@ -4,6 +4,9 @@ const utils = require('./utils')
 const config = require('../config')
 const vueLoaderConfig = require('./vue-loader.conf')
 
+const vuxLoader = require('vux-loader')
+
+
 function resolve (dir) {
   return path.join(__dirname, '..', dir)
 }
@@ -19,7 +22,79 @@ const createLintingRule = () => ({
   }
 })
 
-module.exports = {
+// module.exports = {
+//   context: path.resolve(__dirname, '../'),
+//   entry: {
+//     app: './src/main.js'
+//   },
+//   output: {
+//     path: config.build.assetsRoot,
+//     filename: '[name].js',
+//     publicPath: process.env.NODE_ENV === 'production'
+//       ? config.build.assetsPublicPath
+//       : config.dev.assetsPublicPath
+//   },
+//   resolve: {
+//     extensions: ['.js', '.vue', '.json'],
+//     alias: {
+//       'vue$': 'vue/dist/vue.esm.js',
+//       '@': resolve('src'),
+//     }
+//   },
+//   module: {
+//     rules: [
+//       ...(config.dev.useEslint ? [createLintingRule()] : []),
+//       {
+//         test: /\.vue$/,
+//         loader: 'vue-loader',
+//         options: vueLoaderConfig
+//       },
+//       {
+//         test: /\.js$/,
+//         loader: 'babel-loader',
+//         include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
+//       },
+//       {
+//         test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
+//         loader: 'url-loader',
+//         options: {
+//           limit: 10000,
+//           name: utils.assetsPath('img/[name].[hash:7].[ext]')
+//         }
+//       },
+//       {
+//         test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
+//         loader: 'url-loader',
+//         options: {
+//           limit: 10000,
+//           name: utils.assetsPath('media/[name].[hash:7].[ext]')
+//         }
+//       },
+//       {
+//         test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
+//         loader: 'url-loader',
+//         options: {
+//           limit: 10000,
+//           name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+//         }
+//       }
+//     ]
+//   },
+//   node: {
+//     // prevent webpack from injecting useless setImmediate polyfill because Vue
+//     // source contains it (although only uses it if it's native).
+//     setImmediate: false,
+//     // prevent webpack from injecting mocks to Node native modules
+//     // that does not make sense for the client
+//     dgram: 'empty',
+//     fs: 'empty',
+//     net: 'empty',
+//     tls: 'empty',
+//     child_process: 'empty'
+//   }
+// }
+
+const webpackConfig = {
   context: path.resolve(__dirname, '../'),
   entry: {
     app: './src/main.js'
@@ -90,3 +165,7 @@ module.exports = {
     child_process: 'empty'
   }
 }
+
+module.exports = vuxLoader.merge(webpackConfig, {
+  plugins: ['vux-ui']
+})

File diff suppressed because it is too large
+ 867 - 14
package-lock.json


+ 9 - 3
package.json

@@ -19,7 +19,11 @@
     "mint-ui": "^2.2.13",
     "vue": "^2.5.2",
     "vue-echarts": "^6.5.5",
-    "vue-router": "^3.0.1"
+    "vue-hash-calendar": "^1.4.30",
+    "vue-router": "^3.0.1",
+    "vue2-datepick": "^3.0.11",
+    "vue2-datepicker": "^3.11.1",
+    "vux": "^2.11.1"
   },
   "devDependencies": {
     "@vue/composition-api": "^1.7.1",
@@ -58,7 +62,7 @@
     "jest": "^22.0.4",
     "jest-serializer-vue": "^0.3.0",
     "less": "^4.1.3",
-    "less-loader": "^11.1.0",
+    "less-loader": "^11.1.3",
     "lib-flexible": "^0.3.2",
     "nightwatch": "^0.9.12",
     "node-notifier": "^5.1.2",
@@ -84,10 +88,12 @@
     "vue-loader": "^13.3.0",
     "vue-style-loader": "^3.1.2",
     "vue-template-compiler": "^2.5.2",
+    "vux-loader": "^1.2.9",
     "webpack": "^3.6.0",
     "webpack-bundle-analyzer": "^2.9.0",
     "webpack-dev-server": "^2.9.1",
-    "webpack-merge": "^4.1.0"
+    "webpack-merge": "^4.1.0",
+    "yaml-loader": "^0.8.0"
   },
   "engines": {
     "node": ">= 6.0.0",

+ 4 - 0
src/components/DiagCalc.vue

@@ -402,4 +402,8 @@
     margin-left: 105px;
   }
 
+  /deep/ .picker-items{
+    width:100%!important;
+  }
+
 </style>

+ 32 - 5
src/components/RegPatinfo.vue

@@ -14,13 +14,16 @@
           <img src="../assets/images/down.png" alt="" width="16px">
         </mt-field>
         <mt-field placeholder="请输入手机号" label="病例手机" v-model="form.phone" type="number"></mt-field>
+        
       </div>
       <div class="footer">
         <div class="jbbtn" @click="submit">下一页</div>
         <div class="jbbtn" @click="$router.go(-1)">返回</div>
+        <div class="jbbtn" @click="birthdayClick">测试</div>
       </div>
+
     </div>
-    <mt-datetime-picker ref="birthdayPicker" type="date" v-model="form.birthday" year-format="{value} 年"
+    <mt-datetime-picker ref="birthdayPicker" type="date" v-model="now" year-format="{value} 年"
       month-format="{value} 月" date-format="{value} 日" @confirm='changeTime' :startDate='startDate' :endDate='endDate'
       @change='changeTime'
       @touchmove.native.stop.prevent
@@ -28,8 +31,11 @@
     </mt-datetime-picker>
     <mt-picker @change="onValuesChange" v-if="sexFlag" :slots="slots" ref="sexPicker" class="sexPicker"
       :showToolbar="true" @touchmove.native.stop.prevent>
-      <div class="pickerConfirm" @click="sexFlag=false">确认</div>
+      <div class="pickerConfirm" v-model="now" @click="sexFlag=false">确认</div>
     </mt-picker>
+
+    <vue-hash-calendar :visible="true"></vue-hash-calendar>
+
   </div>
 </template>
 
@@ -41,7 +47,7 @@
     Picker,
     Button
   } from 'mint-ui'
-
+  
   export default {
     name: 'Index',
     components: {
@@ -66,9 +72,21 @@
         }],
         startDate: new Date('1923/01/01'),
         endDate: new Date(this.$datetime.formatDate(new Date())),
+        now:new Date(),
       }
     },
     methods: {
+      birthdayClick(){//生日
+          this.$picker.show({
+            type:'datePicker',
+            date:'1990-01-01',
+            endTime:'2018-01-01',//截至时间
+            startTime:'1930-01-01',//开始时间
+            onOk:(date)=>{
+              this.birthday=date;    // birthday就是所需字段,在data 里定义下
+            } 
+          })
+      },
       goPage() {
         this.$router.push('/regpatpro')
       },
@@ -145,6 +163,15 @@
 
 </script>
 
-<style scoped lang="scss">
-
+<style scoped  lang="scss">
+  /* .picker-slot-wrapper{
+    transform: translate(0px, 10px) translateZ(0px)!important;
+    height: 252px!important;
+  } */
+  /deep/ .picker-items{
+    width:100%!important;
+  }
+  /deep/ .picker-slot{
+    /* overflow:scroll!important; */
+  }
 </style>

+ 6 - 0
src/main.js

@@ -12,9 +12,15 @@ import datetime from './utils/datetime'
 import constant from './utils/constant'
 import recheck from './utils/recheck'
 // import 'lib-flexible/flexible.js'
+import DatePicker from 'vue2-datepick'
+import vueHashCalendar from 'vue-hash-calendar'
+import 'vue-hash-calendar/lib/vue-hash-calendar.css'
 
 Vue.use(MintUI)
 Vue.component('v-chart', ECharts)
+Vue.use(DatePicker )
+Vue.use(vueHashCalendar)
+
 Vue.prototype.$api = api
 Vue.prototype.$datetime = datetime
 Vue.prototype.$const = constant