李帅 hace 3 meses
padre
commit
3fd13179a8

+ 44 - 0
src/api/allApi.js

@@ -842,3 +842,47 @@ export function operationsAnalysisList(params) {
842 842
   })
843 843
 }
844 844
 
845
+export function noticeManageList(params) {
846
+  return request({
847
+    url: `/notice-manage/list`,
848
+    method: 'get',
849
+    params
850
+  })
851
+}
852
+
853
+export function noticeManageRevoke(data) {
854
+  return request({
855
+    url: `/notice-manage/revoke`,
856
+    method: 'post',
857
+    data
858
+  })
859
+}
860
+export function noticeManageAdd(data) {
861
+  return request({
862
+    url: `/notice-manage`,
863
+    method: 'post',
864
+    data
865
+  })
866
+}
867
+export function noticeManageUpdate(data) {
868
+  return request({
869
+    url: `/notice-manage`,
870
+    method: 'put',
871
+    data
872
+  })
873
+}
874
+
875
+export function noticeManageRemove(data) {
876
+  return request({
877
+    url: `/notice-manage/remove?id=${data}`,
878
+    method: 'delete'
879
+  })
880
+}
881
+
882
+export function noticeManageDetails(params) {
883
+  return request({
884
+    url: `/notice-manage/detail`,
885
+    method: 'get',
886
+    params
887
+  })
888
+}

+ 0 - 301
src/views/liao/index.vue

@@ -1,301 +0,0 @@
1
-<template>
2
- 
3
-  <div id="Layout">
4
-    <el-container>
5
-      <el-aside width="200px">Aside</el-aside>
6
-      <el-container>
7
-        <el-header style="background-color: rgb(245, 245, 245); border-bottom: 1px solid grey;">
8
-          <h3>聊天广场</h3>
9
-        </el-header>
10
- 
11
-        <el-main style="background-color: rgb(244, 245, 247);
12
-        min-height: 700px; max-height: 700px; ">
13
- 
14
-          <div id="chatContent" style="padding-left: 10px; line-height: normal; ">
15
-            <!-- 循环输出对话内容 -->
16
-            <el-scrollbar v-for="(message, index) in messages" :key="index">
17
-              <div ref="scrollbar" v-if="message.sender !== senderName" class="chat-message" id="ChatContentCard" style=" background-color: white;
18
-              margin-top: 20px; 
19
-              box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)  
20
-              ">
21
-                <el-avatar :size="40"
22
-                  src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"></el-avatar>
23
-                <div class="message-content" style="width: 100%;">
24
-                  <div style="text-align: left; text-indent: 1em;"> {{ message.sender }}</div>
25
-                  <div id="chatContentText">{{ message.text }}</div>
26
-                </div>
27
-              </div>
28
- 
29
-              <div ref="scrollbar" v-if="message.sender === senderName" id="myChatContentCard">
30
-                <el-avatar :size="40"
31
-                  src="https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg"></el-avatar>
32
-                <div class="message-content" style="width: 100%;">
33
-                  <div style="text-align: left; text-indent: 1em;"> {{ message.sender }}</div>
34
-                  <div id="chatContentText">{{ message.text }}</div>
35
-                </div>
36
-              </div>
37
-            </el-scrollbar>
38
-          </div>
39
-        </el-main>
40
- 
41
- 
42
-        <!-- 底层交互框 -->
43
-        <el-footer style="height: 190px; background-color: rgb(244, 245, 247); ">
44
- 
45
-          <div id="Gadget" style="background-color: rgb(244, 245, 247); height: 35px; margin-bottom: 10px;">
46
- 
47
-            <el-upload class="upload-demo" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
48
-              :on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false" style="float: left;">
49
- 
50
-              <el-button slot="trigger" size="small" type="primary"><i class="el-icon-picture-outline-round"></i></el-button>
51
- 
52
-              <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
53
-              
54
-            </el-upload>
55
- 
56
- 
57
-          </div>
58
- 
59
-          <el-form @submit.native.prevent="sendMessage"
60
-            style="background-color: rgb(244, 245, 247); height: 80%; width: 100%; position: relative;">
61
-            <el-input v-model="messageInput" rows="4" resize="none" type="textarea" placeholder="请输入内容......."
62
-              @keyup.enter="sendMessage" style="height: 100%; max-height: 60px; ">
63
-            </el-input>
64
-            <div style="text-align: right; background-color: rgb(244, 245, 247); margin-top: 34px;">
65
-              <el-button type="primary" @click="sendMessage">发送</el-button>
66
-            </div>
67
- 
68
-          </el-form>
69
-        </el-footer>
70
- 
71
- 
72
-      </el-container>
73
-    </el-container>
74
- 
75
-  </div>
76
-</template>
77
-
78
-<script>
79
-import Cookies from 'js-cookie';
80
- 
81
- 
82
-export default {
83
-  computed: {
84
-    senderName() {
85
-      return Cookies.get('account') || '游客';
86
-    }
87
-  },
88
-  name: 'App',
89
-  data() {
90
-    return {
91
-      messages: [],
92
-      messageInput: '',
93
-      ws: null,
94
-      fileList: []
95
-    };
96
-  },
97
-  mounted() {
98
-    this.initWebSocket();
99
-  },
100
-  beforeDestroy() {
101
-    this.closeWebSocket();
102
-  },
103
-  methods: {
104
-    initWebSocket() {
105
-      this.ws = new WebSocket('ws://192.168.3.21:8002/ws');
106
-      this.ws.onopen = () => {
107
-        console.log('Connected to server.');
108
-      };
109
-      this.ws.onmessage = (event) => {
110
-        try {
111
-          let messageData;
112
-          if (isJson(event.data)) {
113
-            messageData = JSON.parse(event.data);
114
-          } else {
115
-            messageData = { text: event.data };
116
-          }
117
-          this.messages.push({
118
-            sender: messageData.sender || 'Anonymous',
119
-            text: messageData.text,
120
-          });
121
- 
122
-          // 使用Vue.nextTick确保DOM更新后再执行滚动操作
123
-          this.$nextTick(() => {
124
-            // 确保scrollbar存在且已渲染
125
-            if (this.$refs.scrollbar) {
126
-              // 直接滚动到底部,不需要使用contentSize
127
-              // this.$refs.scrollbar.$el.scrollTop = this.$refs.scrollbar.$el.scrollHeight;
128
-            }
129
-          });
130
-        } catch (error) {
131
-          console.error('Error parsing message:', error);
132
-        }
133
- 
134
-      };
135
- 
136
- 
137
-      // 辅助函数,检查字符串是否可能是JSON格式
138
-      function isJson(str) {
139
-        try {
140
-          JSON.parse(str);
141
-        } catch (e) {
142
-          return false;
143
-        }
144
-        return true;
145
-      }
146
- 
147
- 
148
-      this.ws.onerror = (error) => {
149
-        console.error('WebSocket error:', error);
150
-      };
151
-      this.ws.onclose = () => {
152
-        console.log('Disconnected from server.');
153
-      };
154
-    },
155
-    sendMessage() {
156
-      console.log('调用sendMessage');
157
-      const senderName = Cookies.get('account');
158
-      console.log(senderName,"发送者");
159
-      if (senderName === null) {
160
-        this.senderName = "游客";
161
-      }
162
-      if (this.messageInput.trim() !== '') {
163
-        // this.ws.send(JSON.stringify({ sender: senderName, text: this.messageInput ,type:1}));
164
-        this.ws.send("[CHAT][" + new Date().getTime() + "][" + '大帅子' + "][" + '建升' + "][" + 2 + "]");
165
-        this.messageInput = ''; // 清空输入框
166
-      }
167
-    },
168
-    closeWebSocket() {
169
-      if (this.ws && this.ws.readyState === WebSocket.OPEN) {
170
-        this.ws.close();
171
-      }
172
-    },
173
- 
174
- 
175
-// 文件上传函数
176
-submitUpload() {
177
-        this.$refs.upload.submit();
178
-      },
179
-      handleRemove(file, fileList) {
180
-        console.log(file, fileList);
181
-      },
182
-      handlePreview(file) {
183
-        console.log(file);
184
-      }
185
- 
186
- 
187
-  },
188
-};
189
-</script>
190
-
191
-<style scoped>
192
-.chat-message {
193
-  display: flex;
194
-  align-items: center;
195
-  margin-bottom: 10px;
196
-}
197
- 
198
-.message-content {
199
-  margin-left: 10px;
200
-}
201
- 
202
-#Layout {
203
-  line-height: normal;
204
-}
205
- 
206
-/* 添加动画关键帧 */
207
-@keyframes slideInFromLeft {
208
-  0% {
209
-    transform: translateX(-100%);
210
-    opacity: 0;
211
-  }
212
- 
213
-  100% {
214
-    transform: translateX(0);
215
-    opacity: 1;
216
-  }
217
-}
218
- 
219
-#ChatContentCard {
220
-  min-height: 80px;
221
-  width: 50%;
222
-  /* 应用动画 */
223
-  animation: slideInFromLeft 0.3s ease-in-out forwards;
224
-  border-radius: 30px
225
-}
226
- 
227
-#chatContentText {
228
-  width: 99%;
229
-  overflow-wrap: break-word;
230
- 
231
-}
232
- 
233
- 
234
-.el-header,
235
-.el-footer {
236
-  background-color: #B3C0D1;
237
-  color: #333;
238
-  text-align: center;
239
-  line-height: 60px;
240
-}
241
- 
242
-.el-aside {
243
-  background-color: #D3DCE6;
244
-  color: #333;
245
-  text-align: center;
246
-  line-height: 200px;
247
-}
248
- 
249
-.el-main {
250
-  background-color: #E9EEF3;
251
-  color: #333;
252
-  text-align: center;
253
-  line-height: 160px;
254
-}
255
- 
256
-body>.el-container {
257
-  margin-bottom: 40px;
258
-}
259
- 
260
-.el-container:nth-child(5) .el-aside,
261
-.el-container:nth-child(6) .el-aside {
262
-  line-height: 260px;
263
-}
264
- 
265
-.el-container:nth-child(7) .el-aside {
266
-  line-height: 320px;
267
-}
268
- 
269
- 
270
-#myChatContentCard{
271
-  display: flex;
272
-  align-items: center;
273
-  margin-bottom: 10px;
274
-  margin-left: 50%;
275
- 
276
-  min-height: 80px;
277
-  width: 50%;
278
-  /* 应用动画 */
279
-  animation: slideInFromRight 0.3s ease-in-out forwards;
280
-  border-radius: 30px;
281
- 
282
-  background-color: rgb(149, 236, 105);
283
-              margin-top: 20px; 
284
-              box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04) 
285
- 
286
-}
287
- 
288
-@keyframes slideInFromRight {
289
-  0% {
290
-    transform: translateX(100%);
291
-    opacity: 0;
292
-  }
293
- 
294
-  100% {
295
-    transform: translateX(0);
296
-    opacity: 1;
297
-  }
298
-}
299
- 
300
- 
301
-</style>

+ 2 - 2
src/views/patientCenter/index.vue

@@ -589,7 +589,7 @@ export default {
589 589
   mixins: [initName],
590 590
   data() {
591 591
     return {
592
-      collectCostPatientsType:"",
592
+      collectCostPatientsType: null,
593 593
       printDialogVisible: false,
594 594
 
595 595
       isActive: 0,
@@ -749,7 +749,7 @@ export default {
749 749
       const res = await listByPatientId({
750 750
         patientId: this.ids
751 751
       })
752
-      if (res.code !== 200) return this.message.$error(res.msg)
752
+      if (res.code !== 200) return this.$message.error(res.msg)
753 753
       this.listByPatientArr = res.data
754 754
     },
755 755
     edit() {

+ 198 - 97
src/views/patientCenter/listToDetailsDialog.vue

@@ -10,83 +10,151 @@
10 10
       @close="cancel"
11 11
       :before-close="cancel"
12 12
     >
13
-      <div style="max-height: 65vh;overflow-y: auto;">
14
-        <div v-for="(item , index) in listToDetails.listVO" :key="index">
13
+      <div style="max-height: 65vh; overflow-y: auto">
14
+        <div v-for="(item, index) in listToDetails.listVO" :key="index">
15 15
           <h3>
16
-            {{ initToothPosition(item.toothPosition) }}  
17
-            <el-button v-if="collectCostPatientsType == 1" @click="doAdd(index)" type="primary" plain icon="el-icon-plus" size="mini" style="margin-left: 10px;"
16
+            {{ initToothPosition(item.toothPosition) }}
17
+            <el-button
18
+              v-if="collectCostPatientsType == 1"
19
+              @click="doAdd(index)"
20
+              type="primary"
21
+              plain
22
+              icon="el-icon-plus"
23
+              size="mini"
24
+              style="margin-left: 10px"
18 25
               >新建</el-button
19 26
             >
20 27
           </h3>
21 28
           <el-table :data="item.collectCostDetailsVOList">
22
-              <el-table-column label="项目编号" show-overflow-tooltip align="center">
23
-                <template slot-scope="scope">
24
-                  <span>{{ scope.row.projectCode || '-' }}</span>
25
-                </template>
26
-              </el-table-column>
27
-              <el-table-column label="项目名称" show-overflow-tooltip align="center">
28
-                <template slot-scope="scope">
29
-                  <span>{{ scope.row.projectName || '-' }}</span>
30
-                </template>
31
-              </el-table-column>
32
-              <el-table-column label="单价" show-overflow-tooltip align="center">
33
-                <template slot-scope="scope">
34
-                  <span>{{ scope.row.unitPrice || '-' }}</span>
35
-                </template>
36
-              </el-table-column>
37
-              <el-table-column label="优惠价格" show-overflow-tooltip align="center">
38
-                <template slot-scope="scope">
39
-                  <span>
40
-                    <el-input :disabled="collectCostPatientsType !=1 " v-model="scope.row.preferentialPrice" @input="inputVal(index,scope.$index,scope.row.preferentialPrice)"></el-input>
41
-                  </span>
42
-                </template>
43
-              </el-table-column>
44
-              <el-table-column label="单位" show-overflow-tooltip align="center">
45
-                <template slot-scope="scope">
46
-                  <span>{{ scope.row.unit || '-' }}</span>
47
-                </template>
48
-              </el-table-column>
49
-              <el-table-column label="数量" show-overflow-tooltip width="250" align="center">
50
-                <template slot-scope="scope">
51
-                  <el-input-number :disabled="collectCostPatientsType !=1" @change="changeVal(index,scope.$index,scope.row.total)" size="mini" v-model="scope.row.total" style="" :min="1" :max="10" label="描述文字"></el-input-number>
52
-                </template>
53
-              </el-table-column>
54
-              <el-table-column
55
-                label="操作"
56
-                align="center"
57
-                width="120"
58
-                fixed="right"
59
-                v-if="collectCostPatientsType == 1"
60
-              >
61
-                <template slot-scope="scope">
62
-                  <i class="el-icon-delete" style="cursor: pointer;color: red;" @click="doDel(index,scope.$index)"></i>
63
-                </template>
64
-              </el-table-column>
65
-            </el-table>
29
+            <el-table-column
30
+              label="项目编号"
31
+              show-overflow-tooltip
32
+              align="center"
33
+            >
34
+              <template slot-scope="scope">
35
+                <span>{{ scope.row.projectCode || '-' }}</span>
36
+              </template>
37
+            </el-table-column>
38
+            <el-table-column
39
+              label="项目名称"
40
+              show-overflow-tooltip
41
+              align="center"
42
+            >
43
+              <template slot-scope="scope">
44
+                <span>{{ scope.row.projectName || '-' }}</span>
45
+              </template>
46
+            </el-table-column>
47
+            <el-table-column label="单价" show-overflow-tooltip align="center">
48
+              <template slot-scope="scope">
49
+                <span>{{ scope.row.unitPrice || '-' }}</span>
50
+              </template>
51
+            </el-table-column>
52
+            <el-table-column
53
+              label="优惠价格"
54
+              show-overflow-tooltip
55
+              align="center"
56
+            >
57
+              <template slot-scope="scope">
58
+                <span>
59
+                  <el-input
60
+                    :disabled="collectCostPatientsType != 1"
61
+                    v-model="scope.row.preferentialPrice"
62
+                    @input="
63
+                      inputVal(index, scope.$index, scope.row.preferentialPrice)
64
+                    "
65
+                  ></el-input>
66
+                </span>
67
+              </template>
68
+            </el-table-column>
69
+            <el-table-column label="单位" show-overflow-tooltip align="center">
70
+              <template slot-scope="scope">
71
+                <span>{{ scope.row.unit || '-' }}</span>
72
+              </template>
73
+            </el-table-column>
74
+            <el-table-column
75
+              label="数量"
76
+              show-overflow-tooltip
77
+              width="250"
78
+              align="center"
79
+            >
80
+              <template slot-scope="scope">
81
+                <el-input-number
82
+                  :disabled="collectCostPatientsType != 1"
83
+                  @change="changeVal(index, scope.$index, scope.row.total)"
84
+                  size="mini"
85
+                  v-model="scope.row.total"
86
+                  style=""
87
+                  :min="1"
88
+                  :max="10"
89
+                  label="描述文字"
90
+                ></el-input-number>
91
+              </template>
92
+            </el-table-column>
93
+            <el-table-column
94
+              label="操作"
95
+              align="center"
96
+              width="120"
97
+              fixed="right"
98
+              v-if="collectCostPatientsType == 1"
99
+            >
100
+              <template slot-scope="scope">
101
+                <i
102
+                  class="el-icon-delete"
103
+                  style="cursor: pointer; color: red"
104
+                  @click="doDel(index, scope.$index)"
105
+                ></i>
106
+              </template>
107
+            </el-table-column>
108
+          </el-table>
66 109
         </div>
67 110
       </div>
68 111
       <span slot="footer" class="dialog-footer">
69
-        <div style="display: flex;align-items: center;">
70
-          <span style="margin-left: 10px;">原价:{{ receivableCost }} (元)</span>
71
-          <span style="margin-left: 10px;">应付价格:{{ preferentialPrice }} (元)</span>
72
-          <span style="margin-left: 20px;display: flex;align-items: center;" v-if="collectCostPatientsType != 1">
112
+        <div style="display: flex; align-items: center">
113
+          <span style="margin-left: 10px"
114
+            >原价:{{ receivableCost }} (元)</span
115
+          >
116
+          <span style="margin-left: 10px"
117
+            >应付价格:{{ preferentialPrice }} (元)</span
118
+          >
119
+          <span
120
+            style="margin-left: 20px; display: flex; align-items: center"
121
+            v-if="collectCostPatientsType != 1"
122
+          >
73 123
             实收:
74
-            <el-input v-model="listToDetails.netReceiptsCost" :disabled="collectCostPatientsType!=2" style="width: 200px;"></el-input>
124
+            <el-input
125
+              v-model="listToDetails.netReceiptsCost"
126
+              :disabled="collectCostPatientsType != 2"
127
+              style="width: 200px"
128
+            ></el-input>
75 129
             (元)
76 130
           </span>
77 131
         </div>
78
-        <el-button v-if="collectCostPatientsType != 3" @click="cancel">取 消</el-button>
79
-        <el-button v-if="collectCostPatientsType != 3" type="primary" @click="submit">确 定</el-button>
132
+        <el-button v-if="collectCostPatientsType != 3" @click="cancel"
133
+          >取 消</el-button
134
+        >
135
+        <el-button
136
+          v-if="collectCostPatientsType != 3"
137
+          type="primary"
138
+          @click="submit"
139
+          >确 定</el-button
140
+        >
80 141
       </span>
81 142
     </el-dialog>
82 143
 
83
-    <addTemplateDialog ref="addTemplateDialogRef" @tableDataDown="tableDataDown"/>
144
+    <addTemplateDialog
145
+      ref="addTemplateDialogRef"
146
+      @tableDataDown="tableDataDown"
147
+    />
84 148
   </div>
85 149
 </template>
86 150
 
87 151
 <script>
88
-import { listToDetails , collectCostPatientsUpdate ,collectCost} from '@/api/allApi.js'
89
-import initName from '@/utils/initName.js';
152
+import {
153
+  listToDetails,
154
+  collectCostPatientsUpdate,
155
+  collectCost
156
+} from '@/api/allApi.js'
157
+import initName from '@/utils/initName.js'
90 158
 
91 159
 import addTemplateDialog from './addTemplateDialog.vue'
92 160
 export default {
@@ -99,8 +167,8 @@ export default {
99 167
       type: String
100 168
     },
101 169
     collectCostPatientsType: {
102
-      type: String
103
-    },
170
+      type: Number
171
+    }
104 172
   },
105 173
   components: {
106 174
     addTemplateDialog
@@ -113,80 +181,113 @@ export default {
113 181
     }
114 182
   },
115 183
   watch: {
116
-    collectCostPatientsId(val){
184
+    collectCostPatientsId(val) {
117 185
       if (val) {
118 186
         this.initList()
119 187
       }
120 188
     }
121 189
   },
122 190
   computed: {
123
-    receivableCost(){
124
-      let num = 0;
125
-      this.listToDetails.listVO.forEach(item => {
126
-        const number = [];
127
-        item.collectCostDetailsVOList.forEach(item1 => {
128
-          number.push(item1.unitPrice * item1.total)
191
+    receivableCost() {
192
+      if (
193
+        Array.isArray(this.listToDetails.listVO) &&
194
+        this.listToDetails.listVO.length
195
+      ) {
196
+        let num = 0
197
+
198
+        this.listToDetails.listVO.forEach((item) => {
199
+          const number = []
200
+          item.collectCostDetailsVOList.forEach((item1) => {
201
+            number.push(item1.unitPrice * item1.total)
202
+          })
203
+          num += number.reduce((a, b) => a + b, 0)
129 204
         })
130
-        num += number.reduce((a, b) => a + b, 0);
131
-      });
132
-      return num;
205
+        return num
206
+      } else {
207
+        return 0
208
+      }
133 209
     },
134
-    preferentialPrice(){
135
-      let num = 0;
136
-      this.listToDetails.listVO.forEach(item => {
137
-        const number = [];
138
-        item.collectCostDetailsVOList.forEach(item1 => {
139
-          number.push(item1.preferentialPrice * item1.total)
210
+    preferentialPrice() {
211
+      if (
212
+        Array.isArray(this.listToDetails.listVO) &&
213
+        this.listToDetails.listVO.length
214
+      ) {
215
+        let num = 0
216
+
217
+        this.listToDetails.listVO.forEach((item) => {
218
+          const number = []
219
+          item.collectCostDetailsVOList.forEach((item1) => {
220
+            number.push(item1.preferentialPrice * item1.total)
221
+          })
222
+          num += number.reduce((a, b) => a + b, 0)
140 223
         })
141
-        num += number.reduce((a, b) => a + b, 0);
142
-      });
143
-      return num;
144
-    },
224
+        return num
225
+      } else {
226
+        return 0
227
+      }
228
+    }
145 229
   },
146 230
   mounted() {},
147 231
 
148 232
   methods: {
149
-    async initList (){
150
-      const res = await listToDetails({collectCostPatientsId: this.collectCostPatientsId})
233
+    async initList() {
234
+      const res = await listToDetails({
235
+        collectCostPatientsId: this.collectCostPatientsId
236
+      })
151 237
       this.listToDetails = res.data
152 238
     },
153 239
     cancel() {
154 240
       this.$emit('cancelAll', '6')
155 241
     },
156
-    doDel(index1 , index2){
157
-      this.listToDetails.listVO[index1].collectCostDetailsVOList.splice(index2,1)
242
+    doDel(index1, index2) {
243
+      this.listToDetails.listVO[index1].collectCostDetailsVOList.splice(
244
+        index2,
245
+        1
246
+      )
158 247
     },
159
-    doAdd(index){
248
+    doAdd(index) {
160 249
       this.toothPositionIndex = index
161 250
       this.$refs.addTemplateDialogRef.addTemplateDialogVisible = true
162 251
       this.$refs.addTemplateDialogRef.initcollectCostTypeList()
163 252
       this.$refs.addTemplateDialogRef.initList()
164 253
     },
165
-    tableDataDown(tableDataDown){
166
-      this.listToDetails.listVO[this.toothPositionIndex].collectCostDetailsVOList = [...this.listToDetails.listVO[this.toothPositionIndex].collectCostDetailsVOList,...tableDataDown]
254
+    tableDataDown(tableDataDown) {
255
+      this.listToDetails.listVO[
256
+        this.toothPositionIndex
257
+      ].collectCostDetailsVOList = [
258
+        ...this.listToDetails.listVO[this.toothPositionIndex]
259
+          .collectCostDetailsVOList,
260
+        ...tableDataDown
261
+      ]
167 262
     },
168
-    inputVal(index ,index1,val){
169
-      this.$set(this.listToDetails.listVO[index].preferentialPrice, index1, { ...this.listToDetails.listVO[index], preferentialPrice: val });
263
+    inputVal(index, index1, val) {
264
+      this.$set(this.listToDetails.listVO[index].preferentialPrice, index1, {
265
+        ...this.listToDetails.listVO[index],
266
+        preferentialPrice: val
267
+      })
170 268
     },
171
-    changeVal(index ,index1,val){
172
-      this.$set(this.listToDetails.listVO[index].total, index1, { ...this.listToDetails.listVO[index], total: val });
269
+    changeVal(index, index1, val) {
270
+      this.$set(this.listToDetails.listVO[index].total, index1, {
271
+        ...this.listToDetails.listVO[index],
272
+        total: val
273
+      })
173 274
     },
174
-    async  submit(){
175
-      if(this.collectCostPatientsType == 1){
275
+    async submit() {
276
+      if (this.collectCostPatientsType == 1) {
176 277
         const res = await collectCostPatientsUpdate(this.listToDetails)
177
-        if (res.code !== 200) return this.message.$error(res.msg);
278
+        if (res.code !== 200) return this.$message.error(res.msg)
178 279
         this.$message.success('化价成功')
179
-      }else {
280
+      } else {
180 281
         const res = await collectCost({
181 282
           id: this.collectCostPatientsId,
182 283
           netReceiptsCost: this.listToDetails.netReceiptsCost
183 284
         })
184
-        if (res.code !== 200) return this.message.$error(res.msg);
285
+        if (res.code !== 200) return this.$message.error(res.msg)
185 286
         this.$message.success('收费成功')
186 287
       }
187 288
 
188 289
       this.cancel()
189
-    },
290
+    }
190 291
   }
191 292
 }
192 293
 </script>

+ 5 - 3
src/views/patientCenter/medical/index.vue

@@ -262,14 +262,16 @@
262 262
         >
263 263
         </vue-editor> -->
264 264
 
265
-
266
-        <editor
265
+        <!-- <editor
267 266
           id="editor_id"
268 267
           height="500px"
269 268
           :content.sync="protocolTemplateContent"
269
+          :allowImageUpload="false"
270 270
           :loadStyleMode="false"
271 271
           @on-content-change="onContentChange"
272
-        ></editor>
272
+        ></editor> -->
273
+
274
+        <div v-if="protocolTemplateContent" v-html="protocolTemplateContent" style="border: 1px solid #ccc;padding: 5px;"></div>
273 275
       </div>
274 276
       <span slot="footer" class="dialog-footer">
275 277
         <el-button @click="cancel">取 消</el-button>

+ 1 - 1
src/views/patientCenter/printMedical.vue

@@ -77,7 +77,7 @@
77 77
     >
78 78
     </vue-editor> -->
79 79
 
80
-    <div style="margin-top: 20px;width: 100%;" v-html="protocolTemplateContent"> </div>
80
+    <div v-if="protocolTemplateContent" v-html="protocolTemplateContent" style="border: 1px solid #ccc;padding: 5px;margin-top: 10px;"></div>
81 81
 
82 82
     <!-- <editor
83 83
     style="margin-top: 20px;width: 100%;"

+ 396 - 0
src/views/settingsPage/announcements/index.vue

@@ -0,0 +1,396 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :inline="true">
4
+      <el-form-item label="公告名称:">
5
+        <el-input v-model="form.noticeTitle"></el-input>
6
+      </el-form-item>
7
+      <el-form-item label="是否发布:">
8
+        <el-select v-model="form.publishStatus">
9
+          <el-option label="全部" value=""></el-option>
10
+          <el-option label="未发布" :value="0"></el-option>
11
+          <el-option label="已发布" :value="1"></el-option>
12
+        </el-select>
13
+      </el-form-item>
14
+      <el-form-item label="显示状态:">
15
+        <el-select v-model="form.displayStatus">
16
+          <el-option label="全部" value=""></el-option>
17
+          <el-option label="未开始" :value="1"></el-option>
18
+          <el-option label="显示中" :value="2"></el-option>
19
+          <el-option label="已结束" :value="3"></el-option>
20
+        </el-select>
21
+      </el-form-item>
22
+      <el-form-item>
23
+        <el-button type="primary" @click="initList" icon="el-icon-search"
24
+          >搜索</el-button
25
+        >
26
+        <el-button @click="reset">重置</el-button>
27
+      </el-form-item>
28
+    </el-form>
29
+
30
+    <el-row style="margin-bottom: 20px">
31
+      <el-button
32
+        @click="add"
33
+        type="primary"
34
+        plain
35
+        icon="el-icon-plus"
36
+        size="mini"
37
+        >新增</el-button
38
+      >
39
+    </el-row>
40
+
41
+    <el-table :data="tableData" style="width: 100%">
42
+      <el-table-column show-overflow-tooltip label="公告名称" align="center">
43
+        <template #default="{ row }">
44
+          {{ row.noticeTitle || '-' }}
45
+        </template>
46
+      </el-table-column>
47
+      <el-table-column
48
+        show-overflow-tooltip
49
+        label="是否发布"
50
+        width="100"
51
+        align="center"
52
+      >
53
+        <template #default="{ row }">
54
+          {{ initPublishStatus(row.publishStatus) }}
55
+        </template>
56
+      </el-table-column>
57
+      <el-table-column
58
+        show-overflow-tooltip
59
+        label="显示状态"
60
+        width="100"
61
+        align="center"
62
+      >
63
+        <template #default="{ row }">
64
+          {{ initDisplayStatus(row.displayStatus) }}
65
+        </template>
66
+      </el-table-column>
67
+      <el-table-column show-overflow-tooltip label="显示时间" align="center">
68
+        <template #default="{ row }">
69
+          {{ row.noticeStartTime }} ~ {{ row.noticeEndTime }}
70
+        </template>
71
+      </el-table-column>
72
+      <el-table-column
73
+        show-overflow-tooltip
74
+        label="发布人"
75
+        width="100"
76
+        align="center"
77
+      >
78
+        <template #default="{ row }">
79
+          {{ row.publishPeople }}
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column
83
+        show-overflow-tooltip
84
+        label="添加人"
85
+        width="100"
86
+        align="center"
87
+      >
88
+        <template #default="{ row }">
89
+          {{ row.createUser }}
90
+        </template>
91
+      </el-table-column>
92
+      <el-table-column
93
+        show-overflow-tooltip
94
+        label="最后修改时间"
95
+        width="150"
96
+        align="center"
97
+      >
98
+        <template #default="{ row }">
99
+          {{ row.updateDate }}
100
+        </template>
101
+      </el-table-column>
102
+      <el-table-column fixed="right" label="操作" width="150">
103
+        <template slot-scope="scope">
104
+          <el-button
105
+            v-if="scope.row.publishStatus == 1"
106
+            type="text"
107
+            size="small"
108
+            @click="withdraw(scope.row)"
109
+            >撤回</el-button
110
+          >
111
+          <el-button v-if="scope.row.publishStatus == 0" type="text" size="small" @click="edit(scope.row)"
112
+            >修改</el-button
113
+          >
114
+          <el-button
115
+            type="text"
116
+            size="small"
117
+            v-if="scope.row.publishStatus == 0"
118
+            @click="del(scope.row)"
119
+            style="color: red"
120
+            >删除</el-button
121
+          >
122
+        </template>
123
+      </el-table-column>
124
+    </el-table>
125
+
126
+    <pagination
127
+      v-show="total > 0"
128
+      :total="total"
129
+      :page.sync="form.pageNum"
130
+      :limit.sync="form.pageSize"
131
+      @pagination="initList"
132
+    />
133
+
134
+    <el-dialog
135
+      :title="title"
136
+      :visible.sync="dialogVisible"
137
+      v-if="dialogVisible"
138
+      width="900px"
139
+      :close-on-press-escape="false"
140
+      :close-on-click-modal="false"
141
+      @close="cancel"
142
+      :before-close="cancel"
143
+    >
144
+      <div style="max-height: 65vh; overflow: auto">
145
+        <el-form
146
+          :model="ruleForm"
147
+          :rules="rules"
148
+          ref="ruleForm"
149
+          label-width="100px"
150
+          label-position="right"
151
+        >
152
+          <el-form-item label="公告名称:" prop="noticeTitle">
153
+            <el-input
154
+              v-model="ruleForm.noticeTitle"
155
+              style="width: 500px"
156
+            ></el-input>
157
+          </el-form-item>
158
+          <el-form-item label="显示时间:" prop="time">
159
+            <el-date-picker
160
+              style="width: 500px"
161
+              v-model="ruleForm.time"
162
+              type="datetimerange"
163
+              value-format="yyyy-MM-dd HH:mm:ss"
164
+              range-separator="至"
165
+              start-placeholder="开始日期"
166
+              end-placeholder="结束日期"
167
+            >
168
+            </el-date-picker>
169
+          </el-form-item>
170
+          <el-form-item label="是否发布:" prop="publishStatus">
171
+            <el-radio-group v-model="ruleForm.publishStatus">
172
+              <el-radio :label="1">是</el-radio>
173
+              <el-radio :label="0">否</el-radio>
174
+            </el-radio-group>
175
+          </el-form-item>
176
+          <el-form-item label="发布人:" prop="publishPeople">
177
+            <el-input
178
+              v-model="ruleForm.publishPeople"
179
+              style="width: 500px"
180
+            ></el-input>
181
+          </el-form-item>
182
+          <el-form-item label="公告内容:" prop="noticeContent">
183
+            <editor
184
+              id="editor_id"
185
+              height="500px"
186
+              :content.sync="ruleForm.noticeContent"
187
+              :loadStyleMode="false"
188
+              @on-content-change="onContentChange"
189
+            ></editor>
190
+          </el-form-item>
191
+        </el-form>
192
+      </div>
193
+      <span slot="footer" class="dialog-footer">
194
+        <el-button @click="cancel">取 消</el-button>
195
+        <el-button type="primary" @click="submit">确 定</el-button>
196
+      </span>
197
+    </el-dialog>
198
+  </div>
199
+</template>
200
+
201
+<script>
202
+import editor from '@/components/editorr/index'
203
+import {
204
+  noticeManageList,
205
+  noticeManageRevoke,
206
+  noticeManageRemove,
207
+  noticeManageAdd,
208
+  noticeManageUpdate,
209
+  noticeManageDetails
210
+} from '@/api/allApi.js'
211
+
212
+export default {
213
+  name: 'EitcErmPcIndex',
214
+  components: {
215
+    editor
216
+  },
217
+  data() {
218
+    return {
219
+      form: {
220
+        noticeTitle: '',
221
+        publishStatus: '',
222
+        displayStatus: '',
223
+        pageNum: 1,
224
+        pageSize: 10
225
+      },
226
+      title: '',
227
+      dialogVisible: false,
228
+      ruleForm: {
229
+        noticeTitle: '',
230
+        time: null,
231
+        publishStatus: 1,
232
+        publishPeople: '',
233
+        noticeContent: ''
234
+      },
235
+      rules: {
236
+        noticeTitle: [
237
+          { required: true, message: '请输入公告名称', trigger: 'blur' }
238
+        ],
239
+        time: [
240
+          { required: true, message: '请选择显示时间', trigger: 'change' }
241
+        ],
242
+        publishStatus: [
243
+          { required: true, message: '请选择发布状态', trigger: 'change' }
244
+        ],
245
+        publishPeople: [
246
+          { required: true, message: '请输入发布人', trigger: 'blur' }
247
+        ],
248
+        noticeContent: [
249
+          { required: true, message: '请输入公告内容', trigger: 'change' }
250
+        ]
251
+      },
252
+      tableData: [],
253
+      total: 0
254
+    }
255
+  },
256
+
257
+  mounted() {
258
+    this.initList()
259
+  },
260
+
261
+  methods: {
262
+    async initList() {
263
+      const res = await noticeManageList(this.form)
264
+      this.tableData = res.rows
265
+      this.total = res.total
266
+    },
267
+    reset() {
268
+      this.form = {
269
+        noticeTitle: '',
270
+        publishStatus: '',
271
+        displayStatus: '',
272
+        pageNum: 1,
273
+        pageSize: 10
274
+      }
275
+      this.initList()
276
+    },
277
+    withdraw(val) {
278
+      this.$confirm('确认撤回吗?', '提示', {
279
+        confirmButtonText: '确定',
280
+        cancelButtonText: '取消',
281
+        type: 'warning'
282
+      })
283
+        .then(async () => {
284
+          const res = await noticeManageRevoke({ id: val.id })
285
+          if (res.code !== 200) return this.$message.error(res.msg)
286
+          this.initList()
287
+          this.$message({
288
+            type: 'success',
289
+            message: '撤回成功!'
290
+          })
291
+        })
292
+        .catch(() => {
293
+          this.$message({
294
+            type: 'info',
295
+            message: '已取消撤回'
296
+          })
297
+        })
298
+    },
299
+    async edit(val) {
300
+      this.dialogVisible = true
301
+      this.title = '编辑公告'
302
+      const res = await noticeManageDetails({ id: val.id })
303
+      this.ruleForm = res.data
304
+      this.ruleForm.time = [
305
+        res.data.noticeStartTime,
306
+        res.data.noticeEndTime
307
+      ]
308
+      this.$forceUpdate()
309
+    },
310
+    del(val) {
311
+      this.$confirm('此操作将永久删除该项?', '提示', {
312
+        confirmButtonText: '确定',
313
+        cancelButtonText: '取消',
314
+        type: 'warning'
315
+      })
316
+        .then(async () => {
317
+          const res = await noticeManageRemove(val.id)
318
+          if (res.code !== 200) return this.$message.error(res.msg)
319
+          this.initList()
320
+          this.$message({
321
+            type: 'success',
322
+            message: '删除成功!'
323
+          })
324
+        })
325
+        .catch(() => {
326
+        })
327
+    },
328
+    initPublishStatus(val) {
329
+      switch (val) {
330
+        case 0:
331
+          return '未发布'
332
+        case 1:
333
+          return '已发布'
334
+        default:
335
+          '-'
336
+          break
337
+      }
338
+    },
339
+    initDisplayStatus(val) {
340
+      switch (val) {
341
+        case 1:
342
+          return '未开始'
343
+        case 2:
344
+          return '显示中'
345
+        case 3:
346
+          return '已结束'
347
+        default:
348
+          '-'
349
+          break
350
+      }
351
+    },
352
+    onContentChange(val) {
353
+      this.ruleForm.name = val
354
+    },
355
+    add() {
356
+      this.dialogVisible = true
357
+      this.title = '添加公告'
358
+      this.ruleForm = {
359
+        noticeTitle: '',
360
+        time: null,
361
+        publishStatus: 1,
362
+        publishPeople: '',
363
+        noticeContent: ''
364
+      }
365
+    },
366
+    submit() {
367
+      this.$refs.ruleForm.validate(async (valid) => {
368
+        if (valid) {
369
+          if(this.title == "添加公告"){
370
+            this.ruleForm.noticeStartTime = this.ruleForm.time[0]
371
+            this.ruleForm.noticeEndTime = this.ruleForm.time[1]
372
+            const res = await noticeManageAdd(this.ruleForm)
373
+            if (res.code !== 200) return this.$message.error(res.msg)
374
+            this.dialogVisible = false
375
+            this.$message.success('添加公告!')
376
+          }else {
377
+            this.ruleForm.noticeStartTime = this.ruleForm.time[0]
378
+            this.ruleForm.noticeEndTime = this.ruleForm.time[1]
379
+            const res = await noticeManageUpdate(this.ruleForm)
380
+            if (res.code !== 200) return this.$message.error(res.msg)
381
+            this.dialogVisible = false
382
+            this.$message.success('编辑公告!')
383
+          }
384
+          this.initList()
385
+        } else {
386
+          this.$message.error('必填项不能为空!')
387
+          return false
388
+        }
389
+      })
390
+    },
391
+    cancel() {
392
+      this.dialogVisible = false
393
+    }
394
+  }
395
+}
396
+</script>