index-legacy-f6b9ad0d-1734950731618.js 13 KB

1
  1. System.register(["./contants-legacy-71300fc2-1734950731618.js","./index-legacy-4630884d-1734950731618.js","./Scrollbar-legacy-0b9059a1-1734950731618.js"],(function(e,a){"use strict";var t,n,r,i,l,o,s,d,c,_,u,p,h;return{setters:[e=>{t=e.a},e=>{n=e.d,r=e.e,i=e.r,l=e.A,o=e.U,s=e.q,d=e.f,c=e.W,_=e.F,u=e.k,p=e.aR},e=>{h=e.N}],execute:function(){var a=document.createElement("style");a.textContent="._nBaseCascaser_jdjr3_1{position:relative;z-index:auto;outline:none;width:100%;box-shadow:none;max-width:100%;display:inline-block;vertical-align:bottom;border-radius:.41666667vw;min-height:max(1.77083333vw,32Px);line-height:1.5;font-size:max(.72916667rem,13Px)}._nBaseCascaser_jdjr3_1:hover,._nBaseCascaser_jdjr3_1._nBaseCascaserActive_jdjr3_16{cursor:pointer}._nBaseCascaser_jdjr3_1:hover ._n-base-selection__state-border_jdjr3_19,._nBaseCascaser_jdjr3_1._nBaseCascaserActive_jdjr3_16 ._n-base-selection__state-border_jdjr3_19{z-index:1;border-color:#289bff}._nBaseCascaser_jdjr3_1 ._n-base-selection-tags_jdjr3_24{position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none;border:1px solid #e0e0e6;border-radius:inherit;transition:box-shadow .3s cubic-bezier(.4,0,.2,1),border-color .3s cubic-bezier(.4,0,.2,1)}._nBaseCascaser_jdjr3_1 ._n-base-selection-input_jdjr3_35{font-size:inherit;line-height:inherit;outline:none;cursor:pointer;box-sizing:border-box;border:none;width:100%;padding:0 1.35416667vw 0 .625vw;background-color:rgba(0,0,0,0);color:#333639;transition:color .3s cubic-bezier(.4,0,.2,1);caret-color:#18a058;height:100%;display:flex;align-items:center}._nBaseCascaser_jdjr3_1 ._n-base-selection-input_jdjr3_35 ._n-base-selection-input__content_jdjr3_52{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}._nBaseCascaser_jdjr3_1 ._n-base-suffix_jdjr3_57{cursor:pointer;position:absolute;top:50%;transform:translateY(-50%);right:.52083333vw}._nBaseCascaser_jdjr3_1 ._n-base-suffix_jdjr3_57 ._arrow_jdjr3_64{width:1em;height:1em}._nBaseCascaser_jdjr3_1 ._n-base-suffix_jdjr3_57 ._arrow_jdjr3_64 img{width:inherit;height:inherit}._nBaseCascaser_jdjr3_1 ._n-base-suffix_jdjr3_57 ._arrowSmall_jdjr3_72{margin-top:.10416667vw;width:9Px;height:5Px;display:flex;align-items:center}._nBaseCascaser_jdjr3_1 ._n-base-selection-placeholder_jdjr3_79{display:flex;align-items:center;white-space:nowrap;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:0 .625vw;transition:color .3s cubic-bezier(.4,0,.2,1);color:rgba(19,20,21,.4)}._nBaseCascaser_jdjr3_1 ._n-base-selection-placeholder_jdjr3_79 ._inner_jdjr3_93{max-width:100%;overflow:hidden}._nBaseCascaser_jdjr3_1 ._n-base-selection__border_jdjr3_97,._nBaseCascaser_jdjr3_1 ._n-base-selection__state-border_jdjr3_19{position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none;border:1px solid #e0e0e6;border-radius:inherit;transition:box-shadow .3s cubic-bezier(.4,0,.2,1),border-color .3s cubic-bezier(.4,0,.2,1)}._nBaseCascaser_jdjr3_1 ._n-base-selection__state-border_jdjr3_19{z-index:1;border-color:rgba(0,0,0,0)}._cascaderPopover_jdjr3_113{width:24.32291667vw;background:#FFFFFF!important;box-shadow:0 .10416667vw .625vw rgba(0,0,0,.12)!important;border-radius:.52083333vw!important;padding:.67708333vw 0 0!important}._baseScrollBar_jdjr3_120{padding:0 .67708333vw}._baseContentTitle_jdjr3_123{font-weight:600;font-size:max(.67708333rem,13Px);color:#131415;padding-bottom:.52083333vw}._baseContentWrap_jdjr3_129{padding-bottom:.78125vw;display:flex;align-items:center;flex-wrap:wrap;gap:.52083333vw}._baseContentWrap_jdjr3_129 ._tag_jdjr3_136{display:inline-block;background:#F5F6FA;border-radius:.15625vw;font-weight:400;font-size:max(.67708333rem,13Px);color:rgba(0,0,0,.6);padding:.15625vw .52083333vw;cursor:pointer}._baseContentWrap_jdjr3_129 ._tagActive_jdjr3_146{background:#D2ECFF;color:#131415}._btnGroup_jdjr3_150{border-top:1px solid #F2F2F2;padding:.72916667vw 1.30208333vw .83333333vw;display:flex;align-items:center;width:100%}._btnGroup_jdjr3_150 ._btn_jdjr3_150{background:#F1F2F6;border-radius:.26041667vw;font-weight:600;font-size:13Px;height:max(1.77083333vw,32Px);line-height:max(1.77083333vw,32Px);flex:1;text-align:center;cursor:pointer}._btnGroup_jdjr3_150 ._btn_jdjr3_150+._btn_jdjr3_150{margin-left:.88541667vw}._btnGroup_jdjr3_150 ._btnCancel_jdjr3_171{font-weight:600;color:#1e2022}._btnGroup_jdjr3_150 ._btnConfirm_jdjr3_175{background:linear-gradient(312deg,#1B7AF8 0%,#3CBBFF 100%);color:#fff}\n",document.head.appendChild(a);const A={nBaseCascaser:"_nBaseCascaser_jdjr3_1",nBaseCascaserActive:"_nBaseCascaserActive_jdjr3_16","n-base-selection__state-border":"_n-base-selection__state-border_jdjr3_19","n-base-selection-tags":"_n-base-selection-tags_jdjr3_24","n-base-selection-input":"_n-base-selection-input_jdjr3_35","n-base-selection-input__content":"_n-base-selection-input__content_jdjr3_52","n-base-suffix":"_n-base-suffix_jdjr3_57",arrow:"_arrow_jdjr3_64",arrowSmall:"_arrowSmall_jdjr3_72","n-base-selection-placeholder":"_n-base-selection-placeholder_jdjr3_79",inner:"_inner_jdjr3_93","n-base-selection__border":"_n-base-selection__border_jdjr3_97",cascaderPopover:"_cascaderPopover_jdjr3_113",baseScrollBar:"_baseScrollBar_jdjr3_120",baseContentTitle:"_baseContentTitle_jdjr3_123",baseContentWrap:"_baseContentWrap_jdjr3_129",tag:"_tag_jdjr3_136",tagActive:"_tagActive_jdjr3_146",btnGroup:"_btnGroup_jdjr3_150",btn:"_btn_jdjr3_150",btnCancel:"_btnCancel_jdjr3_171",btnConfirm:"_btnConfirm_jdjr3_175"},b=(e("C",n({name:"c-cascader",props:{showAudioPlayType:{type:Boolean,default:!1},childShowAllCheck:{type:Boolean,default:!0},value:{type:String,default:""},options:{type:Array,default:()=>[]},arrowType:{type:String,default:"default"},placeholder:{type:String,default:"请选择"},placement:{type:String,default:"bottom-start"},showPath:{type:Boolean,default:!1}},emits:["update:value","moreId"],setup(e,{emit:a}){const n=r({popoverShow:!1,selectParents:{},tempAudioPlayTypes:"",audioPlayTypes:"",tagActiveId:"",tagActive:{},childSelectId:null,x:0,y:0}),p=i([]),j=(e,a)=>{for(const t of a){if(e.includes(t.id)&&t.children&&t.children.length>0){let a;t.children.forEach((t=>{e.includes(t.id)&&(a=t.id)})),t.activeIndex=a}t.children&&t.children.length>0&&j(e,t.children)}},v=a=>{let t,r="";if(a.children){t=[...a.children];let i=t.length>0?t[0].id:"";e.childShowAllCheck&&(t.unshift({columnName:a.children[0].columnName,name:"全部"+a.children[0].columnName||"",id:""}),i=""),r=a.children[0].columnName,n.childSelectId=i,n.selectParents={...a,columnName:r,activeIndex:i,children:t}}else n.selectParents={}};l((()=>n.popoverShow),(()=>{if(!n.popoverShow||!e.value)return;let a=m(e.value,e.options);console.log(a,"ids"),n.tagActiveId=a[0].id,e.options.forEach((e=>{e.id===n.tagActiveId&&v(e)}));const t=a.findIndex((a=>a.id===e.value));a=a.slice(0,t+1);const r=a.map((e=>e.id));j(r,e.options)}));const g=o((()=>{const a=e.value,t=w(a),r=[];return p.value.forEach((a=>{a.id===n.tempAudioPlayTypes&&e.showAudioPlayType&&r.push(a.name)})),"SING"!==n.tempAudioPlayTypes&&t.forEach((e=>{r.push(e.name)})),e.showPath?r.join(" / "):r[r.length-1]})),m=(e,a,t=[])=>{for(const n of a){if(n.children&&n.children.length>0){const a=m(e,n.children,[...t,{name:n.name,id:n.id}]);if(a.findIndex((a=>a.id===e))>-1)return a}if(n.id===e)return[...t,{name:n.name,id:e}]}return t},w=a=>{let t=m(a,e.options);const n=t.findIndex((e=>e.id===a));return t=t.slice(0,n+1),t},C=()=>{const t=e.options[0],r=t.children?t.children[0]:null;console.log(t,"1111111"),n.childSelectId=r?.value,n.tagActiveId=r?.value||t.value||"",n.audioPlayTypes="",n.tempAudioPlayTypes="",n.selectParents={},a("update:value",r?.value||t.value||""),a("moreId",{childId:r?.value,parentId:t.value,audioPlayTypes:""}),n.popoverShow=!1},f=()=>{"SING"!==n.audioPlayTypes?(a("update:value",n.childSelectId||n.tagActiveId),a("moreId",{childId:n.childSelectId,parentId:n.tagActiveId,audioPlayTypes:n.audioPlayTypes})):(a("update:value",""),a("moreId",{childId:"",parentId:"",audioPlayTypes:n.audioPlayTypes})),n.tempAudioPlayTypes=n.audioPlayTypes,n.popoverShow=!1};return s((()=>{const e=Object.keys(t).map((e=>({id:e,name:t[e]})));p.value=[{name:"全部场景",id:""},...e]})),()=>d(_,null,[d(c,{placement:e.placement,show:n.popoverShow,"onUpdate:show":e=>n.popoverShow=e,showArrow:!1,trigger:"click",displayDirective:"show",class:[A.cascaderPopover,"c-cascaderPopover"]},{trigger:()=>d("div",{class:[A.nBaseCascaser,"nBaseCascaser",n.popoverShow?A.nBaseCascaserActive:""],title:g.value},[d("div",{class:[A["n-base-selection-tags"],"n-base-selection-tags"]},[d("div",{class:A["n-base-selection-input"]},[d("div",{class:A["n-base-selection-input__content"]},[g.value])]),d("div",{class:[A["n-base-suffix"]]},[d("div",{class:[A.arrow,"small"===e.arrowType?A.arrowSmall:""]},["default"===e.arrowType&&d("img",{src:n.popoverShow?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAaCAYAAACtv5zzAAAAAXNSR0IArs4c6QAAANtJREFUSEvt0zFOAkEYQOFv7eEi9iba0GLlDextKNUbECmpuIItFSWNmnANPIEWtoZkJ5LJDv9AQuVOs8Vm3tt5/2zjzKs5M18vCAv/r0TXmLdNJvgI+1B9i26wwqCFfuMWb5GkZgY5PDGrJJGgBK+WHBJ0wZ9a8stemoMnKQlK8FkLfkQuGeM9n0mXIIInRpUkF9TCqyX7gmPhVZIkGGKL3TOt3UBT8+i657m+cInPJBhhfSK8dJI7LJPgAq+4whSL6JML7x/wjA3u8RP9aCd6/rb1gjBhnyhM9As5gjEbhIMMwQAAAABJRU5ErkJggg==":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAaCAYAAACtv5zzAAAAAXNSR0IArs4c6QAAANZJREFUSEvtkzEKwkAQRV9AO1vR0trKysbKRvAAHtEbCDa2NlZWHkEUb6BFZCAry7LZmQ2kkU2ZzL6X+TNb0fNT9cynCNSE/yeiAbAGxsAVuKm9xwvmwAJ4ASegdhHNgI135tKIcjwCXnoHDsDdCUbADhh2lITwD7AH3v6Qp8C2gyQGPwIP+dlwi3IlSXhMIO+sEhXeJrBITPCUICWRb/62yEB/mYdrp93kWFw+IwnXOnCgNokKtwpicZngOQKpnQCrpq0z8LRcc20GFkaypgjUCEtEakRfjkkxG9oSzTgAAAAASUVORK5CYII="},null),"small"===e.arrowType&&d("img",{src:n.popoverShow?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAKCAYAAAC5Sw6hAAAAAXNSR0IArs4c6QAAAQBJREFUKFOVkbFOAkEQhuffCx3l7VwsNCY8wnZUNNjwCMbnMBRWJob3MD4CjTRUdvsIJEYLs7NX0pHbMUdOgnocMN1kvvlmMgM6Esx8UyMi8tqFoquYM99q0ueagcFdKfJyiD8oYuZxlXRORL2meZMZTERk0SZrFeX5hSNUS1Xt7zcBWJNmo7L88n9l/0TMPEhKb6rKrZMBMaChiKx+DdlPiqLgKmktGXQeFlhlBsMQgvxwu42stX1VWiqRO/bJ7fGJPECjGOO6yYmcc733j885qY5PkewYYHF9dTnx3m+2G1lbzJKm+7MkDWxgZjGGaSOy06T0SETZmbJkYB5iDE/f85tbC9QPlh0AAAAASUVORK5CYII=":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAKCAYAAAC5Sw6hAAAAAXNSR0IArs4c6QAAAQdJREFUKFOVkSFuw0AQRf+sFGApwCgX6BHCgkJSEm5S1Wx3rhBVKiqIegR7mKsS85CGBJXlCLlAkUEkg6i77VR21aRx6g5Zzc7/b0d/CQBE5M57/wDAaN+3iOgdwL1zbklqyrJsCWDRF/BTR0SPzrlFCxoQ0SqEMPsPjIjWIYQ5Mx++QFplWQ6rqtqEEMZ9YES0jeN4miTJXvXfIG2KohjVdf0K4OoP2C6Kokmapm+t7gjU5KUQhY06YGqeMPPuKKtzYhEZe+83AIYn870xZmqt3Z76fm3UCkRk5r1fARg0dwdjzNxauz73eCdIxXme33zm9dQYb51zz13ZXQQ1mV3rycwvlz7gA/q9UAsdpeSGAAAAAElFTkSuQmCC"},null)])])]),d("div",{class:[A["n-base-selection-placeholder"],A["n-base-selection-overlay"]]},[!g.value&&d("div",{class:A.inner},[e.placeholder])]),d("div",{class:[A["n-base-selection__border"],"n-base-selection__border"]},null),d("div",{class:A["n-base-selection__state-border"]},null)]),default:()=>d("div",{class:A.baseContent},[d(h,{class:A.baseScrollBar,style:{maxHeight:"400px"}},{default:()=>[e.showAudioPlayType&&d(_,null,[d("div",{class:A.baseContentTitle},[u("场景")]),d("div",{class:A.baseContentWrap},[p.value.map((e=>d("span",{class:[A.tag,(n.audioPlayTypes||"")==e.id&&A.tagActive],onClick:()=>{n.audioPlayTypes!==e.id&&(n.childSelectId=null),n.audioPlayTypes=e.id}},[e.name])))])]),"SING"!==n.audioPlayTypes&&d(_,null,[d("div",{class:A.baseContentTitle},[e.options[0].columnName]),d("div",{class:A.baseContentWrap},[e.options.map((e=>d("span",{class:[A.tag,(n.tagActiveId||"")==e.id&&A.tagActive],onClick:()=>{n.tagActiveId!==e.id&&(n.childSelectId=null),n.tagActiveId=e.id,v(e)}},[e.name])))]),d(b,{childShowAllCheck:e.childShowAllCheck,activeRow:n.selectParents,onSelectChildTag:e=>{n.childSelectId=e}},null)])]}),d("div",{class:A.btnGroup},[d("div",{class:[A.btn,A.btnCancel],onClick:C},[u("重置")]),d("div",{class:[A.btn,A.btnConfirm],onClick:f},[u("确认")])])])})])}})),n({name:"ChildNodeSearch",props:{childShowAllCheck:{type:Boolean,default:!0},activeRow:{type:Object,default:()=>({})},list:{type:Array,default:()=>[]},loading:{type:Boolean,default:!1}},emits:["selectChildTag"],setup(e,{emit:a}){const{activeRow:t}=p(e),n=i({});l((()=>e.activeRow),(()=>{t.value=e.activeRow,r()}));const r=()=>{t.value.activeIndex?(t.value.children||[]).forEach((r=>{if(r.id===t.value.activeIndex){let t,i="";r.children&&(t=[...r.children],e.childShowAllCheck&&t.unshift({columnName:r.children[0].columnName,name:"全部"+r.children[0].columnName||"",id:""}),i=r.children[0].columnName,n.value={...r,columnName:i,activeIndex:r.activeIndex||"",children:t},a("selectChildTag",r.activeIndex||""))}})):n.value={}};return s((()=>{r()})),()=>d(_,null,[t.value?.id&&d(_,null,[d("div",{class:A.baseContentTitle},[t.value.columnName]),d("div",{class:A.baseContentWrap},[t.value?.children.map((r=>d("span",{class:[A.tag,(t.value.activeIndex||"")==r.id&&A.tagActive],onClick:()=>{if(e.loading)return;let i;t.value.activeIndex=r.id;let l="";if(r.children){i=[...r.children];let a=i.length>0?i[0].id:"";e.childShowAllCheck&&(i.unshift({columnName:r.children[0].columnName,name:"全部"+r.children[0].columnName||"",id:""}),a=""),l=r.children[0].columnName,n.value={...r,columnName:l,activeIndex:a,children:i}}else n.value={};a("selectChildTag",t.value.activeIndex)}},[r.name])))]),d(b,{activeRow:n.value,onSelectChildTag:e=>{a("selectChildTag",e||t.value.activeIndex)}},null)])])}}))}}}));