Răsfoiți Sursa

研报模块 暂停

bding 1 an în urmă
părinte
comite
ec343c3b67

+ 88 - 0
src/lang/modules/ReportManagement/ReportList.js

@@ -19,6 +19,50 @@ export const ReportListEn = {
   email_address: "e-mail address",
   Last_click_time: "Last click time",
   hits_btn: "Hits",
+  information_title: "Basic information",
+  new_report_radio: "New report",
+  inherit_report_radio: "Inherit report",
+  please_select_category: "Please select a category",
+  input_title_please: "Please input title",
+  please_input_abstract: "Please input abstract",
+  please_select_author: "Please select the author",
+  please_select_frequency: "Please select the frequency",
+  please_select_date: "Please select date",
+  please_report_type_select: "Please select report type",
+  please_report_category_select: "Please select report category",
+  please_report_title_input: "Please input report title",
+  no_reports_msg: "There are currently no reports for this category",
+  chart_insertion_progress: "Batch chart insertion in progress",
+  last_save_time: "Last save time",
+  click_refresh_btn: "Refresh",
+  preview_btn: "Preview",
+  save_draft_btn: "Save Draft",
+  scheduled_publish_btn: "Scheduled Publish",
+  publish_btn: "Publish",
+  submission_btn: "Submission",
+  new_method_btn: "新增方式 New method",
+  title_ipt: "标题 Title",
+  abstract_ipt: "摘要 Abstract",
+  author_select: "作者 Author",
+  frequency_select: "频度 Frequency",
+  creation_time_select: "创建时间 Creation time",
+  insert_chart_tabs: "图表插入 Insert chart",
+  chart_inventory_radio: "ETA图库 ETA Chart Inventory",
+  price_curve_radio: "商品价格曲线 Commodity price curve",
+  related_charts_radio: "相关性图表 Related Charts",
+  curve_fitting_radio: "拟合方程曲线 Curve fitting",
+  statistical_feature_radio: "统计特征 Statistical Feature",
+  intercommodity_analysis_radio: "跨品种分析 Intercommodity Analysis",
+  just_mine_radio: "只看我的 Just Mine",
+  insert_sandbox_tabs: "沙盘插入 Insert Sandbox",
+  no_reports_msg: "沙盘名称/品种 Sandbox Name/Commodity",
+  insert_table_tabs: "表格插入 Insert Table",
+  table_name_tabs: "表格名称 Table Name",
+  bulk_insertion_tabs: "MyETA批量插入 Bulk Insertion of MyETA",
+  semantic_analysis_tabs: "语义分析插入 Semantic Analysis Insertion",
+  publish_time: "发送时间 Publish Time",
+  select_date_and_time: "选择日期时间 Select Date and Time",
+  the_report_will_be_posted_on_time: "设置成功之后,研报将定时进行发送 After the schedule confirmed, the report will be posted on time",
 };
 
 /* 中文 */
@@ -38,4 +82,48 @@ export const ReportListZh = {
   email_address: "邮箱地址",
   Last_click_time: "最近点击时间",
   hits_btn: "点击量",
+  information_title: "基础信息",
+  new_report_radio: "新增报告",
+  inherit_report_radio: "继承报告",
+  please_select_category: "请选择分类",
+  input_title_please: "请输入标题",
+  please_input_abstract: "请输入摘要",
+  please_select_author: "请选择作者",
+  please_select_frequency: "请选择频度",
+  please_select_date: "请选择日期",
+  please_report_type_select: "请选择报告类型",
+  please_report_category_select: "请选择报告分类",
+  please_report_title_input: "请填写报告标题",
+  no_reports_msg: "此分类暂无报告",
+  chart_insertion_progress: "图表批量插入中... Batch chart insertion in progress",
+  last_save_time: "最近保存时间 Last save time",
+  click_refresh_btn: "一键刷新 Refresh",
+  preview_btn: "预览 Preview",
+  save_draft_btn: "存草稿  Save Draft",
+  scheduled_publish_btn: "定时发布 Scheduled Publish",
+  publish_btn: "发布 Publish",
+  submission_btn: "提交 Submission",
+  new_method_btn: "新增方式 New method",
+  title_ipt: "标题 Title",
+  abstract_ipt: "摘要 Abstract",
+  author_select: "作者 Author",
+  frequency_select: "频度 Frequency",
+  creation_time_select: "创建时间 Creation time",
+  insert_chart_tabs: "图表插入 Insert chart",
+  chart_inventory_radio: "ETA图库 ETA Chart Inventory",
+  price_curve_radio: "商品价格曲线 Commodity price curve",
+  related_charts_radio: "相关性图表 Related Charts",
+  curve_fitting_radio: "拟合方程曲线 Curve fitting",
+  statistical_feature_radio: "统计特征 Statistical Feature",
+  intercommodity_analysis_radio: "跨品种分析 Intercommodity Analysis",
+  just_mine_radio: "只看我的 Just Mine",
+  insert_sandbox_tabs: "沙盘插入 Insert Sandbox",
+  no_reports_msg: "沙盘名称/品种 Sandbox Name/Commodity",
+  insert_table_tabs: "表格插入 Insert Table",
+  table_name_tabs: "表格名称 Table Name",
+  bulk_insertion_tabs: "MyETA批量插入 Bulk Insertion of MyETA",
+  semantic_analysis_tabs: "语义分析插入 Semantic Analysis Insertion",
+  publish_time: "发送时间 Publish Time",
+  select_date_and_time: "选择日期时间 Select Date and Time",
+  the_report_will_be_posted_on_time: "设置成功之后,研报将定时进行发送 After the schedule confirmed, the report will be posted on time",
 };

+ 68 - 0
src/lang/modules/ReportManagement/SmartReport.js

@@ -75,6 +75,40 @@ export const SmartReportEn = {
     send_email: "Send email to group",
     send_log: "Group send log",
     image_download: "Image Download",
+    tooltip_pv_show: "The number of times the report has been opened, calculated once each time it is opened (only for authorized users)",
+    tooltip_uv_show:
+      "The number of people accessing the report, and the same person accessing each report is only counted once (only authorized users are counted)",
+    smart_msg: {
+      no_edit: "This research report is currently being edited and cannot be duplicated",
+      unknown_error: "Unknown error, please try again later",
+      uploaded_limitation: "The size of the uploaded file cannot exceed 200M",
+      upload_format: "The upload file format is incorrect",
+      report_recording: "Report not uploaded recording",
+      published_success: "Successfully published and pushed",
+      submit_approval: "Are you sure to submit this report for approval?",
+      revoke_approval: "Are you sure you want to revoke the approval?",
+      revoke_success: "Revoke successful",
+      submit_success: "Submitted successfully",
+      sent_success: "Successfully sent",
+      push_success: "Push successful",
+      release_prompt: "Release prompt",
+      publish_it: "Are you sure to publish it?",
+      delete_it: "Are you sure to delete it?",
+      select_dl_report: "Please select the report that needs to be downloaded",
+      is_publish_immediately: "This report has been scheduled for publication. Would you like to change it to publish immediately?",
+      report_publish_immediately: "Are you sure you want to publish now?",
+      copy_success: "Copy link successful",
+      browser_supported: "Browser not currently supported",
+      select_email_person: "Please select email recipients ",
+      email_subject: "Please input email subject",
+      email_characters: "Email subject should be within 100 characters",
+      synchronization: "Synchronization successful",
+      upload_success: "Upload Successful",
+      please_select_file: "Please select file",
+      should_published_immediately: "Should the report be published immediately?",
+      timed_release_setup: "The report has been scheduled for publication. Do you want to publish the report now?",
+      please_manually_save: "Automatic image download failed, please manually save",
+    },
   },
 };
 
@@ -152,6 +186,40 @@ export const SmartReportZh = {
     send_log: "群发日志",
     image_download: "图片下载",
   },
+  tooltip_pv_show: "报告被打开的次数,每次打开都计算一次(只统计有权限用户)",
+  tooltip_uv_show:
+    "访问报告的人数,每篇报告同一个人访问只计算一次(只统计有权限用户)",
+  smart_msg: {
+    no_edit: "该研报正在编辑,不可重复编辑",
+    unknown_error: "未知错误,请稍后重试",
+    uploaded_limitation: "上传文件大小不能大于200M",
+    upload_format: "上传文件格式不正确",
+    report_recording: "报告未上传录音",
+    published_success: "发布且推送成功",
+    submit_approval: "是否确认提交该报告进入审批流程?",
+    revoke_approval: "确定要撤销审批吗?",
+    revoke_success: "撤销成功",
+    submit_success: "提交成功",
+    sent_success: "发送成功",
+    push_success: "推送成功",
+    release_prompt: "发布提示",
+    publish_it: "确定发布吗?",
+    delete_it: "确认删除吗?",
+    select_dl_report: "请选择需要下载的报告",
+    is_publish_immediately: "该报告已设置定时发布,是否修改为立即发布?",
+    report_publish_immediately: "是否确定立即发布报告?",
+    copy_success: "复制链接成功",
+    browser_supported: "浏览器暂不支持",
+    select_email_person: "请选择需要发送邮件的人员",
+    email_subject: "请填写邮件主题",
+    email_characters: "邮件主题请控制在100个字符以内",
+    synchronization: "同步成功",
+    upload_success: "上传成功",
+    please_select_file: "请选择文件",
+    should_published_immediately: "是否立即发布报告?",
+    timed_release_setup: "该报告已设置定时发布,是否立即发布报告?",
+    please_manually_save: "自动下载图片失败,请手动保存",
+  },
 };
 
 /**t('ReportManage.smart_add_report')

+ 20 - 20
src/views/report_manage/reportEn/reportlist.vue

@@ -652,31 +652,31 @@ export default {
     },
     /* 提交报告 */
     handleSubmitReport(row){
-        this.$confirm("是否确认提交该报告进入审批流程?","提示",{
-            confirmButtonText:'确定',
-            cancelButtonText:'取消',
+        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(()=>{
             approveInterence.reportEnSubmit({
                 ReportId:Number(row.Id)
             }).then(res=>{
                 if(res.Ret!==200) return 
-                this.$message.success("提交成功")
+                this.$message.success(this.$t('ReportManage.smart_msg.submit_success'))
                 this.getTableData()
             })
         })
     },
     //撤销提交报告
     cancelApprove(item){
-        this.$confirm("确定要撤销审批吗?","提示",{
-            confirmButtonText:'确定',
-            cancelButtonText:'取消'
+        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.reportEnCancel({
                 ReportId:Number(item.Id)
             }).then(res=>{
                 if(res.Ret!==200) return 
-                this.$message.success("撤销成功")
+                this.$message.success(this.$t('ReportManage.smart_msg.revoke_success'))
                 this.getTableData()
             })
         })
@@ -684,11 +684,11 @@ export default {
 
     /* 发布报告 */
     publishReport(item) {
-      this.$confirm(item.PrePublishTime?'该报告已设置定时发布,是否修改为立即发布?':'是否确定立即发布报告?','提示',{type: 'warning'}).then(()=>{
+      this.$confirm(item.PrePublishTime? this.$t('ReportManage.smart_msg.is_publish_immediately'):his.$t('ReportManage.smart_msg.report_publish_immediately'),this.$t('Confirm.prompt'),{type: 'warning'}).then(()=>{
 
 				reportEnInterface.reportPublish({ReportIds:String(item.Id)}).then(res=>{
           if(res.Ret!==200) return
-          this.$message.success('发布成功');
+          this.$message.success(this.$t('MsgPrompt.publish_msg'));
           this.getTableData();
         })
         
@@ -703,7 +703,7 @@ export default {
         // if(res.Ret!==200) return 
         if(res.Ret===200){
           if(res.Data.Status==1){
-            this.$message.warning(res.Data.Msg || '该研报正在编辑,不可重复编辑')
+            this.$message.warning(res.Data.Msg || this.$t('ReportManage.smart_msg.no_edit'))
             item.CanEdit=false;
             item.Editor=res.Data.Editor || ''
             return
@@ -712,7 +712,7 @@ export default {
             item.Editor=res.Data.Editor || ''
 				  }
 			  }else{
-          this.$message.error(res.ErrMsg || '未知错误,请稍后重试')
+          this.$message.error(res.ErrMsg || this.$t('ReportManage.smart_msg.unknown_error'))
           return
         }
         if(item.FromReportId>0){
@@ -732,7 +732,7 @@ export default {
 
     /* 删除报告 */
     delReport({Id}) {
-      this.$confirm('确认删除吗?','提示',{
+      this.$confirm(this.$t('ReportManage.smart_msg.delete_it'),this.$t('Confirm.prompt'),{
 				type:'warning'
 			}).then(() => {
 				reportEnInterface.reportDel({ReportIds: Id}).then(res =>{
@@ -757,13 +757,13 @@ export default {
     copyReportlink() {
       let clipboard = new this.Clipboard('.copylink')
 				clipboard.on('success', e => {
-					this.$message.success('复制链接成功')
+					this.$message.success(this.$t('ReportManage.smart_msg.copy_success'))
 					e.clearSelection() // 释放内存
 					clipboard.destroy()
 				})
 				// // 浏览器不支持
 				clipboard.on('error', e => {
-					this.$message.warning('浏览器暂不支持')
+					this.$message.warning(this.$t('ReportManage.smart_msg.browser_supported'))
 					// 释放内存
 					clipboard.destroy()
 				})
@@ -895,7 +895,7 @@ export default {
       })
 
       if(this.popData.checkUser&&ids.length===0){//指定人员
-        this.$message.warning('请选择需要发送邮件的人员')
+        this.$message.warning(this.$t('ReportManage.smart_msg.select_email_person'))
         return
       }
       if(!this.popData.checkUser){
@@ -903,11 +903,11 @@ export default {
       }
 
       if(!this.popData.theme){
-        this.$message.warning('请填写邮件主题')
+        this.$message.warning(this.$t('ReportManage.smart_msg.email_subject'))
         return
       }
       if(this.popData.theme.length>100){
-        this.$message.warning('邮件主题请控制在100个字符以内')
+        this.$message.warning(this.$t('ReportManage.smart_msg.email_characters'))
         return
       }
       const arr=[]
@@ -923,7 +923,7 @@ export default {
         NoCompanyIds:customIds,
       }).then(res=>{
         if(res.Ret===200){
-          this.$message.success('发送成功')
+          this.$message.success(this.$t('ReportManage.smart_msg.sent_success'))
           this.popData.show=false
           this.getTableData();
         }
@@ -938,7 +938,7 @@ export default {
         this.isPull=false
       }, 500);
       if(res.Ret===200){
-        this.$message.success('同步成功')
+        this.$message.success(this.$t('ReportManage.smart_msg.synchronization'))
         this.getTableData();
       }
     },

+ 24 - 24
src/views/report_manage/reportlist.vue

@@ -756,7 +756,7 @@ export default {
               slot: "content",
               attrs: { style: "display:block;padding:5px 0;width:420px;" },
             },
-            "pv:报告被打开的次数,每次打开都计算一次(只统计有权限用户)"
+            `pv:${this.$t('ReportManage.tooltip_pv_show')}`
           ),
           this.hasUV?h(
             "p",
@@ -764,7 +764,7 @@ export default {
               slot: "content",
               attrs: { style: "display:block;padding:5px 0;width:420px;" },
             },
-            "uv:访问报告的人数,每篇报告同一个人访问只计算一次(只统计有权限用户)"
+            `uv:${this.$t('ReportManage.tooltip_uv_show')}`
           ):h(''),
           h(
             "el-button",
@@ -850,7 +850,7 @@ export default {
         let hostfile = document.getElementById("file").files[0];
         let size = Math.floor(hostfile.size / 1024 / 1024);
         if (size > 200) {
-          that.$message.error("上传文件大小不能大于200M!");
+          that.$message.error(this.$t('ReportManage.smart_msg.uploaded_limitation'));
           hostfile = {};
           return false;
         }
@@ -865,7 +865,7 @@ export default {
           this.uploadForm.formdata = form;
           this.uploadForm.audioname = hostfile.name;
         } else {
-          that.$message.error("上传文件格式不正确!");
+          that.$message.error(this.$t('ReportManage.smart_msg.upload_format'));
         }
       }
     },
@@ -924,7 +924,7 @@ export default {
     },
     deleteitem(item) {
       //删除
-      this.$confirm("确认删除吗?", "提示", {
+      this.$confirm(this.$t('ReportManage.smart_msg.delete_it'), this.$t('Confirm.prompt'), {
         type: "warning",
       })
         .then(() => {
@@ -952,11 +952,11 @@ export default {
         if (validRes.Ret === 200) {
           if (validRes.Data) {
             this.$confirm(
-              `报告未上传录音:${validRes.Data.join("、")},确定发布吗?`,
-              "发布提示",
+              `${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: "确定",
-                cancelButtonText: "取消",
+                confirmButtonText: this.$t('Dialog.confirm_btn'),
+                cancelButtonText: this.$t('Dialog.cancel_btn'),
                 type: "warning",
               }
             )
@@ -995,7 +995,7 @@ export default {
               ReportId: this.batches[0],
             }).then((resMsg) => {
               if (resMsg.Ret == 200) {
-                this.$message.success("发布且推送成功");
+                this.$message.success(this.$t('ReportManage.smart_msg.published_success'));
                 this.batches = [];
                 this.getlist();
                 this.showPublish = false;
@@ -1004,12 +1004,12 @@ export default {
             });
           } else {
             if (res.Data) {
-              this.$alert(res.Data, "发布提示", {
-                confirmButtonText: "确定",
+              this.$alert(res.Data, this.$t('ReportManage.smart_msg.release_prompt'), {
+               confirmButtonText: this.$t('Dialog.confirm_btn'),
                 callback: (action) => {},
               });
             } else {
-              this.$message.success("发布成功");
+              this.$message.success(this.$t('MsgPrompt.publish_msg'));
             }
             this.batches = [];
             this.getlist();
@@ -1027,9 +1027,9 @@ export default {
     //提交报告
     handleSubmitReport(item){
         this.submitId = item.Id
-        this.$confirm("是否确认提交该报告进入审批流程?","提示",{
-            confirmButtonText:'确定',
-            cancelButtonText:'取消',
+        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("submit")
@@ -1043,22 +1043,22 @@ export default {
                 ReportId:Number(this.submitId)
             }).then(res=>{
                 if(res.Ret!==200) return
-                this.$message.success("提交成功")
+                this.$message.success(this.$t('ReportManage.smart_msg.submit_success'))
                 this.getlist()
             })
         /* } */
     },
     //撤销提交报告
     cancelReport(item){
-        this.$confirm("确定要撤销审批吗?","提示",{
-            confirmButtonText:'确定',
-            cancelButtonText:'取消'
+        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.$message.success(this.$t('ReportManage.smart_msg.revoke_success'))
                 this.getlist()
             })
         })
@@ -1165,7 +1165,7 @@ export default {
     /* 下载阅读数据 */
     downLoadReport() {
       if (this.batches.length == 0) {
-        this.$confirm("请选择需要下载的报告", "提示", {
+        this.$confirm(this.$t('ReportManage.smart_msg.select_dl_report'), this.$t('Confirm.prompt'), {
           type: "warning",
           showCancelButton: false,
         })
@@ -1197,7 +1197,7 @@ export default {
       });
       if (res.Ret == 200) {
         item.ThsMsgIsSend = 1;
-        this.$message.success("发送成功");
+        this.$message.success(this.$t('ReportManage.smart_msg.sent_success'));
       }
     },
 
@@ -1205,7 +1205,7 @@ export default {
     messageSend(item) {
       reportMessageSend({ ReportId: item.Id }).then((res) => {
         if (res.Ret === 200) {
-          this.$message.success("推送成功");
+          this.$message.success(this.$t('ReportManage.smart_msg.push_success'));
           item.MsgIsSend = 1;
         }
       });

+ 30 - 26
src/views/smartReport/components/BaseInfo.vue

@@ -1,6 +1,6 @@
 <template>
     <el-dialog
-        title="基础信息"
+        :title="$t('ReportManage.ReportList.information_title')"
         :visible.sync="show"
         :modal-append-to-body="false"
         :close-on-click-modal="false"
@@ -18,8 +18,8 @@
         >  
             <el-form-item prop="type">
                 <el-radio-group v-model="formData.type" :disabled="id" @change="handleUpdateBaseInfo">
-                    <el-radio :label="1">新增报告</el-radio>
-                    <el-radio :label="2">继承报告</el-radio>
+                    <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="classify">
@@ -27,23 +27,23 @@
 					ref="cascader"
 					:options="classifyArr"
 					v-model="formData.classify"
-					placeholder="请选择分类"
+					:placeholder="$t('ReportManage.ReportList.please_select_category')"
 					size="medium"
                     style="width:340px"
                     @change="handleUpdateBaseInfo"
 				/>
             </el-form-item>
             <el-form-item prop="title">
-                <el-input placeholder="请输入标题" v-model="formData.title" style="width:340px"></el-input>
+                <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="abstract">
-                <el-input type="textarea" placeholder="请输入摘要" v-model="formData.abstract" style="width:340px"></el-input>
+                <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">
 				<el-select
 					v-model="formData.author"
 					multiple
-					placeholder="请选择作者"
+					:placeholder="$t('ReportManage.ReportList.please_select_author')"
 					size="medium"
 					style="width: 340px"
 				>
@@ -58,18 +58,18 @@
             <el-form-item prop="frequency">
                 <el-select
 					v-model="formData.frequency"
-					placeholder="请选择频度"
+					:placeholder="$t('ReportManage.ReportList.please_select_frequency')"
 					size="medium"
 					style="width: 340px"
 				>
-                    <el-option label="年度" value="年度"></el-option>
-                    <el-option label="半年度" value="半年度"></el-option>
-                    <el-option label="季度" value="季度"></el-option>
-                    <el-option label="月度" value="月度"></el-option>
-                    <el-option label="双周度" value="双周度"></el-option>
-                    <el-option label="周度" value="周度"></el-option>
-                    <el-option label="日度" value="日度"></el-option>
-                    <el-option label="不定时" value="不定时"></el-option>
+                    <el-option :label="$t('ReportManage.smart_annually')" :value="$t('ReportManage.smart_annually')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_semi_annually')" :value="$t('ReportManage.smart_semi_annually')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_quarterly')" :value="$t('ReportManage.smart_quarterly')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_monthly')" :value="$t('ReportManage.smart_monthly')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_bi_weekly')" :value="$t('ReportManage.smart_bi_weekly')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_weekly')" :value="$t('ReportManage.smart_weekly')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_daily')" :value="$t('ReportManage.smart_daily')"></el-option>
+                    <el-option :label="$t('ReportManage.smart_irregularly')" :value="$t('ReportManage.smart_irregularly')"></el-option>
                 </el-select>
             </el-form-item>
             <el-form-item prop="time">
@@ -77,7 +77,7 @@
 					v-model="formData.time"
 					type="date"
 					value-format="yyyy-MM-dd"
-					placeholder="选择日期"
+					:placeholder="$t('ReportManage.ReportList.please_select_date')"
 					size="medium"
 					:clearable="false"
 					style="width: 340px"
@@ -85,8 +85,8 @@
             </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">取消</el-button>
-            <el-button type="primary" style="width:120px" @click="handleConfirm">确定</el-button>
+            <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>
@@ -140,11 +140,7 @@ export default {
     },
     data() {
         return {
-            rules:{
-                type:[{ required: true, message: '请选择报告类型', trigger: 'change' }],
-                classify:[{ required: true, message: '请选择报告分类', trigger: 'change' }],
-                title:[{ required: true, message: '请填写报告标题', trigger: 'blur' }],
-            },
+            
             formData:{
                 type:1,
                 classify:[],
@@ -158,7 +154,15 @@ export default {
             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)
@@ -228,7 +232,7 @@ export default {
             }).then(res=>{
                 if(res.Ret!==200) return
                 if (res.Data == null) {
-					this.$message.warning('此分类暂无报告');
+					this.$message.warning(this.$t('ReportManage.ReportList.no_reports_msg'));
 					return false;
 				}
                 this.formData.title=res.Data.Title

+ 20 - 20
src/views/smartReport/reportList.vue

@@ -525,7 +525,7 @@ export default {
             }
             img.onerror=(e)=>{
                 console.log(e);
-                this.$message.warning("自动下载图片失败,请手动保存")
+                this.$message.warning(this.$t('ReportManage.smart_msg.please_manually_save'))
                 if(imgUrl){
                     this.reportImgUrl=imgUrl
                     this.showReportImg=true
@@ -536,7 +536,7 @@ export default {
         // 删除某个报告
         handleDelReport(item){
             //删除
-            this.$confirm("确认删除吗?", "提示", {
+            this.$confirm(this.$t('ReportManage.smart_msg.delete_it'),this.$t('Confirm.prompt'), {
                 type: "warning",
             }).then(() => {
                 apiSmartReport.delReport({ SmartReportId: item.SmartReportId }).then((res) => {
@@ -568,11 +568,11 @@ export default {
                 return
             }
             this.$confirm(
-                item.PrePublishTime?'该报告已设置定时发布,是否立即发布报告?':'是否立即发布报告?', 
+                item.PrePublishTime? this.$t('ReportManage.smart_msg.timed_release_setup'):this.$t('ReportManage.smart_msg.should_published_immediately'), 
                 '发布提示', 
                 {
                     confirmButtonText: '发布',
-                    cancelButtonText: '取消',
+                    cancelButtonText: this.$t('Dialog.cancel_btn'),
                     type: 'warning',
                     distinguishCancelAndClose:true,
                     beforeClose:(action, instance,done)=>{
@@ -606,31 +606,31 @@ export default {
         },
         //提交报告
         handleSubmitReport(item){
-            this.$confirm("是否确认提交该报告进入审批流程?","提示",{
-                confirmButtonText:'确定',
-                cancelButtonText:'取消',
+            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(()=>{
                 approveInterence.reportSmartSubmit({
                     ReportId:Number(item.SmartReportId)
                 }).then(res=>{
                     if(res.Ret!==200) return 
-                    this.$message.success("提交成功")
+                    this.$message.success(this.$t('ReportManage.smart_msg.submit_success'))
                     this.getReportList()
                 })
             })
         },
         cancelReport(item){
-            this.$confirm("确定要撤销审批吗?","提示",{
-                confirmButtonText:'确定',
-                cancelButtonText:'取消',
+            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'),
                 type:'warning',
             }).then(()=>{
                 approveInterence.reportSmartCancel({
                     ReportId:Number(item.SmartReportId)
                 }).then(res=>{
                     if(res.Ret!==200) return 
-                    this.$message.success("撤销成功")
+                    this.$message.success(this.$t('ReportManage.smart_msg.revoke_success'))
                     this.getReportList()
                 })
             })
@@ -645,7 +645,7 @@ export default {
             });
             if (res.Ret === 200) {
                 if (res.Data.Status == 1) {
-                    this.$message.warning(res.Data.Msg || "该研报正在编辑,不可重复编辑");
+                    this.$message.warning(res.Data.Msg || this.$t('ReportManage.smart_msg.no_edit'));
                     item.CanEdit = false;
                     item.Editor = res.Data.Editor || "";
                     return;
@@ -654,7 +654,7 @@ export default {
                     item.Editor = res.Data.Editor || "";
                 }
             } else {
-                this.$message.error(res.ErrMsg || "未知错误,请稍后重试");
+                this.$message.error(res.ErrMsg || this.$t('ReportManage.smart_msg.unknown_error'));
                 return;
             }
             let { href } = this.$router.resolve({
@@ -760,7 +760,7 @@ export default {
                     slot: "content",
                     attrs: { style: "display:block;padding:5px 0;width:420px;" },
                     },
-                    "pv:报告被打开的次数,每次打开都计算一次(只统计有权限用户)"
+                    `pv:${this.$t('ReportManage.tooltip_pv_show')}`
                 ),
                 this.hasUV?h(
                     "p",
@@ -768,7 +768,7 @@ export default {
                     slot: "content",
                     attrs: { style: "display:block;padding:5px 0;width:420px;" },
                     },
-                    "uv:访问报告的人数,每篇报告同一个人访问只计算一次(只统计有权限用户)"
+                    `uv:${this.$t('ReportManage.tooltip_uv_show')}`
                 ):h(''),
                 h(
                     "el-button",
@@ -826,7 +826,7 @@ export default {
                 let hostfile = document.getElementById("file").files[0];
                 let size = Math.floor(hostfile.size / 1024 / 1024);
                 if (size > 200) {
-                    that.$message.error("上传文件大小不能大于200M!");
+                    that.$message.error(this.$t('ReportManage.smart_msg.uploaded_limitation'));
                     hostfile = {};
                     return false;
                 }
@@ -841,19 +841,19 @@ export default {
                     this.uploadForm.formdata = form;
                     this.uploadForm.audioname = hostfile.name;
                 } else {
-                    that.$message.error("上传文件格式不正确!");
+                    that.$message.error(this.$t('ReportManage.smart_msg.upload_format'));
                 }
             }
         },
         uploadaudio() {
             if (this.uploadForm.formdata == null) {
-                this.$message.error("请选择文件");
+                this.$message.error(this.$t('ReportManage.smart_msg.please_select_file'));
                 return false;
             }
             this.uploadloading = true;
             apiSmartReport.voiceupload(this.uploadForm.formdata).then((res) => {
                 if (res.Ret === 200) {
-                    this.$message.success("上传成功");
+                    this.$message.success(this.$t('ReportManage.smart_msg.upload_success'));
                     this.getReportList();
                 }
                 this.uploadloading = false;