Karsa 1 gadu atpakaļ
vecāks
revīzija
04b36c0148

+ 5 - 15
src/routes/modules/oldRoutes.js

@@ -182,21 +182,6 @@ export default [
           pathName: "晨报/周报",
         },
       },
-      // {
-      //   path: "reportupdate",
-      //   component: () => import("@/views/report_manage/dayWeekUpdate.vue"),
-      //   name: "更新管理",
-      //   hidden: true,
-      //   meta: {
-      //     keepAlive: false,
-      //   },
-      // },
-      // {
-      //   path: "reportlabel",
-      //   component: () => import("@/views/report_manage/tagLib.vue"),
-      //   name: "标签库",
-      //   hidden: true,
-      // },
       {
         path: "reportEnList",
         component: () =>
@@ -261,6 +246,11 @@ export default [
         name: "智能研报",
         component: () => import("@/views/smartReport/reportList.vue"),
       },
+      {
+        path: 'reportNew',
+        name:'研报列表',
+        component: () => import("@/views/report_manage/reportV2/list.vue")
+      }
     ],
   },
 

+ 13 - 0
src/views/report_manage/reportV2/common/constants.js

@@ -0,0 +1,13 @@
+import bus from '@/api/bus'
+
+//频度
+export const reportFrequencyOption = [
+  { label: bus.$i18nt.t('ReportManage.smart_annually'),value: '年度' },
+  { label: bus.$i18nt.t('ReportManage.smart_semi_annually'),value: '半年度' },
+  { label: bus.$i18nt.t('ReportManage.smart_quarterly'),value: '季度' },
+  { label: bus.$i18nt.t('ReportManage.smart_monthly'),value: '月度' },
+  { label: bus.$i18nt.t('ReportManage.smart_bi_weekly'),value: '双周度' },
+  { label: bus.$i18nt.t('ReportManage.smart_weekly'),value: '周度' },
+  { label: bus.$i18nt.t('ReportManage.smart_daily'),value: '日度' },
+  { label: bus.$i18nt.t('ReportManage.smart_irregularly'),value: '不定时' },
+]

+ 430 - 0
src/views/report_manage/reportV2/components/reportBaseInfoDia.vue

@@ -0,0 +1,430 @@
+<template>
+  <el-dialog
+    :title="$t('ReportManage.ReportList.information_title')"
+    :visible.sync="show"
+    :modal-append-to-body="false"
+    :close-on-click-modal="false"
+    :center="true"
+    v-dialogDrag
+    custom-class="dialogclass"
+    width="650px"
+    @close="handleClose"
+  >
+    <el-form
+      :model="formData"
+      :rules="rules"
+      ref="baseinfoForm"
+      class="baseinfo-form-wrap"
+    >
+      <el-form-item prop="type" label="新增方式">
+        <el-radio-group
+          v-model="formData.type"
+          :disabled="id"
+          @change="handleUpdateBaseInfo"
+        >
+          <el-radio :label="1">{{
+            $t("ReportManage.ReportList.new_report_radio")
+          }}</el-radio>
+          <el-radio :label="2">{{
+            $t("ReportManage.ReportList.inherit_report_radio")
+          }}</el-radio>
+        </el-radio-group>
+      </el-form-item>
+
+      <el-form-item prop="title" label="报告标题">
+        <el-input
+          :placeholder="$t('ReportManage.ReportList.input_title_please')"
+          v-model="formData.title"
+          style="width: 340px"
+        ></el-input>
+      </el-form-item>
+
+      <el-form-item prop="classify" label="报告分类">
+        <el-cascader
+          ref="cascader"
+          :options="classifyArr"
+          v-model="formData.classify"
+          :placeholder="$t('ReportManage.ReportList.please_select_category')"
+          size="medium"
+          style="width: 340px"
+          @change="handleUpdateBaseInfo"
+        />
+      </el-form-item>
+      
+      <el-form-item prop="abstract" label="报告摘要">
+        <el-input
+          type="textarea"
+          :placeholder="$t('ReportManage.ReportList.please_input_abstract')"
+          v-model="formData.abstract"
+          style="width: 340px"
+        ></el-input>
+      </el-form-item>
+
+      <el-form-item prop="author" label="报告作者">
+        <el-select
+          v-model="formData.author"
+          multiple
+          :placeholder="$t('ReportManage.ReportList.please_select_author')"
+          size="medium"
+          style="width: 340px"
+        >
+          <el-option
+            v-for="(item, i) in authorlist"
+            :key="i"
+            :label="item.ReportAuthor"
+            :value="item.ReportAuthor"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item prop="frequency">
+        <el-select
+          v-model="formData.frequency"
+          :placeholder="$t('ReportManage.ReportList.please_select_frequency')"
+          size="medium"
+          style="width: 340px"
+        >
+          <el-option 
+            v-for="item in reportFrequencyOption" 
+            :key="item.value"
+            :label="item.label" 
+            :value="item.value"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item prop="time" label="创建时间">
+        <el-date-picker
+          v-model="formData.time"
+          type="date"
+          value-format="yyyy-MM-dd"
+          :placeholder="$t('ReportManage.ReportList.please_select_date')"
+          size="medium"
+          :clearable="false"
+          style="width: 340px"
+        ></el-date-picker>
+      </el-form-item>
+
+      <el-form-item prop="time" label="协作方式">
+        <el-date-picker
+          v-model="formData.time"
+          type="date"
+          value-format="yyyy-MM-dd"
+          :placeholder="$t('ReportManage.ReportList.please_select_date')"
+          size="medium"
+          :clearable="false"
+          style="width: 340px"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item prop="time" label="报告布局">
+        <el-date-picker
+          v-model="formData.time"
+          type="date"
+          value-format="yyyy-MM-dd"
+          :placeholder="$t('ReportManage.ReportList.please_select_date')"
+          size="medium"
+          :clearable="false"
+          style="width: 340px"
+        ></el-date-picker>
+      </el-form-item>
+      <el-form-item prop="time" label="公开发布">
+        <el-date-picker
+          v-model="formData.time"
+          type="date"
+          value-format="yyyy-MM-dd"
+          :placeholder="$t('ReportManage.ReportList.please_select_date')"
+          size="medium"
+          :clearable="false"
+          style="width: 340px"
+        ></el-date-picker>
+      </el-form-item>
+
+    </el-form>
+    <div style="text-align: center; margin-top: 60px; margin-bottom: 40px">
+      <el-button
+        type="primary"
+        plain
+        style="width: 120px"
+        @click="handleClose"
+        >{{ $t("Dialog.cancel_btn") }}</el-button
+      >
+      <el-button type="primary" style="width: 120px" @click="handleConfirm">{{
+        $t("Dialog.confirm_btn")
+      }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import { apiSmartReport } from "@/api/modules/smartReport";
+import { reportFrequencyOption } from '../common/constants';
+export default {
+  name: "BaseInfo",
+  model: {
+    prop: "show",
+    event: "showChange",
+  },
+  props: {
+    show: {
+      type: Boolean,
+      default: false,
+    },
+    id: {
+      type: Number,
+      default: 0,
+    },
+  },
+  watch: {
+    show(n) {
+      if (!n) {
+        this.formData.type = 1;
+        this.formData.classify = [];
+        this.formData.title = "";
+        this.formData.abstract = "";
+        this.formData.author = ["投研团队"];
+        this.formData.frequency = "日度";
+        this.formData.time = this.$moment().format("YYYY-MM-DD");
+      } else {
+        if (this.id) {
+          apiSmartReport
+            .reportDetail({
+              SmartReportId: Number(this.id),
+            })
+            .then((res) => {
+              if (res.Ret === 200) {
+                this.formData.type = res.Data.AddType;
+                this.formData.classify = [
+                  res.Data.ClassifyIdFirst,
+                  res.Data.ClassifyIdSecond,
+                ];
+                this.formData.title = res.Data.Title;
+                this.formData.abstract = res.Data.Abstract;
+                this.formData.author = res.Data.Author
+                  ? res.Data.Author.split(",")
+                  : [];
+                this.formData.frequency = res.Data.Frequency;
+                this.formData.time = res.Data.CreateTime;
+              }
+            });
+        }
+      }
+    },
+  },
+  data() {
+    return {
+      reportFrequencyOption,
+      formData: {
+        type: 1,
+        classify: [],
+        title: "",
+        abstract: "",
+        author: ["投研团队"],
+        frequency: "日度",
+        time: this.$moment().format("YYYY-MM-DD") || "",
+      },
+      classifyArr: [],
+      authorlist: [],
+    };
+  },
+  computed: {
+    rules() {
+      return {
+        type: [
+          {
+            required: true,
+            message: this.$t(
+              "ReportManage.ReportList.please_report_type_select"
+            ),
+            trigger: "change",
+          },
+        ],
+        classify: [
+          {
+            required: true,
+            message: this.$t(
+              "ReportManage.ReportList.please_report_type_select"
+            ),
+            trigger: "change",
+          },
+        ],
+        title: [
+          {
+            required: true,
+            message: this.$t(
+              "ReportManage.ReportList.please_report_title_input"
+            ),
+            trigger: "blur",
+          },
+        ],
+      };
+    },
+  },
+  methods: {
+    handleClose() {
+      this.$emit("showChange", false);
+    },
+
+    handleConfirm() {
+      this.$refs.baseinfoForm.validate((valid) => {
+        if (valid) {
+          const params = {
+            AddType: this.formData.type,
+            ClassifyIdFirst: this.formData.classify[0]
+              ? this.formData.classify[0]
+              : 0,
+            ClassifyNameFirst: "",
+            ClassifyIdSecond: this.formData.classify[1]
+              ? this.formData.classify[1]
+              : 0,
+            ClassifyNameSecond: "",
+            Title: this.formData.title,
+            Abstract: this.formData.abstract,
+            Author:
+              this.formData.author.length > 0
+                ? this.formData.author.join(",")
+                : "",
+            Frequency: this.formData.frequency,
+            CreateTime: this.formData.time,
+          };
+          this.classifyArr.forEach((item) => {
+            if (item.value === params.ClassifyIdFirst) {
+              params.ClassifyNameFirst = item.label;
+              const arr = item.children || [];
+              arr.forEach((_item) => {
+                if (_item.value === params.ClassifyIdSecond) {
+                  params.ClassifyNameSecond = _item.label;
+                }
+              });
+            }
+          });
+          // 编辑
+          if (this.id) {
+            this.$emit("save", params);
+            return;
+          }
+          apiSmartReport.reportAdd(params).then((res) => {
+            if (res.Ret === 200) {
+              this.handleClose();
+              let { href } = this.$router.resolve({
+                path: "/smartReportEdit",
+                query: { id: res.Data.SmartReportId },
+              });
+              window.open(href, "_blank");
+            }
+          });
+        }
+      });
+    },
+
+    handleUpdateBaseInfo() {
+      if (this.formData.type === 1) {
+        if (this.formData.classify.length === 2) {
+          this.formData.title = this.getSelectClassifyName()[1];
+        }
+        return;
+      }
+      //获取上次报告
+      apiSmartReport
+        .getLastReport({
+          ClassifyIdFirst: this.formData.classify[0],
+          ClassifyIdSecond: this.formData.classify[1],
+        })
+        .then((res) => {
+          if (res.Ret !== 200) return;
+          if (res.Data == null) {
+            this.$message.warning(
+              this.$t("ReportManage.ReportList.no_reports_msg")
+            );
+            return false;
+          }
+          this.formData.title = res.Data.Title;
+          this.formData.abstract = res.Data.Abstract;
+          this.formData.author = res.Data.Author
+            ? res.Data.Author.split(",")
+            : "";
+          this.formData.frequency = res.Data.Frequency;
+        });
+    },
+
+    // 获取选择的分类名称
+    getSelectClassifyName() {
+      let arr = [];
+      this.classifyArr.forEach((item) => {
+        if (
+          this.formData.classify[0] &&
+          item.value === this.formData.classify[0]
+        ) {
+          arr.push(item.label);
+          if (item.children && item.children.length > 0) {
+            item.children.forEach((_item) => {
+              if (
+                this.formData.classify[1] &&
+                _item.value === this.formData.classify[1]
+              ) {
+                arr.push(_item.label);
+              }
+            });
+          }
+        }
+      });
+      return arr;
+    },
+
+    // 获取分类
+    getclassifylist() {
+      let params = {
+        Enabled: 1,
+        KeyWord: "",
+        HideDayWeek: 1 /*不显示晨报/周报*/,
+      };
+      apiSmartReport.classifyList(params).then((res) => {
+        if (res.Ret == 200 && Array.isArray(res.Data.List)) {
+          this.classifyArr = [];
+          res.Data.List.forEach((item, index) => {
+            let newitem = {
+              label: item.ClassifyName,
+              value: item.Id,
+            };
+            if (item.Child) {
+              let childnode = [];
+              item.Child.forEach((itemchild, i) => {
+                childnode.push({
+                  label: itemchild.ClassifyName,
+                  value: itemchild.Id,
+                });
+              });
+              newitem.children = childnode;
+            }
+            this.classifyArr.push(newitem);
+          });
+        }
+      });
+    },
+    // 获取作者
+    getreportauthor() {
+      apiSmartReport.reportAuthor({}).then((res) => {
+        if (res.Ret == 200) {
+          this.authorlist = res.Data.List || [];
+        }
+      });
+    },
+  },
+  mounted() {
+    this.getclassifylist();
+    this.getreportauthor();
+  },
+};
+</script>
+
+<style lang="scss">
+.baseinfo-form-wrap {
+  .el-input {
+    width: 100%;
+  }
+  .el-form-item {
+    width: 340px;
+    margin-left: auto;
+    margin-right: auto;
+  }
+}
+</style>

+ 1234 - 0
src/views/report_manage/reportV2/list.vue

@@ -0,0 +1,1234 @@
+//研报模块整合 智能研报,研报合并
+<template>
+  <div class="reportV2-list">
+     <el-card class="box-card">
+      <div slot="header" class="header">
+            <el-button
+              v-permission="permissionBtn.reportManageBtn.reportManage_reportAdd"
+              type="primary"
+              size="medium"
+              @click="showAddReport=true"
+              >{{$t('ReportManage.smart_add_report')}}</el-button
+            >
+
+            <el-input
+              @input="search"
+              :placeholder="$t('ReportManage.smart_title_creator_btn')"
+              v-model="searchform.key_word"
+              clearable
+              size="medium"
+              style="width:250px"
+              prefix-icon="el-icon-search"
+            />
+      </div>
+      <template>
+        <div class="filter-cont">
+          <el-form :inline="true" :model="searchform" @submit.native.prevent style="display:flex;">
+            <!-- 整合的筛选项 -->
+            <el-form-item label="">
+              
+              <div class="select-wrap">
+                  <div class="select-item">
+                      <el-cascader
+                          @change="filterChange"
+                          :options="classifyOptions"
+                          v-model="searchform.classifynameArr"
+                          clearable
+                          :placeholder="$t('ReportManage.smart_type_filtering')"
+                          style="width:100%;"
+                      ></el-cascader>
+                  </div>
+                  <div class="select-item">
+                      <el-select
+                          v-model="searchform.timeType"
+                          :placeholder="$t('ReportManage.smart_select_time_type_btn')"
+                          size="medium"
+                          style="width:100%;"
+                          @change="filterChange"
+                      >
+                          <el-option :label="$t('ReportManage.smart_publish_time')" value="publish_time"></el-option>
+                          <el-option :label="$t('ReportManage.smart_approval_time')" value="approve_time"></el-option>
+                          <el-option :label="$t('ReportManage.smart_update_time')" value="modify_time"></el-option>
+                      </el-select>
+                  </div>
+                  <div class="select-item">
+                      <el-select
+                          @change="filterChange"
+                          v-model="searchform.frequency"
+                          :placeholder="$t('ReportManage.smart_update_frequency_filter')"
+                          size="medium"
+                          clearable
+                          style="width:100%;"
+                      >
+                          <el-option 
+                            v-for="item in reportFrequencyOption" 
+                            :key="item.value"
+                            :label="item.label" 
+                            :value="item.value"
+                          ></el-option>
+                      </el-select>
+                  </div>
+                
+                  <div class="select-item">
+                      <el-select
+                          v-model.number="searchform.publishState"
+                          :placeholder="$t('ReportManage.smart_status_filtering')"
+                          size="medium"
+                          clearable
+                          style="width:100%;"
+                          @change="filterChange"
+                      >
+                        <el-option :label="$t('ReportManage.smart_unpublished')" :value="1" v-if="!isOtherApprove"></el-option>
+                          <el-option :label="$t('ReportManage.smart_published')" :value="2"></el-option>
+                          <el-option :label="$t('ReportManage.smart_pending')" :value="3" v-if="isApprove"></el-option>
+                          <el-option :label="$t('ReportManage.smart_awaiting_approval')" :value="4" v-if="isApprove"></el-option>
+                          <el-option :label="$t('ReportManage.smart_rejected')" :value="5"></el-option>
+                          <el-option :label="$t('ReportManage.smart_approved')" :value="6"></el-option>
+                        </el-select>
+                  </div>
+                  <div class="select-item">
+                    <el-date-picker
+                      @change="filterChange"
+                      v-model="searchform.dateValue"
+                      type="daterange"
+                      unlink-panels
+                      value-format="yyyy-MM-dd"
+                      :range-separator="$t('Common.to')"
+                      :start-placeholder="$t('Common.ph_time_start')"
+                      :end-placeholder="$t('Common.ph_time_end')"
+                      size="medium"
+                      style="width: 280px"
+                    ></el-date-picker>
+                  </div>
+                  <div class="select-item">
+                      <el-select
+                          v-permission="permissionBtn.reportManageBtn.reportManage_reportList_sendTime"
+                          @change="filterChange"
+                          v-model.number="searchform.msgIsSend"
+                          :placeholder="$t('ReportManage.smart_notification_status_btn')"
+                          size="medium"
+                          clearable
+                          style="width:100%;"
+                      >
+                          <el-option :label="$t('ReportManage.smart_notification_yet_pushed')" :value="1"></el-option>
+                          <el-option :label="$t('ReportManage.smart_notification_pushed')" :value="2"></el-option>
+                      </el-select>
+                  </div>
+              </div>
+
+            </el-form-item>
+          </el-form>
+        </div>
+        
+        <el-table
+          ref="table"
+          :data="tableData"
+          v-loading="listLoading"
+          @sort-change="sortChange"
+          :element-loading-text="$t('Table.data_loading')" 
+          border
+          style="width: 100%"
+        >
+          <el-table-column
+            prop="Title"
+           :label="$t('ReportManage.smart_report_title')"
+            align="center"
+            min-width="140"
+            fixed="left"
+          >
+            <template slot-scope="scope">
+              <div @click="lookreportdtl(scope.row)">
+                <span
+                  style="cursor: pointer; color: #4099ef"
+                >{{ scope.row.Title }}</span
+                >
+                <span
+                  style="cursor: pointer; color: #4099ef"
+                  v-if="scope.row.MsgSendTime"
+                  >({{ scope.row.MsgSendTime.substring(5, 7)
+                  }}{{ scope.row.MsgSendTime.substring(8, 10) }})</span
+                >
+                <span
+                  style="cursor: pointer; color: #4099ef"
+                  v-else-if="scope.row.PublishTime"
+                  >({{ scope.row.PublishTime.substring(5, 7)
+                  }}{{ scope.row.PublishTime.substring(8, 10) }})</span
+                >
+                <span
+                  style="cursor: pointer; color: #4099ef"
+                  v-else-if="scope.row.CreateTime"
+                  >({{ scope.row.CreateTime.substring(5, 7)
+                  }}{{ scope.row.CreateTime.substring(8, 10) }})</span
+                >
+
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="Abstract"
+            :label="$t('ReportManage.smart_abstract_table')"
+            align="center"
+            min-width="140"
+            fixed="left"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column :label="$t('ReportManage.smart_report_type')" align="center" min-width="140">
+            <template slot-scope="scope"
+              >{{ scope.row.ClassifyNameFirst }}
+              <span v-if="scope.row.ClassifyNameSecond"
+                >/ {{ scope.row.ClassifyNameSecond }}</span
+              ></template
+            >
+          </el-table-column>
+          <el-table-column
+            prop="AdminRealName"
+            :label="$t('ReportManage.smart_creator_btn')"
+            align="center"
+            min-width="100"
+          ></el-table-column>
+          <el-table-column :label="$t('ReportManage.smart_status_table')" align="center" v-if="isApprove">
+            <template slot-scope="scope">
+                <span v-if="scope.row.State == '1'">{{$t('ReportManage.smart_unpublished')}}</span>
+                <span v-if="scope.row.State == '2'">{{$t('ReportManage.smart_published')}}</span>
+                <span v-if="scope.row.State == '3'">{{$t('ReportManage.smart_pending')}}</span>
+                <span v-if="scope.row.State == '4'">{{$t('ReportManage.smart_awaiting_approval')}}</span>
+                <span v-if="scope.row.State == '5'">{{$t('ReportManage.smart_rejected')}}</span>
+                <span v-if="scope.row.State == '6'">{{$t('ReportManage.smart_approved')}}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column prop="PublishTime" :label="$t('ReportManage.smart_release_approval_time')" min-width="124" align="center">
+            <template slot-scope="scope">
+                <template v-if="[1,2].includes(scope.row.State)">
+                    <span>{{scope.row.PrePublishTime?scope.row.PrePublishTime:scope.row.PublishTime|formatTime}}</span>
+                    <svg style="position: relative;top:2px" v-if="scope.row.PrePublishTime&&scope.row.State == '1'" width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+                        <path d="M15.2002 8C15.2002 4.13401 12.0662 1 8.20019 1C4.3342 1 1.20019 4.13401 1.2002 8C1.2002 11.866 4.3342 15 8.2002 15C12.0662 15 15.2002 11.866 15.2002 8ZM5.2002 10L5.2002 9L8.17491 9L11.2002 4.5L11.9073 5.20711L8.58912 10L5.2002 10Z" fill="#0052D9"/>
+                    </svg>
+                </template>
+                <template v-else>
+                    <span>{{scope.row.ApproveTime|formatTime}}</span>
+                </template>
+            </template>
+          </el-table-column>
+
+          <el-table-column v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_reportList_sendTime)"
+            prop="MsgSendTime"
+            :label="$t('ReportManage.smart_report_push_time_btn')"
+            min-width="124"
+            align="center"
+          >
+            <template slot-scope="scope">{{
+              scope.row.MsgSendTime | formatTime
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            prop="ModifyTime"
+            :label="$t('ReportManage.smart_update_time')"
+            min-width="124"
+            align="center"
+            :formatter="formatterColumn"
+          ></el-table-column>
+          <el-table-column :label="$t('ReportManage.smart_issue_number_btn')" align="center">
+            <template slot-scope="scope">第{{ scope.row.Stage }}期</template>
+          </el-table-column>
+          <el-table-column :label="$t('ReportManage.smart_frequency_btn')" align="center">
+            <template slot-scope="scope">{{ scope.row.Frequency }}</template>
+          </el-table-column>
+          <el-table-column
+            :label="hasUV?'PV / UV':'PV'"
+            align="center"
+            :render-header="renderHeader"
+            width="140"
+          >
+            <template slot-scope="scope"
+              >{{ hasUV? scope.row.Pv+'/'+scope.row.Uv:scope.row.Pv }}</template
+            >
+          </el-table-column>
+          <el-table-column :label="$t('Table.column_operations')" align="center" min-width="130" fixed="right">
+            <!-- 操作 -->
+            <template slot-scope="scope">
+              <div class="opt-btns">
+                
+                <!-- 前面的按钮 -->
+                <span v-for="bu in getbuttonList(scope.row,'f')" :key="bu.label" 
+                :class="['删除'].includes(bu.label)?'deletesty':'editsty'"
+                :style="{
+                  color:['撤销','取消发布','已推送消息'].includes(bu.label)?'red':
+                        ['音频上传'].includes(bu.label)?'#46c371':'',
+                  cursor:['已推送消息'].includes(bu.label)?'text':''
+                }"
+                @click.stop="itemclickHandle({type:bu.label,data:scope.row})">
+                  <template v-if="bu.label=='编辑中'">{{ scope.row.Editor || "" }}{{$t(bu.text)}}</template>
+                  <a :href="hostapi + '?ReportId=' + parseInt(scope.row.Id)" v-else-if="bu.label=='音频下载A'" 
+                    :download="scope.row.VideoName" style="cursor: pointer; color: #4099ef">{{$t('ReportManage.smart_audio_download_btn')}}</a>
+                  <template v-else>{{$t(bu.text)}}</template>
+                </span>
+                <!-- 后面的按钮 -->
+                <el-dropdown size="medium" placement="bottom-start" @command="itemclickHandle"
+                v-if="getbuttonList(scope.row,'b').length" style="height: 16px;">
+                  <span class="el-dropdown-link">
+                    <i class="el-icon-more el-icon--right"></i>
+                    <el-dropdown-menu slot="dropdown">
+                      <el-dropdown-item :command="{type:bu.label,data:scope.row}" 
+                      v-for="bu in getbuttonList(scope.row,'b')" :key="bu.label">
+                        <a :href="hostapi + '?ReportId=' + parseInt(scope.row.Id)" v-if="bu.label=='音频下载A'" 
+                        :download="scope.row.VideoName" style="cursor: pointer; color: #4099ef">{{$t('ReportManage.smart_audio_download_btn')}}</a>
+                        <span :class="['删除','撤销','取消发布'].includes(bu.label)?'deletesty':'editsty'" v-else
+                        :style="{
+                          color:['撤销','取消发布','已推送消息'].includes(bu.label)?'red':
+                                ['音频上传'].includes(bu.label)?'#46c371':'',
+                          cursor:['已推送消息'].includes(bu.label)?'text':''
+                        }">
+                          {{$t(bu.text)}}
+                        </span>
+                      </el-dropdown-item>
+                    </el-dropdown-menu>
+                  </span>
+                </el-dropdown>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </template>
+      
+      <el-col :span="24" class="toolbar">
+        <el-pagination
+          layout="total,prev,pager,next,jumper"
+          background
+          @current-change="handleCurrentChange"
+          :page-size="pageSize"
+          :total="total"
+          style="float: right"
+        ></el-pagination>
+      </el-col>
+    </el-card>
+
+    <!-- 新增报告基础信息 -->
+    <reportBaseInfo 
+      v-model="showAddReport" 
+      :id="0" 
+    />
+
+
+    <!-- 上传音频弹框 -->
+    <el-dialog
+      :title="$t('ReportManage.smart_audio_upload_btn')"
+      :visible.sync="uploadDialog"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+      :center="true"
+      v-dialogDrag
+      custom-class="dialogclass"
+      width="510px"
+    >
+      <div slot="title" style="display: flex; align-items: center">
+        <img
+          :src="$icons.up"
+          style="color: #fff; width: 16px; height: 16px; margin-right: 5px"
+        />
+        <span style="font-size: 16px">{{$t('ReportManage.smart_audio_upload_btn')}}</span>
+      </div>
+      <el-form
+        :model="uploadForm"
+        ref="uploadForm"
+        label-position="right"
+        label-width="0px"
+        @submit.native.prevent
+      >
+        <el-form-item label="">
+          <input
+            type="file"
+            name="file"
+            @change="fileSelected()"
+            id="file"
+            class="true-file"
+            style="display: none"
+          />
+          <el-input
+            type="text"
+            v-model="uploadForm.audioname"
+            readonly
+            :placeholder="$t('ReportManage.smart_upload_recording_btn')"
+            size="medium"
+            style="width: 350px"
+          ></el-input>
+          <el-button type="primary" size="medium" @click.native="clickinput"
+            >{{$t('ReportManage.smart_select_file')}}</el-button
+          >
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="text-align: center">
+        <el-button
+          type="primary"
+          plain
+          size="medium"
+          @click.native="uploadDialog = false"
+          >{{$t('Dialog.cancel_btn')}}</el-button
+        >
+        <el-button
+          type="primary"
+          size="medium"
+          :loading="uploadloading"
+          @click.native="uploadaudio"
+          >{{ uploadloading ? $t('ReportManage.smart_btn.uploading') : $t('ReportManage.smart_btn.upload') }}</el-button
+        >
+      </div>
+    </el-dialog>
+
+    <!-- 音频下载弹窗(晨报周报多个音频情况) -->
+    <el-dialog
+      :title="$t('ReportManage.smart_audio_download_btn')"
+      :visible.sync="downloadAudio.show"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+      :center="true"
+      v-dialogDrag
+      custom-class="dialogclass"
+      width="510px"
+    >
+      <div class="download-audio-wrap">
+        <h3
+          style="
+            text-align: center;
+            font-size: 14px;
+            margin-top: -10px;
+            margin-bottom: 10px;
+          "
+        >
+          {{ downloadAudio.title }}
+        </h3>
+        <div class="list-box">
+          <el-checkbox
+            :indeterminate="downloadAudio.select.length > 0 && !checkAllAudio"
+            v-model="checkAllAudio"
+            style="margin-bottom: 10px"
+            @change="handleDownloadAudioCheckAll"
+            >{{$t('ReportManage.smart_btn.select_all')}}</el-checkbox
+          >
+          <el-checkbox-group v-model="downloadAudio.select">
+            <el-checkbox
+              :label="item"
+              v-for="item in downloadAudio.list"
+              :key="item.ReportChapterId"
+              style="margin-bottom: 10px; display: block"
+              >{{ item.VideoName }}</el-checkbox
+            >
+          </el-checkbox-group>
+        </div>
+        <div style="text-align: center; margin: 30px 0">
+          <el-button type="primary" plain @click="downloadAudio.show = false"
+            >{{$t('Dialog.confirm_btn')}}</el-button
+          >
+          <el-button type="primary" @click="handelConfirmDownloadAudio"
+            >{{$t('Dialog.confirm_btn')}}</el-button
+          >
+        </div>
+      </div>
+    </el-dialog>
+
+
+    <!-- 批量发布弹窗 -->
+    <el-dialog
+      :title="$t('ReportManage.smart_release_prompt_btn')"
+      :visible.sync="showPublish"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+      :center="true"
+      v-dialogDrag
+      custom-class="dialogclass"
+      width="510px"
+      @close="handleClosePublish"
+    >
+      <div>
+        <div style="height: 100px; padding-top: 40px">
+          <i
+            class="el-icon-warning"
+            style="font-size: 24px; color: #e6a23c; vertical-align: middle"
+          ></i>
+          {{isDSFB?$t('ReportManage.smart_template_msg'):$t('ReportManage.smart_push_template_btn')}}
+        </div>
+        <div style="margin-bottom: 20px; text-align: center">
+          <el-button
+            type="primary"
+            plain
+            style="width: 100px"
+            @click="handleClosePublish"
+            >{{$t('Dialog.cancel_btn')}}</el-button
+          >
+          <el-button
+            type="primary"
+            style="width: 100px; margin: 0 20px"
+            @click="handlePublic(1)"
+            >{{$t('ReportManage.smart_btn.only_publish')}}</el-button
+          >
+          <el-button
+            type="primary"
+            style="width: 100px"
+            :disabled="!canPushMsg"
+            @click="handlePublic(2)"
+            >{{$t('ReportManage.smart_btn.publish_push')}}</el-button
+          >
+        </div>
+      </div>
+    </el-dialog>
+    
+  </div>
+</template>
+<script>
+import {
+  reportlist,
+  classifylist,
+  reportpublish,
+  reportpublishcancle,
+  voiceupload,
+  reportdelete,
+  sendTemplateMsg,
+  messagePushPost,
+  markReport,
+  reportMessageSend,
+  weekReportValidAudio,
+  departInterence
+} from "api/api.js";
+import {approveInterence} from '@/api/modules/approve.js';
+import reportApproveConfig from "@/mixins/reportApproveConfig.js";
+import { reportFrequencyOption } from './common/constants';
+import reportBaseInfo from './components/reportBaseInfoDia.vue';
+export default {
+  name:'reportV2',
+  components: { reportBaseInfo },
+  mixins:[reportApproveConfig],
+  computed: {
+    exportUrlDl() {
+      let url = process.env.VUE_APP_API_ROOT + "/report/report_view_record/export";
+
+      let ids = this.batches.join(",");
+      let param_token = localStorage.getItem("auth") || "";
+      return `${url}?ReportIds=${ids}&${param_token}`;
+    },
+    Role() {
+      let role = localStorage.getItem("Role") || "";
+      return role;
+    },
+    checkAllAudio() {
+      return (
+        this.downloadAudio.list.length === this.downloadAudio.select.length
+      )
+    },
+    canPushMsg() {
+      //判断是否能推送
+      if (this.batches.length == 0) return false;
+      let tag = false;
+      this.tableData.forEach((item) => {
+        if (this.batches.includes(item.Id)) {
+          if (item.MsgIsSend== 0) {
+            tag = true;
+          }
+        }
+      });
+      return tag;
+    },
+    //是否有UV
+    hasUV(){
+      return this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_reportList_uv)
+    },
+  },
+  data() {
+    return {
+      reportFrequencyOption,
+      searchform: {
+        timeType:'publish_time',
+        dateValue: "",
+        frequency: "",
+        classifynameArr: "",
+        state: "",
+        key_word: "",
+        publish_sort: "desc",
+        msgIsSend: "",
+        publishState:'',
+      },
+
+      hostapi: process.env.VUE_APP_API_ROOT + "/voice/download",
+      dayWeekAudio: process.env.VUE_APP_API_ROOT + "/voice/report/download",
+
+      PageIndex: 1,
+      total: 0,
+      pageSize: 15,
+      listLoading: false,
+      tableData: [],
+
+      classifyOptions: [],//分类options
+
+      batches: [],
+      uploadloading: false,
+      uploadDialog: false,
+      uploadForm: {
+        id: "",
+        formdata: null,
+        audioname: "",
+      },
+
+      downloadAudio: {
+        show: false,
+        title: "名称",
+        list: [],
+        select: [],
+      },
+
+      showAddReport:false,//添加研报基础信息
+
+      showPublish: false,
+      isDSFB:false,//是否为定时发布
+      tableKey:0,
+      selectNum:1,
+
+      submitId:0,//当前选择的报告id
+
+      // 列出所有的按钮
+      /*未发布——发布、编辑、删除 1
+        已发布——取消发布、推送消息/已推送消息 2
+        待提交——提交、编辑、删除 3
+        待审批——撤销 4
+        已通过——撤销、推送消息/已推送消息 6
+        已驳回——撤销 5
+
+        音频上传和下载,跟State无关
+      */
+      allButtons:[
+        {label:"发布",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_publish'),States:[1],text:'ReportManage.smart_btn.publish'},
+        {label:"提交",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_publish'),States:[3],text:'ReportManage.smart_btn.submission'},
+        {label:"编辑",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_reportEdit'),States:[1,3],text:'Table.edit_btn'},
+        {label:"编辑中",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_reportEdit'),States:[1,3],text:'ReportManage.smart_btn.editing',},
+        {label:"删除",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_reportDel'),States:[1,3],text:'Table.delete_btn'},
+        {label:"取消发布",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_cancelPublish'),States:[2],text:'ReportManage.smart_btn.withdraw'},
+        {label:"撤销",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_cancelPublish'),States:[4,5,6],text:'ReportManage.smart_btn.withdraw'},
+        {label:"下载Pdf",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_exportPdf'),States:[2,6],text:'ReportManage.smart_btn.download_pdf'},
+        {label:"下载长图",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_exportImg'),States:[2,6],text:'ReportManage.smart_btn.download_long_image'},
+        {label:"推送消息",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_sendMsg'),States:[2,6],text:'ReportManage.smart_push_notification_btn'},
+        {label:"已推送消息",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_sendMsg'),States:[2,6],text:'ReportManage.smart_notification_pushed'},
+        {label:"音频上传",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_audioUpload'),States:true,text:'ReportManage.smart_audio_upload_btn'},
+        {label:"音频下载A",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_audioDownload'),States:true,text:'ReportManage.smart_audio_download_btn'},
+        {label:"音频下载",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_audioDownload'),States:true,text:'ReportManage.smart_audio_download_btn'},
+      ],
+
+      waterMarkStr:"",
+      publishReportCode:''
+    }
+  },
+  mounted(){
+    let PageIndex = sessionStorage.getItem("PageIndex") || false;
+    let searchform = sessionStorage.getItem("searchform") || false;
+    if (PageIndex && searchform) {
+      this.searchform = JSON.parse(searchform);
+      this.PageIndex = PageIndex;
+      sessionStorage.removeItem("PageIndex");
+      sessionStorage.removeItem("searchform");
+    }
+
+    this.getclassifylist();
+    this.getReportList();
+    this.getSystemUserInfo();
+  },
+  methods:{
+    getclassifylist() {
+      //获取分类列表
+      let params = { CurrentIndex: 0, PageSize: 1000, KeyWord: "" };
+
+      classifylist(params).then((res) => {
+        if (res.Ret == 200 && Array.isArray(res.Data.List)) {
+          this.classifyOptions = [];
+          res.Data.List.forEach(item => {
+            let newitem = {
+              label: item.ClassifyName,
+              value: item.ClassifyName,
+            };
+            if (item.Child) {
+              let childnode = [];
+              item.Child.forEach((itemchild, i) => {
+                childnode.push({
+                  label: itemchild.ClassifyName,
+                  value: itemchild.ClassifyName,
+                });
+              });
+              newitem.children = childnode;
+            }
+            this.classifyOptions.push(newitem);
+          });
+        }
+      });
+    },
+
+    getReportList() {
+       //获取列表
+      let params = {
+        CurrentIndex: this.PageIndex,
+        PageSize: this.pageSize,
+        Frequency: this.searchform.frequency,
+        ClassifyNameFirst: this.searchform.classifynameArr
+          ? this.searchform.classifynameArr[0]
+          : "",
+        ClassifyNameSecond:
+          this.searchform.classifynameArr &&
+          this.searchform.classifynameArr.length > 1
+            ? this.searchform.classifynameArr[1]
+            : "",
+        State: this.searchform.state ? this.searchform.state : null,
+        KeyWord: this.searchform.key_word,
+        MsgIsSend: this.searchform.msgIsSend,
+        // PublishSort:this.searchform.publish_sort,
+        State:this.searchform.publishState,
+        TimeType:this.searchform.timeType
+      };
+      
+      if (this.searchform.dateValue) {
+        params.StartDate = this.searchform.dateValue[0];
+        params.EndDate = this.searchform.dateValue[1];
+      }
+
+      this.listLoading = true;
+      reportlist(params).then((res) => {
+        this.listLoading = false;
+
+        if (res.Ret === 200) {
+          this.tableData = res.Data.List || [];
+          this.total = parseInt(res.Data.Paging.Totals);
+        }
+        
+      });
+    },
+
+    renderHeader(h, { column, $index }) {
+      //table表头自定义
+      return h("div", { attrs: { style: "padding:0;" } }, [
+        h("span", column.label),
+        h("el-tooltip", { props: { placement: "top" } }, [
+          h(
+            "p",
+            {
+              slot: "content",
+              attrs: { style: "display:block;padding:5px 0;width:420px;" },
+            },
+            `pv:${this.$t('ReportManage.tooltip_pv_show')}`
+          ),
+          this.hasUV?h(
+            "p",
+            {
+              slot: "content",
+              attrs: { style: "display:block;padding:5px 0;width:420px;" },
+            },
+            `uv:${this.$t('ReportManage.tooltip_uv_show')}`
+          ):h(''),
+          h(
+            "el-button",
+            {
+              props: { icon: "el-icon-info" },
+              attrs: { style: "border:none;background:none" },
+            },
+            ""
+          ),
+        ]),
+      ]);
+    },
+
+    sortChange(column, prop, order) {
+
+      this.searchform.publish_sort =
+        column.order == "ascending"
+          ? "asc"
+          : column.order == "descending"
+          ? "desc"
+          : "";
+      this.filterChange();
+    },
+
+    filterChange() {
+      this.PageIndex = 1;
+      this.getReportList();
+    },
+
+    handleCurrentChange(current) {
+      //分页页码跳转
+      this.PageIndex = current;
+      this.getReportList();
+    },
+
+    // 预览报告详情
+    lookreportdtl(item) {
+      //如果没有预览权限,就不跳转
+      if(!this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_reportView)) return
+
+      // sessionStorage.setItem("reportdtl", JSON.stringify(item));
+      // let { href } = this.$router.resolve({
+      //   name: "预览报告",
+      //   query: { id: item.Id, code: item.ReportCode },
+      // });
+      // window.open(href, "_blank");
+    },
+
+
+    //下载音频弹窗
+    handleShowDownloadAudio(item) {
+      this.downloadAudio.show = true;
+      this.downloadAudio.title = item.Title;  
+      this.downloadAudio.list = item.ChapterVideoList;
+      this.downloadAudio.select = [];
+    },
+    handleDownloadAudioCheckAll(val) {
+      this.downloadAudio.select = val ? this.downloadAudio.list : [];
+    },
+    //下载音频
+    handelConfirmDownloadAudio() {
+      //批量下载音频
+      let ids = [];
+      this.downloadAudio.select.forEach((item) => {
+        ids.push(item.ReportChapterId);
+      });
+
+      const a = document.createElement("a");
+      a.style.display = "none";
+      a.setAttribute("download", "测试");
+      a.href = `${this.dayWeekAudio}?ChapterIds=${ids.join(",")}`;
+      document.body.appendChild(a);
+      a.click();
+
+    },
+
+    //唤醒上传弹窗
+    openupload(id) {
+      this.uploadForm = { id: id, formdata: null, audioname: "" };
+      this.uploadDialog = true;
+    },
+    clickinput() {
+      //上传模拟点击
+      $("#file").click();
+    },
+    fileSelected() {
+      //选择文件上传
+      const that = this;
+      if (document.getElementById("file").files[0]) {
+        let hostfile = document.getElementById("file").files[0];
+        let size = Math.floor(hostfile.size / 1024 / 1024);
+        if (size > 200) {
+          that.$message.error(this.$t('ReportManage.smart_msg.uploaded_limitation'));
+          hostfile = {};
+          return false;
+        }
+        if (
+          hostfile.name.includes(".mp3") ||
+          hostfile.name.includes(".wav") ||
+          hostfile.name.includes(".wma")
+        ) {
+          let form = new FormData();
+          form.append("file", hostfile); //hostfile.name
+          form.append("ReportId", this.uploadForm.id);
+          this.uploadForm.formdata = form;
+          this.uploadForm.audioname = hostfile.name;
+        } else {
+          that.$message.error(this.$t('ReportManage.smart_msg.upload_format'));
+        }
+      }
+    },
+    uploadaudio() {
+      if (this.uploadForm.formdata == null) {
+        this.$message.error("请选择文件");
+        return false;
+      }
+      this.uploadloading = true;
+      voiceupload(this.uploadForm.formdata).then((res) => {
+        if (res.Ret === 200) {
+          this.$message.success("上传成功");
+          this.getReportList();
+        }
+        this.uploadloading = false;
+        $("#file").val("");
+        this.uploadDialog = false;
+      });
+    },
+
+      //取消发布
+    canclepublish(item) {
+      reportpublishcancle({ ReportIds: item.Id }).then((res) => {
+        if (res.Ret === 200) {
+          this.$message.success(this.$t('MsgPrompt.operate_success_msg'));
+          this.getReportList();
+        }
+      });
+    },
+
+      //删除
+    deleteitem(item) {
+      this.$confirm(this.$t('ReportManage.smart_msg.delete_it'), this.$t('Confirm.prompt'), {
+        confirmButtonText:  this.$t('Dialog.confirm_btn'),
+        type: "warning",
+      }).then(() => {
+          reportdelete({ ReportIds: item.Id }).then((res) => {
+            if (res.Ret === 200) {
+              this.$message.success(res.Msg);
+              this.getReportList();
+            }
+          });
+        })
+        .catch(() => {});
+    },
+
+    //编辑报告
+    async editreport(item, type) {
+
+      //编辑前标记一下
+      const res = await markReport({
+        Status: 1,
+        ReportId: item.Id,
+      });
+      if (res.Ret === 200) {
+        if (res.Data.Status == 1) {
+          this.$message.warning(res.Data.Msg || "该研报正在编辑,不可重复编辑");
+          item.CanEdit = false;
+          item.Editor = res.Data.Editor || "";
+          return;
+        } else if (res.Data.Status == 0) {
+          item.CanEdit = true;
+          item.Editor = res.Data.Editor || "";
+        }
+      } else {
+        this.$message.error(res.ErrMsg || "未知错误,请稍后重试");
+        return;
+      }
+      // 晨报周报
+      if (["day", "week"].includes(item.ChapterType)) {
+        sessionStorage.setItem("dayWeek", JSON.stringify(item));
+        this.$router.push({
+          path: "/dayorweek",
+          query: {
+            reportid: item.Id,
+            isEdit: true,
+            type: item.ChapterType,
+          },
+        });
+        return;
+      }
+
+      sessionStorage.setItem("searchform", JSON.stringify(this.searchform));
+      sessionStorage.setItem("PageIndex", this.PageIndex);
+
+      this.$router.push({
+        path: item.ReportVersion === 2 ? "/editreportNew" : "/editreport",
+        query: {
+          id: item.Id,
+        },
+      });
+    },
+
+    //发布报告
+    async publishreport(item) {
+      this.batches = [];
+      this.batches.push(item.Id);
+      this.publishReportCode = item.ReportCode
+      this.isDSFB=item.PrePublishTime?true:false
+
+      // 周报不需要弹窗直接发布
+      // 2023/3/6 研报后台5.5中修改 周报校验是否上传了音频
+      if (item.ClassifyNameFirst == "周报") {
+        const validRes = await weekReportValidAudio({
+          ReportId: Number(item.Id),
+        });
+        if (validRes.Ret === 200) {
+          if (validRes.Data) {
+            this.$confirm(
+              `${this.$t('ReportManage.smart_msg.report_recording')}:${validRes.Data.join("、")},${this.$t('ReportManage.smart_msg.publish_it')}`,
+              this.$t('ReportManage.smart_msg.release_prompt'),
+              {
+                confirmButtonText: this.$t('Dialog.confirm_btn'),
+                cancelButtonText: this.$t('Dialog.cancel_btn'),
+                type: "warning",
+              }
+            )
+              .then(() => {
+                this.showPublish = true;
+              })
+              .catch(() => {});
+          } else {
+            this.showPublish = true;
+          }
+        }
+
+        return;
+      }
+      if(this.isApprove){
+        this.handlePublic(1)
+        return
+      }
+      const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)
+      if(isPost){
+          this.showPublish = true;
+      }else{
+        this.handlePublic(1)
+      }
+      
+    },
+
+    // 点击确认发布&推送报告
+    // 1 仅发布 2发布且推送
+    handlePublic(type) {
+      reportpublish({ ReportIds: this.batches.join(","),ReportUrl:this.generatePdfLinks(this.publishReportCode)}).then((res) => {
+        if (res.Ret == 200) {
+          if (type == 2) {
+            reportMessageSend({
+              ReportId: this.batches[0],
+            }).then((resMsg) => {
+              if (resMsg.Ret == 200) {
+                this.$message.success(this.$t('ReportManage.smart_msg.published_success'));
+                this.batches = [];
+                this.getReportList();
+                this.showPublish = false;
+              }
+            });
+          } else {
+            if (res.Data) {
+              this.$alert(res.Data, this.$t('ReportManage.smart_msg.release_prompt'), {
+               confirmButtonText: this.$t('Dialog.confirm_btn'),
+                callback: (action) => {},
+              });
+            } else {
+              this.$message.success(this.$t('MsgPrompt.publish_msg'));
+            }
+            this.batches = [];
+            this.getReportList();
+            this.showPublish = false;
+          }
+        }
+      });
+    },
+    generatePdfLinks(Code){
+			const baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
+			return `${baseUrl}/reportshare_pdf?code=${Code}&flag=${this.waterMarkStr}`
+		},
+
+    //取消发布
+    handleClosePublish() {
+      this.batches = [];
+      this.showPublish = false;
+    },
+
+    //提交报告
+    handleSubmitReport(item){
+        this.submitId = item.Id
+        this.$confirm(this.$t('ReportManage.smart_msg.submit_approval'),this.$t('Confirm.prompt'),{
+            confirmButtonText: this.$t('Dialog.confirm_btn'),
+            cancelButtonText: this.$t('Dialog.cancel_btn'),
+            type:'warning',
+        }).then(()=>{
+            this.submitReport()
+        })
+    },
+    submitReport(type){
+        //both:提交&推送
+        /* if(type==='submit'){ */
+            approveInterence.reportCnSubmit({
+                ReportId:Number(this.submitId)
+            }).then(res=>{
+                if(res.Ret!==200) return
+                this.$message.success(this.$t('ReportManage.smart_msg.submit_success'))
+                this.getReportList()
+            })
+        /* } */
+    },
+
+    //撤销提交报告
+    cancelReport(item){
+      this.$confirm(this.$t('ReportManage.smart_msg.revoke_approval'),this.$t('Confirm.prompt'),{
+          confirmButtonText: this.$t('Dialog.confirm_btn'),
+          cancelButtonText: this.$t('Dialog.cancel_btn'),
+      }).then(()=>{
+          approveInterence.reportCnCancel({
+              ReportId:Number(item.Id)
+          }).then(res=>{
+              if(res.Ret!==200) return 
+              this.$message.success(this.$t('ReportManage.smart_msg.revoke_success'))
+              this.getReportList()
+          })
+      })
+    },
+
+    /* 下载阅读数据 */
+    downLoadReport() {
+      if (this.batches.length == 0) {
+        this.$confirm(this.$t('ReportManage.smart_msg.select_dl_report'), this.$t('Confirm.prompt'), {
+          type: "warning",
+          showCancelButton: false,
+        })
+          .then(() => {})
+          .catch(() => {});
+        return false;
+      }
+    },
+
+    // 推送消息(同时推送模板消息和客群消息)
+    messageSend(item) {
+      reportMessageSend({ ReportId: item.Id }).then((res) => {
+        if (res.Ret === 200) {
+          this.$message.success(this.$t('ReportManage.smart_msg.push_success'));
+          item.MsgIsSend = 1;
+        }
+      });
+    },
+
+    //操作
+    itemclickHandle({type,data}){
+      switch (type) {
+        case '发布':
+          this.publishreport(data)
+          break;
+        case '提交':
+          this.handleSubmitReport(data)
+          break;
+        case '编辑':
+          this.editreport(data, 'edit')
+          break;
+        case '编辑中':
+          this.editreport(data, 'editing')
+          break;
+        case '删除':
+          this.deleteitem(data)
+          break;
+        case '取消发布':
+          this.canclepublish(data)
+          break;
+        case '撤销':
+          this.cancelReport(data)
+          break;
+        case '推送消息':
+          this.messageSend(data)
+          break;
+        case '音频上传':
+          this.openupload(data)
+          break;
+        case '音频下载':
+          this.handleShowDownloadAudio(data)
+          break;
+        case '下载Pdf':
+          this.downloadPdfImg(data,1)
+          break;
+        case '下载长图':
+          this.downloadPdfImg(data,2)
+          break;
+        default:
+          break;
+      }
+    },
+
+    getSystemUserInfo(){
+      departInterence.systemUserInfo().then(res=>{
+        if(res.Ret===200){
+          const systemUserInfo=res.Data
+          // 设置水印文案
+          let waterMarkString=''
+          if(systemUserInfo){
+            waterMarkString=`${systemUserInfo.RealName}${systemUserInfo.Mobile?systemUserInfo.Mobile:systemUserInfo.Email}`
+            waterMarkString=encodeURIComponent(waterMarkString)
+            this.waterMarkStr=Base64.encode(waterMarkString)
+          }
+        }
+      })
+    },
+
+    downloadPdfImg(row,type){
+      if(type == 1){
+          window.open(row.DetailPdfUrl,"_blank")
+      }else{
+          this.handleDownloadResource(row.DetailImgUrl,`${row.Title}`)
+      }
+    },
+
+    // 搞成前面一部分按钮,后面一部分按钮的形式
+    getbuttonList(row,type){
+      if(!type) return []
+
+      const commonFilter=(but)=>{
+        return but.permission &&
+          (typeof(but.States)=='boolean' || but.States.includes(row.State) ) &&
+          ( row.CanEdit || (![1,3].includes(row.State)) )
+      }
+      let buttonArr=this.allButtons.filter(but =>{
+        const commonFilterPass=commonFilter(but)
+        if(but.label==='编辑中'){
+          return but.permission &&
+              (typeof(but.States)=='boolean' || but.States.includes(row.State) ) &&
+              (!row.CanEdit)
+        }else if(but.label==='推送消息'){
+          return commonFilterPass && row.MsgIsSend==0
+        }else if(but.label==='已推送消息'){
+          return commonFilterPass && row.MsgIsSend!==0
+        }else if(['音频上传'].includes(but.label)){
+          return commonFilterPass&&
+              (![this.$t('ReportManage.smart_btn.morning_paper'), this.$t('ReportManage.smart_btn.weekly')].includes(row.ClassifyNameFirst))
+        }else if(but.label==='音频下载A'){
+          return commonFilterPass &&
+              (![this.$t('ReportManage.smart_btn.morning_paper'), this.$t('ReportManage.smart_btn.weekly')].includes(row.ClassifyNameFirst))&&
+              row.VideoUrl
+        }else if(but.label==='音频下载'){
+          return commonFilterPass &&
+              [this.$t('ReportManage.smart_btn.morning_paper'), this.$t('ReportManage.smart_btn.weekly')].includes(row.ClassifyNameFirst)&&
+              row.ChapterVideoList.length > 0                    
+        }else if(but.label==='下载Pdf'){
+          return commonFilterPass && row.DetailPdfUrl    
+        }else if(but.label==='下载长图'){
+          return commonFilterPass && row.DetailImgUrl           
+        }
+
+        return commonFilterPass
+      })
+
+      if(type=='f') return buttonArr.slice(0,2)
+      else return buttonArr.slice(2)
+    },
+  },
+}
+</script>
+<style scoped lang='scss'>
+.reportV2-list {
+  .header {
+    display: flex;
+    justify-content: space-between;
+  }
+  .select-btn{
+      cursor: pointer;
+      width:130px;
+      height: 36px;
+      text-align: center;
+      background-color: #ECF2FE;
+      border-radius: 4px;
+      box-sizing: border-box;
+      line-height:36px;
+      img,span{
+        display: inline-block;
+        vertical-align: middle;
+      }
+      .select-num{
+        width:20px;
+        height:20px;
+        line-height: 20px;
+        border-radius: 50%;
+        background-color:#0052D9;
+        color:white;
+        font-size: 12px;
+      }
+  }
+
+  .select-wrap{
+      display: flex;
+      flex-wrap: wrap;
+      gap: 15px;
+      /* margin:0 20px;
+      .select-item{
+          margin-top:20px;
+      } */
+  }
+  
+  .opt-btns {
+    span,
+    a {
+      display: inline-block;
+      margin: 0 3px;
+    }
+  }
+}
+</style>

+ 23 - 0
src/views/report_manage/reportV2/normalReportEditor.vue

@@ -0,0 +1,23 @@
+<template>
+  <div>
+
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+
+    }
+  },
+  mounted(){
+
+  },
+  methods:{
+
+  },
+}
+</script>
+<style scoped lang='scss'>
+
+</style>

+ 24 - 0
src/views/report_manage/reportV2/smartReportEditor.vue

@@ -0,0 +1,24 @@
+<template>
+  <div>
+
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+
+    }
+  },
+  mounted(){
+
+  },
+  methods:{
+
+  },
+}
+
+</script>
+<style scoped lang='scss'>
+
+</style>