<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>웹밤바</title>
    <link>https://shubamba.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Thu, 2 Jul 2026 21:12:40 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>수밤바</managingEditor>
    <item>
      <title>css, javascript 다중 도넛 그래프</title>
      <link>https://shubamba.tistory.com/115</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;css conic-gradient를 이용한 도넛그래프&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;아래 블로그를 참고했으며 data추가하여 유동적으로 사용할수 있도록 수정했다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a href=&quot;https://guiyomi.tistory.com/66&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://guiyomi.tistory.com/66&lt;/a&gt;&lt;/p&gt;
&lt;figure id=&quot;og_1678329916117&quot; contenteditable=&quot;false&quot; data-ke-type=&quot;opengraph&quot; data-ke-align=&quot;alignCenter&quot; data-og-type=&quot;article&quot; data-og-title=&quot;CSS로 직접 그래프 만들기(bar, donut 그래프) + 애니메이션 효과 추가&quot; data-og-description=&quot;보통 웹 개발을 할 때 그래프를 다룰 일이 생기면 라이브러리를 찾아서 사용하곤 했다. 이번에도 라이브러리를 이용하여 도넛 그래프 8개를 2행 4열로 배치하는 화면을 만드는 작업을 하게 됐는&quot; data-og-host=&quot;guiyomi.tistory.com&quot; data-og-source-url=&quot;https://guiyomi.tistory.com/66&quot; data-og-url=&quot;https://guiyomi.tistory.com/66&quot; data-og-image=&quot;https://scrap.kakaocdn.net/dn/XSIbr/hyRRP7oPJt/dRZQKCKyaWZLOiypI1eKek/img.png?width=429&amp;amp;height=110&amp;amp;face=0_0_429_110,https://scrap.kakaocdn.net/dn/dRajyY/hyRSQDAiPY/DlcVo5RPOStJvekKPbLfK1/img.png?width=429&amp;amp;height=110&amp;amp;face=0_0_429_110,https://scrap.kakaocdn.net/dn/behChr/hyRREdHK3E/Zd2pnOWl3uKJleT1HsJmV0/img.jpg?width=640&amp;amp;height=480&amp;amp;face=0_0_640_480&quot;&gt;&lt;a href=&quot;https://guiyomi.tistory.com/66&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; data-source-url=&quot;https://guiyomi.tistory.com/66&quot;&gt;
&lt;div class=&quot;og-image&quot; style=&quot;background-image: url('https://scrap.kakaocdn.net/dn/XSIbr/hyRRP7oPJt/dRZQKCKyaWZLOiypI1eKek/img.png?width=429&amp;amp;height=110&amp;amp;face=0_0_429_110,https://scrap.kakaocdn.net/dn/dRajyY/hyRSQDAiPY/DlcVo5RPOStJvekKPbLfK1/img.png?width=429&amp;amp;height=110&amp;amp;face=0_0_429_110,https://scrap.kakaocdn.net/dn/behChr/hyRREdHK3E/Zd2pnOWl3uKJleT1HsJmV0/img.jpg?width=640&amp;amp;height=480&amp;amp;face=0_0_640_480');&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;og-text&quot;&gt;
&lt;p class=&quot;og-title&quot; data-ke-size=&quot;size16&quot;&gt;CSS로 직접 그래프 만들기(bar, donut 그래프) + 애니메이션 효과 추가&lt;/p&gt;
&lt;p class=&quot;og-desc&quot; data-ke-size=&quot;size16&quot;&gt;보통 웹 개발을 할 때 그래프를 다룰 일이 생기면 라이브러리를 찾아서 사용하곤 했다. 이번에도 라이브러리를 이용하여 도넛 그래프 8개를 2행 4열로 배치하는 화면을 만드는 작업을 하게 됐는&lt;/p&gt;
&lt;p class=&quot;og-host&quot; data-ke-size=&quot;size16&quot;&gt;guiyomi.tistory.com&lt;/p&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://codepen.io/sooh/embed/poOdJXy?default-tab=html%2Cresult&quot; width=&quot;100%&quot; height=&quot;409&quot; frameborder=&quot;no&quot; scrolling=&quot;no&quot; allowfullscreen=&quot;true&quot;&gt;
  See the Pen &lt;a href=&quot;https://codepen.io/sooh/pen/poOdJXy&quot;&gt;
  다중 도넛 그래프&lt;/a&gt; by soohyeon (&lt;a href=&quot;https://codepen.io/sooh&quot;&gt;@sooh&lt;/a&gt;)
  on &lt;a href=&quot;https://codepen.io&quot;&gt;CodePen&lt;/a&gt;.
&lt;/iframe&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1678329557148&quot; class=&quot;html xml&quot; data-ke-language=&quot;html&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;div class=&quot;donut&quot;&amp;gt;&amp;lt;span class=&quot;donut-desc&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1678329541124&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;    .donut {
        position: relative;
        width: 300px;
        height: 300px;
        border-radius: 50%;
    }
    .donut:after {
    	content:'';
        position: absolute;
        top:7%;
        left:7%;
        z-index: 1;
        width: calc(100% - 14%);
        height: calc(100% - 14%);
        border-radius: 50%;
        background: #fff;
    }
    .donut-desc {
        display: flex;
        justify-content: center;
        flex-direction: column;
        position: absolute;
        top:0;
        left:0;
        width: 100%;
        height: 100%;
        padding: 20%;
        box-sizing: border-box;
        z-index: 2;
        color: #000;
        font-size: 20px;
    }
    .donut-desc span {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .donut-desc span i {
        display: inline-block;
        width: 10px;
        height: 10px;
        background-color: attr(data-color);
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1678329575507&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script&amp;gt;
    const donutEl = document.querySelector('.donut')
    let total = 0
    let count = 0
    let dCount=0;
    const data = [
        {title : '지하철', percent : 5},
        {title : '버스', percent : 10},
        {title : '자가용', percent : 15},
        {title : '자전거', percent : 20},
        {title : '도보', percent : 25},
    ]
  
    const colorArr = ['skyblue', 'blue', 'pink','deeppink', 'greenyellow', 'green', 'mediumpurple', 'purple', 'violet', 'blueviolet']
    const dataSection = [data[0].percent]
    let descText = ''
    data.forEach((item, index)=&amp;gt;{
        total += item.percent
        if (index !== 0) dataSection.push(item.percent + dataSection[dataSection.length-1]) // 순차적으로 더하기
        descText += `&amp;lt;span&amp;gt;&amp;lt;i style=&quot;background-color:${colorArr[index*2+1]}&quot;&amp;gt;&amp;lt;/i&amp;gt;${item.title} : ${item.percent} &amp;lt;/span&amp;gt;`
    })

    const donutGradient = (section, idx)=&amp;gt; {
        const donutAnimation = setInterval(() =&amp;gt; {
            let bg = ''
            let bgCode = [`${colorArr[0]} 0`];
            for (let k = 0; k &amp;lt; idx; k++) {
                bgCode.push(`${colorArr[k+k+1]} ${dataSection[k]}%`);
                bgCode.push(`${colorArr[k+k+2]} ${dataSection[k]}%`);
            }
            bg = `conic-gradient(${bgCode.join(', ')}, ${colorArr[idx*2+1]} ${count}%, #dedede ${count}% ${section}%)`;
            donutEl.style.background = bg
            console.log(bg)
            count++
            if(count &amp;gt;= dataSection[dCount]) {
                // console.log('clear')
                clearInterval(donutAnimation)
                if (dCount&amp;lt;dataSection.length-1) {
                    dCount++
                    donutGradient(dataSection[dCount], dCount)
                }
            }
        },30)
    }

    donutGradient(dataSection[dCount], dCount)
    donutEl.querySelector('.donut-desc').innerHTML = descText
            

&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;const data = [ {title:'타이틀', percent:'00%'}, {}, ... ]&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;colorArr에 각 항목에 들어갈 색상 2가지를 쌍으로 넣어줘야 한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;dataSection은 각 percent를 순차적으로 합한 값인데&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;colorArr과 매칭하는 부분이 복잡하다&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;conic-gradient(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;[0] 0,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;[1]&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;dataSection[0]&lt;/span&gt;%,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;[2]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;dataSection[0]&lt;/span&gt;%&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;[3]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;dataSection[1]&lt;/span&gt;%,&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;[4]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;dataSection[1]&lt;/span&gt;%&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;[5]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;dataSection[2]&lt;/span&gt;%,&lt;span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ef6f53;&quot;&gt;colorArr&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;[5]&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&lt;span style=&quot;color: #006dd7;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;dataSection[2]&lt;/span&gt;%&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100%&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;조금 이상하게 짰지만&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;일단 되니까..&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;background-color: #fafafa;&quot;&gt;이상한부분&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div data-ke-type=&quot;moreLess&quot; data-text-more=&quot;더보기&quot; data-text-less=&quot;닫기&quot;&gt;&lt;a class=&quot;btn-toggle-moreless&quot;&gt;더보기&lt;/a&gt;
&lt;div class=&quot;moreless-content&quot;&gt;
&lt;div&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;bgCode&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;colorArr&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;dataSection&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;%`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;bgCode&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;colorArr&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;dataSection&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;k&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;%`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;bg&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;=&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`conic-gradient(&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;bgCode&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;', '&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;colorArr&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;idx&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;count&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;%, #dedede&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;count&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;%&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;section&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;%)`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/javascript</category>
      <category>donut graph</category>
      <category>Gradation</category>
      <category>다중</category>
      <category>애니메이션</category>
      <category>여러개</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/115</guid>
      <comments>https://shubamba.tistory.com/115#entry115comment</comments>
      <pubDate>Thu, 9 Mar 2023 12:01:21 +0900</pubDate>
    </item>
    <item>
      <title>css selector로 step 색칠하기</title>
      <link>https://shubamba.tistory.com/114</link>
      <description>&lt;p&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;20230131155954.png&quot; data-origin-width=&quot;326&quot; data-origin-height=&quot;76&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bNCo3c/btrXDgZ4Pv2/uiGo5rmukGkzDOry1mzUx0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bNCo3c/btrXDgZ4Pv2/uiGo5rmukGkzDOry1mzUx0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bNCo3c/btrXDgZ4Pv2/uiGo5rmukGkzDOry1mzUx0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbNCo3c%2FbtrXDgZ4Pv2%2FuiGo5rmukGkzDOry1mzUx0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;326&quot; height=&quot;76&quot; data-filename=&quot;20230131155954.png&quot; data-origin-width=&quot;326&quot; data-origin-height=&quot;76&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;20230131155859.png&quot; data-origin-width=&quot;339&quot; data-origin-height=&quot;73&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cCnjZr/btrXIniQHZH/nTyHfc8rtEYVtzaE6s3WEk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cCnjZr/btrXIniQHZH/nTyHfc8rtEYVtzaE6s3WEk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cCnjZr/btrXIniQHZH/nTyHfc8rtEYVtzaE6s3WEk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcCnjZr%2FbtrXIniQHZH%2FnTyHfc8rtEYVtzaE6s3WEk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;339&quot; height=&quot;73&quot; data-filename=&quot;20230131155859.png&quot; data-origin-width=&quot;339&quot; data-origin-height=&quot;73&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;20230131155833.png&quot; data-origin-width=&quot;332&quot; data-origin-height=&quot;84&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/ItK0V/btrXGnqGAm0/hlDbbv6rSc33k09WVSbEvk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/ItK0V/btrXGnqGAm0/hlDbbv6rSc33k09WVSbEvk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/ItK0V/btrXGnqGAm0/hlDbbv6rSc33k09WVSbEvk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FItK0V%2FbtrXGnqGAm0%2FhlDbbv6rSc33k09WVSbEvk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;332&quot; height=&quot;84&quot; data-filename=&quot;20230131155833.png&quot; data-origin-width=&quot;332&quot; data-origin-height=&quot;84&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;20230131155914.png&quot; data-origin-width=&quot;330&quot; data-origin-height=&quot;73&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/HugiA/btrXHXEMfzO/ldAf5OaMe9vuoE0nbsX061/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/HugiA/btrXHXEMfzO/ldAf5OaMe9vuoE0nbsX061/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/HugiA/btrXHXEMfzO/ldAf5OaMe9vuoE0nbsX061/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FHugiA%2FbtrXHXEMfzO%2FldAf5OaMe9vuoE0nbsX061%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;330&quot; height=&quot;73&quot; data-filename=&quot;20230131155914.png&quot; data-origin-width=&quot;330&quot; data-origin-height=&quot;73&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;20230131160045.png&quot; data-origin-width=&quot;344&quot; data-origin-height=&quot;79&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bfIlnF/btrXHPNNVxD/sc8koKWW7xw11jltTJTr3K/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bfIlnF/btrXHPNNVxD/sc8koKWW7xw11jltTJTr3K/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bfIlnF/btrXHPNNVxD/sc8koKWW7xw11jltTJTr3K/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbfIlnF%2FbtrXHPNNVxD%2Fsc8koKWW7xw11jltTJTr3K%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;344&quot; height=&quot;79&quot; data-filename=&quot;20230131160045.png&quot; data-origin-width=&quot;344&quot; data-origin-height=&quot;79&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;기본으로 모든 li를 step이 지나간 스타일로 적용하고(#fff)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;on이 된 요소를&lt;span style=&quot;background-color: #ffffff; color: #1b1b1b;&quot;&gt; 뒤따르면서 같은 부모를 공유하는 모든 li ( li.on ~ li)&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;background-color: #ffffff; color: #1b1b1b;&quot;&gt;즉 on이된 요소부터 맨 뒷 li 까지 색상을 선택되지 않은 색상으로 변경한다(#999)&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;background-color: #ffffff; color: #1b1b1b;&quot;&gt;주의해야할 점은 on이 되지 않은 상태는 모든 요소가 선택이 된것처럼 보여짐으로 항상 on체크가 있어야 한다&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lt;ol class=&quot;regStepTop&quot;&quot;&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;본인인증&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;nbsp;class=&quot;on&quot;&amp;gt;서비스&amp;nbsp;이용동의&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;신청정보&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;가입완료&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ol&amp;gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;br /&gt;.regStepTop li:before{border:2px solid #fff;color:#fff;}&lt;br /&gt;.regStepTop li.on~li:before{border-color:#999;color:#999;}&lt;br /&gt;.regStepTop li.on{color:#fff}&lt;/p&gt;</description>
      <category>STUDY/CSS</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/114</guid>
      <comments>https://shubamba.tistory.com/114#entry114comment</comments>
      <pubDate>Tue, 31 Jan 2023 16:31:03 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 4-2. 완료, 제외, total 클릭시 해당 리스트만 보여짐</title>
      <link>https://shubamba.tistory.com/111</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;Status 컴포넌트에서 상태값버튼 클릭시 emi을 이용하여 App.vue로 보냈다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;App.vue에서 상태값을 다시 Group 컴포넌트로 보내고 해당하는 row만 보여준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;App.vue&lt;/p&gt;
&lt;pre id=&quot;code_1664952296764&quot; class=&quot;css&quot; data-ke-language=&quot;css&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div&amp;gt;
      &amp;lt;header&amp;gt;
        &amp;lt;Status @updateList=&quot;updateList&quot;/&amp;gt;
        &amp;lt;Tab :tabLists=&quot;groupTitles&quot;/&amp;gt;

        공통경로 : &amp;lt;input type=&quot;text&quot; v-model=&quot;this.commonURL&quot;&amp;gt;
      &amp;lt;/header&amp;gt;

      &amp;lt;label&amp;gt;
        &amp;lt;input type=&quot;checkbox&quot; name=&quot;&quot; id=&quot;&quot; @change=&quot;this.isModify = $event.target.checked;&quot;&amp;gt;
        &amp;lt;span v-if=&quot;this.isModify&quot;&amp;gt;읽기모드&amp;lt;/span&amp;gt;
        &amp;lt;span v-else&amp;gt;수정모드&amp;lt;/span&amp;gt;
      &amp;lt;/label&amp;gt;

      &amp;lt;article class=&quot;content&quot;&amp;gt;
        &amp;lt;Group v-for=&quot;(group, idx) in groups&quot; 
          :iaList=&quot;group&quot; 
          :idx=&quot;idx&quot; 
          :commonURL=&quot;commonURL&quot;
          :sort=&quot;this.sort&quot; 
          :isModify=&quot;isModify&quot;/&amp;gt;
      &amp;lt;/article&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
import Status from './components/Status.vue'
import Group from './components/Group.vue'
import Tab from './components/Tab.vue'

export default {
  name: 'App',
  components: {
    Status,
    Group,
    Tab
  },
  data(){
    return{
      isModify: true,
      iaList : this.$store.state.iaData,
      groupTarget:'1depth',
      groupTitles: [],
      groups : [],
      sort:'total',
      commonURL: '',
    }
  },
  ...
  methods : {
    modifyStatus(e){
      this.isModify = e.target.checked;
    },
    ...
    updateList(status){
      this.sort = status;
    },
  }
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;Group.vue&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;template&lt;/p&gt;
&lt;pre id=&quot;code_1664952063839&quot; data-ke-language=&quot;css&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
...
  &amp;lt;tr v-for=&quot;(iaValList) in iaGroup&quot; 
	...
    v-show=&quot;iaValList['worklist-status'] == this.sort || this.sort=='total'&quot;&amp;gt;
&amp;lt;/template&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;v-show&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] ==&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;sort&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;||&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;sort&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'total'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;테이블의 tr이 worklist-status값이 Status.vue에서 클릭한 값과 같거나 total일 경우 보여진다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;script&lt;/p&gt;
&lt;pre id=&quot;code_1664952421576&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script&amp;gt;
export default {
  name: 'group',
  props:{
    isModify : Boolean,
    iaList : Object,
    idx: Number,
    commonURL:String,
    sort:String,
  }
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/111</guid>
      <comments>https://shubamba.tistory.com/111#entry111comment</comments>
      <pubDate>Wed, 5 Oct 2022 15:47:12 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 4. 진행상황표</title>
      <link>https://shubamba.tistory.com/110</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;header영역에 worklist-status 상태에따라 완료, 대기, 삭제등을 카운트하고&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;해당 상태버튼을 클릭하면 그 항목만 보일수 있도록 한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;progressbar로 현 상황을 보기쉽게 정리하는 표&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;App.vue&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1664950355669&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div&amp;gt;
      &amp;lt;header&amp;gt;
        &amp;lt;Status @updateList=&quot;updateList&quot;/&amp;gt;
        &amp;lt;Tab :tabLists=&quot;groupTitles&quot;/&amp;gt;

        공통경로 : &amp;lt;input type=&quot;text&quot; v-model=&quot;this.commonURL&quot;&amp;gt;
      &amp;lt;/header&amp;gt;
      ..
 &amp;lt;/template&amp;gt;
 
 &amp;lt;script&amp;gt;
 ...
 
  methods : {
  ...
    updateList(status){
      this.sort = status;
    },
  }
 &amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;updateList&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;status 컴포넌트에서 group에 정렬할 기준을 받아서 this.sort에 담아준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;1. 진행률을 계산하여 보여준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;2. 완료, 제외, total을 계산하여 보여준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;3. 진행률을 progressBar 시각화하여 보여준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;Status.vue&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;template&lt;/p&gt;
&lt;pre id=&quot;code_1664951036572&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div class=&quot;status&quot;&amp;gt;
      진행률 {{percent}}%
      &amp;lt;button type=&quot;button&quot; @click=&quot;sortList('complete')&quot;&amp;gt;완료 : {{countComplete}}&amp;lt;/button&amp;gt;
      &amp;lt;button type=&quot;button&quot; @click=&quot;sortList('del')&quot;&amp;gt; 제외 : {{countDel}}&amp;lt;/button&amp;gt;
      &amp;lt;button type=&quot;button&quot; @click=&quot;sortList('total')&quot;&amp;gt; total : {{total}}&amp;lt;/button&amp;gt;

      &amp;lt;div class=&quot;progressBar&quot;&amp;gt;&amp;lt;span :style=&quot;`width:${Math.floor(percent)}%`&quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;script&lt;/p&gt;
&lt;pre id=&quot;code_1664951069383&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script&amp;gt;
export default {
  name: 'status',
  data(){
    return {
      iaList:this.$store.state.iaData,
    }
  },
  computed:{
    total: function(){
      return this.iaList.length;
    },
    countComplete: function(){
      const list = this.iaList.filter((item)=&amp;gt;{
        return item['worklist-status']=='complete'
      })
      return list.length;
    },
    countDel:function(){
      const list = this.iaList.filter((item)=&amp;gt;{
        return item['worklist-status']=='del'
      })
      return list.length;
    },
    percent: function(){
      const calc = (this.countComplete*100) / (this.total - this.countDel);
      return calc.toFixed(2);
    }
  },
  methods:{
    sortList : function(sort){
      this.$emit('updateList',sort);
    },
  }
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;style&lt;/p&gt;
&lt;pre id=&quot;code_1664951158742&quot; class=&quot;css&quot; data-ke-language=&quot;css&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;.progressBar {
    width: 100%;
    height: 3px;
    background: #eee;

    span {
        display: block;
        height: 3px;
        border-radius:2px;
        background-color: salmon;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;간단한 연산을 위해 computed를 사용했다&lt;/p&gt;
&lt;div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;total&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp; return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;iaList의 개수를 반환한다&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;countComplete&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;const&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;filter&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]==&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'complete'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;worklist-status값이 complete인 경우 그 개수를 반환&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;
&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;countDel&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;const&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;filter&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]==&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'del'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;})&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Apple SD Gothic Neo', Arial, sans-serif; letter-spacing: 0px;&quot;&gt;worklist-status값이 complete인 경우 그 개수를 반환&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;percent&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;const&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = (&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;countComplete&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;) / (&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;total&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; - &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;countDel&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;return&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;calc&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;toFixed&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;합계에서 삭제된 부분을 제하고 완료된부분을 계산하여 백분률로 반환&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;버튼 클릭시 상태값에 해당하는 항목만 보여주기위해 sort를 $emit으로 보내준다&lt;/p&gt;
&lt;div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;click&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;sortList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'complete'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;display: inline-block; padding: 2px 3px; background-color: #1e1e1e;&quot;&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;methods&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;&amp;nbsp; sortList&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;sort&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; &amp;nbsp; this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;$emit&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'updateList'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;sort&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&amp;nbsp; },&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/110</guid>
      <comments>https://shubamba.tistory.com/110#entry110comment</comments>
      <pubDate>Wed, 5 Oct 2022 15:36:28 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 3. 탭으로 1depth 인덱싱</title>
      <link>https://shubamba.tistory.com/109</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;App.vue 에서 다음과 같이 데이터를 받아왔다&lt;/p&gt;
&lt;pre id=&quot;code_1664950068312&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div&amp;gt;
      &amp;lt;header&amp;gt;
        &amp;lt;Tab :tabLists=&quot;groupTitles&quot;/&amp;gt;
      &amp;lt;/header&amp;gt;
      
      &amp;lt;article class=&quot;content&quot;&amp;gt;
        &amp;lt;Group v-for=&quot;(group, idx) in groups&quot; 
          :iaList=&quot;group&quot; 
          :idx=&quot;idx&quot; /&amp;gt;
      &amp;lt;/article&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/template&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;Tab.vue&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1664950068314&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;div class=&quot;tab&quot;&amp;gt;
    &amp;lt;button type=&quot;button&quot; 
      class=&quot;tab__item&quot; 
      v-for=&quot;(item,idx) in tabLists&quot;
      :key=&quot;item&quot; 
      @click=&quot;quickMove(`groupTitle__${idx}`)&quot;
    &amp;gt;{{item}}&amp;lt;/button&amp;gt;
  &amp;lt;/div&amp;gt; 
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  name: 'tab',
  props:{
    tabLists : Array
  },
  methods:{
    quickMove : function(item){
      const pos = document.getElementById(item).offsetTop;
      const headerHeight = document.getElementsByTagName('header')[0].offsetHeight;
      window.scrollTo(0,pos-headerHeight)
    }
  }
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;groupTitle을 tabLists로 받아와서&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;각 타이틀들을 button으로 감싸주고 click시 해당 그룹으로 이동할 method를 만든다 (quickMove)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;quickMove(item)&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;매개변수로 받아온 groupTitle__1... 은&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lt;Group&amp;gt; 컴포넌트안의 각 타이틀에 id값으로 같은 id사용하기로 한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;getElementById(item) 으로 group안의 타이틀 id를 찾고 위치를 찾는다(offsetTop)&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;나는 tab이 페이지에서 항상 띄어둘것이기 때문에&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그만큼의 높이값을 빼주어(headerHeight) 스크롤이 tab바로 아래에 보여지게한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;window 스크롤값을 이동시킨다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/109</guid>
      <comments>https://shubamba.tistory.com/109#entry109comment</comments>
      <pubDate>Wed, 5 Oct 2022 15:09:18 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 2-4. 메모</title>
      <link>https://shubamba.tistory.com/108</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;path수정과 방식은 동일하다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정모드일경우 수정할수 있는 textarea보여지고&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;아닐경우 텍스트로 worklist-note의 값이 보여진다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;blur될경우 수정된 내용을 sendNewIA로 store의 IAdata에 수정한다.&lt;/p&gt;
&lt;pre id=&quot;code_1664949740682&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;...
  &amp;lt;div v-else-if=&quot;title == 'worklist-note'&quot;&amp;gt;
    &amp;lt;textarea 
      v-if=&quot;isModify&quot;
      class=&quot;note&quot; 
      rows=&quot;1&quot; 
      @blur=&quot;updateMemo(iaValList,$event.target)&quot; 
      :value=&quot;iaVal&quot;&amp;gt;
    &amp;lt;/textarea&amp;gt;
    &amp;lt;span v-else&amp;gt;{{iaVal}}&amp;lt;/span&amp;gt;
  &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre id=&quot;code_1664949803122&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;...
    updatePath: function(data,target){
      data['mode'] = '';
      let row = data;
      row['worklist-path'] = target.value;
      this.sendNewIA(row);
    },&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/108</guid>
      <comments>https://shubamba.tistory.com/108#entry108comment</comments>
      <pubDate>Wed, 5 Oct 2022 15:04:46 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 2-3-2. 경로 수정버튼</title>
      <link>https://shubamba.tistory.com/107</link>
      <description>&lt;pre id=&quot;code_1664947625653&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;input type=&quot;text&quot; 
  v-if=&quot;iaValList['mode']=='modi'&quot; 
  :value=&quot;iaVal&quot;
  @blur=&quot;updatePath(iaValList, $event.target)&quot;&amp;gt;
&amp;lt;a v-else ...&amp;gt;{{iaVal}}&amp;lt;/a&amp;gt;
&amp;lt;button type=&quot;button&quot; 
  v-if=&quot;isModify &amp;amp;&amp;amp; iaValList['mode']!='modi'&quot; 
  @click=&quot;pathModi(iaValList)&quot;
  &amp;gt;링크수정&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;링크수정 버튼 클릭시 임시로 해당 row에 mode라는 항목과 modi 값을 넣어준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이 값은 링크가 수정완료 되면 사라진다&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;pathModi&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&amp;nbsp; row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'mode'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'modi'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;iaValList['mode']가 modi이면 input이 보여져서 경로를 수정할수 있다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정이 완료되고 focus가 떠나면(blur)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;mode는 초기화하고&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;path에 새로운 경로는 sendNewIA로 store에 보내서 메인 IAdata를 수정한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;mode가 modi가 아니기때문에 input은 가려지고 a링크가 보여진다&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;updatePath&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&amp;nbsp; data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'mode'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; let&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&amp;nbsp; row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-path'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;sendNewIA&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/107</guid>
      <comments>https://shubamba.tistory.com/107#entry107comment</comments>
      <pubDate>Wed, 5 Oct 2022 14:38:26 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 2-3-1. 마우스오버시 미리보기 제공</title>
      <link>https://shubamba.tistory.com/106</link>
      <description>&lt;pre id=&quot;code_1664947001666&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;div v-else-if=&quot;title == 'worklist-path'&quot;&amp;gt;
  ...
    &amp;lt;a v-else
      :href=&quot;`${commonURL}${iaValList['worklist-path']}`&quot; 
      target=&quot;_blank&quot; 
      @mouseenter=&quot;previewLink(`${commonURL}${iaValList['worklist-path']}`, $event)&quot; 
      @mouseleave=&quot;previewReset($event)&quot;&amp;gt;{{iaVal}}&amp;lt;/a&amp;gt;
  ...
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;commonURL&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-path'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;_blank&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;클릭하면 공통 URL + worklist-path의 설정한 경로를 새창으로 이동&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;mouseenter&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;previewLink&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;commonURL&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-path'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;$event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;previewLink&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;link&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; const&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;el&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;const&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;iframe&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;document&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;createElement&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'iframe'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;iframe&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;src&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;link&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;.html`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;iframe&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1240&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;iframe&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #b5cea8;&quot;&gt;1500&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;iframe&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;setAttribute&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'class'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'sitemapIframe'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;el&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;appendChild&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #4fc1ff;&quot;&gt;iframe&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;마우스오버시 ifream의 src에 링크경로를 띄움&lt;/div&gt;
&lt;div&gt;class는 sitemapIfream&lt;/div&gt;
&lt;div&gt;style에서 position, 크기 적용&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;mouseleave&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;previewReset&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;$event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;{{&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaVal&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;}}&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;previewReset&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; let&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;el&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&amp;nbsp; el&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;querySelector&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'.sitemapIframe'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Apple SD Gothic Neo', Arial, sans-serif; letter-spacing: 0px;&quot;&gt;a링크에서 마우스를 땠을경우 iframe인 .sitemapIfram를 삭제&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/106</guid>
      <comments>https://shubamba.tistory.com/106#entry106comment</comments>
      <pubDate>Wed, 5 Oct 2022 14:25:16 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 2-3. 작업물 경로 링크</title>
      <link>https://shubamba.tistory.com/105</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;worklist-path일 경우&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;작업물의 폴더와 파일경로를 a링크로 보여주고 마우스오버시 미리보기 레이어가 노출된다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a title=&quot;[vue: worklist 제작] 2-3-1. 마우스오버시 미리보기 제공 출처: https://shubamba.tistory.com/106?category=582020 [웹밤바:티스토리]&quot; href=&quot;https://shubamba.tistory.com/106?category=582020&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://shubamba.tistory.com/106?category=582020&lt;/a&gt;&lt;/p&gt;
&lt;figure id=&quot;og_1664948458982&quot; contenteditable=&quot;false&quot; data-ke-type=&quot;opengraph&quot; data-ke-align=&quot;alignCenter&quot; data-og-type=&quot;article&quot; data-og-title=&quot;[vue: worklist 제작] 2-3-1. 마우스오버시 미리보기 제공&quot; data-og-description=&quot;... {{iaVal}} ... :href=&amp;quot;&amp;#96;${commonURL}${iaValList['worklist-path']}&amp;#96;&amp;quot; target=&amp;quot;_blank&amp;quot; 클릭하면 공통 URL + worklist-path의 설정한 경로를 새창으로 이동 @mouseenter=&amp;quot;previewLink(&amp;#96;${commonURL}${iaValLis..&quot; data-og-host=&quot;shubamba.tistory.com&quot; data-og-source-url=&quot;https://shubamba.tistory.com/106?category=582020&quot; data-og-url=&quot;https://shubamba.tistory.com/106&quot; data-og-image=&quot;https://scrap.kakaocdn.net/dn/hWvSY/hyP18eZOwj/biDJeT0YMkKaSNKi2jseKK/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/FcYPZ/hyP0Gj6C9n/55URV3tgMQOniko1vhyuo0/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/bPyXre/hyP2choehw/psIy8TF6tD7ThKaR7Qqqu1/img.png?width=400&amp;amp;height=400&amp;amp;face=0_0_400_400&quot;&gt;&lt;a href=&quot;https://shubamba.tistory.com/106?category=582020&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; data-source-url=&quot;https://shubamba.tistory.com/106?category=582020&quot;&gt;
&lt;div class=&quot;og-image&quot; style=&quot;background-image: url('https://scrap.kakaocdn.net/dn/hWvSY/hyP18eZOwj/biDJeT0YMkKaSNKi2jseKK/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/FcYPZ/hyP0Gj6C9n/55URV3tgMQOniko1vhyuo0/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/bPyXre/hyP2choehw/psIy8TF6tD7ThKaR7Qqqu1/img.png?width=400&amp;amp;height=400&amp;amp;face=0_0_400_400');&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;og-text&quot;&gt;
&lt;p class=&quot;og-title&quot; data-ke-size=&quot;size16&quot;&gt;[vue: worklist 제작] 2-3-1. 마우스오버시 미리보기 제공&lt;/p&gt;
&lt;p class=&quot;og-desc&quot; data-ke-size=&quot;size16&quot;&gt;... {{iaVal}} ... :href=&quot;`${commonURL}${iaValList['worklist-path']}`&quot; target=&quot;_blank&quot; 클릭하면 공통 URL + worklist-path의 설정한 경로를 새창으로 이동 @mouseenter=&quot;previewLink(`${commonURL}${iaValLis..&lt;/p&gt;
&lt;p class=&quot;og-host&quot; data-ke-size=&quot;size16&quot;&gt;shubamba.tistory.com&lt;/p&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;링크수정 버튼 클릭시 a링크가 가려지고 input text가 보여지면서 링크 경로를 수정할수 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;input에 focus가 사라지면 수정된 링크가 업데이트되며 input이 가려지고 수정된 a링크가 보여진다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;a title=&quot;[vue: worklist 제작] 2-3-2. 경로 수정버튼 출처: https://shubamba.tistory.com/107?category=582020 [웹밤바:티스토리]&quot; href=&quot;https://shubamba.tistory.com/107?category=582020&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://shubamba.tistory.com/107?category=582020&lt;/a&gt;&lt;/p&gt;
&lt;figure id=&quot;og_1664948453467&quot; contenteditable=&quot;false&quot; data-ke-type=&quot;opengraph&quot; data-ke-align=&quot;alignCenter&quot; data-og-type=&quot;article&quot; data-og-title=&quot;[vue: worklist 제작] 2-3-2. 경로 수정버튼&quot; data-og-description=&quot;{{iaVal}} 링크수정 링크수정 버튼 클릭시 임시로 해당 row에 mode라는 항목과 modi 값을 넣어준다 이 값은 링크가 수정완료 되면 사라진다 pathModi : function(row){ row['mode'] = 'modi'; }, iaValList['mode'..&quot; data-og-host=&quot;shubamba.tistory.com&quot; data-og-source-url=&quot;https://shubamba.tistory.com/107?category=582020&quot; data-og-url=&quot;https://shubamba.tistory.com/107&quot; data-og-image=&quot;https://scrap.kakaocdn.net/dn/UzS4f/hyP0K083jJ/TKfClHIkB51O7uLtpsmDC0/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/cpuU5c/hyP0wPmgSQ/Oqj452dIkZEdvvOODY1wJ0/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/ce3nm8/hyP2i2YzXe/AgyyKMtKBCTH6JJUmICuS0/img.png?width=400&amp;amp;height=400&amp;amp;face=0_0_400_400&quot;&gt;&lt;a href=&quot;https://shubamba.tistory.com/107?category=582020&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; data-source-url=&quot;https://shubamba.tistory.com/107?category=582020&quot;&gt;
&lt;div class=&quot;og-image&quot; style=&quot;background-image: url('https://scrap.kakaocdn.net/dn/UzS4f/hyP0K083jJ/TKfClHIkB51O7uLtpsmDC0/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/cpuU5c/hyP0wPmgSQ/Oqj452dIkZEdvvOODY1wJ0/img.png?width=800&amp;amp;height=800&amp;amp;face=0_0_800_800,https://scrap.kakaocdn.net/dn/ce3nm8/hyP2i2YzXe/AgyyKMtKBCTH6JJUmICuS0/img.png?width=400&amp;amp;height=400&amp;amp;face=0_0_400_400');&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;og-text&quot;&gt;
&lt;p class=&quot;og-title&quot; data-ke-size=&quot;size16&quot;&gt;[vue: worklist 제작] 2-3-2. 경로 수정버튼&lt;/p&gt;
&lt;p class=&quot;og-desc&quot; data-ke-size=&quot;size16&quot;&gt;{{iaVal}} 링크수정 링크수정 버튼 클릭시 임시로 해당 row에 mode라는 항목과 modi 값을 넣어준다 이 값은 링크가 수정완료 되면 사라진다 pathModi : function(row){ row['mode'] = 'modi'; }, iaValList['mode'..&lt;/p&gt;
&lt;p class=&quot;og-host&quot; data-ke-size=&quot;size16&quot;&gt;shubamba.tistory.com&lt;/p&gt;
&lt;/div&gt;
&lt;/a&gt;&lt;/figure&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;링크경로에 공통경로를 따로 header의 input영역에서 수정할수 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre id=&quot;code_1664946034362&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  ...
  &amp;lt;tr v-for=&quot;(iaValList) in iaGroup&quot; 
    :class=&quot;`status__badge status__badge--${iaValList['worklist-status']}`&quot;
    v-show=&quot;iaValList['worklist-status'] == this.sort || this.sort=='total'&quot;&amp;gt;
    &amp;lt;td 
      v-for=&quot;(iaVal, title) in iaValList&quot; 
      :class=&quot;`col__${title.replace(/\s/g, '-')}`&quot;
    &amp;gt;
      &amp;lt;div v-if=&quot;title == 'worklist-status'&quot;&amp;gt; ... &amp;lt;/div&amp;gt;
      &amp;lt;div v-else-if=&quot;title == 'worklist-path'&quot;&amp;gt;
        &amp;lt;!-- '링크수정'버튼 클릭시 input-a toggle --&amp;gt;
        &amp;lt;input type=&quot;text&quot; 
          v-if=&quot;iaValList['mode']=='modi'&quot; 
          :value=&quot;iaVal&quot;
          @blur=&quot;updatePath(iaValList, $event.target)&quot;&amp;gt;
        &amp;lt;a v-else
          :href=&quot;`${commonURL}${iaValList['worklist-path']}`&quot; 
          target=&quot;_blank&quot; 
          @mouseenter=&quot;previewLink(`${commonURL}${iaValList['worklist-path']}`, $event)&quot; 
          @mouseleave=&quot;previewReset($event)&quot;&amp;gt;{{iaVal}}&amp;lt;/a&amp;gt;
        &amp;lt;button type=&quot;button&quot; 
          v-if=&quot;iaValList['mode']!='modi'&quot; 
          @click=&quot;pathModi(iaValList)&quot;
          &amp;gt;링크수정&amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
  ...
&amp;lt;/template&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;script&lt;/p&gt;
&lt;pre id=&quot;code_1664948348344&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script&amp;gt;
export default {
  ...
  methods: {
    sendNewIA : function(data){
      this.$store.dispatch('modiIA', data)
    },
    previewLink : function (link,event){
      const el = event.target
      const iframe = document.createElement('iframe')
      iframe.src=`${link}.html`;
      iframe.width=1240;
      iframe.height=1500;
      iframe.setAttribute('class','sitemapIframe');
      el.appendChild(iframe);
    },
    previewReset : function(event){
      let el = event.target;
      el.querySelector('.sitemapIframe').remove();
    },
    updatePath: function(data,target){
      data['mode'] = '';
      let row = data;
      row['worklist-path'] = target.value;
      this.sendNewIA(row);
    },
    pathModi : function(row){
      row['mode'] = 'modi';
    },
  }
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;style&lt;/p&gt;
&lt;pre id=&quot;code_1664948359174&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;style lang=&quot;scss&quot;&amp;gt;
  .col__worklist-path {
      position: relative;
      a {
          color: darken($pointColor, 20%);
          text-decoration: none;
          text-underline-position: under;
          &amp;amp;:hover {
              color: darken($color:$pointColor, $amount:0);
              text-decoration: underline;
          }
      }
  }
  .sitemapIframe{
      position: absolute;
      top:-300px - 1px;
      left:calc(50% - 124px);
      z-index: 1;
      transform:scale(0.2);transform-origin: left top;
      background-color: #fff;
      box-shadow: 0 0 30px rgba(0,0,0,.2);
  }
&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/105</guid>
      <comments>https://shubamba.tistory.com/105#entry105comment</comments>
      <pubDate>Wed, 5 Oct 2022 11:09:45 +0900</pubDate>
    </item>
    <item>
      <title>[vue: worklist 제작] 2-2. 진행상태 select (대기:기본, 진행중, 완료, 제외..)</title>
      <link>https://shubamba.tistory.com/104</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;상태(worklist-status) 셀에 select box로 해당 상태를 선택하면&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&lt;span style=&quot;color: #666666;&quot;&gt;그 해당 행의 색상을 변경하고&lt;span&gt;&amp;nbsp;&lt;/span&gt;진행상황에 숫자가 카운트 한다(추후&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #555555;&quot;&gt;4-1. 완료, 제외, total count 에서 진행)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;Group.vue&lt;/p&gt;
&lt;pre id=&quot;code_1664871876184&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  ...
    &amp;lt;tbody&amp;gt;
      &amp;lt;tr v-for=&quot;(iaValList) in iaGroup&quot;  
        :class=&quot;`status__badge status__badge--${iaValList['worklist-status']}`&quot;&amp;gt;
        &amp;lt;td v-for=&quot;(iaVal, title) in iaValList&quot; .. &amp;gt;
        
          &amp;lt;div v-if=&quot;title == 'worklist-status'&quot;&amp;gt;
            &amp;lt;select name=&quot;&quot; id=&quot;&quot; @change=&quot;updateStatus(iaValList,$event.target)&quot; v-if=&quot;isModify&quot;&amp;gt;
              &amp;lt;option value=&quot;stay&quot; :selected=&quot;iaValList['worklist-status'] == 'stay'&quot;&amp;gt;대기&amp;lt;/option&amp;gt;
              &amp;lt;option value=&quot;ing&quot; :selected=&quot;iaValList['worklist-status'] == 'ing'&quot;&amp;gt;진행중&amp;lt;/option&amp;gt;
              &amp;lt;option value=&quot;complete&quot; :selected=&quot;iaValList['worklist-status'] == 'complete'&quot;&amp;gt;완료&amp;lt;/option&amp;gt;
              &amp;lt;option value=&quot;del&quot; :selected=&quot;iaValList['worklist-status'] == 'del'&quot;&amp;gt;제외&amp;lt;/option&amp;gt;
            &amp;lt;/select&amp;gt;
            &amp;lt;span v-else&amp;gt;
              {{this.statusRename(iaVal)}}
            &amp;lt;/span&amp;gt;
          &amp;lt;/div&amp;gt;
   ...
 &amp;lt;/template&amp;gt;
 
&amp;lt;script&amp;gt;
export default {
  ...
  methods: {
    sendNewIA : function(data){
      this.$store.dispatch('modiIA', data)
    },
    updateStatus : function(data,target){
      let row = data;
      row['worklist-status'] = target.value;
      this.sendNewIA(row);
    },
    statusRename : function(status){
      switch(status){
        case 'stay' : return &quot;대기&quot;;
        break;
        case 'ing' : return &quot;진행중&quot;;
        break;
        case 'complete' : return &quot;완료&quot;;
        break;
        case 'del' : return &quot;제외&quot;;
        break;
        default : return ''
      }
    }
  }
  ...
  &amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size18&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정모드일 경우에(&lt;span style=&quot;color: #c586c0;&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isModify&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;) &lt;/span&gt;selectbox가 보이고&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;수정모드가 아닐경우 worklist-status의 값이 텍스트로 보인다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;statusRename으로 적절하게 워딩을 변경했다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;worklist-status의 값을 stay, ing, complete, del로 정하고(필요에 따라 가감)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;select box에서 상태값을 선택했을때 (@change) updateStatus를 실행한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;매개변수로 해당 열(tr부분)과 해당 select에 변경된 값을 가져갈 이벤트 타겟을 보낸다&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; @&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;change&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;updateStatus&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;$event&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #c586c0;&quot;&gt;v-if&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;isModify&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;stay&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;selected&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'stay'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;대기&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;ing&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;selected&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'ing'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;진행중&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;complete&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;selected&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'complete'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;완료&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;nbsp; &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;&quot;del&quot;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;selected&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] == &lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'del'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;제외&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;option&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;select&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;해당열을 data로 받아서 그 worklist-status 값을 selectbox에서 선택한 value값으로 변경해준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;sendNewIA를 실행시켜 store에 보낸다.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;sendNewIA&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;$store&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;dispatch&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'modiIA'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #6a9955;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;updateStatus&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt; :&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; let&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;&amp;nbsp; row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;] = &lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;&amp;nbsp; this&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #dcdcaa;&quot;&gt;sendNewIA&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;row&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt; },&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;store.js&lt;/b&gt;&lt;/p&gt;
&lt;pre id=&quot;code_1664934072788&quot; class=&quot;javascript&quot; data-ke-language=&quot;javascript&quot; data-ke-type=&quot;codeblock&quot;&gt;&lt;code&gt;const store = new Vuex.Store({
    state: {
		...
    },
    mutations: {
		...
        MODI_IA(state,{newIA,id}){
            const list = state.iaData.filter ((ia)=&amp;gt;{
                if(ia[id] == newIA[id]) {
                    ia = newIA
                }
            })
            state.iaData = list;
        }
    },
    actions: {
		...
        modiIA ({commit},newIA) {
            const id = newIA['SCREEN ID']
            commit('MODI_IA',{newIA,id});
        }
    }
})&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;modiIA&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;dispatch로 받은 row의 SCREEN ID를 추출해서 row와 함께 MODI_IA로 보낸다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;MODI_IA&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;iaData를 순회하여 SCREEN ID가 같은 row를 찾아 새 row(newIA)로 변경하여 다시 덮어씌운다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;worklist-status 값이 변경되면&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;해당 tr의 class가 변경되어 css에서 설정한 색상으로 변경된다&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`... status__badge--&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;${&lt;/span&gt;&lt;span style=&quot;color: #9cdcfe;&quot;&gt;iaValList&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;'worklist-status'&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #569cd6;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #ce9178;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #d4d4d4;&quot;&gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;</description>
      <category>STUDY/vuejs</category>
      <author>수밤바</author>
      <guid isPermaLink="true">https://shubamba.tistory.com/104</guid>
      <comments>https://shubamba.tistory.com/104#entry104comment</comments>
      <pubDate>Tue, 4 Oct 2022 18:00:08 +0900</pubDate>
    </item>
  </channel>
</rss>