3131
3232 <!-- 右侧控制按钮和时间 -->
3333 <div class =" header-right" >
34- <a-button type =" outline" status =" success" shape =" round" @click =" minimize " >
34+ <a-button type =" outline" status =" success" shape =" round" @click =" handlePush " >
3535 <template #icon >
36- <icon-bug />
36+ <icon-send />
3737 </template >
38- <template #default >调试 </template >
38+ <template #default >推送 </template >
3939 </a-button >
4040
41- <a-button type =" outline" status =" success" shape =" round" @click =" maximize " >
41+ <a-button type =" outline" status =" success" shape =" round" @click =" handleGlobalAction " >
4242 <template #icon >
43- <icon-settings />
43+ <icon-thunderbolt />
4444 </template >
45- <template #default >设置</template >
46- </a-button >
47-
48- <a-button type =" outline" status =" success" shape =" round" @click =" closeWindow" >
49- <template #icon >
50- <icon-user />
51- </template >
52- <template #default >用户设置</template >
45+ <template #default >全局动作</template >
5346 </a-button >
5447
5548 <!-- 时间显示插槽 -->
5649 <slot name =" default" ></slot >
5750 </div >
5851 </div >
52+
53+ <!-- 推送内容输入弹窗 -->
54+ <a-modal
55+ v-model:visible =" showPushModal"
56+ title =" 推送内容"
57+ :width =" 600"
58+ @ok =" confirmPush"
59+ @cancel =" cancelPush"
60+ ok-text =" 确认推送"
61+ cancel-text =" 取消"
62+ :ok-button-props =" { disabled: !pushContent.trim() }"
63+ >
64+ <div class =" push-modal-content" >
65+ <div class =" push-description" >
66+ <icon-send class =" push-icon" />
67+ <span >请输入要推送的内容(vod_id):</span >
68+ </div >
69+ <a-textarea
70+ v-model =" pushContent"
71+ placeholder =" 请输入要推送的内容...
 ; 支持多行输入,每行一个vod_id"
72+ :rows =" 6"
73+ :max-length =" 1000"
74+ show-word-limit
75+ allow-clear
76+ autofocus
77+ class =" push-textarea"
78+ />
79+ <div class =" push-hint" >
80+ <div class =" hint-item" >
81+ <icon-info-circle class =" hint-icon" />
82+ <span >输入的内容将作为vod_id调用push_agent源的详情接口</span >
83+ </div >
84+ <div class =" hint-item" >
85+ <icon-bulb class =" hint-icon" />
86+ <span >支持多行输入,系统将使用第一行非空内容作为vod_id</span >
87+ </div >
88+ </div >
89+ </div >
90+ </a-modal >
5991</template >
6092
6193<script setup>
6294import { ref } from ' vue'
95+ import { Message , Modal } from ' @arco-design/web-vue'
6396
6497const props = defineProps ({
6598 navigation_title: {
@@ -71,14 +104,14 @@ const props = defineProps({
71104});
72105const emit = defineEmits ([
73106 " handleOpenForm" ,
74- " closeWindow" ,
75- " maximize" ,
76- " minimize" ,
77107 " refreshPage" ,
78108 " onSearch" ,
109+ " handlePush" ,
79110]);
80111
81112const searchValue = ref (' ' )
113+ const showPushModal = ref (false )
114+ const pushContent = ref (' ' )
82115
83116const handleOpenForm = () => {
84117 emit (" handleOpenForm" );
@@ -94,14 +127,53 @@ const onSearch = (value) => {
94127 }
95128};
96129
97- const closeWindow = () => {
98- emit (" closeWindow" );
130+ // 推送按钮点击事件
131+ const handlePush = () => {
132+ showPushModal .value = true
133+ pushContent .value = ' '
99134};
100- const minimize = () => {
101- emit (" minimize" );
135+
136+ // 全局动作按钮点击事件
137+ const handleGlobalAction = () => {
138+ Message .info ({
139+ content: ' 全局动作功能开发中,敬请期待!' ,
140+ duration: 3000
141+ })
102142};
103- const maximize = () => {
104- emit (" maximize" );
143+
144+ // 确认推送
145+ const confirmPush = () => {
146+ if (! pushContent .value .trim ()) {
147+ Message .error (' 推送内容不能为空' );
148+ return ;
149+ }
150+
151+ // 处理多行输入,取第一行非空内容作为vod_id
152+ const lines = pushContent .value .split (' \n ' ).map (line => line .trim ()).filter (line => line);
153+
154+ if (lines .length === 0 ) {
155+ Message .error (' 请输入有效的推送内容' );
156+ return ;
157+ }
158+
159+ const vodId = lines[0 ]; // 使用第一行非空内容
160+
161+ if (lines .length > 1 ) {
162+ Message .info (` 检测到多行输入,将使用第一行内容: ${ vodId} ` );
163+ }
164+
165+ // 触发推送事件,传递处理后的vod_id
166+ emit (' handlePush' , vodId);
167+
168+ // 关闭弹窗并清空内容
169+ showPushModal .value = false ;
170+ pushContent .value = ' ' ;
171+ };
172+
173+ // 取消推送
174+ const cancelPush = () => {
175+ showPushModal .value = false
176+ pushContent .value = ' '
105177};
106178 </script >
107179
@@ -171,6 +243,76 @@ const maximize = () => {
171243 margin-left : 8px ;
172244}
173245
246+ /* 推送弹窗样式 */
247+ .push-modal-content {
248+ padding : 20px 0 ;
249+ }
250+
251+ .push-description {
252+ display : flex ;
253+ align-items : center ;
254+ margin-bottom : 20px ;
255+ font-size : 16px ;
256+ color : var (--color-text-1 );
257+ font-weight : 500 ;
258+ }
259+
260+ .push-icon {
261+ margin-right : 8px ;
262+ font-size : 18px ;
263+ color : var (--color-primary-6 );
264+ }
265+
266+ .push-textarea {
267+ margin-bottom : 16px ;
268+ }
269+
270+ .push-textarea :deep(.arco-textarea ) {
271+ border-radius : 8px ;
272+ border : 2px solid var (--color-border-2 );
273+ transition : all 0.3s ease ;
274+ font-family : ' Consolas' , ' Monaco' , ' Courier New' , monospace ;
275+ line-height : 1.6 ;
276+ }
277+
278+ .push-textarea :deep(.arco-textarea :focus ) {
279+ border-color : var (--color-primary-6 );
280+ box-shadow : 0 0 0 3px var (--color-primary-1 );
281+ }
282+
283+ .push-textarea :deep(.arco-textarea ::placeholder ) {
284+ color : var (--color-text-3 );
285+ font-style : italic ;
286+ }
287+
288+ .push-hint {
289+ background : var (--color-bg-2 );
290+ border-radius : 8px ;
291+ padding : 16px ;
292+ border-left : 4px solid var (--color-primary-6 );
293+ }
294+
295+ .hint-item {
296+ display : flex ;
297+ align-items : flex-start ;
298+ margin-bottom : 8px ;
299+ font-size : 14px ;
300+ color : var (--color-text-2 );
301+ line-height : 1.5 ;
302+ }
303+
304+ .hint-item :last-child {
305+ margin-bottom : 0 ;
306+ }
307+
308+ .hint-icon {
309+ margin-right : 8px ;
310+ margin-top : 2px ;
311+ font-size : 16px ;
312+ color : var (--color-primary-6 );
313+ flex-shrink : 0 ;
314+ }
315+
174316/* 响应式设计 */
175317@media (max-width : 1200px ) {
176318 .header-center :deep(.arco-input-search ) {
0 commit comments