|
@@ -61,22 +61,27 @@
|
|
|
v-model:open="showHistory"
|
|
|
title="历史版本"
|
|
|
placement="right"
|
|
|
- :width="showHistoryModel ? '95%' : '80%'"
|
|
|
+ :width="showHistoryModel ? (isMobile ? '100%' : '60%') : (isMobile ? '80%' : '50%')"
|
|
|
>
|
|
|
<div v-if="showHistoryModel">
|
|
|
<div class="d-flex flex-row justify-content-between">
|
|
|
<a-button :icon="h(ArrowLeftOutlined)" @click="showHistoryModel = null">返回</a-button>
|
|
|
<span>您正在查看 {{ showHistoryModel.desc }} 保存的版本</span>
|
|
|
</div>
|
|
|
- <a-spin v-if="showHistoryLoading" class="w-100 h-100" />
|
|
|
- <DynamicForm
|
|
|
- v-else
|
|
|
- :model="(showHistoryModel as any)"
|
|
|
- :options="{
|
|
|
- ...formOptions,
|
|
|
- disabled: true,
|
|
|
- }"
|
|
|
- />
|
|
|
+
|
|
|
+ <div class="main-section small-h">
|
|
|
+ <div class="content">
|
|
|
+ <a-spin v-if="showHistoryLoading" class="w-100 h-100" />
|
|
|
+ <DynamicForm
|
|
|
+ v-else
|
|
|
+ :model="(showHistoryModel as any)"
|
|
|
+ :options="{
|
|
|
+ ...formOptions,
|
|
|
+ disabled: true,
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<CommonListBlock
|
|
|
v-else
|
|
@@ -96,7 +101,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" generic="T extends DataModel, U extends DataModel">
|
|
|
-import { onMounted, ref, toRefs, type PropType, h, watch } from 'vue';
|
|
|
+import { onMounted, ref, toRefs, type PropType, h, watch, computed } from 'vue';
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
import { useWindowOnUnLoadConfirm } from '@/composeable/WindowOnUnLoad';
|
|
|
import { DynamicForm, type IDynamicFormOptions, type IDynamicFormRef } from '@imengyu/vue-dynamic-form';
|
|
@@ -108,6 +113,9 @@ import InheritorContent, { InheritorWorkInfo } from '@/api/inheritor/InheritorCo
|
|
|
import CommonListBlock from '@/components/content/CommonListBlock.vue';
|
|
|
import { waitTimeOut } from '@imengyu/imengyu-utils';
|
|
|
|
|
|
+const isMobile = computed(() => {
|
|
|
+ return window.innerWidth < 768;
|
|
|
+});
|
|
|
const props = defineProps({
|
|
|
title: {
|
|
|
type: String,
|