Browse Source

switch branch

Karsa 7 months ago
parent
commit
b0e530dcfc

+ 1 - 1
.env.development

@@ -1,5 +1,5 @@
 # 接口地址http://8.136.199.33:8610/v1   http://8.136.199.33:7778/adminapi
-VITE_APP_API_URL="http://8.136.199.33:8611/v1"
+VITE_APP_API_URL="http://8.136.199.33:7778/adminapi"
 # 路由根地址
 VITE_APP_BASE_URL="/"
 # 打包输入文件名

+ 8 - 0
src/hooks/useAuthBtn.js

@@ -10,6 +10,8 @@ export const reportManageBtn = {
     reportManage_reportDel:'reportManage:reportDel',//删除研报
     reportManage_reportEdit:'reportManage:reportEdit',//编辑研报
     reportManage_cancelPublish:'reportManage:cancelPublish',//取消发布
+    reportManage_audioDownload:'reportManage:audioDownload',//音频下载
+    reportManage_audioUpload:'reportManage:audioUpload',//音频上传
     reportManage_exportPdf:'reportManage:exportPdf',//下载pdf
     reportManage_exportImg:'reportManage:exportImg',//下载长图
     reportManage_publish:'reportManage:publish',//发布研报
@@ -18,6 +20,12 @@ export const reportManageBtn = {
     reportManage_reportList_sendTime:'reportManage:reportList:sendTime',//研报列表-报告推送时间
     reportManage_dayWeekReportAdd:'reportManage:dayWeekReportAdd',//添加晨报周报
     reportManage_reportAdd:'reportManage:reportAdd',//添加研报
+
+    reportManage_clearCont:'reportMange:clearCont',//一键清空内容
+    reportMange_chapter_add: 'reportMange:chapter:add',//章节添加
+    reportMange_chapter_sort: 'reportMange:chapter:sort',//章节排序
+    reportMange_chapter_share: 'reportMange:chapter:share',//章节分享
+    reportMange_chapter_editTag: 'reportMange:chapter:editTag',//章节添加标签
 }
 export const enReportManageBtn = {
     enReport_reportView:'enReport:reportView',//研报预览:即是否能点击研报名称跳转预览页面

+ 10 - 0
src/router/report.js

@@ -81,4 +81,14 @@ export const reportRoutes=[
             hasBackTop:true
         },
     },
+    {
+        path:"/report/addReportInfo",
+        name:"AddReportInfo",
+        component: () => import("@/views/report/addReportInfo.vue"),
+        meta: { 
+            title: "中文研报",
+            keepAlive:true,
+            hasBackTop:true
+        },
+    },
 ]

+ 207 - 0
src/views/report/AddReportInfo.vue

@@ -0,0 +1,207 @@
+<script setup>
+import moment from 'moment'
+import {ref,reactive} from 'vue'
+import { useRouter } from 'vue-router'
+import apiReport from '@/api/report'
+import { showToast } from 'vant'
+import { useWindowSize } from '@vueuse/core'
+
+
+const router=useRouter()
+
+
+const reportBaseInfo=reactive({
+    addType:'',
+    title:'',
+    author:'弘则研究',
+    createtime:moment().format('YYYY-MM-DD'),
+})
+
+</script>
+<template>
+  <div class="reportInfo-page">
+    <van-cell-group>
+      <van-cell
+        value-class="cell-con"
+        required
+        title="报告类型"
+        :value="reportBaseInfo.addType"
+        is-link
+        @click="handleShowAddType"
+      />
+    </van-cell-group>
+    <van-cell-group style="margin: 10px 0">
+      <van-cell
+        required
+        title="报告标题"
+        :label="reportBaseInfo.title"
+        is-link
+        @click="handleShowReportTitle"
+      />
+    </van-cell-group>
+    <van-cell-group>
+      <van-cell
+        required
+        title="发布时间"
+        :value="reportBaseInfo.createtime"
+        is-link
+        @click="handleShowCreatetime"
+      />
+      <van-cell
+        title="作者"
+        :value="reportBaseInfo.author"
+        is-link
+        @click="handleShowAuthor"
+      />
+    </van-cell-group>
+
+    <div class="bot-btns">
+      <van-button class="bot-btn" type="default" @click="close"
+        >取消</van-button
+      >
+      <van-button class="bot-btn" type="primary" @click="handleSave"
+        >保存</van-button
+      >
+    </div>
+  </div>
+
+  <!-- 新增方式 -->
+  <van-action-sheet
+    v-model:show="showAddTypePop"
+    cancel-text="取消"
+    close-on-click-action
+    :actions="[
+      {
+        name: '晨报',
+        value: '晨报',
+      },
+      {
+        name: '周报',
+        value: '周报',
+      },
+    ]"
+    @select="selectAddType"
+  />
+
+  <!-- 标题 -->
+  <van-popup
+    v-model:show="showReportTitlePop"
+    position="bottom"
+    :style="{ height: '100%' }"
+  >
+    <div class="input-report-title-pop">
+      <van-field v-model="temReportTitleVal" placeholder="请输入报告标题" />
+      <div class="bot-btns">
+        <van-button
+          class="bot-btn"
+          type="default"
+          @click="showReportTitlePop = false"
+          >取消</van-button
+        >
+        <van-button
+          class="bot-btn"
+          type="primary"
+          :disabled="!temReportTitleVal"
+          @click="handleConfirmReportTitle"
+          >确定</van-button
+        >
+      </div>
+    </div>
+  </van-popup>
+
+  <!-- 创建日期 -->
+  <van-popup
+    v-model:show="showCreateTimePop"
+    :position="width > 650 ? 'center' : 'bottom'"
+    :style="width > 650 ? { width: '400px' } : ''"
+    round
+  >
+    <van-calendar
+      :poppable="false"
+      :min-date="minDate"
+      :default-date="defaultDate"
+      v-model:show="showCreateTimePop"
+      title="选择创建日期"
+      @confirm="handleConfirmCreatime"
+      :style="{ height: '500px' }"
+    />
+  </van-popup>
+
+  <!-- 作者 -->
+  <van-popup
+    v-model:show="showAuthorPop"
+    position="bottom"
+    :style="{ height: '100%' }"
+  >
+    <div class="input-report-title-pop">
+      <van-field v-model="temAuthorVal" placeholder="请填写作者" />
+      <div class="bot-btns">
+        <van-button
+          class="bot-btn"
+          type="default"
+          @click="showAuthorPop = false"
+          >取消</van-button
+        >
+        <van-button
+          class="bot-btn"
+          type="primary"
+          :disabled="!temAuthorVal"
+          @click="handleConfirmAuthor"
+          >确定</van-button
+        >
+      </div>
+    </div>
+  </van-popup>
+</template>
+<style scoped lang="scss">
+.reportInfo-page{
+    height: 100dvh;
+    min-height: 95vh;
+    position: relative;
+    background: #EDEDED;
+    :deep(.cell-con){
+        flex: 2;
+    }
+    .bot-btns{
+        position: absolute;
+        bottom: 48px;
+        left: 0;
+        width: 100%;
+        text-align: center;
+    }
+}
+.bot-btn{
+    width: 315px;
+    margin: 0 10px;
+}
+.input-report-title-pop{
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    background-color: $page-bg-grey;
+    
+    .bot-btns{
+        flex-shrink: 0;
+        padding: 20px 0;
+        text-align: center;
+    }
+}
+@media screen and (min-width:$media-width){
+    .reportInfo-page{
+        height: calc(100dvh - 60px);
+        min-height: calc(95vh - 60px);
+        .bot-btns{
+            bottom: 24px;
+        }
+    }
+    .bot-btn{
+        margin: 0 10px;
+    }
+    .input-report-title-pop{
+        .bot-btns{
+            padding: 10px 0;
+        }
+    }
+}
+</style>

File diff suppressed because it is too large
+ 47 - 13
src/views/report/List.vue


+ 17 - 6
src/views/report/components/ListClassify.vue

@@ -94,12 +94,20 @@ function handleConfirm(){
             <span style="font-size:18px;font-weight:bold">选择分类</span>
             <span style="color:#0052D9" @click="handleConfirm">确定</span>
         </div>
-        <van-tree-select
-            v-model:active-id="activeId"
-            v-model:main-active-index="activeIndex"
-            :items="list"
-            @click-nav="activeId=null"
-        />
+
+        <div class="select-wrapper">
+            <van-sidebar active-key="{{ activeKey }}" bind:change="onChange">
+                <van-sidebar-item title="区域" />
+                <van-sidebar-item title="地铁" />
+            </van-sidebar>
+            <van-tree-select
+                style="flex:1"
+                v-model:active-id="activeId"
+                v-model:main-active-index="activeIndex"
+                :items="list"
+                @click-nav="activeId=null"
+            />
+        </div>
     </div>
 </template>
 
@@ -114,6 +122,9 @@ function handleConfirm(){
         padding: 0 34px;
     }
 }
+.select-wrapper {
+    display: flex;
+}
 @media screen and (min-width:$media-width){
     .report-list-classify-wrap{
         .top-box{

Some files were not shown because too many files changed in this diff