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.
- package/README.md +5 -0
- package/dist/S3_0UC_main.csv +4 -0
- package/dist/S3_0UC_sub.csv +2 -0
- package/dist/globalVariableS3_0UC.json +1 -0
- package/dist/style.css +1 -0
- package/dist/syntec3-0-ui-components.es.js +19518 -0
- package/dist/syntec3-0-ui-components.es.js.map +1 -0
- package/dist/syntec3-0-ui-components.umd.js +23 -0
- package/dist/syntec3-0-ui-components.umd.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/dist/web.config +17 -0
- package/package.json +137 -0
- package/src/App.vue +31 -0
- package/src/assets/fonts/genYoGothicTW-normal.js +7 -0
- package/src/assets/image/defaultImage.png +0 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/Layout/modules/fullPageGlobal.vue +113 -0
- package/src/components/Layout/modules/viewFile/config.js +65 -0
- package/src/components/Layout/modules/viewFile/createView.vue +1000 -0
- package/src/components/Layout/modules/viewFile/filterCriteria.vue +816 -0
- package/src/components/Layout/modules/viewFile/viewList.vue +291 -0
- package/src/components/Layout/modules/viewFile/viewManageTool.js +271 -0
- package/src/components/Layout/modules/viewFile/viewRecord.vue +472 -0
- package/src/components/Layout/modules/viewFile/viewTabs.vue +542 -0
- package/src/components/Layout/tools/GlobalDialog.vue +115 -0
- package/src/components/Pagination.vue +139 -0
- package/src/components/columnConfigNext.vue +273 -0
- package/src/components/customFilter/customFilter.vue +492 -0
- package/src/components/customFilter/filterCriteria.vue +769 -0
- package/src/components/customTable/components/headerOperation/index.vue +136 -0
- package/src/components/customTable/components/headerTabs/index.vue +171 -0
- package/src/components/customTable/components/tableContent/index.vue +440 -0
- package/src/components/customTable/index.vue +305 -0
- package/src/components/dialog.vue +85 -0
- package/src/components/pageContent.vue +48 -0
- package/src/components/popover.vue +402 -0
- package/src/configFiles/apiFile/baseApiList.json +11 -0
- package/src/configFiles/apiFile/coreApiList.json +24 -0
- package/src/configFiles/apiFile/mesApiList.json +4 -0
- package/src/configFiles/apiFile/mmsApiList.json +3 -0
- package/src/configFiles/errorCode.json +291 -0
- package/src/configFiles/version.js +2 -0
- package/src/i18n/lang/en-us.json +2060 -0
- package/src/i18n/lang/errorCodeTranslate.mjs +847 -0
- package/src/i18n/lang/zh-cn.json +2062 -0
- package/src/i18n/lang/zh-tw.json +2059 -0
- package/src/index.js +115 -0
- package/src/main.js +51 -0
- package/src/plugins/excel.js +88 -0
- package/src/router/index.js +41 -0
- package/src/scriptFiles/apiConfig/baseApis.js +10 -0
- package/src/scriptFiles/apiConfig/mesApis.js +10 -0
- package/src/scriptFiles/apiConfig/mmsApis.js +10 -0
- package/src/scriptFiles/apiConfig/privateCloudCoreApis.js +13 -0
- package/src/scriptFiles/apiConfig/serviceRoute.js +23 -0
- package/src/scriptFiles/apis/baseApiFunction.js +63 -0
- package/src/scriptFiles/apis/mesApiFunction.js +15 -0
- package/src/scriptFiles/apis/mmsApiFunction.js +9 -0
- package/src/scriptFiles/apis/privateCloudCoreApiFunction.js +101 -0
- package/src/scriptFiles/backendApiFunction.js +11 -0
- package/src/scriptFiles/checkApiErrorMechanism.js +137 -0
- package/src/scriptFiles/common/objectDataProcessing.js +65 -0
- package/src/scss/base/commom.scss +1068 -0
- package/src/scss/base/dialog.scss +45 -0
- package/src/scss/base/index.scss +3 -0
- package/src/scss/base/table.scss +28 -0
- package/src/store/index.js +25 -0
- package/src/store/module/langStore.js +116 -0
- package/src/style.css +52 -0
- package/src/utils/excel.js +86 -0
- package/src/utils/formula.js +69 -0
- package/src/utils/https.js +13 -0
- package/src/utils/i18n.js +42 -0
- package/src/utils/shiftSelect.js +164 -0
- package/src/utils/summation.js +77 -0
- package/src/utils/tableWidth.js +29 -0
- package/src/utils/toolFun.js +93 -0
- package/src/views/productionWorkOrder/components/columnConfig.vue +242 -0
- package/src/views/productionWorkOrder/components/docCustomFieldForm.vue +739 -0
- package/src/views/productionWorkOrder/components/filePreview.vue +148 -0
- package/src/views/productionWorkOrder/components/querySearch.vue +363 -0
- package/src/views/productionWorkOrder/configFiles/excelImportErrorCode.json +94 -0
- package/src/views/productionWorkOrder/configFiles/pdfDefaultConfig.js +933 -0
- package/src/views/productionWorkOrder/configFiles/planMakingScript.js +600 -0
- package/src/views/productionWorkOrder/configFiles/productionRelatedScript.js +368 -0
- package/src/views/productionWorkOrder/configFiles/rulse.js +23 -0
- package/src/views/productionWorkOrder/configFiles/status.js +50 -0
- package/src/views/productionWorkOrder/index.vue +2174 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/addCirculationLabel.vue +394 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/circulationLabelTable.vue +124 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/materialPartFilePreview.vue +167 -0
- package/src/views/productionWorkOrder/productionFlowLabel/component/workOrderInformation.vue +28 -0
- package/src/views/productionWorkOrder/productionFlowLabel/index.vue +604 -0
- package/src/views/production_work_order/components/priorityTooltip.vue +53 -0
- package/src/views/production_work_order/index.vue +1307 -0
- package/src/views/review_record/components/materialInfo.vue +50 -0
- package/src/views/review_record/components/rootCause.vue +42 -0
- package/src/views/review_record/components/workDetail.vue +115 -0
- package/src/views/review_record/index.vue +884 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="header-buttons-container"
|
|
4
|
+
:class="`buttons-position-${position}`"
|
|
5
|
+
:data-test-id="`${dataTestId}-DIV-eobZrN`"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
v-for="(button, index) in buttons"
|
|
9
|
+
:key="button.key"
|
|
10
|
+
class="header-button-item"
|
|
11
|
+
:data-test-id="`${dataTestId}-DIV-Y656ZM-${index}`"
|
|
12
|
+
>
|
|
13
|
+
<!-- 普通按钮 -->
|
|
14
|
+
<el-button
|
|
15
|
+
v-if="!button.dropdownItems"
|
|
16
|
+
:class="!button.link ? 'margin_right_1rem' : ''"
|
|
17
|
+
:type="button.type || 'primary'"
|
|
18
|
+
:plain="button.plain || false"
|
|
19
|
+
:round="button.round || false"
|
|
20
|
+
:circle="button.circle || false"
|
|
21
|
+
:link="button.link || false"
|
|
22
|
+
:size="button.size"
|
|
23
|
+
:data-test-id="`${dataTestId}-EL-BUTTON-mi1dnO-${index}`"
|
|
24
|
+
:loading="button.loading || false"
|
|
25
|
+
@click="button.func()"
|
|
26
|
+
>
|
|
27
|
+
<v-icon
|
|
28
|
+
v-if="button.icon"
|
|
29
|
+
:class="button.icon"
|
|
30
|
+
style="margin-right: 0.25rem"
|
|
31
|
+
:data-test-id="`${dataTestId}-V-ICON-GpCo9D-${index}`"
|
|
32
|
+
/>
|
|
33
|
+
<template v-if="!button.circle && button.label">
|
|
34
|
+
{{ button.label }}
|
|
35
|
+
</template>
|
|
36
|
+
</el-button>
|
|
37
|
+
<!-- 下拉按钮 -->
|
|
38
|
+
<el-dropdown
|
|
39
|
+
v-else
|
|
40
|
+
ref="dropdownRef"
|
|
41
|
+
:hide-on-click="false"
|
|
42
|
+
trigger="click"
|
|
43
|
+
:data-test-id="`${dataTestId}-EL-DROPDOWN-WliCoC-${index}`"
|
|
44
|
+
>
|
|
45
|
+
<el-button
|
|
46
|
+
:type="button.type || 'primary'"
|
|
47
|
+
:plain="button.plain || false"
|
|
48
|
+
:round="button.round || false"
|
|
49
|
+
:circle="button.circle || false"
|
|
50
|
+
:link="button.link || false"
|
|
51
|
+
:size="button.size"
|
|
52
|
+
:data-test-id="`${dataTestId}-EL-BUTTON-0bdOsM-${index}`"
|
|
53
|
+
:loading="button.loading || false"
|
|
54
|
+
>
|
|
55
|
+
<v-icon
|
|
56
|
+
v-if="button.icon"
|
|
57
|
+
:class="button.icon"
|
|
58
|
+
style="margin-right: 0.5rem"
|
|
59
|
+
:data-test-id="`${dataTestId}-V-ICON-gQZNcf-${index}`"
|
|
60
|
+
/>
|
|
61
|
+
{{ button.label }}
|
|
62
|
+
<!-- <v-icon v-if="!button.circle" class="mdi mdi-chevron-down" style="margin-left: 0.25rem"></v-icon> -->
|
|
63
|
+
</el-button>
|
|
64
|
+
<template #dropdown>
|
|
65
|
+
<el-dropdown-menu :data-test-id="`${dataTestId}-EL-DROPDOWN-MENU-ZwOGul-${index}`">
|
|
66
|
+
<el-dropdown-item
|
|
67
|
+
v-for="(item, index) in button.dropdownItems"
|
|
68
|
+
:key="item.key"
|
|
69
|
+
:data-test-id="`${dataTestId}-EL-DROPDOWN-ITEM-QbT4TZ-${index}`"
|
|
70
|
+
>
|
|
71
|
+
<el-button
|
|
72
|
+
:data-test-id="`${dataTestId}-EL-BUTTON-B8WbcZ-${index}`"
|
|
73
|
+
:type="item.type || 'primary'"
|
|
74
|
+
:plain="item.plain || false"
|
|
75
|
+
:round="item.round || false"
|
|
76
|
+
:link="item.link || false"
|
|
77
|
+
:size="item.size"
|
|
78
|
+
:loading="item.loading || false"
|
|
79
|
+
@click="item.func()"
|
|
80
|
+
>
|
|
81
|
+
<v-icon
|
|
82
|
+
v-if="item.icon"
|
|
83
|
+
:class="item.icon"
|
|
84
|
+
style="margin-right: 0.25rem"
|
|
85
|
+
:data-test-id="`${dataTestId}-V-ICON-lmPYuR-${index}`"
|
|
86
|
+
/>
|
|
87
|
+
<template v-if="!item.circle && item.label">
|
|
88
|
+
{{ item.label }}
|
|
89
|
+
</template>
|
|
90
|
+
</el-button>
|
|
91
|
+
</el-dropdown-item>
|
|
92
|
+
</el-dropdown-menu>
|
|
93
|
+
</template>
|
|
94
|
+
</el-dropdown>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script setup>
|
|
100
|
+
import { ref } from 'vue';
|
|
101
|
+
|
|
102
|
+
defineProps({
|
|
103
|
+
buttons: {
|
|
104
|
+
type: Array,
|
|
105
|
+
required: true,
|
|
106
|
+
default: () => [],
|
|
107
|
+
},
|
|
108
|
+
position: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: 'left', // 默认为居左
|
|
111
|
+
validator: (value) => {
|
|
112
|
+
// 验证位置值必须是以下三个之一
|
|
113
|
+
return ['left', 'center', 'right'].includes(value);
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
dataTestId: String,
|
|
117
|
+
});
|
|
118
|
+
const dropdownRef = ref(null);
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style scoped>
|
|
122
|
+
.header-buttons-container {
|
|
123
|
+
display: flex;
|
|
124
|
+
padding: 1rem;
|
|
125
|
+
justify-content: flex-end;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.header-button-item {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
}
|
|
133
|
+
.margin_right_1rem {
|
|
134
|
+
margin-right: 1rem;
|
|
135
|
+
}
|
|
136
|
+
</style>
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="view-manager-container" :data-test-id="`${dataTextId}-DIV-XGm3Sf`">
|
|
3
|
+
<!-- 视图标签页 -->
|
|
4
|
+
<viewTabs
|
|
5
|
+
ref="viewTabsRef"
|
|
6
|
+
:key="permissionData.viewId"
|
|
7
|
+
:tabs="allViewTabs"
|
|
8
|
+
:view-type="true"
|
|
9
|
+
:view-id-from-list="null"
|
|
10
|
+
:select-options="selectOptions"
|
|
11
|
+
:data-test-id="`${dataTextId}-VIEWTABS-7oMOT6`"
|
|
12
|
+
@tab-update="handleTabUpdate"
|
|
13
|
+
@open-view-drawer="openViewListDrawer"
|
|
14
|
+
@tabClick="handleTabClick"
|
|
15
|
+
@open-log-drawer="openViewRecordDrawer"
|
|
16
|
+
/>
|
|
17
|
+
<!-- 视图列表抽屉 -->
|
|
18
|
+
<viewList
|
|
19
|
+
ref="viewListRef"
|
|
20
|
+
:permission-data="permissionData"
|
|
21
|
+
:select-options="selectOptions"
|
|
22
|
+
:data-test-id="`${dataTextId}-VIEWLIST-cyMJsA`"
|
|
23
|
+
:default-create-time-string="defaultCreateTimeString"
|
|
24
|
+
@update-view-tabs="updateViewTabs"
|
|
25
|
+
/>
|
|
26
|
+
<!-- 视图操作记录抽屉 -->
|
|
27
|
+
<viewRecord ref="viewRecordRef" :page-data="permissionData" :data-test-id="`${dataTextId}-VIEWRECORD-2RlrfD`" />
|
|
28
|
+
<!-- 视图创建/编辑/复制抽屉 -->
|
|
29
|
+
<createView
|
|
30
|
+
ref="createViewRef"
|
|
31
|
+
:permission-data="permissionData"
|
|
32
|
+
:select-options="selectOptions"
|
|
33
|
+
:data-test-id="`${dataTextId}-CREATEVIEW-uTu1Xa`"
|
|
34
|
+
:default-create-time-string="defaultCreateTimeString"
|
|
35
|
+
@updataView="handleTabUpdate"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
<script setup>
|
|
40
|
+
import { ref, onMounted } from 'vue';
|
|
41
|
+
import viewTabs from '../../../Layout/modules/viewFile/viewTabs.vue';
|
|
42
|
+
import viewList from '../../../Layout/modules/viewFile/viewList.vue';
|
|
43
|
+
import viewRecord from '../../../Layout/modules/viewFile/viewRecord.vue';
|
|
44
|
+
import createView from '../../../Layout/modules/viewFile/createView.vue';
|
|
45
|
+
import apiFunction from '@/scriptFiles/checkApiErrorMechanism.js';
|
|
46
|
+
import { ElMessage } from 'element-plus';
|
|
47
|
+
import { useI18n } from 'vue-i18n';
|
|
48
|
+
const { t } = useI18n();
|
|
49
|
+
|
|
50
|
+
// Props
|
|
51
|
+
const props = defineProps({
|
|
52
|
+
permissionData: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: () => ({}),
|
|
55
|
+
},
|
|
56
|
+
selectOptions: {
|
|
57
|
+
type: Object,
|
|
58
|
+
default: () => ({}),
|
|
59
|
+
},
|
|
60
|
+
dataTextId: String,
|
|
61
|
+
defaultCreateTimeString: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: 'createTime',
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
// Emits
|
|
67
|
+
const emit = defineEmits(['update:permissionData']);
|
|
68
|
+
// Refs
|
|
69
|
+
const viewTabsRef = ref(null);
|
|
70
|
+
const viewListRef = ref(null);
|
|
71
|
+
const viewRecordRef = ref(null);
|
|
72
|
+
const createViewRef = ref(null);
|
|
73
|
+
// 视图标签列表(内部管理)
|
|
74
|
+
const allViewTabs = ref([]);
|
|
75
|
+
|
|
76
|
+
// 获取视图标签列表
|
|
77
|
+
const getViewTabs = async () => {
|
|
78
|
+
try {
|
|
79
|
+
const res = await apiFunction.getViewOnlyReadList({
|
|
80
|
+
permissionCode: props.permissionData.permissionCode,
|
|
81
|
+
});
|
|
82
|
+
if (res.data?.code === 0) {
|
|
83
|
+
allViewTabs.value = [...res.data.content];
|
|
84
|
+
return res.data.content;
|
|
85
|
+
} else {
|
|
86
|
+
ElMessage.error(t(res.data.message));
|
|
87
|
+
}
|
|
88
|
+
} catch (error) {
|
|
89
|
+
ElMessage.error('获取视图标签列表失败');
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// 处理标签页更新
|
|
94
|
+
const handleTabUpdate = () => {
|
|
95
|
+
// 重新获取视图列表
|
|
96
|
+
getViewTabs();
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// 打开视图列表抽屉
|
|
100
|
+
const openViewListDrawer = () => {
|
|
101
|
+
if (viewListRef.value) {
|
|
102
|
+
viewListRef.value.open();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// 处理标签页点击
|
|
107
|
+
const handleTabClick = (data, type) => {
|
|
108
|
+
// 处理编辑/复制视图及常规切换逻辑
|
|
109
|
+
if (type === 0 || type === 2) {
|
|
110
|
+
// 编辑或复制视图逻辑 - 直接打开createView组件
|
|
111
|
+
if (createViewRef.value) {
|
|
112
|
+
// type: 0=编辑, 2=复制
|
|
113
|
+
createViewRef.value.open(data, type === 2);
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
// 直接调用emit,不等待其他操作
|
|
117
|
+
emit('update:permissionData', {
|
|
118
|
+
...props.permissionData,
|
|
119
|
+
viewId: data,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// 打开视图记录抽屉
|
|
125
|
+
const openViewRecordDrawer = () => {
|
|
126
|
+
if (viewRecordRef.value) {
|
|
127
|
+
viewRecordRef.value.open();
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// 更新视图标签
|
|
132
|
+
const updateViewTabs = (newTabOrderList, viewId) => {
|
|
133
|
+
// 更新本地视图标签列表
|
|
134
|
+
allViewTabs.value = [...newTabOrderList];
|
|
135
|
+
// 如果有新的视图ID,更新permissionData
|
|
136
|
+
if (viewId) {
|
|
137
|
+
emit('update:permissionData', {
|
|
138
|
+
...props.permissionData,
|
|
139
|
+
viewId: viewId,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// 重新获取最新的视图列表
|
|
143
|
+
getViewTabs();
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
// 组件挂载时执行
|
|
147
|
+
onMounted(() => {
|
|
148
|
+
// 获取视图标签列表
|
|
149
|
+
getViewTabs();
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
defineExpose({
|
|
153
|
+
// 打开视图列表抽屉
|
|
154
|
+
openViewList: () => {
|
|
155
|
+
openViewListDrawer();
|
|
156
|
+
},
|
|
157
|
+
// 打开视图操作记录抽屉
|
|
158
|
+
openViewRecord: () => {
|
|
159
|
+
openViewRecordDrawer();
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
</script>
|
|
163
|
+
|
|
164
|
+
<style scoped>
|
|
165
|
+
.view-manager-container {
|
|
166
|
+
width: 100%;
|
|
167
|
+
height: 100%;
|
|
168
|
+
padding: 1rem;
|
|
169
|
+
box-sizing: border-box;
|
|
170
|
+
}
|
|
171
|
+
</style>
|