Prechádzať zdrojové kódy

Merge branch 'gn_fix'

shanbinzhang 4 mesiacov pred
rodič
commit
dd13678181

+ 1 - 1
index.html

@@ -50,7 +50,7 @@
 	<script>
 		window.addEventListener('error',(e)=>{
 			if(e.message=="Uncaught SyntaxError: Unexpected token '<'"){
-				window.alert('系统更新中,请稍后刷新重试!')
+				window.alert('系统登录异常,请强刷后重试!')
 				setTimeout(() => {
 					window.location.reload(true)
 				}, 1000);

+ 1 - 1
src/lang/modules/EtaBase/En.js

@@ -221,7 +221,7 @@ export default {
     <div>4. Here is a runnable code example (the code to fetch index data needs to be replaced according to the system query):</div>
     <br />
     <div># Fetching Index Data Code:</div>
-    <div>sql1 = f'""'SELECT data_time,\`value\` FROM edb_data_ths WHERE edb_code = 'S004414853' ;'""'</div>
+    <div>sql1 = f'""'SELECT data_time,\"value\" FROM edb_data_ths WHERE edb_code = 'S004414853' ;'""'</div>
     <div>raw = pandas_fetch_all(sql1, db)</div>
     <div># Index Calculation Method Code:</div>
     <div>raw['value'] = raw['value'] + 1</div>

+ 1 - 1
src/lang/modules/EtaBase/Zh.js

@@ -222,7 +222,7 @@ export default {
     <div>4、以下是可运行的代码示例(其中调取指标数据代码需根据系统查询替换):</div>
     <br />
     <div>#调取指标数据代码:</div>
-    <div>sql1 = f'""'SELECT data_time,\`value\` FROM edb_data_ths WHERE edb_code = 'S004414853' ;'""'</div>
+    <div>sql1 = f'""'SELECT data_time,\"value\" FROM edb_data_ths WHERE edb_code = 'S004414853' ;'""'</div>
     <div>raw = pandas_fetch_all(sql1, db)</div>
     <div>#指标计算方式代码:</div>
     <div>raw['value'] = raw['value'] + 1</div>

+ 1 - 1
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -390,7 +390,7 @@ export default {
           'present':checkPermissionBtn(pptPermission.ppt_show),
           'download':checkPermissionBtn(pptPermission.ppt_download)&&((item.State===6&&item.ReportSource===2) || item.ReportSource===1),
           'edit':checkPermissionBtn(pptPermission.ppt_save)&&item.HasAuth&&(([3,5].includes(item.State)&&item.ReportSource===2) || item.ReportSource===1),
-          'delete':checkPermissionBtn(pptPermission.ppt_del)&&item.HasAuth&&item.ReportSource===1,
+          'delete':checkPermissionBtn(pptPermission.ppt_del)&&item.ReportSource===1&&item.AdminId===this.RoleId,
       }
 
       return toolList.filter((i)=>btnAuthMap[i.key]) 

+ 11 - 14
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -1198,21 +1198,18 @@ export default {
       this.oldNum = value;
     },
     dragend() {
-        if (this.oldNum != this.newNum) {
-            let oldIndex = this.pageList.indexOf(this.oldNum);
-            let newIndex = this.pageList.indexOf(this.newNum);
-            let newItems = [...this.pageList];
-            // 删除老的节点
-            newItems.splice(oldIndex, 1); 
-            // 在列表中目标位置增加新的节点
-            newItems.splice(newIndex, 0, this.oldNum);
-            this.pageList = [...newItems];
-            this.$message.success(this.$t('Slides.move_success_msg') )
-            //如果拖动的是当前选中的item,就定位到该item
-            if(this.oldNum.id===this.currentItem.id){
-              this.changeCurrentItem(this.currentItem)
-            }
+        let oldIndex = this.pageList.findIndex(_ => _.id ===this.oldNum.id);
+        let newIndex = this.pageList.findIndex(_ => _.id ===this.newNum.id);
+        // console.log(oldIndex,newIndex)
+
+        let tempOption = _.cloneDeep(this.pageList[newIndex])
+        if(oldIndex !== newIndex) {
+          this.$set(this.pageList, newIndex, this.pageList[oldIndex])
+          this.$set(this.pageList, oldIndex, tempOption)
+          this.$message.success(this.$t('Slides.move_success_msg') )
         }
+        
+        this.currentIndex = this.pageList.findIndex(_ => _.id ===this.currentItem.id);
     },
     dragenter(e,value) {
       e.preventDefault()

+ 6 - 1
src/views/report_manage/reportV2/components/chapterEditWrapper.vue

@@ -351,7 +351,12 @@ export default {
         let str = res.Data.map(_ =>_.Title).join(',')
         return this.$message.warning(this.$t('ReportManage.ReportList.chapter_nosubmit_msg',{name: str}))
       } 
-
+      
+      tp === 'submit' && await this.$confirm('是否确认提交报告进入审批流程?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
       this.$emit('handlePublish',tp)
     },
 

+ 13 - 53
src/views/report_manage/reportV2/list.vue

@@ -412,52 +412,6 @@
         </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>
@@ -584,8 +538,8 @@ export default {
       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_reportEdit'),States:[1,3,5],text:'Table.edit_btn'},
+        {label:"编辑中",permission:this.permissionBtn.isShowBtn('reportManageBtn','reportManage_reportEdit'),States:[1,3,5],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'},
@@ -887,7 +841,7 @@ export default {
     },
 
     //发布报告
-    async publishreport(item) {
+    async publishreport(item,type) {
       this.batches = [];
       this.batches.push(item.Id);
       this.publishReportCode = item.ReportCode
@@ -896,7 +850,11 @@ export default {
       let baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
 			this.linkPdfUrl = item.ReportLayout===1 ? `${baseUrl}/reportshare_pdf` : `${baseUrl}/reportshare_smart_pdf`;
 
-      
+      type === '提交' && await this.$confirm('是否确认提交报告进入审批流程?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
       this.handlePublic(1)
       
     },
@@ -1000,7 +958,7 @@ export default {
       switch (type) {
         case '发布':
         case '提交':
-          this.publishreport(data)
+          this.publishreport(data,type)
           break;
         // case '提交':
         //   this.handleSubmitReport(data)
@@ -1058,10 +1016,12 @@ export default {
     },
 
     downloadPdfImg(row,type){
+      let name = `${row.Title}${this.$moment().format('YYYYMMDD')}`
       if(type == 1){
-          window.open(row.DetailPdfUrl,"_blank")
+          // window.open(row.DetailPdfUrl,"_blank")
+          this.handleDownloadResource(row.DetailPdfUrl,`${name}`)
       }else{
-          this.handleDownloadResource(row.DetailImgUrl,`${row.Title}`)
+          this.handleDownloadResource(row.DetailImgUrl,`${name}`)
       }
     },