vue2-client 1.14.81 → 1.14.83

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.
Files changed (21) hide show
  1. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250609151519.vue +222 -0
  2. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155514.vue +183 -0
  3. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155556.vue +183 -0
  4. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612155600.vue +183 -0
  5. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181609.vue +206 -0
  6. package/.history/src/base-client/components/his/XShiftSchedule/XShiftSchedule_20250612181629.vue +209 -0
  7. package/docs//345/207/275/346/225/260/344/275/277/347/224/250/347/233/270/345/205/263.md +2 -1
  8. package/package.json +1 -1
  9. package/src/base-client/components/common/Upload/Upload.vue +0 -1
  10. package/src/base-client/components/common/XTab/XTab.vue +8 -0
  11. package/src/base-client/components/his/XQuestionnaire/XQuestionnaire.vue +13 -236
  12. package/src/base-client/components/his/XQuestionnaire/XQuestionnaireDemo.vue +3 -14
  13. package/src/base-client/components/his/XQuestionnaire/XQuestionnaireItem.vue +280 -0
  14. package/src/base-client/components/his/XShiftSchedule/XShiftSchedule.vue +32 -45
  15. package/src/components/FileImageItem/FileItem.vue +1 -1
  16. package/src/pages/WorkflowDetail/WorkFlowDemo.vue +1 -1
  17. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowHandle.vue +26 -56
  18. package/src/pages/WorkflowDetail/WorkflowPageDetail/WorkFlowPreview.vue +98 -0
  19. package/src/router/async/router.map.js +1 -1
  20. package/src/utils/axios-interceptors.js +19 -1
  21. package/src/utils/request.js +5 -0
@@ -0,0 +1,222 @@
1
+ <template>
2
+ <a-table
3
+ :columns="columns"
4
+ :data-source="data"
5
+ :rowSelection="rowSelection"
6
+ :scroll="{ y: '75vh' }">
7
+ <span slot="time" class="time-title">
8
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
+ </span>
10
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
11
+ <div class="time-title" :key="day.key">
12
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
13
+ </div>
14
+ </template>
15
+ <template slot="sk_limit" slot-scope="text, record">
16
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
17
+ </template>
18
+ </a-table>
19
+ </template>
20
+ <script>
21
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
22
+
23
+ export default {
24
+ data () {
25
+ return {
26
+ data: [],
27
+ // 列配置
28
+ columns: [],
29
+ // 列名
30
+ columnNames: [],
31
+ // 选中的行键值集合
32
+ selectedRows: [],
33
+ // 选中的行信息集合
34
+ selectedRowKeys: [],
35
+ // 原始数据备份
36
+ originalData: [],
37
+ // 配置参数
38
+ configData: {},
39
+ // 排班时间表
40
+ shiftTable: [
41
+ {
42
+ title: '周一',
43
+ key: 'Monday',
44
+ dataIndex: 'Monday',
45
+ scopedSlots: { customRender: 'Monday' },
46
+ align: 'center'
47
+ },
48
+ {
49
+ title: '周二',
50
+ key: 'Tuesday',
51
+ dataIndex: 'Tuesday',
52
+ scopedSlots: { customRender: 'Tuesday' },
53
+ align: 'center'
54
+ },
55
+ {
56
+ title: '周三',
57
+ key: 'Wednesday',
58
+ dataIndex: 'Wednesday',
59
+ scopedSlots: { customRender: 'Wednesday' },
60
+ align: 'center'
61
+ },
62
+ {
63
+ title: '周四',
64
+ key: 'Thursday',
65
+ dataIndex: 'Thursday',
66
+ scopedSlots: { customRender: 'Thursday' },
67
+ align: 'center'
68
+ },
69
+ {
70
+ title: '周五',
71
+ key: 'Friday',
72
+ dataIndex: 'Friday',
73
+ scopedSlots: { customRender: 'Friday' },
74
+ align: 'center'
75
+ },
76
+ {
77
+ title: '周六',
78
+ key: 'Saturday',
79
+ dataIndex: 'Saturday',
80
+ scopedSlots: { customRender: 'Saturday' },
81
+ align: 'center'
82
+ },
83
+ {
84
+ title: '周日',
85
+ key: 'Sunday',
86
+ dataIndex: 'Sunday',
87
+ scopedSlots: { customRender: 'Sunday' },
88
+ align: 'center'
89
+ },
90
+ {
91
+ title: '排班数',
92
+ key: 'sk_limit',
93
+ dataIndex: 'sk_limit',
94
+ scopedSlots: { customRender: 'sk_limit' },
95
+ align: 'center'
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ props: {
101
+ // 配置名
102
+ queryParamsName: {
103
+ type: String,
104
+ default: ''
105
+ },
106
+ // 服务名
107
+ serviceName: {
108
+ type: String,
109
+ default: 'af-his'
110
+ }
111
+ },
112
+ computed: {
113
+ rowSelection () {
114
+ return {
115
+ selectedRowKeys: this.selectedRowKeys,
116
+ onChange: (selectedRowKeys, selectedRows) => {
117
+ this.onSelectChange(selectedRowKeys, selectedRows)
118
+ }
119
+ }
120
+ }
121
+ },
122
+ mounted () {},
123
+ methods: {
124
+ handleShiftChange (day, index, record) {
125
+ // 找到当前记录在data中的索引
126
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
127
+ if (dataIndex === -1) return
128
+ // 获取当前状态
129
+ const currentValue = record[day][index]
130
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
131
+ // 更新按钮显示
132
+ this.$set(record[day], index, newValue)
133
+ // 同步更新data中的数据
134
+ this.$set(this.data[dataIndex][day], index, newValue)
135
+ },
136
+ onSelectChange (selectedRowKeys, selectedRows) {
137
+ this.selectedRowKeys = selectedRowKeys
138
+ this.selectedRows = selectedRows
139
+ },
140
+ // 获取选中的行数据
141
+ getSelectedRowData () {
142
+ return this.selectedRows
143
+ },
144
+ // 获取全部数据
145
+ getAllTable () {
146
+ return this.data
147
+ },
148
+ // 初始化数据
149
+ async init (queryParamsName) {
150
+ getConfigByName(queryParamsName, this.serviceName, result => {
151
+ this.configData = result
152
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
153
+ this.columns = []
154
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
155
+ for (let i = 0; i < this.shiftTable.length; i++) {
156
+ this.columns.push(this.shiftTable[i])
157
+ }
158
+ if (res && Array.isArray(res)) {
159
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
160
+ const shifts = ['am', 'pm', 'evening']
161
+ let key = 0
162
+ this.data = res.map(item => {
163
+ const scheduleData = {
164
+ key: key++
165
+ }
166
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
167
+ weekDays.forEach(day => {
168
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
169
+ })
170
+ return scheduleData
171
+ })
172
+ // 保存原始数据
173
+ this.originalData = JSON.parse(JSON.stringify(this.data))
174
+ }
175
+ })
176
+ })
177
+ },
178
+ // 查询数据函数
179
+ filterTableData (filters) {
180
+ if (!filters || Object.keys(filters).length === 0) {
181
+ // 如果没有过滤条件,恢复原始数据
182
+ this.data = JSON.parse(JSON.stringify(this.originalData))
183
+ return
184
+ }
185
+ // 从原始数据开始过滤
186
+ this.data = this.originalData.filter(item => {
187
+ // 检查每一项是否满足所有过滤条件
188
+ return Object.entries(filters).every(([key, value]) => {
189
+ // 如果过滤值是字符串,进行模糊匹配
190
+ if (typeof value === 'string') {
191
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
192
+ }
193
+ // 如果过滤值是数字,进行精确匹配
194
+ return item[key] === value
195
+ })
196
+ })
197
+ }
198
+ },
199
+ watch: {
200
+ queryParamsName: {
201
+ handler (newValue) {
202
+ this.init(newValue)
203
+ },
204
+ deep: true,
205
+ immediate: true
206
+ }
207
+ }
208
+ }
209
+ </script>
210
+
211
+ <style scoped type="less">
212
+ .time-title {
213
+ display: flex !important;
214
+ flex-direction: column !important;
215
+ align-items: center !important;
216
+ }
217
+ ::v-deep .ant-table-thead > tr > th,
218
+ ::v-deep .ant-table-tbody > tr > td {
219
+ padding: 8px 16px !important;
220
+ overflow-wrap: break-word;
221
+ }
222
+ </style>
@@ -0,0 +1,183 @@
1
+ <template>
2
+ <a-table
3
+ :columns="columns"
4
+ :data-source="data"
5
+ :rowSelection="rowSelection"
6
+ :scroll="{ y: '75vh' }">
7
+ <span slot="time" class="time-title">
8
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
+ </span>
10
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
11
+ <div class="time-title" :key="day.key">
12
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
13
+ </div>
14
+ </template>
15
+ <template slot="sk_limit" slot-scope="text, record">
16
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
17
+ </template>
18
+ </a-table>
19
+ </template>
20
+ <script>
21
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
22
+
23
+ export default {
24
+ data () {
25
+ return {
26
+ data: [],
27
+ // 列配置
28
+ columns: [],
29
+ // 列名
30
+ columnNames: [],
31
+ // 选中的行键值集合
32
+ selectedRows: [],
33
+ // 选中的行信息集合
34
+ selectedRowKeys: [],
35
+ // 原始数据备份
36
+ originalData: [],
37
+ // 配置参数
38
+ configData: {},
39
+ // 排班时间表
40
+ shiftTable: [
41
+ ...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
42
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
43
+ return {
44
+ title,
45
+ key,
46
+ dataIndex: key,
47
+ scopedSlots: { customRender: key },
48
+ align: 'center'
49
+ }
50
+ }),
51
+ {
52
+ title: '排班数',
53
+ key: 'sk_limit',
54
+ dataIndex: 'sk_limit',
55
+ scopedSlots: { customRender: 'sk_limit' },
56
+ align: 'center'
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ props: {
62
+ // 配置名
63
+ queryParamsName: {
64
+ type: String,
65
+ default: ''
66
+ },
67
+ // 服务名
68
+ serviceName: {
69
+ type: String,
70
+ default: 'af-his'
71
+ }
72
+ },
73
+ computed: {
74
+ rowSelection () {
75
+ return {
76
+ selectedRowKeys: this.selectedRowKeys,
77
+ onChange: (selectedRowKeys, selectedRows) => {
78
+ this.onSelectChange(selectedRowKeys, selectedRows)
79
+ }
80
+ }
81
+ }
82
+ },
83
+ mounted () {},
84
+ methods: {
85
+ handleShiftChange (day, index, record) {
86
+ // 找到当前记录在data中的索引
87
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
88
+ if (dataIndex === -1) return
89
+ // 获取当前状态
90
+ const currentValue = record[day][index]
91
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
92
+ // 更新按钮显示
93
+ this.$set(record[day], index, newValue)
94
+ // 同步更新data中的数据
95
+ this.$set(this.data[dataIndex][day], index, newValue)
96
+ },
97
+ onSelectChange (selectedRowKeys, selectedRows) {
98
+ this.selectedRowKeys = selectedRowKeys
99
+ this.selectedRows = selectedRows
100
+ },
101
+ // 获取选中的行数据
102
+ getSelectedRowData () {
103
+ return this.selectedRows
104
+ },
105
+ // 获取全部数据
106
+ getAllTable () {
107
+ return this.data
108
+ },
109
+ // 初始化数据
110
+ async init (queryParamsName) {
111
+ getConfigByName(queryParamsName, this.serviceName, result => {
112
+ this.configData = result
113
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
114
+ this.columns = []
115
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
116
+ for (let i = 0; i < this.shiftTable.length; i++) {
117
+ this.columns.push(this.shiftTable[i])
118
+ }
119
+ if (res && Array.isArray(res)) {
120
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
121
+ const shifts = ['am', 'pm', 'evening']
122
+ let key = 0
123
+ this.data = res.map(item => {
124
+ const scheduleData = {
125
+ key: key++
126
+ }
127
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
128
+ weekDays.forEach(day => {
129
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
130
+ })
131
+ return scheduleData
132
+ })
133
+ // 保存原始数据
134
+ this.originalData = JSON.parse(JSON.stringify(this.data))
135
+ }
136
+ })
137
+ })
138
+ },
139
+ // 查询数据函数
140
+ filterTableData (filters) {
141
+ if (!filters || Object.keys(filters).length === 0) {
142
+ // 如果没有过滤条件,恢复原始数据
143
+ this.data = JSON.parse(JSON.stringify(this.originalData))
144
+ return
145
+ }
146
+ // 从原始数据开始过滤
147
+ this.data = this.originalData.filter(item => {
148
+ // 检查每一项是否满足所有过滤条件
149
+ return Object.entries(filters).every(([key, value]) => {
150
+ // 如果过滤值是字符串,进行模糊匹配
151
+ if (typeof value === 'string') {
152
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
153
+ }
154
+ // 如果过滤值是数字,进行精确匹配
155
+ return item[key] === value
156
+ })
157
+ })
158
+ }
159
+ },
160
+ watch: {
161
+ queryParamsName: {
162
+ handler (newValue) {
163
+ this.init(newValue)
164
+ },
165
+ deep: true,
166
+ immediate: true
167
+ }
168
+ }
169
+ }
170
+ </script>
171
+
172
+ <style scoped type="less">
173
+ .time-title {
174
+ display: flex !important;
175
+ flex-direction: column !important;
176
+ align-items: center !important;
177
+ }
178
+ ::v-deep .ant-table-thead > tr > th,
179
+ ::v-deep .ant-table-tbody > tr > td {
180
+ padding: 8px 16px !important;
181
+ overflow-wrap: break-word;
182
+ }
183
+ </style>
@@ -0,0 +1,183 @@
1
+ <template>
2
+ <a-table
3
+ :columns="columns"
4
+ :data-source="data"
5
+ :rowSelection="rowSelection"
6
+ :scroll="{ y: '75vh' }">
7
+ <span slot="time" class="time-title">
8
+ <span v-for="(item, index) in configData.timePeriod" :key="index">{{ item }}</span>
9
+ </span>
10
+ <template :slot="day.key" slot-scope="text, record" v-for="day in shiftTable">
11
+ <div class="time-title" :key="day.key">
12
+ <a-button v-for="(item, index) in record[day.key]" :key="index" @click="handleShiftChange(day.key, index, record)">{{ item === 1 || item === '1' ? '坐诊' : '休息' }}</a-button>
13
+ </div>
14
+ </template>
15
+ <template slot="sk_limit" slot-scope="text, record">
16
+ <a-input-number id="inputNumber" v-model="record.sk_limit" :min="configData.sk_limitMin" :max="configData.sk_limitMax" />
17
+ </template>
18
+ </a-table>
19
+ </template>
20
+ <script>
21
+ import { getConfigByName, runLogic } from '@vue2-client/services/api/common'
22
+
23
+ export default {
24
+ data () {
25
+ return {
26
+ data: [],
27
+ // 列配置
28
+ columns: [],
29
+ // 列名
30
+ columnNames: [],
31
+ // 选中的行键值集合
32
+ selectedRows: [],
33
+ // 选中的行信息集合
34
+ selectedRowKeys: [],
35
+ // 原始数据备份
36
+ originalData: [],
37
+ // 配置参数
38
+ configData: {},
39
+ // 排班时间表
40
+ shiftTable: [
41
+ ...['周一', '周二', '周三', '周四', '周五', '周六', '周日'].map((title, index) => {
42
+ const key = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][index]
43
+ return {
44
+ title,
45
+ key,
46
+ dataIndex: key,
47
+ scopedSlots: { customRender: key },
48
+ align: 'center'
49
+ }
50
+ }),
51
+ {
52
+ title: '排班数',
53
+ key: 'sk_limit',
54
+ dataIndex: 'sk_limit',
55
+ scopedSlots: { customRender: 'sk_limit' },
56
+ align: 'center'
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ props: {
62
+ // 配置名
63
+ queryParamsName: {
64
+ type: String,
65
+ default: ''
66
+ },
67
+ // 服务名
68
+ serviceName: {
69
+ type: String,
70
+ default: 'af-his'
71
+ }
72
+ },
73
+ computed: {
74
+ rowSelection () {
75
+ return {
76
+ selectedRowKeys: this.selectedRowKeys,
77
+ onChange: (selectedRowKeys, selectedRows) => {
78
+ this.onSelectChange(selectedRowKeys, selectedRows)
79
+ }
80
+ }
81
+ }
82
+ },
83
+ mounted () {},
84
+ methods: {
85
+ handleShiftChange (day, index, record) {
86
+ // 找到当前记录在data中的索引
87
+ const dataIndex = this.data.findIndex(item => item.id === record.id)
88
+ if (dataIndex === -1) return
89
+ // 获取当前状态
90
+ const currentValue = record[day][index]
91
+ const newValue = currentValue === 1 || currentValue === '1' ? 0 : 1
92
+ // 更新按钮显示
93
+ this.$set(record[day], index, newValue)
94
+ // 同步更新data中的数据
95
+ this.$set(this.data[dataIndex][day], index, newValue)
96
+ },
97
+ onSelectChange (selectedRowKeys, selectedRows) {
98
+ this.selectedRowKeys = selectedRowKeys
99
+ this.selectedRows = selectedRows
100
+ },
101
+ // 获取选中的行数据
102
+ getSelectedRowData () {
103
+ return this.selectedRows
104
+ },
105
+ // 获取全部数据
106
+ getAllTable () {
107
+ return this.data
108
+ },
109
+ // 初始化数据
110
+ async init (queryParamsName) {
111
+ getConfigByName(queryParamsName, this.serviceName, result => {
112
+ this.configData = result
113
+ runLogic(result.dataSource, {}, this.serviceName).then(res => {
114
+ this.columns = []
115
+ this.columns = JSON.parse(JSON.stringify(this.configData.columns))
116
+ for (let i = 0; i < this.shiftTable.length; i++) {
117
+ this.columns.push(this.shiftTable[i])
118
+ }
119
+ if (res && Array.isArray(res)) {
120
+ const weekDays = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']
121
+ const shifts = ['am', 'pm', 'evening']
122
+ let key = 0
123
+ this.data = res.map(item => {
124
+ const scheduleData = {
125
+ key: key++
126
+ }
127
+ this.configData.columnsName.forEach(columnName => { scheduleData[columnName] = item[columnName] })
128
+ weekDays.forEach(day => {
129
+ scheduleData[day.charAt(0).toUpperCase() + day.slice(1)] = shifts.map(shift => item[`f_${day}_${shift}`] === '1' ? 1 : 0)
130
+ })
131
+ return scheduleData
132
+ })
133
+ // 保存原始数据
134
+ this.originalData = JSON.parse(JSON.stringify(this.data))
135
+ }
136
+ })
137
+ })
138
+ },
139
+ // 查询数据函数
140
+ filterTableData (filters) {
141
+ if (!filters || Object.keys(filters).length === 0) {
142
+ // 如果没有过滤条件,恢复原始数据
143
+ this.data = JSON.parse(JSON.stringify(this.originalData))
144
+ return
145
+ }
146
+ // 从原始数据开始过滤
147
+ this.data = this.originalData.filter(item => {
148
+ // 检查每一项是否满足所有过滤条件
149
+ return Object.entries(filters).every(([key, value]) => {
150
+ // 如果过滤值是字符串,进行模糊匹配
151
+ if (typeof value === 'string') {
152
+ return item[key] && item[key].toString().toLowerCase().includes(value.toLowerCase())
153
+ }
154
+ // 如果过滤值是数字,进行精确匹配
155
+ return item[key] === value
156
+ })
157
+ })
158
+ }
159
+ },
160
+ watch: {
161
+ queryParamsName: {
162
+ handler (newValue) {
163
+ this.init(newValue)
164
+ },
165
+ deep: true,
166
+ immediate: true
167
+ }
168
+ }
169
+ }
170
+ </script>
171
+
172
+ <style scoped type="less">
173
+ .time-title {
174
+ display: flex !important;
175
+ flex-direction: column !important;
176
+ align-items: center !important;
177
+ }
178
+ ::v-deep .ant-table-thead > tr > th,
179
+ ::v-deep .ant-table-tbody > tr > td {
180
+ padding: 8px 16px !important;
181
+ overflow-wrap: break-word;
182
+ }
183
+ </style>