瀏覽代碼

切换院区和科室

seimin 2 年之前
父節點
當前提交
f06a5ec28d

+ 143 - 0
components/seiminPicker/seiminPicker.vue

@@ -0,0 +1,143 @@
1
+<template>
2
+  <view class="seiminPicker">
3
+    <view class="picker-modal" v-if="showPicker" @click="_close"></view>
4
+    <view class="picker-content" :style="{transform:  showPicker ? 'translateY(0)' : 'translateY(100%)'}">
5
+      <view class="picker-header">
6
+        <view class="packer-title" :style="{color:titleColor, fontSize:titleFontSize}" v-html="title"></view>
7
+      </view>
8
+      <picker-view indicator-style="height: 90rpx;" class="picker-view" :value="pickerValue" @change="changePicker">
9
+        <picker-view-column>
10
+          <view class="picker-item" :style="{fontSize:itemFontSize}" v-for="(item, index) in pickerList" :key="index">
11
+            {{item.label}}
12
+          </view>
13
+        </picker-view-column>
14
+      </picker-view>
15
+      <view class="picker-confirm"
16
+        :style="{color: confirmColor, fontSize: confirmFontSize, fontWeight:confirmFontWeight}"
17
+        @click="__confirmPicker">确定</view>
18
+    </view>
19
+  </view>
20
+</template>
21
+
22
+<script>
23
+  export default {
24
+    name: 'seiminPicker',
25
+    props: {
26
+      title: { //标题文字
27
+        type: String,
28
+        default: ""
29
+      },
30
+      titleColor: { //标题文字颜色
31
+        type: String,
32
+        default: ""
33
+      },
34
+      titleFontSize: { //标题文字大小
35
+        type: String,
36
+        default: '26rpx'
37
+      },
38
+      confirmColor: { // 确定按钮颜色
39
+        type: String,
40
+        default: ''
41
+      },
42
+      confirmFontSize: { //确定文字大小
43
+        type: String,
44
+        default: '28rpx'
45
+      },
46
+      confirmFontWeight: { //确定按钮的字体粗细
47
+        type: String,
48
+        default: ''
49
+      },
50
+      itemFontSize: { //选项文字大小
51
+        type: String,
52
+        default: '28rpx'
53
+      },
54
+      pickerList: { //数据
55
+        type: Array
56
+      },
57
+    },
58
+    data() {
59
+      return {
60
+        showPicker: false,
61
+        pickerValue: [0],
62
+      }
63
+    },
64
+    methods: {
65
+      _close() {
66
+        this.showPicker = false
67
+      },
68
+      _open() {
69
+        this.showPicker = true
70
+      },
71
+      //确定
72
+      __confirmPicker() {
73
+        this.showPicker = false
74
+        let checkedObj = this.pickerList[this.pickerValue]
75
+        this.$emit('onConfirm', checkedObj)
76
+      },
77
+      //滑动picker
78
+      changePicker(e) {
79
+        this.pickerValue = e.detail.value
80
+      },
81
+    }
82
+  }
83
+</script>
84
+
85
+<style lang="scss" scoped>
86
+  .picker-modal {
87
+    position: fixed;
88
+    top: 0;
89
+    left: 0;
90
+    right: 0;
91
+    bottom: 0;
92
+    background-color: rgba(0, 0, 0, 0.5);
93
+    z-index: 99;
94
+  }
95
+
96
+  .picker-content {
97
+    position: fixed;
98
+    bottom: 0;
99
+    left: 0;
100
+    right: 0;
101
+    z-index: 99;
102
+    background-color: #F9FAFB;
103
+    transition: all .3s;
104
+  }
105
+
106
+  .picker-header {
107
+    @include flex(center, center);
108
+    padding: 20rpx;
109
+    border-bottom: 1px solid #E5E9ED;
110
+    background-color: #fff;
111
+  }
112
+
113
+  .picker-confirm {
114
+    margin-top: 10rpx;
115
+    border-top: 1px solid #E5E9ED;
116
+    height: 90rpx;
117
+    @include flex(center, center);
118
+    background-color: #fff;
119
+  }
120
+
121
+  .packer-title {
122
+    text-align: center;
123
+  }
124
+
125
+  .picker-view {
126
+    position: relative;
127
+    bottom: 0;
128
+    left: 0;
129
+    right: 0;
130
+    height: 490rpx;
131
+    background-color: rgba(255, 255, 255, 1);
132
+  }
133
+
134
+  .uni-picker-view-mask {
135
+    border-bottom: 1px solid #E5E9ED;
136
+  }
137
+
138
+  .picker-item {
139
+    text-align: center;
140
+    line-height: 90rpx;
141
+    text-overflow: ellipsis;
142
+  }
143
+</style>

文件差異過大導致無法顯示
+ 240 - 0
components/seiminSearch/seiminSearch.vue


+ 7 - 0
pages.json

@@ -19,6 +19,13 @@
19 19
         "navigationBarBackgroundColor": "#2C2D31"
20 20
       }
21 21
 
22
+    }, {
23
+      "path": "pages/searchDept/searchDept",
24
+      "style": {
25
+        "navigationBarTitleText": "选择科室",
26
+        "navigationBarBackgroundColor": "#2C2D31"
27
+      }
28
+
22 29
     }
23 30
   ],
24 31
   "globalStyle": {

文件差異過大導致無法顯示
+ 580 - 468
pages/index/index.vue


+ 338 - 274
pages/quickCreateOrder/quickCreateOrder.vue

@@ -2,7 +2,9 @@
2 2
   <view class="quickCreateOrder">
3 3
     <view class="qco_msg" v-html="dataObj.msg"></view>
4 4
     <!-- 起点科室,终点科室 -->
5
-    <block v-if="qucikCreateOrderType === 'other' && (dataObj.start || dataObj.end)">
5
+    <block
6
+      v-if="qucikCreateOrderType === 'other' && (dataObj.start || dataObj.end)"
7
+    >
6 8
       <!-- 返回值的departmentStrategy是201 则是默认发起科室 -->
7 9
       <!-- 返回值的departmentStrategy是202 则是固定科室范围 -->
8 10
       <!-- 返回值的departmentStrategy是203 则是固定科室 -->
@@ -11,51 +13,105 @@
11 13
       <!-- 100013 (护士端一键建单展示策略)取起点科室,和msg值展示 -->
12 14
       <!-- <block v-if="dataObj.status == 100013"> -->
13 15
       <view class="select_block">
14
-        <text class="select_label"
15
-          :class="{disableColor:(dataObj.start.start.departmentStrategy == 201 ||dataObj.start.start.departmentStrategy == 203)}">起点科室</text>
16
-        <view class="select_placeholder"
17
-          v-if="dataObj.start.start.departmentStrategy == 201||dataObj.start.start.departmentStrategy == 203">
18
-          {{deptDisplay == 1?dataObj.start.start.list[0].dept:dataObj.start.start.list[0].deptalias}}
16
+        <text
17
+          class="select_label"
18
+          :class="{
19
+            disableColor:
20
+              dataObj.start.start.departmentStrategy == 201 ||
21
+              dataObj.start.start.departmentStrategy == 203,
22
+          }"
23
+          >起点科室</text
24
+        >
25
+        <view
26
+          class="select_placeholder"
27
+          v-if="
28
+            dataObj.start.start.departmentStrategy == 201 ||
29
+            dataObj.start.start.departmentStrategy == 203
30
+          "
31
+        >
32
+          {{
33
+            deptDisplay == 1
34
+              ? dataObj.start.start.list[0].dept
35
+              : dataObj.start.start.list[0].deptalias
36
+          }}
19 37
         </view>
20
-        <view class="select_placeholder" v-else>请选择起点科室<text class="pda pda-xiangyou"></text></view>
38
+        <view class="select_placeholder" v-else
39
+          >请选择起点科室<text class="pda pda-xiangyou"></text
40
+        ></view>
21 41
       </view>
22 42
       <view class="select_block">
23
-        <text class="select_label"
24
-          :class="{disableColor:(dataObj.end.end.departmentStrategy == 201||dataObj.end.end.departmentStrategy == 203)}">终点科室</text>
25
-        <view class="select_placeholder"
26
-          v-if="(dataObj.end.end.departmentStrategy == 201||dataObj.end.end.departmentStrategy == 203)">
27
-          {{deptDisplay == 1?dataObj.end.end.list[0].dept:dataObj.end.end.list[0].deptalias}}
43
+        <text
44
+          class="select_label"
45
+          :class="{
46
+            disableColor:
47
+              dataObj.end.end.departmentStrategy == 201 ||
48
+              dataObj.end.end.departmentStrategy == 203,
49
+          }"
50
+          >终点科室</text
51
+        >
52
+        <view
53
+          class="select_placeholder"
54
+          v-if="
55
+            dataObj.end.end.departmentStrategy == 201 ||
56
+            dataObj.end.end.departmentStrategy == 203
57
+          "
58
+        >
59
+          {{
60
+            deptDisplay == 1
61
+              ? dataObj.end.end.list[0].dept
62
+              : dataObj.end.end.list[0].deptalias
63
+          }}
28 64
         </view>
29
-        <view class="select_placeholder" v-else>请选择终点科室<text class="pda pda-xiangyou"></text></view>
65
+        <view class="select_placeholder" v-else
66
+          >请选择终点科室<text class="pda pda-xiangyou"></text
67
+        ></view>
30 68
       </view>
31 69
       <!-- </block> -->
32 70
     </block>
33 71
     <!-- 备注 -->
34 72
     <view class="remarks" v-if="dataObj.remarksSwitch == 1">
35
-      <textarea :focus="remarksFocus" class="remarks_textarea" auto-height :maxlength="100"
36
-        placeholder-style="color:#999" :placeholder="dataObj.remarksPrompts|| '请填写工单备注,不超过100个字符'"
37
-        v-model="workOrderRemark" />
73
+      <textarea
74
+        :focus="remarksFocus"
75
+        class="remarks_textarea"
76
+        auto-height
77
+        :maxlength="100"
78
+        placeholder-style="color:#999"
79
+        :placeholder="
80
+          dataObj.remarksPrompts || '请填写工单备注,不超过100个字符'
81
+        "
82
+        v-model="workOrderRemark"
83
+      />
38 84
     </view>
39 85
     <!-- 快捷输入,历史输入 -->
40
-    <view class="quickAndHistory" v-if="dataObj.remarksSwitch == 1 && dataObj.customRemarks.length">
41
-      <view class="quickAndHistory_header">
42
-        快捷输入
43
-      </view>
86
+    <view
87
+      class="quickAndHistory"
88
+      v-if="dataObj.remarksSwitch == 1 && dataObj.customRemarks.length"
89
+    >
90
+      <view class="quickAndHistory_header"> 快捷输入 </view>
44 91
       <view class="quickAndHistory_container">
45
-        <view class="quickAndHistory_item" @click="addRemarks(customRemark)"
46
-          v-for="(customRemark,i) in dataObj.customRemarks" :key="i">
47
-          {{customRemark}}
92
+        <view
93
+          class="quickAndHistory_item"
94
+          @click="addRemarks(customRemark)"
95
+          v-for="(customRemark, i) in dataObj.customRemarks"
96
+          :key="i"
97
+        >
98
+          {{ customRemark }}
48 99
         </view>
49 100
       </view>
50 101
     </view>
51
-    <view class="quickAndHistory" v-if="dataObj.remarksSwitch == 1 && historyCustomRemarks.length">
52
-      <view class="quickAndHistory_header">
53
-        历史输入
54
-      </view>
102
+    <view
103
+      class="quickAndHistory"
104
+      v-if="dataObj.remarksSwitch == 1 && historyCustomRemarks.length"
105
+    >
106
+      <view class="quickAndHistory_header"> 历史输入 </view>
55 107
       <view class="quickAndHistory_container">
56
-        <view class="quickAndHistory_item" @click="addRemarks(historyCustomRemark)"
57
-          v-for="(historyCustomRemark,i) in historyCustomRemarks" :key="i">
58
-          {{historyCustomRemark}}
108
+        <view
109
+          class="quickAndHistory_item"
110
+          @click="addRemarks(historyCustomRemark)"
111
+          v-for="(historyCustomRemark, i) in historyCustomRemarks"
112
+          :key="i"
113
+        >
114
+          {{ historyCustomRemark }}
59 115
         </view>
60 116
       </view>
61 117
     </view>
@@ -66,289 +122,297 @@
66 122
 </template>
67 123
 
68 124
 <script>
69
-  import {
70
-    mapState
71
-  } from 'vuex';
72
-  import {
73
-    reqBuildTrip,
74
-    reqRecentRemarks,
75
-    reqBuildOrder
76
-  } from '../../request/api.js';
77
-  import {
78
-    SOURCEID
79
-  } from '../../utils/enum.sourceid.js';
80
-  export default {
81
-    data() {
82
-      return {
83
-        // 工单备注是否获取焦点
84
-        remarksFocus: true,
85
-        // 工单备注
86
-        workOrderRemark: '',
87
-        // 获取到的数据集合对象(历史输入除外)
88
-        dataObj: {},
89
-        // 历史输入
90
-        historyCustomRemarks: [],
91
-        //底部按钮
92
-        btns: [{
93
-            name: '回到首页',
94
-            type: 'default',
95
-            click: () => {
96
-              uni.navigateTo({
97
-                url: '/pages/index/index'
98
-              })
99
-            }
125
+import { mapState } from "vuex";
126
+import {
127
+  reqBuildTrip,
128
+  reqRecentRemarks,
129
+  reqBuildOrder,
130
+} from "../../request/api.js";
131
+import { SOURCEID } from "../../utils/enum.sourceid.js";
132
+export default {
133
+  data() {
134
+    return {
135
+      // 工单备注是否获取焦点
136
+      remarksFocus: true,
137
+      // 工单备注
138
+      workOrderRemark: "",
139
+      // 获取到的数据集合对象(历史输入除外)
140
+      dataObj: {},
141
+      // 历史输入
142
+      historyCustomRemarks: [],
143
+      //底部按钮
144
+      btns: [
145
+        {
146
+          name: "回到首页",
147
+          type: "default",
148
+          click: () => {
149
+            uni.navigateTo({
150
+              url: "/pages/index/index",
151
+            });
100 152
           },
101
-          {
102
-            name: '确认',
103
-            type: 'primary',
104
-            click: () => {
105
-              this.submitData();
106
-            }
107
-          }
108
-        ]
109
-      };
110
-    },
111
-    computed: {
112
-      ...mapState(['qucikCreateOrderType', 'qucikCreateOrderTypeId', 'deptDisplay']),
113
-      ...mapState('user', ['loginInfoUserDeptId']),
153
+        },
154
+        {
155
+          name: "确认",
156
+          type: "primary",
157
+          click: () => {
158
+            this.submitData();
159
+          },
160
+        },
161
+      ],
162
+    };
163
+  },
164
+  computed: {
165
+    ...mapState([
166
+      "qucikCreateOrderType",
167
+      "qucikCreateOrderTypeId",
168
+      "deptDisplay",
169
+    ]),
170
+  },
171
+  methods: {
172
+    // 添加备注
173
+    addRemarks(customRemark) {
174
+      this.remarksFocus = false;
175
+      this.$nextTick(() => {
176
+        this.remarksFocus = true;
177
+      });
178
+      this.workOrderRemark += customRemark;
114 179
     },
115
-    methods: {
116
-      // 添加备注
117
-      addRemarks(customRemark) {
118
-        this.remarksFocus = false;
119
-        this.$nextTick(() => {
120
-          this.remarksFocus = true;
121
-        });
122
-        this.workOrderRemark += customRemark;
123
-      },
124
-      //获取所有数据
125
-      getData(qucikCreateOrderType, qucikCreateOrderTypeId) {
126
-        uni.showLoading({
127
-          title: '加载中'
128
-        });
129
-        let postData1 = {};
130
-        let postData2 = {
131
-          "taskTypeId": qucikCreateOrderTypeId,
132
-          "deptId": this.loginInfoUserDeptId,
180
+    //获取所有数据
181
+    getData(qucikCreateOrderType, qucikCreateOrderTypeId) {
182
+      uni.showLoading({
183
+        title: "加载中",
184
+      });
185
+      let postData1 = {};
186
+      let postData2 = {
187
+        taskTypeId: qucikCreateOrderTypeId,
188
+        deptId: this.loginInfo.user.dept.id,
189
+      };
190
+      if (qucikCreateOrderType === "specimen") {
191
+        //标本快捷建单
192
+        postData1 = {
193
+          taskTypeId: qucikCreateOrderTypeId,
194
+          deptId: this.loginInfo.user.dept.id,
133 195
         };
134
-        if (qucikCreateOrderType === 'specimen') {
135
-          //标本快捷建单
136
-          postData1 = {
137
-            "taskTypeId": qucikCreateOrderTypeId,
138
-            "deptId": this.loginInfoUserDeptId,
139
-          };
140
-        } else if (qucikCreateOrderType === 'other') {
141
-          //其他临床服务快捷建单
142
-          postData1 = {
143
-            "taskTypeId": qucikCreateOrderTypeId,
144
-          };
145
-        }
146
-        Promise.all([
147
-          reqBuildTrip(postData1),
148
-          reqRecentRemarks(postData2)
149
-        ]).then(values => {
196
+      } else if (qucikCreateOrderType === "other") {
197
+        //其他临床服务快捷建单
198
+        postData1 = {
199
+          taskTypeId: qucikCreateOrderTypeId,
200
+        };
201
+      }
202
+      Promise.all([reqBuildTrip(postData1), reqRecentRemarks(postData2)]).then(
203
+        (values) => {
150 204
           uni.hideLoading();
151 205
           this.getBuildTrip(values[0]);
152 206
           this.getRecentRemarks(values[1]);
153
-        })
154
-      },
155
-      // 获取数据(除历史输入)
156
-      getBuildTrip(res) {
157
-        if (res.status == 200 || res.status == 100012 || res.status == 100013 || res.status == 100014 || res.status ==
158
-          100015) {
159
-          // 处理返回的数据
160
-          if (res.customRemarks) {
161
-            res.customRemarks = res.customRemarks.split('$');
162
-          } else {
163
-            res.customRemarks = []
164
-          }
165
-          // 处理msg
166
-          if (res.msg.includes('<b>')) {
167
-            res.msg = res.msg.replace(/<b>/g, '<text class="green">');
168
-            res.msg = res.msg.replace(/<\/b>/g, '</text>');
169
-          }
170
-          this.dataObj = res;
171 207
         }
172
-      },
173
-      // 获取历史输入
174
-      getRecentRemarks(res) {
175
-        if (res.state == 200) {
176
-          this.historyCustomRemarks = res.data || [];
208
+      );
209
+    },
210
+    // 获取数据(除历史输入)
211
+    getBuildTrip(res) {
212
+      if (
213
+        res.status == 200 ||
214
+        res.status == 100012 ||
215
+        res.status == 100013 ||
216
+        res.status == 100014 ||
217
+        res.status == 100015
218
+      ) {
219
+        // 处理返回的数据
220
+        if (res.customRemarks) {
221
+          res.customRemarks = res.customRemarks.split("$");
222
+        } else {
223
+          res.customRemarks = [];
224
+        }
225
+        // 处理msg
226
+        if (res.msg.includes("<b>")) {
227
+          res.msg = res.msg.replace(/<b>/g, '<text class="green">');
228
+          res.msg = res.msg.replace(/<\/b>/g, "</text>");
177 229
         }
178
-      },
179
-      // 提交数据,建单
180
-      submitData() {
181
-        let postData = {};
182
-        uni.showLoading({
183
-          title: '加载中',
184
-          mask: true
185
-        })
186
-        if (this.qucikCreateOrderType === 'specimen') {
187
-          //标本建单
188
-          postData = {
189
-            urgent: 0,
190
-            workOrder: {
191
-              sourceId: SOURCEID['护士端'],
192
-              workOrderRemark: this.workOrderRemark,
193
-              taskType: {
194
-                id: this.qucikCreateOrderTypeId
195
-              },
196
-              createDept: this.loginInfoUserDeptId,
197
-              startDept: {
198
-                id: this.loginInfoUserDeptId
199
-              },
230
+        this.dataObj = res;
231
+      }
232
+    },
233
+    // 获取历史输入
234
+    getRecentRemarks(res) {
235
+      if (res.state == 200) {
236
+        this.historyCustomRemarks = res.data || [];
237
+      }
238
+    },
239
+    // 提交数据,建单
240
+    submitData() {
241
+      let postData = {};
242
+      uni.showLoading({
243
+        title: "加载中",
244
+        mask: true,
245
+      });
246
+      if (this.qucikCreateOrderType === "specimen") {
247
+        //标本建单
248
+        postData = {
249
+          urgent: 0,
250
+          workOrder: {
251
+            sourceId: SOURCEID["护士端"],
252
+            workOrderRemark: this.workOrderRemark,
253
+            taskType: {
254
+              id: this.qucikCreateOrderTypeId,
200 255
             },
201
-          };
202
-        } else if (this.qucikCreateOrderType === 'other') {
203
-          let startDept = {}; //起点科室
204
-          let endDepts = []; //终点科室
205
-          // 其他服务建单
206
-          // 起点科室---- start
207
-          if (this.dataObj.start.start.departmentStrategy == 201) {
208
-            startDept = {
209
-              id: this.dataObj.start.start.list[0].id
210
-            };
211
-          }
212
-          // 起点科室---- end
213
-          // 终点科室---- start
214
-          if (this.dataObj.start.start.departmentStrategy == 201) {
215
-            endDepts = [{
216
-              id: this.dataObj.end.end.list[0].id
217
-            }];
218
-          }
219
-          // 终点科室---- end
220
-          //请求参数
221
-          postData = {
222
-            workOrder: {
223
-              sourceId: SOURCEID['护士端'],
224
-              workOrderRemark: this.workOrderRemark,
225
-              taskType: {
226
-                id: this.qucikCreateOrderTypeId
227
-              },
228
-              createDept: this.loginInfoUserDeptId,
229
-              startDept,
230
-              endDepts,
256
+            createDept: this.loginInfo.user.dept.id,
257
+            startDept: {
258
+              id: this.loginInfo.user.dept.id,
231 259
             },
260
+          },
261
+        };
262
+      } else if (this.qucikCreateOrderType === "other") {
263
+        let startDept = {}; //起点科室
264
+        let endDepts = []; //终点科室
265
+        // 其他服务建单
266
+        // 起点科室---- start
267
+        if (this.dataObj.start.start.departmentStrategy == 201) {
268
+          startDept = {
269
+            id: this.dataObj.start.start.list[0].id,
232 270
           };
233 271
         }
272
+        // 起点科室---- end
273
+        // 终点科室---- start
274
+        if (this.dataObj.start.start.departmentStrategy == 201) {
275
+          endDepts = [
276
+            {
277
+              id: this.dataObj.end.end.list[0].id,
278
+            },
279
+          ];
280
+        }
281
+        // 终点科室---- end
282
+        //请求参数
283
+        postData = {
284
+          workOrder: {
285
+            sourceId: SOURCEID["护士端"],
286
+            workOrderRemark: this.workOrderRemark,
287
+            taskType: {
288
+              id: this.qucikCreateOrderTypeId,
289
+            },
290
+            createDept: this.loginInfo.user.dept.id,
291
+            startDept,
292
+            endDepts,
293
+          },
294
+        };
295
+      }
234 296
 
235
-        reqBuildOrder(postData).then(res => {
236
-          uni.hideLoading();
237
-          if (res.status == 200) {
238
-            this.$refs.seiminModel.showChangeDept({
239
-              skin: "toast",
240
-              content: '创建成功',
241
-              btns: [{
297
+      reqBuildOrder(postData).then((res) => {
298
+        uni.hideLoading();
299
+        if (res.status == 200) {
300
+          this.$refs.seiminModel.showChangeDept({
301
+            skin: "toast",
302
+            content: "创建成功",
303
+            btns: [
304
+              {
242 305
                 name: "知道了",
243 306
                 textColor: "#49B856",
244 307
                 flex: 1,
245 308
                 click() {
246 309
                   uni.navigateTo({
247
-                    url: '/pages/index/index'
248
-                  })
249
-                }
250
-              }]
251
-            });
252
-          } else {
253
-            this.$refs.seiminModel.showChangeDept({
254
-              skin: "toast",
255
-              icon: 'error',
256
-              content: res.msg || '操作失败'
257
-            });
258
-          }
259
-        })
260
-      }
310
+                    url: "/pages/index/index",
311
+                  });
312
+                },
313
+              },
314
+            ],
315
+          });
316
+        } else {
317
+          this.$refs.seiminModel.showChangeDept({
318
+            skin: "toast",
319
+            icon: "error",
320
+            content: res.msg || "操作失败",
321
+          });
322
+        }
323
+      });
261 324
     },
262
-    onLoad() {
263
-      console.log(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
264
-      this.getData(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
265
-    }
266
-  }
325
+  },
326
+  onLoad() {
327
+    console.log(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
328
+    this.getData(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
329
+  },
330
+};
267 331
 </script>
268 332
 
269 333
 <style lang="scss" scoped>
270
-  .quickCreateOrder {
271
-    margin-bottom: 100rpx;
334
+.quickCreateOrder {
335
+  margin-bottom: 100rpx;
272 336
 
273
-    .qco_msg {
274
-      min-height: 144rpx;
275
-      padding: 32rpx 160rpx;
276
-      color: #999;
277
-      line-height: 40rpx;
278
-      font-size: 28rpx;
279
-      text-align: center;
280
-    }
337
+  .qco_msg {
338
+    min-height: 144rpx;
339
+    padding: 32rpx 160rpx;
340
+    color: #999;
341
+    line-height: 40rpx;
342
+    font-size: 28rpx;
343
+    text-align: center;
344
+  }
281 345
 
282
-    // 起点科室,终点科室
283
-    .select_block {
284
-      padding: 0 30rpx;
285
-      height: 88rpx;
286
-      font-size: 34rpx;
287
-      border-top: 1px solid #E5E5E5;
288
-      background-color: #fff;
289
-      @include flex(space-between, center);
346
+  // 起点科室,终点科室
347
+  .select_block {
348
+    padding: 0 30rpx;
349
+    height: 88rpx;
350
+    font-size: 34rpx;
351
+    border-top: 1px solid #e5e5e5;
352
+    background-color: #fff;
353
+    @include flex(space-between, center);
290 354
 
291
-      .select_label {
292
-        color: #000;
355
+    .select_label {
356
+      color: #000;
293 357
 
294
-        &.disableColor {
295
-          color: #999;
296
-        }
358
+      &.disableColor {
359
+        color: #999;
297 360
       }
361
+    }
298 362
 
299
-      .select_placeholder {
300
-        color: #888;
301
-        @include flex(flex-start, center);
363
+    .select_placeholder {
364
+      color: #888;
365
+      @include flex(flex-start, center);
302 366
 
303
-        .pda-xiangyou {
304
-          font-size: 24rpx;
305
-          margin-left: 30rpx;
306
-        }
367
+      .pda-xiangyou {
368
+        font-size: 24rpx;
369
+        margin-left: 30rpx;
307 370
       }
308 371
     }
372
+  }
309 373
 
310
-    // 备注
311
-    .remarks {
312
-      min-height: 150rpx;
313
-      background-color: #fff;
314
-      border-top: 1px solid #E5E5E5;
315
-      border-bottom: 1px solid #E5E5E5;
316
-      padding: 22rpx 25rpx;
374
+  // 备注
375
+  .remarks {
376
+    min-height: 150rpx;
377
+    background-color: #fff;
378
+    border-top: 1px solid #e5e5e5;
379
+    border-bottom: 1px solid #e5e5e5;
380
+    padding: 22rpx 25rpx;
317 381
 
318
-      .remarks_textarea {
319
-        width: 100%;
320
-        min-height: 100rpx;
321
-      }
382
+    .remarks_textarea {
383
+      width: 100%;
384
+      min-height: 100rpx;
322 385
     }
386
+  }
323 387
 
324
-    // 快捷输入,历史输入
325
-    .quickAndHistory {
326
-      padding: 43rpx 25rpx 0;
388
+  // 快捷输入,历史输入
389
+  .quickAndHistory {
390
+    padding: 43rpx 25rpx 0;
327 391
 
328
-      .quickAndHistory_header {
329
-        font-weight: bold;
330
-        font-size: 34rpx;
331
-        padding-bottom: 24rpx;
332
-        color: #333;
333
-      }
392
+    .quickAndHistory_header {
393
+      font-weight: bold;
394
+      font-size: 34rpx;
395
+      padding-bottom: 24rpx;
396
+      color: #333;
397
+    }
334 398
 
335
-      .quickAndHistory_container {
336
-        @include flex;
337
-        flex-wrap: wrap;
399
+    .quickAndHistory_container {
400
+      @include flex;
401
+      flex-wrap: wrap;
338 402
 
339
-        .quickAndHistory_item {
340
-          height: 66rpx;
341
-          font-size: 28rpx;
342
-          border-radius: 33rpx;
343
-          background-color: #fff;
344
-          line-height: 66rpx;
345
-          padding: 0 24rpx;
346
-          color: #666;
347
-          margin-bottom: 11rpx;
348
-          margin-right: 24rpx;
349
-          @include clamp;
350
-        }
403
+      .quickAndHistory_item {
404
+        height: 66rpx;
405
+        font-size: 28rpx;
406
+        border-radius: 33rpx;
407
+        background-color: #fff;
408
+        line-height: 66rpx;
409
+        padding: 0 24rpx;
410
+        color: #666;
411
+        margin-bottom: 11rpx;
412
+        margin-right: 24rpx;
413
+        @include clamp;
351 414
       }
352 415
     }
353 416
   }
417
+}
354 418
 </style>

+ 504 - 0
pages/searchDept/searchDept.vue

@@ -0,0 +1,504 @@
1
+<template>
2
+  <view class="content">
3
+    <view class="search-box">
4
+      <seiminSearch class="mSearch-input-box" :mode="2" button="inside" placeholder="请输入科室名称" @search="doSearch(false)"
5
+        @input="changeInp" @confirm="doSearch(false)" v-model="keyword"></seiminSearch>
6
+    </view>
7
+    <view class="search-keyword">
8
+      <scroll-view class="keyword-list-box" v-show="isShowKeywordList" scroll-y>
9
+        <block v-for="(row, index) in keywordList" :key="index">
10
+          <view class="keyword-entry" hover-class="keyword-entry-tap">
11
+            <view class="keyword-text" @tap.stop="doSearch(keywordList[index].keyword)">
12
+              <rich-text :nodes="row.htmlStr"></rich-text>
13
+            </view>
14
+            <view class="keyword-img" @tap.stop="doSearch(keywordList[index].keyword)">
15
+              <image src="/static/HM-search/back.png"></image>
16
+            </view>
17
+          </view>
18
+        </block>
19
+      </scroll-view>
20
+      <scroll-view class="keyword-box" v-show="!isShowKeywordList" scroll-y>
21
+        <view class="keyword-block" v-if="oldKeywordList.length > 0">
22
+          <view class="keyword-list-header">
23
+            <view>历史搜索</view>
24
+            <view>
25
+              <image @tap="oldDelete" src="/static/HM-search/delete.png"></image>
26
+            </view>
27
+          </view>
28
+          <view class="keyword">
29
+            <view v-for="(keyword, index) in oldKeywordList" @tap="changeInp(keyword)" :key="index">{{ keyword }}
30
+            </view>
31
+          </view>
32
+        </view>
33
+      </scroll-view>
34
+    </view>
35
+    <seiminModel ref="seiminModel"></seiminModel>
36
+  </view>
37
+</template>
38
+
39
+<script>
40
+  import {
41
+    reqFetchDataList,
42
+    reqChangeHospital,
43
+    reqUpdData,
44
+    reqGetCurrentUser,
45
+  } from "../../request/api.js";
46
+  import {
47
+    mapState,
48
+    mapMutations
49
+  } from "vuex";
50
+  export default {
51
+    data() {
52
+      return {
53
+        keyword: "",
54
+        oldKeywordList: [],
55
+        keywordList: [],
56
+        isShowKeywordList: false,
57
+        deptList: [],
58
+        timer: null, //定时器
59
+        searchText: "", //搜索文本
60
+        searchData: [], //搜索结果
61
+      };
62
+    },
63
+    computed: {
64
+      ...mapState("user", ["loginInfo"]),
65
+      ...mapState(["deptDisplay", "searchDeptParams", "searchDeptResult"]),
66
+    },
67
+    onUnload() {
68
+      if (this.timer) {
69
+        clearTimeout(this.timer);
70
+        this.timer = null;
71
+      }
72
+    },
73
+    onLoad(options) {
74
+      this.init();
75
+    },
76
+    methods: {
77
+      ...mapMutations(["changeSearchDeptResult", 'changeSeiminModel']),
78
+      ...mapMutations("user", ["changeLoginInfo"]),
79
+      init() {
80
+        this.loadOldKeyword();
81
+      },
82
+      blur() {
83
+        uni.hideKeyboard();
84
+      },
85
+      //加载历史搜索,自动读取本地Storage
86
+      loadOldKeyword() {
87
+        uni.getStorage({
88
+          key: "OldKeys",
89
+          success: (res) => {
90
+            var OldKeys = JSON.parse(res.data);
91
+            this.oldKeywordList = OldKeys;
92
+          },
93
+        });
94
+      },
95
+      //防抖搜索
96
+      changeInp(event) {
97
+        this.searchText = event;
98
+        clearTimeout(this.timer);
99
+        this.timer = setTimeout(() => {
100
+          this.inputChange(event);
101
+        }, 500);
102
+      },
103
+      //监听输入
104
+      inputChange(event) {
105
+        //兼容引入组件时传入参数情况
106
+        var keyword = event.detail ? event.detail.value : event;
107
+        if (!keyword) {
108
+          this.keywordList = [];
109
+          this.isShowKeywordList = false;
110
+          return;
111
+        }
112
+        this.keyword = keyword;
113
+        this.isShowKeywordList = true;
114
+        let postData = {
115
+          idx: 0,
116
+          sum: 20,
117
+          department: {},
118
+        };
119
+        // 院区参数----start
120
+        console.log(this.searchDeptParams);
121
+        if (this.searchDeptParams.type === "changeDept_index") {
122
+          //首页切换科室
123
+          postData.department.hospital = {
124
+            id: this.searchDeptParams.hospital.value,
125
+          };
126
+        } else {
127
+          postData.department.hospital = {
128
+            id: this.loginInfo.user.currentHospital.id,
129
+          };
130
+        }
131
+        // 院区参数----end
132
+        // 科室名称或科室别称开关----start
133
+        if (this.deptDisplay == 1) {
134
+          //科室名称
135
+          postData.department.dept = keyword;
136
+        } else if (this.deptDisplay == 2) {
137
+          //科室别称
138
+          postData.department.deptalias = keyword;
139
+        }
140
+        // 科室名称或科室别称开关----end
141
+        uni.showLoading({
142
+          title: "加载中",
143
+          mask: true,
144
+        });
145
+        reqFetchDataList("data", "department", postData).then((res) => {
146
+          if (res.status == 200) {
147
+            this.searchData.push({
148
+              name: keyword,
149
+              list: res.list,
150
+            });
151
+            let searchText = this.searchText.detail ?
152
+              this.searchText.detail.value :
153
+              this.searchText;
154
+            let index = this.searchData.findIndex(
155
+              (item) => item.name === searchText
156
+            );
157
+            this.deptList = index >= 0 ? this.searchData[index].list : [];
158
+            this.keywordList = this.drawCorrelativeKeyword(
159
+              this.deptList,
160
+              keyword
161
+            );
162
+            uni.hideLoading();
163
+          }
164
+        });
165
+      },
166
+      //高亮关键字
167
+      drawCorrelativeKeyword(keywords, keyword) {
168
+        var len = keywords.length,
169
+          keywordArr = [];
170
+        for (var i = 0; i < len; i++) {
171
+          var row = keywords[i];
172
+          //定义高亮#9f9f9f
173
+          var html = "";
174
+          if (this.deptDisplay == 1) {
175
+            // 科室名称
176
+            html = row.dept.replace(
177
+              keyword,
178
+              "<span style='color: #9f9f9f;'>" + keyword + "</span>"
179
+            );
180
+          } else if (this.deptDisplay == 2) {
181
+            // 科室别称
182
+            html = row.deptalias.replace(
183
+              keyword,
184
+              "<span style='color: #9f9f9f;'>" + keyword + "</span>"
185
+            );
186
+          }
187
+          html = "<div>" + html + "</div>";
188
+          var tmpObj = {
189
+            keyword: this.deptDisplay == 1 ? row.dept : row.deptalias,
190
+            htmlStr: html,
191
+          };
192
+          keywordArr.push(tmpObj);
193
+        }
194
+        return keywordArr;
195
+      },
196
+      //清除历史搜索
197
+      oldDelete() {
198
+        uni.showModal({
199
+          content: "确定清除历史搜索记录?",
200
+          success: (res) => {
201
+            if (res.confirm) {
202
+              console.log("用户点击确定");
203
+              this.oldKeywordList = [];
204
+              uni.removeStorage({
205
+                key: "OldKeys",
206
+              });
207
+            } else if (res.cancel) {
208
+              console.log("用户点击取消");
209
+            }
210
+          },
211
+        });
212
+      },
213
+      //执行搜索
214
+      doSearch(keyword) {
215
+        keyword = keyword === false ? this.keyword : keyword;
216
+        this.keyword = keyword;
217
+        this.saveKeyword(keyword); //保存为历史
218
+        let arr = this.deptList.filter((item) => {
219
+          return this.deptDisplay == 1 ?
220
+            item.dept === keyword :
221
+            item.deptalias === keyword;
222
+        });
223
+        if (arr.length) {
224
+          this.changeSearchDeptResult(arr[0]);
225
+          if (this.searchDeptParams.type === "changeDept_index") {
226
+            //首页切换科室
227
+            this.changeDept_index_handler();
228
+          }
229
+        }
230
+      },
231
+      //保存关键字到历史记录
232
+      saveKeyword(keyword) {
233
+        uni.getStorage({
234
+          key: "OldKeys",
235
+          success: (res) => {
236
+            var OldKeys = JSON.parse(res.data);
237
+            var findIndex = OldKeys.indexOf(keyword);
238
+            if (findIndex == -1) {
239
+              OldKeys.unshift(keyword);
240
+            } else {
241
+              OldKeys.splice(findIndex, 1);
242
+              OldKeys.unshift(keyword);
243
+            }
244
+            //最多10个纪录
245
+            OldKeys.length > 10 && OldKeys.pop();
246
+            uni.setStorage({
247
+              key: "OldKeys",
248
+              data: JSON.stringify(OldKeys),
249
+            });
250
+            this.oldKeywordList = OldKeys; //更新历史搜索
251
+          },
252
+          fail: (e) => {
253
+            var OldKeys = [keyword];
254
+            uni.setStorage({
255
+              key: "OldKeys",
256
+              data: JSON.stringify(OldKeys),
257
+            });
258
+            this.oldKeywordList = OldKeys; //更新历史搜索
259
+          },
260
+        });
261
+      },
262
+      //首页切换科室
263
+      changeDept_index_handler() {
264
+        if (this.searchDeptParams.type === "changeDept_index") {
265
+          // 首页切换科室
266
+          uni.showLoading({
267
+            title: '加载中',
268
+            mask: true,
269
+          })
270
+          if (
271
+            this.loginInfo.user.currentHospital.id ==
272
+            this.searchDeptParams.hospital.value
273
+          ) {
274
+            //没有切换院区
275
+            this.changeDept_index_handler_common();
276
+          } else {
277
+            //切换院区
278
+            reqChangeHospital({
279
+              currentHosId: this.searchDeptParams.hospital.value,
280
+              loginType: "PC",
281
+            }).then((res) => {
282
+              if (res.status == 200) {
283
+                this.changeDept_index_handler_common();
284
+              } else {
285
+                uni.hideLoading();
286
+                this.$refs.seiminModel.showChangeDept({
287
+                  skin: "toast",
288
+                  icon: "error",
289
+                  content: res.msg || "操作失败",
290
+                });
291
+              }
292
+            });
293
+          }
294
+        }
295
+      },
296
+      // 首页切换科室,公共方法
297
+      changeDept_index_handler_common() {
298
+        // 更新用户
299
+        reqUpdData("data", "user", {
300
+          user: {
301
+            dept: {
302
+              id: this.searchDeptResult.id,
303
+            },
304
+            id: this.loginInfo.user.id,
305
+          },
306
+        }).then((res) => {
307
+          if (res.status == 200) {
308
+            // 获取当前登录用户信息
309
+            reqGetCurrentUser().then((res) => {
310
+              uni.hideLoading();
311
+              if (res.status == 200) {
312
+                this.$refs.seiminModel.showChangeDept({
313
+                  skin: "toast",
314
+                  icon: "success",
315
+                  content: "切换科室成功",
316
+                  btns: [{
317
+                    click: (e) => {
318
+                      this.changeLoginInfo(res.data);
319
+                      this.changeSeiminModel(true);
320
+                      uni.navigateTo({
321
+                        url: this.searchDeptParams.backUrl,
322
+                      });
323
+                    }
324
+                  }]
325
+                });
326
+              } else {
327
+                this.$refs.seiminModel.showChangeDept({
328
+                  skin: "toast",
329
+                  icon: "error",
330
+                  content: res.msg || "操作失败",
331
+                });
332
+              }
333
+            });
334
+          } else {
335
+            uni.hideLoading();
336
+            this.$refs.seiminModel.showChangeDept({
337
+              skin: "toast",
338
+              icon: "error",
339
+              content: res.msg || "操作失败",
340
+            });
341
+          }
342
+        });
343
+      },
344
+    },
345
+  };
346
+</script>
347
+<style lang="scss" scoped>
348
+  view {
349
+    display: block;
350
+  }
351
+
352
+  .search-box {
353
+    background-color: rgb(242, 242, 242);
354
+    padding: 15upx 2.5%;
355
+    display: flex;
356
+    justify-content: space-between;
357
+    position: sticky;
358
+    top: 0;
359
+  }
360
+
361
+  .search-box .mSearch-input-box {
362
+    width: 100%;
363
+  }
364
+
365
+  .search-box .input-box {
366
+    width: 85%;
367
+    flex-shrink: 1;
368
+    display: flex;
369
+    justify-content: center;
370
+    align-items: center;
371
+  }
372
+
373
+  .search-box .search-btn {
374
+    width: 15%;
375
+    margin: 0 0 0 2%;
376
+    display: flex;
377
+    justify-content: center;
378
+    align-items: center;
379
+    flex-shrink: 0;
380
+    font-size: 28upx;
381
+    color: #fff;
382
+    background: linear-gradient(to right, #ff9801, #ff570a);
383
+    border-radius: 60upx;
384
+  }
385
+
386
+  .search-box .input-box>input {
387
+    width: 100%;
388
+    height: 60upx;
389
+    font-size: 32upx;
390
+    border: 0;
391
+    border-radius: 60upx;
392
+    -webkit-appearance: none;
393
+    -moz-appearance: none;
394
+    appearance: none;
395
+    padding: 0 3%;
396
+    margin: 0;
397
+    background-color: #ffffff;
398
+  }
399
+
400
+  .placeholder-class {
401
+    color: #9e9e9e;
402
+  }
403
+
404
+  .search-keyword {
405
+    width: 100%;
406
+    background-color: rgb(242, 242, 242);
407
+  }
408
+
409
+  .keyword-list-box {
410
+    height: calc(100vh - 110upx);
411
+    padding-top: 10upx;
412
+    border-radius: 20upx 20upx 0 0;
413
+    background-color: #fff;
414
+  }
415
+
416
+  .keyword-entry-tap {
417
+    background-color: #eee;
418
+  }
419
+
420
+  .keyword-entry {
421
+    width: 94%;
422
+    height: 80upx;
423
+    margin: 0 3%;
424
+    font-size: 30upx;
425
+    color: #333;
426
+    display: flex;
427
+    justify-content: space-between;
428
+    align-items: center;
429
+    border-bottom: solid 1upx #e7e7e7;
430
+  }
431
+
432
+  .keyword-entry image {
433
+    width: 60upx;
434
+    height: 60upx;
435
+  }
436
+
437
+  .keyword-entry .keyword-text,
438
+  .keyword-entry .keyword-img {
439
+    height: 80upx;
440
+    display: flex;
441
+    align-items: center;
442
+  }
443
+
444
+  .keyword-entry .keyword-text {
445
+    width: 90%;
446
+  }
447
+
448
+  .keyword-entry .keyword-img {
449
+    width: 10%;
450
+    justify-content: center;
451
+  }
452
+
453
+  .keyword-box {
454
+    height: calc(100vh - 110upx);
455
+    border-radius: 20upx 20upx 0 0;
456
+    background-color: #fff;
457
+  }
458
+
459
+  .keyword-box .keyword-block {
460
+    padding: 10upx 0;
461
+  }
462
+
463
+  .keyword-box .keyword-block .keyword-list-header {
464
+    width: 94%;
465
+    padding: 10upx 3%;
466
+    font-size: 27upx;
467
+    color: #333;
468
+    display: flex;
469
+    justify-content: space-between;
470
+  }
471
+
472
+  .keyword-box .keyword-block .keyword-list-header image {
473
+    width: 40upx;
474
+    height: 40upx;
475
+  }
476
+
477
+  .keyword-box .keyword-block .keyword {
478
+    width: 94%;
479
+    padding: 3px 3%;
480
+    display: flex;
481
+    flex-flow: wrap;
482
+    justify-content: flex-start;
483
+  }
484
+
485
+  .keyword-box .keyword-block .hide-hot-tis {
486
+    display: flex;
487
+    justify-content: center;
488
+    font-size: 28upx;
489
+    color: #6b6b6b;
490
+  }
491
+
492
+  .keyword-box .keyword-block .keyword>view {
493
+    display: flex;
494
+    justify-content: center;
495
+    align-items: center;
496
+    border-radius: 60upx;
497
+    padding: 0 20upx;
498
+    margin: 10upx 20upx 10upx 0;
499
+    height: 60upx;
500
+    font-size: 28upx;
501
+    background-color: rgb(242, 242, 242);
502
+    color: #6b6b6b;
503
+  }
504
+</style>

+ 23 - 1
request/api.js

@@ -65,7 +65,7 @@ export const reqRecentRemarks = (postData) =>
65 65
     data: postData,
66 66
     method: 'POST'
67 67
   });
68
-  
68
+
69 69
 // 建单
70 70
 export const reqBuildOrder = (postData) =>
71 71
   request({
@@ -73,3 +73,25 @@ export const reqBuildOrder = (postData) =>
73 73
     data: postData,
74 74
     method: 'POST'
75 75
   });
76
+
77
+// 切换院区
78
+export const reqChangeHospital = (postData) =>
79
+  request({
80
+    url: '/auth/changeHospital',
81
+    data: postData,
82
+    method: 'POST'
83
+  });
84
+
85
+// 更新操作
86
+export const reqUpdData = (type, target, postData) =>
87
+  request({
88
+    url: `/${type}/updData/${target}`,
89
+    data: postData,
90
+    method: 'POST'
91
+  });
92
+
93
+// 获取当前用户登录信息
94
+export const reqGetCurrentUser = () =>
95
+  request({
96
+    url: '/user/data/getCurrentUser',
97
+  });

二進制
static/HM-search/attention.png


二進制
static/HM-search/attention_forbid.png


二進制
static/HM-search/back.png


二進制
static/HM-search/delete.png


+ 12 - 0
store/index.js

@@ -37,6 +37,10 @@ export default new Vuex.Store({
37 37
     // (2)	当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
38 38
     // (3)	如果用户填写0则为无自动关闭和强制查看时间。
39 39
     nurseDeptSwitchTip: 0,
40
+    // 搜索到的科室-searchDept
41
+    searchDeptResult: {},
42
+    // 搜索科室需要传递的参数
43
+    searchDeptParams: {},
40 44
   },
41 45
   mutations: {
42 46
     //是否显示切换科室弹窗
@@ -64,6 +68,14 @@ export default new Vuex.Store({
64 68
     changeNurseDeptSwitchTip(state, args) {
65 69
       state.nurseDeptSwitchTip = args;
66 70
     },
71
+    //搜索到的科室-searchDept
72
+    changeSearchDeptResult(state, args) {
73
+      state.searchDeptResult = args;
74
+    },
75
+    //搜索科室需要传递的参数
76
+    changeSearchDeptParams(state, args) {
77
+      state.searchDeptParams = args;
78
+    },
67 79
   },
68 80
   modules: {
69 81
     user,

+ 8 - 8
store/modules/user.js

@@ -1,21 +1,21 @@
1
-import {
2
-  reqLogin
3
-} from "@/request/api.js";
1
+import { reqLogin } from "@/request/api.js";
4 2
 const state = {
5 3
   loginInfo: {}, //当前登录用户信息
6
-  loginInfoUserDeptId: undefined, //当前登录用户所属科室id
7 4
 };
8 5
 const getters = {};
9 6
 const mutations = {
7
+  // 登录
10 8
   vxLogin(state, args) {
11 9
     state.loginInfo = args;
12
-    state.loginInfoUserDeptId = args.user.dept.id;
13 10
   },
11
+  // 修改当前登录用户信息
12
+  changeLoginInfo(state, args){
13
+    state.loginInfo.user = args;
14
+  }
14 15
 };
15 16
 const actions = {
16
-  async vxLogin({
17
-    commit
18
-  }, args) {
17
+  // 登录
18
+  async vxLogin({ commit }, args) {
19 19
     let result = await reqLogin(args);
20 20
     if (result.status == 200) {
21 21
       commit("vxLogin", result.user);