syntec3-0-ui-components-test 1.0.0

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 (99) hide show
  1. package/README.md +5 -0
  2. package/dist/S3_0UC_main.csv +4 -0
  3. package/dist/S3_0UC_sub.csv +2 -0
  4. package/dist/globalVariableS3_0UC.json +1 -0
  5. package/dist/style.css +1 -0
  6. package/dist/syntec3-0-ui-components.es.js +19518 -0
  7. package/dist/syntec3-0-ui-components.es.js.map +1 -0
  8. package/dist/syntec3-0-ui-components.umd.js +23 -0
  9. package/dist/syntec3-0-ui-components.umd.js.map +1 -0
  10. package/dist/vite.svg +1 -0
  11. package/dist/web.config +17 -0
  12. package/package.json +137 -0
  13. package/src/App.vue +31 -0
  14. package/src/assets/fonts/genYoGothicTW-normal.js +7 -0
  15. package/src/assets/image/defaultImage.png +0 -0
  16. package/src/assets/vue.svg +1 -0
  17. package/src/components/Layout/modules/fullPageGlobal.vue +113 -0
  18. package/src/components/Layout/modules/viewFile/config.js +65 -0
  19. package/src/components/Layout/modules/viewFile/createView.vue +1000 -0
  20. package/src/components/Layout/modules/viewFile/filterCriteria.vue +816 -0
  21. package/src/components/Layout/modules/viewFile/viewList.vue +291 -0
  22. package/src/components/Layout/modules/viewFile/viewManageTool.js +271 -0
  23. package/src/components/Layout/modules/viewFile/viewRecord.vue +472 -0
  24. package/src/components/Layout/modules/viewFile/viewTabs.vue +542 -0
  25. package/src/components/Layout/tools/GlobalDialog.vue +115 -0
  26. package/src/components/Pagination.vue +139 -0
  27. package/src/components/columnConfigNext.vue +273 -0
  28. package/src/components/customFilter/customFilter.vue +492 -0
  29. package/src/components/customFilter/filterCriteria.vue +769 -0
  30. package/src/components/customTable/components/headerOperation/index.vue +136 -0
  31. package/src/components/customTable/components/headerTabs/index.vue +171 -0
  32. package/src/components/customTable/components/tableContent/index.vue +440 -0
  33. package/src/components/customTable/index.vue +305 -0
  34. package/src/components/dialog.vue +85 -0
  35. package/src/components/pageContent.vue +48 -0
  36. package/src/components/popover.vue +402 -0
  37. package/src/configFiles/apiFile/baseApiList.json +11 -0
  38. package/src/configFiles/apiFile/coreApiList.json +24 -0
  39. package/src/configFiles/apiFile/mesApiList.json +4 -0
  40. package/src/configFiles/apiFile/mmsApiList.json +3 -0
  41. package/src/configFiles/errorCode.json +291 -0
  42. package/src/configFiles/version.js +2 -0
  43. package/src/i18n/lang/en-us.json +2060 -0
  44. package/src/i18n/lang/errorCodeTranslate.mjs +847 -0
  45. package/src/i18n/lang/zh-cn.json +2062 -0
  46. package/src/i18n/lang/zh-tw.json +2059 -0
  47. package/src/index.js +115 -0
  48. package/src/main.js +51 -0
  49. package/src/plugins/excel.js +88 -0
  50. package/src/router/index.js +41 -0
  51. package/src/scriptFiles/apiConfig/baseApis.js +10 -0
  52. package/src/scriptFiles/apiConfig/mesApis.js +10 -0
  53. package/src/scriptFiles/apiConfig/mmsApis.js +10 -0
  54. package/src/scriptFiles/apiConfig/privateCloudCoreApis.js +13 -0
  55. package/src/scriptFiles/apiConfig/serviceRoute.js +23 -0
  56. package/src/scriptFiles/apis/baseApiFunction.js +63 -0
  57. package/src/scriptFiles/apis/mesApiFunction.js +15 -0
  58. package/src/scriptFiles/apis/mmsApiFunction.js +9 -0
  59. package/src/scriptFiles/apis/privateCloudCoreApiFunction.js +101 -0
  60. package/src/scriptFiles/backendApiFunction.js +11 -0
  61. package/src/scriptFiles/checkApiErrorMechanism.js +137 -0
  62. package/src/scriptFiles/common/objectDataProcessing.js +65 -0
  63. package/src/scss/base/commom.scss +1068 -0
  64. package/src/scss/base/dialog.scss +45 -0
  65. package/src/scss/base/index.scss +3 -0
  66. package/src/scss/base/table.scss +28 -0
  67. package/src/store/index.js +25 -0
  68. package/src/store/module/langStore.js +116 -0
  69. package/src/style.css +52 -0
  70. package/src/utils/excel.js +86 -0
  71. package/src/utils/formula.js +69 -0
  72. package/src/utils/https.js +13 -0
  73. package/src/utils/i18n.js +42 -0
  74. package/src/utils/shiftSelect.js +164 -0
  75. package/src/utils/summation.js +77 -0
  76. package/src/utils/tableWidth.js +29 -0
  77. package/src/utils/toolFun.js +93 -0
  78. package/src/views/productionWorkOrder/components/columnConfig.vue +242 -0
  79. package/src/views/productionWorkOrder/components/docCustomFieldForm.vue +739 -0
  80. package/src/views/productionWorkOrder/components/filePreview.vue +148 -0
  81. package/src/views/productionWorkOrder/components/querySearch.vue +363 -0
  82. package/src/views/productionWorkOrder/configFiles/excelImportErrorCode.json +94 -0
  83. package/src/views/productionWorkOrder/configFiles/pdfDefaultConfig.js +933 -0
  84. package/src/views/productionWorkOrder/configFiles/planMakingScript.js +600 -0
  85. package/src/views/productionWorkOrder/configFiles/productionRelatedScript.js +368 -0
  86. package/src/views/productionWorkOrder/configFiles/rulse.js +23 -0
  87. package/src/views/productionWorkOrder/configFiles/status.js +50 -0
  88. package/src/views/productionWorkOrder/index.vue +2174 -0
  89. package/src/views/productionWorkOrder/productionFlowLabel/component/addCirculationLabel.vue +394 -0
  90. package/src/views/productionWorkOrder/productionFlowLabel/component/circulationLabelTable.vue +124 -0
  91. package/src/views/productionWorkOrder/productionFlowLabel/component/materialPartFilePreview.vue +167 -0
  92. package/src/views/productionWorkOrder/productionFlowLabel/component/workOrderInformation.vue +28 -0
  93. package/src/views/productionWorkOrder/productionFlowLabel/index.vue +604 -0
  94. package/src/views/production_work_order/components/priorityTooltip.vue +53 -0
  95. package/src/views/production_work_order/index.vue +1307 -0
  96. package/src/views/review_record/components/materialInfo.vue +50 -0
  97. package/src/views/review_record/components/rootCause.vue +42 -0
  98. package/src/views/review_record/components/workDetail.vue +115 -0
  99. package/src/views/review_record/index.vue +884 -0
@@ -0,0 +1,139 @@
1
+ <template>
2
+ <el-pagination
3
+ v-model:current-page="pageInfo.page"
4
+ v-model:page-size="pageInfo.size"
5
+ class="pagination-table"
6
+ :page-sizes="[5, 10, 20, 50, 100, 200]"
7
+ :disabled="!total"
8
+ background
9
+ layout="slot, sizes, prev, pager, next, jumper"
10
+ :total="total"
11
+ :pager-count="pagerCount"
12
+ :data-test-id="`${dataTestId}-EL-PAGINATION-fvu9sB`"
13
+ @size-change="handleSizeChange"
14
+ @current-change="handleCurrentChange"
15
+ >
16
+ <div class="slot_style" :data-test-id="`${dataTestId}-DIV-yISBZh`">
17
+ <span :data-test-id="`${dataTestId}-SPAN-lX8Y8q`">{{ $t('currentCount', { currentSize: currentCount }) }},</span>
18
+ <span v-if="hasSelected" :data-test-id="`${dataTestId}-SPAN-BlXSV7`">
19
+ {{ $t('selectedRecordsNum', { selectedNum: selectedNum }) }},
20
+ </span>
21
+ <span :data-test-id="`${dataTestId}-SPAN-qnY4fg`">{{ $t('allRecordsNum', { total: total }) }}</span>
22
+ </div>
23
+ </el-pagination>
24
+ </template>
25
+
26
+ <script setup>
27
+ import { ref, watch, onMounted } from 'vue';
28
+ import apiFunction from '@/scriptFiles/checkApiErrorMechanism.js';
29
+
30
+ const props = defineProps({
31
+ total: {
32
+ type: Number,
33
+ default: 0,
34
+ },
35
+ currentPage: {
36
+ type: Number,
37
+ default: 1,
38
+ },
39
+ pageSize: {
40
+ type: Number,
41
+ default: 20,
42
+ },
43
+ selectedNum: {
44
+ type: Number,
45
+ default: 0,
46
+ },
47
+ hasSelected: {
48
+ type: Boolean,
49
+ default: false,
50
+ },
51
+ currentCount: {
52
+ type: Number,
53
+ default: 0,
54
+ },
55
+ pagerCount: {
56
+ type: Number,
57
+ default: 7,
58
+ },
59
+ dataTestId: {
60
+ // data-test-id
61
+ type: String,
62
+ default: '',
63
+ },
64
+ pageType: {
65
+ type: Number,
66
+ default: 1,
67
+ },
68
+ permissionCode: {
69
+ type: String,
70
+ default: '',
71
+ },
72
+ });
73
+ const emits = defineEmits(['changePage']);
74
+ const pageInfo = ref({
75
+ page: props.currentPage,
76
+ size: props.pageSize,
77
+ });
78
+
79
+ function changePage() {
80
+ emits('changePage', pageInfo.value);
81
+ }
82
+
83
+ function handleSizeChange(val) {
84
+ pageInfo.value.size = val;
85
+ changePage(pageInfo);
86
+ if (props.permissionCode) {
87
+ // 更新分页显示条数
88
+ apiFunction.updatePageSetting({
89
+ permissionCode: props.permissionCode,
90
+ pageNumber: val,
91
+ pageType: props.pageType,
92
+ });
93
+ }
94
+ }
95
+
96
+ function handleCurrentChange(val) {
97
+ pageInfo.value.page = val;
98
+ changePage(pageInfo);
99
+ }
100
+ watch(
101
+ () => props.currentPage,
102
+ (val) => {
103
+ pageInfo.value.page = val;
104
+ },
105
+ );
106
+ onMounted(() => {
107
+ if (props.permissionCode) {
108
+ // 查询分页显示条数
109
+ apiFunction
110
+ .queryPageSetting({
111
+ permissionCode: props.permissionCode,
112
+ pageType: props.pageType,
113
+ })
114
+ .then((res) => {
115
+ if (res.data.code === 0) {
116
+ pageInfo.value.size = parseInt(res.data.content.pageNumber, 10);
117
+ changePage(pageInfo);
118
+ }
119
+ });
120
+ }
121
+ });
122
+ </script>
123
+
124
+ <style scoped>
125
+ .pagination-table {
126
+ display: flex;
127
+ justify-content: end;
128
+ width: 100%;
129
+ margin: 0;
130
+ box-sizing: border-box;
131
+ position: relative;
132
+ }
133
+
134
+ .slot_style {
135
+ width: 15rem;
136
+ position: absolute;
137
+ left: 0;
138
+ }
139
+ </style>
@@ -0,0 +1,273 @@
1
+ <template>
2
+ <el-dropdown
3
+ size="default"
4
+ type="primary"
5
+ :hide-on-click="false"
6
+ trigger="click"
7
+ style="margin-left: 15px"
8
+ :disabled="disabled"
9
+ data-test-id="EL-DROPDOWN-eo8M84"
10
+ >
11
+ <el-button type="primary" color="#125088" :disabled="disabled" data-test-id="EL-BUTTON-WQugCA">
12
+ {{ t('columnConfiguration') }}
13
+ <el-icon class="el-icon--right" data-test-id="EL-ICON-9BpySy">
14
+ <arrow-down data-test-id="ARROW-DOWN-iXQ8EA" />
15
+ </el-icon>
16
+ </el-button>
17
+ <template #dropdown>
18
+ <!-- filter 禁止拖拽 -->
19
+ <div style="display: flex" data-test-id="DIV-ksWjQV">
20
+ <div data-test-id="DIV-0Bp9xN">
21
+ <el-space v-if="parentLabel" direction="vertical" data-test-id="EL-SPACE-SwiJNQ">
22
+ <el-text tag="b" data-test-id="EL-TEXT-PtuT6g">{{ parentLabel }}</el-text>
23
+ </el-space>
24
+ <!-- 父表头 -->
25
+ <el-dropdown-menu style="max-height: 400px" data-test-id="EL-DROPDOWN-MENU-P9MKSO">
26
+ <VueDraggable
27
+ ref="el"
28
+ v-model="parentDraggableItems"
29
+ :handle="handle"
30
+ filter=".disabled-color"
31
+ data-test-id="VUEDRAGGABLE-XbqWos"
32
+ @end="parentSaveData"
33
+ @move="(evt) => onDragMove(evt, parentDraggableItems)"
34
+ >
35
+ <el-dropdown-item
36
+ v-for="item in parentDraggableItems"
37
+ :key="item.value"
38
+ :command="item"
39
+ data-test-id="EL-DROPDOWN-ITEM-qhw6G6"
40
+ >
41
+ <v-icon
42
+ :class="['mdi mdi-drag dragindicator', dynamicClasses(item)]"
43
+ style="margin-right: 10px"
44
+ data-test-id="V-ICON-4nKZUW"
45
+ />
46
+ <el-checkbox
47
+ v-if="isParentCheckbox"
48
+ v-model="item.isShown"
49
+ :label="item.customizeFields ? item.text : $t(item.text)"
50
+ size="large"
51
+ :disabled="item.disabled"
52
+ data-test-id="EL-CHECKBOX-7VXhXa"
53
+ @change="parentSaveData(item)"
54
+ />
55
+ <span v-else :class="dynamicClasses(item)" style="margin-right: 10px" data-test-id="SPAN-VpmSwI">{{
56
+ item.customizeFields ? item.text : $t(item.text)
57
+ }}</span>
58
+ <v-icon
59
+ v-if="!item.freeze"
60
+ class="mdi mdi-lock-open-variant"
61
+ style="margin-left: 10px"
62
+ data-test-id="V-ICON-gfsrPv"
63
+ @click="isFrozen(item, parentDraggableItems, 'parentSaveData')"
64
+ />
65
+ <v-icon
66
+ v-if="item.freeze"
67
+ class="mdi mdi-lock"
68
+ style="margin-left: 10px"
69
+ data-test-id="V-ICON-bfzpiZ"
70
+ @click="isFrozen(item, parentDraggableItems, 'parentSaveData')"
71
+ />
72
+ </el-dropdown-item>
73
+ </VueDraggable>
74
+ </el-dropdown-menu>
75
+ </div>
76
+ <div v-if="isChild" data-test-id="DIV-FUfjAE">
77
+ <el-space v-if="childLabel" direction="vertical" data-test-id="EL-SPACE-tJl63c">
78
+ <el-text tag="b" data-test-id="EL-TEXT-BqEDSr">{{ childLabel }}</el-text>
79
+ </el-space>
80
+ <!-- 子表头 -->
81
+ <el-dropdown-menu style="max-height: 400px" data-test-id="EL-DROPDOWN-MENU-PAz7a2">
82
+ <VueDraggable
83
+ ref="el"
84
+ v-model="childDraggableItems"
85
+ :handle="handle"
86
+ filter=".disabled-color"
87
+ data-test-id="VUEDRAGGABLE-QgDzSV"
88
+ @end="childSaveData"
89
+ @move="(evt) => onDragMove(evt, childDraggableItems)"
90
+ >
91
+ <el-dropdown-item
92
+ v-for="item in childDraggableItems"
93
+ :key="item.value"
94
+ :command="item"
95
+ data-test-id="EL-DROPDOWN-ITEM-LBKFI2"
96
+ >
97
+ <v-icon
98
+ :class="['mdi mdi-drag dragindicator', dynamicClasses(item)]"
99
+ style="margin-right: 10px"
100
+ data-test-id="V-ICON-8xH3OY"
101
+ />
102
+ <el-checkbox
103
+ v-if="isChildCheckbox"
104
+ v-model="item.isShown"
105
+ :label="item.customizeFields ? item.text : $t(item.text)"
106
+ size="large"
107
+ :disabled="item.disabled"
108
+ data-test-id="EL-CHECKBOX-EMAn7J"
109
+ @change="childSaveData(item)"
110
+ />
111
+ <span v-else :class="dynamicClasses(item)" style="margin-right: 10px" data-test-id="SPAN-DCpyQn">{{
112
+ item.customizeFields ? item.text : $t(item.text)
113
+ }}</span>
114
+ <v-icon
115
+ v-if="!item.freeze"
116
+ class="mdi mdi-lock-open-variant"
117
+ style="margin-left: 10px"
118
+ data-test-id="V-ICON-BJQDvq"
119
+ @click="isFrozen(item, childDraggableItems, 'childSaveData')"
120
+ />
121
+ <v-icon
122
+ v-if="item.freeze"
123
+ class="mdi mdi-lock"
124
+ style="margin-left: 10px"
125
+ data-test-id="V-ICON-fcAGHD"
126
+ @click="isFrozen(item, childDraggableItems, 'childSaveData')"
127
+ />
128
+ </el-dropdown-item>
129
+ </VueDraggable>
130
+ </el-dropdown-menu>
131
+ </div>
132
+ </div>
133
+ </template>
134
+ </el-dropdown>
135
+ </template>
136
+
137
+ <script setup>
138
+ import { ref, watch } from 'vue';
139
+ import { VueDraggable } from 'vue-draggable-plus';
140
+ import { useI18n } from 'vue-i18n';
141
+ import { ElMessage } from 'element-plus';
142
+ const { t } = useI18n();
143
+ const props = defineProps({
144
+ disabled: Boolean, // 是否禁用列配置按钮
145
+ parentItems: Array, // 父表头数据
146
+ isParentCheckbox: Boolean, // 父表头是否显示复选框
147
+ parentLabel: String, // 父表头名称
148
+ childLabel: String, // 子表头名称
149
+ childItems: Array, // 子表头数据
150
+ isChildCheckbox: Boolean, // 子表头是否显示复选框
151
+ isChild: Boolean, // 是否子表头列配置
152
+ });
153
+ const emit = defineEmits(['parentSaveData', 'childSaveData']);
154
+ const parentDraggableItems = ref([]);
155
+ const childDraggableItems = ref([]);
156
+ const handle = ref('.dragindicator');
157
+ watch(
158
+ () => props,
159
+ () => {
160
+ parentDraggableItems.value = props.parentItems;
161
+ childDraggableItems.value = props.childItems;
162
+ },
163
+ {
164
+ immediate: true,
165
+ deep: true,
166
+ },
167
+ );
168
+ function parentSaveData(val) {
169
+ const count = parentDraggableItems.value.filter((item) => item.isShown === true).length;
170
+ if (count < 6 && !val.isShown) {
171
+ val.isShown = true;
172
+ ElMessage.error(t('theMinimumColumns6'));
173
+ return;
174
+ }
175
+ emit('parentSaveData', parentDraggableItems.value);
176
+ }
177
+ function childSaveData(val) {
178
+ const count = childDraggableItems.value.filter((item) => item.isShown === true).length;
179
+ if (count < 6 && !val.isShown) {
180
+ val.isShown = true;
181
+ ElMessage.error(t('theMinimumColumns6'));
182
+ return;
183
+ }
184
+ emit('childSaveData', childDraggableItems.value);
185
+ }
186
+ function isFrozen(item, data, event) {
187
+ const frozenCount = data.filter((item) => item.freeze === true).length;
188
+
189
+ if (item.freeze) {
190
+ // 取消冻结逻辑
191
+ item.freeze = false;
192
+ item.isFixed = false;
193
+ // 将取消冻结的栏位移动到未冻结栏位的第一位
194
+ const currentIndex = data.indexOf(item);
195
+ if (currentIndex !== -1) {
196
+ const [removed] = data.splice(currentIndex, 1);
197
+ const firstNonFrozenIndex = data.findIndex((i) => !i.freeze);
198
+ if (firstNonFrozenIndex !== -1) {
199
+ data.splice(firstNonFrozenIndex, 0, removed);
200
+ } else {
201
+ data.push(removed); // 如果没有未冻结栏位,则放到最后
202
+ }
203
+ }
204
+ } else {
205
+ // 冻结逻辑
206
+ if (frozenCount >= 4) {
207
+ ElMessage.error(t('upTo4ColumnsFrozen'));
208
+ return;
209
+ }
210
+ item.freeze = true;
211
+ item.isFixed = true;
212
+
213
+ // 将冻结的栏位移动到最后一个冻结栏位之后
214
+ const currentIndex = data.indexOf(item);
215
+ if (currentIndex !== -1) {
216
+ const [removed] = data.splice(currentIndex, 1);
217
+ const lastFrozenIndex = data.findLastIndex((i) => i.freeze);
218
+ if (lastFrozenIndex !== -1) {
219
+ data.splice(lastFrozenIndex + 1, 0, removed);
220
+ } else {
221
+ data.unshift(removed); // 如果没有冻结栏位,则放到最前面
222
+ }
223
+ }
224
+ }
225
+ // 触发保存事件
226
+ emit(event, data);
227
+ }
228
+ function dynamicClasses(item) {
229
+ return item.freeze ? 'disabled-color' : '';
230
+ }
231
+ // 禁止未冻结列拖动到冻结列的上方或中间
232
+ function onDragMove(evt, val) {
233
+ // 获取拖拽项的索引
234
+ const draggedIndex = Array.from(evt.from.children).indexOf(evt.dragged);
235
+ const draggedItem = val[draggedIndex];
236
+
237
+ // 获取目标项的索引
238
+ let relatedIndex = Array.from(evt.to.children).indexOf(evt.related);
239
+ // willInsertAfter 为 true 时,目标索引要+1
240
+ if (evt.willInsertAfter && relatedIndex !== -1) {
241
+ relatedIndex += 1;
242
+ }
243
+ // 如果 related 为空,说明拖到最后
244
+ if (evt.related == null) {
245
+ relatedIndex = val.length;
246
+ }
247
+
248
+ const frozenCount = val.filter((item) => item.freeze).length;
249
+
250
+ // 未冻结列不能拖到冻结区(前frozenCount个)内部或前面
251
+ if (!draggedItem.freeze && relatedIndex < frozenCount) {
252
+ return false;
253
+ }
254
+ // 冻结列只能在冻结区内移动
255
+ if (draggedItem.freeze && relatedIndex >= frozenCount) {
256
+ return false;
257
+ }
258
+ return true;
259
+ }
260
+ </script>
261
+
262
+ <style lang="scss" scoped>
263
+ .disabled-color {
264
+ color: #ccc !important;
265
+ cursor: not-allowed !important;
266
+ }
267
+ :deep(.el-space--vertical) {
268
+ padding: 5px 0 0 16px;
269
+ position: relative;
270
+ top: 5px;
271
+ z-index: 9999;
272
+ }
273
+ </style>