4 Revize bca9714f65 ... 94ed4c31ca

Autor SHA1 Zpráva Datum
  shanbinzhang 94ed4c31ca Merge branch 'master' of http://8.136.199.33:3000/eta_front/eta_mobile_front před 1 dnem
  shanbinzhang eb6e90f1e6 Merge branch 'need_pool286' před 1 dnem
  shanbinzhang 82556945ee fix před 4 dny
  shanbinzhang 40cccab5d6 admin报告权限同创建人 před 1 měsícem

+ 10 - 11
src/views/report/chapter/List.vue

@@ -10,7 +10,6 @@ import { showToast,showDialog } from 'vant';
 import { useWindowSize } from '@vueuse/core'
 import {useCachedViewsStore} from '@/store/modules/cachedViews'
 import {usePublicSettingStore} from '@/store/modules/publicSetting'
-import EditBaseInfo from './components/EidtBaseInfo.vue'
 import ReportPublishTimeSet from '../components/ReportPublishTimeSet.vue'
 import html2canvas from "html2canvas";
 import {transfImgTobase64,isWeiXin} from '@/hooks/common'
@@ -68,7 +67,7 @@ async function handleReportBaseInfoChange(e){
 const isCreator = computed(() => {
 
     let userInfo = JSON.parse(Base64.decode(localStorage.getItem('userInfo')))
-    return userInfo.AdminId === reportInfo.value.AdminId;
+    return userInfo.AdminId===reportInfo.value.AdminId || userInfo.RoleTypeCode==='admin';
 })
 
 // 获取报告详情
@@ -553,7 +552,7 @@ async function handleConfirmSetLayout() {
                                 <div class="flex-info">
                                     <img v-if="element.PublishState==2" @click.stop="handleShowPoster(element)" class="icon icon-wx" src="@/assets/imgs/report/icon_wx.png" alt="">
 
-                                    <div class="handle-icon" @click.stop="handleOptChapterItem(element)">
+                                    <div class="handle-icon" @click.stop="handleOptChapterItem(element)" v-if="element.IsAuth">
                                         <svg width="24" height="24" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
                                             <path d="M16 8C17.1045 8 18 7.10455 18 6C18 4.89545 17.1045 4 16 4C14.8955 4 14 4.89545 14 6C14 7.10455 14.8955 8 16 8Z" fill="black" fill-opacity="0.9"/>
                                             <path d="M16 18C17.1045 18 18 17.1046 18 16C18 14.8954 17.1045 14 16 14C14.8955 14 14 14.8954 14 16C14 17.1046 14.8955 18 16 18Z" fill="black" fill-opacity="0.9"/>
@@ -571,7 +570,7 @@ async function handleConfirmSetLayout() {
             </draggable>
 
             <van-button
-                v-if="checkAuthBtn(reportManageBtn.reportMange_chapter_add)"
+                v-if="checkAuthBtn(reportManageBtn.reportMange_chapter_add)&&isCreator"
                 type="primary" 
                 :size="chapterList.length?'normal':'large'" 
                 @click="handleChapterInfo(null)"
@@ -618,12 +617,7 @@ async function handleConfirmSetLayout() {
         position="bottom"
         :style="{height:'100%'}"
     >
-        <!-- <EditBaseInfo 
-            v-if="showBaseInfoPop" 
-            :defaultData="reportInfo"
-            @close="showBaseInfoPop=false"
-            @confirm="handleUpdateBaseInfo"
-        /> -->
+
         <AddReportBaseInfoV2
             @close="showBaseInfoPop=false"
             :id="Number(route.query.id)"
@@ -668,6 +662,7 @@ async function handleConfirmSetLayout() {
             :defaultData="activeItem"
             :userOpts="userOpts"
             :varietyOpts="reportVarietyOpts"
+            :isCreator="isCreator"
             @close="showChapterBaseInfo=false"
             @confirm="handleChapterBaseInfoSave"
         />
@@ -710,7 +705,7 @@ async function handleConfirmSetLayout() {
         <div class="report-item-action-box" v-if="activeItem">
             <div class="title">{{activeItem.Title}}</div>
 
-            <div class="item" @click="handleChapterInfo(activeItem)" v-if="isCreator">基础信息</div>
+            <div class="item" @click="handleChapterInfo(activeItem)" v-if="activeItem.IsAuth">基础信息</div>
             <div class="item" @click="handleCancelChapter(activeItem)" v-if="activeItem.IsAuth&&activeItem.PublishState===2">撤销</div>
             <div class="item" @click="handleDelChapter(activeItem)" v-if="isCreator">删除</div>
             <div class="item" @click="handleShowTrendTag(activeItem)" v-permission="reportManageBtn.reportMange_chapter_editTag">添加标签</div>
@@ -1089,6 +1084,10 @@ async function handleConfirmSetLayout() {
                     height: 35px;
                 }
             }
+            .move-icon {
+                width: 40px;
+                height: 40px;
+            }
         }
     }
 

+ 4 - 3
src/views/report/chapter/components/EditChapterBaseInfo.vue

@@ -13,7 +13,8 @@ const { width, height } = useWindowSize()
 const props=defineProps({
     defaultData:null,
     userOpts: [],
-    varietyOpts:[]
+    varietyOpts:[],
+    isCreator:false
 })
 const emits=defineEmits(['close','confirm'])
 
@@ -108,7 +109,7 @@ async function handleSave(){
                 required
             />
         </van-cell-group>
-        <van-cell-group>
+        <van-cell-group v-if="isCreator">
             <van-cell 
                 value-class="cell-con"
                 title="关联品种" 
@@ -117,7 +118,7 @@ async function handleSave(){
                 @click="handleShowReportVariety"
             />
         </van-cell-group>
-        <van-cell-group>
+        <van-cell-group v-if="isCreator">
             <van-cell 
                 value-class="cell-con" 
                 title="编辑人"