@ebiz/designer-components 0.1.89 → 0.1.90
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 +29 -29
- package/dist/designer-components.css +1 -1
- package/dist/index.mjs +23394 -22646
- package/package.json +1 -1
- package/src/App.vue +26 -26
- package/src/apiService/SIMPLE_DATA_SERVICE.md +284 -284
- package/src/apiService/mockDataService.js +115 -115
- package/src/apiService/simpleDataService.js +299 -299
- package/src/assets/base.css +86 -86
- package/src/assets/logo.svg +1 -1
- package/src/components/Button.vue +149 -149
- package/src/components/DataContainer.vue +40 -40
- package/src/components/EbizApproval.vue +338 -338
- package/src/components/EbizApprovalForm.vue +507 -507
- package/src/components/EbizAutoForm.vue +596 -596
- package/src/components/EbizAvatar.vue +115 -115
- package/src/components/EbizCheckbox.vue +93 -93
- package/src/components/EbizCheckboxGroup.vue +69 -69
- package/src/components/EbizDepartmentSelector.vue +149 -149
- package/src/components/EbizDescriptions.vue +340 -340
- package/src/components/EbizDescriptionsItem.vue +47 -47
- package/src/components/EbizDetailBlock.vue +81 -81
- package/src/components/EbizDetailItem.vue +559 -559
- package/src/components/EbizDetailView.md +438 -438
- package/src/components/EbizDetailView.vue +355 -355
- package/src/components/EbizDialog.vue +260 -260
- package/src/components/EbizDictionarySelect.vue +229 -229
- package/src/components/EbizDiv.vue +40 -40
- package/src/components/EbizDivider.vue +96 -96
- package/src/components/EbizDropdown.vue +135 -135
- package/src/components/EbizDropdownItem.vue +85 -85
- package/src/components/EbizEmployeeInfo.vue +144 -144
- package/src/components/EbizEmployeeSelector.vue +1160 -1160
- package/src/components/EbizFileList.vue +466 -466
- package/src/components/EbizMap.vue +541 -541
- package/src/components/EbizMeetingRoomSelector.vue +664 -664
- package/src/components/EbizMobileMeetingRoomSelector.vue +727 -727
- package/src/components/EbizOkrTree.vue +99 -99
- package/src/components/EbizPageHeader.vue +98 -98
- package/src/components/EbizPagination.vue +162 -162
- package/src/components/EbizPdfViewer.vue +540 -540
- package/src/components/EbizPopconfirm.vue +47 -47
- package/src/components/EbizQrCode.vue +73 -73
- package/src/components/EbizRadio.vue +86 -86
- package/src/components/EbizRadioGroup.vue +83 -83
- package/src/components/EbizRemoteSelect.vue +232 -232
- package/src/components/EbizRichTextEditor.vue +275 -275
- package/src/components/EbizRouteBreadcrumb.vue +46 -46
- package/src/components/EbizSApprovalProcess.vue +1429 -1429
- package/src/components/EbizSelect.vue +85 -85
- package/src/components/EbizSpace.vue +100 -100
- package/src/components/EbizStatistic.vue +149 -149
- package/src/components/EbizStatsCard.vue +113 -113
- package/src/components/EbizSwiper.vue +113 -113
- package/src/components/EbizSwiperItem.vue +13 -13
- package/src/components/EbizSwitch.vue +85 -85
- package/src/components/EbizTabHeader.vue +132 -132
- package/src/components/EbizTabPanel.vue +22 -22
- package/src/components/EbizTable.vue +469 -469
- package/src/components/EbizTableColumn.vue +116 -116
- package/src/components/EbizTableSort.vue +179 -179
- package/src/components/EbizTabs.vue +142 -142
- package/src/components/EbizTdesignButtonDialog.vue +332 -332
- package/src/components/EbizTdesignLoading.vue +107 -107
- package/src/components/EbizTimePicker.vue +143 -143
- package/src/components/EbizTitle.vue +91 -91
- package/src/components/EbizTree.vue +141 -141
- package/src/components/EbizTreeMergeTable.vue +1494 -1494
- package/src/components/EbizTreeSelector.vue +451 -451
- package/src/components/EbizVideo.vue +553 -553
- package/src/components/EbizVxeTable.vue +290 -290
- package/src/components/Form.vue +28 -28
- package/src/components/Home.vue +7 -7
- package/src/components/LaunchInterview.vue +403 -0
- package/src/components/MyComponent.vue +39 -39
- package/src/components/Table.vue +45 -45
- package/src/components/TdesignAlert.vue +115 -115
- package/src/components/TdesignButton.vue +135 -135
- package/src/components/TdesignCalendar/index.vue +145 -145
- package/src/components/TdesignCard.vue +195 -195
- package/src/components/TdesignCol.vue +101 -101
- package/src/components/TdesignCollapse.vue +142 -142
- package/src/components/TdesignCollapsePanel.vue +79 -79
- package/src/components/TdesignDatePicker.vue +124 -124
- package/src/components/TdesignDescriptions.vue +74 -74
- package/src/components/TdesignDescriptionsItem.vue +50 -50
- package/src/components/TdesignDialog.vue +225 -225
- package/src/components/TdesignForm.vue +138 -138
- package/src/components/TdesignFormItem.vue +105 -105
- package/src/components/TdesignGrid.vue +55 -55
- package/src/components/TdesignIcon.vue +67 -67
- package/src/components/TdesignImage.vue +162 -162
- package/src/components/TdesignImageViewer.vue +200 -200
- package/src/components/TdesignInput.vue +242 -242
- package/src/components/TdesignSelect.vue +446 -446
- package/src/components/TdesignTag.vue +117 -117
- package/src/components/TdesignTextarea.vue +142 -142
- package/src/components/TdesignTimeline.vue +58 -58
- package/src/components/TdesignTimelineItem.vue +71 -71
- package/src/components/TdesignUpload.vue +414 -414
- package/src/components/TdesignWatermark.vue +107 -107
- package/src/components/ebiz-form/components/cascader.vue +61 -61
- package/src/components/ebiz-form/components/checkbox.vue +37 -37
- package/src/components/ebiz-form/components/city.vue +137 -137
- package/src/components/ebiz-form/components/date-panel.vue +52 -52
- package/src/components/ebiz-form/components/date-range-panel.vue +52 -52
- package/src/components/ebiz-form/components/date-range.vue +56 -56
- package/src/components/ebiz-form/components/date.vue +52 -52
- package/src/components/ebiz-form/components/editor-multi-language.vue +47 -47
- package/src/components/ebiz-form/components/editor.vue +78 -78
- package/src/components/ebiz-form/components/file-multi-language.vue +52 -52
- package/src/components/ebiz-form/components/file.vue +149 -149
- package/src/components/ebiz-form/components/images-multi-language.vue +52 -52
- package/src/components/ebiz-form/components/images.vue +129 -129
- package/src/components/ebiz-form/components/img-multi-language.vue +51 -51
- package/src/components/ebiz-form/components/img.vue +129 -129
- package/src/components/ebiz-form/components/number.vue +50 -50
- package/src/components/ebiz-form/components/radio.vue +28 -28
- package/src/components/ebiz-form/components/select.vue +119 -119
- package/src/components/ebiz-form/components/switch.vue +23 -23
- package/src/components/ebiz-form/components/text-multi-language.vue +47 -47
- package/src/components/ebiz-form/components/text.vue +52 -52
- package/src/components/ebiz-form/components/textarea-multi-language.vue +48 -48
- package/src/components/ebiz-form/components/textarea.vue +29 -29
- package/src/components/ebiz-form/components/video-multi-language.vue +51 -51
- package/src/components/ebiz-form/components/video.vue +97 -97
- package/src/components/ebiz-form/index.vue +157 -157
- package/src/components/examples/PopconfirmExample.vue +149 -149
- package/src/components/icons/IconCommunity.vue +7 -7
- package/src/components/icons/IconDocumentation.vue +7 -7
- package/src/components/icons/IconEcosystem.vue +7 -7
- package/src/components/icons/IconSupport.vue +7 -7
- package/src/components/icons/IconTooling.vue +19 -19
- package/src/components/mItems/UserInfo.vue +349 -349
- package/src/components/senior/EbizSData/index.vue +273 -273
- package/src/components/senior/EbizSDialog/index.vue +770 -770
- package/src/components/senior/EbizSForm/README.md +157 -157
- package/src/components/senior/EbizSForm/index.vue +667 -667
- package/src/components/senior/EbizSForm/item.vue +998 -998
- package/src/components/senior/EbizSForm/mItems/DateTimePicker.vue +51 -51
- package/src/components/senior/EbizSForm/mItems/Picker.vue +63 -63
- package/src/index.js +317 -313
- package/src/main.js +55 -55
- package/src/router/index.js +422 -415
- package/src/utils/formatCode.js +24 -24
- package/src/utils/generateImportStatement.js +52 -52
- package/src/utils/hasJsx.js +25 -25
- package/src/utils/index.js +166 -166
- package/src/utils/mergeOptions.js +29 -29
- package/src/utils/parseRequiredBlocks.js +18 -18
- package/src/utils/vue-sfc-validator.js +155 -155
- package/src/views/Button.vue +23 -23
- package/src/views/CheckboxDemo.vue +104 -104
- package/src/views/DataContainer.vue +19 -19
- package/src/views/DialogDemo.vue +125 -125
- package/src/views/EbizApprovalDemo.vue +87 -87
- package/src/views/EbizApprovalFormDemo.vue +207 -207
- package/src/views/EbizAutoFormDemo.vue +129 -129
- package/src/views/EbizAvatar.vue +223 -223
- package/src/views/EbizDepartmentSelectorDemo.vue +169 -169
- package/src/views/EbizDetailBlockDemo.vue +30 -30
- package/src/views/EbizDetailViewDemo.vue +412 -412
- package/src/views/EbizEmployeeInfo.vue +249 -249
- package/src/views/EbizEmployeeSelector.vue +85 -85
- package/src/views/EbizFileListDemo.vue +339 -339
- package/src/views/EbizMap.vue +201 -201
- package/src/views/EbizMeetingRoomSelectorDemo.vue +293 -293
- package/src/views/EbizMobileMeetingRoomSelectorDemo.vue +566 -566
- package/src/views/EbizRadioDemo.vue +151 -151
- package/src/views/EbizSDataDemo.vue +136 -136
- package/src/views/EbizSDialogDemo.vue +303 -303
- package/src/views/EbizSForm/index.vue +352 -352
- package/src/views/EbizSFormDemo.vue +420 -420
- package/src/views/EbizSpace.vue +185 -185
- package/src/views/EbizSwiper.vue +157 -157
- package/src/views/EbizTdesignButtonDialogExample.vue +437 -437
- package/src/views/Form.vue +19 -19
- package/src/views/GridDemo.vue +238 -238
- package/src/views/Home.vue +154 -153
- package/src/views/LaunchInterviewDemo.vue +112 -0
- package/src/views/Mindmap.vue +17 -17
- package/src/views/MyComponent.vue +19 -19
- package/src/views/OkrTree.vue +19 -19
- package/src/views/PageHeaderDemo.vue +104 -104
- package/src/views/PaginationDemo.vue +96 -96
- package/src/views/PdfViewerDemo.vue +433 -433
- package/src/views/PermissionBoxDemo.vue +85 -85
- package/src/views/PopconfirmDemo.vue +80 -80
- package/src/views/RemoteSelect.vue +350 -350
- package/src/views/StatisticDemo.vue +190 -190
- package/src/views/SwitchDemo.vue +79 -79
- package/src/views/Table.vue +19 -19
- package/src/views/TableDemo.vue +334 -334
- package/src/views/TableSortDemo.vue +143 -143
- package/src/views/TableView.vue +68 -68
- package/src/views/TabsDemo.vue +282 -282
- package/src/views/TagDemo.vue +101 -101
- package/src/views/TdesignAlert.vue +98 -98
- package/src/views/TdesignButton.vue +190 -190
- package/src/views/TdesignCalendar.vue +94 -94
- package/src/views/TdesignCard.vue +296 -296
- package/src/views/TdesignCollapse.vue +293 -293
- package/src/views/TdesignDatePicker.vue +187 -187
- package/src/views/TdesignDescriptions.vue +101 -101
- package/src/views/TdesignForm.vue +248 -248
- package/src/views/TdesignIcon.vue +203 -203
- package/src/views/TdesignImage.vue +215 -215
- package/src/views/TdesignImageViewer.vue +198 -198
- package/src/views/TdesignInput.vue +252 -252
- package/src/views/TdesignSelect.vue +473 -473
- package/src/views/TdesignSwiper.vue +157 -157
- package/src/views/TextareaDemo.vue +93 -93
- package/src/views/TimePickerDemo.vue +146 -146
- package/src/views/TimelineDemo.vue +160 -160
- package/src/views/Title.vue +19 -19
- package/src/views/TreeDemo.vue +254 -254
- package/src/views/TreeMergeTableDemo.vue +239 -239
- package/src/views/TreeSelectorDemo.vue +245 -245
- package/src/views/UploadDemo.vue +128 -128
- package/src/views/VideoDemo.vue +245 -245
- package/src/views/VxeTableDemo.vue +279 -279
- package/src/views/WatermarkDemo.vue +85 -85
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ebiz-tdesign-button
|
|
4
|
+
theme="primary"
|
|
5
|
+
size="medium"
|
|
6
|
+
class="component-base-style"
|
|
7
|
+
:content="btnText || '发起访谈'"
|
|
8
|
+
@click="openTalkDialog"
|
|
9
|
+
></ebiz-tdesign-button>
|
|
10
|
+
<ebiz-dialog
|
|
11
|
+
width="800"
|
|
12
|
+
header="员工访谈"
|
|
13
|
+
body="对话框内容"
|
|
14
|
+
mode="modal"
|
|
15
|
+
placement="center"
|
|
16
|
+
confirmBtn="确认"
|
|
17
|
+
cancelBtn="取消"
|
|
18
|
+
:footer="false"
|
|
19
|
+
class="component-base-style"
|
|
20
|
+
v-model:visible="state.showTalkBox"
|
|
21
|
+
@cancel="closeTalkSave"
|
|
22
|
+
@close="closeTalkSave"
|
|
23
|
+
@confirm="formatData"
|
|
24
|
+
>
|
|
25
|
+
<template #default>
|
|
26
|
+
<ebiz-tabs theme="normal" placement="top" size="medium" class="component-base-style" v-model="state.actTab">
|
|
27
|
+
<ebiz-tab-panel value="add" label="添加访谈" style="padding-top: 12px" @change="tabChange">
|
|
28
|
+
<ebiz-s-form
|
|
29
|
+
layout="vertical"
|
|
30
|
+
labelAlign="right"
|
|
31
|
+
labelWidth="100px"
|
|
32
|
+
:showSubmitButton="false"
|
|
33
|
+
:showCancelButton="false"
|
|
34
|
+
ref="form"
|
|
35
|
+
:scrollToFirstError="true"
|
|
36
|
+
:showButtons="true"
|
|
37
|
+
class="component-base-style"
|
|
38
|
+
:data="state.interviewFormData"
|
|
39
|
+
:rules="state.interviewFormRules"
|
|
40
|
+
>
|
|
41
|
+
<template #default="{ formData }">
|
|
42
|
+
<ebiz-s-form-item
|
|
43
|
+
label="访谈时间"
|
|
44
|
+
name="interview_time"
|
|
45
|
+
type="date"
|
|
46
|
+
:multiple="false"
|
|
47
|
+
v-model="state.interviewFormData.interview_time"
|
|
48
|
+
:options="[]"
|
|
49
|
+
></ebiz-s-form-item>
|
|
50
|
+
<ebiz-s-form-item
|
|
51
|
+
label="访谈类型"
|
|
52
|
+
name="type_id"
|
|
53
|
+
type="select"
|
|
54
|
+
:multiple="false"
|
|
55
|
+
:isRemote="true"
|
|
56
|
+
v-model="state.interviewFormData.type_id"
|
|
57
|
+
:options="[]"
|
|
58
|
+
:remoteApiConfig="{ key: 'interview_kind_get', apiId: 2954, apiType: 0 }"
|
|
59
|
+
>
|
|
60
|
+
<template #default>
|
|
61
|
+
<ebiz-remote-select
|
|
62
|
+
placeholder="请选择"
|
|
63
|
+
:clearable="false"
|
|
64
|
+
:multiple="false"
|
|
65
|
+
class="component-base-style"
|
|
66
|
+
v-model="state.interviewFormData.type_id"
|
|
67
|
+
:queryParams="state.queryParams"
|
|
68
|
+
:optionsConfig="{}"
|
|
69
|
+
:apiConfig="{ key: 'interview_kind_get', apiId: 2954, apiType: 0 }"
|
|
70
|
+
@change="calcQuestion"
|
|
71
|
+
></ebiz-remote-select></template
|
|
72
|
+
></ebiz-s-form-item>
|
|
73
|
+
<div v-if="state.questionList.length" class="component-base-style">
|
|
74
|
+
<span style="display: inline-block; font-size: 16px; margin-bottom: 12px" class="component-base-style"
|
|
75
|
+
>问题列表</span
|
|
76
|
+
>
|
|
77
|
+
<div
|
|
78
|
+
v-for="(item, index) in state.questionList"
|
|
79
|
+
style="padding-left: 15px; margin-bottom: 12px"
|
|
80
|
+
class="component-base-style"
|
|
81
|
+
:key="index"
|
|
82
|
+
>
|
|
83
|
+
<div class="component-base-style">
|
|
84
|
+
<span style="display: inline-block" class="component-base-style">{{
|
|
85
|
+
`${index + 1}. ${item.name}`
|
|
86
|
+
}}</span>
|
|
87
|
+
</div>
|
|
88
|
+
<div style="display: flex; align-items: center; gap: 10px" class="component-base-style">
|
|
89
|
+
<span style="white-space: nowrap; display: inline-block; color: #999" class="component-base-style"
|
|
90
|
+
>访谈情况:</span
|
|
91
|
+
>
|
|
92
|
+
<ebiz-textarea
|
|
93
|
+
placeholder="请输入"
|
|
94
|
+
:maxLength="200"
|
|
95
|
+
:maxCharacter="true"
|
|
96
|
+
:autosize="true"
|
|
97
|
+
class="component-base-style"
|
|
98
|
+
:modelValue="item.answer"
|
|
99
|
+
@change="(...eventArgs) => syncVal(eventArgs, item, 'answer')"
|
|
100
|
+
></ebiz-textarea>
|
|
101
|
+
<div
|
|
102
|
+
style="display: flex; flex-direction: column; align-items: center"
|
|
103
|
+
class="component-base-style"
|
|
104
|
+
>
|
|
105
|
+
<span style="display: inline-block; white-space: nowrap" class="component-base-style"
|
|
106
|
+
>有问题</span
|
|
107
|
+
>
|
|
108
|
+
<ebiz-switch
|
|
109
|
+
size="medium"
|
|
110
|
+
theme="primary"
|
|
111
|
+
class="component-base-style"
|
|
112
|
+
:modelValue="item.need_follow"
|
|
113
|
+
@change="(...eventArgs) => syncVal(eventArgs, item, 'need_follow')"
|
|
114
|
+
></ebiz-switch>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div></div></template
|
|
118
|
+
></ebiz-s-form>
|
|
119
|
+
<div
|
|
120
|
+
v-if="state.actTab == 'add'"
|
|
121
|
+
style="display: flex; justify-content: flex-end; gap: 10px"
|
|
122
|
+
class="component-base-style"
|
|
123
|
+
>
|
|
124
|
+
<ebiz-tdesign-button
|
|
125
|
+
theme="default"
|
|
126
|
+
size="medium"
|
|
127
|
+
content="取消"
|
|
128
|
+
class="component-base-style"
|
|
129
|
+
@click="closeTalkSave"
|
|
130
|
+
></ebiz-tdesign-button>
|
|
131
|
+
<ebiz-tdesign-button
|
|
132
|
+
content="确定"
|
|
133
|
+
theme="primary"
|
|
134
|
+
size="medium"
|
|
135
|
+
class="component-base-style"
|
|
136
|
+
@click="formatData"
|
|
137
|
+
></ebiz-tdesign-button></div
|
|
138
|
+
></ebiz-tab-panel>
|
|
139
|
+
<ebiz-tab-panel value="history" label="历史访谈">
|
|
140
|
+
<ebiz-s-data
|
|
141
|
+
:pageEnable="true"
|
|
142
|
+
:size="10"
|
|
143
|
+
fetchUrl=""
|
|
144
|
+
:split="true"
|
|
145
|
+
:stripe="false"
|
|
146
|
+
:async="false"
|
|
147
|
+
:defaultSearch="false"
|
|
148
|
+
:showDivider="false"
|
|
149
|
+
:showPageHeader="false"
|
|
150
|
+
labelKey="table"
|
|
151
|
+
class="component-base-style"
|
|
152
|
+
:defaultParams="state.gridParams"
|
|
153
|
+
:apiConfig="{ key: 'interview_record_get', apiId: 3007, apiType: 0 }"
|
|
154
|
+
>
|
|
155
|
+
<template #default="{ data }">
|
|
156
|
+
<Ttable
|
|
157
|
+
:data="data"
|
|
158
|
+
:columns="state.columns"
|
|
159
|
+
row-key="id"
|
|
160
|
+
></Ttable></template>
|
|
161
|
+
</ebiz-s-data></ebiz-tab-panel></ebiz-tabs></template
|
|
162
|
+
></ebiz-dialog>
|
|
163
|
+
<ebiz-dialog
|
|
164
|
+
width="700"
|
|
165
|
+
header="问题列表"
|
|
166
|
+
body="对话框内容"
|
|
167
|
+
mode="modal"
|
|
168
|
+
placement="center"
|
|
169
|
+
confirmBtn="确认"
|
|
170
|
+
cancelBtn="取消"
|
|
171
|
+
:footer="false"
|
|
172
|
+
class="component-base-style"
|
|
173
|
+
v-model:visible="state.questionShow"
|
|
174
|
+
@close="closeQuestion"
|
|
175
|
+
>
|
|
176
|
+
<template #default>
|
|
177
|
+
<div style="display: flex; flex-direction: column; gap: 12px" class="component-base-style">
|
|
178
|
+
<div v-for="(item, index) in state.nowQuestions" class="component-base-style" :key="index">
|
|
179
|
+
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 8px" class="component-base-style">
|
|
180
|
+
<span
|
|
181
|
+
style="display: inline-block; font-size: 16px; color: #333; margin-right: auto"
|
|
182
|
+
class="component-base-style"
|
|
183
|
+
>{{ `${index + 1}. ${item?.question_id_info?.name}` }}</span
|
|
184
|
+
>
|
|
185
|
+
</div>
|
|
186
|
+
<div style="display: flex; gap: 10px; align-items: center" class="component-base-style">
|
|
187
|
+
<span style="display: inline-block; white-space: nowrap" class="component-base-style">访谈情况:</span>
|
|
188
|
+
<span style="display: inline-block" class="component-base-style">{{ item?.content }}</span>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div></template
|
|
192
|
+
></ebiz-dialog
|
|
193
|
+
>
|
|
194
|
+
</div>
|
|
195
|
+
</template>
|
|
196
|
+
|
|
197
|
+
<script setup lang="jsx">
|
|
198
|
+
import { Table as Ttable} from 'tdesign-vue-next';
|
|
199
|
+
import EbizRemoteSelect from './EbizRemoteSelect.vue'
|
|
200
|
+
import EbizSwitch from './EbizSwitch.vue'
|
|
201
|
+
import EbizTabs from './EbizTabs.vue'
|
|
202
|
+
import EbizTabPanel from './EbizTabPanel.vue'
|
|
203
|
+
import EbizTdesignButton from './TdesignButton.vue'
|
|
204
|
+
import EbizTextarea from './TdesignTextarea.vue'
|
|
205
|
+
import EbizDialog from './EbizDialog.vue'
|
|
206
|
+
import EbizSData from './senior/EbizSData/index.vue'
|
|
207
|
+
import EbizSForm from './senior/EbizSForm/index.vue'
|
|
208
|
+
import EbizSFormItem from './senior/EbizSForm/item.vue'
|
|
209
|
+
import EbizTag from './TdesignTag.vue'
|
|
210
|
+
import * as vue from 'vue'
|
|
211
|
+
import dataService from '../apiService/simpleDataService';
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
const props = defineProps({
|
|
215
|
+
employeeId: { type: Number, default: 0 },
|
|
216
|
+
no: { type: String, default: '' },
|
|
217
|
+
btnText: { type: String, default: '' },
|
|
218
|
+
kind: { type: String, default: 'DAILY' }
|
|
219
|
+
})
|
|
220
|
+
|
|
221
|
+
const emit = defineEmits(['api-success'])
|
|
222
|
+
const form = vue.ref(null)
|
|
223
|
+
|
|
224
|
+
const state = vue.reactive({
|
|
225
|
+
columns: [
|
|
226
|
+
{ colKey: 'serial-number', width: 60 },
|
|
227
|
+
{ colKey: 'employee_id_info.name', title: '员工', cell: 'employee_idSlot' },
|
|
228
|
+
{ colKey: 'create_by_info.name', title: '创建人', cell: 'create_bySlot' },
|
|
229
|
+
{
|
|
230
|
+
colKey: 'type_id',
|
|
231
|
+
title: '访谈类型',
|
|
232
|
+
cell: 'type_idSlot',
|
|
233
|
+
slots: {},
|
|
234
|
+
cell: (h,{ row }) => {
|
|
235
|
+
return <EbizTag>{row?.type_id_info?.name}</EbizTag>
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{ colKey: 'interview_time', title: '访谈时间', cell:(h,{row})=>{
|
|
239
|
+
return calcTime(row.interview_time)
|
|
240
|
+
}},
|
|
241
|
+
{
|
|
242
|
+
title: '操作',
|
|
243
|
+
colKey: 'ops',
|
|
244
|
+
slots: {},
|
|
245
|
+
cell: (h,{ row }) => {
|
|
246
|
+
return (
|
|
247
|
+
<EbizTdesignButton
|
|
248
|
+
theme="primary"
|
|
249
|
+
size="medium"
|
|
250
|
+
content="问题"
|
|
251
|
+
ghost={false}
|
|
252
|
+
class="component-base-style"
|
|
253
|
+
loading={state.loading}
|
|
254
|
+
disabled={state.loading}
|
|
255
|
+
onClick={(...eventArgs) => openQuestion(eventArgs, row)}
|
|
256
|
+
></EbizTdesignButton>
|
|
257
|
+
)
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
showTalkBox: false,
|
|
262
|
+
actTab: 'add',
|
|
263
|
+
interviewFormData: { type_id: '', interview_time: '', content: [] },
|
|
264
|
+
interviewFormRules: {
|
|
265
|
+
interview_time: [{ required: true, message: '访谈时间必填' }],
|
|
266
|
+
type_id: [{ required: true, message: '访谈类型必填' }]
|
|
267
|
+
},
|
|
268
|
+
questionList: [],
|
|
269
|
+
queryParams: {
|
|
270
|
+
kind: props.kind,
|
|
271
|
+
status: true
|
|
272
|
+
},
|
|
273
|
+
gridParams: {
|
|
274
|
+
employee: props.employeeId
|
|
275
|
+
},
|
|
276
|
+
loading: false,
|
|
277
|
+
nowQuestions: [],
|
|
278
|
+
questionShow: false
|
|
279
|
+
})
|
|
280
|
+
function calcTime(timeStr = 0, type = null, dontFill = false) {
|
|
281
|
+
if (!timeStr) return '-';
|
|
282
|
+
let time = timeStr;
|
|
283
|
+
time *= String(time).length < 13 ? 1000 : 1;
|
|
284
|
+
const date = new Date(time);
|
|
285
|
+
const year = date.getFullYear();
|
|
286
|
+
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
287
|
+
let day = date.getDate().toString().padStart(2, '0');
|
|
288
|
+
let hour = date.getHours().toString().padStart(2, '0');
|
|
289
|
+
let min = date.getMinutes().toString().padStart(2, '0');
|
|
290
|
+
let sec = date.getSeconds().toString().padStart(2, '0');
|
|
291
|
+
if (dontFill) {
|
|
292
|
+
month = Number(month) + '';
|
|
293
|
+
day = Number(day) + '';
|
|
294
|
+
hour = Number(hour) + '';
|
|
295
|
+
min = Number(min) + '';
|
|
296
|
+
sec = Number(sec) + '';
|
|
297
|
+
}
|
|
298
|
+
if (!type) return `${year}-${month}-${day} ${hour}:${min}:${sec}`;
|
|
299
|
+
try {
|
|
300
|
+
return Array.from(type).map(i => {
|
|
301
|
+
switch (i) {
|
|
302
|
+
case 'y':
|
|
303
|
+
return year;
|
|
304
|
+
case 'M':
|
|
305
|
+
return month;
|
|
306
|
+
case 'd':
|
|
307
|
+
return day;
|
|
308
|
+
case 'h':
|
|
309
|
+
return hour;
|
|
310
|
+
case 'm':
|
|
311
|
+
return min;
|
|
312
|
+
case 's':
|
|
313
|
+
return sec;
|
|
314
|
+
default:
|
|
315
|
+
return i;
|
|
316
|
+
}
|
|
317
|
+
}).join('');
|
|
318
|
+
} catch (err) {
|
|
319
|
+
return `${year}:${month}:${day} ${hour}:${min}:${sec}`
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function openTalkDialog(event) {
|
|
323
|
+
let {userId} = JSON.parse(localStorage.getItem('user') || '{}')
|
|
324
|
+
state.interviewFormData = {
|
|
325
|
+
employee_id: props.employeeId,
|
|
326
|
+
no: props.no,
|
|
327
|
+
create_by: userId,
|
|
328
|
+
|
|
329
|
+
interview_time: '',
|
|
330
|
+
interview_content: '',
|
|
331
|
+
files: []
|
|
332
|
+
}
|
|
333
|
+
state.showTalkBox = true
|
|
334
|
+
}
|
|
335
|
+
function closeTalkSave(event) {
|
|
336
|
+
state.actTab = 'add'
|
|
337
|
+
state.questionList = []
|
|
338
|
+
state.showTalkBox = false
|
|
339
|
+
}
|
|
340
|
+
function calcQuestion(type_id) {
|
|
341
|
+
state.questionList = []
|
|
342
|
+
dataService.fetch({
|
|
343
|
+
queryParams:{
|
|
344
|
+
type_id
|
|
345
|
+
}
|
|
346
|
+
},{
|
|
347
|
+
key: 'interview_question_get'
|
|
348
|
+
}).then((res) => {
|
|
349
|
+
state.questionList = (res?.data || []).map((i) => {
|
|
350
|
+
return {
|
|
351
|
+
...i,
|
|
352
|
+
need_follow: false,
|
|
353
|
+
answer: ''
|
|
354
|
+
}
|
|
355
|
+
})
|
|
356
|
+
})
|
|
357
|
+
}
|
|
358
|
+
async function formatData(event) {
|
|
359
|
+
let valid = await form.value.formRef.validate()
|
|
360
|
+
if (valid !== true) return false
|
|
361
|
+
state.interviewFormData.content = state.questionList.map((i) => {
|
|
362
|
+
return {
|
|
363
|
+
question_id: i.id,
|
|
364
|
+
need_follow: i.need_follow,
|
|
365
|
+
answer: i.answer
|
|
366
|
+
}
|
|
367
|
+
})
|
|
368
|
+
dataService.fetch({
|
|
369
|
+
saveData: state.interviewFormData
|
|
370
|
+
},{
|
|
371
|
+
key: 'interview_record_save'
|
|
372
|
+
}).then(closeTalkSave)
|
|
373
|
+
}
|
|
374
|
+
function submitSuccess(event) {
|
|
375
|
+
emit('api_success')
|
|
376
|
+
}
|
|
377
|
+
function syncVal(eventArgs, args0, args1) {
|
|
378
|
+
args0[args1] = eventArgs[0]
|
|
379
|
+
}
|
|
380
|
+
function tabChange(event) {}
|
|
381
|
+
function openQuestion(eventArgs, args0) {
|
|
382
|
+
console.log(args0)
|
|
383
|
+
state.loading = true
|
|
384
|
+
dataService.fetch({
|
|
385
|
+
queryParams:{
|
|
386
|
+
interviewId: args0.id
|
|
387
|
+
}
|
|
388
|
+
},{
|
|
389
|
+
key: 'interview_question_record_get'
|
|
390
|
+
}).then((res) => {
|
|
391
|
+
state.nowQuestions = res?.data || []
|
|
392
|
+
state.questionShow = true
|
|
393
|
+
})
|
|
394
|
+
.finally(() => {
|
|
395
|
+
state.loading = false
|
|
396
|
+
})
|
|
397
|
+
}
|
|
398
|
+
function closeQuestion(event) {
|
|
399
|
+
state.questionShow = false
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
</script>
|
|
403
|
+
<style scoped></style>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="my-component">
|
|
3
|
-
<t-input v-model="value" placeholder="请输入内容" @update:modelValue="change"></t-input>
|
|
4
|
-
<t-button size="small">查询数据</t-button>
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
import { Input as TInput } from 'tdesign-vue-next';
|
|
10
|
-
import { ref } from "vue";
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
name: 'MyComponent',
|
|
14
|
-
components: {
|
|
15
|
-
TInput
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
modelValue: {
|
|
19
|
-
type: String
|
|
20
|
-
},
|
|
21
|
-
name: String
|
|
22
|
-
},
|
|
23
|
-
emits: ['update:modelValue'],
|
|
24
|
-
setup(props, { emit }) {
|
|
25
|
-
const value = ref(props.modelValue)
|
|
26
|
-
|
|
27
|
-
const change = (val) => {
|
|
28
|
-
value.value = val
|
|
29
|
-
console.log(val)
|
|
30
|
-
emit('update:modelValue', value.value)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
value,
|
|
35
|
-
change
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="my-component">
|
|
3
|
+
<t-input v-model="value" placeholder="请输入内容" @update:modelValue="change"></t-input>
|
|
4
|
+
<t-button size="small">查询数据</t-button>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import { Input as TInput } from 'tdesign-vue-next';
|
|
10
|
+
import { ref } from "vue";
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'MyComponent',
|
|
14
|
+
components: {
|
|
15
|
+
TInput
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: String
|
|
20
|
+
},
|
|
21
|
+
name: String
|
|
22
|
+
},
|
|
23
|
+
emits: ['update:modelValue'],
|
|
24
|
+
setup(props, { emit }) {
|
|
25
|
+
const value = ref(props.modelValue)
|
|
26
|
+
|
|
27
|
+
const change = (val) => {
|
|
28
|
+
value.value = val
|
|
29
|
+
console.log(val)
|
|
30
|
+
emit('update:modelValue', value.value)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
value,
|
|
35
|
+
change
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
package/src/components/Table.vue
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="my-component">
|
|
3
|
-
{{ value }}
|
|
4
|
-
<t-table row-key="key" :data="tableData" :columns="columns"></t-table>
|
|
5
|
-
<slot></slot>
|
|
6
|
-
<t-button @click="changeValue"> 修改数据</t-button>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script setup>
|
|
11
|
-
|
|
12
|
-
import { ref, defineEmits, defineProps, watch } from "vue";
|
|
13
|
-
|
|
14
|
-
const props = defineProps(['modelValue', 'dataSource']);
|
|
15
|
-
|
|
16
|
-
const tableData = ref([
|
|
17
|
-
{ id: 1, name: '张三', age: 18 },
|
|
18
|
-
{ id: 2, name: '李四', age: 20 },
|
|
19
|
-
{ id: 3, name: '王五', age: 22 },
|
|
20
|
-
]);
|
|
21
|
-
const columns = [
|
|
22
|
-
{ colKey: 'id', title: 'ID', width: '100' },
|
|
23
|
-
{ colKey: 'name', title: '姓名', ellipsis: true },
|
|
24
|
-
{ colKey: 'age', title: '年龄' },
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const emit = defineEmits("update:modelValue");
|
|
28
|
-
|
|
29
|
-
watch(() => props.dataSource, (val) => {
|
|
30
|
-
version.value = 0;
|
|
31
|
-
changeValue()
|
|
32
|
-
})
|
|
33
|
-
const value = ref(props.modelValue)
|
|
34
|
-
|
|
35
|
-
const change = (val) => {
|
|
36
|
-
value.value = val
|
|
37
|
-
emit('update:modelValue', value.value)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const version = ref(0);
|
|
41
|
-
const changeValue = () => {
|
|
42
|
-
change(props.dataSource + ' : ' + (version.value++))
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="my-component">
|
|
3
|
+
{{ value }}
|
|
4
|
+
<t-table row-key="key" :data="tableData" :columns="columns"></t-table>
|
|
5
|
+
<slot></slot>
|
|
6
|
+
<t-button @click="changeValue"> 修改数据</t-button>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
|
|
12
|
+
import { ref, defineEmits, defineProps, watch } from "vue";
|
|
13
|
+
|
|
14
|
+
const props = defineProps(['modelValue', 'dataSource']);
|
|
15
|
+
|
|
16
|
+
const tableData = ref([
|
|
17
|
+
{ id: 1, name: '张三', age: 18 },
|
|
18
|
+
{ id: 2, name: '李四', age: 20 },
|
|
19
|
+
{ id: 3, name: '王五', age: 22 },
|
|
20
|
+
]);
|
|
21
|
+
const columns = [
|
|
22
|
+
{ colKey: 'id', title: 'ID', width: '100' },
|
|
23
|
+
{ colKey: 'name', title: '姓名', ellipsis: true },
|
|
24
|
+
{ colKey: 'age', title: '年龄' },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits("update:modelValue");
|
|
28
|
+
|
|
29
|
+
watch(() => props.dataSource, (val) => {
|
|
30
|
+
version.value = 0;
|
|
31
|
+
changeValue()
|
|
32
|
+
})
|
|
33
|
+
const value = ref(props.modelValue)
|
|
34
|
+
|
|
35
|
+
const change = (val) => {
|
|
36
|
+
value.value = val
|
|
37
|
+
emit('update:modelValue', value.value)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const version = ref(0);
|
|
41
|
+
const changeValue = () => {
|
|
42
|
+
change(props.dataSource + ' : ' + (version.value++))
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
</script>
|