ci-plus 1.1.1 → 1.1.2
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/index.ts +1 -0
- package/package.json +4 -2
- package/src/components.d.ts +3 -0
- package/src/fileRelated/README.md +7 -0
- package/src/fileRelated/ciupload.vue +149 -0
- package/src/fileRelated/index/ciupload.ts +4 -0
- package/src/fileRelated/seeFile.vue +160 -0
- package/src/fileRelated/uploadV2.vue +212 -0
- package/src/identificationCard/barCode.vue +63 -0
- package/src/identificationCard/identificationCard.vue +1469 -0
- package/src/identificationCard/index.ts +4 -0
- package/src/identificationCard/read.md +64 -0
- package/src/index.ts +4 -1
- package/src/sortableTable/headerInput.vue +603 -94
- package/src/sortableTable/index/headerInput.ts +4 -0
- package/src/sortableTable/utils/headerPopover.vue +88 -31
- package/src/utils/Dayjs.ts +27 -0
- package/src/utils/baseApi.ts +38 -0
- package/src/utils/cardPrint.ts +689 -0
- package/src/utils/index.ts +1 -0
|
@@ -2,47 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
<template>
|
|
4
4
|
<el-popover
|
|
5
|
+
ref="popoverRef"
|
|
6
|
+
:title="customAttribute"
|
|
5
7
|
:visible="show"
|
|
6
8
|
placement="bottom"
|
|
7
|
-
:
|
|
9
|
+
:popper-style="popperStyle"
|
|
8
10
|
:trigger="trigger"
|
|
9
11
|
@hide="emits('close')"
|
|
10
12
|
@show="emits('open')"
|
|
11
13
|
>
|
|
12
14
|
<template #reference>
|
|
13
|
-
<slot
|
|
14
|
-
name="reference"
|
|
15
|
-
:open="open"
|
|
16
|
-
:close="close"
|
|
17
|
-
:toggle="toggle"
|
|
18
|
-
/>
|
|
15
|
+
<slot name="reference" :open="open" :close="close" :toggle="toggle" />
|
|
19
16
|
</template>
|
|
20
|
-
<div
|
|
21
|
-
style="display: flex; align-items: center; justify-content: center"
|
|
22
|
-
v-loading="loading"
|
|
23
|
-
>
|
|
17
|
+
<div style="display: flex; align-items: center; justify-content: center" v-loading="loading">
|
|
24
18
|
<div style="flex-grow: 1">
|
|
25
19
|
<slot :closeF="close" />
|
|
26
20
|
</div>
|
|
27
21
|
<div style="margin-left: 5px">
|
|
28
22
|
<div>
|
|
29
|
-
<el-button
|
|
30
|
-
type="primary"
|
|
31
|
-
size="small"
|
|
32
|
-
@click="submit"
|
|
33
|
-
>
|
|
34
|
-
确认
|
|
35
|
-
</el-button>
|
|
23
|
+
<el-button type="primary" size="small" @click="submit"> 确认 </el-button>
|
|
36
24
|
</div>
|
|
37
25
|
<div style="margin-top: 5px">
|
|
38
|
-
<el-button
|
|
39
|
-
size="small"
|
|
40
|
-
@click="emits('clear')"
|
|
41
|
-
>
|
|
42
|
-
清空
|
|
43
|
-
</el-button>
|
|
26
|
+
<el-button size="small" @click="emits('clear')"> 清空 </el-button>
|
|
44
27
|
</div>
|
|
45
|
-
<div style="margin-top: 5px">
|
|
28
|
+
<!-- <div style="margin-top: 5px">
|
|
46
29
|
<el-button
|
|
47
30
|
type="warning"
|
|
48
31
|
size="small"
|
|
@@ -50,42 +33,116 @@
|
|
|
50
33
|
>
|
|
51
34
|
关闭
|
|
52
35
|
</el-button>
|
|
53
|
-
</div>
|
|
36
|
+
</div> -->
|
|
54
37
|
</div>
|
|
55
38
|
</div>
|
|
56
39
|
</el-popover>
|
|
57
40
|
</template>
|
|
58
41
|
|
|
59
42
|
<script setup lang="ts">
|
|
60
|
-
import { ref } from 'vue'
|
|
43
|
+
import { onMounted, ref } from 'vue'
|
|
61
44
|
import { ElPopover, TooltipTriggerType } from 'element-plus'
|
|
45
|
+
const popoverRef = ref<InstanceType<typeof ElPopover>>()
|
|
62
46
|
const props = defineProps<{
|
|
63
|
-
|
|
47
|
+
popperStyle: any // el-popover的自定义样式
|
|
64
48
|
trigger?: TooltipTriggerType
|
|
65
49
|
loading?: boolean
|
|
50
|
+
customAttribute?: string // 用于查找元素的自定义属性,为当前列字段
|
|
66
51
|
}>()
|
|
52
|
+
|
|
53
|
+
// console.log('这边的表头props', props)
|
|
67
54
|
const emits = defineEmits(['confirm', 'clear', 'close', 'open'])
|
|
68
55
|
const show = ref(false)
|
|
69
56
|
|
|
70
57
|
// 打开
|
|
71
|
-
const open = () =>
|
|
58
|
+
const open = () => {
|
|
59
|
+
handleShow()
|
|
60
|
+
// show.value = true
|
|
61
|
+
}
|
|
72
62
|
// 关闭
|
|
73
63
|
const close = () => {
|
|
74
64
|
show.value = false
|
|
75
65
|
}
|
|
76
66
|
const toggle = () => {
|
|
77
|
-
|
|
67
|
+
handleShow()
|
|
68
|
+
// show.value = !show.value
|
|
78
69
|
}
|
|
79
70
|
// 面板确定按钮
|
|
80
71
|
const submit = () => {
|
|
81
72
|
emits('confirm')
|
|
82
73
|
close()
|
|
83
74
|
}
|
|
75
|
+
const handleClickOutside = () => {
|
|
76
|
+
console.log('点击了组件之外')
|
|
77
|
+
if (props.trigger === 'click') {
|
|
78
|
+
close()
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const handleShow = () => {
|
|
82
|
+
// console.log('打开')
|
|
83
|
+
show.value = true
|
|
84
|
+
document.addEventListener('mousedown', handleDocumentClick)
|
|
85
|
+
}
|
|
86
|
+
const handleHide = () => {
|
|
87
|
+
// console.log('关闭')
|
|
88
|
+
show.value = false
|
|
89
|
+
document.removeEventListener('mousedown', handleDocumentClick)
|
|
90
|
+
}
|
|
91
|
+
const handleDocumentClick = (e: any) => {
|
|
92
|
+
// 查找el-popper弹窗元素()
|
|
93
|
+
const elements = document.querySelectorAll('[id^="el-popper-container-"]')
|
|
94
|
+
// 判断点击的元素e是否是弹窗元素的子元素:若是是子元素就不关闭弹窗
|
|
95
|
+
if (elements && elements.length > 0) {
|
|
96
|
+
for (let i = 0; i < elements.length; i++) {
|
|
97
|
+
const element = elements[i]
|
|
98
|
+
// console.log('element: ', element)
|
|
99
|
+
if (element?.contains(e.target)) {
|
|
100
|
+
// console.log('包含')
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// if (elements[1]?.contains(e.target)) {
|
|
105
|
+
// console.log('包含')
|
|
106
|
+
// return
|
|
107
|
+
// } else {
|
|
108
|
+
// handleHide()
|
|
109
|
+
// }
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 通过自定义属性 aria-label 查找元素
|
|
113
|
+
// console.log('props.text', props)
|
|
114
|
+
// const el = document.querySelector(`[aria-label="${props.customAttribute}"]`)
|
|
115
|
+
// 判断点击的元素是否是是e的子元素
|
|
116
|
+
// if (el?.contains(e.target)) {
|
|
117
|
+
// return
|
|
118
|
+
|
|
119
|
+
// }
|
|
120
|
+
|
|
121
|
+
if (!popoverRef.value || !popoverRef.value.$el) {
|
|
122
|
+
// console.log(666)
|
|
123
|
+
return
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 若点击的元素不是弹窗的子元素就关闭弹窗
|
|
127
|
+
if (!popoverRef.value?.$el.contains(e.target)) {
|
|
128
|
+
handleHide()
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
84
132
|
defineExpose({
|
|
85
133
|
open,
|
|
86
134
|
close,
|
|
87
135
|
toggle,
|
|
88
|
-
submit
|
|
136
|
+
submit
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
onMounted(() => {
|
|
140
|
+
// 页面加载完成后将所有class 为 el-popover__title 的元素隐藏
|
|
141
|
+
const titleElements = document.querySelectorAll('.el-popover__title')
|
|
142
|
+
// console.log('titleElements: ', titleElements)
|
|
143
|
+
titleElements.forEach((element: any) => {
|
|
144
|
+
element.style.display = 'none'
|
|
145
|
+
})
|
|
89
146
|
})
|
|
90
147
|
</script>
|
|
91
148
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* * 这是用来格式化日期的函数
|
|
3
|
+
* ! 一共有两个函数
|
|
4
|
+
* ? 第一个函数是输出日期型
|
|
5
|
+
* TODO: 第二个函数输出日期时间型
|
|
6
|
+
* @param date 传入日期或者字符串
|
|
7
|
+
* @param geshi? 想要输出的格式
|
|
8
|
+
*/
|
|
9
|
+
import dayjs from 'dayjs'
|
|
10
|
+
|
|
11
|
+
// 格式化日期
|
|
12
|
+
export const setDate = (date?: string | Date, geshi: string = 'YYYY-MM-DD') => {
|
|
13
|
+
if (date == '' || date == null || date == undefined) {
|
|
14
|
+
return ''
|
|
15
|
+
} else {
|
|
16
|
+
return dayjs(date).format(geshi)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
// 格式化日期时间
|
|
20
|
+
export const setDateTime = (
|
|
21
|
+
date: string | Date,
|
|
22
|
+
geshi: string = 'YYYY-MM-DD hh:mm:ss',
|
|
23
|
+
): string => {
|
|
24
|
+
return dayjs(date).format(geshi)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default { dayjs }
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @模块 baseApi
|
|
3
|
+
* @作者 : 卖女孩的小火柴
|
|
4
|
+
* !描述 : 获取主应用的所有api接口
|
|
5
|
+
* @版本 : 1.0.0
|
|
6
|
+
* @创建时间 : 创建时间 2024-01-05 13:17:56
|
|
7
|
+
*/
|
|
8
|
+
import { store } from '@ice/stark-data'
|
|
9
|
+
const apis = store.get('APIs')['1.1.1']
|
|
10
|
+
|
|
11
|
+
export default apis
|
|
12
|
+
/***
|
|
13
|
+
{
|
|
14
|
+
"toolingBasic": "http://10.20.72.231:8002/api/ToolingBasicCenter/toolingBasic/v1.1.1/",
|
|
15
|
+
"equipModule": "http://10.20.72.231:8514/api/DeviceBasicCenter/deviceBasic/v1.1.1/",
|
|
16
|
+
"produceModule": "http://10.20.72.231:8553/api/ProduceModule/produceModule/v1.1.1/",
|
|
17
|
+
"customerModule": "http://10.20.72.231:8512/api/CustomerModule/customerModule/v1.1.1/",
|
|
18
|
+
"measureModule": "http://10.20.72.231:8001/api/MeasureBasicCenter/measureBasic/v1.1.1/",
|
|
19
|
+
"technology": "http://10.20.72.231:9877/api/Technology/bomModule/v1.1.1/",
|
|
20
|
+
"storageModule": "http://10.20.72.231:9999/api/WarehouseModule/warehouseModule/v1.1.1/",
|
|
21
|
+
"deviceModule": "http://10.20.72.231:8516/api/DeviceModule/deviceModule/v1.1.1/",
|
|
22
|
+
"warehouseInspection": "http://10.20.72.231:9875/api/InspectionManagement/warehouseInspection/v1.1.1/",
|
|
23
|
+
"abnormityManagement": "http://10.20.72.231:8517/api/AbnormityManagement/abnormityManagement/v1.1.1/",
|
|
24
|
+
"userBasicCenter": "http://10.20.72.231:9002/api/UserBasicCenter/userbasic/v1.1.1/",
|
|
25
|
+
"schedulingModule": "http://10.20.72.231:9003/api/SchedulingModule/schedulingModule/v1.1.1/",
|
|
26
|
+
"fileModule": "http://10.20.72.231:9877/api/Technology/fileModule/v1.1.1/",
|
|
27
|
+
"OAMModule": "http://10.20.72.231:8510/api/OAM/sys_code_set/v1.1.1/",
|
|
28
|
+
"dailyPlan": "http://10.20.72.231:8519/api/SchedulingModule/dailyPlan/v1.1.1/",
|
|
29
|
+
"materialModule": "http://10.20.72.231:8765/api/ProductCenter/productCenter/v1.1.1/",
|
|
30
|
+
"middleWarehouse": "http://10.20.72.231:9999/api/MiddleWarehouse/middleWarehouse/v1.1.1/",
|
|
31
|
+
"unqualified": "http://10.20.72.231:9998/api/NonconformityBasic/nonconformityBasic/v1.1.1/",
|
|
32
|
+
"auditCenter": "http://10.20.72.231:9601/api/AuditCenter/basicModule/v1.1.1/",
|
|
33
|
+
"qualityManagement": "http://10.20.72.231:8369/api/QualityManagement/quality/v1.1.1/",
|
|
34
|
+
"finishedStorage": "http://10.20.72.231:8368/api/FinishedProductStorage/finishedProductStorage/v1.1.1/",
|
|
35
|
+
"login": "http://10.23.181.13:8098/mes-auth-service/mes/api/v1/auth/login/",
|
|
36
|
+
"userInfo": "http://10.23.181.13:8098/mes/mvc/"
|
|
37
|
+
}
|
|
38
|
+
*/
|