PageSourceSearch

https://ccvc.co.kr/assets/FilterSort.8e6c3033.js

js ccvc.co.kr collected 2026-10-08 01:46:25 UTC 6,803 bytes, 1 lines download raw bytes

1import{n as c}from"./index.59a732f1.js";const p={name:"FilterSort",props:{filterId:{type:Number,default:1},useSort:{type:Boolean,default:!0}},data(){return{formTypeData:{input:"round",button:"round",box:"round",list:"vertical",label:!1,align:"block",inputIcon:!1,dropdown:"list"},categories:[],filterData:[],sortData:void 0,typeList:{choice_checkbox:"c-input-checkboxGroup",choice_radio:"c-input-radiobuttonGroup",address:"c-input-regionForm",number_range:"c-input-rangeDual",date_range:"c-input-dateRange",date:"c-input-date",date_time:["c-input-date","c-input-time"],date_time_range:"c-input-dateTimeRange",category:"c-input-cascadingDropdown"}}},created(){this.setCategories()},methods:{setCategories(){this.$axios.get("public/category?depth=2").then(o=>{this.categories=[];for(let e=0;e<o.data.length;e++){let l=o.data[e],s=[];if(l.child)for(let i=0;i<l.child.length;i++){let t=l.child[i],u=[];for(let a=0;a<t.child.length;a++){let n=t.child[a];u.push({id:n.id,label:n.name,value:n.id})}t={id:t.id,label:t.name,value:t.id,child:u},s.push(t)}l={id:l.id,label:l.name,value:l.id,child:s},this.categories.push(l)}this.setFilters()})},setFilters(){this.$axios.get("public/service/set/filter/"+this.filterId).then(o=>{o.data.filter.forEach(t=>{t.visible=!0,t.elType=this.typeList[t.type],t.selectedValue="";let u=t.elType,a=find(this.$store.getters.filtered,"keyword",t.keyword);if(a===void 0&&(a=find(this.$store.getters.filtered,"param_id",t.param_id)),t.formType={input:"round",button:"round",box:"round",list:"horizontal",label:!1},u==="c-input-checkboxGroup")this.$store.getters.commonStyle.filter&&this.$store.getters.commonStyle.filter.checkbox&&this.$store.getters.commonStyle.filter.checkbox==="full"&&(t.elType="c-input-checkbox-full-group"),t.options=this.computedCheckbox(t.options),a!==void 0&&(t.value=a.set[0].value);else if(u==="c-input-radiobuttonGroup"){let n=[];t.options.forEach(d=>{n.push({id:d.id,value:d.id,label:d.name})}),t.options=n,a!==void 0&&a.value!==void 0&&(t.value=a.value.value),this.$store.getters.commonStyle.filter&&this.$store.getters.commonStyle.filter.radio&&this.$store.getters.commonStyle.filter.radio==="full"&&(t.elType="c-input-radio-full-buttonGroup")}else if(u==="c-input-regionForm")t.placeholder="\uC9C0\uC5ED\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694",a!==void 0&&(t.value={sido:{id:a.set[0].value,label:a.set[0].label,name:a.set[0].label,value:a.set[0].value},sigungu:{id:a.set[1].value,name:a.set[1].label,label:a.set[1].label,value:a.set[1].value}});else if(u==="c-input-rangeDual"){let n=t.options.min===0?1:t.options.min;if(t.value=[t.options.min,t.options.max],t.min=t.options.min,t.max=t.options.max,t.unit=t.options.unit,t.interval=t.options.max/n/100*n,a!==void 0){let d=a.set[0].value===""?t.min:a.set[0].value,r=a.set[1].value===""?t.max:a.set[1].value;t.set[0].value=a.set[0].value,t.set[1].value=a.set[1].value,t.value=[d,r]}}else t.type==="category"&&(t.dropdown=this.categories,a!==void 0&&(t.set[0].value=a.set[0].value,t.set[1].value=a.set[1].value,t.set[2].value=a.set[2].value,t.set[0].label=a.set[0].label,t.set[1].label=a.set[1].label,t.set[2].label=a.set[2].label,a.set[0].value&&a.set[0].value!==""&&(t.selectedValue=a.set[0].label,t.value={dropdown1:a.set[0].value,dropdown2:void 0},a.set[1].value&&a.set[1].value!==""&&(t.selectedValue+=" "+a.set[1].label,t.value.dropdown2=a.set[1].value))))}),this.filterData=o.data.filter;let e="c-input-radiobuttonGroup";this.$store.getters.commonStyle.filter&&this.$store.getters.commonStyle.filter.radio&&this.$store.getters.commonStyle.filter.radio==="full"&&(e="c-input-radio-full-buttonGroup");let s=o.data.sort.filter(t=>t.is_active===!0);this.sortData={label:"\uC815\uB82C",visible:!0,elType:e,selectedValue:"",value:"",options:s,formType:{list:"vertical"}};let i=this.$store.getters.sorted;i&&(this.sortData.value=i.value)})},computedCheckbox(o){let e=[];for(let l=0;l<o.length;l++){let s=o[l];e.push({id:s.id,checked:!1,label:s.name})}return e},updateValue(o,e){this.selectedValue="",o.type==="number_range"?(o.set[0].value=e[0],o.set[1].value=e[1]):o.type==="choice_radio"?o.set[0].value=e:
1o.type==="address"&&e.sido?(o.set[0].value=e.sido.id,o.set[0].label=e.sido.label,o.set[1].value=e.sigungu?e.sigungu.id:"",o.set[1].label=e.sigungu?e.sigungu.label:""):o.type==="category"?(e.dropdown1&&(o.set[0].value=e.dropdown1,o.set[0].label=find(o.dropdown,"id",e.dropdown1).label),e.dropdown2&&(o.set[1].value=e.dropdown2,o.set[1].label=find(o.dropdown,"id",e.dropdown2).label)):o.type==="choice_checkbox"&&(o.set[0].value=e)}}};var v=function(){var e=this,l=e._self._c;return l("div",[e._l(e.filterData,function(s,i){return l("div",{key:"filter-"+i},[l("div",{staticClass:"grid-box unselect",staticStyle:{padding:"12px 16px"},style:e.brandBgColor.sub,on:{click:function(t){s.visible=!s.visible}}},[l("div",{staticClass:"col-11 flex-between"},[l("div",{style:e.brandColor.help},[e._v(e._s(s.label))]),l("div",{staticStyle:{"font-size":"13px"},style:e.brandColor.brand},[e._v(e._s(s.selectedValue))])]),l("div",{staticClass:"col-1 flex-end"},[l("i",{staticClass:"material-icons",style:e.brandColor.sub},[e._v(e._s(s.visible?"arrow_drop_up":"arrow_drop_down"))])])]),s.visible?l("div",{staticStyle:{padding:"20px"}},[l(s.elType,e._b({tag:"component",attrs:{gutter:0,selectedValue:s.selectedValue,formType:e.formTypeData,value:s.value,radioButtonFull:{col:4,gutter:4}},on:{"update:selectedValue":function(t){return e.$set(s,"selectedValue",t)},"update:selected-value":function(t){return e.$set(s,"selectedValue",t)},"update:value":[function(t){return e.$set(s,"value",t)},t=>e.updateValue(s,t)]}},"component",s,!1))],1):e._e()])}),e.sortData&&e.useSort?l("div",[l("div",{staticClass:"grid-box unselect",staticStyle:{padding:"16px"},style:e.brandBgColor.sub,on:{click:function(s){e.sortData.visible=!e.sortData.visible}}},[l("div",{staticClass:"col-11 flex-between"},[l("div",{style:e.brandColor.help},[e._v(e._s(e.sortData.label))]),l("div",{staticStyle:{"font-size":"13px"},style:e.brandColor.brand},[e._v(e._s(e.sortData.selectedValue))])]),l("div",{staticClass:"col-1 flex-end"},[l("i",{staticClass:"material-icons",style:e.brandColor.sub},[e._v(e._s(e.sortData.visible?"arrow_drop_up":"arrow_drop_down"))])])]),e.sortData.visible?l("div",{staticStyle:{padding:"20px"}},[l(e.sortData.elType,e._b({tag:"component",attrs:{gutter:0,selectedValue:e.sortData.selectedValue,value:e.sortData.value},on:{"update:selectedValue":function(s){return e.$set(e.sortData,"selectedValue",s)},"update:selected-value":function(s){return e.$set(e.sortData,"selectedValue",s)},"update:value":[function(s){return e.$set(e.sortData,"value",s)},s=>e.updateValue(e.sortData,s)]}},"component",e.sortData,!1))],1):e._e()]):e._e()],2)},b=[],h=c(p,v,b,!1,null,null,null,null);const f=h.exports;export{f as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.