123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628 |
- :host {
- --primary-color: var(--ion-color-primary);
- --background-color: #f5f5f5;
- }
- ion-header {
- ion-toolbar {
- --background: transparent;
- ion-title {
- font-size: 18px;
- font-weight: 600;
- }
- }
- }
- .survey-intro {
- padding: 20px;
- background: white;
- margin: 16px;
- border-radius: 12px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- h2 {
- margin: 0 0 12px;
- font-size: 20px;
- font-weight: 600;
- color: #333;
- }
- p {
- margin: 0;
- color: #666;
- font-size: 14px;
- line-height: 1.5;
- }
- }
- .section-container {
- background: white;
- margin: 16px;
- border-radius: 12px;
- overflow: hidden;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- .section-header {
- display: flex;
- align-items: center;
- padding: 16px;
- border-bottom: 1px solid #eee;
- ion-icon {
- font-size: 24px;
- color: var(--primary-color);
- margin-right: 12px;
- }
- h3 {
- margin: 0;
- font-size: 18px;
- font-weight: 600;
- color: #333;
- }
- }
- }
- ion-list {
- background: transparent;
- padding: 0;
- ion-item {
- --padding-start: 16px;
- --padding-end: 16px;
- --padding-top: 12px;
- --padding-bottom: 12px;
- --background: transparent;
- ion-label {
- color: #333;
- font-weight: 500;
- margin-bottom: 8px;
- }
- span {
- margin-right: 50px;
- font-size: 14px;
- margin-bottom: 20px;
- }
- ion-datetime-button {
- margin-bottom: 20px;
- }
- ion-input,
- ion-select {
- --padding-start: 0;
- --placeholder-color: #999;
- font-size: 15px;
- }
- }
- }
- .question-container {
- padding: 16px;
- border-bottom: 1px solid #eee;
- &:last-child {
- border-bottom: none;
- }
- .question-header {
- display: flex;
- align-items: flex-start;
- margin-bottom: 16px;
- .question-number {
- background: var(--primary-color);
- color: white;
- padding: 4px 8px;
- border-radius: 4px;
- font-size: 14px;
- margin-right: 12px;
- min-width: 40px;
- text-align: center;
- }
- h4 {
- margin: 0;
- font-size: 16px;
- font-weight: 500;
- color: #333;
- flex: 1;
- }
- }
- .options-container {
- padding-left: 52px;
- .option-item {
- --padding-start: 0;
- --padding-end: 0;
- --min-height: 44px;
- --background: transparent;
- ion-radio {
- margin-right: 12px;
- --color-checked: var(--primary-color);
- }
- ion-label {
- font-size: 15px;
- color: #666;
- }
- }
- }
- }
- .button-container {
- padding: 16px;
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 12px;
- margin-bottom: 32px;
- ion-button {
- margin: 0;
- height: 44px;
- --border-radius: 8px;
- ion-icon {
- margin-right: 8px;
- }
- &[color="tertiary"] {
- --background: var(--ion-color-tertiary);
- --color: white;
- &:hover {
- --background: var(--ion-color-tertiary-shade);
- }
- }
- }
- }
- .result-modal {
- --height: 90%;
- --border-radius: 20px 20px 0 0;
- .modal-header {
- ion-toolbar {
- --background: var(--ion-color-primary);
- --color: white;
- ion-title {
- font-size: 20px;
- font-weight: 600;
- }
- ion-button {
- --color: white;
- }
- }
- }
- .result-content {
- --background: #f5f5f5;
- }
- .result-container {
- padding: 20px;
- h3 {
- display: flex;
- align-items: center;
- font-size: 18px;
- font-weight: 600;
- color: #333;
- margin: 0 0 16px;
- ion-icon {
- margin-right: 8px;
- font-size: 24px;
- color: var(--ion-color-primary);
- }
- }
- .tags-section {
- background: white;
- border-radius: 16px;
- padding: 20px;
- margin-bottom: 16px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- .tags-container {
- display: flex;
- flex-wrap: wrap;
- gap: 12px;
- .interest-tag {
- display: flex;
- align-items: center;
- background: var(--ion-color-primary-light);
- color: var(--ion-color-primary);
- padding: 8px 16px;
- border-radius: 20px;
- font-size: 14px;
- ion-icon {
- margin-right: 6px;
- font-size: 16px;
- }
- }
- }
- }
- .analysis-section {
- background: white;
- border-radius: 16px;
- padding: 20px;
- margin-bottom: 16px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
- .analysis-content {
- color: #666;
- line-height: 1.6;
- font-size: 15px;
- p {
- margin: 8px 0;
- }
- }
- }
- .action-buttons {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 12px;
- margin-top: 24px;
- ion-button {
- margin: 0;
- height: 44px;
- --border-radius: 8px;
- ion-icon {
- margin-right: 8px;
- }
- }
- }
- }
- }
- // 添加动画效果
- @keyframes slideUp {
- from {
- transform: translateY(100%);
- }
- to {
- transform: translateY(0);
- }
- }
- .result-modal {
- .result-container {
- animation: slideUp 0.3s ease-out;
- }
- }
- .section-container {
- animation: fadeInUp 0.5s ease-out;
- animation-fill-mode: both;
- }
- .section-container:nth-child(2) {
- animation-delay: 0.2s;
- }
- .section-container:nth-child(3) {
- animation-delay: 0.4s;
- }
- ion-checkbox {
- margin-left: 15px;
- --size: 20px;
- --checkbox-background-checked: #1455ce;
- }
- ion-checkbox::part(container) {
- border-radius: 6px;
- border: 2px solid #1455ce;
- }
- ion-radio::part(container) {
- width: 20px;
- height: 20px;
- margin-left: 15px;
- border-radius: 6px;
- border: 2px solid #ddd;
- --checkbox-background-checked: #1455ce;
- }
- ion-radio::part(mark) {
- background: none;
- transition: none;
- transform: none;
- border-radius: 0;
- }
- ion-radio.radio-checked::part(container) {
- background: #1455ce;
- border-color: transparent;
- }
- ion-radio.radio-checked::part(mark) {
- width: 6px;
- height: 10px;
- border-width: 0px 2px 2px 0px;
- border-style: solid;
- border-color: #fff;
- transform: rotate(45deg);
- }
- .fontsize {
- font-size: 20px;
- }
- // 日期选择器样式
- .custom-datetime {
- padding: 8px 0;
- --background: var(--ion-color-light);
- border-radius: 8px;
- margin-top: 4px;
- &::part(wheel-item) {
- color: var(--ion-color-dark);
- font-size: 16px;
- }
- &::part(wheel-item active) {
- color: var(--ion-color-primary);
- font-size: 18px;
- font-weight: 600;
- }
- &::part(wheel) {
- background: var(--ion-background-color);
- border-radius: 8px;
- }
- }
- // 日期选择器头部样式
- .datetime-header {
- padding: 16px;
- font-size: 18px;
- font-weight: 600;
- color: var(--ion-color-dark);
- text-align: center;
- border-bottom: 1px solid var(--ion-color-light-shade);
- }
- // 日期选择器按钮样式
- .datetime-buttons {
- display: flex;
- justify-content: flex-end;
- padding: 8px;
- border-top: 1px solid var(--ion-color-light-shade);
- ion-button {
- margin: 0 4px;
- --padding-start: 16px;
- --padding-end: 16px;
- font-weight: 500;
- }
- }
- // 调整 ion-item 中日期选择器的样式
- ion-item {
- &.item-has-value {
- ion-datetime {
- --placeholder-color: var(--ion-color-dark);
- }
- }
- ion-datetime {
- width: 100%;
- min-height: 44px;
- --padding-start: 0;
- --padding-end: 0;
- }
- }
- .analysis-result {
- padding: 20px;
- background: #f8f9fa;
- .result-section {
- background: white;
- border-radius: 20px;
- padding: 24px;
- margin-bottom: 24px;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
- transition: transform 0.3s ease;
- &:hover {
- transform: translateY(-2px);
- }
- .section-title {
- display: flex;
- align-items: center;
- margin-bottom: 24px;
- padding-bottom: 16px;
- border-bottom: 2px solid #f0f0f0;
- ion-icon {
- font-size: 28px;
- color: var(--ion-color-primary);
- margin-right: 16px;
- }
- h2 {
- margin: 0;
- font-size: 20px;
- font-weight: 600;
- color: #333;
- letter-spacing: 0.5px;
- }
- }
- }
- .tags-section {
- .tags-wrapper {
- display: flex;
- flex-wrap: wrap;
- gap: 16px;
- .tag-item {
- display: flex;
- align-items: center;
- background: linear-gradient(135deg, var(--ion-color-primary-light), var(--ion-color-primary-tint));
- color: var(--ion-color-primary-contrast);
- padding: 12px 20px;
- border-radius: 50px;
- font-size: 16px;
- font-weight: 500;
- transition: all 0.3s ease;
- box-shadow: 0 4px 12px rgba(var(--ion-color-primary-rgb), 0.2);
- &:hover {
- transform: translateY(-3px) scale(1.02);
- box-shadow: 0 6px 16px rgba(var(--ion-color-primary-rgb), 0.3);
- }
- .tag-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 24px;
- height: 24px;
- margin-right: 8px;
- ion-icon {
- font-size: 18px;
- }
- }
- span {
- letter-spacing: 0.5px;
- }
- }
- }
- }
- .report-section {
- .content-wrapper {
- color: #444;
- line-height: 1.8;
- .analysis-item {
- display: flex;
- align-items: flex-start;
- margin-bottom: 20px;
- padding: 16px;
- background: #f8f9fa;
- border-radius: 12px;
- transition: all 0.3s ease;
- &:hover {
- background: #f0f2f5;
- transform: translateX(8px);
- }
- .bullet-point {
- flex-shrink: 0;
- width: 8px;
- height: 8px;
- border-radius: 50%;
- background: var(--ion-color-primary);
- margin-top: 8px;
- margin-right: 16px;
- }
- p {
- margin: 0;
- font-size: 15px;
- color: #333;
- line-height: 1.8;
- letter-spacing: 0.3px;
- }
- }
- }
- }
- }
- // 添加加载状态的样式
- .loading-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- min-height: 300px;
- padding: 32px;
- text-align: center;
- ion-spinner {
- width: 48px;
- height: 48px;
- --color: var(--ion-color-primary);
- margin-bottom: 24px;
- }
- h3 {
- font-size: 18px;
- font-weight: 600;
- color: #333;
- margin: 0 0 12px;
- }
- p {
- font-size: 14px;
- color: #666;
- margin: 0;
- max-width: 280px;
- line-height: 1.5;
- }
- }
- // 添加淡入动画
- @keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- .loading-container {
- animation: fadeIn 0.3s ease-out;
- }
- // 添加动画效果
- @keyframes fadeInUp {
- from {
- opacity: 0;
- transform: translateY(20px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- .result-section {
- animation: fadeInUp 0.5s ease-out forwards;
- &:nth-child(2) {
- animation-delay: 0.2s;
- }
- }
|