@ebiz/designer-components 0.1.124 → 0.1.126
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 +35548 -33511
- package/dist/{pdf-C9oIcL2N.js → pdf-KomaE0u5.js} +891 -891
- 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 +312 -312
- 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 +366 -366
- package/src/components/EbizApprovalDetail.vue +169 -169
- package/src/components/EbizApprovalForm.vue +534 -534
- package/src/components/EbizApprovalV2.vue +713 -713
- 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 +148 -148
- 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/EbizDormDashboard.vue +314 -314
- 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 +502 -502
- package/src/components/EbizMap.vue +541 -541
- package/src/components/EbizMeetingRoomSelector.vue +1149 -1149
- 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/EbizParkingDashboard.vue +152 -152
- package/src/components/EbizPdfViewer.vue +540 -540
- package/src/components/EbizPopconfirm.vue +47 -47
- package/src/components/EbizQrCode.vue +167 -167
- 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 +338 -338
- package/src/components/EbizRouteBreadcrumb.vue +46 -46
- package/src/components/EbizSApprovalProcess.vue +1456 -1426
- 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 +469 -469
- 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 +526 -526
- 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/EbizApprovalList/ApprovalList.vue +127 -127
- package/src/components/senior/EbizSData/index.vue +280 -280
- package/src/components/senior/EbizSDialog/index.vue +776 -776
- 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 +1011 -1011
- package/src/components/senior/EbizSForm/mItems/DateTimePicker.vue +51 -51
- package/src/components/senior/EbizSForm/mItems/Picker.vue +63 -63
- package/src/index.js +327 -327
- package/src/main.js +55 -55
- package/src/router/index.js +436 -436
- 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/EbizDormDashboardDemo.vue +87 -87
- 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/EbizParkingDashboardDemo.vue +28 -28
- 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 +156 -156
- package/src/views/LaunchInterviewDemo.vue +111 -111
- 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
|
@@ -1,526 +1,526 @@
|
|
|
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
|
-
v-if="state.showTalkBox"
|
|
12
|
-
width="800"
|
|
13
|
-
header="员工访谈"
|
|
14
|
-
body="对话框内容"
|
|
15
|
-
mode="modal"
|
|
16
|
-
placement="center"
|
|
17
|
-
confirmBtn="确认"
|
|
18
|
-
cancelBtn="取消"
|
|
19
|
-
:footer="false"
|
|
20
|
-
class="component-base-style"
|
|
21
|
-
v-model:visible="state.showTalkBox"
|
|
22
|
-
@cancel="closeTalkSave"
|
|
23
|
-
@close="closeTalkSave"
|
|
24
|
-
@confirm="formatData"
|
|
25
|
-
>
|
|
26
|
-
<template #default>
|
|
27
|
-
<ebiz-tabs theme="normal" placement="top" size="medium" class="component-base-style" v-model="state.actTab">
|
|
28
|
-
<ebiz-tab-panel value="add" label="添加访谈" style="padding-top: 12px" @change="tabChange">
|
|
29
|
-
<t-form
|
|
30
|
-
layout="vertical"
|
|
31
|
-
labelAlign="right"
|
|
32
|
-
labelWidth="100px"
|
|
33
|
-
:showSubmitButton="false"
|
|
34
|
-
:showCancelButton="false"
|
|
35
|
-
ref="form"
|
|
36
|
-
:showButtons="true"
|
|
37
|
-
class="component-base-style"
|
|
38
|
-
:data="state.interviewFormData"
|
|
39
|
-
:rules="state.interviewFormRules"
|
|
40
|
-
>
|
|
41
|
-
<template #default="{ }">
|
|
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; font-size: 12px;" class="component-base-style"
|
|
106
|
-
>有问题</span
|
|
107
|
-
>
|
|
108
|
-
<ebiz-switch
|
|
109
|
-
size="small"
|
|
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 v-if="item.need_follow">
|
|
117
|
-
<ebiz-tdesign-button
|
|
118
|
-
theme="primary"
|
|
119
|
-
size="small"
|
|
120
|
-
content="跟进人"
|
|
121
|
-
class="component-base-style"
|
|
122
|
-
@click="openFollowListDialog(item,index)"
|
|
123
|
-
></ebiz-tdesign-button>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</div></div>
|
|
127
|
-
<ebiz-s-form-item
|
|
128
|
-
label="审批"
|
|
129
|
-
name="approverList"
|
|
130
|
-
type="text"
|
|
131
|
-
:multiple="false"
|
|
132
|
-
:isRemote="false"
|
|
133
|
-
v-model="state.interviewFormData.approverList"
|
|
134
|
-
>
|
|
135
|
-
<template #default>
|
|
136
|
-
<ebiz-approval
|
|
137
|
-
workFlowKey="interview_record"
|
|
138
|
-
:id="0"
|
|
139
|
-
:required="true"
|
|
140
|
-
type="all"
|
|
141
|
-
limitedType="role"
|
|
142
|
-
:showRootOrg="true"
|
|
143
|
-
:childDeptEnable="false"
|
|
144
|
-
:showCC="true"
|
|
145
|
-
:canEdit="true"
|
|
146
|
-
style="width: 100%"
|
|
147
|
-
class="component-base-style"
|
|
148
|
-
v-model:approverList="state.interviewFormData.approverList"
|
|
149
|
-
v-model:ccList="state.interviewFormData.ccList"
|
|
150
|
-
v-model:data="state.interviewFormData"
|
|
151
|
-
:limitedMap="[]"
|
|
152
|
-
></ebiz-approval>
|
|
153
|
-
</template>
|
|
154
|
-
</ebiz-s-form-item>
|
|
155
|
-
</template>
|
|
156
|
-
</t-form>
|
|
157
|
-
<div
|
|
158
|
-
v-if="state.actTab == 'add'"
|
|
159
|
-
style="display: flex; justify-content: flex-end; gap: 10px"
|
|
160
|
-
class="component-base-style"
|
|
161
|
-
>
|
|
162
|
-
<ebiz-tdesign-button
|
|
163
|
-
theme="default"
|
|
164
|
-
size="medium"
|
|
165
|
-
content="取消"
|
|
166
|
-
class="component-base-style"
|
|
167
|
-
@click="closeTalkSave"
|
|
168
|
-
></ebiz-tdesign-button>
|
|
169
|
-
<ebiz-tdesign-button
|
|
170
|
-
content="确定"
|
|
171
|
-
theme="primary"
|
|
172
|
-
size="medium"
|
|
173
|
-
class="component-base-style"
|
|
174
|
-
@click="formatData"
|
|
175
|
-
></ebiz-tdesign-button></div
|
|
176
|
-
></ebiz-tab-panel>
|
|
177
|
-
<ebiz-tab-panel value="history" label="历史访谈">
|
|
178
|
-
<ebiz-s-data
|
|
179
|
-
:pageEnable="true"
|
|
180
|
-
:size="10"
|
|
181
|
-
fetchUrl=""
|
|
182
|
-
:split="true"
|
|
183
|
-
:stripe="false"
|
|
184
|
-
:async="false"
|
|
185
|
-
:defaultSearch="false"
|
|
186
|
-
:showDivider="false"
|
|
187
|
-
:showPageHeader="false"
|
|
188
|
-
labelKey="table"
|
|
189
|
-
class="component-base-style"
|
|
190
|
-
:defaultParams="state.gridParams"
|
|
191
|
-
:apiConfig="{ key: 'interview_record_get', apiId: 3007, apiType: 0 }"
|
|
192
|
-
>
|
|
193
|
-
<template #default="{ data }">
|
|
194
|
-
<Ttable
|
|
195
|
-
:data="data"
|
|
196
|
-
:columns="state.columns"
|
|
197
|
-
row-key="id"
|
|
198
|
-
></Ttable></template>
|
|
199
|
-
</ebiz-s-data></ebiz-tab-panel></ebiz-tabs></template
|
|
200
|
-
></ebiz-dialog>
|
|
201
|
-
<ebiz-dialog
|
|
202
|
-
:zIndex="5000"
|
|
203
|
-
width="700"
|
|
204
|
-
header="问题列表"
|
|
205
|
-
body="对话框内容"
|
|
206
|
-
mode="modal"
|
|
207
|
-
placement="center"
|
|
208
|
-
confirmBtn="确认"
|
|
209
|
-
cancelBtn="取消"
|
|
210
|
-
:footer="false"
|
|
211
|
-
class="component-base-style"
|
|
212
|
-
v-model:visible="state.questionShow"
|
|
213
|
-
@close="closeQuestion"
|
|
214
|
-
>
|
|
215
|
-
<template #default>
|
|
216
|
-
<div style="display: flex; flex-direction: column; gap: 12px" class="component-base-style">
|
|
217
|
-
<div v-for="(item, index) in state.nowQuestions" class="component-base-style" :key="index">
|
|
218
|
-
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 8px" class="component-base-style">
|
|
219
|
-
<span
|
|
220
|
-
style="display: inline-block; font-size: 16px; color: #333; margin-right: auto"
|
|
221
|
-
class="component-base-style"
|
|
222
|
-
>{{ `${index + 1}. ${item?.question_id_info?.name}` }}</span
|
|
223
|
-
>
|
|
224
|
-
</div>
|
|
225
|
-
<div style="display: flex; gap: 10px; align-items: center" class="component-base-style">
|
|
226
|
-
<span style="display: inline-block; white-space: nowrap" class="component-base-style">访谈情况:</span>
|
|
227
|
-
<span style="display: inline-block" class="component-base-style">{{ item?.content }}</span>
|
|
228
|
-
</div>
|
|
229
|
-
</div>
|
|
230
|
-
</div></template
|
|
231
|
-
></ebiz-dialog
|
|
232
|
-
>
|
|
233
|
-
|
|
234
|
-
<ebiz-dialog
|
|
235
|
-
:zIndex="5500"
|
|
236
|
-
width="500"
|
|
237
|
-
header="跟进人"
|
|
238
|
-
body="对话框内容"
|
|
239
|
-
mode="modal"
|
|
240
|
-
placement="center"
|
|
241
|
-
confirmBtn="确认"
|
|
242
|
-
cancelBtn="取消"
|
|
243
|
-
:footer="true"
|
|
244
|
-
class="component-base-style"
|
|
245
|
-
v-model:visible="state.showFollow">
|
|
246
|
-
<template #default>
|
|
247
|
-
<ebiz-employee-selector
|
|
248
|
-
:single="false"
|
|
249
|
-
defaultTab="organization"
|
|
250
|
-
content="请选择跟进人"
|
|
251
|
-
class="component-base-style"
|
|
252
|
-
v-model="state.follow_employee_list">
|
|
253
|
-
</ebiz-employee-selector>
|
|
254
|
-
</template>
|
|
255
|
-
<template #footer>
|
|
256
|
-
<ebiz-tdesign-button
|
|
257
|
-
content="确定"
|
|
258
|
-
theme="primary"
|
|
259
|
-
size="medium"
|
|
260
|
-
class="component-base-style"
|
|
261
|
-
@click="saveQuestionFollow"
|
|
262
|
-
></ebiz-tdesign-button>
|
|
263
|
-
</template>
|
|
264
|
-
</ebiz-dialog>
|
|
265
|
-
</div>
|
|
266
|
-
</template>
|
|
267
|
-
|
|
268
|
-
<script setup lang="jsx">
|
|
269
|
-
import { Table as Ttable, Form as TForm} from 'tdesign-vue-next';
|
|
270
|
-
import EbizRemoteSelect from './EbizRemoteSelect.vue'
|
|
271
|
-
import EbizSwitch from './EbizSwitch.vue'
|
|
272
|
-
import EbizTabs from './EbizTabs.vue'
|
|
273
|
-
import EbizTabPanel from './EbizTabPanel.vue'
|
|
274
|
-
import EbizTdesignButton from './TdesignButton.vue'
|
|
275
|
-
import EbizTextarea from './TdesignTextarea.vue'
|
|
276
|
-
import EbizDialog from './EbizDialog.vue'
|
|
277
|
-
import EbizSData from './senior/EbizSData/index.vue'
|
|
278
|
-
import EbizSForm from './senior/EbizSForm/index.vue'
|
|
279
|
-
import EbizSFormItem from './senior/EbizSForm/item.vue'
|
|
280
|
-
import EbizTag from './TdesignTag.vue'
|
|
281
|
-
import * as vue from 'vue'
|
|
282
|
-
import dataService from '../apiService/simpleDataService';
|
|
283
|
-
import EbizEmployeeSelector from './EbizEmployeeSelector.vue'
|
|
284
|
-
import EbizApproval from './EbizApproval.vue'
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
const props = defineProps({
|
|
288
|
-
employeeId: { type: Number, default: 0 },
|
|
289
|
-
no: { type: String, default: '' },
|
|
290
|
-
btnText: { type: String, default: '' },
|
|
291
|
-
kind: { type: String, default: 'DAILY' },
|
|
292
|
-
name: { type: String, default: '' }
|
|
293
|
-
})
|
|
294
|
-
|
|
295
|
-
const {employeeId}=vue.toRefs(props)
|
|
296
|
-
|
|
297
|
-
const emit = defineEmits(['api-success'])
|
|
298
|
-
const form = vue.ref(null)
|
|
299
|
-
|
|
300
|
-
const state = vue.reactive({
|
|
301
|
-
columns: [
|
|
302
|
-
{ colKey: 'serial-number', width: 60 },
|
|
303
|
-
{ colKey: 'employee_id_info.name', title: '员工', cell: 'employee_idSlot' },
|
|
304
|
-
{ colKey: 'create_by_info.name', title: '创建人', cell: 'create_bySlot' },
|
|
305
|
-
{
|
|
306
|
-
colKey: 'type_id',
|
|
307
|
-
title: '访谈类型',
|
|
308
|
-
cell: 'type_idSlot',
|
|
309
|
-
slots: {},
|
|
310
|
-
cell: (h,{ row }) => {
|
|
311
|
-
return <EbizTag>{row?.type_id_info?.name}</EbizTag>
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
{ colKey: 'interview_time', title: '访谈日期', cell:(h,{row})=>{
|
|
315
|
-
return calcTime(row.interview_time, 'y-M-d')
|
|
316
|
-
}},
|
|
317
|
-
{
|
|
318
|
-
title: '操作',
|
|
319
|
-
colKey: 'ops',
|
|
320
|
-
slots: {},
|
|
321
|
-
cell: (h,{ row }) => {
|
|
322
|
-
return (
|
|
323
|
-
<EbizTdesignButton
|
|
324
|
-
variant="text"
|
|
325
|
-
theme="primary"
|
|
326
|
-
size="medium"
|
|
327
|
-
content="访谈情况"
|
|
328
|
-
ghost={false}
|
|
329
|
-
class="component-base-style"
|
|
330
|
-
loading={state.loading}
|
|
331
|
-
disabled={state.loading}
|
|
332
|
-
onClick={(...eventArgs) => openQuestion(eventArgs, row)}
|
|
333
|
-
></EbizTdesignButton>
|
|
334
|
-
)
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
],
|
|
338
|
-
showTalkBox: false,
|
|
339
|
-
actTab: 'add',
|
|
340
|
-
interviewFormData: { type_id: '', interview_time: '', content: [] },
|
|
341
|
-
interviewFormRules: {
|
|
342
|
-
interview_time: [{ required: true, message: '请选择访谈日期' }],
|
|
343
|
-
type_id: [{ required: true, message: '请选择访谈类型' }],
|
|
344
|
-
approverList: [{ required: true, message: '请选择审批人' }]
|
|
345
|
-
},
|
|
346
|
-
questionList: [],
|
|
347
|
-
queryParams: {
|
|
348
|
-
name: props.name,
|
|
349
|
-
kind: props.kind,
|
|
350
|
-
status: true
|
|
351
|
-
},
|
|
352
|
-
gridParams: vue.computed(() => ({ employee: employeeId.value })),
|
|
353
|
-
loading: false,
|
|
354
|
-
nowQuestions: [],
|
|
355
|
-
questionShow: false,
|
|
356
|
-
showFollow: false,
|
|
357
|
-
follow_employee_list: [],
|
|
358
|
-
selected_qs_index: 0
|
|
359
|
-
})
|
|
360
|
-
function calcTime(timeStr = 0, type = null, dontFill = false) {
|
|
361
|
-
if (!timeStr) return '-';
|
|
362
|
-
let time = timeStr;
|
|
363
|
-
time *= String(time).length < 13 ? 1000 : 1;
|
|
364
|
-
const date = new Date(time);
|
|
365
|
-
const year = date.getFullYear();
|
|
366
|
-
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
367
|
-
let day = date.getDate().toString().padStart(2, '0');
|
|
368
|
-
let hour = date.getHours().toString().padStart(2, '0');
|
|
369
|
-
let min = date.getMinutes().toString().padStart(2, '0');
|
|
370
|
-
let sec = date.getSeconds().toString().padStart(2, '0');
|
|
371
|
-
if (dontFill) {
|
|
372
|
-
month = Number(month) + '';
|
|
373
|
-
day = Number(day) + '';
|
|
374
|
-
hour = Number(hour) + '';
|
|
375
|
-
min = Number(min) + '';
|
|
376
|
-
sec = Number(sec) + '';
|
|
377
|
-
}
|
|
378
|
-
if (!type) return `${year}-${month}-${day} ${hour}:${min}:${sec}`;
|
|
379
|
-
try {
|
|
380
|
-
return Array.from(type).map(i => {
|
|
381
|
-
switch (i) {
|
|
382
|
-
case 'y':
|
|
383
|
-
return year;
|
|
384
|
-
case 'M':
|
|
385
|
-
return month;
|
|
386
|
-
case 'd':
|
|
387
|
-
return day;
|
|
388
|
-
case 'h':
|
|
389
|
-
return hour;
|
|
390
|
-
case 'm':
|
|
391
|
-
return min;
|
|
392
|
-
case 's':
|
|
393
|
-
return sec;
|
|
394
|
-
default:
|
|
395
|
-
return i;
|
|
396
|
-
}
|
|
397
|
-
}).join('');
|
|
398
|
-
} catch (err) {
|
|
399
|
-
return `${year}:${month}:${day} ${hour}:${min}:${sec}`
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
function openTalkDialog(event) {
|
|
403
|
-
let {userId} = JSON.parse(localStorage.getItem('user') || '{}')
|
|
404
|
-
state.interviewFormData = {
|
|
405
|
-
employee_id: props.employeeId,
|
|
406
|
-
no: props.no,
|
|
407
|
-
create_by: userId,
|
|
408
|
-
|
|
409
|
-
interview_time: '',
|
|
410
|
-
interview_content: '',
|
|
411
|
-
files: []
|
|
412
|
-
}
|
|
413
|
-
state.showTalkBox = true
|
|
414
|
-
}
|
|
415
|
-
function closeTalkSave(event) {
|
|
416
|
-
state.actTab = 'add'
|
|
417
|
-
state.questionList = []
|
|
418
|
-
state.showTalkBox = false
|
|
419
|
-
}
|
|
420
|
-
function calcQuestion(type_id) {
|
|
421
|
-
state.questionList = []
|
|
422
|
-
dataService.fetch({
|
|
423
|
-
queryParams:{
|
|
424
|
-
type_id
|
|
425
|
-
}
|
|
426
|
-
},{
|
|
427
|
-
key: 'interview_question_get'
|
|
428
|
-
}).then((res) => {
|
|
429
|
-
state.questionList = (res?.data || []).map((i) => {
|
|
430
|
-
return {
|
|
431
|
-
...i,
|
|
432
|
-
need_follow: false,
|
|
433
|
-
answer: ''
|
|
434
|
-
}
|
|
435
|
-
})
|
|
436
|
-
})
|
|
437
|
-
}
|
|
438
|
-
async function formatData(event) {
|
|
439
|
-
console.log('questionList',state.questionList)
|
|
440
|
-
let {userId} = JSON.parse(localStorage.getItem('user') || '{}')
|
|
441
|
-
let valid = await form.value.validate()
|
|
442
|
-
if (valid !== true) return false
|
|
443
|
-
state.interviewFormData.content = state.questionList.map((i) => {
|
|
444
|
-
return {
|
|
445
|
-
question_id: i.id,
|
|
446
|
-
need_follow: i.need_follow,
|
|
447
|
-
answer: i.answer
|
|
448
|
-
}
|
|
449
|
-
})
|
|
450
|
-
|
|
451
|
-
const interview_records=state.questionList.map((item)=>{
|
|
452
|
-
return {
|
|
453
|
-
question_id: item.id,
|
|
454
|
-
employee: props.employeeId,
|
|
455
|
-
content: item.answer,
|
|
456
|
-
is_follow_task: Number(item.need_follow),
|
|
457
|
-
need_follow: item.need_follow,
|
|
458
|
-
follow_status: 'ing'
|
|
459
|
-
}
|
|
460
|
-
})
|
|
461
|
-
|
|
462
|
-
const taskList=state.questionList.filter((item)=>item.need_follow).map((item)=>{
|
|
463
|
-
return {
|
|
464
|
-
source: 'follow_task',
|
|
465
|
-
question_id: item.id,
|
|
466
|
-
title: item?.type_id_info?.name + '跟进',
|
|
467
|
-
duty_employee_list: item?.duty_employee_list||[],
|
|
468
|
-
follow_employee_list: item.follow_employee_list,
|
|
469
|
-
remark: item.name + `<div style='color: blue; font-size: 12px; background-color: #f5f5f5; padding: 4px 8px; border-radius: 3px;'>` + item?.answer + '</div>',
|
|
470
|
-
status: 'wait_feedback',
|
|
471
|
-
create_by: userId,
|
|
472
|
-
create_at: Date.now()
|
|
473
|
-
}
|
|
474
|
-
})
|
|
475
|
-
|
|
476
|
-
dataService.fetch({
|
|
477
|
-
saveData: {
|
|
478
|
-
...state.interviewFormData,
|
|
479
|
-
employee_interview_question_answer_record: interview_records,
|
|
480
|
-
taskList: taskList
|
|
481
|
-
}
|
|
482
|
-
},{
|
|
483
|
-
key: 'interview_record_save'
|
|
484
|
-
}).then(closeTalkSave)
|
|
485
|
-
|
|
486
|
-
}
|
|
487
|
-
function submitSuccess(event) {
|
|
488
|
-
emit('api_success')
|
|
489
|
-
}
|
|
490
|
-
function syncVal(eventArgs, args0, args1) {
|
|
491
|
-
args0[args1] = eventArgs[0]
|
|
492
|
-
}
|
|
493
|
-
function tabChange(event) {}
|
|
494
|
-
function openQuestion(eventArgs, args0) {
|
|
495
|
-
console.log(args0)
|
|
496
|
-
state.loading = true
|
|
497
|
-
dataService.fetch({
|
|
498
|
-
queryParams:{
|
|
499
|
-
interviewId: args0.id
|
|
500
|
-
}
|
|
501
|
-
},{
|
|
502
|
-
key: 'interview_question_record_get'
|
|
503
|
-
}).then((res) => {
|
|
504
|
-
state.nowQuestions = res?.data || []
|
|
505
|
-
state.questionShow = true
|
|
506
|
-
})
|
|
507
|
-
.finally(() => {
|
|
508
|
-
state.loading = false
|
|
509
|
-
})
|
|
510
|
-
}
|
|
511
|
-
function closeQuestion(event) {
|
|
512
|
-
state.questionShow = false
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
const openFollowListDialog=(item,index)=>{
|
|
516
|
-
state.selected_qs_index=index
|
|
517
|
-
state.showFollow=true
|
|
518
|
-
state.follow_employee_list=item?.follow_employee_list||[]
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
const saveQuestionFollow=()=>{
|
|
522
|
-
state.questionList[state.selected_qs_index].follow_employee_list=state.follow_employee_list
|
|
523
|
-
state.showFollow=false
|
|
524
|
-
}
|
|
525
|
-
</script>
|
|
526
|
-
<style scoped></style>
|
|
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
|
+
v-if="state.showTalkBox"
|
|
12
|
+
width="800"
|
|
13
|
+
header="员工访谈"
|
|
14
|
+
body="对话框内容"
|
|
15
|
+
mode="modal"
|
|
16
|
+
placement="center"
|
|
17
|
+
confirmBtn="确认"
|
|
18
|
+
cancelBtn="取消"
|
|
19
|
+
:footer="false"
|
|
20
|
+
class="component-base-style"
|
|
21
|
+
v-model:visible="state.showTalkBox"
|
|
22
|
+
@cancel="closeTalkSave"
|
|
23
|
+
@close="closeTalkSave"
|
|
24
|
+
@confirm="formatData"
|
|
25
|
+
>
|
|
26
|
+
<template #default>
|
|
27
|
+
<ebiz-tabs theme="normal" placement="top" size="medium" class="component-base-style" v-model="state.actTab">
|
|
28
|
+
<ebiz-tab-panel value="add" label="添加访谈" style="padding-top: 12px" @change="tabChange">
|
|
29
|
+
<t-form
|
|
30
|
+
layout="vertical"
|
|
31
|
+
labelAlign="right"
|
|
32
|
+
labelWidth="100px"
|
|
33
|
+
:showSubmitButton="false"
|
|
34
|
+
:showCancelButton="false"
|
|
35
|
+
ref="form"
|
|
36
|
+
:showButtons="true"
|
|
37
|
+
class="component-base-style"
|
|
38
|
+
:data="state.interviewFormData"
|
|
39
|
+
:rules="state.interviewFormRules"
|
|
40
|
+
>
|
|
41
|
+
<template #default="{ }">
|
|
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; font-size: 12px;" class="component-base-style"
|
|
106
|
+
>有问题</span
|
|
107
|
+
>
|
|
108
|
+
<ebiz-switch
|
|
109
|
+
size="small"
|
|
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 v-if="item.need_follow">
|
|
117
|
+
<ebiz-tdesign-button
|
|
118
|
+
theme="primary"
|
|
119
|
+
size="small"
|
|
120
|
+
content="跟进人"
|
|
121
|
+
class="component-base-style"
|
|
122
|
+
@click="openFollowListDialog(item,index)"
|
|
123
|
+
></ebiz-tdesign-button>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div></div>
|
|
127
|
+
<ebiz-s-form-item
|
|
128
|
+
label="审批"
|
|
129
|
+
name="approverList"
|
|
130
|
+
type="text"
|
|
131
|
+
:multiple="false"
|
|
132
|
+
:isRemote="false"
|
|
133
|
+
v-model="state.interviewFormData.approverList"
|
|
134
|
+
>
|
|
135
|
+
<template #default>
|
|
136
|
+
<ebiz-approval
|
|
137
|
+
workFlowKey="interview_record"
|
|
138
|
+
:id="0"
|
|
139
|
+
:required="true"
|
|
140
|
+
type="all"
|
|
141
|
+
limitedType="role"
|
|
142
|
+
:showRootOrg="true"
|
|
143
|
+
:childDeptEnable="false"
|
|
144
|
+
:showCC="true"
|
|
145
|
+
:canEdit="true"
|
|
146
|
+
style="width: 100%"
|
|
147
|
+
class="component-base-style"
|
|
148
|
+
v-model:approverList="state.interviewFormData.approverList"
|
|
149
|
+
v-model:ccList="state.interviewFormData.ccList"
|
|
150
|
+
v-model:data="state.interviewFormData"
|
|
151
|
+
:limitedMap="[]"
|
|
152
|
+
></ebiz-approval>
|
|
153
|
+
</template>
|
|
154
|
+
</ebiz-s-form-item>
|
|
155
|
+
</template>
|
|
156
|
+
</t-form>
|
|
157
|
+
<div
|
|
158
|
+
v-if="state.actTab == 'add'"
|
|
159
|
+
style="display: flex; justify-content: flex-end; gap: 10px"
|
|
160
|
+
class="component-base-style"
|
|
161
|
+
>
|
|
162
|
+
<ebiz-tdesign-button
|
|
163
|
+
theme="default"
|
|
164
|
+
size="medium"
|
|
165
|
+
content="取消"
|
|
166
|
+
class="component-base-style"
|
|
167
|
+
@click="closeTalkSave"
|
|
168
|
+
></ebiz-tdesign-button>
|
|
169
|
+
<ebiz-tdesign-button
|
|
170
|
+
content="确定"
|
|
171
|
+
theme="primary"
|
|
172
|
+
size="medium"
|
|
173
|
+
class="component-base-style"
|
|
174
|
+
@click="formatData"
|
|
175
|
+
></ebiz-tdesign-button></div
|
|
176
|
+
></ebiz-tab-panel>
|
|
177
|
+
<ebiz-tab-panel value="history" label="历史访谈">
|
|
178
|
+
<ebiz-s-data
|
|
179
|
+
:pageEnable="true"
|
|
180
|
+
:size="10"
|
|
181
|
+
fetchUrl=""
|
|
182
|
+
:split="true"
|
|
183
|
+
:stripe="false"
|
|
184
|
+
:async="false"
|
|
185
|
+
:defaultSearch="false"
|
|
186
|
+
:showDivider="false"
|
|
187
|
+
:showPageHeader="false"
|
|
188
|
+
labelKey="table"
|
|
189
|
+
class="component-base-style"
|
|
190
|
+
:defaultParams="state.gridParams"
|
|
191
|
+
:apiConfig="{ key: 'interview_record_get', apiId: 3007, apiType: 0 }"
|
|
192
|
+
>
|
|
193
|
+
<template #default="{ data }">
|
|
194
|
+
<Ttable
|
|
195
|
+
:data="data"
|
|
196
|
+
:columns="state.columns"
|
|
197
|
+
row-key="id"
|
|
198
|
+
></Ttable></template>
|
|
199
|
+
</ebiz-s-data></ebiz-tab-panel></ebiz-tabs></template
|
|
200
|
+
></ebiz-dialog>
|
|
201
|
+
<ebiz-dialog
|
|
202
|
+
:zIndex="5000"
|
|
203
|
+
width="700"
|
|
204
|
+
header="问题列表"
|
|
205
|
+
body="对话框内容"
|
|
206
|
+
mode="modal"
|
|
207
|
+
placement="center"
|
|
208
|
+
confirmBtn="确认"
|
|
209
|
+
cancelBtn="取消"
|
|
210
|
+
:footer="false"
|
|
211
|
+
class="component-base-style"
|
|
212
|
+
v-model:visible="state.questionShow"
|
|
213
|
+
@close="closeQuestion"
|
|
214
|
+
>
|
|
215
|
+
<template #default>
|
|
216
|
+
<div style="display: flex; flex-direction: column; gap: 12px" class="component-base-style">
|
|
217
|
+
<div v-for="(item, index) in state.nowQuestions" class="component-base-style" :key="index">
|
|
218
|
+
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 8px" class="component-base-style">
|
|
219
|
+
<span
|
|
220
|
+
style="display: inline-block; font-size: 16px; color: #333; margin-right: auto"
|
|
221
|
+
class="component-base-style"
|
|
222
|
+
>{{ `${index + 1}. ${item?.question_id_info?.name}` }}</span
|
|
223
|
+
>
|
|
224
|
+
</div>
|
|
225
|
+
<div style="display: flex; gap: 10px; align-items: center" class="component-base-style">
|
|
226
|
+
<span style="display: inline-block; white-space: nowrap" class="component-base-style">访谈情况:</span>
|
|
227
|
+
<span style="display: inline-block" class="component-base-style">{{ item?.content }}</span>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
</div></template
|
|
231
|
+
></ebiz-dialog
|
|
232
|
+
>
|
|
233
|
+
|
|
234
|
+
<ebiz-dialog
|
|
235
|
+
:zIndex="5500"
|
|
236
|
+
width="500"
|
|
237
|
+
header="跟进人"
|
|
238
|
+
body="对话框内容"
|
|
239
|
+
mode="modal"
|
|
240
|
+
placement="center"
|
|
241
|
+
confirmBtn="确认"
|
|
242
|
+
cancelBtn="取消"
|
|
243
|
+
:footer="true"
|
|
244
|
+
class="component-base-style"
|
|
245
|
+
v-model:visible="state.showFollow">
|
|
246
|
+
<template #default>
|
|
247
|
+
<ebiz-employee-selector
|
|
248
|
+
:single="false"
|
|
249
|
+
defaultTab="organization"
|
|
250
|
+
content="请选择跟进人"
|
|
251
|
+
class="component-base-style"
|
|
252
|
+
v-model="state.follow_employee_list">
|
|
253
|
+
</ebiz-employee-selector>
|
|
254
|
+
</template>
|
|
255
|
+
<template #footer>
|
|
256
|
+
<ebiz-tdesign-button
|
|
257
|
+
content="确定"
|
|
258
|
+
theme="primary"
|
|
259
|
+
size="medium"
|
|
260
|
+
class="component-base-style"
|
|
261
|
+
@click="saveQuestionFollow"
|
|
262
|
+
></ebiz-tdesign-button>
|
|
263
|
+
</template>
|
|
264
|
+
</ebiz-dialog>
|
|
265
|
+
</div>
|
|
266
|
+
</template>
|
|
267
|
+
|
|
268
|
+
<script setup lang="jsx">
|
|
269
|
+
import { Table as Ttable, Form as TForm} from 'tdesign-vue-next';
|
|
270
|
+
import EbizRemoteSelect from './EbizRemoteSelect.vue'
|
|
271
|
+
import EbizSwitch from './EbizSwitch.vue'
|
|
272
|
+
import EbizTabs from './EbizTabs.vue'
|
|
273
|
+
import EbizTabPanel from './EbizTabPanel.vue'
|
|
274
|
+
import EbizTdesignButton from './TdesignButton.vue'
|
|
275
|
+
import EbizTextarea from './TdesignTextarea.vue'
|
|
276
|
+
import EbizDialog from './EbizDialog.vue'
|
|
277
|
+
import EbizSData from './senior/EbizSData/index.vue'
|
|
278
|
+
import EbizSForm from './senior/EbizSForm/index.vue'
|
|
279
|
+
import EbizSFormItem from './senior/EbizSForm/item.vue'
|
|
280
|
+
import EbizTag from './TdesignTag.vue'
|
|
281
|
+
import * as vue from 'vue'
|
|
282
|
+
import dataService from '../apiService/simpleDataService';
|
|
283
|
+
import EbizEmployeeSelector from './EbizEmployeeSelector.vue'
|
|
284
|
+
import EbizApproval from './EbizApproval.vue'
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
const props = defineProps({
|
|
288
|
+
employeeId: { type: Number, default: 0 },
|
|
289
|
+
no: { type: String, default: '' },
|
|
290
|
+
btnText: { type: String, default: '' },
|
|
291
|
+
kind: { type: String, default: 'DAILY' },
|
|
292
|
+
name: { type: String, default: '' }
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
const {employeeId}=vue.toRefs(props)
|
|
296
|
+
|
|
297
|
+
const emit = defineEmits(['api-success'])
|
|
298
|
+
const form = vue.ref(null)
|
|
299
|
+
|
|
300
|
+
const state = vue.reactive({
|
|
301
|
+
columns: [
|
|
302
|
+
{ colKey: 'serial-number', width: 60 },
|
|
303
|
+
{ colKey: 'employee_id_info.name', title: '员工', cell: 'employee_idSlot' },
|
|
304
|
+
{ colKey: 'create_by_info.name', title: '创建人', cell: 'create_bySlot' },
|
|
305
|
+
{
|
|
306
|
+
colKey: 'type_id',
|
|
307
|
+
title: '访谈类型',
|
|
308
|
+
cell: 'type_idSlot',
|
|
309
|
+
slots: {},
|
|
310
|
+
cell: (h,{ row }) => {
|
|
311
|
+
return <EbizTag>{row?.type_id_info?.name}</EbizTag>
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{ colKey: 'interview_time', title: '访谈日期', cell:(h,{row})=>{
|
|
315
|
+
return calcTime(row.interview_time, 'y-M-d')
|
|
316
|
+
}},
|
|
317
|
+
{
|
|
318
|
+
title: '操作',
|
|
319
|
+
colKey: 'ops',
|
|
320
|
+
slots: {},
|
|
321
|
+
cell: (h,{ row }) => {
|
|
322
|
+
return (
|
|
323
|
+
<EbizTdesignButton
|
|
324
|
+
variant="text"
|
|
325
|
+
theme="primary"
|
|
326
|
+
size="medium"
|
|
327
|
+
content="访谈情况"
|
|
328
|
+
ghost={false}
|
|
329
|
+
class="component-base-style"
|
|
330
|
+
loading={state.loading}
|
|
331
|
+
disabled={state.loading}
|
|
332
|
+
onClick={(...eventArgs) => openQuestion(eventArgs, row)}
|
|
333
|
+
></EbizTdesignButton>
|
|
334
|
+
)
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
showTalkBox: false,
|
|
339
|
+
actTab: 'add',
|
|
340
|
+
interviewFormData: { type_id: '', interview_time: '', content: [] },
|
|
341
|
+
interviewFormRules: {
|
|
342
|
+
interview_time: [{ required: true, message: '请选择访谈日期' }],
|
|
343
|
+
type_id: [{ required: true, message: '请选择访谈类型' }],
|
|
344
|
+
approverList: [{ required: true, message: '请选择审批人' }]
|
|
345
|
+
},
|
|
346
|
+
questionList: [],
|
|
347
|
+
queryParams: {
|
|
348
|
+
name: props.name,
|
|
349
|
+
kind: props.kind,
|
|
350
|
+
status: true
|
|
351
|
+
},
|
|
352
|
+
gridParams: vue.computed(() => ({ employee: employeeId.value })),
|
|
353
|
+
loading: false,
|
|
354
|
+
nowQuestions: [],
|
|
355
|
+
questionShow: false,
|
|
356
|
+
showFollow: false,
|
|
357
|
+
follow_employee_list: [],
|
|
358
|
+
selected_qs_index: 0
|
|
359
|
+
})
|
|
360
|
+
function calcTime(timeStr = 0, type = null, dontFill = false) {
|
|
361
|
+
if (!timeStr) return '-';
|
|
362
|
+
let time = timeStr;
|
|
363
|
+
time *= String(time).length < 13 ? 1000 : 1;
|
|
364
|
+
const date = new Date(time);
|
|
365
|
+
const year = date.getFullYear();
|
|
366
|
+
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
367
|
+
let day = date.getDate().toString().padStart(2, '0');
|
|
368
|
+
let hour = date.getHours().toString().padStart(2, '0');
|
|
369
|
+
let min = date.getMinutes().toString().padStart(2, '0');
|
|
370
|
+
let sec = date.getSeconds().toString().padStart(2, '0');
|
|
371
|
+
if (dontFill) {
|
|
372
|
+
month = Number(month) + '';
|
|
373
|
+
day = Number(day) + '';
|
|
374
|
+
hour = Number(hour) + '';
|
|
375
|
+
min = Number(min) + '';
|
|
376
|
+
sec = Number(sec) + '';
|
|
377
|
+
}
|
|
378
|
+
if (!type) return `${year}-${month}-${day} ${hour}:${min}:${sec}`;
|
|
379
|
+
try {
|
|
380
|
+
return Array.from(type).map(i => {
|
|
381
|
+
switch (i) {
|
|
382
|
+
case 'y':
|
|
383
|
+
return year;
|
|
384
|
+
case 'M':
|
|
385
|
+
return month;
|
|
386
|
+
case 'd':
|
|
387
|
+
return day;
|
|
388
|
+
case 'h':
|
|
389
|
+
return hour;
|
|
390
|
+
case 'm':
|
|
391
|
+
return min;
|
|
392
|
+
case 's':
|
|
393
|
+
return sec;
|
|
394
|
+
default:
|
|
395
|
+
return i;
|
|
396
|
+
}
|
|
397
|
+
}).join('');
|
|
398
|
+
} catch (err) {
|
|
399
|
+
return `${year}:${month}:${day} ${hour}:${min}:${sec}`
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
function openTalkDialog(event) {
|
|
403
|
+
let {userId} = JSON.parse(localStorage.getItem('user') || '{}')
|
|
404
|
+
state.interviewFormData = {
|
|
405
|
+
employee_id: props.employeeId,
|
|
406
|
+
no: props.no,
|
|
407
|
+
create_by: userId,
|
|
408
|
+
|
|
409
|
+
interview_time: '',
|
|
410
|
+
interview_content: '',
|
|
411
|
+
files: []
|
|
412
|
+
}
|
|
413
|
+
state.showTalkBox = true
|
|
414
|
+
}
|
|
415
|
+
function closeTalkSave(event) {
|
|
416
|
+
state.actTab = 'add'
|
|
417
|
+
state.questionList = []
|
|
418
|
+
state.showTalkBox = false
|
|
419
|
+
}
|
|
420
|
+
function calcQuestion(type_id) {
|
|
421
|
+
state.questionList = []
|
|
422
|
+
dataService.fetch({
|
|
423
|
+
queryParams:{
|
|
424
|
+
type_id
|
|
425
|
+
}
|
|
426
|
+
},{
|
|
427
|
+
key: 'interview_question_get'
|
|
428
|
+
}).then((res) => {
|
|
429
|
+
state.questionList = (res?.data || []).map((i) => {
|
|
430
|
+
return {
|
|
431
|
+
...i,
|
|
432
|
+
need_follow: false,
|
|
433
|
+
answer: ''
|
|
434
|
+
}
|
|
435
|
+
})
|
|
436
|
+
})
|
|
437
|
+
}
|
|
438
|
+
async function formatData(event) {
|
|
439
|
+
console.log('questionList',state.questionList)
|
|
440
|
+
let {userId} = JSON.parse(localStorage.getItem('user') || '{}')
|
|
441
|
+
let valid = await form.value.validate()
|
|
442
|
+
if (valid !== true) return false
|
|
443
|
+
state.interviewFormData.content = state.questionList.map((i) => {
|
|
444
|
+
return {
|
|
445
|
+
question_id: i.id,
|
|
446
|
+
need_follow: i.need_follow,
|
|
447
|
+
answer: i.answer
|
|
448
|
+
}
|
|
449
|
+
})
|
|
450
|
+
|
|
451
|
+
const interview_records=state.questionList.map((item)=>{
|
|
452
|
+
return {
|
|
453
|
+
question_id: item.id,
|
|
454
|
+
employee: props.employeeId,
|
|
455
|
+
content: item.answer,
|
|
456
|
+
is_follow_task: Number(item.need_follow),
|
|
457
|
+
need_follow: item.need_follow,
|
|
458
|
+
follow_status: 'ing'
|
|
459
|
+
}
|
|
460
|
+
})
|
|
461
|
+
|
|
462
|
+
const taskList=state.questionList.filter((item)=>item.need_follow).map((item)=>{
|
|
463
|
+
return {
|
|
464
|
+
source: 'follow_task',
|
|
465
|
+
question_id: item.id,
|
|
466
|
+
title: item?.type_id_info?.name + '跟进',
|
|
467
|
+
duty_employee_list: item?.duty_employee_list||[],
|
|
468
|
+
follow_employee_list: item.follow_employee_list,
|
|
469
|
+
remark: item.name + `<div style='color: blue; font-size: 12px; background-color: #f5f5f5; padding: 4px 8px; border-radius: 3px;'>` + item?.answer + '</div>',
|
|
470
|
+
status: 'wait_feedback',
|
|
471
|
+
create_by: userId,
|
|
472
|
+
create_at: Date.now()
|
|
473
|
+
}
|
|
474
|
+
})
|
|
475
|
+
|
|
476
|
+
dataService.fetch({
|
|
477
|
+
saveData: {
|
|
478
|
+
...state.interviewFormData,
|
|
479
|
+
employee_interview_question_answer_record: interview_records,
|
|
480
|
+
taskList: taskList
|
|
481
|
+
}
|
|
482
|
+
},{
|
|
483
|
+
key: 'interview_record_save'
|
|
484
|
+
}).then(closeTalkSave)
|
|
485
|
+
|
|
486
|
+
}
|
|
487
|
+
function submitSuccess(event) {
|
|
488
|
+
emit('api_success')
|
|
489
|
+
}
|
|
490
|
+
function syncVal(eventArgs, args0, args1) {
|
|
491
|
+
args0[args1] = eventArgs[0]
|
|
492
|
+
}
|
|
493
|
+
function tabChange(event) {}
|
|
494
|
+
function openQuestion(eventArgs, args0) {
|
|
495
|
+
console.log(args0)
|
|
496
|
+
state.loading = true
|
|
497
|
+
dataService.fetch({
|
|
498
|
+
queryParams:{
|
|
499
|
+
interviewId: args0.id
|
|
500
|
+
}
|
|
501
|
+
},{
|
|
502
|
+
key: 'interview_question_record_get'
|
|
503
|
+
}).then((res) => {
|
|
504
|
+
state.nowQuestions = res?.data || []
|
|
505
|
+
state.questionShow = true
|
|
506
|
+
})
|
|
507
|
+
.finally(() => {
|
|
508
|
+
state.loading = false
|
|
509
|
+
})
|
|
510
|
+
}
|
|
511
|
+
function closeQuestion(event) {
|
|
512
|
+
state.questionShow = false
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const openFollowListDialog=(item,index)=>{
|
|
516
|
+
state.selected_qs_index=index
|
|
517
|
+
state.showFollow=true
|
|
518
|
+
state.follow_employee_list=item?.follow_employee_list||[]
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const saveQuestionFollow=()=>{
|
|
522
|
+
state.questionList[state.selected_qs_index].follow_employee_list=state.follow_employee_list
|
|
523
|
+
state.showFollow=false
|
|
524
|
+
}
|
|
525
|
+
</script>
|
|
526
|
+
<style scoped></style>
|