See999 4 years ago
parent
commit
d53022ca90

+ 2 - 1
src/lang/zh.js View File

@@ -230,7 +230,8 @@ export default {
230 230
     dictionaryManagement:'字典管理',
231 231
     templateManagement:'模板管理',
232 232
     drugStockUserDetail:"出库人明细",
233
-    DepartManage:"部门管理"
233
+    DepartManage:"部门管理",
234
+    basicConfig:'基础配置'
234 235
 
235 236
   },
236 237
   navbar: {

+ 2 - 0
src/router/index.js View File

@@ -43,6 +43,7 @@ import bedManagement from './modules/bedManagement'
43 43
 import dictionaryManagement from './modules/dictionaryManagement'
44 44
 import templateManagement from './modules/templateManagement'
45 45
 import DepartManage from './modules/DepartManage'
46
+import basicConfig from './modules/basicConfig'
46 47
 
47 48
 Vue.use(Router)
48 49
 
@@ -170,6 +171,7 @@ var _asy_router_map = [
170 171
   outpatientPharmacy,
171 172
   // kuyiShopping,
172 173
   integration,
174
+  basicConfig
173 175
 ]
174 176
 
175 177
 var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证

+ 16 - 0
src/router/modules/basicConfig.js View File

@@ -0,0 +1,16 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+    path: '/data/basicConfig',
5
+    component: Layout,
6
+    name:'basicConfig',
7
+    redirct: '/data/basicConfig',
8
+    children: [{
9
+        path: '/data/basicConfig',
10
+        component: () => import('@/xt_pages/data/basicConfig'),
11
+        name: 'basicConfig',
12
+        meta: {
13
+          title: 'basicConfig'
14
+        }
15
+      },]
16
+}

+ 1 - 1
src/views/layout/Layout.vue View File

@@ -127,7 +127,7 @@ export default {
127 127
     let bingli = ['User','createPatient']
128 128
     let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control']
129 129
     let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','otherManagement']
130
-    let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config']
130
+    let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig']
131 131
     let kuyishopping = ['kuyiShopping']
132 132
     let menzhenArr = []
133 133
     let bingliArr = []

+ 1 - 1
src/views/layout/components/Sidebar/index.vue View File

@@ -138,7 +138,7 @@ export default {
138 138
             this.$emit('func',a)
139 139
           }
140 140
         }else if(newVal == '配置管理'){
141
-          let nameArr = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config']
141
+          let nameArr = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig']
142 142
           // console.log('permission_routers',this.permission_routers)
143 143
           let routerArr = []
144 144
           this.permission_routers.map(item => {

+ 87 - 0
src/xt_pages/data/basicConfig.vue View File

@@ -0,0 +1,87 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+        <p style="font-size:18px">开关配置</p>
8
+        <div class="configBox">
9
+            <p>收费发药</p>
10
+            <p style="font-size:14px;margin-top:5px;">开启收费发药分离后,处方发药的工作需要到收费发药页面完成</p>
11
+            <p style="margin-top:20px;">收费,发药分离:
12
+                <el-switch v-model="value"></el-switch>
13
+            </p>
14
+        </div>
15
+        <div class="configBox">
16
+            <p>药品,耗材出库</p>
17
+            <p style="font-size:14px;margin-top:5px;">开启药品,耗材出库自动扣减则医生开完医嘱或处方可直接出库,不开启则由发药动作或出库按钮手动出库</p>
18
+            <div style="display:flex;margin-top:20px;">
19
+                <p style="margin-right:20px;">药品出库:
20
+                    <el-switch v-model="value"></el-switch>
21
+                </p>
22
+                <p>耗材出库:
23
+                    <el-switch v-model="value"></el-switch>
24
+                </p>
25
+            </div>
26
+        </div>
27
+        <div class="configBox">
28
+            <p style="margin-bottom:20px;">药品有效期预警设置(药品即将失效的预警提示)</p>
29
+            <el-select v-model="value" placeholder="请选择">
30
+                <el-option
31
+                v-for="item in options"
32
+                :key="item.value"
33
+                :label="item.label"
34
+                :value="item.value">
35
+                </el-option>
36
+            </el-select>
37
+        </div>
38
+        <div class="configBox">
39
+            <p>处方单价锁定</p>
40
+            <p style="font-size:14px;margin-top:5px;">开启处方单价锁定后,开处方是无法修改药品或者诊疗项目以及附加费用单价</p>
41
+            <p style="margin-top:20px;">收费单价锁定:
42
+                <el-switch v-model="value"></el-switch>
43
+            </p>
44
+        </div>
45
+        <div class="configBox">
46
+            <p>打印预览设置</p>
47
+            <p style="font-size:14px;margin-top:5px;">开启直接打印后,处方单,售药单,收费发票等打印时跳过预览</p>
48
+            <p style="margin-top:20px;">直接打印:
49
+                <el-switch v-model="value"></el-switch>
50
+            </p>
51
+        </div>
52
+    </div>
53
+  </div>
54
+</template>
55
+
56
+<script>
57
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
58
+
59
+export default {
60
+  name: "printTemplate",
61
+  components: { BreadCrumb},
62
+  data() {
63
+    return {
64
+      showViewer:false,
65
+      crumbs: [
66
+        { path: false, name: "管理中心" },
67
+        { path: false, name: "基础配置" }
68
+      ],
69
+      value:false
70
+    };
71
+  },
72
+  methods: {
73
+    
74
+  },
75
+  created() {
76
+    
77
+  }
78
+};
79
+</script>
80
+
81
+<style lang="scss" scoped>
82
+.configBox{
83
+    margin-top:20px;
84
+}
85
+</style>
86
+
87
+

+ 28 - 304
src/xt_pages/data/printTemplate.vue View File

@@ -3,332 +3,56 @@
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
     </div>
6
-    <div
7
-      v-loading="loading"
8
-      element-loading-text="服务器处理数据中,请稍候......."
9
-      element-loading-spinner="el-icon-loading"
10
-      element-loading-background="rgba(0, 0, 0, 0.8)"
11
-    >
12
-      <div class="app-container app-print" style="text-align: center">
13
-        <p style="margin-top: 10px;margin-bottom: 30px">
14
-          请选择你需要打印的血液透析护理记录单样式
15
-        </p>
16
-        <el-row :gutter="20" type="flex" justify="center">
17
-          <el-col :span="6" style="text-align: center">
18
-            <div
19
-              @click="imgClick('https://images.shengws.com/fangji.jpg')"
20
-            >
21
-              <el-tooltip
22
-                class="item"
23
-                effect="dark"
24
-                :hide-after="2000"
25
-                content="点击查看大图"
26
-                placement="top-start"
27
-              >
28
-                <!--<el-image-->
29
-                  <!--style="width: 200px; height: 200px"-->
30
-                  <!--:src="require('@/assets/home/1.jpg')"-->
31
-                  <!--:preview-src-list="imgs_one"-->
32
-                <!--&gt;</el-image>-->
33
-
34
-                <el-image
35
-                  style="width: 200px; height: 200px"
36
-                  :src="require('@/assets/home/1.jpg')"
37
-                ></el-image>
38
-
39
-              </el-tooltip>
40
-            </div>
41
-            <el-radio v-model="radio" label="1" @change="change"
42
-              >模版一</el-radio
43
-            >
44
-          </el-col>
45
-          <el-col
46
-            :span="6"
47
-            style="margin-left: 100px;margin-right: 100px;text-align: center"
48
-          >
49
-            <div
50
-              @click="imgClick('https://images.shengws.com/template_two.jpg')"
51
-
52
-            >
53
-              <el-tooltip
54
-                class="item"
55
-                effect="dark"
56
-                content="点击查看大图"
57
-                placement="top-start"
58
-                :hide-after="2000"
59
-              >
60
-                <!--<el-image-->
61
-                  <!--style="width: 200px; height: 200px"-->
62
-                  <!--:src="require('@/assets/home/2.jpg')"-->
63
-                  <!--:preview-src-list="imgs_two"-->
64
-                <!--&gt;</el-image>-->
65
-
66
-                <el-image
67
-                  style="width: 200px; height: 200px"
68
-                  :src="require('@/assets/home/2.jpg')"
69
-                ></el-image>
70
-              </el-tooltip>
71
-            </div>
72
-            <el-radio v-model="radio" label="2" @change="change"
73
-              >模版二</el-radio
74
-            >
75
-          </el-col>
76
-          <el-col :span="6" style="text-align: center">
77
-            <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/template_five.jpg')">
78
-              <el-tooltip
79
-                class="item"
80
-                effect="dark"
81
-                content="点击查看大图"
82
-                placement="top-start"
83
-                :hide-after="2000"
84
-              >
85
-                <!--<el-image-->
86
-                  <!--style="width: 200px; height: 200px"-->
87
-                  <!--:src="require('@/assets/home/5.jpg')"-->
88
-                  <!--:preview-src-list="imgs_five"-->
89
-                <!--&gt;</el-image>-->
90
-
91
-                <el-image
92
-                  style="width: 200px; height: 200px"
93
-                  :src="require('@/assets/home/5.jpg')"
94
-                ></el-image>
95
-
96
-              </el-tooltip>
97
-            </div>
98
-            <el-radio v-model="radio" label="5" @change="change"
99
-              >模版三</el-radio
100
-            >
101
-          </el-col>
102
-          <el-col :span="6" style="text-align: center">
103
-            <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/serven.png')">
104
-              <el-tooltip
105
-                class="item"
106
-                effect="dark"
107
-                content="点击查看大图"
108
-                placement="top-start"
109
-                :hide-after="2000"
110
-              >
111
-                <!--<el-image-->
112
-                  <!--style="width: 200px; height: 200px"-->
113
-                  <!--:src="require('@/assets/home/serven.png')"-->
114
-                  <!--:preview-src-list="imgs_seven"-->
115
-                <!--&gt;</el-image>-->
116
-
117
-                <el-image
118
-                  style="width: 200px; height: 200px"
119
-                  :src="require('@/assets/home/serven.png')"
120
-                ></el-image>
121
-              </el-tooltip>
122
-            </div>
123
-            <el-radio v-model="radio" label="7" @change="change"
124
-              >模版四</el-radio
125
-            >
126
-          </el-col>
127
-        </el-row>
128
-        <el-row :gutter="20" type="flex">
129
-          <el-col :span="6" style="text-align: center">
130
-            <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/eight.png')">
131
-              <el-tooltip
132
-                class="item"
133
-                effect="dark"
134
-                content="点击查看大图"
135
-                placement="top-start"
136
-                :hide-after="2000"
137
-              >
138
-                <!--<el-image-->
139
-                  <!--style="width: 200px; height: 200px;margin-left:-60px"-->
140
-                  <!--:src="require('@/assets/home/eight.png')"-->
141
-                  <!--:preview-src-list="imgs_six"-->
142
-                <!--&gt;</el-image>-->
143
-
144
-                <el-image
145
-                  style="width: 200px; height: 200px;margin-left:-60px"
146
-                  :src="require('@/assets/home/eight.png')"
147
-                ></el-image>
148
-              </el-tooltip>
149
-            </div>
150
-            <el-radio
151
-              v-model="radio"
152
-              label="8"
153
-              @change="change"
154
-              style="margin-left:-60px"
155
-              >模版五</el-radio
156
-            >
157
-          </el-col>
158
-          <el-col :span="6" style="text-align: center">
159
-            <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/template_six.png')">
160
-              <el-tooltip
161
-                class="item"
162
-                effect="dark"
163
-                content="点击查看大图"
164
-                placement="top-start"
165
-                :hide-after="2000"
166
-              >
167
-                <!--<el-image-->
168
-                  <!--style="width: 200px; height: 200px;margin-left:30px"-->
169
-                  <!--:src="require('@/assets/home/template_six.png')"-->
170
-                  <!--:preview-src-list="imgs_eight"-->
171
-                <!--&gt;</el-image>-->
172
-
173
-                <el-image
174
-                  style="width: 200px; height: 200px;margin-left:30px"
175
-                  :src="require('@/assets/home/template_six.png')"
176
-                ></el-image>
177
-              </el-tooltip>
178
-            </div>
179
-            <el-radio v-model="radio" label="6" @change="change"
180
-              >模版六</el-radio
181
-            >
182
-          </el-col>
183
-
184
-          <!--<el-col :span="6" style="text-align: center">-->
185
-          <!--<div class="demo-image__preview">-->
186
-          <!--<el-tooltip-->
187
-          <!--class="item"-->
188
-          <!--effect="dark"-->
189
-          <!--content="点击查看大图"-->
190
-          <!--placement="top-start"-->
191
-          <!--:hide-after="2000"-->
192
-          <!--&gt;-->
193
-          <!--<el-image-->
194
-          <!--style="width: 200px; height: 200px;margin-left:30px"-->
195
-          <!--:src="require('@/assets/home/template_ten.jpg')"-->
196
-          <!--:preview-src-list="imgs_ten"-->
197
-          <!--&gt;</el-image>-->
198
-          <!--</el-tooltip>-->
199
-          <!--</div>-->
200
-          <!--<el-radio v-model="radio" label="10" @change="change"-->
201
-          <!--&gt;模版十</el-radio-->
202
-          <!--&gt;-->
203
-          <!--</el-col>-->
204
-        </el-row>
205
-      </div>
206
-
207
-
208
-      <el-image-viewer
209
-        v-if="showViewer"
210
-        :on-close="closeViewer"
211
-        :url-list="imgs"
212
-      ></el-image-viewer>
213
-
6
+    <div class="app-container app-print" style="text-align: center">
7
+      <el-tabs v-model="activeName">
8
+        <el-tab-pane label="电子病历模板" name="1">
9
+          <record-print></record-print>
10
+        </el-tab-pane>
11
+        <el-tab-pane label="处方模板" name="2">
12
+          <prescription-print></prescription-print>
13
+        </el-tab-pane>
14
+        <el-tab-pane label="处方治疗模板" name="3">
15
+          <treat-print></treat-print>
16
+        </el-tab-pane>
17
+        <el-tab-pane label="透析记录模板" name="4">
18
+          <dialysis-print></dialysis-print>
19
+        </el-tab-pane>
20
+        <el-tab-pane label="门诊收费明细模板" name="5">
21
+          <charge-print></charge-print>
22
+        </el-tab-pane>
23
+      </el-tabs>
214 24
     </div>
215 25
   </div>
216 26
 </template>
217 27
 
218 28
 <script>
219 29
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
220
-import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
221
-import { getPrintTemplate, postPrintTemplate } from "@/api/data";
222
-import store from "@/store";
30
+import recordPrint from './printTemplate/recordPrint'
31
+import prescriptionPrint from './printTemplate/prescriptionPrint'
32
+import treatPrint from './printTemplate/treatPrint'
33
+import dialysisPrint from './printTemplate/dialysisPrint'
34
+import chargePrint from './printTemplate/chargePrint'
223 35
 
224 36
 export default {
225 37
   name: "printTemplate",
226
-  components: { ElImageViewer, BreadCrumb },
38
+  components: { BreadCrumb,recordPrint,prescriptionPrint,treatPrint,dialysisPrint,chargePrint },
227 39
   data() {
228 40
     return {
229 41
       showViewer:false,
230 42
       crumbs: [
231 43
         { path: false, name: "管理中心" },
232
-        { path: "data/print", name: "打印模版" }
233
-      ],
234
-      imgUrl_One: require("@/assets/home/1.jpg"),
235
-      imgUrl_Two: require("@/assets/home/2.jpg"),
236
-      imgUrl_Five: require("@/assets/home/5.jpg"),
237
-
238
-      imgs:[],
239
-
240
-      imgs_one: [
241
-        // 'https://images.shengws.com/template_one.jpg'
242
-        "https://images.shengws.com/fangji.jpg"
44
+        { path: "data/print", name: "模版" }
243 45
       ],
244
-      imgs_two: ["https://images.shengws.com/template_two.jpg"],
245
-      imgs_five: ["https://images.shengws.com/template_five.jpg"],
246
-      imgs_seven: ["https://images.shengws.com/serven.png"],
247
-      imgs_six: ["https://images.shengws.com/eight.png"],
248
-      imgs_eight: ["https://images.shengws.com/template_six.png"],
249
-      imgs_ten: ["https://kuyi.shengws.com/template_ten.jpg"],
250
-
251
-      delay: 500,
252
-      radio: 0,
253
-      tempRadio: 0,
254
-      loading: false
46
+      activeName: '1'
255 47
     };
256 48
   },
257 49
   methods: {
258
-    imgClick(val){
259
-      this.imgs = []
260
-      this.imgs.push(val)
261
-      this.showViewer = true
262
-
263
-    },
264
-    closeViewer() {
265
-      this.showViewer = false
266
-    },
267
-    change: function(val) {
268
-      console.log("val是什么", val);
269
-      this.$confirm(
270
-        "切换模版后,透析记录的字段会根据打印单来显示与隐藏,是否确定切换模版",
271
-        "提示",
272
-        {
273
-          confirmButtonText: "确定",
274
-          cancelButtonText: "取消",
275
-          type: "info"
276
-        }
277
-      )
278
-        .then(() => {
279
-          this.loading = true;
280
-          postPrintTemplate(val).then(response => {
281
-            if (response.data.state == 1) {
282
-              var template_id = response.data.data.template_id;
283
-              this.radio = template_id.toString();
284
-              this.tempRadio = template_id.toString();
285
-              // 同步
286
-              // console.log(response.data.data.fileds)
287
-              this.loading = false;
288
-              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
289
-              this.$message({
290
-                type: "success",
291
-                message: "切换成功"
292
-              });
293
-            }
294
-          });
295
-        })
296
-        .catch(() => {
297
-          this.radio = this.tempRadio;
298
-        });
299
-    }
50
+    
300 51
   },
301 52
   created() {
302
-    getPrintTemplate().then(response => {
303
-      if (response.data.state == 0) {
304
-        this.$message.error(response.data.msg);
305
-        return false;
306
-      } else {
307
-        var template = response.data.data.template;
308
-        this.radio = template.template_id.toString();
309
-        this.tempRadio = template.template_id.toString();
310
-      }
311
-    });
53
+    
312 54
   }
313 55
 };
314 56
 </script>
315 57
 
316
-<style scoped>
317
-.el-row {
318
-  margin-bottom: 20px;
319 58
 
320
-  & :last-child {
321
-    margin-bottom: 0;
322
-  }
323
-}
324
-.el-col {
325
-  border-radius: 4px;
326
-}
327
-</style>
328
-<style lang="scss">
329
-.app-print {
330
-  .el-radio__label {
331
-    padding-left: 10px;
332
-  }
333
-}
334
-</style>

+ 328 - 0
src/xt_pages/data/printTemplate/chargePrint.vue View File

@@ -0,0 +1,328 @@
1
+<template>
2
+    <div
3
+      v-loading="loading"
4
+      element-loading-text="服务器处理数据中,请稍候......."
5
+      element-loading-spinner="el-icon-loading"
6
+      element-loading-background="rgba(0, 0, 0, 0.8)"
7
+    >
8
+    <p style="margin-top: 10px;margin-bottom: 30px">
9
+        请选择你需要打印的血液透析护理记录单样式
10
+    </p>
11
+    <el-row :gutter="20" type="flex" justify="center">
12
+        <el-col :span="6" style="text-align: center">
13
+        <div
14
+            @click="imgClick('https://images.shengws.com/fangji.jpg')"
15
+        >
16
+            <el-tooltip
17
+            class="item"
18
+            effect="dark"
19
+            :hide-after="2000"
20
+            content="点击查看大图"
21
+            placement="top-start"
22
+            >
23
+            <!--<el-image-->
24
+                <!--style="width: 200px; height: 200px"-->
25
+                <!--:src="require('@/assets/home/1.jpg')"-->
26
+                <!--:preview-src-list="imgs_one"-->
27
+            <!--&gt;</el-image>-->
28
+
29
+            <el-image
30
+                style="width: 200px; height: 200px"
31
+                :src="require('@/assets/home/1.jpg')"
32
+            ></el-image>
33
+
34
+            </el-tooltip>
35
+        </div>
36
+        <el-radio v-model="radio" label="1" @change="change"
37
+            >模版一</el-radio
38
+        >
39
+        </el-col>
40
+        <el-col
41
+        :span="6"
42
+        style="margin-left: 100px;margin-right: 100px;text-align: center"
43
+        >
44
+        <div
45
+            @click="imgClick('https://images.shengws.com/template_two.jpg')"
46
+
47
+        >
48
+            <el-tooltip
49
+            class="item"
50
+            effect="dark"
51
+            content="点击查看大图"
52
+            placement="top-start"
53
+            :hide-after="2000"
54
+            >
55
+            <!--<el-image-->
56
+                <!--style="width: 200px; height: 200px"-->
57
+                <!--:src="require('@/assets/home/2.jpg')"-->
58
+                <!--:preview-src-list="imgs_two"-->
59
+            <!--&gt;</el-image>-->
60
+
61
+            <el-image
62
+                style="width: 200px; height: 200px"
63
+                :src="require('@/assets/home/2.jpg')"
64
+            ></el-image>
65
+            </el-tooltip>
66
+        </div>
67
+        <el-radio v-model="radio" label="2" @change="change"
68
+            >模版二</el-radio
69
+        >
70
+        </el-col>
71
+        <el-col :span="6" style="text-align: center">
72
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/template_five.jpg')">
73
+            <el-tooltip
74
+            class="item"
75
+            effect="dark"
76
+            content="点击查看大图"
77
+            placement="top-start"
78
+            :hide-after="2000"
79
+            >
80
+            <!--<el-image-->
81
+                <!--style="width: 200px; height: 200px"-->
82
+                <!--:src="require('@/assets/home/5.jpg')"-->
83
+                <!--:preview-src-list="imgs_five"-->
84
+            <!--&gt;</el-image>-->
85
+
86
+            <el-image
87
+                style="width: 200px; height: 200px"
88
+                :src="require('@/assets/home/5.jpg')"
89
+            ></el-image>
90
+
91
+            </el-tooltip>
92
+        </div>
93
+        <el-radio v-model="radio" label="5" @change="change"
94
+            >模版三</el-radio
95
+        >
96
+        </el-col>
97
+        <el-col :span="6" style="text-align: center">
98
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/serven.png')">
99
+            <el-tooltip
100
+            class="item"
101
+            effect="dark"
102
+            content="点击查看大图"
103
+            placement="top-start"
104
+            :hide-after="2000"
105
+            >
106
+            <!--<el-image-->
107
+                <!--style="width: 200px; height: 200px"-->
108
+                <!--:src="require('@/assets/home/serven.png')"-->
109
+                <!--:preview-src-list="imgs_seven"-->
110
+            <!--&gt;</el-image>-->
111
+
112
+            <el-image
113
+                style="width: 200px; height: 200px"
114
+                :src="require('@/assets/home/serven.png')"
115
+            ></el-image>
116
+            </el-tooltip>
117
+        </div>
118
+        <el-radio v-model="radio" label="7" @change="change"
119
+            >模版四</el-radio
120
+        >
121
+        </el-col>
122
+    </el-row>
123
+    <el-row :gutter="20" type="flex">
124
+        <el-col :span="6" style="text-align: center">
125
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/eight.png')">
126
+            <el-tooltip
127
+            class="item"
128
+            effect="dark"
129
+            content="点击查看大图"
130
+            placement="top-start"
131
+            :hide-after="2000"
132
+            >
133
+            <!--<el-image-->
134
+                <!--style="width: 200px; height: 200px;margin-left:-60px"-->
135
+                <!--:src="require('@/assets/home/eight.png')"-->
136
+                <!--:preview-src-list="imgs_six"-->
137
+            <!--&gt;</el-image>-->
138
+
139
+            <el-image
140
+                style="width: 200px; height: 200px;margin-left:-60px"
141
+                :src="require('@/assets/home/eight.png')"
142
+            ></el-image>
143
+            </el-tooltip>
144
+        </div>
145
+        <el-radio
146
+            v-model="radio"
147
+            label="8"
148
+            @change="change"
149
+            style="margin-left:-60px"
150
+            >模版五</el-radio
151
+        >
152
+        </el-col>
153
+        <el-col :span="6" style="text-align: center">
154
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/template_six.png')">
155
+            <el-tooltip
156
+            class="item"
157
+            effect="dark"
158
+            content="点击查看大图"
159
+            placement="top-start"
160
+            :hide-after="2000"
161
+            >
162
+            <!--<el-image-->
163
+                <!--style="width: 200px; height: 200px;margin-left:30px"-->
164
+                <!--:src="require('@/assets/home/template_six.png')"-->
165
+                <!--:preview-src-list="imgs_eight"-->
166
+            <!--&gt;</el-image>-->
167
+
168
+            <el-image
169
+                style="width: 200px; height: 200px;margin-left:30px"
170
+                :src="require('@/assets/home/template_six.png')"
171
+            ></el-image>
172
+            </el-tooltip>
173
+        </div>
174
+        <el-radio v-model="radio" label="6" @change="change"
175
+            >模版六</el-radio
176
+        >
177
+        </el-col>
178
+
179
+        <!--<el-col :span="6" style="text-align: center">-->
180
+        <!--<div class="demo-image__preview">-->
181
+        <!--<el-tooltip-->
182
+        <!--class="item"-->
183
+        <!--effect="dark"-->
184
+        <!--content="点击查看大图"-->
185
+        <!--placement="top-start"-->
186
+        <!--:hide-after="2000"-->
187
+        <!--&gt;-->
188
+        <!--<el-image-->
189
+        <!--style="width: 200px; height: 200px;margin-left:30px"-->
190
+        <!--:src="require('@/assets/home/template_ten.jpg')"-->
191
+        <!--:preview-src-list="imgs_ten"-->
192
+        <!--&gt;</el-image>-->
193
+        <!--</el-tooltip>-->
194
+        <!--</div>-->
195
+        <!--<el-radio v-model="radio" label="10" @change="change"-->
196
+        <!--&gt;模版十</el-radio-->
197
+        <!--&gt;-->
198
+        <!--</el-col>-->
199
+    </el-row>
200
+
201
+
202
+      <el-image-viewer
203
+        v-if="showViewer"
204
+        :on-close="closeViewer"
205
+        :url-list="imgs"
206
+      ></el-image-viewer>
207
+
208
+    </div>
209
+  </div>
210
+</template>
211
+
212
+<script>
213
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
214
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
215
+import { getPrintTemplate, postPrintTemplate } from "@/api/data";
216
+import store from "@/store";
217
+
218
+export default {
219
+  name: "printTemplate",
220
+  components: { ElImageViewer, BreadCrumb },
221
+  data() {
222
+    return {
223
+      showViewer:false,
224
+      crumbs: [
225
+        { path: false, name: "管理中心" },
226
+        { path: "data/print", name: "打印模版" }
227
+      ],
228
+      imgUrl_One: require("@/assets/home/1.jpg"),
229
+      imgUrl_Two: require("@/assets/home/2.jpg"),
230
+      imgUrl_Five: require("@/assets/home/5.jpg"),
231
+
232
+      imgs:[],
233
+
234
+      imgs_one: [
235
+        // 'https://images.shengws.com/template_one.jpg'
236
+        "https://images.shengws.com/fangji.jpg"
237
+      ],
238
+      imgs_two: ["https://images.shengws.com/template_two.jpg"],
239
+      imgs_five: ["https://images.shengws.com/template_five.jpg"],
240
+      imgs_seven: ["https://images.shengws.com/serven.png"],
241
+      imgs_six: ["https://images.shengws.com/eight.png"],
242
+      imgs_eight: ["https://images.shengws.com/template_six.png"],
243
+      imgs_ten: ["https://kuyi.shengws.com/template_ten.jpg"],
244
+
245
+      delay: 500,
246
+      radio: 0,
247
+      tempRadio: 0,
248
+      loading: false
249
+    };
250
+  },
251
+  methods: {
252
+    imgClick(val){
253
+      this.imgs = []
254
+      this.imgs.push(val)
255
+      this.showViewer = true
256
+
257
+    },
258
+    closeViewer() {
259
+      this.showViewer = false
260
+    },
261
+    change: function(val) {
262
+      console.log("val是什么", val);
263
+      this.$confirm(
264
+        "切换模版后,透析记录的字段会根据打印单来显示与隐藏,是否确定切换模版",
265
+        "提示",
266
+        {
267
+          confirmButtonText: "确定",
268
+          cancelButtonText: "取消",
269
+          type: "info"
270
+        }
271
+      )
272
+        .then(() => {
273
+          this.loading = true;
274
+          postPrintTemplate(val).then(response => {
275
+            if (response.data.state == 1) {
276
+              var template_id = response.data.data.template_id;
277
+              this.radio = template_id.toString();
278
+              this.tempRadio = template_id.toString();
279
+              // 同步
280
+              // console.log(response.data.data.fileds)
281
+              this.loading = false;
282
+              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
283
+              this.$message({
284
+                type: "success",
285
+                message: "切换成功"
286
+              });
287
+            }
288
+          });
289
+        })
290
+        .catch(() => {
291
+          this.radio = this.tempRadio;
292
+        });
293
+    }
294
+  },
295
+  created() {
296
+    getPrintTemplate().then(response => {
297
+      if (response.data.state == 0) {
298
+        this.$message.error(response.data.msg);
299
+        return false;
300
+      } else {
301
+        var template = response.data.data.template;
302
+        this.radio = template.template_id.toString();
303
+        this.tempRadio = template.template_id.toString();
304
+      }
305
+    });
306
+  }
307
+};
308
+</script>
309
+
310
+<style scoped>
311
+.el-row {
312
+  margin-bottom: 20px;
313
+
314
+  & :last-child {
315
+    margin-bottom: 0;
316
+  }
317
+}
318
+.el-col {
319
+  border-radius: 4px;
320
+}
321
+</style>
322
+<style lang="scss">
323
+.app-print {
324
+  .el-radio__label {
325
+    padding-left: 10px;
326
+  }
327
+}
328
+</style>

+ 328 - 0
src/xt_pages/data/printTemplate/dialysisPrint.vue View File

@@ -0,0 +1,328 @@
1
+<template>
2
+    <div
3
+      v-loading="loading"
4
+      element-loading-text="服务器处理数据中,请稍候......."
5
+      element-loading-spinner="el-icon-loading"
6
+      element-loading-background="rgba(0, 0, 0, 0.8)"
7
+    >
8
+    <p style="margin-top: 10px;margin-bottom: 30px">
9
+        请选择你需要打印的血液透析护理记录单样式
10
+    </p>
11
+    <el-row :gutter="20" type="flex" justify="center">
12
+        <el-col :span="6" style="text-align: center">
13
+        <div
14
+            @click="imgClick('https://images.shengws.com/fangji.jpg')"
15
+        >
16
+            <el-tooltip
17
+            class="item"
18
+            effect="dark"
19
+            :hide-after="2000"
20
+            content="点击查看大图"
21
+            placement="top-start"
22
+            >
23
+            <!--<el-image-->
24
+                <!--style="width: 200px; height: 200px"-->
25
+                <!--:src="require('@/assets/home/1.jpg')"-->
26
+                <!--:preview-src-list="imgs_one"-->
27
+            <!--&gt;</el-image>-->
28
+
29
+            <el-image
30
+                style="width: 200px; height: 200px"
31
+                :src="require('@/assets/home/1.jpg')"
32
+            ></el-image>
33
+
34
+            </el-tooltip>
35
+        </div>
36
+        <el-radio v-model="radio" label="1" @change="change"
37
+            >模版一</el-radio
38
+        >
39
+        </el-col>
40
+        <el-col
41
+        :span="6"
42
+        style="margin-left: 100px;margin-right: 100px;text-align: center"
43
+        >
44
+        <div
45
+            @click="imgClick('https://images.shengws.com/template_two.jpg')"
46
+
47
+        >
48
+            <el-tooltip
49
+            class="item"
50
+            effect="dark"
51
+            content="点击查看大图"
52
+            placement="top-start"
53
+            :hide-after="2000"
54
+            >
55
+            <!--<el-image-->
56
+                <!--style="width: 200px; height: 200px"-->
57
+                <!--:src="require('@/assets/home/2.jpg')"-->
58
+                <!--:preview-src-list="imgs_two"-->
59
+            <!--&gt;</el-image>-->
60
+
61
+            <el-image
62
+                style="width: 200px; height: 200px"
63
+                :src="require('@/assets/home/2.jpg')"
64
+            ></el-image>
65
+            </el-tooltip>
66
+        </div>
67
+        <el-radio v-model="radio" label="2" @change="change"
68
+            >模版二</el-radio
69
+        >
70
+        </el-col>
71
+        <el-col :span="6" style="text-align: center">
72
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/template_five.jpg')">
73
+            <el-tooltip
74
+            class="item"
75
+            effect="dark"
76
+            content="点击查看大图"
77
+            placement="top-start"
78
+            :hide-after="2000"
79
+            >
80
+            <!--<el-image-->
81
+                <!--style="width: 200px; height: 200px"-->
82
+                <!--:src="require('@/assets/home/5.jpg')"-->
83
+                <!--:preview-src-list="imgs_five"-->
84
+            <!--&gt;</el-image>-->
85
+
86
+            <el-image
87
+                style="width: 200px; height: 200px"
88
+                :src="require('@/assets/home/5.jpg')"
89
+            ></el-image>
90
+
91
+            </el-tooltip>
92
+        </div>
93
+        <el-radio v-model="radio" label="5" @change="change"
94
+            >模版三</el-radio
95
+        >
96
+        </el-col>
97
+        <el-col :span="6" style="text-align: center">
98
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/serven.png')">
99
+            <el-tooltip
100
+            class="item"
101
+            effect="dark"
102
+            content="点击查看大图"
103
+            placement="top-start"
104
+            :hide-after="2000"
105
+            >
106
+            <!--<el-image-->
107
+                <!--style="width: 200px; height: 200px"-->
108
+                <!--:src="require('@/assets/home/serven.png')"-->
109
+                <!--:preview-src-list="imgs_seven"-->
110
+            <!--&gt;</el-image>-->
111
+
112
+            <el-image
113
+                style="width: 200px; height: 200px"
114
+                :src="require('@/assets/home/serven.png')"
115
+            ></el-image>
116
+            </el-tooltip>
117
+        </div>
118
+        <el-radio v-model="radio" label="7" @change="change"
119
+            >模版四</el-radio
120
+        >
121
+        </el-col>
122
+    </el-row>
123
+    <el-row :gutter="20" type="flex">
124
+        <el-col :span="6" style="text-align: center">
125
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/eight.png')">
126
+            <el-tooltip
127
+            class="item"
128
+            effect="dark"
129
+            content="点击查看大图"
130
+            placement="top-start"
131
+            :hide-after="2000"
132
+            >
133
+            <!--<el-image-->
134
+                <!--style="width: 200px; height: 200px;margin-left:-60px"-->
135
+                <!--:src="require('@/assets/home/eight.png')"-->
136
+                <!--:preview-src-list="imgs_six"-->
137
+            <!--&gt;</el-image>-->
138
+
139
+            <el-image
140
+                style="width: 200px; height: 200px;margin-left:-60px"
141
+                :src="require('@/assets/home/eight.png')"
142
+            ></el-image>
143
+            </el-tooltip>
144
+        </div>
145
+        <el-radio
146
+            v-model="radio"
147
+            label="8"
148
+            @change="change"
149
+            style="margin-left:-60px"
150
+            >模版五</el-radio
151
+        >
152
+        </el-col>
153
+        <el-col :span="6" style="text-align: center">
154
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/template_six.png')">
155
+            <el-tooltip
156
+            class="item"
157
+            effect="dark"
158
+            content="点击查看大图"
159
+            placement="top-start"
160
+            :hide-after="2000"
161
+            >
162
+            <!--<el-image-->
163
+                <!--style="width: 200px; height: 200px;margin-left:30px"-->
164
+                <!--:src="require('@/assets/home/template_six.png')"-->
165
+                <!--:preview-src-list="imgs_eight"-->
166
+            <!--&gt;</el-image>-->
167
+
168
+            <el-image
169
+                style="width: 200px; height: 200px;margin-left:30px"
170
+                :src="require('@/assets/home/template_six.png')"
171
+            ></el-image>
172
+            </el-tooltip>
173
+        </div>
174
+        <el-radio v-model="radio" label="6" @change="change"
175
+            >模版六</el-radio
176
+        >
177
+        </el-col>
178
+
179
+        <!--<el-col :span="6" style="text-align: center">-->
180
+        <!--<div class="demo-image__preview">-->
181
+        <!--<el-tooltip-->
182
+        <!--class="item"-->
183
+        <!--effect="dark"-->
184
+        <!--content="点击查看大图"-->
185
+        <!--placement="top-start"-->
186
+        <!--:hide-after="2000"-->
187
+        <!--&gt;-->
188
+        <!--<el-image-->
189
+        <!--style="width: 200px; height: 200px;margin-left:30px"-->
190
+        <!--:src="require('@/assets/home/template_ten.jpg')"-->
191
+        <!--:preview-src-list="imgs_ten"-->
192
+        <!--&gt;</el-image>-->
193
+        <!--</el-tooltip>-->
194
+        <!--</div>-->
195
+        <!--<el-radio v-model="radio" label="10" @change="change"-->
196
+        <!--&gt;模版十</el-radio-->
197
+        <!--&gt;-->
198
+        <!--</el-col>-->
199
+    </el-row>
200
+
201
+
202
+      <el-image-viewer
203
+        v-if="showViewer"
204
+        :on-close="closeViewer"
205
+        :url-list="imgs"
206
+      ></el-image-viewer>
207
+
208
+    </div>
209
+  </div>
210
+</template>
211
+
212
+<script>
213
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
214
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
215
+import { getPrintTemplate, postPrintTemplate } from "@/api/data";
216
+import store from "@/store";
217
+
218
+export default {
219
+  name: "printTemplate",
220
+  components: { ElImageViewer, BreadCrumb },
221
+  data() {
222
+    return {
223
+      showViewer:false,
224
+      crumbs: [
225
+        { path: false, name: "管理中心" },
226
+        { path: "data/print", name: "打印模版" }
227
+      ],
228
+      imgUrl_One: require("@/assets/home/1.jpg"),
229
+      imgUrl_Two: require("@/assets/home/2.jpg"),
230
+      imgUrl_Five: require("@/assets/home/5.jpg"),
231
+
232
+      imgs:[],
233
+
234
+      imgs_one: [
235
+        // 'https://images.shengws.com/template_one.jpg'
236
+        "https://images.shengws.com/fangji.jpg"
237
+      ],
238
+      imgs_two: ["https://images.shengws.com/template_two.jpg"],
239
+      imgs_five: ["https://images.shengws.com/template_five.jpg"],
240
+      imgs_seven: ["https://images.shengws.com/serven.png"],
241
+      imgs_six: ["https://images.shengws.com/eight.png"],
242
+      imgs_eight: ["https://images.shengws.com/template_six.png"],
243
+      imgs_ten: ["https://kuyi.shengws.com/template_ten.jpg"],
244
+
245
+      delay: 500,
246
+      radio: 0,
247
+      tempRadio: 0,
248
+      loading: false
249
+    };
250
+  },
251
+  methods: {
252
+    imgClick(val){
253
+      this.imgs = []
254
+      this.imgs.push(val)
255
+      this.showViewer = true
256
+
257
+    },
258
+    closeViewer() {
259
+      this.showViewer = false
260
+    },
261
+    change: function(val) {
262
+      console.log("val是什么", val);
263
+      this.$confirm(
264
+        "切换模版后,透析记录的字段会根据打印单来显示与隐藏,是否确定切换模版",
265
+        "提示",
266
+        {
267
+          confirmButtonText: "确定",
268
+          cancelButtonText: "取消",
269
+          type: "info"
270
+        }
271
+      )
272
+        .then(() => {
273
+          this.loading = true;
274
+          postPrintTemplate(val).then(response => {
275
+            if (response.data.state == 1) {
276
+              var template_id = response.data.data.template_id;
277
+              this.radio = template_id.toString();
278
+              this.tempRadio = template_id.toString();
279
+              // 同步
280
+              // console.log(response.data.data.fileds)
281
+              this.loading = false;
282
+              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
283
+              this.$message({
284
+                type: "success",
285
+                message: "切换成功"
286
+              });
287
+            }
288
+          });
289
+        })
290
+        .catch(() => {
291
+          this.radio = this.tempRadio;
292
+        });
293
+    }
294
+  },
295
+  created() {
296
+    getPrintTemplate().then(response => {
297
+      if (response.data.state == 0) {
298
+        this.$message.error(response.data.msg);
299
+        return false;
300
+      } else {
301
+        var template = response.data.data.template;
302
+        this.radio = template.template_id.toString();
303
+        this.tempRadio = template.template_id.toString();
304
+      }
305
+    });
306
+  }
307
+};
308
+</script>
309
+
310
+<style scoped>
311
+.el-row {
312
+  margin-bottom: 20px;
313
+
314
+  & :last-child {
315
+    margin-bottom: 0;
316
+  }
317
+}
318
+.el-col {
319
+  border-radius: 4px;
320
+}
321
+</style>
322
+<style lang="scss">
323
+.app-print {
324
+  .el-radio__label {
325
+    padding-left: 10px;
326
+  }
327
+}
328
+</style>

+ 328 - 0
src/xt_pages/data/printTemplate/prescriptionPrint.vue View File

@@ -0,0 +1,328 @@
1
+<template>
2
+    <div
3
+      v-loading="loading"
4
+      element-loading-text="服务器处理数据中,请稍候......."
5
+      element-loading-spinner="el-icon-loading"
6
+      element-loading-background="rgba(0, 0, 0, 0.8)"
7
+    >
8
+    <p style="margin-top: 10px;margin-bottom: 30px">
9
+        请选择你需要打印的血液透析护理记录单样式
10
+    </p>
11
+    <el-row :gutter="20" type="flex" justify="center">
12
+        <el-col :span="6" style="text-align: center">
13
+        <div
14
+            @click="imgClick('https://images.shengws.com/fangji.jpg')"
15
+        >
16
+            <el-tooltip
17
+            class="item"
18
+            effect="dark"
19
+            :hide-after="2000"
20
+            content="点击查看大图"
21
+            placement="top-start"
22
+            >
23
+            <!--<el-image-->
24
+                <!--style="width: 200px; height: 200px"-->
25
+                <!--:src="require('@/assets/home/1.jpg')"-->
26
+                <!--:preview-src-list="imgs_one"-->
27
+            <!--&gt;</el-image>-->
28
+
29
+            <el-image
30
+                style="width: 200px; height: 200px"
31
+                :src="require('@/assets/home/1.jpg')"
32
+            ></el-image>
33
+
34
+            </el-tooltip>
35
+        </div>
36
+        <el-radio v-model="radio" label="1" @change="change"
37
+            >模版一</el-radio
38
+        >
39
+        </el-col>
40
+        <el-col
41
+        :span="6"
42
+        style="margin-left: 100px;margin-right: 100px;text-align: center"
43
+        >
44
+        <div
45
+            @click="imgClick('https://images.shengws.com/template_two.jpg')"
46
+
47
+        >
48
+            <el-tooltip
49
+            class="item"
50
+            effect="dark"
51
+            content="点击查看大图"
52
+            placement="top-start"
53
+            :hide-after="2000"
54
+            >
55
+            <!--<el-image-->
56
+                <!--style="width: 200px; height: 200px"-->
57
+                <!--:src="require('@/assets/home/2.jpg')"-->
58
+                <!--:preview-src-list="imgs_two"-->
59
+            <!--&gt;</el-image>-->
60
+
61
+            <el-image
62
+                style="width: 200px; height: 200px"
63
+                :src="require('@/assets/home/2.jpg')"
64
+            ></el-image>
65
+            </el-tooltip>
66
+        </div>
67
+        <el-radio v-model="radio" label="2" @change="change"
68
+            >模版二</el-radio
69
+        >
70
+        </el-col>
71
+        <el-col :span="6" style="text-align: center">
72
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/template_five.jpg')">
73
+            <el-tooltip
74
+            class="item"
75
+            effect="dark"
76
+            content="点击查看大图"
77
+            placement="top-start"
78
+            :hide-after="2000"
79
+            >
80
+            <!--<el-image-->
81
+                <!--style="width: 200px; height: 200px"-->
82
+                <!--:src="require('@/assets/home/5.jpg')"-->
83
+                <!--:preview-src-list="imgs_five"-->
84
+            <!--&gt;</el-image>-->
85
+
86
+            <el-image
87
+                style="width: 200px; height: 200px"
88
+                :src="require('@/assets/home/5.jpg')"
89
+            ></el-image>
90
+
91
+            </el-tooltip>
92
+        </div>
93
+        <el-radio v-model="radio" label="5" @change="change"
94
+            >模版三</el-radio
95
+        >
96
+        </el-col>
97
+        <el-col :span="6" style="text-align: center">
98
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/serven.png')">
99
+            <el-tooltip
100
+            class="item"
101
+            effect="dark"
102
+            content="点击查看大图"
103
+            placement="top-start"
104
+            :hide-after="2000"
105
+            >
106
+            <!--<el-image-->
107
+                <!--style="width: 200px; height: 200px"-->
108
+                <!--:src="require('@/assets/home/serven.png')"-->
109
+                <!--:preview-src-list="imgs_seven"-->
110
+            <!--&gt;</el-image>-->
111
+
112
+            <el-image
113
+                style="width: 200px; height: 200px"
114
+                :src="require('@/assets/home/serven.png')"
115
+            ></el-image>
116
+            </el-tooltip>
117
+        </div>
118
+        <el-radio v-model="radio" label="7" @change="change"
119
+            >模版四</el-radio
120
+        >
121
+        </el-col>
122
+    </el-row>
123
+    <el-row :gutter="20" type="flex">
124
+        <el-col :span="6" style="text-align: center">
125
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/eight.png')">
126
+            <el-tooltip
127
+            class="item"
128
+            effect="dark"
129
+            content="点击查看大图"
130
+            placement="top-start"
131
+            :hide-after="2000"
132
+            >
133
+            <!--<el-image-->
134
+                <!--style="width: 200px; height: 200px;margin-left:-60px"-->
135
+                <!--:src="require('@/assets/home/eight.png')"-->
136
+                <!--:preview-src-list="imgs_six"-->
137
+            <!--&gt;</el-image>-->
138
+
139
+            <el-image
140
+                style="width: 200px; height: 200px;margin-left:-60px"
141
+                :src="require('@/assets/home/eight.png')"
142
+            ></el-image>
143
+            </el-tooltip>
144
+        </div>
145
+        <el-radio
146
+            v-model="radio"
147
+            label="8"
148
+            @change="change"
149
+            style="margin-left:-60px"
150
+            >模版五</el-radio
151
+        >
152
+        </el-col>
153
+        <el-col :span="6" style="text-align: center">
154
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/template_six.png')">
155
+            <el-tooltip
156
+            class="item"
157
+            effect="dark"
158
+            content="点击查看大图"
159
+            placement="top-start"
160
+            :hide-after="2000"
161
+            >
162
+            <!--<el-image-->
163
+                <!--style="width: 200px; height: 200px;margin-left:30px"-->
164
+                <!--:src="require('@/assets/home/template_six.png')"-->
165
+                <!--:preview-src-list="imgs_eight"-->
166
+            <!--&gt;</el-image>-->
167
+
168
+            <el-image
169
+                style="width: 200px; height: 200px;margin-left:30px"
170
+                :src="require('@/assets/home/template_six.png')"
171
+            ></el-image>
172
+            </el-tooltip>
173
+        </div>
174
+        <el-radio v-model="radio" label="6" @change="change"
175
+            >模版六</el-radio
176
+        >
177
+        </el-col>
178
+
179
+        <!--<el-col :span="6" style="text-align: center">-->
180
+        <!--<div class="demo-image__preview">-->
181
+        <!--<el-tooltip-->
182
+        <!--class="item"-->
183
+        <!--effect="dark"-->
184
+        <!--content="点击查看大图"-->
185
+        <!--placement="top-start"-->
186
+        <!--:hide-after="2000"-->
187
+        <!--&gt;-->
188
+        <!--<el-image-->
189
+        <!--style="width: 200px; height: 200px;margin-left:30px"-->
190
+        <!--:src="require('@/assets/home/template_ten.jpg')"-->
191
+        <!--:preview-src-list="imgs_ten"-->
192
+        <!--&gt;</el-image>-->
193
+        <!--</el-tooltip>-->
194
+        <!--</div>-->
195
+        <!--<el-radio v-model="radio" label="10" @change="change"-->
196
+        <!--&gt;模版十</el-radio-->
197
+        <!--&gt;-->
198
+        <!--</el-col>-->
199
+    </el-row>
200
+
201
+
202
+      <el-image-viewer
203
+        v-if="showViewer"
204
+        :on-close="closeViewer"
205
+        :url-list="imgs"
206
+      ></el-image-viewer>
207
+
208
+    </div>
209
+  </div>
210
+</template>
211
+
212
+<script>
213
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
214
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
215
+import { getPrintTemplate, postPrintTemplate } from "@/api/data";
216
+import store from "@/store";
217
+
218
+export default {
219
+  name: "printTemplate",
220
+  components: { ElImageViewer, BreadCrumb },
221
+  data() {
222
+    return {
223
+      showViewer:false,
224
+      crumbs: [
225
+        { path: false, name: "管理中心" },
226
+        { path: "data/print", name: "打印模版" }
227
+      ],
228
+      imgUrl_One: require("@/assets/home/1.jpg"),
229
+      imgUrl_Two: require("@/assets/home/2.jpg"),
230
+      imgUrl_Five: require("@/assets/home/5.jpg"),
231
+
232
+      imgs:[],
233
+
234
+      imgs_one: [
235
+        // 'https://images.shengws.com/template_one.jpg'
236
+        "https://images.shengws.com/fangji.jpg"
237
+      ],
238
+      imgs_two: ["https://images.shengws.com/template_two.jpg"],
239
+      imgs_five: ["https://images.shengws.com/template_five.jpg"],
240
+      imgs_seven: ["https://images.shengws.com/serven.png"],
241
+      imgs_six: ["https://images.shengws.com/eight.png"],
242
+      imgs_eight: ["https://images.shengws.com/template_six.png"],
243
+      imgs_ten: ["https://kuyi.shengws.com/template_ten.jpg"],
244
+
245
+      delay: 500,
246
+      radio: 0,
247
+      tempRadio: 0,
248
+      loading: false
249
+    };
250
+  },
251
+  methods: {
252
+    imgClick(val){
253
+      this.imgs = []
254
+      this.imgs.push(val)
255
+      this.showViewer = true
256
+
257
+    },
258
+    closeViewer() {
259
+      this.showViewer = false
260
+    },
261
+    change: function(val) {
262
+      console.log("val是什么", val);
263
+      this.$confirm(
264
+        "切换模版后,透析记录的字段会根据打印单来显示与隐藏,是否确定切换模版",
265
+        "提示",
266
+        {
267
+          confirmButtonText: "确定",
268
+          cancelButtonText: "取消",
269
+          type: "info"
270
+        }
271
+      )
272
+        .then(() => {
273
+          this.loading = true;
274
+          postPrintTemplate(val).then(response => {
275
+            if (response.data.state == 1) {
276
+              var template_id = response.data.data.template_id;
277
+              this.radio = template_id.toString();
278
+              this.tempRadio = template_id.toString();
279
+              // 同步
280
+              // console.log(response.data.data.fileds)
281
+              this.loading = false;
282
+              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
283
+              this.$message({
284
+                type: "success",
285
+                message: "切换成功"
286
+              });
287
+            }
288
+          });
289
+        })
290
+        .catch(() => {
291
+          this.radio = this.tempRadio;
292
+        });
293
+    }
294
+  },
295
+  created() {
296
+    getPrintTemplate().then(response => {
297
+      if (response.data.state == 0) {
298
+        this.$message.error(response.data.msg);
299
+        return false;
300
+      } else {
301
+        var template = response.data.data.template;
302
+        this.radio = template.template_id.toString();
303
+        this.tempRadio = template.template_id.toString();
304
+      }
305
+    });
306
+  }
307
+};
308
+</script>
309
+
310
+<style scoped>
311
+.el-row {
312
+  margin-bottom: 20px;
313
+
314
+  & :last-child {
315
+    margin-bottom: 0;
316
+  }
317
+}
318
+.el-col {
319
+  border-radius: 4px;
320
+}
321
+</style>
322
+<style lang="scss">
323
+.app-print {
324
+  .el-radio__label {
325
+    padding-left: 10px;
326
+  }
327
+}
328
+</style>

+ 328 - 0
src/xt_pages/data/printTemplate/recordPrint.vue View File

@@ -0,0 +1,328 @@
1
+<template>
2
+    <div
3
+      v-loading="loading"
4
+      element-loading-text="服务器处理数据中,请稍候......."
5
+      element-loading-spinner="el-icon-loading"
6
+      element-loading-background="rgba(0, 0, 0, 0.8)"
7
+    >
8
+    <p style="margin-top: 10px;margin-bottom: 30px">
9
+        请选择你需要打印的血液透析护理记录单样式
10
+    </p>
11
+    <el-row :gutter="20" type="flex" justify="center">
12
+        <el-col :span="6" style="text-align: center">
13
+        <div
14
+            @click="imgClick('https://images.shengws.com/fangji.jpg')"
15
+        >
16
+            <el-tooltip
17
+            class="item"
18
+            effect="dark"
19
+            :hide-after="2000"
20
+            content="点击查看大图"
21
+            placement="top-start"
22
+            >
23
+            <!--<el-image-->
24
+                <!--style="width: 200px; height: 200px"-->
25
+                <!--:src="require('@/assets/home/1.jpg')"-->
26
+                <!--:preview-src-list="imgs_one"-->
27
+            <!--&gt;</el-image>-->
28
+
29
+            <el-image
30
+                style="width: 200px; height: 200px"
31
+                :src="require('@/assets/home/1.jpg')"
32
+            ></el-image>
33
+
34
+            </el-tooltip>
35
+        </div>
36
+        <el-radio v-model="radio" label="1" @change="change"
37
+            >模版一</el-radio
38
+        >
39
+        </el-col>
40
+        <el-col
41
+        :span="6"
42
+        style="margin-left: 100px;margin-right: 100px;text-align: center"
43
+        >
44
+        <div
45
+            @click="imgClick('https://images.shengws.com/template_two.jpg')"
46
+
47
+        >
48
+            <el-tooltip
49
+            class="item"
50
+            effect="dark"
51
+            content="点击查看大图"
52
+            placement="top-start"
53
+            :hide-after="2000"
54
+            >
55
+            <!--<el-image-->
56
+                <!--style="width: 200px; height: 200px"-->
57
+                <!--:src="require('@/assets/home/2.jpg')"-->
58
+                <!--:preview-src-list="imgs_two"-->
59
+            <!--&gt;</el-image>-->
60
+
61
+            <el-image
62
+                style="width: 200px; height: 200px"
63
+                :src="require('@/assets/home/2.jpg')"
64
+            ></el-image>
65
+            </el-tooltip>
66
+        </div>
67
+        <el-radio v-model="radio" label="2" @change="change"
68
+            >模版二</el-radio
69
+        >
70
+        </el-col>
71
+        <el-col :span="6" style="text-align: center">
72
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/template_five.jpg')">
73
+            <el-tooltip
74
+            class="item"
75
+            effect="dark"
76
+            content="点击查看大图"
77
+            placement="top-start"
78
+            :hide-after="2000"
79
+            >
80
+            <!--<el-image-->
81
+                <!--style="width: 200px; height: 200px"-->
82
+                <!--:src="require('@/assets/home/5.jpg')"-->
83
+                <!--:preview-src-list="imgs_five"-->
84
+            <!--&gt;</el-image>-->
85
+
86
+            <el-image
87
+                style="width: 200px; height: 200px"
88
+                :src="require('@/assets/home/5.jpg')"
89
+            ></el-image>
90
+
91
+            </el-tooltip>
92
+        </div>
93
+        <el-radio v-model="radio" label="5" @change="change"
94
+            >模版三</el-radio
95
+        >
96
+        </el-col>
97
+        <el-col :span="6" style="text-align: center">
98
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/serven.png')">
99
+            <el-tooltip
100
+            class="item"
101
+            effect="dark"
102
+            content="点击查看大图"
103
+            placement="top-start"
104
+            :hide-after="2000"
105
+            >
106
+            <!--<el-image-->
107
+                <!--style="width: 200px; height: 200px"-->
108
+                <!--:src="require('@/assets/home/serven.png')"-->
109
+                <!--:preview-src-list="imgs_seven"-->
110
+            <!--&gt;</el-image>-->
111
+
112
+            <el-image
113
+                style="width: 200px; height: 200px"
114
+                :src="require('@/assets/home/serven.png')"
115
+            ></el-image>
116
+            </el-tooltip>
117
+        </div>
118
+        <el-radio v-model="radio" label="7" @change="change"
119
+            >模版四</el-radio
120
+        >
121
+        </el-col>
122
+    </el-row>
123
+    <el-row :gutter="20" type="flex">
124
+        <el-col :span="6" style="text-align: center">
125
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/eight.png')">
126
+            <el-tooltip
127
+            class="item"
128
+            effect="dark"
129
+            content="点击查看大图"
130
+            placement="top-start"
131
+            :hide-after="2000"
132
+            >
133
+            <!--<el-image-->
134
+                <!--style="width: 200px; height: 200px;margin-left:-60px"-->
135
+                <!--:src="require('@/assets/home/eight.png')"-->
136
+                <!--:preview-src-list="imgs_six"-->
137
+            <!--&gt;</el-image>-->
138
+
139
+            <el-image
140
+                style="width: 200px; height: 200px;margin-left:-60px"
141
+                :src="require('@/assets/home/eight.png')"
142
+            ></el-image>
143
+            </el-tooltip>
144
+        </div>
145
+        <el-radio
146
+            v-model="radio"
147
+            label="8"
148
+            @change="change"
149
+            style="margin-left:-60px"
150
+            >模版五</el-radio
151
+        >
152
+        </el-col>
153
+        <el-col :span="6" style="text-align: center">
154
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/template_six.png')">
155
+            <el-tooltip
156
+            class="item"
157
+            effect="dark"
158
+            content="点击查看大图"
159
+            placement="top-start"
160
+            :hide-after="2000"
161
+            >
162
+            <!--<el-image-->
163
+                <!--style="width: 200px; height: 200px;margin-left:30px"-->
164
+                <!--:src="require('@/assets/home/template_six.png')"-->
165
+                <!--:preview-src-list="imgs_eight"-->
166
+            <!--&gt;</el-image>-->
167
+
168
+            <el-image
169
+                style="width: 200px; height: 200px;margin-left:30px"
170
+                :src="require('@/assets/home/template_six.png')"
171
+            ></el-image>
172
+            </el-tooltip>
173
+        </div>
174
+        <el-radio v-model="radio" label="6" @change="change"
175
+            >模版六</el-radio
176
+        >
177
+        </el-col>
178
+
179
+        <!--<el-col :span="6" style="text-align: center">-->
180
+        <!--<div class="demo-image__preview">-->
181
+        <!--<el-tooltip-->
182
+        <!--class="item"-->
183
+        <!--effect="dark"-->
184
+        <!--content="点击查看大图"-->
185
+        <!--placement="top-start"-->
186
+        <!--:hide-after="2000"-->
187
+        <!--&gt;-->
188
+        <!--<el-image-->
189
+        <!--style="width: 200px; height: 200px;margin-left:30px"-->
190
+        <!--:src="require('@/assets/home/template_ten.jpg')"-->
191
+        <!--:preview-src-list="imgs_ten"-->
192
+        <!--&gt;</el-image>-->
193
+        <!--</el-tooltip>-->
194
+        <!--</div>-->
195
+        <!--<el-radio v-model="radio" label="10" @change="change"-->
196
+        <!--&gt;模版十</el-radio-->
197
+        <!--&gt;-->
198
+        <!--</el-col>-->
199
+    </el-row>
200
+
201
+
202
+      <el-image-viewer
203
+        v-if="showViewer"
204
+        :on-close="closeViewer"
205
+        :url-list="imgs"
206
+      ></el-image-viewer>
207
+
208
+    </div>
209
+  </div>
210
+</template>
211
+
212
+<script>
213
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
214
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
215
+import { getPrintTemplate, postPrintTemplate } from "@/api/data";
216
+import store from "@/store";
217
+
218
+export default {
219
+  name: "printTemplate",
220
+  components: { ElImageViewer, BreadCrumb },
221
+  data() {
222
+    return {
223
+      showViewer:false,
224
+      crumbs: [
225
+        { path: false, name: "管理中心" },
226
+        { path: "data/print", name: "打印模版" }
227
+      ],
228
+      imgUrl_One: require("@/assets/home/1.jpg"),
229
+      imgUrl_Two: require("@/assets/home/2.jpg"),
230
+      imgUrl_Five: require("@/assets/home/5.jpg"),
231
+
232
+      imgs:[],
233
+
234
+      imgs_one: [
235
+        // 'https://images.shengws.com/template_one.jpg'
236
+        "https://images.shengws.com/fangji.jpg"
237
+      ],
238
+      imgs_two: ["https://images.shengws.com/template_two.jpg"],
239
+      imgs_five: ["https://images.shengws.com/template_five.jpg"],
240
+      imgs_seven: ["https://images.shengws.com/serven.png"],
241
+      imgs_six: ["https://images.shengws.com/eight.png"],
242
+      imgs_eight: ["https://images.shengws.com/template_six.png"],
243
+      imgs_ten: ["https://kuyi.shengws.com/template_ten.jpg"],
244
+
245
+      delay: 500,
246
+      radio: 0,
247
+      tempRadio: 0,
248
+      loading: false
249
+    };
250
+  },
251
+  methods: {
252
+    imgClick(val){
253
+      this.imgs = []
254
+      this.imgs.push(val)
255
+      this.showViewer = true
256
+
257
+    },
258
+    closeViewer() {
259
+      this.showViewer = false
260
+    },
261
+    change: function(val) {
262
+      console.log("val是什么", val);
263
+      this.$confirm(
264
+        "切换模版后,透析记录的字段会根据打印单来显示与隐藏,是否确定切换模版",
265
+        "提示",
266
+        {
267
+          confirmButtonText: "确定",
268
+          cancelButtonText: "取消",
269
+          type: "info"
270
+        }
271
+      )
272
+        .then(() => {
273
+          this.loading = true;
274
+          postPrintTemplate(val).then(response => {
275
+            if (response.data.state == 1) {
276
+              var template_id = response.data.data.template_id;
277
+              this.radio = template_id.toString();
278
+              this.tempRadio = template_id.toString();
279
+              // 同步
280
+              // console.log(response.data.data.fileds)
281
+              this.loading = false;
282
+              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
283
+              this.$message({
284
+                type: "success",
285
+                message: "切换成功"
286
+              });
287
+            }
288
+          });
289
+        })
290
+        .catch(() => {
291
+          this.radio = this.tempRadio;
292
+        });
293
+    }
294
+  },
295
+  created() {
296
+    getPrintTemplate().then(response => {
297
+      if (response.data.state == 0) {
298
+        this.$message.error(response.data.msg);
299
+        return false;
300
+      } else {
301
+        var template = response.data.data.template;
302
+        this.radio = template.template_id.toString();
303
+        this.tempRadio = template.template_id.toString();
304
+      }
305
+    });
306
+  }
307
+};
308
+</script>
309
+
310
+<style scoped>
311
+.el-row {
312
+  margin-bottom: 20px;
313
+
314
+  & :last-child {
315
+    margin-bottom: 0;
316
+  }
317
+}
318
+.el-col {
319
+  border-radius: 4px;
320
+}
321
+</style>
322
+<style lang="scss">
323
+.app-print {
324
+  .el-radio__label {
325
+    padding-left: 10px;
326
+  }
327
+}
328
+</style>

+ 328 - 0
src/xt_pages/data/printTemplate/treatPrint.vue View File

@@ -0,0 +1,328 @@
1
+<template>
2
+    <div
3
+      v-loading="loading"
4
+      element-loading-text="服务器处理数据中,请稍候......."
5
+      element-loading-spinner="el-icon-loading"
6
+      element-loading-background="rgba(0, 0, 0, 0.8)"
7
+    >
8
+    <p style="margin-top: 10px;margin-bottom: 30px">
9
+        请选择你需要打印的血液透析护理记录单样式
10
+    </p>
11
+    <el-row :gutter="20" type="flex" justify="center">
12
+        <el-col :span="6" style="text-align: center">
13
+        <div
14
+            @click="imgClick('https://images.shengws.com/fangji.jpg')"
15
+        >
16
+            <el-tooltip
17
+            class="item"
18
+            effect="dark"
19
+            :hide-after="2000"
20
+            content="点击查看大图"
21
+            placement="top-start"
22
+            >
23
+            <!--<el-image-->
24
+                <!--style="width: 200px; height: 200px"-->
25
+                <!--:src="require('@/assets/home/1.jpg')"-->
26
+                <!--:preview-src-list="imgs_one"-->
27
+            <!--&gt;</el-image>-->
28
+
29
+            <el-image
30
+                style="width: 200px; height: 200px"
31
+                :src="require('@/assets/home/1.jpg')"
32
+            ></el-image>
33
+
34
+            </el-tooltip>
35
+        </div>
36
+        <el-radio v-model="radio" label="1" @change="change"
37
+            >模版一</el-radio
38
+        >
39
+        </el-col>
40
+        <el-col
41
+        :span="6"
42
+        style="margin-left: 100px;margin-right: 100px;text-align: center"
43
+        >
44
+        <div
45
+            @click="imgClick('https://images.shengws.com/template_two.jpg')"
46
+
47
+        >
48
+            <el-tooltip
49
+            class="item"
50
+            effect="dark"
51
+            content="点击查看大图"
52
+            placement="top-start"
53
+            :hide-after="2000"
54
+            >
55
+            <!--<el-image-->
56
+                <!--style="width: 200px; height: 200px"-->
57
+                <!--:src="require('@/assets/home/2.jpg')"-->
58
+                <!--:preview-src-list="imgs_two"-->
59
+            <!--&gt;</el-image>-->
60
+
61
+            <el-image
62
+                style="width: 200px; height: 200px"
63
+                :src="require('@/assets/home/2.jpg')"
64
+            ></el-image>
65
+            </el-tooltip>
66
+        </div>
67
+        <el-radio v-model="radio" label="2" @change="change"
68
+            >模版二</el-radio
69
+        >
70
+        </el-col>
71
+        <el-col :span="6" style="text-align: center">
72
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/template_five.jpg')">
73
+            <el-tooltip
74
+            class="item"
75
+            effect="dark"
76
+            content="点击查看大图"
77
+            placement="top-start"
78
+            :hide-after="2000"
79
+            >
80
+            <!--<el-image-->
81
+                <!--style="width: 200px; height: 200px"-->
82
+                <!--:src="require('@/assets/home/5.jpg')"-->
83
+                <!--:preview-src-list="imgs_five"-->
84
+            <!--&gt;</el-image>-->
85
+
86
+            <el-image
87
+                style="width: 200px; height: 200px"
88
+                :src="require('@/assets/home/5.jpg')"
89
+            ></el-image>
90
+
91
+            </el-tooltip>
92
+        </div>
93
+        <el-radio v-model="radio" label="5" @change="change"
94
+            >模版三</el-radio
95
+        >
96
+        </el-col>
97
+        <el-col :span="6" style="text-align: center">
98
+        <div class="demo-image__preview"  @click="imgClick('https://images.shengws.com/serven.png')">
99
+            <el-tooltip
100
+            class="item"
101
+            effect="dark"
102
+            content="点击查看大图"
103
+            placement="top-start"
104
+            :hide-after="2000"
105
+            >
106
+            <!--<el-image-->
107
+                <!--style="width: 200px; height: 200px"-->
108
+                <!--:src="require('@/assets/home/serven.png')"-->
109
+                <!--:preview-src-list="imgs_seven"-->
110
+            <!--&gt;</el-image>-->
111
+
112
+            <el-image
113
+                style="width: 200px; height: 200px"
114
+                :src="require('@/assets/home/serven.png')"
115
+            ></el-image>
116
+            </el-tooltip>
117
+        </div>
118
+        <el-radio v-model="radio" label="7" @change="change"
119
+            >模版四</el-radio
120
+        >
121
+        </el-col>
122
+    </el-row>
123
+    <el-row :gutter="20" type="flex">
124
+        <el-col :span="6" style="text-align: center">
125
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/eight.png')">
126
+            <el-tooltip
127
+            class="item"
128
+            effect="dark"
129
+            content="点击查看大图"
130
+            placement="top-start"
131
+            :hide-after="2000"
132
+            >
133
+            <!--<el-image-->
134
+                <!--style="width: 200px; height: 200px;margin-left:-60px"-->
135
+                <!--:src="require('@/assets/home/eight.png')"-->
136
+                <!--:preview-src-list="imgs_six"-->
137
+            <!--&gt;</el-image>-->
138
+
139
+            <el-image
140
+                style="width: 200px; height: 200px;margin-left:-60px"
141
+                :src="require('@/assets/home/eight.png')"
142
+            ></el-image>
143
+            </el-tooltip>
144
+        </div>
145
+        <el-radio
146
+            v-model="radio"
147
+            label="8"
148
+            @change="change"
149
+            style="margin-left:-60px"
150
+            >模版五</el-radio
151
+        >
152
+        </el-col>
153
+        <el-col :span="6" style="text-align: center">
154
+        <div class="demo-image__preview" @click="imgClick('https://images.shengws.com/template_six.png')">
155
+            <el-tooltip
156
+            class="item"
157
+            effect="dark"
158
+            content="点击查看大图"
159
+            placement="top-start"
160
+            :hide-after="2000"
161
+            >
162
+            <!--<el-image-->
163
+                <!--style="width: 200px; height: 200px;margin-left:30px"-->
164
+                <!--:src="require('@/assets/home/template_six.png')"-->
165
+                <!--:preview-src-list="imgs_eight"-->
166
+            <!--&gt;</el-image>-->
167
+
168
+            <el-image
169
+                style="width: 200px; height: 200px;margin-left:30px"
170
+                :src="require('@/assets/home/template_six.png')"
171
+            ></el-image>
172
+            </el-tooltip>
173
+        </div>
174
+        <el-radio v-model="radio" label="6" @change="change"
175
+            >模版六</el-radio
176
+        >
177
+        </el-col>
178
+
179
+        <!--<el-col :span="6" style="text-align: center">-->
180
+        <!--<div class="demo-image__preview">-->
181
+        <!--<el-tooltip-->
182
+        <!--class="item"-->
183
+        <!--effect="dark"-->
184
+        <!--content="点击查看大图"-->
185
+        <!--placement="top-start"-->
186
+        <!--:hide-after="2000"-->
187
+        <!--&gt;-->
188
+        <!--<el-image-->
189
+        <!--style="width: 200px; height: 200px;margin-left:30px"-->
190
+        <!--:src="require('@/assets/home/template_ten.jpg')"-->
191
+        <!--:preview-src-list="imgs_ten"-->
192
+        <!--&gt;</el-image>-->
193
+        <!--</el-tooltip>-->
194
+        <!--</div>-->
195
+        <!--<el-radio v-model="radio" label="10" @change="change"-->
196
+        <!--&gt;模版十</el-radio-->
197
+        <!--&gt;-->
198
+        <!--</el-col>-->
199
+    </el-row>
200
+
201
+
202
+      <el-image-viewer
203
+        v-if="showViewer"
204
+        :on-close="closeViewer"
205
+        :url-list="imgs"
206
+      ></el-image-viewer>
207
+
208
+    </div>
209
+  </div>
210
+</template>
211
+
212
+<script>
213
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
214
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
215
+import { getPrintTemplate, postPrintTemplate } from "@/api/data";
216
+import store from "@/store";
217
+
218
+export default {
219
+  name: "printTemplate",
220
+  components: { ElImageViewer, BreadCrumb },
221
+  data() {
222
+    return {
223
+      showViewer:false,
224
+      crumbs: [
225
+        { path: false, name: "管理中心" },
226
+        { path: "data/print", name: "打印模版" }
227
+      ],
228
+      imgUrl_One: require("@/assets/home/1.jpg"),
229
+      imgUrl_Two: require("@/assets/home/2.jpg"),
230
+      imgUrl_Five: require("@/assets/home/5.jpg"),
231
+
232
+      imgs:[],
233
+
234
+      imgs_one: [
235
+        // 'https://images.shengws.com/template_one.jpg'
236
+        "https://images.shengws.com/fangji.jpg"
237
+      ],
238
+      imgs_two: ["https://images.shengws.com/template_two.jpg"],
239
+      imgs_five: ["https://images.shengws.com/template_five.jpg"],
240
+      imgs_seven: ["https://images.shengws.com/serven.png"],
241
+      imgs_six: ["https://images.shengws.com/eight.png"],
242
+      imgs_eight: ["https://images.shengws.com/template_six.png"],
243
+      imgs_ten: ["https://kuyi.shengws.com/template_ten.jpg"],
244
+
245
+      delay: 500,
246
+      radio: 0,
247
+      tempRadio: 0,
248
+      loading: false
249
+    };
250
+  },
251
+  methods: {
252
+    imgClick(val){
253
+      this.imgs = []
254
+      this.imgs.push(val)
255
+      this.showViewer = true
256
+
257
+    },
258
+    closeViewer() {
259
+      this.showViewer = false
260
+    },
261
+    change: function(val) {
262
+      console.log("val是什么", val);
263
+      this.$confirm(
264
+        "切换模版后,透析记录的字段会根据打印单来显示与隐藏,是否确定切换模版",
265
+        "提示",
266
+        {
267
+          confirmButtonText: "确定",
268
+          cancelButtonText: "取消",
269
+          type: "info"
270
+        }
271
+      )
272
+        .then(() => {
273
+          this.loading = true;
274
+          postPrintTemplate(val).then(response => {
275
+            if (response.data.state == 1) {
276
+              var template_id = response.data.data.template_id;
277
+              this.radio = template_id.toString();
278
+              this.tempRadio = template_id.toString();
279
+              // 同步
280
+              // console.log(response.data.data.fileds)
281
+              this.loading = false;
282
+              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
283
+              this.$message({
284
+                type: "success",
285
+                message: "切换成功"
286
+              });
287
+            }
288
+          });
289
+        })
290
+        .catch(() => {
291
+          this.radio = this.tempRadio;
292
+        });
293
+    }
294
+  },
295
+  created() {
296
+    getPrintTemplate().then(response => {
297
+      if (response.data.state == 0) {
298
+        this.$message.error(response.data.msg);
299
+        return false;
300
+      } else {
301
+        var template = response.data.data.template;
302
+        this.radio = template.template_id.toString();
303
+        this.tempRadio = template.template_id.toString();
304
+      }
305
+    });
306
+  }
307
+};
308
+</script>
309
+
310
+<style scoped>
311
+.el-row {
312
+  margin-bottom: 20px;
313
+
314
+  & :last-child {
315
+    margin-bottom: 0;
316
+  }
317
+}
318
+.el-col {
319
+  border-radius: 4px;
320
+}
321
+</style>
322
+<style lang="scss">
323
+.app-print {
324
+  .el-radio__label {
325
+    padding-left: 10px;
326
+  }
327
+}
328
+</style>

+ 2 - 5
src/xt_pages/outpatientRegistration/registrationHistory.vue View File

@@ -52,9 +52,6 @@
52 52
             </div>
53 53
             <el-table :data="tableData" border style="width: 100%;" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}" highlight-current-row>
54 54
                 <el-table-column align="center" type="index" label="序号" width="60">
55
-                    <template slot-scope="scope">
56
-                        {{scope.$index+1}}
57
-                    </template>
58 55
                 </el-table-column>
59 56
                 <el-table-column align="center" prop="name" label="时间" width="100">
60 57
                     <template slot-scope="scope">{{getTime(scope.row.record_date,"{y}-{m}-{d}")}}</template>
@@ -79,10 +76,10 @@
79 76
                         {{scope.row.number}}
80 77
                     </template>
81 78
                 </el-table-column>
82
-                <el-table-column align="center" prop="name" label="证件号">
79
+                <el-table-column align="center" prop="name" label="证件号" width='180'>
83 80
                     <template slot-scope="scope">{{ scope.row.id_card_no }}</template>
84 81
                 </el-table-column>
85
-                <el-table-column align="center" label="患者保险类型" width="80">
82
+                <el-table-column align="center" label="患者保险类型">
86 83
                     <template slot-scope="scope">{{getMedicalTreatment(scope.row.medical_treatment_type)}}</template>
87 84
                 </el-table-column>
88 85
                 <el-table-column align="center" prop="name" label="医生" width="80">