vue2-client 1.14.42 → 1.14.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,19 +8,16 @@
8
8
  <a-button plain type="primary" @click="showVitalSignsModal('update')" :loading="loading" :disabled="!editorReady">更新体温单</a-button>
9
9
  </a-button-group>
10
10
  <a-button-group style="margin: 0 20px;">
11
- <a-button plain type="primary" @click="showVitalSignsModal('baby')" :loading="loading" :disabled="!editorReady">新生儿体温单</a-button>
12
- </a-button-group>
13
- <a-button-group style="margin: 0 20px;">
14
- <a-button plain type="primary" @click="execCommand('preview')" :loading="loading" :disabled="!editorReady">打印预览</a-button>
15
11
  <a-button plain type="primary" @click="execCommand('print')" :loading="loading" :disabled="!editorReady">打印</a-button>
16
12
  </a-button-group>
17
13
  <!-- 修改清空体温单按钮样式,使其更加醒目 -->
18
- <a-button type="primary"
19
- danger
20
- @click="clearVitalSigns"
21
- :loading="loading"
22
- :disabled="!editorReady"
23
- style="margin-left: 10px;">
14
+ <a-button
15
+ type="primary"
16
+ danger
17
+ @click="clearVitalSigns"
18
+ :loading="loading"
19
+ :disabled="!editorReady"
20
+ style="margin-left: 10px;">
24
21
  <a-icon type="delete" /> 清空体温单
25
22
  </a-button>
26
23
  </a-row>
@@ -70,8 +67,7 @@ const emit = defineEmits(['submit'])
70
67
  // 常量
71
68
  const modalTitles = {
72
69
  create: '创建体温单',
73
- update: '更新体温单',
74
- baby: '新生儿体温单'
70
+ update: '更新体温单'
75
71
  }
76
72
 
77
73
  // 显示弹窗
@@ -272,22 +268,16 @@ const handleSubmit = async (formData) => {
272
268
  loading.value = true
273
269
  generating.value = true // 开始生成,显示加载遮罩
274
270
  try {
275
- // 简化代码,直接在现有体温单上创建新的体温单(不再清空)
276
271
  let result
277
272
  try {
278
273
  const iframe = editorComponent.value.$refs.editorIframe
279
274
  if (iframe?.contentWindow) {
280
- const dataStr = JSON.stringify(formData)
281
- const script = `
282
- try {
283
- const data = JSON.parse('${dataStr.replace(/'/g, "\\'")}');
284
- return editor.createVitalSigns(data);
285
- } catch(e) {
286
- console.error('iframe执行错误:', e);
287
- return null;
288
- }
289
- `
290
- result = iframe.contentWindow.eval(script)
275
+ // 直接传递数据对象,避免使用eval
276
+ if (iframe.contentWindow.editor && typeof iframe.contentWindow.editor.createVitalSigns === 'function') {
277
+ result = iframe.contentWindow.editor.createVitalSigns(formData)
278
+ } else {
279
+ throw new Error('编辑器对象无效')
280
+ }
291
281
  } else if (window.iframeEditor) {
292
282
  result = window.iframeEditor.createVitalSigns(formData)
293
283
  } else {
@@ -6,7 +6,7 @@ export default {
6
6
  components: { WorkflowDetail },
7
7
  mounted () {
8
8
  this.$refs.workFlow.init({
9
- workflowId: '1'
9
+ workflowId: '11'
10
10
  })
11
11
  },
12
12
  methods: {
@@ -2,30 +2,40 @@
2
2
  <!-- 抽屉 -->
3
3
  <a-drawer
4
4
  :visible="visible"
5
- width="85vw"
5
+ width="95vw"
6
6
  :placement="direction"
7
7
  title="流程详情"
8
8
  @close="onClose"
9
+ class="modern-workflow-drawer"
10
+ :bodyStyle="{ padding: '0', background: '#f5f7fa' }"
11
+ :headerStyle="{ borderBottom: '1px solid #eaedf2', padding: '16px 24px' }"
9
12
  >
10
- <div>
11
- <!-- 基础信息 -->
12
- <workflow-base-information
13
- v-if="details"
14
- ref="baseInformation"
15
- :workflow-id="workflowId"
16
- :details="details"
17
- :visible="visible"
18
- />
19
- <div :style="{ height: screenHeight * 0.9 + 'px' }">
20
- <a-card style="margin-top: 20px">
21
- <a-tabs :activeKey="activeKey" @change="changeTab">
22
- <a-tab-pane key="1" tab="查看 / 编辑进度">
13
+ <div class="workflow-container">
14
+ <!-- 基础信息卡片 -->
15
+ <div class="info-section">
16
+ <workflow-base-information
17
+ v-if="details"
18
+ ref="baseInformation"
19
+ :workflow-id="workflowId"
20
+ :details="details"
21
+ :visible="visible"
22
+ class="base-info-card"
23
+ />
24
+ </div>
25
+
26
+ <!-- 内容区域 -->
27
+ <div class="content-section" :style="{ minHeight: screenHeight * 0.7 + 'px' }">
28
+ <a-card class="content-card" :bordered="false">
29
+ <a-tabs
30
+ :activeKey="activeKey"
31
+ @change="changeTab"
32
+ class="modern-tabs"
33
+ :tabBarStyle="{ marginBottom: '5px', borderBottom: '1px solid #eaedf2' }"
34
+ >
35
+ <!-- 查看/编辑进度标签页 -->
36
+ <a-tab-pane key="1" tab="开始工作">
23
37
  <WorkFlowHandle
24
- v-if="
25
- activeKey === '1' &&
26
- details.f_state !== undefined &&
27
- steps !== undefined
28
- "
38
+ v-if="activeKey === '1' && details.f_state !== undefined && steps !== undefined"
29
39
  ref="workflowHandle"
30
40
  :workflow-id="workflowId"
31
41
  :workflowState="details.f_state === 1"
@@ -37,29 +47,39 @@
37
47
  @refresh="stepChanged"
38
48
  @success="success"
39
49
  @nextClick="nextClick"
50
+ class="handle-content"
40
51
  />
41
52
  </a-tab-pane>
42
- <a-tab-pane key="2" tab="任务流转记录">
43
- <workflow-log v-if="activeKey === '2'" :workflow-id="workflowId"/>
53
+
54
+ <!-- 任务流转记录标签页 -->
55
+ <a-tab-pane key="2" tab="流转记录">
56
+ <workflow-log
57
+ v-if="activeKey === '2'"
58
+ :workflow-id="workflowId"
59
+ class="log-content"
60
+ />
44
61
  </a-tab-pane>
62
+
63
+ <!-- 任务留言标签页 -->
45
64
  <a-tab-pane key="4">
46
- <span slot="tab">
65
+ <span slot="tab" class="message-tab">
47
66
  <span>任务留言</span>
48
67
  <a-badge
49
68
  :count="messageList.length"
50
- :offset="[4, -4]"
51
- :number-style="{ backgroundColor: '#b2b2b2' }"></a-badge>
69
+ :offset="[8, -4]"
70
+ :numberStyle="{ backgroundColor: '#5B6B8F', fontSize: '12px', padding: '0 6px', height: '18px', lineHeight: '18px', borderRadius: '9px' }"
71
+ />
52
72
  </span>
53
- <a-row>
54
- <a-col :span="14">
55
- <leave-message
56
- :workflowId="this.workflowId"
57
- :projectName="details.f_task_name"
58
- :data="messageList"
59
- :loading="messageLoading"
60
- @success="success"/>
61
- </a-col>
62
- </a-row>
73
+ <div class="message-content">
74
+ <leave-message
75
+ :workflowId="workflowId"
76
+ :projectName="details.f_task_name"
77
+ :data="messageList"
78
+ :loading="messageLoading"
79
+ @success="success"
80
+ class="leave-message-component"
81
+ />
82
+ </div>
63
83
  </a-tab-pane>
64
84
  </a-tabs>
65
85
  </a-card>
@@ -204,6 +224,71 @@ export default {
204
224
  </script>
205
225
 
206
226
  <style lang="less" scoped>
227
+ .workflow-container {
228
+ height: 100%;
229
+ display: flex;
230
+ flex-direction: column;
231
+
232
+ .info-section {
233
+ padding: 16px 24px;
234
+ background-color: #fff;
235
+ border-bottom: 1px solid #eaedf2;
236
+ }
237
+
238
+ .content-section {
239
+ flex: 1;
240
+ padding: 16px 24px;
241
+
242
+ .content-card {
243
+ border-radius: 8px;
244
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
245
+
246
+ /deep/ .ant-card-body {
247
+ padding: 12px 24px 24px;
248
+ }
249
+ }
250
+ }
251
+ }
252
+
253
+ .modern-tabs {
254
+ /deep/ .ant-tabs-nav {
255
+ margin-bottom: 0;
256
+ }
257
+
258
+ /deep/ .ant-tabs-tab {
259
+ padding: 12px 0;
260
+ margin-right: 48px;
261
+ font-size: 15px;
262
+ }
263
+
264
+ /deep/ .ant-tabs-tab-active {
265
+ font-weight: 500;
266
+ }
267
+
268
+ /deep/ .ant-tabs-ink-bar {
269
+ height: 3px;
270
+ border-radius: 3px 3px 0 0;
271
+ }
272
+ }
273
+
274
+ .message-tab {
275
+ display: flex;
276
+ align-items: center;
277
+ gap: 6px;
278
+ }
279
+
280
+ .message-content {
281
+ max-width: 900px;
282
+
283
+ .leave-message-component {
284
+ width: 100%;
285
+ }
286
+ }
287
+
288
+ .log-content {
289
+ margin-top: 16px;
290
+ }
291
+
207
292
  /deep/ .step-label {
208
293
  &:not(:first-child) {
209
294
  margin-left: 16px;
@@ -220,15 +305,15 @@ export default {
220
305
  margin-right: 8px;
221
306
 
222
307
  &.blue {
223
- border: 3px solid rgb(24, 144, 255);
308
+ border: 3px solid #5B6B8F;
224
309
  }
225
310
 
226
311
  &.green {
227
- border: 3px solid rgb(82, 196, 26);
312
+ border: 3px solid #4CAF50;
228
313
  }
229
314
 
230
315
  &.gray {
231
- border: 3px solid rgb(191, 191, 191);
316
+ border: 3px solid #cfd8e3;
232
317
  }
233
318
  }
234
319
  }