|
@@ -8,9 +8,11 @@ import { useWindowSize } from '@vueuse/core'
|
|
|
import ListClassify from './ListClassify.vue'
|
|
|
import CooperUserSelect from './CooperUserSelect.vue'
|
|
|
import InheritReportSearch from './InheritReportSearch.vue'
|
|
|
+import {useAuthBtn,reportManageBtn} from '@/hooks/useAuthBtn'
|
|
|
|
|
|
|
|
|
const router=useRouter()
|
|
|
+const {checkAuthBtn} = useAuthBtn()
|
|
|
|
|
|
const { width, height } = useWindowSize()
|
|
|
|
|
@@ -63,7 +65,8 @@ const reportBaseInfo=reactive({
|
|
|
cooperationType: props.defaultData?props.defaultData.cooperationType:1,//协作方式
|
|
|
cooperationUsers: props.defaultData?props.defaultData.cooperationUsers:[],
|
|
|
reportLayout: props.defaultData?props.defaultData.reportLayout:1,//报告布局
|
|
|
- isPublcPublish: props.defaultData?props.defaultData.isPublcPublish:1
|
|
|
+ isPublcPublish: props.defaultData?props.defaultData.isPublcPublish:1,
|
|
|
+ miniShow:props.defaultData ? (props.defaultData.isPublcPublish == 1 ? (props.defaultData.miniShow ? true : false): false) : true,
|
|
|
})
|
|
|
|
|
|
|
|
@@ -144,7 +147,7 @@ function handleUpdateBaseInfo() {
|
|
|
|
|
|
/* 选择继承报告 */
|
|
|
async function chooseInheritReport(item) {
|
|
|
- const { Id,Title,Abstract,Author,CollaborateType,ReportLayout,IsPublicPublish,ClassifyIdFirst,ClassifyIdSecond,ClassifyIdThird,ClassifyNameFirst,ClassifyNameSecond,ClassifyNameThird } = item;
|
|
|
+ const { Id,Title,Abstract,Author,CollaborateType,ReportLayout,IsPublicPublish,ClassifyIdFirst,ClassifyIdSecond,ClassifyIdThird,ClassifyNameFirst,ClassifyNameSecond,ClassifyNameThird,MiniShow } = item;
|
|
|
|
|
|
reportBaseInfo.title = Title;
|
|
|
reportBaseInfo.abstract = Abstract;
|
|
@@ -168,7 +171,8 @@ async function chooseInheritReport(item) {
|
|
|
id:ClassifyIdThird,
|
|
|
text:ClassifyNameThird,
|
|
|
}
|
|
|
- ]
|
|
|
+ ];
|
|
|
+ reportBaseInfo.miniShow = IsPublicPublish == 1 ? (MiniShow ? true : false) : false;
|
|
|
|
|
|
//继承的章节报告默认带出协作人
|
|
|
if(CollaborateType===1) {
|
|
@@ -242,6 +246,10 @@ async function handleSave() {
|
|
|
if(!reportBaseInfo.title) return showToast('请输入报告标题')
|
|
|
if(!reportBaseInfo.classifys.length) return showToast('请选择报告分类')
|
|
|
|
|
|
+ let miniShow = 0;
|
|
|
+ if(checkAuthBtn(reportManageBtn.reportManage_clientDisplay)){
|
|
|
+ miniShow = reportBaseInfo.isPublcPublish == 1 ? (reportBaseInfo.miniShow ? 1 : 0) : 0;
|
|
|
+ };
|
|
|
const params = {
|
|
|
AddType: reportBaseInfo.addType,
|
|
|
ClassifyIdFirst: reportBaseInfo.classifys[0]
|
|
@@ -266,7 +274,8 @@ async function handleSave() {
|
|
|
CollaborateType: reportBaseInfo.cooperationType,
|
|
|
IsPublicPublish: reportBaseInfo.isPublcPublish,
|
|
|
InheritReportId: reportBaseInfo.inheritId,
|
|
|
- GrantAdminIdList: reportBaseInfo.cooperationUsers.map(_ => _.NodeId)
|
|
|
+ GrantAdminIdList: reportBaseInfo.cooperationUsers.map(_ => _.NodeId),
|
|
|
+ MiniShow:miniShow,
|
|
|
};
|
|
|
|
|
|
|
|
@@ -314,6 +323,12 @@ async function handleSave() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const changePublicPublish = (e) => {
|
|
|
+ if(checkAuthBtn(reportManageBtn.reportManage_clientDisplay)){
|
|
|
+ reportBaseInfo.miniShow = e == 1 ? true : false;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
</script>
|
|
|
<template>
|
|
|
<div class="reportInfo-page">
|
|
@@ -428,13 +443,20 @@ async function handleSave() {
|
|
|
<van-cell-group>
|
|
|
<van-field name="radio" label="公开发布">
|
|
|
<template #input>
|
|
|
- <van-radio-group v-model="reportBaseInfo.isPublcPublish" direction="horizontal">
|
|
|
+ <van-radio-group v-model="reportBaseInfo.isPublcPublish" direction="horizontal" @change="changePublicPublish">
|
|
|
<van-radio :name="1">是</van-radio>
|
|
|
<van-radio :name="2">否</van-radio>
|
|
|
</van-radio-group>
|
|
|
</template>
|
|
|
</van-field>
|
|
|
</van-cell-group>
|
|
|
+ <van-cell-group v-if="checkAuthBtn(reportManageBtn.reportManage_clientDisplay)">
|
|
|
+ <van-field name="switch" label="客户端展示">
|
|
|
+ <template #input>
|
|
|
+ <van-switch v-model="reportBaseInfo.miniShow" size="20px" :disabled="reportBaseInfo.isPublcPublish != 1"/>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ </van-cell-group>
|
|
|
|
|
|
<div class="bot-btns">
|
|
|
<van-button class="bot-btn" type="default" @click="close"
|