| | |
| | | </thead> |
| | | <tbody> |
| | | <tr> |
| | | <td>1. 我感觉快乐,心情舒畅</td> |
| | | <td><input :value="chapter002.tablexyx1.text1" type="checkbox" />5</td> |
| | | <td><input :value="chapter002.tablexyx1.text2" type="checkbox" />4</td> |
| | | <td><input :value="chapter002.tablexyx1.text3" type="checkbox" />3</td> |
| | | <td><input :value="chapter002.tablexyx1.text4" type="checkbox" />2</td> |
| | | <td><input :value="chapter002.tablexyx1.text5" type="checkbox" />1</td> |
| | | <td><input :value="chapter002.tablexyx1.text6" type="checkbox" />0</td> |
| | | <td style="text-align: left">1. 我感觉快乐,心情舒畅</td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text1')" |
| | | :checked="chapter002.tablexyx1.text1" |
| | | type="checkbox" |
| | | />5 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text2')" |
| | | :checked="chapter002.tablexyx1.text2" |
| | | type="checkbox" |
| | | />4 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text3')" |
| | | :checked="chapter002.tablexyx1.text3" |
| | | type="checkbox" |
| | | />3 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text4')" |
| | | :checked="chapter002.tablexyx1.text4" |
| | | type="checkbox" |
| | | />2 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text5')" |
| | | :checked="chapter002.tablexyx1.text5" |
| | | type="checkbox" |
| | | />1 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text6')" |
| | | :checked="chapter002.tablexyx1.text6" |
| | | type="checkbox" |
| | | />0 |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>2. 我感觉宁静和放松</td> |
| | | <td><input :value="chapter002.tablexyx1.text7" type="checkbox" />5</td> |
| | | <td><input :value="chapter002.tablexyx1.text8" type="checkbox" />4</td> |
| | | <td><input :value="chapter002.tablexyx1.text9" type="checkbox" />3</td> |
| | | <td><input :value="chapter002.tablexyx1.text10" type="checkbox" />2</td> |
| | | <td><input :value="chapter002.tablexyx1.text11" type="checkbox" />1</td> |
| | | <td><input :value="chapter002.tablexyx1.text12" type="checkbox" />0</td> |
| | | <td style="text-align: left">2. 我感觉宁静和放松</td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text7')" |
| | | :checked="chapter002.tablexyx1.text7" |
| | | type="checkbox" |
| | | />5 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text8')" |
| | | :checked="chapter002.tablexyx1.text8" |
| | | type="checkbox" |
| | | />4 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text9')" |
| | | :checked="chapter002.tablexyx1.text9" |
| | | type="checkbox" |
| | | />3 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text10')" |
| | | :checked="chapter002.tablexyx1.text10" |
| | | type="checkbox" |
| | | />2 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text11')" |
| | | :checked="chapter002.tablexyx1.text11" |
| | | type="checkbox" |
| | | />1 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text12')" |
| | | :checked="chapter002.tablexyx1.text12" |
| | | type="checkbox" |
| | | />0 |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>3. 我感觉充满活力,精力充沛</td> |
| | | <td>5</td> |
| | | <td>4</td> |
| | | <td>3</td> |
| | | <td>2</td> |
| | | <td>1</td> |
| | | <td>0</td> |
| | | <td style="text-align: left"> |
| | | 3. 我感觉充满活力,精力充沛 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text13')" |
| | | :checked="chapter002.tablexyx1.text13" |
| | | type="checkbox" |
| | | />5 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text14')" |
| | | :checked="chapter002.tablexyx1.text14" |
| | | type="checkbox" |
| | | />4 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text15')" |
| | | :checked="chapter002.tablexyx1.text15" |
| | | type="checkbox" |
| | | />3 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text16')" |
| | | :checked="chapter002.tablexyx1.text16" |
| | | type="checkbox" |
| | | />2 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text17')" |
| | | :checked="chapter002.tablexyx1.text17" |
| | | type="checkbox" |
| | | />1 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text18')" |
| | | :checked="chapter002.tablexyx1.text18" |
| | | type="checkbox" |
| | | />0 |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>4. 我睡醒时感到清醒,得到了足够休息</td> |
| | | <td>5</td> |
| | | <td>4</td> |
| | | <td>3</td> |
| | | <td>2</td> |
| | | <td>1</td> |
| | | <td>0</td> |
| | | <td style="text-align: left"> |
| | | 4. 我睡醒时感到清醒,得到了足够休息 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text19')" |
| | | :checked="chapter002.tablexyx1.text19" |
| | | type="checkbox" |
| | | />5 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text20')" |
| | | :checked="chapter002.tablexyx1.text20" |
| | | type="checkbox" |
| | | />4 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text21')" |
| | | :checked="chapter002.tablexyx1.text21" |
| | | type="checkbox" |
| | | />3 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text22')" |
| | | :checked="chapter002.tablexyx1.text22" |
| | | type="checkbox" |
| | | />2 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text23')" |
| | | :checked="chapter002.tablexyx1.text23" |
| | | type="checkbox" |
| | | />1 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text24')" |
| | | :checked="chapter002.tablexyx1.text24" |
| | | type="checkbox" |
| | | />0 |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>5. 我每天的生活充满了有趣的事情</td> |
| | | <td>5</td> |
| | | <td>4</td> |
| | | <td>3</td> |
| | | <td>2</td> |
| | | <td>1</td> |
| | | <td>0</td> |
| | | <td style="text-align: left"> |
| | | 5. 我每天的生活充满了有趣的事情 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text25')" |
| | | :checked="chapter002.tablexyx1.text25" |
| | | type="checkbox" |
| | | />5 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text26')" |
| | | :checked="chapter002.tablexyx1.text26" |
| | | type="checkbox" |
| | | />4 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text27')" |
| | | :checked="chapter002.tablexyx1.text27" |
| | | type="checkbox" |
| | | />3 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text28')" |
| | | :checked="chapter002.tablexyx1.text28" |
| | | type="checkbox" |
| | | />2 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text29')" |
| | | :checked="chapter002.tablexyx1.text29" |
| | | type="checkbox" |
| | | />1 |
| | | </td> |
| | | <td> |
| | | <input |
| | | @change="changeBox($event, 'text30')" |
| | | :checked="chapter002.tablexyx1.text30" |
| | | type="checkbox" |
| | | />0 |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | |
| | | <tbody> |
| | | <tr> |
| | | <td>1</td> |
| | | <td>正常健康</td> |
| | | <td>健康</td> |
| | | <td>健康</td> |
| | | <td>健康</td> |
| | | <td><input @change="changeByb($event,'text1')" type="checkbox" :checked="chapter002.tablebyb1.text1" />正常健康</td> |
| | | <td><input @change="changeByb($event,'text2')" type="checkbox" :checked="chapter002.tablebyb1.text2" />健康</td> |
| | | <td><input @change="changeByb($event,'text2')" type="checkbox" :checked="chapter002.tablebyb1.text2" />健康</td> |
| | | <td><input @change="changeByb($event,'text4')" type="checkbox" :checked="chapter002.tablebyb1.text4" />健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>2</td> |
| | | <td>悲观</td> |
| | | <td>不健康</td> |
| | | <td>健康</td> |
| | | <td>健康</td> |
| | | <td><input @change="changeByb($event,'text5')" type="checkbox" :checked="chapter002.tablebyb1.text5" />悲观</td> |
| | | <td><input @change="changeByb($event,'text6')" type="checkbox" :checked="chapter002.tablebyb1.text6" />不健康</td> |
| | | <td><input @change="changeByb($event,'text7')" type="checkbox" :checked="chapter002.tablebyb1.text7" />健康</td> |
| | | <td><input @change="changeByb($event,'text8')" type="checkbox" :checked="chapter002.tablebyb1.text8" />健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>3</td> |
| | | <td>社会方面不健康</td> |
| | | <td>健康</td> |
| | | <td>健康</td> |
| | | <td>不健康</td> |
| | | <td><input @change="changeByb($event,'text9')" type="checkbox" :checked="chapter002.tablebyb1.text9" />社会方面不健康</td> |
| | | <td><input @change="changeByb($event,'text10')" type="checkbox" :checked="chapter002.tablebyb1.text10" />健康</td> |
| | | <td><input @change="changeByb($event,'text11')" type="checkbox" :checked="chapter002.tablebyb1.text11" />健康</td> |
| | | <td><input @change="changeByb($event,'text12')" type="checkbox" :checked="chapter002.tablebyb1.text12" />不健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>4</td> |
| | | <td>患疑病症</td> |
| | | <td>不健康</td> |
| | | <td>健康</td> |
| | | <td>健康</td> |
| | | <td><input @change="changeByb($event,'text13')" type="checkbox" :checked="chapter002.tablebyb1.text13" />患疑病症</td> |
| | | <td><input @change="changeByb($event,'text14')" type="checkbox" :checked="chapter002.tablebyb1.text14" />不健康</td> |
| | | <td><input @change="changeByb($event,'text15')" type="checkbox" :checked="chapter002.tablebyb1.text15" />健康</td> |
| | | <td><input @change="changeByb($event,'text16')" type="checkbox" :checked="chapter002.tablebyb1.text16" />健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>5</td> |
| | | <td>身体不健康</td> |
| | | <td>健康</td> |
| | | <td>不健康</td> |
| | | <td>健康</td> |
| | | <td><input @change="changeByb($event,'text17')" type="checkbox" :checked="chapter002.tablebyb1.text17" />身体不健康</td> |
| | | <td><input @change="changeByb($event,'text18')" type="checkbox" :checked="chapter002.tablebyb1.text18" />健康</td> |
| | | <td><input @change="changeByb($event,'text19')" type="checkbox" :checked="chapter002.tablebyb1.text19" />不健康</td> |
| | | <td><input @change="changeByb($event,'text20')" type="checkbox" :checked="chapter002.tablebyb1.text20" />健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>6</td> |
| | | <td>长期受病折磨</td> |
| | | <td>不健康</td> |
| | | <td>不健康</td> |
| | | <td>健康</td> |
| | | <td><input @change="changeByb($event,'text21')" type="checkbox" :checked="chapter002.tablebyb1.text21" />长期受病折磨</td> |
| | | <td><input @change="changeByb($event,'text22')" type="checkbox" :checked="chapter002.tablebyb1.text22" />不健康</td> |
| | | <td><input @change="changeByb($event,'text23')" type="checkbox" :checked="chapter002.tablebyb1.text23" />不健康</td> |
| | | <td><input @change="changeByb($event,'text24')" type="checkbox" :checked="chapter002.tablebyb1.text24" />健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>7</td> |
| | | <td>乐观</td> |
| | | <td>健康</td> |
| | | <td>不健康</td> |
| | | <td>健康</td> |
| | | <td><input @change="changeByb($event,'text25')" type="checkbox" :checked="chapter002.tablebyb1.text25" />乐观</td> |
| | | <td><input @change="changeByb($event,'text26')" type="checkbox" :checked="chapter002.tablebyb1.text26" />健康</td> |
| | | <td><input @change="changeByb($event,'text27')" type="checkbox" :checked="chapter002.tablebyb1.text27" />不健康</td> |
| | | <td><input @change="changeByb($event,'text28')" type="checkbox" :checked="chapter002.tablebyb1.text28" />健康</td> |
| | | </tr> |
| | | <tr> |
| | | <td>8</td> |
| | | <td>患病严重</td> |
| | | <td>不健康</td> |
| | | <td>不健康</td> |
| | | <td>不健康</td> |
| | | <td><input @change="changeByb($event,'text29')" type="checkbox" :checked="chapter002.tablebyb1.text29" />患病严重</td> |
| | | <td><input @change="changeByb($event,'text30')" type="checkbox" :checked="chapter002.tablebyb1.text30" />不健康</td> |
| | | <td><input @change="changeByb($event,'text31')" type="checkbox" :checked="chapter002.tablebyb1.text31" />不健康</td> |
| | | <td><input @change="changeByb($event,'text32')" type="checkbox" :checked="chapter002.tablebyb1.text32" />不健康</td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | |
| | | return { |
| | | chapter002:{ |
| | | tablexyx1:{}, |
| | | |
| | | } |
| | | tablebyb1:{} |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | const localData = JSON.parse(localStorage.getItem("chapter002")); |
| | | if (localData) { |
| | | this.chapter002 = { ...Object.assign(this.chapter002, localData) }; |
| | | console.log(this.chapter002); |
| | | } |
| | | }, |
| | | methods: { |
| | | changeBox(e, val) { |
| | | this.chapter002.tablexyx1[val] = e.target.checked; |
| | | localStorage.setItem("chapter002", JSON.stringify(this.chapter002)); |
| | | }, |
| | | changeByb(e, val) { |
| | | this.chapter002.tablebyb1[val] = e.target.checked; |
| | | localStorage.setItem("chapter002", JSON.stringify(this.chapter002)); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |