nuxt.config.ignore.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. const webpack = require('webpack')
  2. module.exports = {
  3. srcDir: 'src/',
  4. // rootDir: './',
  5. /*
  6. ** Router config
  7. */
  8. router: {
  9. middleware: [
  10. 'check-auth'
  11. ]
  12. },
  13. /*
  14. ** Headers of the page
  15. */
  16. head: {
  17. title: '样本库系统',
  18. meta: [
  19. { charset: 'utf-8' },
  20. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  21. { hid: 'description', name: 'description', content: '样本库系统' }
  22. ],
  23. link: [
  24. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  25. ],
  26. script: [
  27. { src: '/js/utils.js' },
  28. { src: '/js/printUtilities.js' }
  29. ],
  30. },
  31. /*
  32. ** Customize the progress bar color
  33. */
  34. loading: { color: '#3B8070' },
  35. /*
  36. ** Build configuration
  37. */
  38. build: {
  39. babel: {
  40. plugins: ['transform-decorators-legacy', 'transform-class-properties']
  41. },
  42. extend (config, { isDev, isClient }) {
  43. config.resolve.alias['class-component'] = '@/plugins/class-component'
  44. },
  45. /*
  46. ** Run ESLint on save
  47. */
  48. // extend (config, ctx) {
  49. // if (ctx.dev && ctx.isClient) {
  50. // config.module.rules.push({
  51. // enforce: 'pre',
  52. // test: /\.(js|vue)$/,
  53. // loader: 'eslint-loader',
  54. // exclude: /(node_modules)/
  55. // })
  56. // }
  57. // },
  58. vendor: [
  59. // 'axios',
  60. 'element-ui',
  61. 'negotiator',
  62. 'vue-class-component',
  63. 'vuex-class',
  64. 'vue-i18n',
  65. 'vue-chartjs',
  66. 'vue-clipboards',
  67. 'moment',
  68. 'chart.js',
  69. 'deepmerge' // vue-chartjs dep
  70. ],
  71. extractCSS: true,
  72. filenames: {
  73. vendor: 'vendor.[hash:12].js',
  74. app: 'shanlan.[chunkhash:12].js',
  75. css: 'shanlan.[contenthash:12].css'
  76. },
  77. plugins: [
  78. new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /zh|en/)
  79. ]
  80. },
  81. /*
  82. ** Global CSS
  83. */
  84. css: [
  85. // 'normalize.css/normalize.css',
  86. 'element-ui/lib/theme-chalk/index.css',
  87. {src: '~assets/styles/main.scss', lang: 'scss'}
  88. // {src: '~assets/mstyles/index.scss', lang: 'scss'}
  89. ],
  90. /*
  91. ** Add element-ui in our app, see plugins/element-ui.js file
  92. */
  93. plugins: [
  94. '@/plugins/i18n',
  95. '@/plugins/element-ui',
  96. // '@/plugins/axios-defaults',
  97. {src: '@/plugins/clipboard', ssr: false},
  98. {src: '@/plugins/error-handler', ssr: false}
  99. ],
  100. modules: [
  101. // '@nuxtjs/auth',
  102. '~/modules/auth',
  103. '@nuxtjs/axios',
  104. ],
  105. auth: {
  106. user: {
  107. endpoint: 'users/me',
  108. propertyName: '',
  109. resetOnFail: true
  110. },
  111. login: {
  112. endpoint: 'auth'
  113. },
  114. logout: {
  115. endpoint: 'auth/logout',
  116. method: 'GET'
  117. },
  118. redirect: {
  119. notLoggedIn: '/login',
  120. loggedIn: '/'
  121. },
  122. token: {
  123. enabled: true,
  124. type: 'Bearer',
  125. localStorage: true,
  126. name: 'token',
  127. cookie: true,
  128. cookieName: 'token'
  129. }
  130. },
  131. axios: {
  132. baseURL: '//localhost:10091/api/' // 本机开发使用
  133. // baseURL: '//api09.labsop.cn/api/'
  134. // baseURL: '//52.80.133.197:10091/api/' // DQM 爱萨尔发布使用
  135. // baseURL: '//192.168.0.211:10091/api/' // 花生所系统
  136. // baseURL: '//121.42.244.202:9081/api/' // 基石发布使用
  137. // baseURL: '//52.80.133.197:9081/api/' // BioBank on AWS发布使用
  138. // baseURL: '//52.80.133.197:10092/api/' // 因顿LIMS发布
  139. // proxyHeaders: false
  140. },
  141. /*
  142. ** 客户端和服务端共享的环境变量,
  143. ** 客户端使用:process.env.appclient 服务端使用:context.appclient
  144. */
  145. env: {
  146. appclient: 'lims', //因顿LIMS:lims,样本库:biobank,细胞制备:cellbank,样本搜索判断,登录跳转判断
  147. imgserverhost: 'http://47.92.212.59:10091', // 本地测试服务地址,图片上传文件
  148. // imgserverhost: 'http://52.80.133.197:10091', // 服务地址,图片上传文件
  149. // imgserverhost: 'http://52.80.133.197:9081', // BioBank服务地址,图片上传文件
  150. upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
  151. // imgserverhost: 'http://192.168.0.211:10091', // 花生所系统服务地址,图片上传文件
  152. // upfilehost: 'http://192.168.0.211:9333/dir/assign' // 花生所系统附件上传
  153. limsimgserverhost:'http://47.92.212.59:10091',//lims图片上传
  154. onlyofficeUrl: 'http://47.92.212.59:9221', //onlyoffice地址 Lims
  155. onlyofficeCallBackUrl: 'http://47.92.212.59:10091', //onlyofficeCallBack地址 Lims
  156. baseURL: '//47.92.212.59:10091/api/'
  157. },
  158. ignore: [
  159. 'pages/customer/**/*.*',
  160. 'pages/detection/**/*.*',
  161. 'pages/documentmanage/**/*.*',
  162. 'pages/handover/**/*.*',
  163. 'pages/hospitalresult/**/*.*',
  164. 'pages/donors/**/*.*',
  165. 'pages/equipment/**/*.*',
  166. 'pages/handover/**/*.*',
  167. 'pages/hospitalresult/**/*.*',
  168. 'pages/instrument/!**!/!*.*',
  169. 'pages/labInfo/**/*.*',
  170. 'pages/lims/!**!/!*.*',
  171. 'pages/lisapply/**/*.*',
  172. 'pages/lispackageresult/**/*.*',
  173. 'pages/log/**/*.*',
  174. 'pages/makerTemplates/**/*.*',
  175. 'pages/material/**/*.*',
  176. 'pages/positivereport/**/*.*',
  177. 'pages/preprocess/**/*.*',
  178. 'pages/projectmanage/**/*.*',
  179. 'pages/qualitycontrol/**/*.*',
  180. 'pages/report/**/*.*',
  181. 'pages/sampleboard/**/*.*',
  182. 'pages/samples/**/*.*',
  183. 'pages/sampletest/**/*.*',
  184. /*'pages/setting/!**!/!*.*',*/
  185. 'pages/transferLab/**/*.*',
  186. ]
  187. }