operation-cb0faa15.js 9.6 KB

1
  1. import{D as Y,aa as N,af as L,q as Q,ag as E,d as k,j as Z,H as z,w as T,ah as D,g as e,K as X,ai as W,C as H,i as V,h as u,B as h,o as $,M as tt,I as S,P as y,aj as et,O as at,a as ot}from"./index-7ceda0c5.js";import{b as x,d as F}from"./constant-0aa14c42.js";import{M as nt}from"./index-23cc4e8d.js";import{R as M,a as U,i as rt,M as lt,b as ut}from"./inside-fa6031cd.js";import{M as st}from"./index-f1fd22ef.js";import{F as i}from"./index-f8be94d8.js";import{p as j,P}from"./index-c12ae9aa.js";import{C as I}from"./index-7c74e5df.js";import{T as G}from"./index-2f7ddffb.js";import{C as it}from"./index-1da83643.js";import"./index-b5895856.js";import"./use-tab-status-9c167ad6.js";import"./Checker-24840c4d.js";const ct=Y({},j,{modelValue:N(),filter:Function,formatter:{type:Function,default:(t,r)=>r}}),pt=Object.keys(j);function mt(t,r){if(t<0)return[];const o=Array(t);let n=-1;for(;++n<t;)o[n]=r(n);return o}const dt=(t,r)=>32-new Date(t,r-1,32).getDate(),b=(t,r,o,n,c)=>{const p=mt(r-t+1,d=>{const g=L(t+d);return n(o,{text:g,value:g})});return c?c(o,p):p},gt=(t,r)=>t.map((o,n)=>{const c=r[n];if(c.length){const p=+c[c.length-1].value;if(+o>p)return String(p)}return o}),v=new Date().getFullYear(),[ht]=Q("date-picker"),At=Y({},ct,{columnsType:{type:Array,default:()=>["year","month","day"]},minDate:{type:Date,default:()=>new Date(v-10,0,1),validator:E},maxDate:{type:Date,default:()=>new Date(v+10,11,31),validator:E}});var ft=k({name:ht,props:At,emits:["confirm","cancel","change","update:modelValue"],setup(t,{emit:r,slots:o}){const n=Z(t.modelValue),c=()=>{const a=t.minDate.getFullYear(),s=t.maxDate.getFullYear();return b(a,s,"year",t.formatter,t.filter)},p=a=>a===t.minDate.getFullYear(),d=a=>a===t.maxDate.getFullYear(),g=a=>a===t.minDate.getMonth()+1,O=a=>a===t.maxDate.getMonth()+1,A=a=>{const{minDate:s,columnsType:m}=t,f=m.indexOf(a),w=n.value[f];if(w)return+w;switch(a){case"year":return s.getFullYear();case"month":return s.getMonth()+1;case"day":return s.getDate()}},K=()=>{const a=A("year"),s=p(a)?t.minDate.getMonth()+1:1,m=d(a)?t.maxDate.getMonth()+1:12;return b(s,m,"month",t.formatter,t.filter)},q=()=>{const a=A("year"),s=A("month"),m=p(a)&&g(s)?t.minDate.getDate():1,f=d(a)&&O(s)?t.maxDate.getDate():dt(a,s);return b(m,f,"day",t.formatter,t.filter)},C=z(()=>t.columnsType.map(a=>{switch(a){case"year":return c();case"month":return K();case"day":return q();default:return[]}}));T(n,a=>{D(a,t.modelValue)||r("update:modelValue",a)}),T(()=>t.modelValue,a=>{a=gt(a,C.value),D(a,n.value)||(n.value=a)},{immediate:!0});const _=(...a)=>r("change",...a),B=(...a)=>r("cancel",...a),J=(...a)=>r("confirm",...a);return()=>e(P,X({modelValue:n.value,"onUpdate:modelValue":a=>n.value=a,columns:C.value,onChange:_,onCancel:B,onConfirm:J},W(t,pt)),o)}});const yt=H(ft),bt="_topCellGroup_7kjdw_1",kt="_programType_7kjdw_12",Ct="_searchTypeFlex_7kjdw_18",wt="_small_7kjdw_21",Et="_iconImg_7kjdw_66",Tt="_topTitle_7kjdw_69",Dt="_programTimer_7kjdw_75",St="_addButtonGroup_7kjdw_92",xt="_addButton_7kjdw_92",Ft="_bottonGroup_7kjdw_101",Mt="_popupContainer_7kjdw_106",Ut="_popupTitle_7kjdw_106",It="_popupTimer_7kjdw_115",l={topCellGroup:bt,programType:kt,searchTypeFlex:Ct,small:wt,iconImg:Et,topTitle:Tt,programTimer:Dt,addButtonGroup:St,addButton:xt,bottonGroup:Ft,popupContainer:Mt,popupTitle:Ut,popupTimer:It},Gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAABC1BMVEUAAAAs1q0kzLMEw7Ug0K9P5aUFw7Qm0q4w16tS5qUHxbMh0K822qtQ5aUGxLQj0a812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MbOvrgjFmX6aUWm7bIRGZWek13mjs7PUegE+u/RlpIkrEfwGY7o8MvkyFlAAAAABJRU5ErkJggg==",Rt=k({name:"input-timer",emits:["close","confirm"],setup(t,{emit:r}){const o=V({minute:null,secord:null});return()=>e("div",{class:l.popupContainer},[e("h2",{class:l.popupTitle},[u("请输入节目时长")]),e("div",{class:l.popupContent},[e("div",{class:l.popupTimer},[e(i,{modelValue:o.minute,"onUpdate:modelValue":n=>o.minute=n,type:"number"},null),u("分"),u("秒")])]),e("div",{class:["btnGroupPopup"]},[e(h,{round:!0,onClick:()=>r("close")},{default:()=>[u("取消")]}),e(h,{type:"primary",round:!0,onClick:()=>r("confirm")},{default:()=>[u("确定")]})])])}});function R(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!at(t)}const Zt=k({name:"operation-page",setup(){const t=V({timerStatus:!1,submitEvaluateStatus:null,currentDate:[],orchestraStatus:!1,orchestraColumns:[],programType:"",programTimerStatus:!0}),r=async()=>{try{const{data:o}=await ot.get("/api-web/cooperationOrgan/musicGroupPage");(o||[]).forEach(n=>{t.orchestraColumns.push({text:n.name,value:n.id})})}catch{}};return $(()=>{r()}),()=>e("div",{class:l.operation},[e(tt,null,null),e(I,{inset:!0,class:l.topCellGroup},{default:()=>[e(i,{isLink:!0,label:"活动日期",inputAlign:"right",readonly:!0,clearable:!1,onClick:()=>t.timerStatus=!0,placeholder:"请选择活动日期"},null),e(i,{label:"活动名称",inputAlign:"right",placeholder:"请填写活动名称",maxlength:25},null),e(i,{label:"活动名称",labelAlign:"top"},{input:()=>{let o;return e(M,{class:l.searchTypeFlex,modelValue:t.submitEvaluateStatus,"onUpdate:modelValue":n=>t.submitEvaluateStatus=n},R(o=Object.keys(x).map(n=>e(G,{type:t.submitEvaluateStatus===n?"primary":"default",round:!0},{default:()=>[e(U,{name:n},null),x[n]]})))?o:{default:()=>[o]})}})]}),e(I,{inset:!0,class:l.topCellGroup},{default:()=>[e(it,{center:!0},{icon:()=>e(S,{name:Gt,class:l.iconImg},null),title:()=>e("div",{class:l.topTitle},[u("节目二")]),value:()=>e(S,{name:vt,class:l.iconImg},null)}),e(i,{label:"节目名称",inputAlign:"right",placeholder:"请填写节目名称",maxlength:25},null),e(i,{label:"节目类型",inputAlign:"right",placeholder:"请填写节目",class:l.programType},{input:()=>{let o;return e(M,{class:[l.searchTypeFlex,l.small],modelValue:t.programType,"onUpdate:modelValue":n=>t.programType=n},R(o=Object.keys(F).map(n=>e(G,{type:t.programType===n?"primary":"default",round:!0},{default:()=>[e(U,{name:n},null),F[n]]})))?o:{default:()=>[o]})}}),e(i,{isLink:!0,label:"表演乐团",inputAlign:"right",readonly:!0,clearable:!1,onClick:()=>t.orchestraStatus=!0,placeholder:"请选择表演乐团"},null),e(i,{isLink:!0,label:"表演团队",inputAlign:"right",readonly:!0,clearable:!1,placeholder:"请选择表演团队"},null),e(i,{isLink:!0,label:"演员",inputAlign:"right",readonly:!0,clearable:!1,placeholder:"请选择演员"},null),e(i,{label:"节目时长",inputAlign:"right",onClick:()=>t.programTimerStatus=!0,placeholder:"请选择节目时长"},{input:()=>e("div",{class:l.programTimer},[e("span",null,[u("3")]),u("分"),e("span",null,[u("24")]),u("秒")])}),e(i,{label:"上传附件",labelAlign:"top"},{input:()=>e(nt,{uploadIcon:rt,maxCount:5,style:{marginTop:"4px"}},{default:()=>[e(lt,{uploadIcon:ut,uploadType:"VIDEO",accept:".mp4",maxCount:3},null)]})})]}),e("div",{class:l.addButtonGroup},[e(h,{icon:"plus",block:!0,type:"primary",plain:!0,class:l.addButton},{default:()=>[u("添加节目")]})]),e(st,{position:"bottom"},{default:()=>[e("div",{class:["btnGroupFixed",l.bottonGroup]},[e(h,{type:"primary",round:!0,block:!0},{default:()=>[u("确认")]})])]}),e(y,{show:t.timerStatus,"onUpdate:show":o=>t.timerStatus=o,round:!0,position:"bottom"},{default:()=>[e(yt,{modelValue:t.currentDate,"onUpdate:modelValue":o=>t.currentDate=o,formatter:et,onCancel:()=>t.timerStatus=!1},null)]}),e(y,{show:t.orchestraStatus,"onUpdate:show":o=>t.orchestraStatus=o,round:!0,position:"bottom"},{default:()=>[e(P,{columns:t.orchestraColumns,onCancel:()=>t.orchestraStatus=!1},null)]}),e(y,{show:t.programTimerStatus,"onUpdate:show":o=>t.programTimerStatus=o,round:!0,style:{width:"82%"}},{default:()=>[e(Rt,null,null)]})])}});export{Zt as default};