imeik-bizui 2.0.3 → 2.0.5
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/dist/bizui/src/CommonDepartmentCascader/index.vue +33 -0
- package/dist/bizui/src/CommonEmployeeSelect/index.vue +28 -0
- package/dist/bizui/src/CommonEnumShow/index.vue +13 -0
- package/dist/bizui/src/FieldExpertSelect/index.vue +1 -1
- package/dist/imeik-bizui.common.js +7822 -55453
- package/dist/imeik-bizui.common.js.gz +0 -0
- package/dist/imeik-bizui.css +2 -2
- package/dist/imeik-bizui.css.gz +0 -0
- package/dist/imeik-bizui.umd.js +7822 -55453
- package/dist/imeik-bizui.umd.js.gz +0 -0
- package/dist/imeik-bizui.umd.min.js +7 -65
- package/dist/imeik-bizui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/dist/bizui/src/RequirementBall/components/CaptureScreen.vue +0 -343
- package/dist/bizui/src/RequirementBall/components/FloatingBall.vue +0 -293
- package/dist/bizui/src/RequirementBall/components/RecordScreen.vue +0 -452
- package/dist/bizui/src/RequirementBall/components/upload.js +0 -52
- package/dist/bizui/src/RequirementBall/index.vue +0 -266
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- 需求球组件容器 -->
|
|
3
|
-
<div class="requirement-ball-container">
|
|
4
|
-
<!-- 悬浮球组件,传入录制状态,监听点击和停止录制事件 -->
|
|
5
|
-
<FloatingBall
|
|
6
|
-
:is-recording="isRecording"
|
|
7
|
-
@click="showDialog"
|
|
8
|
-
@stopRecord="onStopRecord"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<!-- 需求提交弹窗 -->
|
|
12
|
-
<ImDialog
|
|
13
|
-
title="问题反馈"
|
|
14
|
-
:visible.sync="dialogVisible"
|
|
15
|
-
width="805px"
|
|
16
|
-
height="430px"
|
|
17
|
-
append-to-body
|
|
18
|
-
submit-text="提交"
|
|
19
|
-
@submit="handleSubmit"
|
|
20
|
-
>
|
|
21
|
-
<!-- 表单组件 -->
|
|
22
|
-
<ImForm ref="ImForm" :form="formConfig">
|
|
23
|
-
<!-- 截屏组件插槽,双向绑定上传图片数据,监听开始和结束截屏事件 -->
|
|
24
|
-
<CaptureScreen
|
|
25
|
-
slot="CaptureScreen"
|
|
26
|
-
v-model="formConfig.props.requirementImageUrlList"
|
|
27
|
-
@startCapture="closeDialog"
|
|
28
|
-
@endCapture="showDialog"
|
|
29
|
-
/>
|
|
30
|
-
<!-- 录屏组件插槽,双向绑定上传视频数据,监听开始和结束录制事件 -->
|
|
31
|
-
<RecordScreen
|
|
32
|
-
slot="RecordScreen"
|
|
33
|
-
ref="recordScreen"
|
|
34
|
-
v-model="formConfig.props.requirementVideoUrlList"
|
|
35
|
-
@startRecord="onStartRecord"
|
|
36
|
-
@endRecord="onEndRecord"
|
|
37
|
-
/>
|
|
38
|
-
</ImForm>
|
|
39
|
-
</ImDialog>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script>
|
|
44
|
-
// 导入子组件
|
|
45
|
-
import FloatingBall from './components/FloatingBall'
|
|
46
|
-
import CaptureScreen from './components/CaptureScreen'
|
|
47
|
-
import RecordScreen from './components/RecordScreen'
|
|
48
|
-
// 导入API
|
|
49
|
-
import { submitRequirementInfo } from '../../api/reqCollect.js'
|
|
50
|
-
|
|
51
|
-
export default {
|
|
52
|
-
name: 'RequirementBall',
|
|
53
|
-
|
|
54
|
-
// 注册子组件
|
|
55
|
-
components: {
|
|
56
|
-
FloatingBall,
|
|
57
|
-
CaptureScreen,
|
|
58
|
-
RecordScreen
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
// 组件数据
|
|
62
|
-
data() {
|
|
63
|
-
return {
|
|
64
|
-
// 录制状态标识
|
|
65
|
-
isRecording: false,
|
|
66
|
-
|
|
67
|
-
// 弹窗显示状态
|
|
68
|
-
dialogVisible: false,
|
|
69
|
-
|
|
70
|
-
// 表单配置对象
|
|
71
|
-
formConfig: {
|
|
72
|
-
// 表单属性配置
|
|
73
|
-
attrs: {
|
|
74
|
-
labelPosition: 'top' // 表单标签位置
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
// 表单数据对象
|
|
78
|
-
props: {
|
|
79
|
-
infoDescription: '', // 需求描述
|
|
80
|
-
requirementImageUrlList: [], // 上传图片列表
|
|
81
|
-
requirementVideoUrlList: [], // 上传视频列表
|
|
82
|
-
requirementAttachmentUrlList: [] // 额外附件列表
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
// 表单项配置数组,由computed属性生成
|
|
86
|
-
formItems: []
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
// 计算属性
|
|
92
|
-
computed: {
|
|
93
|
-
// 生成表单项配置
|
|
94
|
-
formItems() {
|
|
95
|
-
return [
|
|
96
|
-
// 需求描述输入框配置
|
|
97
|
-
{
|
|
98
|
-
type: 'ImInput',
|
|
99
|
-
label: '需求描述',
|
|
100
|
-
prop: 'infoDescription',
|
|
101
|
-
rules: [{ required: true, message: '请输入需求描述' }],
|
|
102
|
-
attrs: {
|
|
103
|
-
type: 'textarea',
|
|
104
|
-
rows: 4, // 行数
|
|
105
|
-
placeholder: '请输入需求描述',
|
|
106
|
-
maxlength: 2000, // 最大字符限制
|
|
107
|
-
showWordLimit: true // 显示字数限制
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
// 截屏组件插槽配置
|
|
112
|
-
{
|
|
113
|
-
type: 'ImSlot',
|
|
114
|
-
label: '上传图片',
|
|
115
|
-
prop: 'requirementImageUrlList',
|
|
116
|
-
slots: {
|
|
117
|
-
default: 'CaptureScreen'
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
// 录屏组件插槽配置
|
|
122
|
-
{
|
|
123
|
-
type: 'ImSlot',
|
|
124
|
-
label: '上传视频',
|
|
125
|
-
prop: 'requirementVideoUrlList',
|
|
126
|
-
slots: {
|
|
127
|
-
default: 'RecordScreen'
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
// 文件上传组件配置
|
|
132
|
-
{
|
|
133
|
-
type: 'ImFieldFileUpload',
|
|
134
|
-
label: '上传相关附件(如果有,建议上传)',
|
|
135
|
-
prop: 'requirementAttachmentUrlList',
|
|
136
|
-
attrs: {
|
|
137
|
-
fileSize: 500, // 文件大小限制,单位MB
|
|
138
|
-
limit: 3, // 文件数量限制
|
|
139
|
-
tipText: '请上传附件,每个附件不超过500M,最多上传3个附件'
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
// 监听属性变化
|
|
147
|
-
watch: {
|
|
148
|
-
// 监听formItems变化,更新formConfig.formItems
|
|
149
|
-
formItems: {
|
|
150
|
-
handler(val) {
|
|
151
|
-
this.formConfig.formItems = val
|
|
152
|
-
},
|
|
153
|
-
immediate: true // 组件创建时立即执行一次
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
// 组件方法
|
|
158
|
-
methods: {
|
|
159
|
-
/**
|
|
160
|
-
* 显示需求提交弹窗
|
|
161
|
-
*/
|
|
162
|
-
showDialog() {
|
|
163
|
-
this.dialogVisible = true
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* 关闭需求提交弹窗
|
|
168
|
-
*/
|
|
169
|
-
closeDialog() {
|
|
170
|
-
this.dialogVisible = false
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* 提交需求表单
|
|
175
|
-
* @param {Object} form - 表单数据
|
|
176
|
-
*/
|
|
177
|
-
handleSubmit(form) {
|
|
178
|
-
this.$refs.ImForm.validate((valid) => {
|
|
179
|
-
// 表单校验不通过,提示用户
|
|
180
|
-
if (!valid) {
|
|
181
|
-
this.$message.warning('请填写完整信息')
|
|
182
|
-
return
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const formProps = this.formConfig.props
|
|
186
|
-
|
|
187
|
-
// 提交表单数据
|
|
188
|
-
const data = {
|
|
189
|
-
...formProps
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (formProps.requirementAttachmentUrlList && formProps.requirementAttachmentUrlList.length > 0) {
|
|
193
|
-
data.requirementAttachmentUrlList = formProps.requirementAttachmentUrlList.map((item) => {
|
|
194
|
-
return item.url
|
|
195
|
-
})
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// 调用提交接口
|
|
199
|
-
submitRequirementInfo(data).then((res) => {
|
|
200
|
-
if (res.code === 200) {
|
|
201
|
-
this.$message.success('需求提交成功')
|
|
202
|
-
this.closeDialog()
|
|
203
|
-
this.clearForm()
|
|
204
|
-
} else {
|
|
205
|
-
this.$message.error(res.message)
|
|
206
|
-
}
|
|
207
|
-
})
|
|
208
|
-
})
|
|
209
|
-
},
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* 开始录制处理
|
|
213
|
-
* 设置录制状态并隐藏弹窗
|
|
214
|
-
*/
|
|
215
|
-
onStartRecord() {
|
|
216
|
-
this.isRecording = true
|
|
217
|
-
this.closeDialog()
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* 结束录制处理
|
|
222
|
-
* 重置录制状态并显示弹窗
|
|
223
|
-
*/
|
|
224
|
-
onEndRecord() {
|
|
225
|
-
this.isRecording = false
|
|
226
|
-
this.showDialog()
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* 停止录制处理
|
|
231
|
-
* 重置状态并调用录制组件的停止方法
|
|
232
|
-
*/
|
|
233
|
-
onStopRecord() {
|
|
234
|
-
this.isRecording = false
|
|
235
|
-
this.showDialog()
|
|
236
|
-
this.$nextTick(() => {
|
|
237
|
-
if (this.$refs.recordScreen) {
|
|
238
|
-
this.$refs.recordScreen.stopRecording()
|
|
239
|
-
}
|
|
240
|
-
})
|
|
241
|
-
},
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* 清空表单数据
|
|
245
|
-
*/
|
|
246
|
-
clearForm() {
|
|
247
|
-
this.formConfig.props = {
|
|
248
|
-
infoDescription: '',
|
|
249
|
-
requirementImageUrlList: [],
|
|
250
|
-
requirementVideoUrlList: [],
|
|
251
|
-
requirementAttachmentUrlList: []
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
</script>
|
|
257
|
-
|
|
258
|
-
<style scoped lang="scss">
|
|
259
|
-
// 需求球容器样式
|
|
260
|
-
.requirement-ball-container {
|
|
261
|
-
position: fixed;
|
|
262
|
-
right: 40px;
|
|
263
|
-
bottom: 40px;
|
|
264
|
-
z-index: 100;
|
|
265
|
-
}
|
|
266
|
-
</style>
|