lex 2 years ago
parent
commit
e718a325d0

+ 20 - 18
src/school/approval-manage/batch-adjust.tsx

@@ -170,24 +170,26 @@ export default defineComponent({
           />
         </CellGroup>
 
-        <div class={['btnGroup btnMore']} style={{ marginTop: '20px' }}>
-          <Button
-            color="#ccc"
-            round
-            onClick={() => {
-              if (browser().isApp) {
-                postMessage({ api: 'back' })
-              } else {
-                router.back()
-              }
-            }}
-          >
-            取消
-          </Button>
-          <Button color="#FF8057" round onClick={onSubmit}>
-            下一步
-          </Button>
-        </div>
+        <OPopup position="bottom">
+          <div class={['btnGroup btnMore']} style={{ marginTop: '20px' }}>
+            <Button
+              color="#ccc"
+              round
+              onClick={() => {
+                if (browser().isApp) {
+                  postMessage({ api: 'back' })
+                } else {
+                  router.back()
+                }
+              }}
+            >
+              取消
+            </Button>
+            <Button color="#FF8057" round onClick={onSubmit}>
+              下一步
+            </Button>
+          </div>
+        </OPopup>
 
         {/* 乐团列表 */}
         <Popup v-model:show={forms.orchestraStatus} position="bottom" round>

+ 3 - 0
src/school/mass-message/create-message.tsx

@@ -316,6 +316,7 @@ export default defineComponent({
             }}
             readonly
             isLink={!formDisabled.value}
+            class={styles.inputForm}
           />
           {/* 定时发送才会有时间 */}
           {forms.sendType === 'SCHEDULED' && (
@@ -330,6 +331,7 @@ export default defineComponent({
               }}
               readonly
               isLink
+              class={styles.inputForm}
             />
           )}
           <Cell title="发送内容">
@@ -369,6 +371,7 @@ export default defineComponent({
             label="发送对象"
             readonly
             inputAlign="right"
+            class={styles.sendObjPlaceholder}
             placeholder={formDisabled.value ? '' : '请选择发送对象'}
             isLink={!formDisabled.value}
             border={false}

+ 20 - 0
src/school/mass-message/index.module.less

@@ -68,6 +68,13 @@
       // padding-bottom: 3px;
     }
   }
+  .inputForm {
+    :global {
+      input {
+        color: #f67146;
+      }
+    }
+  }
 }
 .cellGroup {
   margin-top: 12px;
@@ -79,6 +86,11 @@
       font-size: 16px;
       color: #333333;
     }
+    .van-cell__right-icon {
+      font-size: 13px;
+      font-weight: bold;
+      color: #d8d8d8;
+    }
   }
 }
 
@@ -97,3 +109,11 @@
     margin-right: 12px;
   }
 }
+
+.sendObjPlaceholder {
+  :global {
+    .van-field__body {
+      font-size: 14px;
+    }
+  }
+}

+ 3 - 0
src/school/school-detail/index.module.less

@@ -63,6 +63,9 @@
         font-weight: 500;
         color: #333333;
         line-height: 21px;
+        &:last-child {
+          margin-bottom: 0;
+        }
       }
       // .eidtIcon {
       // }

+ 22 - 4
src/school/train-planning/modal/calendar/index.module.less

@@ -29,20 +29,36 @@
     }
   }
   :global {
+    .van-calendar__top-info {
+      position: relative !important;
+      height: 8px;
+      display: block;
+      width: 100%;
+    }
     .van-calendar__header {
       box-shadow: none;
     }
     .van-calendar__selected-day {
-      width: 40px !important;
+      background: transparent !important;
+      display: block;
+      width: 100% !important;
       height: 54px !important;
       border-radius: 5px;
       overflow: hidden;
       align-items: flex-start;
-      background: linear-gradient(45deg, #ffa357 0%, #ff6736 100%) !important;
+
       .van-calendar__bottom-info {
         color: #fff !important;
+
         background: #ff945c;
         box-shadow: 1px 2px 4px 0px #ff6221;
+        border-radius: 4px;
+      }
+    }
+    .van-calendar__day--selected {
+      &::after {
+        content: ' ';
+        background: linear-gradient(45deg, #ffa357 0%, #ff6736 100%) !important;
       }
     }
     .van-calendar__weekday {
@@ -51,9 +67,11 @@
     }
     .van-calendar__day {
       font-size: 20px;
+      line-height: 24px;
       font-weight: bold;
       color: #333;
-      align-items: flex-start;
+      display: block;
+      // align-items: flex-start;
       // padding-top: 6px;
 
       &::after {
@@ -80,7 +98,7 @@
       padding: 12px 0;
     }
     .van-calendar__bottom-info {
-      bottom: 6px;
+      bottom: 8px;
       background: #ffe7c8;
       border-radius: 4px;
       font-size: 11px;

+ 1 - 0
src/school/train-planning/modal/calendar/index.tsx

@@ -185,6 +185,7 @@ export default defineComponent({
           formatter={this.formatter}
           onSelect={this.onDateSelect}
           v-slots={{
+            'top-info': () => <div class={styles.topInfo}></div>,
             subtitle: () => (
               <div class={styles.subtitle}>
                 <span>{this.subtitle}</span>

+ 30 - 0
src/views/information/help-center/index.module.less

@@ -12,4 +12,34 @@
       }
     }
   }
+
+  .containerInformation {
+    .img {
+      width: 142px;
+      height: 80px;
+      border-radius: 10px;
+      overflow: hidden;
+      margin-right: 15px;
+      flex-shrink: 0;
+    }
+
+    .title {
+      font-size: 14px;
+      font-weight: 500;
+      color: #333333;
+      line-height: 21px;
+      padding-top: 5px;
+    }
+    .content {
+      font-size: 12px;
+      color: #777777;
+      line-height: 17px;
+    }
+    .time {
+      padding-bottom: 5px;
+      font-size: 12px;
+      color: #aaaaaa;
+      line-height: 17px;
+    }
+  }
 }

+ 133 - 0
src/views/information/index.tsx

@@ -0,0 +1,133 @@
+import OEmpty from '@/components/o-empty'
+import OSearch from '@/components/o-search'
+import OSticky from '@/components/o-sticky'
+import request from '@/helpers/request'
+import { state } from '@/state'
+import dayjs from 'dayjs'
+import { Cell, CellGroup, List, Image } from 'vant'
+import { defineComponent, onMounted, reactive } from 'vue'
+import { useRouter } from 'vue-router'
+import styles from './help-center/index.module.less'
+
+export default defineComponent({
+  name: 'help-center',
+  setup() {
+    const router = useRouter()
+    const form = reactive({
+      isClick: false,
+      list: [] as any,
+      listState: {
+        dataShow: true, // 判断是否有数据
+        loading: false,
+        finished: false
+      },
+      params: {
+        keyword: null,
+        status: true,
+        page: 1,
+        rows: 20
+      }
+    })
+
+    const getList = async () => {
+      try {
+        if (form.isClick) return
+        form.isClick = true
+        const res = await request.post(state.platformApi + '/sysNewsInformation/page', {
+          data: {
+            ...form.params,
+            catalogType: state.platformType
+          }
+        })
+        form.listState.loading = false
+        const result = res.data || {}
+        // 处理重复请求数据
+        if (form.list.length > 0 && result.current === 1) {
+          return
+        }
+        form.list = form.list.concat(result.rows || [])
+        form.listState.finished = result.current >= result.pages
+        form.params.page = result.current + 1
+        form.listState.dataShow = form.list.length > 0
+        form.isClick = false
+      } catch {
+        form.listState.dataShow = false
+        form.listState.finished = true
+        form.isClick = false
+      }
+    }
+
+    const onSearch = (val: any) => {
+      form.params.keyword = val
+      form.params.page = 1
+      form.list = []
+      form.listState.dataShow = true // 判断是否有数据
+      form.listState.loading = false
+      form.listState.finished = false
+      getList()
+    }
+
+    const onDetail = (item: any) => {
+      if (item.linkType === 'OUT') {
+        window.location.href = item.linkUrl
+      } else {
+        router.push({
+          path: '/information-detail',
+          query: {
+            id: item.id
+          }
+        })
+      }
+    }
+
+    onMounted(() => {
+      getList()
+    })
+    return () => (
+      <div class={styles.helpCenter}>
+        <OSticky position="top">
+          <OSearch onSearch={onSearch} />
+        </OSticky>
+
+        {form.listState.dataShow ? (
+          <List
+            v-model:loading={form.listState.loading}
+            finished={form.listState.finished}
+            finishedText=" "
+            class={[styles.container, styles.containerInformation]}
+            onLoad={getList}
+            immediateCheck={false}
+          >
+            {form.list.map((item: any) => (
+              <Cell
+                class={styles.cell}
+                onClick={() => onDetail(item)}
+                titleStyle={{
+                  display: 'flex',
+                  flexDirection: 'column',
+                  justifyContent: 'space-between'
+                }}
+              >
+                {{
+                  icon: () => <Image src={item.coverImage} class={styles.img} />,
+                  title: () => (
+                    <>
+                      <div class={[styles.title, 'van-ellipsis']}>{item.title}</div>
+                      {/* <div class={[styles.content, 'van-multi-ellipsis--l2']}>{item.memo}</div> */}
+
+                      <div class={styles.time}>
+                        {item.createTime ? dayjs(item.createTime).format('YYYY年MM月DD日') : ''}
+                      </div>
+                    </>
+                  )
+                }}
+              </Cell>
+            ))}
+          </List>
+        ) : (
+          <OEmpty btnStatus={false} classImgSize="SMALL" tips="暂无数据" />
+        )}
+      </div>
+    )
+  }
+})