销售审批
This commit is contained in:
49
src/views/dataconfig/oaNews/components/viewModal.vue
Normal file
49
src/views/dataconfig/oaNews/components/viewModal.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="getTitle" @cancel="handleClose" :paddingRight="15" :bodyStyle="{ minHeight: '400px !important' }">
|
||||
<View :viewData="viewData" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, reactive } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import { add, getInfo, edit } from '/@/api/system/oa';
|
||||
import View from './View.vue'
|
||||
|
||||
import { formProps } from './newsConfig';
|
||||
|
||||
const emit = defineEmits(['success', 'register']);
|
||||
|
||||
const { notification } = useMessage();
|
||||
const { filterFormSchemaAuth } = usePermission();
|
||||
const formRef = ref();
|
||||
const state = reactive({
|
||||
formModel: {},
|
||||
isUpdate: true,
|
||||
isView: false,
|
||||
isCopy: false,
|
||||
rowId: ''
|
||||
});
|
||||
const viewData = ref({})
|
||||
const { t } = useI18n();
|
||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||
state.isUpdate = !!data?.isUpdate;
|
||||
state.isView = !!data?.isView;
|
||||
viewData.value = data.record
|
||||
setModalProps({
|
||||
destroyOnClose: true,
|
||||
maskClosable: false,
|
||||
showCancelBtn: false,
|
||||
showOkBtn: false,
|
||||
canFullscreen: true,
|
||||
width: 800
|
||||
});
|
||||
});
|
||||
|
||||
const getTitle = computed(() => (viewData.value.briefHead));
|
||||
|
||||
function handleClose() {
|
||||
}
|
||||
</script>
|
||||
@ -21,9 +21,10 @@
|
||||
</BasicTable>
|
||||
|
||||
<NewsModal @register="registerModal" @success="handleSuccess" />
|
||||
<ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
||||
<ViewModal @register="registerModalView" />
|
||||
<!-- <ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
||||
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
||||
</ModalPanel>
|
||||
</ModalPanel> -->
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@ -42,7 +43,8 @@
|
||||
import { useModal } from '/@/components/Modal';
|
||||
|
||||
import NewsModal from './components/NewsModal.vue';
|
||||
import ViewModal from './components/View.vue';
|
||||
// import ViewModal from './components/View.vue';
|
||||
import ViewModal from './components/viewModal.vue'
|
||||
import { searchFormSchema, columns } from './components/newsConfig';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { OaType } from '../../../enums/oa';
|
||||
@ -115,6 +117,7 @@
|
||||
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
||||
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const [registerModalView, { openModal:openModalView }] = useModal();
|
||||
|
||||
const [registerTable, { reload }] = useTable({
|
||||
title: '新闻列表',
|
||||
@ -211,8 +214,12 @@
|
||||
}
|
||||
|
||||
function handleView(record: Recordable) {
|
||||
viewData.value = record;
|
||||
viewOpen.value = true;
|
||||
openModalView(true, {
|
||||
isUpdate: true,
|
||||
record
|
||||
});
|
||||
// viewData.value = record;
|
||||
// viewOpen.value = true;
|
||||
}
|
||||
function handleViewClose() {
|
||||
viewOpen.value = false;
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
||||
<ViewModal @register="registerModalView" />
|
||||
<NoticesModal @register="registerModal" @success="handleSuccess" />
|
||||
<ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
||||
<!-- <ModalPanel :visible="viewOpen" :width="800" :title="viewData.briefHead" @submit="handleViewClose" @close="handleViewClose">
|
||||
<ViewModal v-if="viewOpen" :viewData="viewData" />
|
||||
</ModalPanel>
|
||||
</ModalPanel> -->
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@ -42,7 +42,8 @@
|
||||
import { useModal } from '/@/components/Modal';
|
||||
|
||||
import NoticesModal from './components/NoticesModal.vue';
|
||||
import ViewModal from './components/View.vue';
|
||||
// import ViewModal from './components/View.vue';
|
||||
import ViewModal from './components/viewModal.vue'
|
||||
import { searchFormSchema, columns } from './components/noticesConfig';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { OaType } from '../../../enums/oa';
|
||||
@ -116,7 +117,7 @@
|
||||
const formIdComputedRef = computed(() => currentRoute.value.meta.formId as string);
|
||||
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
|
||||
const [registerModalView, { openModal:openModalView }] = useModal();
|
||||
const [registerTable, { reload }] = useTable({
|
||||
title: '通知公告列表',
|
||||
api: getList,
|
||||
@ -212,8 +213,12 @@
|
||||
}
|
||||
|
||||
function handleView(record: Recordable) {
|
||||
viewData.value = record;
|
||||
viewOpen.value = true;
|
||||
openModalView(true, {
|
||||
isUpdate: true,
|
||||
record
|
||||
});
|
||||
// viewData.value = record;
|
||||
// viewOpen.value = true;
|
||||
}
|
||||
function handleViewClose() {
|
||||
viewOpen.value = false;
|
||||
|
||||
Reference in New Issue
Block a user