Browse Source

Merge branch 'need_pool286' into debug

shanbinzhang 1 day ago
parent
commit
d8eea2a841

+ 5 - 10
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';
 })
 
 // 获取报告详情
@@ -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>

+ 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="编辑人"