1 |
- System.register(["./contants-legacy-ed31834c-1724872791500.js","./index-legacy-508a3c9b-1724872791500.js","./Scrollbar-legacy-e9a6923f-1724872791500.js"],(function(e,a){"use strict";var t,n,r,i,l,s,o,d,c,_,p,u,h;return{setters:[e=>{t=e.a},e=>{n=e.d,r=e.e,i=e.r,l=e.U,s=e.q,o=e.f,d=e.W,c=e.F,_=e.k,p=e.aO,u=e.A},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([]),u=l((()=>{const a=e.value,t=v(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]})),j=(e,a,t=[])=>{for(const n of a){if(n.children&&n.children.length>0){const a=j(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},v=a=>{let t=j(a,e.options);const n=t.findIndex((e=>e.id===a));return t=t.slice(0,n+1),t},m=()=>{n.childSelectId=null,n.tagActiveId="",n.audioPlayTypes="",n.tempAudioPlayTypes="",n.selectParents={},a("update:value",""),a("moreId",{childId:"",parentId:"",audioPlayTypes:""}),n.popoverShow=!1},g=()=>{"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.tagActiveId="",n.childSelectId=null),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]})),()=>o(c,null,[o(d,{placement:e.placement,show:n.popoverShow,"onUpdate:show":e=>n.popoverShow=e,showArrow:!1,trigger:"click",displayDirective:"show",class:[A.cascaderPopover,"c-cascaderPopover"]},{trigger:()=>o("div",{class:[A.nBaseCascaser,"nBaseCascaser",n.popoverShow?A.nBaseCascaserActive:""],title:u.value},[o("div",{class:[A["n-base-selection-tags"],"n-base-selection-tags"]},[o("div",{class:A["n-base-selection-input"]},[o("div",{class:A["n-base-selection-input__content"]},[u.value])]),o("div",{class:[A["n-base-suffix"]]},[o("div",{class:[A.arrow,"small"===e.arrowType?A.arrowSmall:""]},["default"===e.arrowType&&o("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&&o("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)])])]),o("div",{class:[A["n-base-selection-placeholder"],A["n-base-selection-overlay"]]},[!u.value&&o("div",{class:A.inner},[e.placeholder])]),o("div",{class:[A["n-base-selection__border"],"n-base-selection__border"]},null),o("div",{class:A["n-base-selection__state-border"]},null)]),default:()=>o("div",{class:A.baseContent},[o(h,{class:A.baseScrollBar,style:{maxHeight:"400px"}},{default:()=>[e.showAudioPlayType&&o(c,null,[o("div",{class:A.baseContentTitle},[_("场景")]),o("div",{class:A.baseContentWrap},[p.value.map((e=>o("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&&o(c,null,[o("div",{class:A.baseContentTitle},[e.options[0].columnName]),o("div",{class:A.baseContentWrap},[e.options.map((a=>o("span",{class:[A.tag,(n.tagActiveId||"")==a.id&&A.tagActive],onClick:()=>{n.tagActiveId!==a.id&&(n.childSelectId=null),n.tagActiveId=a.id,(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={}})(a)}},[a.name])))]),o(b,{childShowAllCheck:e.childShowAllCheck,activeRow:n.selectParents,onSelectChildTag:e=>{n.childSelectId=e}},null)])]}),o("div",{class:A.btnGroup},[o("div",{class:[A.btn,A.btnCancel],onClick:m},[_("重置")]),o("div",{class:[A.btn,A.btnConfirm],onClick:g},[_("确认")])])])})])}})),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({});u((()=>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()})),()=>o(c,null,[t.value?.id&&o(c,null,[o("div",{class:A.baseContentTitle},[t.value.columnName]),o("div",{class:A.baseContentWrap},[t.value?.children.map((r=>o("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])))]),o(b,{activeRow:n.value,onSelectChildTag:e=>{a("selectChildTag",e||t.value.activeIndex)}},null)])])}}))}}}));
|