张保健 před 6 roky
rodič
revize
08e354b8f3

+ 16 - 0
config/dev.env.js Zobrazit soubor

@@ -0,0 +1,16 @@
1
+// module.exports = {
2
+//   NODE_ENV: '"development"',
3
+//   ENV_CONFIG: '"dev"',
4
+//   BASE_API: '"https://api-dev"'
5
+// }
6
+module.exports = {
7
+  NODE_ENV: '"development"',
8
+  ENV_CONFIG: '"dev"',
9
+  BASE_API: '"http://localhost:9529"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527
10
+
11
+  SSO_HOST: '"http://testsso.sgjyun.com"',
12
+  SRCM_HOST: '"http://test1.sgjyun.com"',
13
+  XT_HOST: '"http://xt.test.sgjyun.com"',
14
+  MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
15
+  CDM_HOST: '"http://cdm.test.sgjyun.com"',
16
+}

+ 2 - 2
config/index.js Zobrazit soubor

@@ -17,9 +17,9 @@ module.exports = {
17 17
     // can be overwritten by process.env.HOST
18 18
     // if you want dev by ip, please set host: '0.0.0.0'
19 19
 
20
-    host: 'xt.test.sgjyun.com',
20
+    // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22
-    // host: 'localhost',
22
+    host: 'localhost',
23 23
     port:9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24 24
     autoOpenBrowser: true,
25 25
     errorOverlay: true,

+ 3 - 3
config/prod.env.js Zobrazit soubor

@@ -1,11 +1,11 @@
1 1
 module.exports = {
2 2
   NODE_ENV: '"production"',
3 3
   ENV_CONFIG: '"prod"',
4
-  BASE_API: '"http://api.xt.kuyicloud.com"',
4
+  BASE_API: '"https://api.xt.kuyicloud.com"',
5 5
 
6
-  SSO_HOST: '"http://sso.kuyicloud.com"',
6
+  SSO_HOST: '"https://sso.kuyicloud.com"',
7 7
   SRCM_HOST: '"http://jk.kuyicloud.com"',
8
-  XT_HOST: '"http://xt.kuyicloud.com"',
8
+  XT_HOST: '"https://xt.kuyicloud.com"',
9 9
   MIRCO_MALL_HOST: '"http://mall.kuyicloud.com"',
10 10
   CDM_HOST: '"http://cdm.kuyicloud.com"',
11 11
 }

+ 11 - 0
config/sit.env.js Zobrazit soubor

@@ -0,0 +1,11 @@
1
+module.exports = {
2
+  NODE_ENV: '"production"',
3
+  ENV_CONFIG: '"sit"',
4
+  BASE_API: '"https://api.xt.test.sgjyun.com"',
5
+
6
+  SSO_HOST: '"https://testsso.sgjyun.com"',
7
+  SRCM_HOST: '"https://test1.sgjyun.com"',
8
+  XT_HOST: '"https://xt.test.sgjyun.com"',
9
+  MIRCO_MALL_HOST: '"https://mall.test.sgjyun.com"',
10
+  CDM_HOST: '"https://cdm.test.sgjyun.com"',
11
+}

+ 10 - 1
src/api/schedule.js Zobrazit soubor

@@ -58,4 +58,13 @@ export function GetWeekSchedulePrintInitData(date) {
58 58
         method: 'get',
59 59
         params: { date: date },
60 60
     })
61
-}
61
+}
62
+
63
+
64
+export function getUrgentScheduleInitData(params) {
65
+  return request({
66
+    url: '/api/schedule/urgentinit',
67
+    method: 'Get',
68
+    params: params
69
+  })
70
+}

+ 81 - 0
src/components/Editor/index.vue Zobrazit soubor

@@ -0,0 +1,81 @@
1
+<template>
2
+  <div>
3
+    <div :id="this.id"></div>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+
9
+
10
+  export default {
11
+    name: 'Editor',
12
+    props: ['id', 'r_content'],
13
+    data() {
14
+      return {
15
+        ue: '', //ueditor实例
16
+        content: '' //编辑器内容
17
+      }
18
+    },
19
+    methods: {
20
+      //初始化编辑器
21
+      initEditor() {
22
+        this.ue = UE.getEditor(this.id, {
23
+          initialFrameWidth: '100%',
24
+          initialFrameHeight: '350',
25
+          topOffset: '110',
26
+          toolbars:[[]],
27
+          // scaleEnabled: true,
28
+        })
29
+        //编辑器准备就绪后会触发该事件
30
+        this.ue.addListener('ready', () => {
31
+          //设置可以编辑
32
+          this.ue.setEnabled()
33
+          this.ue.setContent(this.r_content)
34
+        })
35
+        //编辑器内容修改时
36
+        this.selectionchange()
37
+      },
38
+
39
+      //编辑器内容修改时
40
+      selectionchange() {
41
+        this.ue.addListener('selectionchange', () => {
42
+          this.content = this.ue.getContent()
43
+        })
44
+      }
45
+
46
+    },
47
+
48
+    activated() {
49
+      //初始化编辑器
50
+      this.initEditor()
51
+    },
52
+    deactivated() {
53
+      //销毁编辑器实例,使用textarea代替
54
+      this.ue.destroy()
55
+      //重置编辑器,可用来做多个tab使用同一个编辑器实例
56
+      //this.ue.reset()
57
+      //如果要使用同一个实例,请注释destroy()方法
58
+    },
59
+
60
+    computed: {
61
+      // 利用计算属性返回prop里传过来的内容
62
+      revecive: function() {
63
+        return this.r_content
64
+      }
65
+    },
66
+
67
+    watch: {
68
+      // !!! 这里需要注意,需要一个watch来实时更新编辑器的内容
69
+      revecive: function() {
70
+        this.ue.setContent(this.r_content)
71
+      }
72
+    }
73
+  }
74
+</script>
75
+
76
+
77
+<style>
78
+  .edui-editor {
79
+    z-index: 60 !important;
80
+  }
81
+</style>

+ 53 - 53
src/components/Neditor/index.vue Zobrazit soubor

@@ -1,80 +1,80 @@
1 1
 <template>
2
-    <div>
3
-        <div :id="this.id"></div>
4
-    </div>
2
+  <div>
3
+    <div :id="this.id"></div>
4
+  </div>
5 5
 </template>
6 6
 
7 7
 <script>
8 8
 
9 9
 
10
-export default {
11
-    name:"Neditor",
12
-    props: ['id','r_content'],
10
+  export default {
11
+    name: 'Neditor',
12
+    props: ['id', 'r_content'],
13 13
     data() {
14
-        return {
15
-            ue: '', //ueditor实例
16
-            content: '', //编辑器内容
17
-        }
14
+      return {
15
+        ue: '', //ueditor实例
16
+        content: '' //编辑器内容
17
+      }
18 18
     },
19 19
     methods: {
20
-        //初始化编辑器
21
-        initEditor() {
22
-            this.ue = UE.getEditor(this.id, {
23
-                initialFrameWidth: '100%',
24
-                initialFrameHeight: '350',
25
-                topOffset:'110',
26
-                // scaleEnabled: true,
27
-            })
28
-            //编辑器准备就绪后会触发该事件
29
-            this.ue.addListener('ready',()=>{
30
-                //设置可以编辑
31
-                this.ue.setEnabled()
32
-                this.ue.setContent(this.r_content)
33
-            })
34
-            //编辑器内容修改时
35
-            this.selectionchange()
36
-        },
37
-        
20
+      //初始化编辑器
21
+      initEditor() {
22
+        this.ue = UE.getEditor(this.id, {
23
+          initialFrameWidth: '100%',
24
+          initialFrameHeight: '350',
25
+          topOffset: '110',
26
+          // scaleEnabled: true,
27
+        })
28
+        //编辑器准备就绪后会触发该事件
29
+        this.ue.addListener('ready', () => {
30
+          //设置可以编辑
31
+          this.ue.setEnabled()
32
+          this.ue.setContent(this.r_content)
33
+        })
38 34
         //编辑器内容修改时
39
-        selectionchange() {
40
-            this.ue.addListener('selectionchange', () => {
41
-                this.content = this.ue.getContent()
42
-            })
43
-        },
35
+        this.selectionchange()
36
+      },
37
+
38
+      //编辑器内容修改时
39
+      selectionchange() {
40
+        this.ue.addListener('selectionchange', () => {
41
+          this.content = this.ue.getContent()
42
+        })
43
+      }
44 44
 
45 45
     },
46 46
 
47 47
     activated() {
48
-        //初始化编辑器
49
-        this.initEditor()
48
+      //初始化编辑器
49
+      this.initEditor()
50 50
     },
51 51
     deactivated() {
52
-        //销毁编辑器实例,使用textarea代替
53
-        this.ue.destroy()
54
-        //重置编辑器,可用来做多个tab使用同一个编辑器实例
55
-        //this.ue.reset()
56
-        //如果要使用同一个实例,请注释destroy()方法
52
+      //销毁编辑器实例,使用textarea代替
53
+      this.ue.destroy()
54
+      //重置编辑器,可用来做多个tab使用同一个编辑器实例
55
+      //this.ue.reset()
56
+      //如果要使用同一个实例,请注释destroy()方法
57 57
     },
58 58
 
59
-    computed:{
60
-        // 利用计算属性返回prop里传过来的内容
61
-        revecive:function(){
62
-            return this.r_content
63
-        }
59
+    computed: {
60
+      // 利用计算属性返回prop里传过来的内容
61
+      revecive: function() {
62
+        return this.r_content
63
+      }
64 64
     },
65 65
 
66
-    watch:{
67
-        // !!! 这里需要注意,需要一个watch来实时更新编辑器的内容
68
-        revecive:function(){
69
-            this.ue.setContent(this.r_content)
70
-        }
66
+    watch: {
67
+      // !!! 这里需要注意,需要一个watch来实时更新编辑器的内容
68
+      revecive: function() {
69
+        this.ue.setContent(this.r_content)
70
+      }
71 71
     }
72
-}
72
+  }
73 73
 </script>
74 74
 
75 75
 
76 76
 <style>
77 77
   .edui-editor {
78
-      z-index: 60 !important;
78
+    z-index: 60 !important;
79 79
   }
80
-</style>
80
+</style>

+ 48 - 38
src/router/index.js Zobrazit soubor

@@ -1,7 +1,5 @@
1 1
 import Vue from 'vue'
2 2
 import Router from 'vue-router'
3
-Vue.use(Router)
4
-
5 3
 /* Layout */
6 4
 import Layout from '@/views/layout/Layout'
7 5
 
@@ -17,22 +15,24 @@ import workforce from './modules/workforce'
17 15
 import service from './modules/service'
18 16
 import org from './modules/org'
19 17
 
18
+Vue.use(Router)
19
+
20 20
 /** note: submenu only apppear when children.length>=1
21 21
  *   detail see  https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
22 22
  **/
23 23
 
24 24
 /**
25
-* hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
26
-* alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
25
+ * hidden: true                   if `hidden:true` will not show in the sidebar(default is false)
26
+ * alwaysShow: true               if set true, will always show the root menu, whatever its child routes length
27 27
 
28
-// 详见 xt_permission.xt_filterAsyncRouter 函数的逻辑
29
-is_menu: false               加载路由时验证用的(即该路由是否要在侧边栏展示,需要展示的即需要),为 false 时表示该路由不需要进行权限验证
28
+ // 详见 xt_permission.xt_filterAsyncRouter 函数的逻辑
29
+ is_menu: false               加载路由时验证用的(即该路由是否要在侧边栏展示,需要展示的即需要),为 false 时表示该路由不需要进行权限验证
30 30
 
31
-*                                if not set alwaysShow, only more than one route under the children
32
-*                                it will becomes nested mode, otherwise not show the root menu
33
-* redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
34
-* name:'router-name'             the name is used by <keep-alive> (must set!!!)
35
-* meta : {
31
+ *                                if not set alwaysShow, only more than one route under the children
32
+ *                                it will becomes nested mode, otherwise not show the root menu
33
+ * redirect: noredirect           if `redirect:noredirect` will no redirct in the breadcrumb
34
+ * name:'router-name'             the name is used by <keep-alive> (must set!!!)
35
+ * meta : {
36 36
     title: 'title'               the name show in submenu and breadcrumb (recommend set)
37 37
     icon: 'svg-name'             the icon show in the sidebar,
38 38
     noCache: true                if true ,the page will no be cached(default is false)
@@ -41,38 +41,48 @@ is_menu: false               加载路由时验证用的(即该路由是否要
41 41
     is_menu: false               加载路由时验证用的,为 false 时表示该路由不需要进行权限验证
42 42
     hidden: false                加载路由时验证用的,is_menu 为true时才有作用,为 true 时表示该路由需要进行权限验证
43 43
   }
44
-**/
44
+ **/
45 45
 var _constant_router_map = [{
46 46
   path: '/token/verify',
47 47
   component: () => import('@/xt_pages/index/verify_token'),
48 48
   hidden: true
49 49
 },
50
-{
51
-  path: '/404',
52
-  component: () => import('@/views/errorPage/404'),
53
-  hidden: true
54
-},
55
-{
56
-  path: '/401',
57
-  component: () => import('@/views/errorPage/401'),
58
-  hidden: true
59
-},
60
-{
61
-  path: '',
62
-  component: Layout,
63
-  redirect: '/home',
64
-  children: [{
65
-    path: '/home',
66
-    component: () => import('@/xt_pages/home/index'),
67
-    name: 'home',
68
-    meta: {
69
-      title: 'home',
70
-      icon: 'dashboard',
71
-      noCache: true
72
-    }
73
-  }]
74
-},
75
-service
50
+  {
51
+    path: '/404',
52
+    component: () => import('@/views/errorPage/404'),
53
+    hidden: true
54
+  },
55
+  {
56
+    path: '/401',
57
+    component: () => import('@/views/errorPage/401'),
58
+    hidden: true
59
+  },
60
+  {
61
+    path: '',
62
+    component: Layout,
63
+    redirect: '/home',
64
+    children: [{
65
+      path: '/home',
66
+      component: () => import('@/xt_pages/home/index'),
67
+      name: 'home',
68
+      meta: {
69
+        title: 'home',
70
+        icon: 'dashboard',
71
+        noCache: true
72
+      }
73
+    }]
74
+  },
75
+  service,
76
+  // patient,
77
+  // workforce,
78
+  // weight_sign,
79
+  // dialysis,
80
+  // stock,
81
+  // qcd,
82
+  // data_dict,
83
+  // device,
84
+  // role,
85
+  // org
76 86
 ]
77 87
 
78 88
 var _asy_router_map = [

+ 4 - 2
src/store/modules/globalConfig.js Zobrazit soubor

@@ -490,13 +490,15 @@ const global_config = {
490 490
     ductus_arantii:[
491 491
       {id: 1, name: "正常"},
492 492
       {id: 2, name: "不畅"},
493
-      {id: 3, name: "血流不足(正接)"},
494
-      {id: 4, name: "血流不足(反接)"},
493
+      {id: 3, name: "正接"},
494
+      {id: 4, name: "反接"},
495 495
       {id: 5, name: "血栓"},
496 496
       {id: 6, name: "缝线脱落"},
497 497
       {id: 7, name: "导管脱落"},
498 498
       {id: 8, name: "感染"},
499 499
       {id: 9, name: "破损"},
500
+      {id: 10, name: "血流不足"},
501
+
500 502
     ],
501 503
     dialysis_process:[
502 504
       {id: 1, name: "完成"},

+ 283 - 248
src/xt_pages/data/components/templateTable.vue Zobrazit soubor

@@ -1,32 +1,37 @@
1 1
 <template>
2 2
   <div class="">
3 3
     <div class="filter-container">
4
-      <el-button size="small" class="filter-item" style="float:right;" @click="handleCreate" type="primary" icon="el-icon-circle-plus-outline">{{$t('table.add')}}</el-button>
4
+      <el-button size="small" class="filter-item" style="float:right;" @click="handleCreate" type="primary"
5
+                 icon="el-icon-circle-plus-outline">{{$t('table.add')}}
6
+      </el-button>
5 7
     </div>
6
-    <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :key='tableKey' :data="list" v-loading="listLoading" border fit highlight-current-row style="width: 100%;min-height:500px;">
8
+    <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :key='tableKey' :data="list"
9
+              v-loading="listLoading" border fit highlight-current-row style="width: 100%;min-height:500px;">
7 10
       <!-- <el-table-column align="center" :label="$t('table.id')" width="65" @click="handleUpdate(scope.row)">
8 11
         <template slot-scope="scope">
9 12
           <span>{{scope.row.id}}</span>
10 13
         </template>
11 14
       </el-table-column> -->
12
-      <el-table-column  align="center" label="标题">
15
+      <el-table-column align="center" label="标题">
13 16
         <template slot-scope="scope">
14 17
           <!-- <span @click="handleUpdate(scope.row)">{{scope.row.name}}</span> -->
15
-          <span >{{scope.row.title}}</span>
18
+          <span>{{scope.row.title}}</span>
16 19
         </template>
17 20
       </el-table-column>
18 21
       <el-table-column align="center" label="内容">
19 22
         <template slot-scope="scope">
20
-          <span>{{scope.row.content}}</span>
23
+          <span v-html="scope.row.content">{{scope.row.content}}</span>
21 24
         </template>
22 25
       </el-table-column>
23 26
       <el-table-column align="center" :label="$t('table.actions')" width="230" class-name="small-padding fixed-width">
24 27
         <template slot-scope="scope">
25 28
           <el-tooltip class="item" effect="dark" content="编辑" placement="top">
26
-           <el-button icon="el-icon-edit-outline" type="primary" size="small" @click="handleUpdate(scope.row)"></el-button>
29
+            <el-button icon="el-icon-edit-outline" type="primary" size="small"
30
+                       @click="handleUpdate(scope.row)"></el-button>
27 31
           </el-tooltip>
28 32
           <el-tooltip class="item" effect="dark" content="删除" placement="top">
29
-            <el-button icon="el-icon-delete" v-if="scope.row.status!='deleted'" size="small" type="danger" @click="handleModifyStatus(scope.row,'deleted')">
33
+            <el-button icon="el-icon-delete" v-if="scope.row.status!='deleted'" size="small" type="danger"
34
+                       @click="handleModifyStatus(scope.row,'deleted')">
30 35
             </el-button>
31 36
           </el-tooltip>
32 37
 
@@ -41,15 +46,30 @@
41 46
     </div> -->
42 47
 
43 48
     <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
44
-      <el-form :rules="rules" ref="dataForm" :model="temp" label-position="right" label-width="70px" >
45
-        <el-form-item label="标题"  prop="title">
49
+      <el-form :rules="rules" ref="dataForm" :model="temp" label-position="right" label-width="70px">
50
+        <el-form-item label="标题" prop="title">
46 51
           <el-input v-model="temp.title" maxlength="100" placeholder="请输入标题"></el-input>
47 52
         </el-form-item>
48
-        <el-form-item label="内容" prop="content">
49
-          <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" v-model="temp.content" placeholder="请输入内容"></el-input>
53
+
54
+        <el-form-item label="内容"  v-if="type == 'course_disease'">
55
+          <keep-alive>
56
+            <editor ref="editor"
57
+                     id="editor"
58
+                     style="width: 600px"
59
+                     v-bind:r_content="temp.content">
60
+            </editor>
61
+          </keep-alive>
62
+        </el-form-item>
63
+
64
+        <el-form-item label="内容" prop="content" v-else>
65
+          <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" v-model="temp.content"
66
+                    placeholder="请输入内容"></el-input>
50 67
         </el-form-item>
68
+
69
+
51 70
         <el-form-item :label="$t('data_config.remark')">
52
-          <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" placeholder="请输入备注" v-model="temp.remark"></el-input>
71
+          <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" placeholder="请输入备注"
72
+                    v-model="temp.remark"></el-input>
53 73
         </el-form-item>
54 74
       </el-form>
55 75
       <div slot="footer" class="dialog-footer">
@@ -60,9 +80,10 @@
60 80
     </el-dialog>
61 81
 
62 82
     <el-dialog title="Reading statistics" :visible.sync="dialogPvVisible">
63
-      <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="pvData" border fit highlight-current-row style="width: 100%">
64
-        <el-table-column prop="key" label="Channel"> </el-table-column>
65
-        <el-table-column prop="pv" label="Pv"> </el-table-column>
83
+      <el-table :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}" :data="pvData" border fit
84
+                highlight-current-row style="width: 100%">
85
+        <el-table-column prop="key" label="Channel"></el-table-column>
86
+        <el-table-column prop="pv" label="Pv"></el-table-column>
66 87
       </el-table>
67 88
       <span slot="footer" class="dialog-footer">
68 89
         <el-button type="primary" @click="dialogPvVisible = false">{{$t('table.confirm')}}</el-button>
@@ -73,270 +94,284 @@
73 94
 </template>
74 95
 
75 96
 <script>
76
-import {createConfig,createChildConfig,updateChildConfig, deleteChildConfig,updateTemplate} from '@/api/data'
77
-import waves from '@/directive/waves' // 水波纹指令
78
-import { parseTime } from '@/utils'
79
-import store from '@/store'
80
-import bus from '@/assets/eventBus'
81
-
97
+  import { createChildConfig, createConfig, deleteChildConfig, updateChildConfig, updateTemplate } from '@/api/data'
98
+  import waves from '@/directive/waves' // 水波纹指令
99
+  import { parseTime } from '@/utils'
100
+  import store from '@/store'
101
+  import bus from '@/assets/eventBus'
102
+  import Editor from '@/components/Editor'
82 103
 
83
-export default {
84
-  name: 'complexTable',
85
-  directives: {
86
-    waves
87
-  },
88
-  props: {
89
-    type: {
90
-      type: String,
91
-      default: 'patient'
92
-    }
93
-  },
94
-  data() {
95
-    return {
96
-      currentId: undefined,
97
-      tableKey: 0,
98
-      // list: null,
99
-      total: null,
100
-      listLoading: true,
101
-      listQuery: {
102
-        page: 1,
103
-        limit: 20,
104
-        importance: undefined,
105
-        title: undefined,
106
-        type: this.type,
107
-        sort: '+id'
108
-      },
109
-      importanceOptions: [1, 2, 3],
110
-      // calendarTypeOptions,
111
-      sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }],
112
-      statusOptions: ['published', 'draft', 'deleted'],
113
-      showReviewer: false,
114
-      temp: {
115
-        id: undefined,
116
-        parent_id: 0,
117
-        module: this.type,
118
-        org_id:0,
119
-        title: '',
120
-        content: '',
121
-        remark: ''
122
-      },
123
-      dialogFormVisible: false,
124
-      dialogStatus: '',
125
-      textMap: {
126
-        update: '修改',
127
-        create: '新增'
128
-      },
129
-      dialogPvVisible: false,
130
-      pvData: [],
131
-      rules: {
132
-        title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
133
-        content: [{ required: true, message: '请输入字段名', trigger: 'blur' }]
134
-      },
135
-      downloadLoading: false
136
-    }
137
-  },
138
-  // watch: {
139
-  //   'temp.config_field':function(){
140
-  //       this.temp.config_field =  this.temp.config_field.replace(/[^A-Za-z]/g,'');
141
-  //   }
142
-  // },
143
-  computed:{
144
-    list: function() {
145
-      // const list = store.getters.configlist[this.type]
146
-      // this.total = list.length
147
-      return store.getters.configlist[this.type]
148
-    }
149
-  },
150
-  filters: {
151
-    statusFilter(status) {
152
-      const statusMap = {
153
-        published: 'success',
154
-        draft: 'info',
155
-        deleted: 'danger'
156
-      }
157
-      return statusMap[status]
104
+  export default {
105
+    name: 'complexTable',
106
+    directives: {
107
+      waves
158 108
     },
159
-    typeFilter(type) {
160
-      return calendarTypeKeyValue[type]
161
-    }
162
-  },
163
-  created() {
164
-    this.getList()
165
-  },
166
-  methods: {
167
-    fieldChange:function(newValue){
168
-      this.temp.config_field = newValue.replace(/[^A-Za-z]/g,'');
109
+    components: {
110
+      Editor
169 111
     },
170
-    handleRowChange(currentRow, oldCurrentRow){
171
-      if(currentRow != undefined){
172
-        this.currentId = currentRow.id
173
-        bus.$emit('parentChangeId',currentRow)
112
+    props: {
113
+      type: {
114
+        type: String,
115
+        default: 'patient'
174 116
       }
175 117
     },
176
-    getList() {
177
-      this.listLoading = false
178
-      // setTimeout(() => {
179
-      //     this.listLoading = false
180
-      //   }, 1 * 1000)
118
+    beforeMount(){
119
+
120
+
181 121
     },
182
-    handleFilter() {
183
-      this.listQuery.page = 1
184
-      this.getList()
122
+    data() {
123
+      return {
124
+        currentId: undefined,
125
+        tableKey: 0,
126
+        // list: null,
127
+        total: null,
128
+        listLoading: true,
129
+        listQuery: {
130
+          page: 1,
131
+          limit: 20,
132
+          importance: undefined,
133
+          title: undefined,
134
+          type: this.type,
135
+          sort: '+id'
136
+        },
137
+        importanceOptions: [1, 2, 3],
138
+        // calendarTypeOptions,
139
+        sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }],
140
+        statusOptions: ['published', 'draft', 'deleted'],
141
+        showReviewer: false,
142
+        temp: {
143
+          id: undefined,
144
+          parent_id: 0,
145
+          module: this.type,
146
+          org_id: 0,
147
+          title: '',
148
+          content: '',
149
+          remark: ''
150
+        },
151
+        dialogFormVisible: false,
152
+        dialogStatus: '',
153
+        textMap: {
154
+          update: '修改',
155
+          create: '新增'
156
+        },
157
+        dialogPvVisible: false,
158
+        pvData: [],
159
+        rules: {
160
+          title: [{ required: true, message: '请输入名称', trigger: 'blur' }],
161
+          content: [{ required: true, message: '请输入字段名', trigger: 'blur' }]
162
+        },
163
+        downloadLoading: false
164
+      }
185 165
     },
186
-    handleSizeChange(val) {
187
-      this.listQuery.limit = val
188
-      this.getList()
166
+    // watch: {
167
+    //   'temp.config_field':function(){
168
+    //       this.temp.config_field =  this.temp.config_field.replace(/[^A-Za-z]/g,'');
169
+    //   }
170
+    // },
171
+    computed: {
172
+      list: function() {
173
+        // const list = store.getters.configlist[this.type]
174
+        // this.total = list.length
175
+        return store.getters.configlist[this.type]
176
+      }
189 177
     },
190
-    handleCurrentChange(val) {
191
-      this.listQuery.page = val
178
+    filters: {
179
+      statusFilter(status) {
180
+        const statusMap = {
181
+          published: 'success',
182
+          draft: 'info',
183
+          deleted: 'danger'
184
+        }
185
+        return statusMap[status]
186
+      },
187
+      typeFilter(type) {
188
+        return calendarTypeKeyValue[type]
189
+      }
190
+    },
191
+    created() {
192 192
       this.getList()
193 193
     },
194
-    handleModifyStatus(row, status) {
195
-      this.temp = Object.assign({}, row); // copy obj
196
-      this.$confirm("此操作将永久删除该配置项, 是否继续?", "提示", {
197
-        confirmButtonText: "确 定",
198
-        cancelButtonText: "取 消",
199
-        type: "warning"
200
-      }).then(() => {
201
-          const tempData = Object.assign({}, this.temp);
194
+    methods: {
195
+      fieldChange: function(newValue) {
196
+        this.temp.config_field = newValue.replace(/[^A-Za-z]/g, '')
197
+      },
198
+      handleRowChange(currentRow, oldCurrentRow) {
199
+        if (currentRow != undefined) {
200
+          this.currentId = currentRow.id
201
+          bus.$emit('parentChangeId', currentRow)
202
+        }
203
+      },
204
+      getList() {
205
+        this.listLoading = false
206
+        // setTimeout(() => {
207
+        //     this.listLoading = false
208
+        //   }, 1 * 1000)
209
+      },
210
+      handleFilter() {
211
+        this.listQuery.page = 1
212
+        this.getList()
213
+      },
214
+      handleSizeChange(val) {
215
+        this.listQuery.limit = val
216
+        this.getList()
217
+      },
218
+      handleCurrentChange(val) {
219
+        this.listQuery.page = val
220
+        this.getList()
221
+      },
222
+      handleModifyStatus(row, status) {
223
+        this.temp = Object.assign({}, row) // copy obj
224
+        this.$confirm('此操作将永久删除该配置项, 是否继续?', '提示', {
225
+          confirmButtonText: '确 定',
226
+          cancelButtonText: '取 消',
227
+          type: 'warning'
228
+        }).then(() => {
229
+          const tempData = Object.assign({}, this.temp)
202 230
           deleteChildConfig(tempData).then(response => {
203 231
             if (!response.data) {
204 232
               // 由于mockjs 不支持自定义状态码只能这样hack
205
-              reject("error");
233
+              reject('error')
206 234
             }
207 235
             if (response.data.state === 0) {
208
-              this.$message.error(response.data.msg);
236
+              this.$message.error(response.data.msg)
209 237
             }
210 238
 
211
-            const result = response.data.data.dataconfig;
212
-            store.dispatch("updateParentConfigList", [tempData, "delete"]).then(() => {
213
-                next();
214
-              });
215
-          });
239
+            const result = response.data.data.dataconfig
240
+            store.dispatch('updateParentConfigList', [tempData, 'delete']).then(() => {
241
+              next()
242
+            })
243
+          })
216 244
 
217 245
           this.$message({
218
-            type: "success",
219
-            message: "删除成功!"
220
-          });
246
+            type: 'success',
247
+            message: '删除成功!'
248
+          })
221 249
         })
222
-        .catch(() => {
223
-          this.$message({
224
-            type: "info",
225
-            message: "已取消删除"
226
-          });
227
-        });
228
-    },
229
-    resetTemp() {
230
-      this.temp = {
231
-        id: undefined,
232
-        parent_id: 0,
233
-        module: this.type,
234
-        org_id:0,
235
-        title: '',
236
-        content: '',
237
-        remark: ''
238
-      }
239
-    },
240
-    handleCreate() {
241
-      this.resetTemp()
242
-      this.dialogStatus = 'create'
243
-      this.dialogFormVisible = true
244
-      this.$nextTick(() => {
245
-        this.$refs['dataForm'].clearValidate()
246
-      })
247
-    },
248
-    createData() {
249
-      this.$refs['dataForm'].validate((valid) => {
250
-        if (valid) {
251
-          createConfig(this.temp).then(response => {
252
-            if (!response.data) { // 由于mockjs 不支持自定义状态码只能这样hack
250
+          .catch(() => {
251
+            this.$message({
252
+              type: 'info',
253
+              message: '已取消删除'
254
+            })
255
+          })
256
+      },
257
+      resetTemp() {
258
+        this.temp = {
259
+          id: undefined,
260
+          parent_id: 0,
261
+          module: this.type,
262
+          org_id: 0,
263
+          title: '',
264
+          content: '',
265
+          remark: ''
266
+        }
267
+      },
268
+      handleCreate() {
269
+        this.resetTemp()
270
+        this.dialogStatus = 'create'
271
+        this.dialogFormVisible = true
272
+        this.$nextTick(() => {
273
+          this.$refs['dataForm'].clearValidate()
274
+        })
275
+      },
276
+      createData() {
277
+        this.$refs['dataForm'].validate((valid) => {
278
+          if(this.type == "course_disease"){
279
+            this.temp.content = this.$refs.neditor.content;
280
+          }
281
+
282
+          if (valid) {
283
+            createConfig(this.temp).then(response => {
284
+              if (!response.data) { // 由于mockjs 不支持自定义状态码只能这样hack
253 285
                 reject('error')
254
-            }
255
-            if (response.data.state === 0) {
256
-              this.$message.error(response.data.msg);
257
-            }
258
-            const result = response.data.data.dataconfig
259
-            // 更新store
260
-            store.dispatch('updateConfigList',result).then(() => {
286
+              }
287
+              if (response.data.state === 0) {
288
+                this.$message.error(response.data.msg)
289
+              }
290
+              const result = response.data.data.dataconfig
291
+              // 更新store
292
+              store.dispatch('updateConfigList', result).then(() => {
261 293
 
262
-            })
294
+              })
263 295
 
264
-            this.dialogFormVisible = false
296
+              this.dialogFormVisible = false
265 297
 
266
-            this.$message.success("创建成功")
267
-          })
268
-        }
269
-      })
270
-    },
271
-    handleUpdate(row) {
272
-      this.temp = Object.assign({}, row); // copy obj
273
-      this.dialogStatus = "update";
274
-      this.dialogFormVisible = true;
275
-      this.$nextTick(() => {
276
-        this.$refs["dataForm"].clearValidate();
277
-      });
278
-    },
279
-    updateData() {
280
-      this.$refs["dataForm"].validate(valid => {
281
-        if (valid) {
282
-          const tempData = Object.assign({}, this.temp);
283
-          updateTemplate(tempData).then(response => {
284
-            if (!response.data) {
285
-              // 由于mockjs 不支持自定义状态码只能这样hack
286
-              reject("error");
287
-            }
288
-            if (response.data.state === 0) {
289
-              this.$message.error(response.data.msg);
298
+              this.$message.success('创建成功')
299
+            })
300
+          }
301
+        })
302
+      },
303
+      handleUpdate(row) {
304
+        this.temp = Object.assign({}, row) // copy obj
305
+        this.dialogStatus = 'update'
306
+        this.dialogFormVisible = true
307
+        this.$nextTick(() => {
308
+          this.$refs['dataForm'].clearValidate()
309
+        })
310
+      },
311
+      updateData() {
312
+        this.$refs['dataForm'].validate(valid => {
313
+          if (valid) {
314
+            const tempData = Object.assign({}, this.temp)
315
+            if(this.type == "course_disease"){
316
+              tempData.content = this.$refs.neditor.content;
290 317
             }
318
+            updateTemplate(tempData).then(response => {
319
+              if (!response.data) {
320
+                // 由于mockjs 不支持自定义状态码只能这样hack
321
+                reject('error')
322
+              }
323
+              if (response.data.state === 0) {
324
+                this.$message.error(response.data.msg)
325
+              }
291 326
 
292
-            const result = response.data.data.dataconfig;
293
-            store.dispatch("updateParentConfigList", [result, "update"]).then(() => {
294
-                next();
295
-              });
327
+              const result = response.data.data.dataconfig
328
+              store.dispatch('updateParentConfigList', [result, 'update']).then(() => {
329
+                next()
330
+              })
296 331
 
297
-            this.dialogFormVisible = false;
332
+              this.dialogFormVisible = false
298 333
 
299
-            this.$message.success("更新成功")
300
-          });
301
-        }
302
-      });
303
-    },
304
-    handleDelete(row) {
334
+              this.$message.success('更新成功')
335
+            })
336
+          }
337
+        })
338
+      },
339
+      handleDelete(row) {
305 340
 
306
-      this.$message.success("删除成功")
341
+        this.$message.success('删除成功')
307 342
 
308
-      const index = this.list.indexOf(row)
309
-      this.list.splice(index, 1)
310
-    },
311
-    handleFetchPv(pv) {
312
-      fetchPv(pv).then(response => {
313
-        this.pvData = response.data.pvData
314
-        this.dialogPvVisible = true
315
-      })
316
-    },
317
-    handleDownload() {
318
-      this.downloadLoading = true
319
-      import('@/vendor/Export2Excel').then(excel => {
320
-        const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']
321
-        const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']
322
-        const data = this.formatJson(filterVal, this.list)
323
-        excel.export_json_to_excel({
324
-          header: tHeader,
325
-          data,
326
-          filename: 'table-list'
343
+        const index = this.list.indexOf(row)
344
+        this.list.splice(index, 1)
345
+      },
346
+      handleFetchPv(pv) {
347
+        fetchPv(pv).then(response => {
348
+          this.pvData = response.data.pvData
349
+          this.dialogPvVisible = true
327 350
         })
328
-        this.downloadLoading = false
329
-      })
330
-    },
331
-    formatJson(filterVal, jsonData) {
332
-      return jsonData.map(v => filterVal.map(j => {
333
-        if (j === 'timestamp') {
334
-          return parseTime(v[j])
335
-        } else {
336
-          return v[j]
337
-        }
338
-      }))
351
+      },
352
+      handleDownload() {
353
+        this.downloadLoading = true
354
+        import('@/vendor/Export2Excel').then(excel => {
355
+          const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']
356
+          const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']
357
+          const data = this.formatJson(filterVal, this.list)
358
+          excel.export_json_to_excel({
359
+            header: tHeader,
360
+            data,
361
+            filename: 'table-list'
362
+          })
363
+          this.downloadLoading = false
364
+        })
365
+      },
366
+      formatJson(filterVal, jsonData) {
367
+        return jsonData.map(v => filterVal.map(j => {
368
+          if (j === 'timestamp') {
369
+            return parseTime(v[j])
370
+          } else {
371
+            return v[j]
372
+          }
373
+        }))
374
+      }
339 375
     }
340 376
   }
341
-}
342 377
 </script>

+ 3 - 3
src/xt_pages/data/template.vue Zobrazit soubor

@@ -31,10 +31,10 @@ export default {
31 31
         { path: 'data/template', name: '模版配置' },
32 32
       ],
33 33
       tabMapOptions: [
34
-        { label: this.$t("data_config.education"), key: 'education' },
35
-        { label: this.$t("data_config.summary"), key: 'summary' },
34
+        { label: this.$t("data_config.education"), key: 'education'},
35
+        { label: this.$t("data_config.summary"), key: 'summary'},
36 36
         { label: this.$t("data_config.course_disease"), key: 'course_disease' },
37
-        { label: this.$t("data_config.rescue_record"), key: 'rescue_record' }
37
+        { label: this.$t("data_config.rescue_record"), key: 'rescue_record'}
38 38
       ],
39 39
       activeName: 'education',
40 40
       createdTimes: 0

+ 2 - 1
src/xt_pages/dialysis/batch_print/batch_print_order.vue Zobrazit soubor

@@ -321,7 +321,8 @@
321 321
                     <div class="inline_block">
322 322
                       透析机号:
323 323
                       <div class="under_line" style="width: 150px;">
324
-                        {{record.device_zone?record.device_zone.name:''}}{{record.device_number&&record.dialysis_order?record.device_number.number:''}}
324
+                        {{record.device_zone?record.device_zone.name:''}} {{record.dialysis_order&&record.dialysis_order.device_number&&record.dialysis_order.device_number.number.length > 0?record.dialysis_order.device_number.number:record.device_number.number}}
325
+                        <!--{{record.device_number&&record.dialysis_order?record.device_number.number:''}}-->
325 326
                       </div>
326 327
                     </div>
327 328
                     <div class="inline_block" style="float: right;">

+ 21 - 19
src/xt_pages/dialysis/batch_print/batch_print_order_other.vue Zobrazit soubor

@@ -69,7 +69,7 @@
69 69
                       </div>
70 70
                       <div class="inline_block" style="margin-left: 30px;">
71 71
                         透析机编号:
72
-                        <div class="under_line" style="width: 100px;">{{record.dialysis_order&&record.dialysis_order.device_number&&record.dialysis_order.device_number.number.length > 0?record.dialysis_order.device_number.number:''}}</div>
72
+                        <div class="under_line" style="width: 100px;">{{record.dialysis_order&&record.dialysis_order.device_number&&record.dialysis_order.device_number.number.length > 0?record.dialysis_order.device_number.number:record.device_number.number}}</div>
73 73
                         型号:
74 74
                         <div class="under_line" style="width: 100px;">{{record.assessment_before_dislysis&&record.assessment_before_dislysis.machine_type&&record.assessment_before_dislysis.machine_type.length > 0 ? record.assessment_before_dislysis.machine_type:''}}</div>
75 75
                       </div>
@@ -84,7 +84,7 @@
84 84
                       <div class="inline_block"  style="margin-left: 30px;">
85 85
                         出血:
86 86
                         <check-box text="无"  :checked="isCheckBoxChecked(record.assessment_before_dislysis, 'is_hemorrhage', 2)"></check-box>
87
-                        <check-box text="" :checked="isCheckBoxChecked(record.assessment_before_dislysis, 'is_hemorrhage', 1)"></check-box>
87
+                        <check-box text="异常" :checked="isCheckBoxChecked(record.assessment_before_dislysis, 'is_hemorrhage', 1)"></check-box>
88 88
                         (&nbsp;
89 89
                         <check-box text="穿刺点渗血" :checked="record.assessment_before_dislysis&&record.assessment_before_dislysis.is_hemorrhage==1&&record.assessment_before_dislysis.hemorrhage.indexOf('穿刺点渗血')>-1?true:false"></check-box>
90 90
                         <check-box text="牙龈出血" :checked="record.assessment_before_dislysis&&record.assessment_before_dislysis.is_hemorrhage==1&&record.assessment_before_dislysis.hemorrhage.indexOf('牙龈出血')>-1?true:false"></check-box>
@@ -96,6 +96,7 @@
96 96
                         </div>
97 97
                         &nbsp;)
98 98
                       </div>
99
+
99 100
                     </div>
100 101
                     <div class="row" style="padding: 2px 0;line-height:19px;">
101 102
                       <div class="inline_block">
@@ -147,8 +148,9 @@
147 148
                         中心静脉导管:
148 149
                         <check-box text="正常" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '正常')"></check-box>
149 150
                         <check-box text="不畅" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '不畅')"></check-box>
150
-                        <check-box text="血流不足(正接)" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '血流不足(正接)')"></check-box>
151
-                        <check-box text="血流不足(反接)" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '血流不足(反接)')"></check-box>
151
+                        <check-box text="血流不足" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '血流不足')"></check-box>
152
+                        (<check-box text="正接" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '正接')"></check-box>/
153
+                        <check-box text="反接" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '反接')"></check-box>)
152 154
                         <check-box text="血栓" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '血栓')"></check-box>
153 155
                         <check-box text="缝线脱落" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '缝线脱落')"></check-box>
154 156
                         <check-box text="导管脱落" :checked="isValueIndexOfCheck(record.assessment_before_dislysis, 'ductus_arantii', '导管脱落')"></check-box>
@@ -376,7 +378,7 @@
376 378
                         <check-box text="提前" :checked="isCheckBoxChecked(record.assessment_after_dislysis, 'dialysis_process', 2)"></check-box>
377 379
                         <div class="inline_block">
378 380
                           <div class="under_line" style="width: 30px;">
379
-                            {{record.assessment_after_dislysis&&record.assessment_after_dislysis.dialysis_process==2&&record.assessment_after_dislysis.actual_treatment_hour?record.assessment_after_dislysis.actual_treatment_hour:''}}
381
+                            {{record.assessment_after_dislysis&&record.assessment_after_dislysis.dialysis_process==2&&record.assessment_after_dislysis.in_advance_minute?record.assessment_after_dislysis.in_advance_minute:''}}
380 382
                           </div>
381 383
                           min
382 384
                         </div>
@@ -412,13 +414,13 @@
412 414
                         <check-box text="他人协助" :checked="isCheckBoxChecked(record.assessment_after_dislysis, 'hemostasis_opera', 2)"></check-box>
413 415
                         <check-box text="自己压迫" :checked="isCheckBoxChecked(record.assessment_after_dislysis, 'hemostasis_opera', 3)"></check-box>
414 416
                       </div>
415
-                      <div class="inline_block" style="margin-left: 30px;">
416
-                        实际超滤量:
417
-                        <div class="under_line" style="width: 50px;">
418
-                          {{record.assessment_after_dislysis&&record.assessment_after_dislysis.actual_ultrafiltration?record.assessment_after_dislysis.actual_ultrafiltration:'/'}}
419
-                        </div>
420
-                        L
421
-                      </div>
417
+                      <!--<div class="inline_block" style="margin-left: 30px;">-->
418
+                        <!--实际超滤量:-->
419
+                        <!--<div class="under_line" style="width: 50px;">-->
420
+                          <!--{{record.assessment_after_dislysis&&record.assessment_after_dislysis.actual_ultrafiltration?record.assessment_after_dislysis.actual_ultrafiltration:'/'}}-->
421
+                        <!--</div>-->
422
+                        <!--L-->
423
+                      <!--</div>-->
422 424
                     </div>
423 425
                     <div class="row" style="padding: 2px 0;line-height:19px;">
424 426
                       <div class="inline_block">
@@ -673,22 +675,22 @@
673 675
                   </div>
674 676
                   <div class="row" style="padding: 2px 0;line-height:24px;">
675 677
                     <div class="inline_block">
676
-                      透析液(mol/l):
678
+                      透析液(mmol/L):
677 679
                       &emsp;Ca<sup>2+</sup>:
678 680
                       <div class="under_line" style="width: 60px;">
679 681
                         {{record.prescription&&record.prescription.calcium?getFloat(record.prescription.calcium):'/'}}
680 682
                       </div>
681
-                      mol/l
683
+                      mmol/L
682 684
                       &emsp;Na<sup>+</sup>:
683 685
                       <div class="under_line" style="width: 60px;">
684 686
                         {{record.prescription&&record.prescription.sodium?getFloat(record.prescription.sodium):'/'}}
685 687
                       </div>
686
-                      mol/l
688
+                      mmol/L
687 689
                       &emsp;K<sup>+</sup>:
688 690
                       <div class="under_line" style="width: 60px;">
689 691
                         {{record.prescription&&record.prescription.kalium?getFloat(record.prescription.kalium):'/'}}
690 692
                       </div>
691
-                      mol/l
693
+                      mmol/L
692 694
                     </div>
693 695
                     <div class="inline_block"
694 696
                         v-if="record.prescription != null &&record.prescription.displace_liqui_part == 0">
@@ -753,7 +755,7 @@
753 755
                     <div class="inline_block">
754 756
                       &emsp;实际超滤量:
755 757
                       <div class="under_line" style="width: 100px;">
756
-                        {{record.assessment_after_dislysis&&record.assessment_after_dislysis.actual_ultrafiltration?record.assessment_after_dislysis.actual_ultrafiltration:'/'}}
758
+                        {{record.prescription&&record.prescription.ultrafiltration?record.prescription.ultrafiltration:'/'}}
757 759
                       </div>
758 760
                       L
759 761
                     </div>
@@ -1002,7 +1004,6 @@
1002 1004
       //   }
1003 1005
     },
1004 1006
     mounted() {
1005
-      console.log(this.$store.getters.xt_user.fileds)
1006 1007
       this.loading = true
1007 1008
       var ids = this.$store.getters.temp_params.batch_print_dialysis_record_ids
1008 1009
       if (ids.length == 0) {
@@ -1221,7 +1222,6 @@
1221 1222
             this.records[recordIndex].advices2 = this.advice_groups_2
1222 1223
           }
1223 1224
 
1224
-          console.log(' this.records[recordIndex].advices', this.records)
1225 1225
           this.operators = resp.data.medical_staffs
1226 1226
           if (this.operators.length > 0) {
1227 1227
             var operatorsLen = this.operators.length
@@ -1400,6 +1400,8 @@
1400 1400
             advices: []
1401 1401
           }
1402 1402
         )
1403
+      },getNumber:function(record) {
1404
+        console.log(record)
1403 1405
       }
1404 1406
     }
1405 1407
   }

+ 14 - 12
src/xt_pages/dialysis/batch_print/option_check_box.vue Zobrazit soubor

@@ -29,24 +29,26 @@ export default {
29 29
     /* font-size: 16px; */
30 30
 }
31 31
 .option_panel .check_box_panel {
32
-    white-space: nowrap; 
33
-    outline: none; 
34
-    display: inline-block; 
35
-    line-height: 1; 
36
-    position: relative; 
32
+    white-space: nowrap;
33
+    outline: none;
34
+    display: inline-block;
35
+    line-height: 1;
36
+    position: relative;
37 37
     vertical-align: middle;
38 38
 }
39 39
 .option_panel .check_box_panel .check_box {
40
-    display: inline-block; 
41
-    position: relative; 
42
-    border: 1px solid #000; 
43
-    box-sizing: border-box; 
44
-    width: 14px; 
45
-    height: 14px; 
40
+    display: inline-block;
41
+    position: relative;
42
+    border: 1px solid #000;
43
+    box-sizing: border-box;
44
+    width: 14px;
45
+    height: 14px;
46 46
     background-color: #fff;
47 47
 }
48 48
 .check_box_panel .did_checked::after {
49 49
     content: "√";
50
-    font-size: 15px;
50
+    font-size: 10px;
51
+    margin-left: 2px;
52
+    position: absolute;
51 53
 }
52 54
 </style>

+ 3 - 3
src/xt_pages/dialysis/details/DialysisPrescription.vue Zobrazit soubor

@@ -20,7 +20,7 @@
20 20
         <li v-if="isShow('钙')">
21 21
           <label>钙: </label>
22 22
           <span class="content">{{calcium != '0'?calcium:""}}</span>
23
-          <span class="unit">{{calcium != '0'?"mmol/l":""}}</span>
23
+          <span class="unit">{{calcium != '0'?"mmol/L":""}}</span>
24 24
         </li>
25 25
         <li v-if="isShow('置换量')">
26 26
           <label>置换量 : </label>
@@ -56,7 +56,7 @@
56 56
         <li v-if="isShow('碳酸氢盐')">
57 57
           <label>碳酸氢盐 : </label>
58 58
           <span class="content">{{bicarbonate != '0'?bicarbonate:""}}</span>
59
-          <span class="unit">{{bicarbonate != '0'?"mmol/l":""}}</span>
59
+          <span class="unit">{{bicarbonate != '0'?"mmol/L":""}}</span>
60 60
         </li>
61 61
         <!-- <li>
62 62
           <label>干体重 : </label>
@@ -88,7 +88,7 @@
88 88
         <li v-if="isShow('钠')">
89 89
           <label>钠 : </label>
90 90
           <span class="content">{{sodium != '0'?sodium:""}}</span>
91
-          <span class="unit">{{sodium != '0'?"mmol/l":""}}</span>
91
+          <span class="unit">{{sodium != '0'?"mmol/L":""}}</span>
92 92
         </li>
93 93
         <li v-if="isShow('透析液流量')">
94 94
           <label>透析液流量 : </label>

+ 19 - 4
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue Zobrazit soubor

@@ -285,10 +285,14 @@
285 285
             <el-form-item label="失衡综合症症状: ">
286 286
 
287 287
               <el-select v-model="form.disequilibrium_syndrome_option">
288
-                <el-option :key="0" label="请选择" :value="0"></el-option>
288
+                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
289
+
290
+                <!--<el-option v-for="item in this.$store.getters.disequilibrium_syndrome_option" :label="item.name" :value="item.id"-->
291
+                           <!--:key="item.id"></el-option>-->
292
+
293
+
294
+                <el-input v-model="form.disequilibrium_syndrome_option" readonly @focus="showDialog('8')"></el-input>
289 295
 
290
-                <el-option v-for="item in this.$store.getters.disequilibrium_syndrome_option" :label="item.name" :value="item.id"
291
-                           :key="item.id"></el-option>
292 296
               </el-select>
293 297
             </el-form-item>
294 298
           </el-col>
@@ -583,7 +587,7 @@
583 587
         data['hemostasis_opera'] = this.form.hemostasis_opera ? parseFloat(this.form.hemostasis_opera) : 0
584 588
         data['tremor_noise'] = this.form.tremor_noise ? parseFloat(this.form.tremor_noise) : 0
585 589
         data['disequilibrium_syndrome'] = this.form.disequilibrium_syndrome ? parseFloat(this.form.disequilibrium_syndrome) : 0
586
-        data['disequilibrium_syndrome_option'] = this.form.disequilibrium_syndrome_option ? parseFloat(this.form.disequilibrium_syndrome_option) : 0
590
+        data['disequilibrium_syndrome_option'] = this.form.disequilibrium_syndrome_option
587 591
         data['arterial_tube'] = this.form.arterial_tube ? parseFloat(this.form.arterial_tube) : 0
588 592
         data['intravenous_tube'] = this.form.intravenous_tube ? parseFloat(this.form.intravenous_tube) : 0
589 593
         data['dialyzer'] = this.form.dialyzer ? parseFloat(this.form.dialyzer) : 0
@@ -667,6 +671,14 @@
667 671
             this.InnerDialogProps.selected = this.form.in_advance_reason
668 672
             this.InnerDialogProps.isShowTextArea = false
669 673
             break
674
+
675
+          case '8':
676
+            this.InnerDialogProps.values = this.$store.getters.disequilibrium_syndrome_option
677
+            this.InnerDialogProps.titles = '失衡综合症症状'
678
+            this.InnerDialogProps.type = 'disequilibrium_syndrome_option'
679
+            this.InnerDialogProps.selected = this.form.disequilibrium_syndrome_option
680
+            this.InnerDialogProps.isShowTextArea = false
681
+            break
670 682
         }
671 683
       },
672 684
       selectActualTreatmentHour(val) {
@@ -698,6 +710,9 @@
698 710
           case 'in_advance_reason':
699 711
             this.form.in_advance_reason = val.value.join(',')
700 712
             break
713
+          case 'disequilibrium_syndrome_option':
714
+            this.form.disequilibrium_syndrome_option = val.value.join(',')
715
+            break
701 716
 
702 717
           default:
703 718
             break

+ 17 - 16
src/xt_pages/dialysis/template/dialysisPrintOrderTwo.vue Zobrazit soubor

@@ -63,9 +63,9 @@
63 63
                   </div>
64 64
                   <div class="inline_block" style="margin-left: 30px;">
65 65
                     透析机编号:
66
-                    <div class="under_line" style="width: 100px;">{{''}}</div>
66
+                    <div class="under_line" style="width: 100px;">{{dialysisOrder&&dialysisOrder.DeviceNumber&&dialysisOrder.DeviceNumber.number.length > 0?dialysisOrder.DeviceNumber.number:''}}</div>
67 67
                     型号
68
-                    <div class="under_line" style="width: 100px;">{{''}}</div>
68
+                    <div class="under_line" style="width: 100px;">{{predialysis&&predialysis.machine_type.length > 0 ?predialysis.machine_type:''}}</div>
69 69
                   </div>
70 70
                 </div>
71 71
                 <div class="row" style="padding: 2px 0;line-height:19px;">
@@ -77,7 +77,7 @@
77 77
                   </div>
78 78
                   <div class="inline_block"  style="margin-left: 20px;">
79 79
                     出血:
80
-                    <check-box text="正常" :checked="predialysis.is_hemorrhage==2?true:false"></check-box>
80
+                    <check-box text="" :checked="predialysis.is_hemorrhage==2?true:false"></check-box>
81 81
                     <check-box text="异常" :checked="predialysis.is_hemorrhage==1?true:false"></check-box>
82 82
                     (&nbsp;
83 83
                     <check-box text="穿刺点渗血" :checked="predialysis.is_hemorrhage==1&&predialysis.hemorrhage.indexOf('穿刺点渗血')>-1?true:false"></check-box>
@@ -144,8 +144,9 @@
144 144
                     中心静脉导管:
145 145
                     <check-box text="正常" :checked="predialysis.ductus_arantii.indexOf('正常')>-1?true:false"></check-box>
146 146
                     <check-box text="不畅" :checked="predialysis.ductus_arantii.indexOf('不畅')>-1?true:false"></check-box>
147
-                    <check-box text="血流不足(正接)" :checked="predialysis.ductus_arantii.indexOf('血流不足(正接)')>-1?true:false"></check-box>
148
-                    <check-box text="血流不足(反接)" :checked="predialysis.ductus_arantii.indexOf('血流不足(反接)')>-1?true:false"></check-box>
147
+                    <check-box text="血流不足" :checked="predialysis.ductus_arantii.indexOf('血流不足')>-1?true:false"></check-box>
148
+                    (<check-box text="正接" :checked="predialysis.ductus_arantii.indexOf('正接')>-1?true:false"></check-box>/
149
+                    <check-box text="反接" :checked="predialysis.ductus_arantii.indexOf('反接')>-1?true:false"></check-box>)
149 150
                     <check-box text="血栓" :checked="predialysis.ductus_arantii.indexOf('血栓')>-1?true:false"></check-box>
150 151
                     <check-box text="缝线脱落" :checked="predialysis.ductus_arantii.indexOf('缝线脱落')>-1?true:false"></check-box>
151 152
                     <check-box text="导管脱落" :checked="predialysis.ductus_arantii.indexOf('导管脱落')>-1?true:false"></check-box>
@@ -409,13 +410,13 @@
409 410
                     <check-box text="他人协助" :checked="afterdialysis.hemostasis_opera == 2?true:false"></check-box>
410 411
                     <check-box text="自己压迫" :checked="afterdialysis.hemostasis_opera == 3?true:false"></check-box>
411 412
                   </div>
412
-                  <div class="inline_block" style="margin-left: 30px;">
413
-                    实际超滤量:
414
-                    <div class="under_line" style="width: 50px;">
415
-                      {{prescription.ultrafiltration?prescription.ultrafiltration:'/'}}
416
-                    </div>
417
-                    L
418
-                  </div>
413
+                  <!--<div class="inline_block" style="margin-left: 30px;">-->
414
+                    <!--实际超滤量:-->
415
+                    <!--<div class="under_line" style="width: 50px;">-->
416
+                      <!--{{afterdialysis.actual_ultrafiltration?afterdialysis.actual_ultrafiltration:'/'}}-->
417
+                    <!--</div>-->
418
+                    <!--L-->
419
+                  <!--</div>-->
419 420
                 </div>
420 421
                 <div class="row" style="padding: 2px 0;line-height:19px;">
421 422
                   <div class="inline_block">
@@ -675,26 +676,26 @@
675 676
                 </div>
676 677
                 <div class="row" style="padding: 2px 0;line-height:24px;">
677 678
                   <div class="inline_block">
678
-                    透析液(mol/l): &emsp;Ca<sup>2+</sup>:
679
+                    透析液(mmol/L): &emsp;Ca<sup>2+</sup>:
679 680
                     <div class="under_line" style="width: 70px;">
680 681
                         <span v-if="prescription.calcium">{{getFloat(prescription.calcium)?getFloat(prescription.calcium):'/'}}</span>
681 682
                       <span v-else>{{'/'}}</span>
682 683
 
683 684
                     </div>
684
-                    mol/l &emsp;Na<sup>+</sup>:
685
+                    mmol/L &emsp;Na<sup>+</sup>:
685 686
                     <div class="under_line" style="width: 70px;">
686 687
                       <span v-if="prescription.sodium">{{getFloat(prescription.sodium)?getFloat(prescription.sodium):'/'}}</span>
687 688
                       <span v-else>{{'/'}}</span>
688 689
 
689 690
                     </div>
690
-                    mol/l &emsp;K<sup>+</sup>:
691
+                    mmol/L &emsp;K<sup>+</sup>:
691 692
                     <div class="under_line" style="width: 70px;">
692 693
                       <span v-if="prescription.kalium">{{getFloat(prescription.kalium)?getFloat(prescription.kalium):'/'}}</span>
693 694
                       <span v-else>{{'/'}}</span>
694 695
 
695 696
 
696 697
                     </div>
697
-                    mol/l
698
+                    mmol/L
698 699
                   </div>
699 700
                   <div class="inline_block" v-if="prescription.displace_liqui_part == 0">
700 701
                     &emsp;置换液后/前稀释 总量:

+ 1 - 0
src/xt_pages/stock/Dialog/salesReturnDialog.vue Zobrazit soubor

@@ -178,6 +178,7 @@
178 178
 
179 179
       },
180 180
       getValue: function() {
181
+        this.multipleSelection = []
181 182
         for (let i = 0; i < this.propForm.goods.length; i++) {
182 183
           for (let key in this.propForm.goods[i]) {
183 184
             if (key != 'index') {

+ 2 - 2
src/xt_pages/stock/Dialog/stockInDialog.vue Zobrazit soubor

@@ -11,7 +11,7 @@
11 11
       <el-col :span="8">
12 12
         <el-table
13 13
           :data="propForm.goods"
14
-          ref=""
14
+          ref="table"
15 15
           border
16 16
           highlight-current-row
17 17
           max-height="250"
@@ -171,6 +171,7 @@
171 171
         this.$refs.table.setCurrentRow(null)
172 172
       },
173 173
       getValue: function() {
174
+        this.multipleSelection = []
174 175
         for (let i = 0; i < this.propForm.goods.length; i++) {
175 176
           for (let key in this.propForm.goods[i]) {
176 177
             if (key != 'index') {
@@ -182,7 +183,6 @@
182 183
             }
183 184
           }
184 185
         }
185
-
186 186
         const obj = {
187 187
           selectedGoodInfo: this.multipleSelection,
188 188
         }

+ 1 - 0
src/xt_pages/stock/cancelStockOrderAdd.vue Zobrazit soubor

@@ -176,6 +176,7 @@
176 176
         // prop
177 177
         isVisibility: false,
178 178
         propForm: {
179
+          goods:[],
179 180
           goodType: [],
180 181
           goodInfo: [],
181 182
           goodUnit: [],

+ 4 - 3
src/xt_pages/stock/config/goodInfo.vue Zobrazit soubor

@@ -9,15 +9,16 @@
9 9
                       :isCreated="goodInfo.goodInfoDialog.isCreated" v-on:dialog-comfirm="goodInfoDialogComfirm"
10 10
                       v-on:dialog-cancle="goodInfoDialogCancle"></good-info-dailog>
11 11
 
12
+    <div class="cell clearfix" style="float: right">
13
+      <el-button size="small" icon="el-icon-circle-plus-outline" type="primary" @click="showInfoDialog">新增</el-button>
14
+    </div>
12 15
 
13 16
     <div class="cell clearfix">
14 17
       <el-input size="small" style="width: 400px;" class="filter-item" v-model="keywords"
15 18
                 placeholder="商品编码/规格名称"/>
16 19
       <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
17 20
     </div>
18
-    <div class="cell clearfix" style="float: right">
19
-      <el-button size="small" icon="el-icon-circle-plus-outline" type="primary" @click="showInfoDialog">新增</el-button>
20
-    </div>
21
+
21 22
 
22 23
     <el-row :gutter="15">
23 24
       <el-col>

+ 6 - 3
src/xt_pages/stock/config/goodType.vue Zobrazit soubor

@@ -6,15 +6,18 @@
6 6
                       :visibility="goodType.goodTypeDialog.isVisibility"
7 7
                       :isCreated="goodType.goodTypeDialog.isCreated" v-on:dialog-comfirm="goodTypeDialogComfirm"
8 8
                       v-on:dialog-cancle="goodTypeDialogCancle"></good-type-dialog>
9
+
10
+    <div class="cell clearfix" style="float: right">
11
+      <el-button size="small" icon="el-icon-circle-plus-outline" type="primary" @click="showDialog">新增</el-button>
12
+    </div>
13
+
9 14
     <div class="cell clearfix">
10 15
       <el-input size="small" style="width: 400px;" class="filter-item" v-model="keywords"
11 16
                 placeholder="类型编码/类型名称"/>
12 17
       <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
13 18
 
14 19
     </div>
15
-    <div class="cell clearfix" style="float: right">
16
-      <el-button size="small" icon="el-icon-circle-plus-outline" type="primary" @click="showDialog">新增</el-button>
17
-    </div>
20
+
18 21
     <el-row :gutter="15">
19 22
       <el-col>
20 23
 

+ 20 - 4
src/xt_pages/stock/detail/print.vue Zobrazit soubor

@@ -210,7 +210,6 @@
210 210
         return total
211 211
 
212 212
       }, calTotal(stock) {
213
-        console.log(stock)
214 213
 
215 214
         var array = []
216 215
         if (this.type == 1) {
@@ -223,7 +222,7 @@
223 222
         for (let i = 0; i < array.length; i++) {
224 223
           total_price = total_price + array[i].total_price
225 224
         }
226
-        return total_price
225
+        return  Math.floor(total_price * 100) / 100
227 226
       }, calTotalPrice() {
228 227
 
229 228
         var amountPrice = 0
@@ -243,9 +242,26 @@
243 242
               total_price = total_price + obj.query_warehouseout_info[a].total_price
244 243
             }
245 244
           }
246
-          amountPrice = amountPrice + total_price
245
+
246
+          amountPrice = amountPrice +  Math.floor(total_price* 100) / 100
247
+        }
248
+        return Math.floor(amountPrice* 100) / 100
249
+      }, getTotal: function(price, total) {
250
+        var m = 0, r1, r2
251
+        var s1 = price.toString()
252
+        var s2 = total.toString()
253
+        try {
254
+          m += s1.split('.')[1].length
255
+        } catch (e) {
256
+
257
+        }
258
+        try {
259
+        } catch (e) {
260
+          m += s2.split('.')[1].length
247 261
         }
248
-        return amountPrice
262
+        r1 = Number(price.toString().replace('.', ''))
263
+        r2 = Number(total.toString().replace('.', ''))
264
+        return r1 * r2 / Math.pow(10, m)
249 265
       }
250 266
     },
251 267
     created() {

+ 25 - 6
src/xt_pages/user/courseOfDisease.vue Zobrazit soubor

@@ -58,7 +58,8 @@
58 58
               <div class="record_content_panel">
59 59
                 <div style="background-color:rgb(245, 247, 250)" class="title">病程内容</div>
60 60
                 <div class="content">
61
-                  {{ current_select_record == null ? '' : current_select_record.content }}
61
+                  <span v-if="current_select_record" v-html="current_select_record.content">{{current_select_record.content }}</span>
62
+                  <span v-else></span>
62 63
                 </div>
63 64
               </div>
64 65
             </el-col>
@@ -66,7 +67,7 @@
66 67
         </div>
67 68
       </div>
68 69
       <!-- </div> -->
69
-      <el-dialog title="新增病程记录" width="40%" top="5vh" :visible.sync="show_dialog">
70
+      <el-dialog title="新增病程记录" width="50%" top="5vh" :visible.sync="show_dialog">
70 71
         <div>
71 72
           <div class="new_record_form">
72 73
             <div class="cell clearfix">
@@ -85,7 +86,13 @@
85 86
 
86 87
 
87 88
             <div class="textarea_panel">
88
-              <el-input v-model="new_content" type="textarea" rows="6" resize="none"></el-input>
89
+              <keep-alive>
90
+                <editor ref="editor"
91
+                         id="editor"
92
+                         style="width: 600px"
93
+                         v-bind:r_content="new_content">
94
+                </editor>
95
+              </keep-alive>
89 96
             </div>
90 97
 
91 98
             <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
@@ -99,7 +106,7 @@
99 106
       </el-dialog>
100 107
 
101 108
 
102
-      <el-dialog title="修改病程记录" width="40%" top="5vh" :visible.sync="show_edit_dialog">
109
+      <el-dialog title="修改病程记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
103 110
         <div>
104 111
           <div class="new_record_form">
105 112
             <div class="cell clearfix">
@@ -118,7 +125,14 @@
118 125
 
119 126
 
120 127
             <div class="textarea_panel">
121
-              <el-input v-model="edit_new_content" type="textarea" rows="6" resize="none"></el-input>
128
+              <!--<el-input v-model="edit_new_content" type="textarea" rows="6" resize="none"></el-input>-->
129
+              <keep-alive>
130
+                <editor ref="edit_neditor"
131
+                         id="edit_editor"
132
+                         style="width: 600px"
133
+                         v-bind:r_content="edit_new_content">
134
+                </editor>
135
+              </keep-alive>
122 136
             </div>
123 137
 
124 138
             <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
@@ -138,6 +152,8 @@
138 152
 
139 153
 <script>
140 154
   import PatientSidebar from './components/PatientSidebar'
155
+  import Editor from '@/components/Editor'
156
+
141 157
   import {
142 158
     createCourseOfDiseaseRecord,
143 159
     deleteCourseOfDiseaseRecords,
@@ -151,7 +167,8 @@
151 167
     name: 'CourseOfDisease',
152 168
     components: {
153 169
       PatientSidebar,
154
-      BreadCrumb
170
+      BreadCrumb,
171
+      Editor
155 172
     },
156 173
     data() {
157 174
       return {
@@ -252,6 +269,7 @@
252 269
         return ''
253 270
       },
254 271
       modifyAction: function() {
272
+        this.edit_new_content = this.$refs.edit_neditor.content;
255 273
         if (this.edit_new_content.length == 0) {
256 274
           this.$message.error('请填写病程内容')
257 275
           return
@@ -283,6 +301,7 @@
283 301
       },
284 302
 
285 303
       createAction: function() {
304
+        this.new_content = this.$refs.neditor.content;
286 305
         if (this.new_content.length == 0) {
287 306
           this.$message.error('请填写病程内容')
288 307
           return

+ 187 - 54
src/xt_pages/workforce/components/tableData.vue Zobrazit soubor

@@ -92,7 +92,7 @@
92 92
               <schedule-item slot-scope="scope" :schedule-detail="scope.row.Sun_N"></schedule-item>
93 93
             </el-table-column>
94 94
         </el-table-column>
95
-        
95
+
96 96
         <el-table-column prop="total" label="总数" width="60" align="center" fixed="right"></el-table-column>
97 97
       </el-table>
98 98
 
@@ -217,7 +217,7 @@
217 217
               <el-input v-model="currentData.schedule_date" disabled></el-input>
218 218
             </el-form-item>
219 219
             <el-form-item label="班次: " prop="schedule_type">
220
-              <el-select v-model="changeSchedule.schedule_type" placeholder="请选择" style="width:100%">
220
+              <el-select v-model="changeSchedule.schedule_type" placeholder="请选择" style="width:100%" @change="changeScheduleType">
221 221
                 <el-option
222 222
                   v-for="item in scheduleType"
223 223
                   :key="item.id"
@@ -227,19 +227,19 @@
227 227
               </el-select>
228 228
             </el-form-item>
229 229
             <el-form-item label="病房: " prop="partition_id">
230
-              <el-select v-model="changeSchedule.partition_id" placeholder="请选择" style="width:100%" @change="changePartition">
230
+              <el-select v-model="zone_name" placeholder="请选择" style="width:100%" @change="changePartition">
231 231
                 <el-option
232
-                  v-for="item in partitions"
233
-                  :key="item.id"
234
-                  :label="item.name"
235
-                  :value="item.id">
232
+                  v-for="item,index in zone_names"
233
+                  :key="index"
234
+                  :label="item"
235
+                  :value="item">
236 236
                 </el-option>
237 237
               </el-select>
238 238
             </el-form-item>
239 239
             <el-form-item label="透析机: " prop="bed_id">
240
-              <el-select v-model="changeSchedule.bed_id" placeholder="请选择" style="width:100%">
240
+              <el-select v-model="device_id" placeholder="请选择" style="width:100%">
241 241
                 <el-option
242
-                  v-for="item in jihaos"
242
+                  v-for="item in current_devices"
243 243
                   :key="item.id"
244 244
                   :label="item.number"
245 245
                   :value="item.id">
@@ -247,6 +247,7 @@
247 247
               </el-select>
248 248
             </el-form-item>
249 249
           </el-form>
250
+
250 251
         </div>
251 252
         <span slot="footer" class="dialog-footer">
252 253
           <el-button @click="jhDialogVisible = false">取 消</el-button>
@@ -259,7 +260,7 @@
259 260
 
260 261
 <script>
261 262
 
262
-import { getWeekPanels, getSchedules, getSchedulePatients, CreateSchedule, CancelSchedule, ChangeSchedule } from '@/api/schedule'
263
+import { getWeekPanels, getSchedules, getSchedulePatients, CreateSchedule, CancelSchedule, ChangeSchedule,getUrgentScheduleInitData} from '@/api/schedule'
263 264
 import ScheduleItem from './ScheduleItem'
264 265
 
265 266
 let rowNumber = 0
@@ -367,7 +368,16 @@ export default {
367 368
       changing_mode: false,
368 369
       changing_bed: false,
369 370
 
370
-      tableHeight: document.documentElement.clientHeight
371
+      tableHeight: document.documentElement.clientHeight,
372
+
373
+      origin_schedules:[],
374
+      origin_device_numbers:[],
375
+      zone_device_map:{},
376
+      device_id:0,
377
+      zone_name: '',
378
+      current_devices: [],
379
+      zone_names: [],
380
+      zone_device_options:[],
371 381
     }
372 382
   },
373 383
 
@@ -561,6 +571,9 @@ export default {
561 571
                 }
562 572
               })
563 573
             }
574
+            console.log(that.scheduleZone)
575
+            console.log(theSchedules)
576
+
564 577
           })
565 578
         } else {
566 579
           this.$message.error('网络错误')
@@ -744,52 +757,65 @@ export default {
744 757
             this.$message.error('数据异常')
745 758
             return false
746 759
           }
747
-          var weekPathKey = weekPath[0] + '_' + weekPath[1]
748
-          for (var index in this.scheduleZone) {
749
-            if (this.scheduleZone[index].jihao_id == this.changeSchedule.bed_id) {
750
-              if (this.scheduleZone[index][weekPathKey].mode_id > 0) {
751
-                this.$message.error('选中的区域已经存在排班,不能再排班!')
752
-                return false
753
-              }
754
-              this.changeSchedule.partition_type = this.scheduleZone[index].zone_type
755
-              break
760
+
761
+          this.changeSchedule.bed_id = this.device_id
762
+          for (let i =0; i <this.origin_device_numbers.length; i++ ){
763
+            if(this.origin_device_numbers[i].id == this.device_id){
764
+              this.changeSchedule.partition_id = this.origin_device_numbers[i].zone_id
756 765
             }
757 766
           }
758 767
 
768
+          // console.log(this.scheduleZone)
769
+
770
+
771
+          this.changeSchedule.change_action = 'change_device'
772
+          this.changeScheduleActon(formName)
773
+
774
+          // this.changeSchedule.spartition_type = this.scheduleZone[index].zone_type
775
+          // var weekPathKey = weekPath[0] + '_' + weekPath[1]
776
+          // for (var index in this.scheduleZone) {
777
+          //   if (this.scheduleZone[index].jihao_id == this.changeSchedule.bed_id) {
778
+          //     if (this.scheduleZone[index][weekPathKey].mode_id > 0) {
779
+          //       this.$message.error('选中的区域已经存在排班,不能再排班!')
780
+          //       return false
781
+          //     }
782
+          //     break
783
+          //   }
784
+          // }
785
+
759 786
           // 可能
760 787
           // 患者有传染病,与选择的机器类型(传染病)不匹配
761 788
           // 患者没有传染病,但机器是某个传染病的专用透析器
762 789
           // 机器的透析模式与患者不匹配
763 790
 
764
-          if (this.currentData.contagions.length > 0) {
765
-            var cflag = false
766
-            for (var index in this.currentData.contagions) {
767
-              if (this.currentData.contagions[index].disease_id == this.changeSchedule.partition_type) {
768
-                cflag = true
769
-              }
770
-            }
771
-            if (!cflag) {
772
-              this.$confirm('此患者有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
773
-                .then(() => {
774
-                  this.changeSchedule.change_action = 'change_device'
775
-                  this.changeScheduleActon(formName)
776
-                }).catch(() => {
777
-                })
778
-            } else {
779
-              this.changeSchedule.change_action = 'change_device'
780
-              this.changeScheduleActon(formName)
781
-            }
782
-          } else if (this.changeSchedule.partition_type > 1) {
783
-            this.$confirm('此患者没有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
784
-              .then(() => {
785
-                this.changeSchedule.change_action = 'change_device'
786
-                this.changeScheduleActon(formName)
787
-              }).catch(() => {
788
-              })
789
-          } else {
790
-            this.changeSchedule.change_action = 'change_device'
791
-            this.changeScheduleActon(formName)
792
-          }
791
+          // if (this.currentData.contagions.length > 0) {
792
+          //   var cflag = false
793
+          //   for (var index in this.currentData.contagions) {
794
+          //     if (this.currentData.contagions[index].disease_id == this.changeSchedule.partition_type) {
795
+          //       cflag = true
796
+          //     }
797
+          //   }
798
+          //   if (!cflag) {
799
+          //     this.$confirm('此患者有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
800
+          //       .then(() => {
801
+          //
802
+          //       }).catch(() => {
803
+          //       })
804
+          //   } else {
805
+          //     this.changeSchedule.change_action = 'change_device'
806
+          //     this.changeScheduleActon(formName)
807
+          //   }
808
+          // } else if (this.changeSchedule.partition_type > 1) {
809
+          //   this.$confirm('此患者没有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
810
+          //     .then(() => {
811
+          //       this.changeSchedule.change_action = 'change_device'
812
+          //       this.changeScheduleActon(formName)
813
+          //     }).catch(() => {
814
+          //     })
815
+          // } else {
816
+          //   this.changeSchedule.change_action = 'change_device'
817
+          //   this.changeScheduleActon(formName)
818
+          // }
793 819
         }
794 820
       })
795 821
     },
@@ -831,12 +857,60 @@ export default {
831 857
     },
832 858
 
833 859
     changePartition(value) {
834
-      if (typeof (this.partitions[value].jihaos) !== 'undefined') {
835
-        this.jihaos = this.partitions[value].jihaos
836
-      } else {
837
-        this.jihaos = []
860
+      this.current_devices = this.zone_device_map[value]
861
+      this.device_id = this.current_devices[0].id
862
+
863
+    },changeScheduleType(schedule_type){
864
+      let params = {
865
+        type: schedule_type
838 866
       }
839
-      this.changeSchedule.bed_id = ''
867
+      getUrgentScheduleInitData(params).then(rs => {
868
+        if (rs.data.state == 1) {
869
+          this.origin_schedules = rs.data.data.schedules
870
+          this.patients = rs.data.data.patients
871
+          this.modes = rs.data.data.modes
872
+          this.origin_device_numbers = rs.data.data.device_numbers
873
+
874
+          for (let i = this.origin_schedules.length-1; i >= 0 ; i--) {
875
+            for (let y = this.origin_device_numbers.length-1; y >=0 ; y--){
876
+              if(this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id){
877
+                this.origin_device_numbers.splice(y,1)
878
+              }
879
+            }
880
+          }
881
+
882
+
883
+          var zone_device_map = {}
884
+          for (let index = 0; index < this.origin_device_numbers.length; index++) {
885
+            const device_number = this.origin_device_numbers[index]
886
+            if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
887
+              zone_device_map[device_number.zone.name] = []
888
+            }
889
+            zone_device_map[device_number.zone.name].push(device_number)
890
+          }
891
+          this.zone_device_map = zone_device_map
892
+
893
+          this.zone_names = Object.keys(this.zone_device_map)
894
+          if (this.zone_names.length > 0) {
895
+            this.zone_name = this.zone_names[0]
896
+            this.current_devices = this.zone_device_map[this.zone_name]
897
+            this.device_id = this.current_devices[0].id
898
+          }
899
+          this.zone_device_options = [
900
+            {values: this.zone_names},
901
+            // { values: this.getDeviceNumberNames(this.current_devices) },
902
+            {values: this.current_devices},
903
+          ]
904
+        } else {
905
+          Toast.fail(rs.data.msg)
906
+        }
907
+
908
+      }).catch(err => {
909
+        this.loading = false
910
+        Toast.fail(err)
911
+      })
912
+
913
+
840 914
     },
841 915
     submitTiaoX() {
842 916
       // if (this.tiaoZhengType==1) {
@@ -868,6 +942,62 @@ export default {
868 942
           } else {
869 943
             this.jihaos = []
870 944
           }
945
+          let params = {
946
+            type: this.currentData.schedule_type
947
+          }
948
+          getUrgentScheduleInitData(params).then(response => {
949
+            if (response.data.state == 0) {
950
+              this.$message.error(response.data.msg)
951
+            } else {
952
+
953
+              if (response.data.state == 1) {
954
+                this.origin_schedules = response.data.data.schedules
955
+                this.origin_device_numbers = response.data.data.device_numbers
956
+
957
+                for (let i = this.origin_schedules.length-1; i >= 0 ; i--) {
958
+                  for (let y = this.origin_device_numbers.length-1; y >=0 ; y--){
959
+                    if(this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id){
960
+                      this.origin_device_numbers.splice(y,1)
961
+                    }
962
+                  }
963
+                }
964
+
965
+                var zone_device_map = {}
966
+                for (let index = 0; index < this.origin_device_numbers.length; index++) {
967
+                  const device_number = this.origin_device_numbers[index]
968
+                  if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
969
+                    zone_device_map[device_number.zone.name] = []
970
+                  }
971
+                  zone_device_map[device_number.zone.name].push(device_number)
972
+                }
973
+                this.zone_device_map = zone_device_map
974
+
975
+                this.zone_names = Object.keys(this.zone_device_map)
976
+                if (this.zone_names.length > 0) {
977
+                  this.zone_name = this.zone_names[0]
978
+                  this.current_devices = this.zone_device_map[this.zone_name]
979
+                  this.device_id = this.current_devices[0].id
980
+                }
981
+
982
+
983
+                this.zone_device_options = [
984
+                  {values: this.zone_names},
985
+                  // { values: this.getDeviceNumberNames(this.current_devices) },
986
+                  {values: this.current_devices},
987
+                ]
988
+
989
+
990
+              } else {
991
+                Toast.fail(rs.data.msg)
992
+              }
993
+
994
+
995
+            }
996
+          }).catch(err => {
997
+            this.$message.error(err)
998
+          })
999
+
1000
+
871 1001
 
872 1002
           this.tzDialogVisible = false
873 1003
           this.jhDialogVisible = true
@@ -1063,6 +1193,8 @@ export default {
1063 1193
 
1064 1194
     this.partitions = this.partitionsProp
1065 1195
 
1196
+    console.log(this.partitions)
1197
+
1066 1198
     var contagions = this.$store.getters.contagions
1067 1199
     if (contagions.length > 0) {
1068 1200
       var that = this
@@ -1073,6 +1205,7 @@ export default {
1073 1205
       })
1074 1206
     }
1075 1207
     this.scheduleZoneRow = this.scheduleZoneRowProp
1208
+    console.log(this.scheduleZoneRow)
1076 1209
 
1077 1210
     this.weekday = (new Date()).getDay()
1078 1211
     if (this.weekday == 0) {

+ 13 - 13
src/xt_permission.js Zobrazit soubor

@@ -10,19 +10,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
10 10
 
11 11
 router.beforeEach((to, from, next) => {
12 12
   // 线上注释
13
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
-  //   store.dispatch('VerifyConfigList', []).then(() => {
15
-  //     next()
16
-  //   })
17
-  // }
18
-  // if (store.getters.permission_routers === undefined) {
19
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
20
-  //     next()
21
-  //   })
22
-  // } else {
23
-  //   next()
24
-  // }
25
-  // return
13
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
+    store.dispatch('VerifyConfigList', []).then(() => {
15
+      next()
16
+    })
17
+  }
18
+  if (store.getters.permission_routers === undefined) {
19
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
20
+      next()
21
+    })
22
+  } else {
23
+    next()
24
+  }
25
+  return
26 26
   // 线上注释
27 27
 
28 28
   NProgress.start()