Browse Source

首页开发完成

seimin 3 years ago
parent
commit
b932de7fa0

+ 113 - 0
components/seiminFooterNav/seiminFooterNav.vue

@@ -0,0 +1,113 @@
1
+<template>
2
+  <view class="seiminFooterNav">
3
+    <view class="seiminFooterNav_item" :class="{otherStyle:menu.otherStyle,active:menu.otherStyle?false:menu.active}"
4
+      v-for="menu in menus" :key="menu.link">
5
+      <text class="pda seiminFooterNav_item_icon" :class="menu.icon"></text>
6
+      <text class="seiminFooterNav_item_text">{{menu.name}}</text>
7
+    </view>
8
+  </view>
9
+</template>
10
+
11
+<script>
12
+  import {
13
+    getCurrentPagesSeimin
14
+  } from '../../utils/index.js';
15
+  export default {
16
+    name: "seiminFooterNav",
17
+    data() {
18
+      return {
19
+        // 当前路由地址
20
+        curRoute: '',
21
+        //底部菜单
22
+        menus: [{
23
+            name: '首页',
24
+            link: '/pages/index/index',
25
+            icon: 'pda-shouye2',
26
+            otherStyle: false,
27
+            active: false,
28
+          },
29
+          {
30
+            name: '工单',
31
+            link: '/pages/orders/orders',
32
+            icon: 'pda-gongdan',
33
+            otherStyle: false,
34
+            active: false,
35
+          },
36
+          {
37
+            name: '二维码',
38
+            link: '/pages/qrcode/qrcode',
39
+            icon: 'pda-ziyuan91',
40
+            otherStyle: true,
41
+            active: false,
42
+          },
43
+          {
44
+            name: '患者',
45
+            link: '/pages/patients/patients',
46
+            icon: 'pda-wodehuanzhe',
47
+            otherStyle: false,
48
+            active: false,
49
+          },
50
+          {
51
+            name: '我的',
52
+            link: '/pages/personalCenter/personalCenter',
53
+            icon: 'pda-shouye3',
54
+            otherStyle: false,
55
+            active: false,
56
+          }
57
+        ]
58
+      };
59
+    },
60
+    methods: {
61
+      // 高亮当前菜单
62
+      activeCurrentMenu() {
63
+        this.curRoute = `/${getCurrentPagesSeimin()}`;
64
+        this.menus.forEach(v => v.active = v.link === this.curRoute);
65
+      }
66
+    },
67
+    mounted() {
68
+      this.activeCurrentMenu();
69
+    },
70
+  };
71
+</script>
72
+
73
+<style lang="scss" scoped>
74
+  .seiminFooterNav {
75
+    position: fixed;
76
+    left: 0;
77
+    bottom: 0;
78
+    width: 100%;
79
+    height: 100rpx;
80
+    z-index: 9;
81
+    background-color: #fff;
82
+    border-top: 1px solid rgba(0, 0, 0, 0.1);
83
+    padding: 0 60rpx;
84
+    @include flex(space-between, center);
85
+
86
+    .seiminFooterNav_item {
87
+      color: #DDE1E5;
88
+      @include flex(center, center, column);
89
+
90
+      &.otherStyle {
91
+        width: 120rpx;
92
+        height: 120rpx;
93
+        background: linear-gradient(180deg, #74C271 0%, #39B199 100%);
94
+        border-radius: 50%;
95
+        position: relative;
96
+        top: -10rpx;
97
+        color: #fff;
98
+      }
99
+
100
+      &.active {
101
+        color: $defaultColor;
102
+      }
103
+
104
+      .seiminFooterNav_item_icon {
105
+        font-size: 50rpx;
106
+      }
107
+
108
+      .seiminFooterNav_item_text {
109
+        font-size: 28rpx;
110
+      }
111
+    }
112
+  }
113
+</style>

+ 122 - 106
components/seiminModel/seiminModel.vue

@@ -7,139 +7,155 @@
7 7
 -->
8 8
 <template>
9 9
   <view class="seiminModel seiminModel_mask" v-if="opts.isVisible">
10
-    <view
11
-      class="seiminModel_container animate__animated animate__fadeIn animate__faster"
12
-    >
10
+    <view class="seiminModel_container animate__animated animate__fadeIn animate__faster">
13 11
       <view class="seiminModel_header">{{ opts.title }}</view>
14 12
       <view class="seiminModel_content" v-html="opts.content"></view>
15 13
       <view class="seiminModel_footer">
16
-        <view
17
-          class="seiminModel_footer__btn"
18
-          v-for="(btn, i) in opts.btns"
19
-          :style="{
14
+        <view class="seiminModel_footer__btn" v-for="(btn, i) in opts.btns" :style="{
20 15
             flex: btn.flex,
21 16
             color: btn.textColor,
22
-          }"
23
-          @click="btn.click($event)"
24
-          :key="i"
25
-          >{{ btn.name }}</view
26
-        >
17
+          }" @click="btn.click($event)" :key="i">{{ btn.name }}</view>
27 18
       </view>
28 19
     </view>
29 20
   </view>
30 21
 </template>
31 22
 
32 23
 <script>
33
-export default {
34
-  name: "seiminModel",
35
-  data() {
36
-    return {
37
-      // 配置项
38
-      opts: {},
39
-    };
40
-  },
41
-  methods: {
42
-    // 显示弹窗
43
-    show(args = {}) {
44
-      // 默认配置项
45
-      let defaultOptions = {
46
-        skin: "default", //弹窗风格(default|toast|)
47
-        isVisible: false, //是否显示弹窗
48
-        title: "提示", //标题
49
-        content: "", //内容
50
-        btns: [
51
-          { name: "取消", textColor: "#666", flex: 1, click: this.close },
52
-          { name: "确定", textColor: "#666", flex: 1, click: this.close },
53
-        ], //弹窗按钮
24
+  export default {
25
+    name: "seiminModel",
26
+    data() {
27
+      return {
28
+        // 配置项
29
+        opts: {},
54 30
       };
55
-      // 根据弹窗风格修改默认配置项
56
-      switch (args.skin) {
57
-        case "toast":
58
-          defaultOptions.btns = [
31
+    },
32
+    methods: {
33
+      // 显示弹窗
34
+      show(args = {}) {
35
+        // 默认配置项
36
+        let defaultOptions = {
37
+          skin: "default", //弹窗风格(default|toast|)
38
+          isVisible: false, //是否显示弹窗
39
+          title: "提示", //标题
40
+          content: "", //内容
41
+          btns: [{
42
+              name: "取消",
43
+              textColor: "#666",
44
+              flex: 1,
45
+              click: this.close
46
+            },
59 47
             {
48
+              name: "确定",
49
+              textColor: "#666",
50
+              flex: 1,
51
+              click: this.close
52
+            },
53
+          ], //弹窗按钮
54
+        };
55
+        // 根据弹窗风格修改默认配置项
56
+        switch (args.skin) {
57
+          case "toast":
58
+            defaultOptions.btns = [{
60 59
               name: "知道了",
61 60
               textColor: "#49b856",
62 61
               flex: 1,
63 62
               click: this.close,
64
-            },
65
-          ];
66
-          break;
67
-      }
68
-      // 合并配置
69
-      this.opts = Object.assign({}, defaultOptions, args, {
70
-        isVisible: true,
71
-      });
72
-    },
73
-    // 关闭弹窗
74
-    close() {
75
-      this.opts.isVisible = false;
63
+            }, ];
64
+            break;
65
+        }
66
+        // 按钮合并参数
67
+        if (Array.isArray(args.btns)) {
68
+          let btns = [];
69
+          args.btns.forEach((v, i) => {
70
+            btns.push(Object.assign({}, defaultOptions.btns[i], v));
71
+          })
72
+          args.btns = btns;
73
+        }
74
+        // 合并配置
75
+        this.opts = Object.assign({}, defaultOptions, args, {
76
+          isVisible: true,
77
+        });
78
+      },
79
+      // 关闭弹窗
80
+      close() {
81
+        this.opts.isVisible = false;
82
+      },
76 83
     },
77
-  },
78
-};
84
+  };
79 85
 </script>
80 86
 
81 87
 <style lang="scss" scoped>
82
-.seiminModel {
83
-  font-size: 36rpx;
84
-  color: #000;
85
-  line-height: 50rpx;
86
-  text-align: center;
87
-  &.seiminModel_mask {
88
-    background-color: rgba(0, 0, 0, 0.5);
89
-    position: fixed;
90
-    top: 0;
91
-    right: 0;
92
-    bottom: 0;
93
-    left: 0;
94
-    margin: auto;
95
-    @include flex(center, center);
96
-    .seiminModel_container {
97
-      width: 560rpx;
98
-      border-radius: 8rpx;
99
-      background-color: #fff;
100
-      display: flex;
101
-      flex-direction: column;
102
-      align-content: center;
103
-      .seiminModel_header {
104
-        height: 100rpx;
105
-        @include flex(center, center);
106
-      }
107
-      .seiminModel_content {
108
-        flex: 1;
109
-        background-color: #f9fafb;
110
-        margin: 0 36rpx 25rpx;
111
-        border: 1px solid #e5e9ed;
112
-        color: #333;
113
-        padding: 76rpx 24rpx;
114
-        @include numbersAndLettersNoWrap;
115
-        .red {
116
-          color: $textColorRed;
88
+  .seiminModel {
89
+    font-size: 36rpx;
90
+    color: #000;
91
+    line-height: 50rpx;
92
+    text-align: center;
93
+
94
+    &.seiminModel_mask {
95
+      background-color: rgba(0, 0, 0, 0.5);
96
+      position: fixed;
97
+      top: 0;
98
+      right: 0;
99
+      bottom: 0;
100
+      left: 0;
101
+      margin: auto;
102
+      z-index: 9999;
103
+      @include flex(center, center);
104
+
105
+      .seiminModel_container {
106
+        width: 560rpx;
107
+        border-radius: 8rpx;
108
+        background-color: #fff;
109
+        display: flex;
110
+        flex-direction: column;
111
+        align-content: center;
112
+
113
+        .seiminModel_header {
114
+          height: 100rpx;
115
+          @include flex(center, center);
117 116
         }
118
-        .green {
119
-          color: $defaultColor;
117
+
118
+        .seiminModel_content {
119
+          flex: 1;
120
+          background-color: #f9fafb;
121
+          margin: 0 36rpx 25rpx;
122
+          border: 1px solid #e5e9ed;
123
+          color: #333;
124
+          padding: 76rpx 24rpx;
125
+          @include numbersAndLettersNoWrap;
126
+
127
+          .red {
128
+            color: $textColorRed;
129
+          }
130
+
131
+          .green {
132
+            color: $defaultColor;
133
+          }
120 134
         }
121
-      }
122
-      .seiminModel_footer {
123
-        border-top: 1px solid #e5e5e5;
124
-        height: 100rpx;
125
-        color: #666;
126
-        @include flex(center, center);
127
-        .seiminModel_footer__btn {
128
-          height: 100%;
135
+
136
+        .seiminModel_footer {
137
+          border-top: 1px solid #e5e5e5;
138
+          height: 100rpx;
139
+          color: #666;
129 140
           @include flex(center, center);
130
-          position: relative;
131
-          &::after {
132
-            content: "";
133
-            height: 86rpx;
134
-            position: absolute;
135
-            width: 1px;
136
-            bottom: 0;
137
-            right: 0;
138
-            background-color: #dde1e5;
141
+
142
+          .seiminModel_footer__btn {
143
+            height: 100%;
144
+            @include flex(center, center);
145
+            position: relative;
146
+
147
+            &::after {
148
+              content: "";
149
+              height: 86rpx;
150
+              position: absolute;
151
+              width: 1px;
152
+              bottom: 0;
153
+              right: 0;
154
+              background-color: #dde1e5;
155
+            }
139 156
           }
140 157
         }
141 158
       }
142 159
     }
143 160
   }
144
-}
145 161
 </style>

+ 0 - 140
components/uni-section/uni-section.vue

@@ -1,140 +0,0 @@
1
-<template>
2
-	<view class="uni-section">
3
-		<view class="uni-section-header" nvue>
4
-			<view v-if="type" class="uni-section__head">
5
-				<view :class="type" class="uni-section__head-tag"/>
6
-			</view>
7
-			<view class="uni-section__content">
8
-				<text :class="{'distraction':!subTitle}" :style="{color:color}" class="uni-section__content-title">{{ title }}</text>
9
-				<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text>
10
-			</view>
11
-		</view>
12
-		<view :style="{padding: padding ? '10px' : ''}">
13
-			<slot/>
14
-		</view>
15
-	</view>
16
-</template>
17
-
18
-<script>
19
-
20
-	/**
21
-	 * Section 标题栏
22
-	 * @description 标题栏
23
-	 * @property {String} type = [line|circle] 标题装饰类型
24
-	 * 	@value line 竖线
25
-	 * 	@value circle 圆形
26
-	 * @property {String} title 主标题
27
-	 * @property {String} subTitle 副标题
28
-	 */
29
-
30
-	export default {
31
-		name: 'UniSection',
32
-		emits:['click'],
33
-		props: {
34
-			type: {
35
-				type: String,
36
-				default: ''
37
-			},
38
-			title: {
39
-				type: String,
40
-				default: ''
41
-			},
42
-			color:{
43
-				type: String,
44
-				default: '#333'
45
-			},
46
-			subTitle: {
47
-				type: String,
48
-				default: ''
49
-			},
50
-			padding: {
51
-				type: Boolean,
52
-				default: false
53
-			}
54
-		},
55
-		data() {
56
-			return {}
57
-		},
58
-		watch: {
59
-			title(newVal) {
60
-				if (uni.report && newVal !== '') {
61
-					uni.report('title', newVal)
62
-				}
63
-			}
64
-		},
65
-		methods: {
66
-			onClick() {
67
-				this.$emit('click')
68
-			}
69
-		}
70
-	}
71
-</script>
72
-<style lang="scss" >
73
-	$uni-primary: #2979ff !default;
74
-	
75
-	.uni-section {
76
-		background-color: #fff;
77
-		// overflow: hidden;
78
-		margin-top: 10px;
79
-	}
80
-	.uni-section-header {
81
-		position: relative;
82
-		/* #ifndef APP-NVUE */
83
-		display: flex;
84
-		/* #endif */
85
-		flex-direction: row;
86
-		align-items: center;
87
-		padding: 12px 10px;
88
-		// height: 50px;
89
-		font-weight: normal;
90
-	}
91
-	.uni-section__head {
92
-		flex-direction: row;
93
-		justify-content: center;
94
-		align-items: center;
95
-		margin-right: 10px;
96
-	}
97
-
98
-	.line {
99
-		height: 12px;
100
-		background-color: $uni-primary;
101
-		border-radius: 10px;
102
-		width: 4px;
103
-	}
104
-
105
-	.circle {
106
-		width: 8px;
107
-		height: 8px;
108
-		border-top-right-radius: 50px;
109
-		border-top-left-radius: 50px;
110
-		border-bottom-left-radius: 50px;
111
-		border-bottom-right-radius: 50px;
112
-		background-color: $uni-primary;
113
-	}
114
-
115
-	.uni-section__content {
116
-		/* #ifndef APP-NVUE */
117
-		display: flex;
118
-		/* #endif */
119
-		flex-direction: column;
120
-		flex: 1;
121
-		color: #333;
122
-	}
123
-
124
-	.uni-section__content-title {
125
-		font-size: 14px;
126
-		color: $uni-primary;
127
-	}
128
-
129
-	.distraction {
130
-		flex-direction: row;
131
-		align-items: center;
132
-	}
133
-
134
-	.uni-section__content-sub {
135
-		font-size: 12px;
136
-		color: #999;
137
-		line-height: 16px;
138
-		margin-top: 2px;
139
-	}
140
-</style>

+ 6 - 0
filters/index.js

@@ -0,0 +1,6 @@
1
+import Vue from 'vue'
2
+// 首页标本数量过滤
3
+// 数量大于999则显示999+
4
+Vue.filter('specimenNum', function(value) {
5
+  return value > 999 ? '999+' : value;
6
+})

+ 2 - 3
main.js

@@ -3,9 +3,8 @@ import Vue from 'vue'
3 3
 import App from './App'
4 4
 // 引入vuex配置
5 5
 import store from './store'
6
-// 引入自定义全局组件
7
-import seiminModel from './components/seiminModel/seiminModel.vue'
8
-Vue.component('seiminModel', seiminModel)
6
+// 引入自定义过滤器
7
+import './filters';
9 8
 // 引入request配置
10 9
 import {
11 10
   request

+ 15 - 1
package-lock.json

@@ -10,7 +10,8 @@
10 10
       "license": "ISC",
11 11
       "dependencies": {
12 12
         "animate.css": "^4.1.1",
13
-        "crypto-js": "^4.1.1"
13
+        "crypto-js": "^4.1.1",
14
+        "date-fns": "^2.28.0"
14 15
       }
15 16
     },
16 17
     "node_modules/animate.css": {
@@ -22,6 +23,14 @@
22 23
       "version": "4.1.1",
23 24
       "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz",
24 25
       "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
26
+    },
27
+    "node_modules/date-fns": {
28
+      "version": "2.28.0",
29
+      "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-2.28.0.tgz",
30
+      "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==",
31
+      "engines": {
32
+        "node": ">=0.11"
33
+      }
25 34
     }
26 35
   },
27 36
   "dependencies": {
@@ -34,6 +43,11 @@
34 43
       "version": "4.1.1",
35 44
       "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.1.1.tgz",
36 45
       "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
46
+    },
47
+    "date-fns": {
48
+      "version": "2.28.0",
49
+      "resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-2.28.0.tgz",
50
+      "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw=="
37 51
     }
38 52
   }
39 53
 }

+ 2 - 1
package.json

@@ -15,6 +15,7 @@
15 15
   "license": "ISC",
16 16
   "dependencies": {
17 17
     "animate.css": "^4.1.1",
18
-    "crypto-js": "^4.1.1"
18
+    "crypto-js": "^4.1.1",
19
+    "date-fns": "^2.28.0"
19 20
   }
20 21
 }

+ 3 - 1
pages.json

@@ -8,7 +8,9 @@
8 8
     {
9 9
       "path": "pages/index/index",
10 10
       "style": {
11
-        "navigationBarTitleText": "首页"
11
+        "navigationBarTitleText": "首页",
12
+        "navigationBarBackgroundColor": "#49B856",
13
+        "enablePullDownRefresh": true
12 14
       }
13 15
     }
14 16
   ],

+ 454 - 16
pages/index/index.vue

@@ -1,25 +1,463 @@
1 1
 <template>
2
-  <view class="container">
3
-    这是测试的一行文字
4
-    <button type="default" @click="clickHandler()">点击弹窗</button>
2
+  <view class="index">
3
+    <view class="arc_edge"></view>
4
+    <view class="index_container">
5
+      <!-- 头部搜索 -->
6
+      <view class="search">
7
+        <view class="search_wrap">
8
+          <input focus placeholder="请输入标本编码/检查单号/请…" :placeholder-style="placeholderStyle" confirm-type="search" />
9
+          <view class="searchBtn">
10
+            搜索
11
+          </view>
12
+        </view>
13
+        <view class="icon-saoma">
14
+          <text class="pda pda-saoma "></text>
15
+        </view>
16
+      </view>
17
+      <!-- 一键收标本 -->
18
+      <view class="collect_specimens">
19
+        <view class="collect_icon">
20
+          标
21
+        </view>
22
+        <view class="collect_specimensNum">
23
+          <view class="urgent collect_row">
24
+            急标数量<text class="collect_num">{{urgentNum | specimenNum}}</text>
25
+          </view>
26
+          <view class="ordinary collect_row">
27
+            普标数量<text class="collect_num">{{ordinaryNum | specimenNum}}</text>
28
+          </view>
29
+        </view>
30
+        <button class="collect_btn" type="default" @click="collectSpecimens">一键收标本</button>
31
+      </view>
32
+      <!-- 最新工单 -->
33
+      <view class="newOrders">
34
+        <view class="newOrders_header">
35
+          <text class="newOrders_header_title">最新工单</text>
36
+          <text class="newOrders_header_more">更多&gt;&gt;</text>
37
+        </view>
38
+        <view class="newOrders_item" v-for="newOrder in newOrderList" :key="newOrder.id">
39
+          <view class="newOrders_item_time">{{newOrder.showCreateTime}}</view>
40
+          <text
41
+            class="newOrders_item_taskType">{{newOrder.isHalfInspect === 1 ? "半程陪检" : (newOrder.taskType&&newOrder.taskType.taskName)}}</text>
42
+          <text class="newOrders_item_patientName">{{newOrder.patient&&newOrder.patient.patientName}}</text>
43
+          <text class="newOrders_item_status"
44
+            :class="newOrder.stateTextClass">{{newOrder.gdState&&newOrder.gdState.name}}</text>
45
+        </view>
46
+      </view>
47
+      <!-- 快捷工单 -->
48
+      <view class="quick_other">
49
+        <view class="quick_other_header">
50
+          <text class="quick_other_header_title">快捷工单</text>
51
+        </view>
52
+        <view class="quick_other_container">
53
+          <view class="quick_other_container_item" v-for="quickOther in quickOtherList" :key="quickOther.id">
54
+            <view class="quick_other_container_item_text">
55
+              {{quickOther.taskName}}
56
+            </view>
57
+          </view>
58
+        </view>
59
+      </view>
60
+    </view>
61
+    <seiminFooterNav></seiminFooterNav>
5 62
     <seiminModel ref="seiminModel"></seiminModel>
6 63
   </view>
7 64
 </template>
8 65
 
9 66
 <script>
10
-export default {
11
-  data() {
12
-    return {};
13
-  },
14
-  methods: {
15
-    clickHandler() {
16
-      this.$refs.seiminModel.show({
17
-        skin: "toast",
18
-        content: "你还好吗?",
19
-      });
67
+  import {
68
+    mapState,
69
+    mapMutations
70
+  } from 'vuex';
71
+  import {
72
+    reqSpecimenWorkOrderMsg,
73
+    reqWorkOrders,
74
+    reqDeptTaskType
75
+  } from '../../request/api.js';
76
+  import {
77
+    GDSTATE
78
+  } from '../../utils/enum.gdstate.js';
79
+  import {
80
+    ASSOCIATION_TYPES
81
+  } from '../../utils/enum.association_types.js';
82
+  export default {
83
+    data() {
84
+      return {
85
+        placeholderStyle: 'color:#999;font-size:30rpx;',
86
+        urgentNum: 0, //急标数量
87
+        ordinaryNum: 0, //普标数量
88
+        newOrderList: [], //最新工单列表
89
+        quickOtherList: [], //快捷工单列表
90
+      };
20 91
     },
21
-  },
22
-};
92
+    computed: {
93
+      ...mapState('user', ['loginInfo']),
94
+      ...mapState(['isShowSeiminModel']),
95
+    },
96
+    methods: {
97
+      ...mapMutations(['changeSeiminModel']),
98
+      // 获取页面数据
99
+      init() {
100
+        let deptId = this.loginInfo.user && this.loginInfo.user.dept.id;
101
+        Promise.all([
102
+          reqSpecimenWorkOrderMsg({
103
+            deptId
104
+          }),
105
+          reqWorkOrders({
106
+            "workOrder": {
107
+              "createDept": deptId,
108
+              "platform": 2,
109
+              "searchDays": 2,
110
+            },
111
+            "idx": 0,
112
+            "sum": 5
113
+          }),
114
+          reqDeptTaskType({
115
+            deptId
116
+          })
117
+        ]).then(values => {
118
+          uni.hideLoading();
119
+          uni.stopPullDownRefresh();
120
+          this.querySpecimenNum(values[0]);
121
+          this.queryWorkOrders(values[1]);
122
+          this.queryDeptTaskType(values[2]);
123
+        });
124
+      },
125
+      // 查询急标和普标数量
126
+      querySpecimenNum(res) {
127
+        if (res.status == 200) {
128
+          if (res.specimenCount) {
129
+            this.urgentNum = res.specimenCount.urgent;
130
+          }
131
+          if (res.specimenCount) {
132
+            this.ordinaryNum = res.specimenCount.noUrgent;
133
+          }
134
+        }
135
+      },
136
+      // 查询最新工单列表
137
+      queryWorkOrders(res) {
138
+        if (res.status == 200) {
139
+          this.newOrderList = res.list.map(v => {
140
+            if (v.gdState) {
141
+              if (v.gdState.value == GDSTATE['待接单'] || v.gdState.value == GDSTATE['待抢单']) {
142
+                v.stateTextClass = 'red';
143
+              } else if (v.gdState.value == GDSTATE['待评价'] || v.gdState.value == GDSTATE['已完成']) {
144
+                v.stateTextClass = 'green';
145
+              } else {
146
+                v.stateTextClass = 'yellow';
147
+              }
148
+            }
149
+            return v;
150
+          });
151
+        }
152
+      },
153
+      // 查询快捷工单(其他临床服务任务类型)
154
+      queryDeptTaskType(res) {
155
+        if (res.status == 200) {
156
+          this.quickOtherList = res.data.allTaskTypes.filter(v => v.associationType.value == ASSOCIATION_TYPES[
157
+            '其他临床服务']);
158
+        }
159
+      },
160
+      // 一键收取标本
161
+      collectSpecimens() {
162
+
163
+      },
164
+      // 切换科室弹窗
165
+      showDeptModel() {
166
+        const {
167
+          user //当前登录用户
168
+        } = this.loginInfo;
169
+        const userDept = (user && user.dept) ? user.dept.dept : '';
170
+        this.$refs.seiminModel.show({
171
+          content: `您当前所属科室为<text class="green">${userDept}</text>,如与您实际科室不符点击<text class="red">切换科室</text>。`,
172
+          btns: [{
173
+              name: "知道了",
174
+              textColor: "#49B856",
175
+              flex: 2,
176
+            },
177
+            {
178
+              name: "前往切换科室",
179
+              textColor: "#666",
180
+              flex: 3,
181
+              click: (e) => {
182
+                console.log('切换科室');
183
+              }
184
+            },
185
+          ]
186
+        });
187
+      },
188
+    },
189
+    mounted() {
190
+      if (this.isShowSeiminModel) {
191
+        this.showDeptModel();
192
+        this.changeSeiminModel(false);
193
+      }
194
+      uni.showLoading({
195
+        title: '加载中',
196
+        mask: true
197
+      })
198
+      this.init();
199
+    },
200
+    onPullDownRefresh() {
201
+      this.init();
202
+    }
203
+  };
23 204
 </script>
24 205
 
25
-<style></style>
206
+<style lang="scss" scoped>
207
+  .index {
208
+    padding-bottom: 108rpx;
209
+
210
+    // 弧形背景
211
+    .arc_edge {
212
+      @include arc_edge;
213
+    }
214
+
215
+    .index_container {
216
+      padding: 0 24rpx;
217
+      position: relative;
218
+      z-index: 2;
219
+
220
+      // 搜素框
221
+      .search {
222
+        height: 66rpx;
223
+        margin-top: -200rpx;
224
+        @include flex(space-between, center);
225
+
226
+        .search_wrap {
227
+          width: 600rpx;
228
+          height: 100%;
229
+          border-radius: 33rpx;
230
+          background-color: #fff;
231
+          position: relative;
232
+
233
+          input {
234
+            height: 100%;
235
+            padding-left: 33rpx;
236
+            padding-right: 147rpx;
237
+          }
238
+
239
+          .searchBtn {
240
+            position: absolute;
241
+            right: 0;
242
+            top: 50%;
243
+            transform: translateY(-50%);
244
+            line-height: 1em;
245
+            color: #666;
246
+            font-size: 32rpx;
247
+            width: 110rpx;
248
+            text-align: center;
249
+            border-left: 2rpx solid #E5E9ED;
250
+            padding: 6rpx 0;
251
+          }
252
+        }
253
+
254
+        .icon-saoma {
255
+          width: 66rpx;
256
+          height: 66rpx;
257
+          background-color: #BEE1A7;
258
+          border-radius: 50%;
259
+          color: $defaultColor;
260
+          @include flex(center, center);
261
+        }
262
+      }
263
+
264
+      // 一键收标本
265
+      .collect_specimens {
266
+        width: 702rpx;
267
+        height: 176rpx;
268
+        background-color: #fff;
269
+        margin-top: 24rpx;
270
+        border-radius: 8rpx;
271
+        // box-shadow: 0 0 7rpx 0 rgba(73, 184, 86, 0.09);
272
+        border: 1px solid #E5E9ED;
273
+        position: relative;
274
+        @include flex(center, center);
275
+        @include semicircle(#fff);
276
+
277
+        .collect_icon {
278
+          width: 48rpx;
279
+          height: 48rpx;
280
+          border-radius: 50%;
281
+          background-color: rgba(57, 177, 153, 0.3);
282
+          border: 1px solid #39B199;
283
+          font-size: 24rpx;
284
+          color: #39B199;
285
+          @include flex(center, center);
286
+        }
287
+
288
+        .collect_specimensNum {
289
+          margin: 0 35rpx;
290
+          width: 277rpx;
291
+          font-size: 34rpx;
292
+          color: #666;
293
+
294
+          .collect_num {
295
+            font-size: 46rpx;
296
+            font-weight: 600;
297
+            color: #333;
298
+            margin-left: 16rpx;
299
+          }
300
+
301
+          .collect_row {
302
+            height: 88rpx;
303
+            @include flex(flex-start, center);
304
+            border-bottom: 1px dashed #E5E9ED;
305
+
306
+            &:last-of-type {
307
+              border-bottom: none;
308
+            }
309
+          }
310
+        }
311
+
312
+        .collect_btn {
313
+          margin: 0;
314
+          height: 88rpx;
315
+          background: linear-gradient(90deg, #74C271 0%, #39B199 100%);
316
+          border-radius: 56rpx;
317
+          color: #fff;
318
+          font-size: 32rpx;
319
+          line-height: 88rpx;
320
+        }
321
+      }
322
+
323
+      // 最新工单
324
+      .newOrders {
325
+        width: 702rpx;
326
+        min-height: 530rpx;
327
+        background-color: #fff;
328
+        margin-top: 8rpx;
329
+        border-radius: 8rpx;
330
+        // box-shadow: 0 0 7rpx 0 rgba(73, 184, 86, 0.09);
331
+        border: 1px solid #E5E9ED;
332
+        position: relative;
333
+        padding: 0 15rpx;
334
+        font-size: 32rpx;
335
+        @include semicircle(#f9fafb, 70rpx);
336
+
337
+        .newOrders_header {
338
+          height: 87rpx;
339
+          padding: 0 27rpx;
340
+          border-bottom: 1px dashed #E5E9ED;
341
+          @include flex(space-between, center);
342
+
343
+          .newOrders_header_title {
344
+            color: #333;
345
+          }
346
+
347
+          .newOrders_header_more {
348
+            color: #666;
349
+          }
350
+        }
351
+
352
+        .newOrders_item {
353
+          height: 88rpx;
354
+          padding: 0 27rpx;
355
+          border-bottom: 1px solid #E5E9ED;
356
+          color: #333;
357
+          font-size: 30rpx;
358
+          @include flex(center, center);
359
+
360
+          &:last-of-type {
361
+            border-bottom: none;
362
+          }
363
+
364
+          .newOrders_item_time {
365
+            width: 140rpx;
366
+          }
367
+
368
+          .newOrders_item_taskType {
369
+            flex: 1;
370
+            margin-left: 16rpx;
371
+            @include clamp(1);
372
+          }
373
+
374
+          .newOrders_item_patientName {
375
+            margin-left: 16rpx;
376
+            margin-right: 16rpx;
377
+            width: 148rpx;
378
+            @include clamp(1);
379
+          }
380
+
381
+          .newOrders_item_status {}
382
+        }
383
+      }
384
+
385
+      // 快捷工单
386
+      .quick_other {
387
+        width: 702rpx;
388
+        background-color: #fff;
389
+        margin-top: 8rpx;
390
+        border-radius: 8rpx;
391
+        // box-shadow: 0 0 7rpx 0 rgba(73, 184, 86, 0.09);
392
+        border: 1px solid #E5E9ED;
393
+        position: relative;
394
+        padding: 0 15rpx;
395
+        font-size: 32rpx;
396
+        @include semicircle(#f9fafb, 70rpx);
397
+
398
+        .quick_other_header {
399
+          height: 87rpx;
400
+          padding: 0 27rpx;
401
+          border-bottom: 1px dashed #E5E9ED;
402
+          @include flex(space-between, center);
403
+
404
+          .quick_other_header_title {
405
+            color: #333;
406
+          }
407
+        }
408
+
409
+        .quick_other_container {
410
+          min-height: 288rpx;
411
+          @include flex(flex-start, center);
412
+          flex-wrap: wrap;
413
+          font-size: 28rpx;
414
+
415
+          .quick_other_container_item {
416
+            width: 96rpx;
417
+            height: 96rpx;
418
+            border-radius: 8rpx;
419
+            margin: 16rpx 35rpx;
420
+            color: #fff;
421
+            text-align: center;
422
+
423
+            @include flex(center, center) .quick_other_container_item_text {
424
+              @include clamp(2);
425
+            }
426
+
427
+            &:nth-of-type(8n+1) {
428
+              background-color: #A4C4C1;
429
+            }
430
+
431
+            &:nth-of-type(8n+2) {
432
+              background-color: #56BAB6;
433
+            }
434
+
435
+            &:nth-of-type(8n+3) {
436
+              background-color: #39B199;
437
+            }
438
+
439
+            &:nth-of-type(8n+4) {
440
+              background-color: #48717F;
441
+            }
442
+
443
+            &:nth-of-type(8n+5) {
444
+              background-color: #56BAB6;
445
+            }
446
+
447
+            &:nth-of-type(8n+6) {
448
+              background-color: #A4C4C1;
449
+            }
450
+
451
+            &:nth-of-type(8n+7) {
452
+              background-color: #48717F;
453
+            }
454
+
455
+            &:nth-of-type(8n+8) {
456
+              background-color: #8E9D9E;
457
+            }
458
+          }
459
+        }
460
+      }
461
+    }
462
+  }
463
+</style>

+ 16 - 16
pages/login/login.vue

@@ -31,26 +31,28 @@
31 31
   import {
32 32
     encryptByEnAES,
33 33
     encryptByDeAES
34
-  } from '../../utils/index.js'
34
+  } from "../../utils/index.js";
35 35
   import {
36
-    mapActions
36
+    mapActions,
37
+    mapMutations
37 38
   } from "vuex";
38 39
   export default {
39 40
     data() {
40 41
       return {
41
-        username: '', //用户名
42
-        password: '', //密码
42
+        username: "", //用户名
43
+        password: "", //密码
43 44
         savePassword: false, //是否记住密码
44 45
       };
45 46
     },
46 47
     methods: {
47 48
       ...mapActions("user", ["vxLogin"]),
49
+      ...mapMutations(['changeSeiminModel']),
48 50
       // 登录
49 51
       login(e) {
50 52
         let {
51 53
           username, //账号
52 54
           password, //密码
53
-          savePassword //是否记住密码
55
+          savePassword, //是否记住密码
54 56
         } = e.detail.value;
55 57
 
56 58
         savePassword = savePassword.length > 0;
@@ -74,7 +76,7 @@
74 76
         let postData = {
75 77
           username,
76 78
           password,
77
-          type: 'APP'
79
+          type: "APP",
78 80
         };
79 81
 
80 82
         this.vxLogin(postData).then((res) => {
@@ -99,15 +101,15 @@
99 101
                 username: encryptByEnAES(username), //用户名
100 102
                 password: encryptByEnAES(password), //密码
101 103
                 effectiveDuration: Date.now(), //当前时间戳
102
-              })
104
+              });
103 105
             } else {
104
-              uni.removeStorageSync('savePasswordObj');
106
+              uni.removeStorageSync("savePasswordObj");
105 107
             }
106
-            // 跳转到首页
108
+            // 跳转到首页(isShowSeiminModel,是否显示切换科室弹窗)
107 109
             uni.navigateTo({
108
-              url: '../index/index'
109
-            })
110
-
110
+              url: "/pages/index/index"
111
+            });
112
+            this.changeSeiminModel(true);
111 113
           } else {
112 114
             uni.showToast({
113 115
               icon: "none",
@@ -121,7 +123,6 @@
121 123
       // 是否记住密码
122 124
       let savePasswordObj = uni.getStorageSync("savePasswordObj");
123 125
       if (savePasswordObj) {
124
-        console.log(savePasswordObj);
125 126
         let {
126 127
           username,
127 128
           password,
@@ -134,9 +135,8 @@
134 135
           this.savePassword = true;
135 136
         }
136 137
       }
137
-
138
-    }
139
-  }
138
+    },
139
+  };
140 140
 </script>
141 141
 
142 142
 <style lang="scss" scoped>

+ 43 - 0
request/api.js

@@ -0,0 +1,43 @@
1
+import {
2
+  request
3
+} from "./index.js";
4
+
5
+// 数据字典查询
6
+// export const reqDictionary = (postData) =>
7
+//   request({
8
+//     url: "/common/common/getDictionary",
9
+//     data: postData,
10
+//     method: 'POST'
11
+//   });
12
+
13
+// 用户登录接口
14
+export const reqLogin = (postData) =>
15
+  request({
16
+    url: "/auth/login",
17
+    data: postData,
18
+    method: 'POST'
19
+  });
20
+
21
+// 首页查看急标和普标数量
22
+export const reqSpecimenWorkOrderMsg = (postData) =>
23
+  request({
24
+    url: "/nurse/getSpecimenWorkOrderMsg",
25
+    data: postData,
26
+    method: 'POST'
27
+  });
28
+
29
+// 首页最新工单列表
30
+export const reqWorkOrders = (postData) =>
31
+  request({
32
+    url: "/nurse/fetchDataList/workOrder",
33
+    data: postData,
34
+    method: 'POST'
35
+  });
36
+
37
+// 首页快捷工单(其他临床服务任务类型)
38
+export const reqDeptTaskType = (postData) =>
39
+  request({
40
+    url: "/nurse/getDeptTaskType",
41
+    data: postData,
42
+    method: 'POST'
43
+  });

+ 45 - 0
request/auth.js

@@ -0,0 +1,45 @@
1
+// 引入vuex配置
2
+import store from '../store'
3
+// 页面白名单
4
+const whiteList = []
5
+
6
+
7
+function hasPermission(url) {
8
+  // 在白名单中或有token,直接跳转
9
+  if (whiteList.indexOf(url) !== -1 || store.state.user.loginInfo) {
10
+    return true
11
+  }
12
+  return false
13
+}
14
+
15
+uni.addInterceptor('navigateTo', {
16
+  // 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
17
+  invoke(e) {
18
+    if (!hasPermission(e.url)) {
19
+      uni.reLaunch({
20
+        url: '/pages/login/login'
21
+      })
22
+      return false
23
+    }
24
+    return true
25
+  },
26
+  success(e) {
27
+    // console.log(e)
28
+  }
29
+})
30
+
31
+uni.addInterceptor('switchTab', {
32
+  // tabbar页面跳转前进行拦截
33
+  invoke(e) {
34
+    if (!hasPermission(e.url)) {
35
+      uni.reLaunch({
36
+        url: '/pages/login/login'
37
+      })
38
+      return false
39
+    }
40
+    return true
41
+  },
42
+  success(e) {
43
+    // console.log(e)
44
+  }
45
+})

+ 1 - 1
request/config.js

@@ -11,7 +11,7 @@ const config = {
11 11
 };
12 12
 // 后端服务地址
13 13
 const baseUrls = {
14
-  development: "http://192.168.3.108/service", //开发环境
14
+  development: "http://localhost/service", //开发环境
15 15
   production: "http://192.168.3.108/service", //生产环境
16 16
 };
17 17
 config.baseUrl = baseUrls[process.env.NODE_ENV];

+ 9 - 3
request/index.js

@@ -6,6 +6,8 @@
6 6
  * @Description:后端服务入口文件
7 7
  */
8 8
 import config from "./config.js";
9
+import "./auth.js";
10
+import "./interceptor.js";
9 11
 /**
10 12
  * @description:封装请求函数
11 13
  * @param {string} url 接口地址,以”/“开头
@@ -15,7 +17,12 @@ import config from "./config.js";
15 17
  * @return {promise}
16 18
  * @author: 廖明明
17 19
  */
18
-export function request({ url = "", data = {}, method = "GET", header = {} }) {
20
+export function request({
21
+  url = "",
22
+  data = {},
23
+  method = "GET",
24
+  header = {}
25
+}) {
19 26
   return new Promise((resolve) => {
20 27
     uni.request({
21 28
       method,
@@ -24,11 +31,10 @@ export function request({ url = "", data = {}, method = "GET", header = {} }) {
24 31
       header,
25 32
       dataType: "json",
26 33
       success(res) {
27
-        console.log(res);
28 34
         resolve(res.data);
29 35
       },
30 36
       fail(err) {
31
-        console.log(err);
37
+        uni.hideLoading();
32 38
         uni.showToast({
33 39
           icon: "none",
34 40
           title: "请求失败!",

+ 21 - 0
request/interceptor.js

@@ -0,0 +1,21 @@
1
+uni.addInterceptor('request', {
2
+  invoke(args) {
3
+    // request 触发前
4
+    // console.log(args)
5
+  },
6
+  success(args) {
7
+    // 请求成功后
8
+    // console.log(args);
9
+    if (args.data == 520) {
10
+      uni.navigateTo({
11
+        url: '/pages/login/login'
12
+      })
13
+    }
14
+  },
15
+  fail(err) {
16
+    // console.log('interceptor-fail', err)
17
+  },
18
+  complete(res) {
19
+    // console.log('interceptor-complete', res)
20
+  }
21
+})

+ 0 - 10
request/user.js

@@ -1,10 +0,0 @@
1
-import {
2
-  request
3
-} from "./index.js";
4
-// 测试接口
5
-export const reqLogin = (postData) =>
6
-  request({
7
-    url: "/auth/login",
8
-    data: postData,
9
-    method: 'POST'
10
-  });

+ 539 - 0
static/fonts/demo.css

@@ -0,0 +1,539 @@
1
+/* Logo 字体 */
2
+@font-face {
3
+  font-family: "iconfont logo";
4
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
5
+  src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
6
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
7
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
8
+    url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
9
+}
10
+
11
+.logo {
12
+  font-family: "iconfont logo";
13
+  font-size: 160px;
14
+  font-style: normal;
15
+  -webkit-font-smoothing: antialiased;
16
+  -moz-osx-font-smoothing: grayscale;
17
+}
18
+
19
+/* tabs */
20
+.nav-tabs {
21
+  position: relative;
22
+}
23
+
24
+.nav-tabs .nav-more {
25
+  position: absolute;
26
+  right: 0;
27
+  bottom: 0;
28
+  height: 42px;
29
+  line-height: 42px;
30
+  color: #666;
31
+}
32
+
33
+#tabs {
34
+  border-bottom: 1px solid #eee;
35
+}
36
+
37
+#tabs li {
38
+  cursor: pointer;
39
+  width: 100px;
40
+  height: 40px;
41
+  line-height: 40px;
42
+  text-align: center;
43
+  font-size: 16px;
44
+  border-bottom: 2px solid transparent;
45
+  position: relative;
46
+  z-index: 1;
47
+  margin-bottom: -1px;
48
+  color: #666;
49
+}
50
+
51
+
52
+#tabs .active {
53
+  border-bottom-color: #f00;
54
+  color: #222;
55
+}
56
+
57
+.tab-container .content {
58
+  display: none;
59
+}
60
+
61
+/* 页面布局 */
62
+.main {
63
+  padding: 30px 100px;
64
+  width: 960px;
65
+  margin: 0 auto;
66
+}
67
+
68
+.main .logo {
69
+  color: #333;
70
+  text-align: left;
71
+  margin-bottom: 30px;
72
+  line-height: 1;
73
+  height: 110px;
74
+  margin-top: -50px;
75
+  overflow: hidden;
76
+  *zoom: 1;
77
+}
78
+
79
+.main .logo a {
80
+  font-size: 160px;
81
+  color: #333;
82
+}
83
+
84
+.helps {
85
+  margin-top: 40px;
86
+}
87
+
88
+.helps pre {
89
+  padding: 20px;
90
+  margin: 10px 0;
91
+  border: solid 1px #e7e1cd;
92
+  background-color: #fffdef;
93
+  overflow: auto;
94
+}
95
+
96
+.icon_lists {
97
+  width: 100% !important;
98
+  overflow: hidden;
99
+  *zoom: 1;
100
+}
101
+
102
+.icon_lists li {
103
+  width: 100px;
104
+  margin-bottom: 10px;
105
+  margin-right: 20px;
106
+  text-align: center;
107
+  list-style: none !important;
108
+  cursor: default;
109
+}
110
+
111
+.icon_lists li .code-name {
112
+  line-height: 1.2;
113
+}
114
+
115
+.icon_lists .icon {
116
+  display: block;
117
+  height: 100px;
118
+  line-height: 100px;
119
+  font-size: 42px;
120
+  margin: 10px auto;
121
+  color: #333;
122
+  -webkit-transition: font-size 0.25s linear, width 0.25s linear;
123
+  -moz-transition: font-size 0.25s linear, width 0.25s linear;
124
+  transition: font-size 0.25s linear, width 0.25s linear;
125
+}
126
+
127
+.icon_lists .icon:hover {
128
+  font-size: 100px;
129
+}
130
+
131
+.icon_lists .svg-icon {
132
+  /* 通过设置 font-size 来改变图标大小 */
133
+  width: 1em;
134
+  /* 图标和文字相邻时,垂直对齐 */
135
+  vertical-align: -0.15em;
136
+  /* 通过设置 color 来改变 SVG 的颜色/fill */
137
+  fill: currentColor;
138
+  /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
139
+      normalize.css 中也包含这行 */
140
+  overflow: hidden;
141
+}
142
+
143
+.icon_lists li .name,
144
+.icon_lists li .code-name {
145
+  color: #666;
146
+}
147
+
148
+/* markdown 样式 */
149
+.markdown {
150
+  color: #666;
151
+  font-size: 14px;
152
+  line-height: 1.8;
153
+}
154
+
155
+.highlight {
156
+  line-height: 1.5;
157
+}
158
+
159
+.markdown img {
160
+  vertical-align: middle;
161
+  max-width: 100%;
162
+}
163
+
164
+.markdown h1 {
165
+  color: #404040;
166
+  font-weight: 500;
167
+  line-height: 40px;
168
+  margin-bottom: 24px;
169
+}
170
+
171
+.markdown h2,
172
+.markdown h3,
173
+.markdown h4,
174
+.markdown h5,
175
+.markdown h6 {
176
+  color: #404040;
177
+  margin: 1.6em 0 0.6em 0;
178
+  font-weight: 500;
179
+  clear: both;
180
+}
181
+
182
+.markdown h1 {
183
+  font-size: 28px;
184
+}
185
+
186
+.markdown h2 {
187
+  font-size: 22px;
188
+}
189
+
190
+.markdown h3 {
191
+  font-size: 16px;
192
+}
193
+
194
+.markdown h4 {
195
+  font-size: 14px;
196
+}
197
+
198
+.markdown h5 {
199
+  font-size: 12px;
200
+}
201
+
202
+.markdown h6 {
203
+  font-size: 12px;
204
+}
205
+
206
+.markdown hr {
207
+  height: 1px;
208
+  border: 0;
209
+  background: #e9e9e9;
210
+  margin: 16px 0;
211
+  clear: both;
212
+}
213
+
214
+.markdown p {
215
+  margin: 1em 0;
216
+}
217
+
218
+.markdown>p,
219
+.markdown>blockquote,
220
+.markdown>.highlight,
221
+.markdown>ol,
222
+.markdown>ul {
223
+  width: 80%;
224
+}
225
+
226
+.markdown ul>li {
227
+  list-style: circle;
228
+}
229
+
230
+.markdown>ul li,
231
+.markdown blockquote ul>li {
232
+  margin-left: 20px;
233
+  padding-left: 4px;
234
+}
235
+
236
+.markdown>ul li p,
237
+.markdown>ol li p {
238
+  margin: 0.6em 0;
239
+}
240
+
241
+.markdown ol>li {
242
+  list-style: decimal;
243
+}
244
+
245
+.markdown>ol li,
246
+.markdown blockquote ol>li {
247
+  margin-left: 20px;
248
+  padding-left: 4px;
249
+}
250
+
251
+.markdown code {
252
+  margin: 0 3px;
253
+  padding: 0 5px;
254
+  background: #eee;
255
+  border-radius: 3px;
256
+}
257
+
258
+.markdown strong,
259
+.markdown b {
260
+  font-weight: 600;
261
+}
262
+
263
+.markdown>table {
264
+  border-collapse: collapse;
265
+  border-spacing: 0px;
266
+  empty-cells: show;
267
+  border: 1px solid #e9e9e9;
268
+  width: 95%;
269
+  margin-bottom: 24px;
270
+}
271
+
272
+.markdown>table th {
273
+  white-space: nowrap;
274
+  color: #333;
275
+  font-weight: 600;
276
+}
277
+
278
+.markdown>table th,
279
+.markdown>table td {
280
+  border: 1px solid #e9e9e9;
281
+  padding: 8px 16px;
282
+  text-align: left;
283
+}
284
+
285
+.markdown>table th {
286
+  background: #F7F7F7;
287
+}
288
+
289
+.markdown blockquote {
290
+  font-size: 90%;
291
+  color: #999;
292
+  border-left: 4px solid #e9e9e9;
293
+  padding-left: 0.8em;
294
+  margin: 1em 0;
295
+}
296
+
297
+.markdown blockquote p {
298
+  margin: 0;
299
+}
300
+
301
+.markdown .anchor {
302
+  opacity: 0;
303
+  transition: opacity 0.3s ease;
304
+  margin-left: 8px;
305
+}
306
+
307
+.markdown .waiting {
308
+  color: #ccc;
309
+}
310
+
311
+.markdown h1:hover .anchor,
312
+.markdown h2:hover .anchor,
313
+.markdown h3:hover .anchor,
314
+.markdown h4:hover .anchor,
315
+.markdown h5:hover .anchor,
316
+.markdown h6:hover .anchor {
317
+  opacity: 1;
318
+  display: inline-block;
319
+}
320
+
321
+.markdown>br,
322
+.markdown>p>br {
323
+  clear: both;
324
+}
325
+
326
+
327
+.hljs {
328
+  display: block;
329
+  background: white;
330
+  padding: 0.5em;
331
+  color: #333333;
332
+  overflow-x: auto;
333
+}
334
+
335
+.hljs-comment,
336
+.hljs-meta {
337
+  color: #969896;
338
+}
339
+
340
+.hljs-string,
341
+.hljs-variable,
342
+.hljs-template-variable,
343
+.hljs-strong,
344
+.hljs-emphasis,
345
+.hljs-quote {
346
+  color: #df5000;
347
+}
348
+
349
+.hljs-keyword,
350
+.hljs-selector-tag,
351
+.hljs-type {
352
+  color: #a71d5d;
353
+}
354
+
355
+.hljs-literal,
356
+.hljs-symbol,
357
+.hljs-bullet,
358
+.hljs-attribute {
359
+  color: #0086b3;
360
+}
361
+
362
+.hljs-section,
363
+.hljs-name {
364
+  color: #63a35c;
365
+}
366
+
367
+.hljs-tag {
368
+  color: #333333;
369
+}
370
+
371
+.hljs-title,
372
+.hljs-attr,
373
+.hljs-selector-id,
374
+.hljs-selector-class,
375
+.hljs-selector-attr,
376
+.hljs-selector-pseudo {
377
+  color: #795da3;
378
+}
379
+
380
+.hljs-addition {
381
+  color: #55a532;
382
+  background-color: #eaffea;
383
+}
384
+
385
+.hljs-deletion {
386
+  color: #bd2c00;
387
+  background-color: #ffecec;
388
+}
389
+
390
+.hljs-link {
391
+  text-decoration: underline;
392
+}
393
+
394
+/* 代码高亮 */
395
+/* PrismJS 1.15.0
396
+https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
397
+/**
398
+ * prism.js default theme for JavaScript, CSS and HTML
399
+ * Based on dabblet (http://dabblet.com)
400
+ * @author Lea Verou
401
+ */
402
+code[class*="language-"],
403
+pre[class*="language-"] {
404
+  color: black;
405
+  background: none;
406
+  text-shadow: 0 1px white;
407
+  font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
408
+  text-align: left;
409
+  white-space: pre;
410
+  word-spacing: normal;
411
+  word-break: normal;
412
+  word-wrap: normal;
413
+  line-height: 1.5;
414
+
415
+  -moz-tab-size: 4;
416
+  -o-tab-size: 4;
417
+  tab-size: 4;
418
+
419
+  -webkit-hyphens: none;
420
+  -moz-hyphens: none;
421
+  -ms-hyphens: none;
422
+  hyphens: none;
423
+}
424
+
425
+pre[class*="language-"]::-moz-selection,
426
+pre[class*="language-"] ::-moz-selection,
427
+code[class*="language-"]::-moz-selection,
428
+code[class*="language-"] ::-moz-selection {
429
+  text-shadow: none;
430
+  background: #b3d4fc;
431
+}
432
+
433
+pre[class*="language-"]::selection,
434
+pre[class*="language-"] ::selection,
435
+code[class*="language-"]::selection,
436
+code[class*="language-"] ::selection {
437
+  text-shadow: none;
438
+  background: #b3d4fc;
439
+}
440
+
441
+@media print {
442
+
443
+  code[class*="language-"],
444
+  pre[class*="language-"] {
445
+    text-shadow: none;
446
+  }
447
+}
448
+
449
+/* Code blocks */
450
+pre[class*="language-"] {
451
+  padding: 1em;
452
+  margin: .5em 0;
453
+  overflow: auto;
454
+}
455
+
456
+:not(pre)>code[class*="language-"],
457
+pre[class*="language-"] {
458
+  background: #f5f2f0;
459
+}
460
+
461
+/* Inline code */
462
+:not(pre)>code[class*="language-"] {
463
+  padding: .1em;
464
+  border-radius: .3em;
465
+  white-space: normal;
466
+}
467
+
468
+.token.comment,
469
+.token.prolog,
470
+.token.doctype,
471
+.token.cdata {
472
+  color: slategray;
473
+}
474
+
475
+.token.punctuation {
476
+  color: #999;
477
+}
478
+
479
+.namespace {
480
+  opacity: .7;
481
+}
482
+
483
+.token.property,
484
+.token.tag,
485
+.token.boolean,
486
+.token.number,
487
+.token.constant,
488
+.token.symbol,
489
+.token.deleted {
490
+  color: #905;
491
+}
492
+
493
+.token.selector,
494
+.token.attr-name,
495
+.token.string,
496
+.token.char,
497
+.token.builtin,
498
+.token.inserted {
499
+  color: #690;
500
+}
501
+
502
+.token.operator,
503
+.token.entity,
504
+.token.url,
505
+.language-css .token.string,
506
+.style .token.string {
507
+  color: #9a6e3a;
508
+  background: hsla(0, 0%, 100%, .5);
509
+}
510
+
511
+.token.atrule,
512
+.token.attr-value,
513
+.token.keyword {
514
+  color: #07a;
515
+}
516
+
517
+.token.function,
518
+.token.class-name {
519
+  color: #DD4A68;
520
+}
521
+
522
+.token.regex,
523
+.token.important,
524
+.token.variable {
525
+  color: #e90;
526
+}
527
+
528
+.token.important,
529
+.token.bold {
530
+  font-weight: bold;
531
+}
532
+
533
+.token.italic {
534
+  font-style: italic;
535
+}
536
+
537
+.token.entity {
538
+  cursor: help;
539
+}

+ 326 - 0
static/fonts/demo_index.html

@@ -0,0 +1,326 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta charset="utf-8"/>
5
+  <title>iconfont Demo</title>
6
+  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
7
+  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/>
8
+  <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
9
+  <link rel="stylesheet" href="demo.css">
10
+  <link rel="stylesheet" href="iconfont.css">
11
+  <script src="iconfont.js"></script>
12
+  <!-- jQuery -->
13
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
14
+  <!-- 代码高亮 -->
15
+  <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
16
+  <style>
17
+    .main .logo {
18
+      margin-top: 0;
19
+      height: auto;
20
+    }
21
+
22
+    .main .logo a {
23
+      display: flex;
24
+      align-items: center;
25
+    }
26
+
27
+    .main .logo .sub-title {
28
+      margin-left: 0.5em;
29
+      font-size: 22px;
30
+      color: #fff;
31
+      background: linear-gradient(-45deg, #3967FF, #B500FE);
32
+      -webkit-background-clip: text;
33
+      -webkit-text-fill-color: transparent;
34
+    }
35
+  </style>
36
+</head>
37
+<body>
38
+  <div class="main">
39
+    <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
40
+      <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
41
+      
42
+    </a></h1>
43
+    <div class="nav-tabs">
44
+      <ul id="tabs" class="dib-box">
45
+        <li class="dib active"><span>Unicode</span></li>
46
+        <li class="dib"><span>Font class</span></li>
47
+        <li class="dib"><span>Symbol</span></li>
48
+      </ul>
49
+      
50
+      <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=3307922" target="_blank" class="nav-more">查看项目</a>
51
+      
52
+    </div>
53
+    <div class="tab-container">
54
+      <div class="content unicode" style="display: block;">
55
+          <ul class="icon_lists dib-box">
56
+          
57
+            <li class="dib">
58
+              <span class="icon pda">&#xe613;</span>
59
+                <div class="name">首页</div>
60
+                <div class="code-name">&amp;#xe613;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon pda">&#xe615;</span>
65
+                <div class="name">我的</div>
66
+                <div class="code-name">&amp;#xe615;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon pda">&#xe610;</span>
71
+                <div class="name">我的患者</div>
72
+                <div class="code-name">&amp;#xe610;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
76
+              <span class="icon pda">&#xe667;</span>
77
+                <div class="name">工单 </div>
78
+                <div class="code-name">&amp;#xe667;</div>
79
+              </li>
80
+          
81
+            <li class="dib">
82
+              <span class="icon pda">&#xe608;</span>
83
+                <div class="name">二维码</div>
84
+                <div class="code-name">&amp;#xe608;</div>
85
+              </li>
86
+          
87
+            <li class="dib">
88
+              <span class="icon pda">&#xe660;</span>
89
+                <div class="name">扫一扫</div>
90
+                <div class="code-name">&amp;#xe660;</div>
91
+              </li>
92
+          
93
+          </ul>
94
+          <div class="article markdown">
95
+          <h2 id="unicode-">Unicode 引用</h2>
96
+          <hr>
97
+
98
+          <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
99
+          <ul>
100
+            <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
101
+            <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
102
+          </ul>
103
+          <blockquote>
104
+            <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
105
+          </blockquote>
106
+          <p>Unicode 使用步骤如下:</p>
107
+          <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
108
+<pre><code class="language-css"
109
+>@font-face {
110
+  font-family: 'pda';
111
+  src: url('iconfont.woff2?t=1649313043379') format('woff2'),
112
+       url('iconfont.woff?t=1649313043379') format('woff'),
113
+       url('iconfont.ttf?t=1649313043379') format('truetype');
114
+}
115
+</code></pre>
116
+          <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
117
+<pre><code class="language-css"
118
+>.pda {
119
+  font-family: "pda" !important;
120
+  font-size: 16px;
121
+  font-style: normal;
122
+  -webkit-font-smoothing: antialiased;
123
+  -moz-osx-font-smoothing: grayscale;
124
+}
125
+</code></pre>
126
+          <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
127
+<pre>
128
+<code class="language-html"
129
+>&lt;span class="pda"&gt;&amp;#x33;&lt;/span&gt;
130
+</code></pre>
131
+          <blockquote>
132
+            <p>"pda" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
133
+          </blockquote>
134
+          </div>
135
+      </div>
136
+      <div class="content font-class">
137
+        <ul class="icon_lists dib-box">
138
+          
139
+          <li class="dib">
140
+            <span class="icon pda pda-shouye2"></span>
141
+            <div class="name">
142
+              首页
143
+            </div>
144
+            <div class="code-name">.pda-shouye2
145
+            </div>
146
+          </li>
147
+          
148
+          <li class="dib">
149
+            <span class="icon pda pda-shouye3"></span>
150
+            <div class="name">
151
+              我的
152
+            </div>
153
+            <div class="code-name">.pda-shouye3
154
+            </div>
155
+          </li>
156
+          
157
+          <li class="dib">
158
+            <span class="icon pda pda-wodehuanzhe"></span>
159
+            <div class="name">
160
+              我的患者
161
+            </div>
162
+            <div class="code-name">.pda-wodehuanzhe
163
+            </div>
164
+          </li>
165
+          
166
+          <li class="dib">
167
+            <span class="icon pda pda-gongdan"></span>
168
+            <div class="name">
169
+              工单 
170
+            </div>
171
+            <div class="code-name">.pda-gongdan
172
+            </div>
173
+          </li>
174
+          
175
+          <li class="dib">
176
+            <span class="icon pda pda-ziyuan91"></span>
177
+            <div class="name">
178
+              二维码
179
+            </div>
180
+            <div class="code-name">.pda-ziyuan91
181
+            </div>
182
+          </li>
183
+          
184
+          <li class="dib">
185
+            <span class="icon pda pda-saoma"></span>
186
+            <div class="name">
187
+              扫一扫
188
+            </div>
189
+            <div class="code-name">.pda-saoma
190
+            </div>
191
+          </li>
192
+          
193
+        </ul>
194
+        <div class="article markdown">
195
+        <h2 id="font-class-">font-class 引用</h2>
196
+        <hr>
197
+
198
+        <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
199
+        <p>与 Unicode 使用方式相比,具有如下特点:</p>
200
+        <ul>
201
+          <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
202
+          <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
203
+        </ul>
204
+        <p>使用步骤如下:</p>
205
+        <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
206
+<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
207
+</code></pre>
208
+        <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
209
+<pre><code class="language-html">&lt;span class="pda pda-xxx"&gt;&lt;/span&gt;
210
+</code></pre>
211
+        <blockquote>
212
+          <p>"
213
+            pda" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
214
+        </blockquote>
215
+      </div>
216
+      </div>
217
+      <div class="content symbol">
218
+          <ul class="icon_lists dib-box">
219
+          
220
+            <li class="dib">
221
+                <svg class="icon svg-icon" aria-hidden="true">
222
+                  <use xlink:href="#pda-shouye2"></use>
223
+                </svg>
224
+                <div class="name">首页</div>
225
+                <div class="code-name">#pda-shouye2</div>
226
+            </li>
227
+          
228
+            <li class="dib">
229
+                <svg class="icon svg-icon" aria-hidden="true">
230
+                  <use xlink:href="#pda-shouye3"></use>
231
+                </svg>
232
+                <div class="name">我的</div>
233
+                <div class="code-name">#pda-shouye3</div>
234
+            </li>
235
+          
236
+            <li class="dib">
237
+                <svg class="icon svg-icon" aria-hidden="true">
238
+                  <use xlink:href="#pda-wodehuanzhe"></use>
239
+                </svg>
240
+                <div class="name">我的患者</div>
241
+                <div class="code-name">#pda-wodehuanzhe</div>
242
+            </li>
243
+          
244
+            <li class="dib">
245
+                <svg class="icon svg-icon" aria-hidden="true">
246
+                  <use xlink:href="#pda-gongdan"></use>
247
+                </svg>
248
+                <div class="name">工单 </div>
249
+                <div class="code-name">#pda-gongdan</div>
250
+            </li>
251
+          
252
+            <li class="dib">
253
+                <svg class="icon svg-icon" aria-hidden="true">
254
+                  <use xlink:href="#pda-ziyuan91"></use>
255
+                </svg>
256
+                <div class="name">二维码</div>
257
+                <div class="code-name">#pda-ziyuan91</div>
258
+            </li>
259
+          
260
+            <li class="dib">
261
+                <svg class="icon svg-icon" aria-hidden="true">
262
+                  <use xlink:href="#pda-saoma"></use>
263
+                </svg>
264
+                <div class="name">扫一扫</div>
265
+                <div class="code-name">#pda-saoma</div>
266
+            </li>
267
+          
268
+          </ul>
269
+          <div class="article markdown">
270
+          <h2 id="symbol-">Symbol 引用</h2>
271
+          <hr>
272
+
273
+          <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
274
+            这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
275
+          <ul>
276
+            <li>支持多色图标了,不再受单色限制。</li>
277
+            <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
278
+            <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
279
+            <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
280
+          </ul>
281
+          <p>使用步骤如下:</p>
282
+          <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
283
+<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
284
+</code></pre>
285
+          <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
286
+<pre><code class="language-html">&lt;style&gt;
287
+.icon {
288
+  width: 1em;
289
+  height: 1em;
290
+  vertical-align: -0.15em;
291
+  fill: currentColor;
292
+  overflow: hidden;
293
+}
294
+&lt;/style&gt;
295
+</code></pre>
296
+          <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
297
+<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
298
+  &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
299
+&lt;/svg&gt;
300
+</code></pre>
301
+          </div>
302
+      </div>
303
+
304
+    </div>
305
+  </div>
306
+  <script>
307
+  $(document).ready(function () {
308
+      $('.tab-container .content:first').show()
309
+
310
+      $('#tabs li').click(function (e) {
311
+        var tabContent = $('.tab-container .content')
312
+        var index = $(this).index()
313
+
314
+        if ($(this).hasClass('active')) {
315
+          return
316
+        } else {
317
+          $('#tabs li').removeClass('active')
318
+          $(this).addClass('active')
319
+
320
+          tabContent.hide().eq(index).fadeIn()
321
+        }
322
+      })
323
+    })
324
+  </script>
325
+</body>
326
+</html>

+ 39 - 0
static/fonts/iconfont.css

@@ -0,0 +1,39 @@
1
+@font-face {
2
+  font-family: "pda"; /* Project id 3307922 */
3
+  src: url('/static/fonts/iconfont.woff2?t=1649313043379') format('woff2'),
4
+       url('/static/fonts/iconfont.woff?t=1649313043379') format('woff'),
5
+       url('/static/fonts/iconfont.ttf?t=1649313043379') format('truetype');
6
+}
7
+
8
+.pda {
9
+  font-family: "pda" !important;
10
+  font-size: 16px;
11
+  font-style: normal;
12
+  -webkit-font-smoothing: antialiased;
13
+  -moz-osx-font-smoothing: grayscale;
14
+}
15
+
16
+.pda-shouye2:before {
17
+  content: "\e613";
18
+}
19
+
20
+.pda-shouye3:before {
21
+  content: "\e615";
22
+}
23
+
24
+.pda-wodehuanzhe:before {
25
+  content: "\e610";
26
+}
27
+
28
+.pda-gongdan:before {
29
+  content: "\e667";
30
+}
31
+
32
+.pda-ziyuan91:before {
33
+  content: "\e608";
34
+}
35
+
36
+.pda-saoma:before {
37
+  content: "\e660";
38
+}
39
+

File diff suppressed because it is too large
+ 1 - 0
static/fonts/iconfont.js


+ 51 - 0
static/fonts/iconfont.json

@@ -0,0 +1,51 @@
1
+{
2
+  "id": "3307922",
3
+  "name": "zy-pda",
4
+  "font_family": "pda",
5
+  "css_prefix_text": "pda-",
6
+  "description": "转运PDA",
7
+  "glyphs": [
8
+    {
9
+      "icon_id": "765262",
10
+      "name": "首页",
11
+      "font_class": "shouye2",
12
+      "unicode": "e613",
13
+      "unicode_decimal": 58899
14
+    },
15
+    {
16
+      "icon_id": "765290",
17
+      "name": "我的",
18
+      "font_class": "shouye3",
19
+      "unicode": "e615",
20
+      "unicode_decimal": 58901
21
+    },
22
+    {
23
+      "icon_id": "2902559",
24
+      "name": "我的患者",
25
+      "font_class": "wodehuanzhe",
26
+      "unicode": "e610",
27
+      "unicode_decimal": 58896
28
+    },
29
+    {
30
+      "icon_id": "12331676",
31
+      "name": "工单 ",
32
+      "font_class": "gongdan",
33
+      "unicode": "e667",
34
+      "unicode_decimal": 58983
35
+    },
36
+    {
37
+      "icon_id": "21279542",
38
+      "name": "二维码",
39
+      "font_class": "ziyuan91",
40
+      "unicode": "e608",
41
+      "unicode_decimal": 58888
42
+    },
43
+    {
44
+      "icon_id": "6757421",
45
+      "name": "扫一扫",
46
+      "font_class": "saoma",
47
+      "unicode": "e660",
48
+      "unicode_decimal": 58976
49
+    }
50
+  ]
51
+}

BIN
static/fonts/iconfont.ttf


BIN
static/fonts/iconfont.woff


BIN
static/fonts/iconfont.woff2


+ 10 - 0
store/index.js

@@ -16,6 +16,7 @@ const myPlugin = (store) => {
16 16
   // 当 store 初始化后调用
17 17
   let vuexStorage = uni.getStorageSync("vuexStorage");
18 18
   if (vuexStorage) {
19
+    console.log(vuexStorage)
19 20
     store.replaceState(vuexStorage);
20 21
   }
21 22
   store.subscribe((mutation, state) => {
@@ -24,6 +25,15 @@ const myPlugin = (store) => {
24 25
 };
25 26
 
26 27
 export default new Vuex.Store({
28
+  state: {
29
+    isShowSeiminModel: false
30
+  },
31
+  mutations: {
32
+    //是否显示切换科室弹窗
33
+    changeSeiminModel(state, args) {
34
+      state.isShowSeiminModel = args;
35
+    }
36
+  },
27 37
   modules: {
28 38
     user,
29 39
   },

+ 27 - 0
store/modules/dictionary.js

@@ -0,0 +1,27 @@
1
+// import {
2
+//   reqDictionary
3
+// } from "@/request/api.js";
4
+// const state = {
5
+//   dictionary: {},
6
+// };
7
+// const getters = {};
8
+// const mutations = {
9
+//   vxDictionary(state, args) {
10
+//     state.dictionary = args;
11
+//   },
12
+// };
13
+// const actions = {
14
+//   async vxDictionary({
15
+//     commit
16
+//   }, args) {
17
+//     let result = await reqDictionary(args);
18
+//     commit("vxDictionary", result.user);
19
+//   },
20
+// };
21
+// export default {
22
+//   namespaced: true,
23
+//   state,
24
+//   getters,
25
+//   mutations,
26
+//   actions,
27
+// };

+ 1 - 1
store/modules/user.js

@@ -1,6 +1,6 @@
1 1
 import {
2 2
   reqLogin
3
-} from "@/request/user.js";
3
+} from "@/request/api.js";
4 4
 const state = {
5 5
   loginInfo: {},
6 6
 };

+ 63 - 2
uni.scss

@@ -1,9 +1,13 @@
1 1
 @import "@/uni_modules/uni-scss/variables.scss";
2 2
 @import "animate.css/animate.css";
3
-// 主题色
3
+// 字体图标
4
+@import  "@/static/fonts/iconfont.css";
5
+// 主题色(绿色)
4 6
 $defaultColor: #49b856;
5 7
 // 红色
6 8
 $textColorRed: #ff3b53;
9
+// 黄色
10
+$textColorYellow: #F5A623;
7 11
 //数字字母不换行
8 12
 @mixin numbersAndLettersNoWrap {
9 13
   word-break: break-all;
@@ -26,11 +30,68 @@ $textColorRed: #ff3b53;
26 30
 @mixin btn_background {
27 31
   background-image: linear-gradient(90deg,#72c172,#3bb197);
28 32
 }
29
-
33
+//底部凹弧形边
34
+@mixin arc_edge($height:200rpx) {
35
+  height: $height;
36
+  position: relative;
37
+  background: $defaultColor;
38
+  &::after {
39
+    content: '';
40
+    width: 110%;
41
+    height: $height / 2;
42
+    position: absolute;
43
+    left: -5%;
44
+    bottom: 0;
45
+    border-radius: 50% 50% 0 0;
46
+    background: #fff;
47
+  }  
48
+}
49
+//边框两边半圆装饰
50
+@mixin semicircle($backgroundColor:#f9fafb,$top:50%) {
51
+  &::before {
52
+    content: '';
53
+    position: absolute;
54
+    width: 16rpx;
55
+    height: 32rpx;
56
+    border-radius: 0 16rpx 16rpx 0;
57
+    background-color: $backgroundColor;
58
+    left: -1px;
59
+    top: $top;
60
+    transform: translateY(-50%);
61
+    border: 1px solid #E5E9ED;
62
+    border-left: none;
63
+  }
64
+  
65
+  &::after {
66
+    content: '';
67
+    position: absolute;
68
+    width: 16rpx;
69
+    height: 32rpx;
70
+    border-radius: 16rpx 0 0 16rpx;
71
+    background-color: $backgroundColor;
72
+    right: -1px;
73
+    top: $top;
74
+    transform: translateY(-50%);
75
+    border: 1px solid #E5E9ED;
76
+    border-right: none;
77
+  } 
78
+}
79
+@mixin clamp($clamp:1) {
80
+  display: -webkit-box;
81
+  -webkit-box-orient: vertical;
82
+  -webkit-line-clamp: $clamp;
83
+  overflow: hidden;
84
+  text-overflow: ellipsis;
85
+  word-break: break-all;
86
+}
87
+// --------------------------华丽的分割线---------------------------------------
30 88
 // 全局样式
31 89
 .red {
32 90
   color: $textColorRed;
33 91
 }
92
+.yellow {
93
+  color: $textColorYellow;
94
+}
34 95
 .green {
35 96
   color: $defaultColor;
36 97
 }

+ 33 - 0
utils/enum.association_types.js

@@ -0,0 +1,33 @@
1
+import {
2
+  createEnum
3
+} from './index.js';
4
+let data = [{
5
+    name: '患者其他服务业务',
6
+    value: 'patientTransport'
7
+  },
8
+  {
9
+    name: '临时标本业务',
10
+    value: 'specimen'
11
+  },
12
+  {
13
+    name: '药品配送业务',
14
+    value: 'drugsBag'
15
+  },
16
+  {
17
+    name: '静配配送',
18
+    value: 'jPBag'
19
+  },
20
+  {
21
+    name: '其他临床服务',
22
+    value: 'other'
23
+  },
24
+  {
25
+    name: '患者陪检业务',
26
+    value: 'inspect'
27
+  },
28
+  {
29
+    name: '标本轮巡业务',
30
+    value: 'specimenPlan'
31
+  },
32
+]
33
+export const ASSOCIATION_TYPES = createEnum(data); //关联类型

+ 45 - 0
utils/enum.gdstate.js

@@ -0,0 +1,45 @@
1
+import {
2
+  createEnum
3
+} from './index.js';
4
+let data = [{
5
+    name: '待抢单',
6
+    value: '2'
7
+  },
8
+  {
9
+    name: '待接单',
10
+    value: '3'
11
+  },
12
+  {
13
+    name: '待到达',
14
+    value: '4'
15
+  },
16
+  {
17
+    name: '待送达',
18
+    value: '5'
19
+  },
20
+  {
21
+    name: '待评价',
22
+    value: '6'
23
+  },
24
+  {
25
+    name: '已完成',
26
+    value: '7'
27
+  },
28
+  {
29
+    name: '执行中',
30
+    value: '8'
31
+  },
32
+  {
33
+    name: '已到达',
34
+    value: '9'
35
+  },
36
+  {
37
+    name: '待送回',
38
+    value: '10'
39
+  },
40
+  {
41
+    name: '定时预约',
42
+    value: '11'
43
+  },
44
+]
45
+export const GDSTATE = createEnum(data); //工单状态

+ 18 - 2
utils/index.js

@@ -5,7 +5,7 @@ import {
5 5
   enc
6 6
 } from "crypto-js";
7 7
 //aes加密
8
-export function encryptByEnAES(data) {
8
+export function encryptByEnAES(data = '') {
9 9
   let Key = "dsadmin";
10 10
   let tmpAES = AES.encrypt(data, Key, {
11 11
     mode: mode.CBC,
@@ -14,7 +14,7 @@ export function encryptByEnAES(data) {
14 14
   return tmpAES.toString();
15 15
 }
16 16
 //aes解密
17
-export function encryptByDeAES(data) {
17
+export function encryptByDeAES(data = '') {
18 18
   let Key = "dsadmin";
19 19
   let tmpDeAES = AES.decrypt(data, Key, {
20 20
     mode: mode.CBC,
@@ -22,3 +22,19 @@ export function encryptByDeAES(data) {
22 22
   });
23 23
   return tmpDeAES.toString(enc.Utf8);
24 24
 }
25
+
26
+// 简单的模拟枚举
27
+export function createEnum(arr = []) {
28
+  let obj = {}
29
+  arr.forEach(v => {
30
+    obj[obj[v.name] = v.value] = v.name;
31
+  })
32
+  return Object.freeze(obj);
33
+};
34
+
35
+// 获取页面栈,默认0是当前页面栈
36
+export function getCurrentPagesSeimin(num = 0) {
37
+  let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
38
+  let curRoute = routes[routes.length - 1 - num].route // 获取当前页面路由,也就是最后一个打开的页面路由
39
+  return curRoute;
40
+};

+ 8 - 0
vue.config.js

@@ -0,0 +1,8 @@
1
+module.exports = {
2
+  productionSourceMap: false, // 生产打包时不输出map文件,增加打包速度
3
+  configureWebpack: config => {
4
+    if (process.env.NODE_ENV === 'development') {
5
+      config.devtool = 'source-map'
6
+    }
7
+  }
8
+}