Browse Source

处方模板

huangyw 2 years ago
parent
commit
216d18e78d

+ 527 - 253
src/xt_pages/outpatientDoctorStation/batch_delete.vue View File

@@ -1,276 +1,264 @@
1 1
 <template>
2 2
   <!--批量删除-->
3
-  <div class="main-contain">
4
-    <div class="app-container">
5
-      <div class="bannar_list">
6
-        <div class="banner_left">
7
-          <div>
8
-            透析模式:
9
-            <el-select
10
-              v-model="modeOptions_value"
11
-              placeholder="请选择"
12
-              @change="getUsername"
3
+  <div class="main-contain new-main-contain">
4
+    <div class="bannar_list">
5
+      <div class="banner_left">
6
+        <div>
7
+          透析模式:
8
+          <el-select
9
+            v-model="modeOptions_value"
10
+            placeholder="请选择"
11
+            @change="getUsername"
12
+          >
13
+            <el-option
14
+              v-for="item in modeOptions"
15
+              :key="item.id"
16
+              :label="item.name"
17
+              :value="item.id"
13 18
             >
14
-              <el-option
15
-                v-for="item in modeOptions"
16
-                :key="item.id"
17
-                :label="item.name"
18
-                :value="item.id"
19
-              >
20
-              </el-option>
21
-            </el-select>
22
-          </div>
23
-          <div>
24
-            删除类型:
25
-            <el-select
26
-              v-model="new_type"
27
-              placeholder="请选择"
28
-              @change="changetype"
19
+            </el-option>
20
+          </el-select>
21
+        </div>
22
+        <div>
23
+          删除类型:
24
+          <el-select
25
+            v-model="new_type"
26
+            placeholder="请选择"
27
+            @change="changetype"
28
+          >
29
+            <el-option
30
+              v-for="item in options"
31
+              :key="item.id"
32
+              :label="item.name"
33
+              :value="item.id"
29 34
             >
30
-              <el-option
31
-                v-for="item in options"
32
-                :key="item.id"
33
-                :label="item.name"
34
-                :value="item.id"
35
-              >
36
-              </el-option>
37
-            </el-select>
38
-          </div>
39
-          <div v-if="new_type == 1">
40
-            请输入需要删除的药品:
41
-            <el-select
42
-              filterable
43
-              v-model="id"
44
-              placeholder="请选择"
45
-              @change="getUsername"
35
+            </el-option>
36
+          </el-select>
37
+        </div>
38
+        <div v-if="new_type == 1">
39
+          请输入需要删除的药品:
40
+          <el-select
41
+            filterable
42
+            v-model="id"
43
+            placeholder="请选择"
44
+            @change="getUsername"
45
+          >
46
+            <el-option
47
+              v-for="item in druglist"
48
+              :key="item.id"
49
+              :label="item.name"
50
+              :value="item.id"
46 51
             >
47
-              <el-option
48
-                v-for="item in druglist"
49
-                :key="item.id"
50
-                :label="item.name"
51
-                :value="item.id"
52
-              >
53
-              </el-option>
54
-            </el-select>
55
-          </div>
56
-          <div v-if="new_type == 2">
57
-            请输入需要删除的项目:
58
-            <el-select
59
-              filterable
60
-              v-model="id"
61
-              placeholder="请选择"
62
-              @change="getUsername"
52
+            </el-option>
53
+          </el-select>
54
+        </div>
55
+        <div v-if="new_type == 2">
56
+          请输入需要删除的项目:
57
+          <el-select
58
+            filterable
59
+            v-model="id"
60
+            placeholder="请选择"
61
+            @change="getUsername"
62
+          >
63
+            <el-option
64
+              v-for="item in projectlist"
65
+              :key="item.id"
66
+              :label="item.name"
67
+              :value="item.id"
63 68
             >
64
-              <el-option
65
-                v-for="item in projectlist"
66
-                :key="item.id"
67
-                :label="item.name"
68
-                :value="item.id"
69
-              >
70
-              </el-option>
71
-            </el-select>
72
-          </div>
69
+            </el-option>
70
+          </el-select>
73 71
         </div>
74
-
75
-        <!--        <button @click="lili">调试</button>-->
76
-        <el-button type="primary" @click="save">保存</el-button>
77 72
       </div>
78 73
 
79
-      <el-container>
80
-        <div
81
-          style="
82
-            width: 211px;
83
-            margin-right: 20px;
84
-            box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%);
85
-          "
74
+      <!--        <button @click="lili">调试</button>-->
75
+      <el-button type="primary" @click="save">保存</el-button>
76
+    </div>
77
+
78
+    <el-container>
79
+      <div class="mainLeft">
80
+        <el-table
81
+          border
82
+          ref="multipleTable"
83
+          :data="tableData"
84
+          tooltip-effect="dark"
85
+          style="width: 100%; min-height: 70vh"
86
+          @selection-change="handleSelectionChange"
87
+          @current-change="test"
88
+          :row-style="{ color: '#303133' }"
89
+          :header-cell-style="{
90
+            backgroundColor: 'rgb(245, 247, 250)',
91
+            color: '#606266',
92
+          }"
93
+        >
94
+          <el-table-column type="selection" width="55" align="center"> </el-table-column>
95
+          <el-table-column label="患者姓名" width="155" align="center">
96
+            <template slot-scope="scope">{{ scope.row.name }}</template>
97
+          </el-table-column>
98
+        </el-table>
99
+      </div>
100
+      <el-tabs type="border-card" v-if="isshow == 1 && list.length > 0">
101
+        <el-tab-pane
102
+          v-for="(item, index) in list"
103
+          :key="index"
104
+          :label="'处方' + (index + 1)"
105
+          :name="index"
86 106
         >
87 107
           <el-table
88
-            border
89
-            ref="multipleTable"
90
-            :data="tableData"
91
-            tooltip-effect="dark"
108
+            v-if="item.advices.length > 0"
109
+            :data="item.advices"
92 110
             style="width: 100%"
93
-            @selection-change="handleSelectionChange"
94
-            @current-change="test"
111
+            max-height="250"
112
+            border
95 113
             :row-style="{ color: '#303133' }"
96 114
             :header-cell-style="{
97 115
               backgroundColor: 'rgb(245, 247, 250)',
98 116
               color: '#606266',
99 117
             }"
100 118
           >
101
-            <el-table-column type="selection" width="55"> </el-table-column>
102
-            <el-table-column label="患者姓名" width="155">
103
-              <template slot-scope="scope">{{ scope.row.name }}</template>
119
+            <el-table-column fixed label="药品名称" width="230" align="center">
120
+              <template slot-scope="scope">
121
+                {{ scope.row.advice_name }}
122
+              </template>
123
+            </el-table-column>
124
+            <el-table-column label="单次用量" width="200" align="center">
125
+              <template slot-scope="scope">
126
+                {{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}
127
+              </template>
128
+            </el-table-column>
129
+            <el-table-column label="用法" width="120" align="center">
130
+              <template slot-scope="scope">
131
+                {{ scope.row.delivery_way }}
132
+              </template>
133
+            </el-table-column>
134
+            <el-table-column label="频率" width="120" align="center">
135
+              <template slot-scope="scope">
136
+                {{ scope.row.execution_frequency }}
137
+              </template>
138
+            </el-table-column>
139
+            <el-table-column label="天数" width="110" align="center">
140
+              <template slot-scope="scope"> {{ scope.row.day }}天 </template>
141
+            </el-table-column>
142
+            <el-table-column label="总量" width="200" align="center">
143
+              <template slot-scope="scope">
144
+                {{ scope.row.prescribing_number
145
+                }}{{ scope.row.prescribing_number_unit }}
146
+              </template>
147
+            </el-table-column>
148
+            <el-table-column label="单价" width="120" align="center">
149
+              <template slot-scope="scope"> {{ scope.row.price }}元 </template>
150
+            </el-table-column>
151
+            <el-table-column label="备注" width="120" align="center">
152
+              <template slot-scope="scope">
153
+                {{ scope.row.remark }}
154
+              </template>
155
+            </el-table-column>
156
+            <el-table-column label="操作" width="120" align="center">
157
+              <template slot-scope="scope">
158
+                <el-button
159
+                  @click.native.prevent="delects(scope.$index, scope, item)"
160
+                  type="danger"
161
+                  size="small"
162
+                >
163
+                  删除
164
+                </el-button>
165
+              </template>
104 166
             </el-table-column>
105 167
           </el-table>
106
-        </div>
107
-        <el-tabs type="border-card" v-if="isshow == 1 && list.length > 0">
108
-          <el-tab-pane
109
-            v-for="(item, index) in list"
110
-            :key="index"
111
-            :label="'处方' + (index + 1)"
112
-            :name="index"
168
+
169
+          <el-table
170
+            v-if="item.project.length > 0"
171
+            :data="item.project"
172
+            style="width: 100%"
173
+            max-height="250"
174
+            border
175
+            :row-style="{ color: '#303133' }"
176
+            :header-cell-style="{
177
+              backgroundColor: 'rgb(245, 247, 250)',
178
+              color: '#606266',
179
+            }"
113 180
           >
114
-            <el-table
115
-              v-if="item.advices.length > 0"
116
-              :data="item.advices"
117
-              style="width: 100%"
118
-              max-height="250"
119
-              border
120
-              :row-style="{ color: '#303133' }"
121
-              :header-cell-style="{
122
-                backgroundColor: 'rgb(245, 247, 250)',
123
-                color: '#606266',
124
-              }"
125
-            >
126
-              <el-table-column fixed label="药品名称" width="230">
127
-                <template slot-scope="scope">
128
-                  {{ scope.row.advice_name }}
129
-                </template>
130
-              </el-table-column>
131
-              <el-table-column label="单次用量" width="200">
132
-                <template slot-scope="scope">
133
-                  {{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}
134
-                </template>
135
-              </el-table-column>
136
-              <el-table-column label="用法" width="120">
137
-                <template slot-scope="scope">
138
-                  {{ scope.row.delivery_way }}
139
-                </template>
140
-              </el-table-column>
141
-              <el-table-column label="频率" width="120">
142
-                <template slot-scope="scope">
143
-                  {{ scope.row.execution_frequency }}
144
-                </template>
145
-              </el-table-column>
146
-              <el-table-column label="天数" width="110">
147
-                <template slot-scope="scope"> {{ scope.row.day }}天 </template>
148
-              </el-table-column>
149
-              <el-table-column label="总量" width="200">
150
-                <template slot-scope="scope">
151
-                  {{ scope.row.prescribing_number
152
-                  }}{{ scope.row.prescribing_number_unit }}
153
-                </template>
154
-              </el-table-column>
155
-              <el-table-column label="单价" width="120">
156
-                <template slot-scope="scope">
157
-                  {{ scope.row.price }}元
158
-                </template>
159
-              </el-table-column>
160
-              <el-table-column label="备注" width="120">
161
-                <template slot-scope="scope">
162
-                  {{ scope.row.remark }}
163
-                </template>
164
-              </el-table-column>
165
-              <el-table-column label="操作" width="120">
166
-                <template slot-scope="scope">
167
-                  <el-button
168
-                    @click.native.prevent="delects(scope.$index, scope, item)"
169
-                    type="text"
170
-                    size="small"
171
-                  >
172
-                    删除
173
-                  </el-button>
174
-                </template>
175
-              </el-table-column>
176
-            </el-table>
177
-
178
-            <el-table
179
-              v-if="item.project.length > 0"
180
-              :data="item.project"
181
-              style="width: 100%"
182
-              max-height="250"
183
-              border
184
-              :row-style="{ color: '#303133' }"
185
-              :header-cell-style="{
186
-                backgroundColor: 'rgb(245, 247, 250)',
187
-                color: '#606266',
188
-              }"
189
-            >
190
-              <el-table-column fixed label="项目名称" width="230">
191
-                <template slot-scope="scope">
192
-                  <div v-if="scope.row.type == 2">
193
-                    {{ scope.row.project.project_name }}
194
-                  </div>
195
-                  <div v-if="scope.row.type == 3">
196
-                    {{ scope.row.good_info.good_name }}
197
-                  </div>
198
-                </template>
199
-              </el-table-column>
200
-              <el-table-column label="组" width="120">
201
-                <template slot-scope="scope">
202
-                  <div v-if="scope.row.type == 2">
203
-                    {{ scope.row.project.translate }}
204
-                  </div>
205
-                  <div v-if="scope.row.type == 3">
206
-                    {{ scope.row.good_info.translate }}
207
-                  </div>
208
-                </template>
209
-              </el-table-column>
210
-              <el-table-column label="单次用量" width="120">
211
-                <template slot-scope="scope">
212
-                  {{ scope.row.single_dose }}
213
-                  {{ scope.row.unit }}
214
-                </template>
215
-              </el-table-column>
216
-              <el-table-column label="用法" width="120">
217
-                <template slot-scope="scope">
218
-                  {{ scope.row.delivery_way }}
219
-                </template>
220
-              </el-table-column>
221
-              <el-table-column label="频率" width="120">
222
-                <template slot-scope="scope">
223
-                  {{ scope.row.execution_frequency }}
224
-                </template>
225
-              </el-table-column>
226
-              <el-table-column label="天数" width="110">
227
-                <template slot-scope="scope"> {{ scope.row.day }}天 </template>
228
-              </el-table-column>
229
-              <el-table-column label="总量" width="100">
230
-                <template slot-scope="scope">
231
-                  {{ scope.row.count }}
232
-                  {{ scope.row.unit }}
233
-                </template>
234
-              </el-table-column>
235
-              <el-table-column label="单价" width="120">
236
-                <template slot-scope="scope">
237
-                  {{ scope.row.price }}元
238
-                </template>
239
-              </el-table-column>
240
-              <el-table-column label="备注" width="120">
241
-                <template slot-scope="scope">
242
-                  {{ scope.row.remark }}
243
-                </template>
244
-              </el-table-column>
245
-              <el-table-column label="推送频率" width="120">
246
-                <template slot-scope="scope">
247
-                  <div v-if="scope.row.frequency_type == 1">
248
-                    {{ "每次必推" }}
249
-                  </div>
250
-                  <div v-if="scope.row.frequency_type == 2">
251
-                    {{ scope.row.day_count }}天/次
252
-                  </div>
253
-                  <div v-if="scope.row.frequency_type == 3">
254
-                    {{ scope.row.week_days }}
255
-                  </div>
256
-                </template>
257
-              </el-table-column>
258
-              <el-table-column fixed="right" label="操作" width="102">
259
-                <template slot-scope="scope">
260
-                  <el-button
261
-                    @click.native.prevent="delects(scope.$index, scope, item)"
262
-                    type="text"
263
-                    size="small"
264
-                  >
265
-                    删除
266
-                  </el-button>
267
-                </template>
268
-              </el-table-column>
269
-            </el-table>
270
-          </el-tab-pane>
271
-        </el-tabs>
272
-      </el-container>
273
-    </div>
181
+            <el-table-column fixed label="项目名称" width="230" align="center">
182
+              <template slot-scope="scope">
183
+                <div v-if="scope.row.type == 2">
184
+                  {{ scope.row.project.project_name }}
185
+                </div>
186
+                <div v-if="scope.row.type == 3">
187
+                  {{ scope.row.good_info.good_name }}
188
+                </div>
189
+              </template>
190
+            </el-table-column>
191
+            <el-table-column label="组" width="120" align="center">
192
+              <template slot-scope="scope">
193
+                <div v-if="scope.row.type == 2">
194
+                  {{ scope.row.project.translate }}
195
+                </div>
196
+                <div v-if="scope.row.type == 3">
197
+                  {{ scope.row.good_info.translate }}
198
+                </div>
199
+              </template>
200
+            </el-table-column>
201
+            <el-table-column label="单次用量" width="120" align="center">
202
+              <template slot-scope="scope">
203
+                {{ scope.row.single_dose }}
204
+                {{ scope.row.unit }}
205
+              </template>
206
+            </el-table-column>
207
+            <el-table-column label="用法" width="120" align="center">
208
+              <template slot-scope="scope">
209
+                {{ scope.row.delivery_way }}
210
+              </template>
211
+            </el-table-column>
212
+            <el-table-column label="频率" width="120" align="center">
213
+              <template slot-scope="scope">
214
+                {{ scope.row.execution_frequency }}
215
+              </template>
216
+            </el-table-column>
217
+            <el-table-column label="天数" width="110" align="center">
218
+              <template slot-scope="scope"> {{ scope.row.day }}天 </template>
219
+            </el-table-column>
220
+            <el-table-column label="总量" width="100" align="center">
221
+              <template slot-scope="scope">
222
+                {{ scope.row.count }}
223
+                {{ scope.row.unit }}
224
+              </template>
225
+            </el-table-column>
226
+            <el-table-column label="单价" width="120" align="center">
227
+              <template slot-scope="scope"> {{ scope.row.price }}元 </template>
228
+            </el-table-column>
229
+            <el-table-column label="备注" width="120" align="center">
230
+              <template slot-scope="scope">
231
+                {{ scope.row.remark }}
232
+              </template>
233
+            </el-table-column>
234
+            <el-table-column label="推送频率" width="120" align="center">
235
+              <template slot-scope="scope">
236
+                <div v-if="scope.row.frequency_type == 1">
237
+                  {{ "每次必推" }}
238
+                </div>
239
+                <div v-if="scope.row.frequency_type == 2">
240
+                  {{ scope.row.day_count }}天/次
241
+                </div>
242
+                <div v-if="scope.row.frequency_type == 3">
243
+                  {{ scope.row.week_days }}
244
+                </div>
245
+              </template>
246
+            </el-table-column>
247
+            <el-table-column fixed="right" label="操作" width="102" align="center">
248
+              <template slot-scope="scope">
249
+                <el-button
250
+                  @click.native.prevent="delects(scope.$index, scope, item)"
251
+                  type="text"
252
+                  size="small"
253
+                >
254
+                  删除
255
+                </el-button>
256
+              </template>
257
+            </el-table-column>
258
+          </el-table>
259
+        </el-tab-pane>
260
+      </el-tabs>
261
+    </el-container>
274 262
   </div>
275 263
 </template>
276 264
 <script>
@@ -504,7 +492,7 @@ export default {
504 492
         })
505 493
         .catch(() => {
506 494
           this.$message({
507
-            type: "info",
495
+            type: 'success',
508 496
             message: "已取消删除",
509 497
           });
510 498
         });
@@ -608,6 +596,7 @@ export default {
608 596
 
609 597
 <style lang="scss" scoped>
610 598
 .bannar_list {
599
+  width: 97%;
611 600
   margin-bottom: 10px;
612 601
   display: flex;
613 602
   justify-content: space-between;
@@ -622,6 +611,7 @@ export default {
622 611
     }
623 612
   }
624 613
 }
614
+
625 615
 .zone {
626 616
   //  margin-left: 30px;
627 617
   //  text-align: left;
@@ -780,3 +770,287 @@ export default {
780 770
   padding: 0 10px;
781 771
 }
782 772
 </style>
773
+
774
+<style lang="scss" scoped>
775
+.new-main-contain {
776
+  height: 100%;
777
+  display: flex;
778
+  flex-direction: column;
779
+}
780
+
781
+.app-container {
782
+  height: 100%;
783
+}
784
+
785
+.mainCell {
786
+  height: 36px;
787
+  display: flex;
788
+  align-items: center;
789
+}
790
+
791
+.mainLeft {
792
+  width: 211px;
793
+  margin:0 20px;
794
+  /deep/ .el-table__body-wrapper {
795
+    height: 65vh;
796
+    overflow-y: scroll !important;
797
+  }
798
+}
799
+.mainRight {
800
+  margin-left: 10px;
801
+  flex: 1;
802
+  height: 100%;
803
+  display: flex;
804
+  flex-direction: column;
805
+  overflow-y: auto;
806
+  .cellSpan {
807
+    min-width: 80px;
808
+    display: inline-block;
809
+    margin-right: 10px;
810
+  }
811
+  /deep/ .el-table {
812
+    .el-table__header-wrapper {
813
+      .el-table__header {
814
+        width: 100% !important;
815
+      }
816
+    }
817
+
818
+    .el-table__body-wrapper {
819
+      height: auto !important;
820
+      .el-table__body {
821
+        width: 100% !important;
822
+      }
823
+    }
824
+  }
825
+}
826
+
827
+/deep/ .el-table__fixed {
828
+  bottom: 0 !important;
829
+}
830
+.mainCenter {
831
+  display: flex;
832
+  flex: 1;
833
+}
834
+
835
+.centerLeft {
836
+  flex: 1;
837
+  display: flex;
838
+  flex-direction: column;
839
+  position: relative;
840
+
841
+  .el-form-item {
842
+    width: 32%;
843
+    margin-right: 1%;
844
+    float: left;
845
+  }
846
+
847
+  .el-form-item__label {
848
+    text-align: left;
849
+  }
850
+}
851
+.backColor {
852
+  background: #f6f8f9;
853
+  height: 5px;
854
+  margin-bottom: 5px;
855
+}
856
+.el-tabs {
857
+  min-width: 1373px;
858
+  height: 70vh;
859
+}
860
+
861
+.tabsBox {
862
+  position: relative;
863
+  height: 76%;
864
+  overflow-y: auto;
865
+  margin-bottom: 60px;
866
+
867
+  .el-tabs__item {
868
+    padding: 0 10px;
869
+  }
870
+}
871
+.preTabs {
872
+  height: 100%;
873
+  display: flex;
874
+  flex-direction: column;
875
+
876
+  .el-tabs__content {
877
+    flex: 1;
878
+    overflow-y: auto;
879
+  }
880
+}
881
+
882
+.costBox {
883
+  width: 100%;
884
+  height: 60px;
885
+  background: #fff;
886
+  position: absolute;
887
+  bottom: 0;
888
+  display: flex;
889
+  align-items: center;
890
+}
891
+
892
+.addTab {
893
+  position: absolute;
894
+  right: 0;
895
+  top: 14px;
896
+  z-index: 20;
897
+}
898
+
899
+.centerRight {
900
+  width: 300px;
901
+  margin-left: 10px;
902
+  display: flex;
903
+  flex-direction: column;
904
+  position: relative;
905
+}
906
+
907
+.rightTab {
908
+  height: 40px;
909
+  width: 100%;
910
+  border: 1px solid #d2d2d2;
911
+  box-sizing: border-box;
912
+
913
+  p {
914
+    width: 50%;
915
+    height: 40px;
916
+    line-height: 40px;
917
+    text-align: center;
918
+    background: #eee;
919
+    float: left;
920
+  }
921
+
922
+  > p:last-child {
923
+    border-left: 1px solid #d2d2d2;
924
+    float: right;
925
+  }
926
+
927
+  .activeP {
928
+    background: #409eff;
929
+    color: #fff;
930
+  }
931
+}
932
+.comfirmBox {
933
+  width: 100%;
934
+  height: 60px;
935
+  background: #fff;
936
+  position: absolute;
937
+  bottom: 0;
938
+  display: flex;
939
+  align-items: center;
940
+  justify-content: space-between;
941
+}
942
+
943
+.mainHeader {
944
+  width: 100%;
945
+  background: #fff;
946
+  position: fixed;
947
+  z-index: 100;
948
+  height: 36px;
949
+}
950
+
951
+.titleBox {
952
+  position: fixed;
953
+  z-index: 99;
954
+  background: #fff;
955
+}
956
+
957
+.fixedCell {
958
+  position: fixed;
959
+  z-index: 99;
960
+  right: 30px;
961
+  background: #fff;
962
+  width: 300px;
963
+  display: flex;
964
+  justify-content: space-between;
965
+}
966
+.btn_crumbs {
967
+  .el-button {
968
+    text-align: center;
969
+    font-size: 12px;
970
+    padding: 10px 11px;
971
+  }
972
+}
973
+</style>
974
+
975
+<style lang="scss">
976
+.centerLeft {
977
+  .el-form-item__label {
978
+    text-align: left;
979
+  }
980
+}
981
+.tabsBox {
982
+  .el-tabs__item {
983
+    padding: 0 10px;
984
+  }
985
+
986
+  .el-tabs--bottom
987
+    .el-tabs--left
988
+    > .el-tabs__header
989
+    .el-tabs__item:nth-child(2),
990
+  .el-tabs--bottom
991
+    .el-tabs--right
992
+    > .el-tabs__header
993
+    .el-tabs__item:nth-child(2),
994
+  .el-tabs--bottom.el-tabs--border-card
995
+    > .el-tabs__header
996
+    .el-tabs__item:nth-child(2),
997
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2),
998
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2),
999
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2),
1000
+  .el-tabs--top.el-tabs--border-card
1001
+    > .el-tabs__header
1002
+    .el-tabs__item:nth-child(2),
1003
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
1004
+    padding: 0 10px;
1005
+  }
1006
+
1007
+  .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
1008
+  .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
1009
+  .el-tabs--bottom.el-tabs--border-card
1010
+    > .el-tabs__header
1011
+    .el-tabs__item:last-child,
1012
+  .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child,
1013
+  .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
1014
+  .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
1015
+  .el-tabs--top.el-tabs--border-card
1016
+    > .el-tabs__header
1017
+    .el-tabs__item:last-child,
1018
+  .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
1019
+    padding: 0 10px;
1020
+  }
1021
+
1022
+  .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
1023
+    padding: 0 10px;
1024
+  }
1025
+}
1026
+.centerRight {
1027
+  .el-tabs__nav-scroll {
1028
+    display: flex;
1029
+  }
1030
+
1031
+  .el-tabs__nav {
1032
+    margin: 0 auto;
1033
+  }
1034
+
1035
+  .el-table th .cell,
1036
+  .el-table td .cell {
1037
+    padding: 0 2px;
1038
+  }
1039
+}
1040
+.preTabs {
1041
+  .el-tabs__content {
1042
+  }
1043
+}
1044
+.rightTabs {
1045
+  height: 100%;
1046
+
1047
+  .el-tabs__content {
1048
+  }
1049
+}
1050
+.centerDialog {
1051
+  .el-dialog__body {
1052
+    max-height: calc(100vh - 100px) !important;
1053
+    padding: 0 20px;
1054
+  }
1055
+}
1056
+</style>

+ 396 - 341
src/xt_pages/outpatientDoctorStation/batch_replacement.vue View File

@@ -3,10 +3,14 @@
3 3
   <div class="main-contain new-main-contain">
4 4
     <div class="bannar_list">
5 5
       <div class="banner_left">
6
-        <div style="width:1000px;display: flex">
6
+        <div style="width: 1000px; display: flex">
7 7
           <div>
8 8
             透析模式:
9
-            <el-select v-model="modeOptions_value" placeholder="请选择" @change="getUsername">
9
+            <el-select
10
+              v-model="modeOptions_value"
11
+              placeholder="请选择"
12
+              @change="getUsername"
13
+            >
10 14
               <el-option
11 15
                 v-for="item in modeOptions"
12 16
                 :key="item.id"
@@ -75,7 +79,7 @@
75 79
 
76 80
     <div
77 81
       class="app-container"
78
-      style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
82
+      style="display: flex; flex: 1; padding: 10px 10px 0px 10px"
79 83
     >
80 84
       <div class="mainLeft">
81 85
         <div>
@@ -99,9 +103,9 @@
99 103
           </el-table>
100 104
         </div>
101 105
       </div>
102
-      <div class="mainRight">
106
+      <div class="mainRight" v-if="new_type == 1">
103 107
         <el-table
104
-          v-if="new_type == 1"
108
+          
105 109
           :data="tableDatas"
106 110
           style="width: 100%"
107 111
           :height="tableHeight"
@@ -233,130 +237,131 @@
233 237
           </el-table-column>
234 238
         </el-table>
235 239
       </div>
236
-      <el-table
237
-        v-if="new_type == 2"
238
-        :data="project"
239
-        style="width: 100%"
240
-        max-height="250"
241
-        border
242
-        :row-style="{ color: '#303133' }"
243
-        :header-cell-style="{
240
+      <div class="mainRight" v-if="new_type == 2">
241
+        <el-table
242
+          :data="project"
243
+          style="width: 100%"
244
+          :height="tableHeight"
245
+          max-height="70vh"
246
+          border
247
+          :row-style="{ color: '#303133' }"
248
+          :header-cell-style="{
244 249
             backgroundColor: 'rgb(245, 247, 250)',
245 250
             color: '#606266',
246 251
           }"
247
-      >
248
-        <el-table-column fixed label="替换项目名称" width="230">
249
-          <template slot-scope="scope">
250
-            <el-select
251
-              filterable
252
-              v-model="scope.row.drug_name"
253
-              placeholder="请选择"
254
-              @change="changeid2(scope.row,scope.$index)"
255
-            >
256
-              <el-option
257
-                v-for="item in projectlist"
258
-                :key="item.id"
259
-                :label="item.name"
260
-                :value="item.id"
261
-              >
262
-              </el-option>
263
-            </el-select>
264
-          </template>
265
-        </el-table-column>
266
-        <el-table-column label="组" width="120">
267
-          <template slot-scope="scope">
268
-            {{scope.row.translate}}
269
-          </template>
270
-        </el-table-column>
271
-        <el-table-column label="单次用量" width="200">
272
-          <template slot-scope="scope">
273
-            <el-input
274
-              v-model="scope.row.single_dose"
275
-              placeholder="请输入内容"
276
-            ></el-input>
277
-            {{ scope.row.unit }}
278
-          </template>
279
-        </el-table-column>
280
-        <el-table-column label="用法" width="120">
281
-          <template slot-scope="scope">
282
-            <el-select
283
-              v-model="scope.row.delivery_way"
284
-              placeholder="请选择"
285
-            >
286
-              <el-option
287
-                v-for="item in usage"
288
-                :key="item.name"
289
-                :label="item.name"
290
-                :value="item.name"
252
+          highlight-current-row
253
+        >
254
+          <el-table-column fixed label="替换项目名称" width="230" align="center">
255
+            <template slot-scope="scope">
256
+              <el-select
257
+                filterable
258
+                v-model="scope.row.drug_name"
259
+                placeholder="请选择"
260
+                @change="changeid2(scope.row, scope.$index)"
291 261
               >
292
-              </el-option>
293
-            </el-select>
294
-          </template>
295
-        </el-table-column>
296
-        <el-table-column label="频率" width="120">
297
-          <template slot-scope="scope">
298
-            <el-select
299
-              v-model="scope.row.execution_frequency"
300
-              placeholder="请选择"
301
-            >
302
-              <el-option
303
-                v-for="item in frequency"
304
-                :key="item.name"
305
-                :label="item.name"
306
-                :value="item.name"
262
+                <el-option
263
+                  v-for="item in projectlist"
264
+                  :key="item.id"
265
+                  :label="item.name"
266
+                  :value="item.id"
267
+                >
268
+                </el-option>
269
+              </el-select>
270
+            </template>
271
+          </el-table-column>
272
+          <el-table-column label="组" width="120" align="center">
273
+            <template slot-scope="scope">
274
+              {{ scope.row.translate }}
275
+            </template>
276
+          </el-table-column>
277
+          <el-table-column label="单次用量" width="200" align="center">
278
+            <template slot-scope="scope">
279
+              <el-input
280
+                v-model="scope.row.single_dose"
281
+                placeholder="请输入内容"
282
+              ></el-input>
283
+              {{ scope.row.unit }}
284
+            </template>
285
+          </el-table-column>
286
+          <el-table-column label="用法" width="120" align="center">
287
+            <template slot-scope="scope">
288
+              <el-select v-model="scope.row.delivery_way" placeholder="请选择">
289
+                <el-option
290
+                  v-for="item in usage"
291
+                  :key="item.name"
292
+                  :label="item.name"
293
+                  :value="item.name"
294
+                >
295
+                </el-option>
296
+              </el-select>
297
+            </template>
298
+          </el-table-column>
299
+          <el-table-column label="频率" width="120" align="center">
300
+            <template slot-scope="scope">
301
+              <el-select
302
+                v-model="scope.row.execution_frequency"
303
+                placeholder="请选择"
307 304
               >
308
-              </el-option>
309
-            </el-select>
310
-          </template>
311
-        </el-table-column>
312
-        <el-table-column label="天数" width="110">
313
-          <template slot-scope="scope">
314
-            <el-input
315
-              v-model="scope.row.day"
316
-              placeholder="请输入"
317
-              style="width: 75px"
318
-            ></el-input>天
319
-          </template>
320
-        </el-table-column>
321
-        <el-table-column label="总量" width="200">
322
-          <template slot-scope="scope">
323
-            <el-input
324
-              v-model="scope.row.prescribing_number"
325
-              placeholder="请输入"
326
-              style="width: 75px"
327
-            ></el-input>
328
-            {{ scope.row.unit }}
329
-          </template>
330
-        </el-table-column>
331
-        <el-table-column label="单价" width="120">
332
-          <template slot-scope="scope">
333
-            <el-input v-model="scope.row.price" style="width: 80px"></el-input
334
-            >元
335
-          </template>
336
-        </el-table-column>
337
-        <el-table-column label="备注" width="120">
338
-          <template slot-scope="scope">
339
-            <el-input v-model="scope.row.remark" placeholder=""></el-input>
340
-          </template>
341
-        </el-table-column>
342
-        <!--          <el-table-column label="推送频率" width="120">-->
343
-        <!--            <template slot-scope="scope">-->
344
-        <!--              <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>-->
345
-        <!--              <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>-->
346
-        <!--              <div v-if="scope.row.frequency_type == 3">{{scope.row.week_days}}</div>-->
347
-        <!--            </template>-->
348
-        <!--          </el-table-column>-->
349
-        <!--          <el-table-column fixed="right" label="操作" width="102">-->
350
-        <!--            <template slot-scope="scope">-->
351
-        <!--              <el-button-->
352
-        <!--                @click.native.prevent="addopen(scope.$index)"-->
353
-        <!--                type="text"-->
354
-        <!--                size="small">-->
355
-        <!--                推送-->
356
-        <!--              </el-button>-->
357
-        <!--            </template>-->
358
-        <!--          </el-table-column>-->
359
-      </el-table>
305
+                <el-option
306
+                  v-for="item in frequency"
307
+                  :key="item.name"
308
+                  :label="item.name"
309
+                  :value="item.name"
310
+                >
311
+                </el-option>
312
+              </el-select>
313
+            </template>
314
+          </el-table-column>
315
+          <el-table-column label="天数" width="110" align="center">
316
+            <template slot-scope="scope">
317
+              <el-input
318
+                v-model="scope.row.day"
319
+                placeholder="请输入"
320
+                style="width: 75px"
321
+              ></el-input
322
+              >天
323
+            </template>
324
+          </el-table-column>
325
+          <el-table-column label="总量" width="200" align="center">
326
+            <template slot-scope="scope">
327
+              <el-input
328
+                v-model="scope.row.prescribing_number"
329
+                placeholder="请输入"
330
+                style="width: 75px"
331
+              ></el-input>
332
+              {{ scope.row.unit }}
333
+            </template>
334
+          </el-table-column>
335
+          <el-table-column label="单价" width="120" align="center">
336
+            <template slot-scope="scope">
337
+              <el-input v-model="scope.row.price" style="width: 80px"></el-input
338
+              >元
339
+            </template>
340
+          </el-table-column>
341
+          <el-table-column label="备注" width="120" align="center">
342
+            <template slot-scope="scope">
343
+              <el-input v-model="scope.row.remark" placeholder=""></el-input>
344
+            </template>
345
+          </el-table-column>
346
+          <!--          <el-table-column label="推送频率" width="120">-->
347
+          <!--            <template slot-scope="scope">-->
348
+          <!--              <div v-if="scope.row.frequency_type == 1">{{'每次必推'}}</div>-->
349
+          <!--              <div v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/次</div>-->
350
+          <!--              <div v-if="scope.row.frequency_type == 3">{{scope.row.week_days}}</div>-->
351
+          <!--            </template>-->
352
+          <!--          </el-table-column>-->
353
+          <!--          <el-table-column fixed="right" label="操作" width="102">-->
354
+          <!--            <template slot-scope="scope">-->
355
+          <!--              <el-button-->
356
+          <!--                @click.native.prevent="addopen(scope.$index)"-->
357
+          <!--                type="text"-->
358
+          <!--                size="small">-->
359
+          <!--                推送-->
360
+          <!--              </el-button>-->
361
+          <!--            </template>-->
362
+          <!--          </el-table-column>-->
363
+        </el-table>
364
+      </div>
360 365
     </div>
361 366
 
362 367
     <el-dialog
@@ -388,9 +393,9 @@
388 393
       </div>
389 394
 
390 395
       <span slot="footer" class="dialog-footer">
391
-    <el-button @click="dialogVisible = false">取 消</el-button>
392
-    <el-button type="primary" @click="">确 定</el-button>
393
-  </span>
396
+        <el-button @click="dialogVisible = false">取 消</el-button>
397
+        <el-button type="primary" @click="">确 定</el-button>
398
+      </span>
394 399
     </el-dialog>
395 400
   </div>
396 401
 </template>
@@ -414,66 +419,97 @@ export default {
414 419
       tableList: [],
415 420
       editableTabsValue: "1",
416 421
       modeOptions: {},
417
-      tableDatas:[{
418
-        id: "",
419
-        drug_name: "",
420
-        single_dose: "",
421
-        single_dose_unit: "",
422
-        delivery_way: "",
423
-        execution_frequency: "",
424
-        day: "",
425
-        prescribing_number: "",
426
-        prescribing_number_unit: "",
427
-        price: "",
428
-        remark: "",
429
-        list_1:[],
430
-        list_2:[],
431
-      },],
432
-      project:[ {
433
-        id: "",
434
-        drug_name: "",
435
-        translate:"",
436
-        single_dose: "",
437
-        unit: "",
438
-        delivery_way: "",
439
-        execution_frequency: "",
440
-        day: "",
441
-        prescribing_number: "",
442
-        price: "",
443
-        remark: "",
444
-        frequency_type:1,
445
-        day_count:"",
446
-        week_days:"",
447
-      },],//项目
422
+      tableDatas: [
423
+        {
424
+          id: "",
425
+          drug_name: "",
426
+          single_dose: "",
427
+          single_dose_unit: "",
428
+          delivery_way: "",
429
+          execution_frequency: "",
430
+          day: "",
431
+          prescribing_number: "",
432
+          prescribing_number_unit: "",
433
+          price: "",
434
+          remark: "",
435
+          list_1: [],
436
+          list_2: [],
437
+        },
438
+      ],
439
+      project: [
440
+        {
441
+          id: "",
442
+          drug_name: "",
443
+          translate: "",
444
+          single_dose: "",
445
+          unit: "",
446
+          delivery_way: "",
447
+          execution_frequency: "",
448
+          day: "",
449
+          prescribing_number: "",
450
+          price: "",
451
+          remark: "",
452
+          frequency_type: 1,
453
+          day_count: "",
454
+          week_days: "",
455
+        },
456
+      ], //项目
448 457
       tabIndex: 2,
449 458
       modeOptions_value: 1, //透析模式
450
-      multipleSelection: [],//选中的患者
451
-      tableData:[],
452
-      options:[{id:1,name:"药品"},{id:2,name:"项目"}],
453
-      options_patient:[{id:1,name:"是"},{id:2,name:"否"}],
454
-      options_2:[{id:1,name:"普通门诊"},{id:2,name:"门诊特殊病"}],
455
-      new_type:1,//新增类型
456
-      druglist:[],//药品列表
457
-      projectlist:[],//项目列表
458
-      id:"",//药品、项目、耗材
459
-      tmplist:[],//临时
460
-      unit:[{id:1,name:"g"},{id:2,name:"mg"},{id:3,name:"u"},{id:4,name:"ml"},{id:5,name:"万U"},{id:6,name:"枚"},{id:7,name:"粒"},
461
-        {id:8,name:"片"},{id:9,name:"支"},{id:10,name:"μg"},{id:11,name:"iu"},{id:12,name:"包"},{id:13,name:"袋"},{id:14,name:"万"},
462
-        {id:15,name:"万iu"},{id:16,name:"丸"},{id:17,name:"盒"},{id:18,name:"瓶"},{id:19,name:"瓶(袋)"},{id:20,name:"次"}],
463
-      usage:[],//用法
464
-      frequency:[],//频率
465
-      frequency_type:"",//周期提醒
466
-      day_count:"",//周期提醒天
467
-      week_days:[],//周期提醒星期
468
-      tabhang:0,//tab的下标
469
-      hang:0,//行数
470
-
471
-    }
459
+      multipleSelection: [], //选中的患者
460
+      tableData: [],
461
+      options: [
462
+        { id: 1, name: "药品" },
463
+        { id: 2, name: "项目" },
464
+      ],
465
+      options_patient: [
466
+        { id: 1, name: "是" },
467
+        { id: 2, name: "否" },
468
+      ],
469
+      options_2: [
470
+        { id: 1, name: "普通门诊" },
471
+        { id: 2, name: "门诊特殊病" },
472
+      ],
473
+      new_type: 1, //新增类型
474
+      druglist: [], //药品列表
475
+      projectlist: [], //项目列表
476
+      id: "", //药品、项目、耗材
477
+      tmplist: [], //临时
478
+      unit: [
479
+        { id: 1, name: "g" },
480
+        { id: 2, name: "mg" },
481
+        { id: 3, name: "u" },
482
+        { id: 4, name: "ml" },
483
+        { id: 5, name: "万U" },
484
+        { id: 6, name: "枚" },
485
+        { id: 7, name: "粒" },
486
+        { id: 8, name: "片" },
487
+        { id: 9, name: "支" },
488
+        { id: 10, name: "μg" },
489
+        { id: 11, name: "iu" },
490
+        { id: 12, name: "包" },
491
+        { id: 13, name: "袋" },
492
+        { id: 14, name: "万" },
493
+        { id: 15, name: "万iu" },
494
+        { id: 16, name: "丸" },
495
+        { id: 17, name: "盒" },
496
+        { id: 18, name: "瓶" },
497
+        { id: 19, name: "瓶(袋)" },
498
+        { id: 20, name: "次" },
499
+      ],
500
+      usage: [], //用法
501
+      frequency: [], //频率
502
+      frequency_type: "", //周期提醒
503
+      day_count: "", //周期提醒天
504
+      week_days: [], //周期提醒星期
505
+      tabhang: 0, //tab的下标
506
+      hang: 0, //行数
507
+    };
472 508
   },
473 509
   created() {
474 510
     // console.log("this.$store.getters.treatment_mode",this.$store.getters.treatment_mode)
475 511
     for (let key in this.$store.getters.treatment_mode) {
476
-      this.modeOptions[key] = this.$store.getters.treatment_mode[key]
512
+      this.modeOptions[key] = this.$store.getters.treatment_mode[key];
477 513
     }
478 514
     // console.log("this.modeOptions",this.modeOptions)
479 515
     this.getdrugconfigs();
@@ -534,27 +570,27 @@ export default {
534 570
           }
535 571
         }
536 572
       }
537
-      if (this.new_type == 1){
538
-        if(this.druglist != null){
539
-          for(let d1 = 0;d1 < this.druglist.length;d1++){
540
-            if(this.id == this.druglist[d1].id){
541
-              tmp2 = this.druglist[d1].name
573
+      if (this.new_type == 1) {
574
+        if (this.druglist != null) {
575
+          for (let d1 = 0; d1 < this.druglist.length; d1++) {
576
+            if (this.id == this.druglist[d1].id) {
577
+              tmp2 = this.druglist[d1].name;
542 578
             }
543
-            if(this.tableDatas != null){
544
-              if(this.tableDatas[0].id == this.druglist[d1].id){
545
-                tmp3 = this.druglist[d1].name
579
+            if (this.tableDatas != null) {
580
+              if (this.tableDatas[0].id == this.druglist[d1].id) {
581
+                tmp3 = this.druglist[d1].name;
546 582
               }
547 583
             }
548 584
           }
549 585
         }
550
-        if(this.druglist2 != null){
551
-          for(let d2 = 0;d2 < this.druglist2.length;d2++){
552
-            if(this.id == this.druglist2[d2].id){
553
-              tmp2 = tmp2 + this.druglist2[d2].name
586
+        if (this.druglist2 != null) {
587
+          for (let d2 = 0; d2 < this.druglist2.length; d2++) {
588
+            if (this.id == this.druglist2[d2].id) {
589
+              tmp2 = tmp2 + this.druglist2[d2].name;
554 590
             }
555
-            if(this.tableDatas != null){
556
-              if(this.tableDatas[0].id == this.druglist2[d2].id){
557
-                tmp3 = this.druglist2[d2].name
591
+            if (this.tableDatas != null) {
592
+              if (this.tableDatas[0].id == this.druglist2[d2].id) {
593
+                tmp3 = this.druglist2[d2].name;
558 594
               }
559 595
             }
560 596
           }
@@ -562,7 +598,7 @@ export default {
562 598
       }
563 599
 
564 600
       this.$confirm(
565
-        "请确定是否保存?",//注:该操作将会把所选患者的"+tmp+"透析模式中的"+tmp2+"替换为"+tmp3+",
601
+        "请确定是否保存?", //注:该操作将会把所选患者的"+tmp+"透析模式中的"+tmp2+"替换为"+tmp3+",
566 602
         "",
567 603
         {
568 604
           confirmButtonText: "确 定",
@@ -574,99 +610,107 @@ export default {
574 610
           this.$message.error("没有选中有效信息");
575 611
           return;
576 612
         }
577
-        let st = ""
578
-        for (let i = 0;i < this.multipleSelection.length;i++){
579
-          st = st + this.multipleSelection[i].id + ","
613
+        let st = "";
614
+        for (let i = 0; i < this.multipleSelection.length; i++) {
615
+          st = st + this.multipleSelection[i].id + ",";
580 616
         }
581
-        console.log("string",st)
617
+        console.log("string", st);
582 618
         let params = {
583
-          mode_id:this.modeOptions_value,
619
+          mode_id: this.modeOptions_value,
584 620
           patient_id: st,
585
-          type:this.new_type,
621
+          type: this.new_type,
586 622
           replaced: this.id,
587
-        }
623
+        };
588 624
         let data1 = {
589
-          "prescriptions": this.tableDatas
590
-        }
625
+          prescriptions: this.tableDatas,
626
+        };
591 627
         let data2 = {
592
-          "prescriptions": this.project
593
-        }
594
-        if (this.new_type == 1){
595
-          replacesavedrug(params,data1).then((res) =>{
596
-            if (res.data.state == 1){
597
-              this.$message.success('替换成功')
598
-              this.multipleSelection = []
599
-              this.tableData=[]
600
-              this.tableDatas=[{
601
-                id: "",
602
-                drug_name: "",
603
-                single_dose: "",
604
-                single_dose_unit: "",
605
-                delivery_way: "",
606
-                execution_frequency: "",
607
-                day: "",
608
-                prescribing_number: "",
609
-                prescribing_number_unit: "",
610
-                price: "",
611
-                remark: "",
612
-              },];
613
-              this.project=[ {
614
-                id: "",
615
-                drug_name: "",
616
-                translate:"",
617
-                single_dose: "",
618
-                unit: "",
619
-                delivery_way: "",
620
-                execution_frequency: "",
621
-                day: "",
622
-                prescribing_number: "",
623
-                price: "",
624
-                remark: "",
625
-                frequency_type:1,
626
-                day_count:"",
627
-                week_days:"",
628
-              },];
629
-            }else{
630
-              this.$message.error(res.data.msg)
628
+          prescriptions: this.project,
629
+        };
630
+        if (this.new_type == 1) {
631
+          replacesavedrug(params, data1).then((res) => {
632
+            if (res.data.state == 1) {
633
+              this.$message.success("替换成功");
634
+              this.multipleSelection = [];
635
+              this.tableData = [];
636
+              this.tableDatas = [
637
+                {
638
+                  id: "",
639
+                  drug_name: "",
640
+                  single_dose: "",
641
+                  single_dose_unit: "",
642
+                  delivery_way: "",
643
+                  execution_frequency: "",
644
+                  day: "",
645
+                  prescribing_number: "",
646
+                  prescribing_number_unit: "",
647
+                  price: "",
648
+                  remark: "",
649
+                },
650
+              ];
651
+              this.project = [
652
+                {
653
+                  id: "",
654
+                  drug_name: "",
655
+                  translate: "",
656
+                  single_dose: "",
657
+                  unit: "",
658
+                  delivery_way: "",
659
+                  execution_frequency: "",
660
+                  day: "",
661
+                  prescribing_number: "",
662
+                  price: "",
663
+                  remark: "",
664
+                  frequency_type: 1,
665
+                  day_count: "",
666
+                  week_days: "",
667
+                },
668
+              ];
669
+            } else {
670
+              this.$message.error(res.data.msg);
631 671
             }
632
-          })
633
-        }else{
634
-          replacesaveproject(params,data2).then((res) =>{
635
-            if (res.data.state == 1){
636
-              this.$message.success('替换成功')
637
-              this.multipleSelection = []
638
-              this.tableData=[]
639
-              this.tableDatas=[{
640
-                id: "",
641
-                drug_name: "",
642
-                single_dose: "",
643
-                single_dose_unit: "",
644
-                delivery_way: "",
645
-                execution_frequency: "",
646
-                day: "",
647
-                prescribing_number: "",
648
-                prescribing_number_unit: "",
649
-                price: "",
650
-                remark: "",
651
-              },];
652
-              this.project=[ {
653
-                id: "",
654
-                drug_name: "",
655
-                translate:"",
656
-                single_dose: "",
657
-                unit: "",
658
-                delivery_way: "",
659
-                execution_frequency: "",
660
-                day: "",
661
-                prescribing_number: "",
662
-                price: "",
663
-                remark: "",
664
-                frequency_type:1,
665
-                day_count:"",
666
-                week_days:"",
667
-              },];
668
-            }else{
669
-              this.$message.error(res.data.msg)
672
+          });
673
+        } else {
674
+          replacesaveproject(params, data2).then((res) => {
675
+            if (res.data.state == 1) {
676
+              this.$message.success("替换成功");
677
+              this.multipleSelection = [];
678
+              this.tableData = [];
679
+              this.tableDatas = [
680
+                {
681
+                  id: "",
682
+                  drug_name: "",
683
+                  single_dose: "",
684
+                  single_dose_unit: "",
685
+                  delivery_way: "",
686
+                  execution_frequency: "",
687
+                  day: "",
688
+                  prescribing_number: "",
689
+                  prescribing_number_unit: "",
690
+                  price: "",
691
+                  remark: "",
692
+                },
693
+              ];
694
+              this.project = [
695
+                {
696
+                  id: "",
697
+                  drug_name: "",
698
+                  translate: "",
699
+                  single_dose: "",
700
+                  unit: "",
701
+                  delivery_way: "",
702
+                  execution_frequency: "",
703
+                  day: "",
704
+                  prescribing_number: "",
705
+                  price: "",
706
+                  remark: "",
707
+                  frequency_type: 1,
708
+                  day_count: "",
709
+                  week_days: "",
710
+                },
711
+              ];
712
+            } else {
713
+              this.$message.error(res.data.msg);
670 714
             }
671 715
           });
672 716
         }
@@ -675,116 +719,126 @@ export default {
675 719
 
676 720
     lili() {
677 721
       // console.log("this.multipleSelection",this.multipleSelection);
678
-      console.log("this.modeOptions_value",this.modeOptions_value)
722
+      console.log("this.modeOptions_value", this.modeOptions_value);
679 723
       // console.log("this.mode",this.modeOptions_value)
680 724
       // console.log("this.projectlist2",this.projectlist2)
681 725
       // console.log("patient_value",this.patient_value)
682 726
     },
683
-    addopen(hang){
684
-      this.hang = hang
727
+    addopen(hang) {
728
+      this.hang = hang;
685 729
       //清空
686 730
       this.week_days = [];
687 731
       this.day_count = "";
688 732
       this.frequency_type = 1;
689 733
       this.dialogVisible = true;
690 734
     },
691
-    changetype(){
692
-      console.log(">>>>>>>",this.new_type)
693
-      this.id = ""
694
-      this.tableData = []
735
+    changetype() {
736
+      console.log(">>>>>>>", this.new_type);
737
+      this.id = "";
738
+      this.tableData = [];
695 739
     },
696 740
     changeid(item, index) {
697 741
       console.log("");
698 742
       item.id = item.drug_name;
699 743
       var params = {
700
-        id:item.id
701
-      }
702
-      getdrugsinformation(params).then((res) =>{
703
-        if (res.data.state == 1){
704
-          console.log("res??",res)
744
+        id: item.id,
745
+      };
746
+      getdrugsinformation(params).then((res) => {
747
+        if (res.data.state == 1) {
748
+          console.log("res??", res);
705 749
           this.tableDatas[0].single_dose = res.data.data.list[0].single_dose;
706
-          this.tableDatas[0].single_dose_unit = res.data.data.list[0].single_dose_unit;
750
+          this.tableDatas[0].single_dose_unit =
751
+            res.data.data.list[0].single_dose_unit;
707 752
           this.tableDatas[0].delivery_way = res.data.data.list[0].delivery_way;
708
-          this.tableDatas[0].execution_frequency = res.data.data.list[0].execution_frequency;
753
+          this.tableDatas[0].execution_frequency =
754
+            res.data.data.list[0].execution_frequency;
709 755
           this.tableDatas[0].day = res.data.data.list[0].drug_day;
710
-          this.tableDatas[0].prescribing_number = res.data.data.list[0].prescribing_number;
711
-          this.tableDatas[0].prescribing_number_unit = res.data.data.list[0].prescribing_number_unit;
712
-          if (res.data.data.list[0].prescribing_number_unit == res.data.data.list[0].min_unit || res.data.data.list[0].prescribing_number_unit == "" || res.data.data.list[0].prescribing_number_unit == null){
756
+          this.tableDatas[0].prescribing_number =
757
+            res.data.data.list[0].prescribing_number;
758
+          this.tableDatas[0].prescribing_number_unit =
759
+            res.data.data.list[0].prescribing_number_unit;
760
+          if (
761
+            res.data.data.list[0].prescribing_number_unit ==
762
+              res.data.data.list[0].min_unit ||
763
+            res.data.data.list[0].prescribing_number_unit == "" ||
764
+            res.data.data.list[0].prescribing_number_unit == null
765
+          ) {
713 766
             this.tableDatas[0].price = res.data.data.list[0].min_price;
714
-          }else{
767
+          } else {
715 768
             this.tableDatas[0].price = res.data.data.list[0].retail_price;
716 769
           }
717 770
           this.tableDatas[0].remark = res.data.data.list[0].remark;
718 771
           this.tableDatas[0].list_1 = res.data.data.list[0].list_1;
719 772
           this.tableDatas[0].list_2 = res.data.data.list[0].list_2;
720 773
         }
721
-      })
774
+      });
722 775
     },
723 776
     handleSelectionChange(val) {
724 777
       this.multipleSelection = val;
725 778
     },
726
-    changeid2(item,index){
727
-      item.id = item.drug_name
779
+    changeid2(item, index) {
780
+      item.id = item.drug_name;
728 781
       var params = {
729
-        id:item.id
730
-      }
731
-      getdrugsinformation(params).then((res) =>{
732
-        if (res.data.state == 1){
733
-          console.log("res??",res)
782
+        id: item.id,
783
+      };
784
+      getdrugsinformation(params).then((res) => {
785
+        if (res.data.state == 1) {
786
+          console.log("res??", res);
734 787
           this.project[0].single_dose = res.data.data.list[0].single_dose;
735 788
           this.project[0].translate = res.data.data.list[0].translate;
736 789
           this.project[0].delivery_way = res.data.data.list[0].delivery_way;
737
-          this.project[0].execution_frequency = res.data.data.list[0].execution_frequency;
790
+          this.project[0].execution_frequency =
791
+            res.data.data.list[0].execution_frequency;
738 792
           this.project[0].day = res.data.data.list[0].day;
739
-          this.project[0].prescribing_number = res.data.data.list[0].prescribing_number;
793
+          this.project[0].prescribing_number =
794
+            res.data.data.list[0].prescribing_number;
740 795
           this.project[0].unit = res.data.data.list[0].unit;
741
-          if (res.data.data.list[0].retail_price != null){
796
+          if (res.data.data.list[0].retail_price != null) {
742 797
             this.project[0].price = res.data.data.list[0].retail_price;
743
-          }else{
798
+          } else {
744 799
             this.project[0].price = res.data.data.list[0].price;
745 800
           }
746 801
 
747 802
           this.project[0].remark = res.data.data.list[0].remark;
748 803
         }
749
-      })
804
+      });
750 805
     },
751 806
     //获取配置
752
-    getdrugconfigs(){
753
-      var params = {}
754
-      replaceconfig(params).then((res) =>{
755
-        if (res.data.state == 1){
756
-          this.druglist = res.data.data.list
757
-          this.projectlist = res.data.data.list2
807
+    getdrugconfigs() {
808
+      var params = {};
809
+      replaceconfig(params).then((res) => {
810
+        if (res.data.state == 1) {
811
+          this.druglist = res.data.data.list;
812
+          this.projectlist = res.data.data.list2;
758 813
         }
759
-      })
760
-      getmodeconfigs(params).then((res) =>{
761
-        if (res.data.state == 1){
762
-          this.frequency = res.data.data.efs
763
-          this.usage = res.data.data.drugways
814
+      });
815
+      getmodeconfigs(params).then((res) => {
816
+        if (res.data.state == 1) {
817
+          this.frequency = res.data.data.efs;
818
+          this.usage = res.data.data.drugways;
764 819
         }
765
-      })
820
+      });
766 821
     },
767
-    getUsername(){
822
+    getUsername() {
768 823
       var params = {
769 824
         id: this.id,
770
-        mode: this.modeOptions_value
771
-      }
772
-      replacepeoplename(params).then((res) =>{
773
-        if (res.data.state == 1){
774
-          this.tableData = res.data.data.list
825
+        mode: this.modeOptions_value,
826
+      };
827
+      replacepeoplename(params).then((res) => {
828
+        if (res.data.state == 1) {
829
+          this.tableData = res.data.data.list;
775 830
         }
776
-      })
831
+      });
777 832
     },
778 833
     handleClose(done) {
779
-      this.$confirm('确认关闭?')
780
-        .then(_ => {
834
+      this.$confirm("确认关闭?")
835
+        .then((_) => {
781 836
           done();
782 837
         })
783
-        .catch(_ => {});
784
-    }
785
-  }
786
-
787
-}
838
+        .catch((_) => {});
839
+    },
840
+  },
841
+};
788 842
 </script>
789 843
 
790 844
 
@@ -818,7 +872,7 @@ export default {
818 872
 }
819 873
 .bannar_list {
820 874
   width: 99%;
821
-  margin-bottom: 10px;
875
+  margin-top: 10px;
822 876
   display: flex;
823 877
   justify-content: space-between;
824 878
   .banner_left {
@@ -1048,6 +1102,7 @@ export default {
1048 1102
 }
1049 1103
 
1050 1104
 /deep/ .el-table__fixed {
1105
+  height: 101px;
1051 1106
   bottom: 0 !important;
1052 1107
 }
1053 1108
 .mainCenter {