Karsa před 10 měsíci
rodič
revize
6397cfc700

+ 8 - 4
src/views/report_manage/reportV2/components/chapterEditWrapper.vue

@@ -118,7 +118,7 @@
             
             <div class="card-bottom">
               <span 
-                :style="{color:item.PublishState===2&&'#67C23A'}" 
+                :style="{color:item.PublishState===2?'#67C23A':'#000'}" 
                 v-if="item.CanEdit"
               >
                 {{item.PublishState===2 ? $t('ReportManage.ReportList.chapter_has_submit') : $t('ReportManage.ReportList.chapter_no_submit') }}
@@ -304,6 +304,7 @@
       :show.sync="isOpenUploadAudio"
       :title="$t('ReportManage.smart_audio_upload_btn')"
       width="450px"
+      @close="isOpenUploadAudio=false;uploadAudioLoading=false;"
     >
         <div class="edit-tag-wrap">
             <div>
@@ -332,8 +333,8 @@
               </p>
             </div>
             <div style="margin-top:30px;text-align:center">
-                <el-button type="primary" plain @click="isOpenUploadAudio=false">{{$t('Dialog.cancel_btn')}}</el-button>
-                <el-button type="primary" @click="handleSaveAudio">{{$t('Dialog.confirm_btn')}}</el-button>
+                <el-button type="primary" plain @click="isOpenUploadAudio=false;uploadAudioLoading=false;">{{$t('Dialog.cancel_btn')}}</el-button>
+                <el-button type="primary" @click="handleSaveAudio" :loading="uploadAudioLoading">{{uploadAudioLoading ? $t('ReportManage.smart_btn.uploading') :$t('Dialog.confirm_btn')}}</el-button>
             </div>
         </div>
     </m-dialog>
@@ -419,6 +420,7 @@ export default {
 
       /* 上传录音弹窗 */
       isOpenUploadAudio: false,
+      uploadAudioLoading: false,
 
       /* 版图设置弹窗 */
       isOpenTerritorDia: false
@@ -659,11 +661,13 @@ export default {
 
     async handleSaveAudio() {
       
+      this.uploadAudioLoading = true;
       let params = new FormData();
         params.append("file", this.chapterInfo.audioFile);
         params.append("ReportChapterId", this.chapterInfo.id);
       const res = await reportV2Interface.uploadChpterAudio(params)
 
+      this.uploadAudioLoading = false;
       if(res.Ret !== 200) return
       this.isOpenUploadAudio = false;
 
@@ -708,7 +712,7 @@ export default {
 
 
     selectDefaultChapter() {
-      let firstChapter = this.chapterList.find(_ => _.CanEdit || !IsAuth)
+      let firstChapter = this.chapterList.find(_ => _.CanEdit || !_.IsAuth)
       if(firstChapter) {
         this.chooseChapter(firstChapter)
       }

+ 23 - 11
src/views/report_manage/reportV2/list.vue

@@ -251,17 +251,24 @@
               <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>
+                <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>
+
+                  <template v-if="bu.label==='撤销'">{{scope.row.HasAuth?$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>
                 <!-- 后面的按钮 -->
@@ -1129,12 +1136,12 @@ export default {
               (typeof(but.States)=='boolean' || but.States.includes(row.State) ) &&
               (!row.CanEdit)
         }else if(but.label==='推送消息'){
-          return commonFilterPass && row.MsgIsSend==0
+          return commonFilterPass && row.MsgIsSend==0 && row.HasAuth
         }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))
+              (![this.$t('ReportManage.smart_btn.morning_paper'), this.$t('ReportManage.smart_btn.weekly')].includes(row.ClassifyNameFirst))&&row.HasAuth
         }else if(but.label==='音频下载A'){
           return commonFilterPass &&
               (![this.$t('ReportManage.smart_btn.morning_paper'), this.$t('ReportManage.smart_btn.weekly')].includes(row.ClassifyNameFirst))&&
@@ -1211,3 +1218,8 @@ export default {
   }
 }
 </style>
+<style lang="scss">
+  .el-tooltip__popper {
+    max-width: 40%;
+  }
+</style>

+ 0 - 4
src/views/report_manage/reportV2/normalReport/editReport.vue

@@ -272,10 +272,6 @@ export default {
 		async handlePublishChapter() {
 			if(!$('.fr-element').html()) return this.$message.warning(/* '请输入报告内容' */this.$t('ReportManage.ReportList.report_empty_msg'))
 
-			if(!this.autoSaveFlag){
-				this.$message.error(this.$t('ReportManage.smart_msg.img_wait'))
-				return false
-			}
 			//如果富文本中有未上传完成的图片,去除这个dom
 			$('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()