!28 部分细节优化

Merge pull request !28 from 大熊/master
This commit is contained in:
1024创新实验室 2024-04-16 13:39:23 +00:00 committed by Gitee
commit ad8ae5bb0f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
11 changed files with 217 additions and 202 deletions

View File

@ -65,7 +65,7 @@ public class InvoiceController {
}
@Operation(summary = "删除发票信息 @author 善逸")
@GetMapping("/invoice/delete/{invoiceId}")
@GetMapping("/oa/invoice/delete/{invoiceId}")
public ResponseDTO<String> deleteInvoice(@PathVariable Long invoiceId) {
return invoiceService.deleteInvoice(invoiceId);
}

View File

@ -208,6 +208,8 @@ public class NoticeService {
}
NoticeUpdateFormVO updateFormVO = SmartBeanUtil.copy(noticeEntity, NoticeUpdateFormVO.class);
NoticeTypeVO noticeType = noticeTypeService.getByNoticeTypeId(noticeEntity.getNoticeTypeId());
updateFormVO.setNoticeTypeName(noticeType.getNoticeTypeName());
if (!updateFormVO.getAllVisibleFlag()) {
List<NoticeVisibleRangeVO> noticeVisibleRangeList = noticeDao.queryVisibleRange(noticeId);
List<Long> employeeIdList = noticeVisibleRangeList.stream().filter(e -> NoticeVisibleRangeDataTypeEnum.EMPLOYEE.getValue().equals(e.getDataType()))

View File

@ -24,7 +24,6 @@
<script setup>
import { ref } from 'vue';
import { getDownload } from '/@/lib/axios';
import { fileApi } from '/src/api/support/file-api';
import { smartSentry } from '/@/lib/smart-sentry';
import { SmartLoading } from '/@/components/framework/smart-loading';
@ -62,7 +61,7 @@
setVisible(true);
return;
}
window.open(fileItem.fileUrl);
fileApi.downLoadFile(fileItem.fileKey);
}
//

View File

@ -22,8 +22,9 @@
v-for="(item, index) in fileList"
:key="index"
:src="item.fileUrl"
:style="{ display: type === 'text' ? 'none' : '' }"
:style="{ display: type === 'text' ? 'none' : '', padding: '2px', height: '100px' }"
:width="width"
@click="preview(item, index)"
/>
</a-image-preview-group>
</a-space>
@ -31,7 +32,7 @@
</template>
<script setup>
import { ref } from 'vue';
import { getDownload } from '/@/lib/axios';
import { fileApi } from '/src/api/support/file-api';
let props = defineProps({
fileList: {
@ -45,10 +46,10 @@
type: String,
default: 'text',
},
// image
// image
width: {
type: Number,
default: 150,
default: 100,
},
// html <br/>
separator: {
@ -64,7 +65,7 @@
previewCurrent.value = index;
visible.value = true;
} else {
window.open(file.fileUrl);
fileApi.downLoadFile(file.fileKey);
}
}

View File

@ -24,7 +24,7 @@
<a-descriptions-item label="创建时间">{{ detail.createTime }}</a-descriptions-item>
<a-descriptions-item label="创建人">{{ detail.createUserName }}</a-descriptions-item>
<a-descriptions-item label="营业执照">
<FilePreview :default-file-list="detail.businessLicense" />
<FilePreview :file-list="detail.businessLicense" />
</a-descriptions-item>
</a-descriptions>
</div>

View File

@ -9,7 +9,7 @@
-->
<template>
<a-card style="margin-bottom: 15px" size="small">
<a-descriptions :title="noticeDetail.title" :columns="4" size="small">
<a-descriptions :title="noticeDetail.title" :column="4" size="small">
<template #extra>
<a-button v-if="!noticeDetail.publishFlag" type="primary" size="small" @click="onEdit">编辑</a-button>
</template>
@ -28,7 +28,7 @@
<a class="file-item" v-for="item in noticeDetail.attachment" :key="item.fileId" @click="onPrevFile(item)">{{ item.fileName }}</a>
</div>
</a-descriptions-item>
<a-descriptions-item label="可见范围" :span="2">
<a-descriptions-item label="可见范围">
<template v-if="noticeDetail.allVisibleFlag">全部可见</template>
<div class="visible-list">
<div class="visible-item" v-for="item in noticeDetail.visibleRangeList" :key="item.dataId">
@ -59,86 +59,86 @@
</template>
<script setup>
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import NoticeFormDrawer from './components/notice-form-drawer.vue';
import NoticeViewRecordList from './components/notice-view-record-list.vue';
import { noticeApi } from '/@/api/business/oa/notice-api';
import { SmartLoading } from '/@/components/framework/smart-loading';
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
import { smartSentry } from '/@/lib/smart-sentry';
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import NoticeFormDrawer from './components/notice-form-drawer.vue';
import NoticeViewRecordList from './components/notice-view-record-list.vue';
import { noticeApi } from '/@/api/business/oa/notice-api';
import { SmartLoading } from '/@/components/framework/smart-loading';
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
import { smartSentry } from '/@/lib/smart-sentry';
const route = useRoute();
const route = useRoute();
const props = defineProps({
newsType: {
type: Number,
},
});
const props = defineProps({
newsType: {
type: Number,
},
});
const activeKey = ref(1);
const activeKey = ref(1);
const noticeDetail = ref({});
const noticeViewRecordList = ref();
const noticeDetail = ref({});
const noticeViewRecordList = ref();
onMounted(() => {
if (route.query.noticeId) {
queryNoticeDetail();
noticeViewRecordList.value.onSearch();
onMounted(() => {
if (route.query.noticeId) {
queryNoticeDetail();
noticeViewRecordList.value.onSearch();
}
});
//
async function queryNoticeDetail() {
try {
SmartLoading.show();
const result = await noticeApi.getUpdateNoticeInfo(route.query.noticeId);
noticeDetail.value = result.data;
} catch (err) {
smartSentry.captureError(err);
} finally {
SmartLoading.hide();
}
}
});
//
async function queryNoticeDetail() {
try {
SmartLoading.show();
const result = await noticeApi.getUpdateNoticeInfo(route.query.noticeId);
noticeDetail.value = result.data;
} catch (err) {
smartSentry.captureError(err);
} finally {
SmartLoading.hide();
//
const noticeFormDrawerRef = ref();
function onEdit() {
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
}
}
//
const noticeFormDrawerRef = ref();
function onEdit() {
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
}
//
const filePreviewRef = ref();
function onPrevFile(fileItem) {
filePreviewRef.value.showPreview(fileItem);
}
//
const filePreviewRef = ref();
function onPrevFile(fileItem) {
filePreviewRef.value.showPreview(fileItem);
}
</script>
<style lang="less" scoped>
:deep(.ant-descriptions-item-content) {
flex: 1;
overflow: hidden;
}
.file-list {
width: 100%;
display: flex;
flex-wrap: wrap;
.file-item {
display: block;
margin-right: 10px;
:deep(.ant-descriptions-item-content) {
flex: 1;
overflow: hidden;
}
}
.visible-list {
display: flex;
flex-wrap: wrap;
.visible-item {
margin-right: 10px;
color: #666;
.file-list {
width: 100%;
display: flex;
flex-wrap: wrap;
.file-item {
display: block;
margin-right: 10px;
}
}
}
.content-html {
img {
max-width: 100%;
.visible-list {
display: flex;
flex-wrap: wrap;
.visible-item {
margin-right: 10px;
color: #666;
}
}
.content-html {
img {
max-width: 100%;
}
}
}
</style>

View File

@ -27,127 +27,119 @@
<!--endprint-->
</div>
<a-divider />
<div>附件<file-preview :fileList="noticeDetail.attachment" /></div>
<div>
附件
<file-preview v-if="!$lodash.isEmpty(noticeDetail.attachment)" :fileList="noticeDetail.attachment" />
<span v-else></span>
</div>
</a-card>
<a-card title="记录" size="small" class="smart-margin-top10">
<NoticeViewRecordList ref="noticeViewRecordList" :noticeId="route.query.noticeId" />
</a-card>
<!-- 预览附件 -->
<FilePreviewModal ref="filePreviewRef" />
</template>
<script setup>
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import NoticeViewRecordList from './components/notice-view-record-list.vue';
import { noticeApi } from '/@/api/business/oa/notice-api';
import { SmartLoading } from '/@/components/framework/smart-loading';
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
import FilePreview from '/@/components/support/file-preview/index.vue';
import { smartSentry } from '/@/lib/smart-sentry';
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import NoticeViewRecordList from './components/notice-view-record-list.vue';
import { noticeApi } from '/@/api/business/oa/notice-api';
import { SmartLoading } from '/@/components/framework/smart-loading';
import FilePreview from '/@/components/support/file-preview/index.vue';
import { smartSentry } from '/@/lib/smart-sentry';
const route = useRoute();
const route = useRoute();
const activeKey = ref(1);
const noticeDetail = ref({});
const noticeDetail = ref({});
onMounted(() => {
if (route.query.noticeId) {
queryNoticeDetail();
}
});
onMounted(() => {
if (route.query.noticeId) {
queryNoticeDetail();
const noticeViewRecordList = ref();
//
async function queryNoticeDetail() {
try {
SmartLoading.show();
const result = await noticeApi.view(route.query.noticeId);
noticeDetail.value = result.data;
noticeViewRecordList.value.onSearch();
} catch (err) {
smartSentry.captureError(err);
} finally {
SmartLoading.hide();
}
}
});
const noticeViewRecordList = ref();
//
async function queryNoticeDetail() {
try {
SmartLoading.show();
const result = await noticeApi.view(route.query.noticeId);
noticeDetail.value = result.data;
noticeViewRecordList.value.onSearch();
} catch (err) {
smartSentry.captureError(err);
} finally {
SmartLoading.hide();
//
const noticeFormDrawerRef = ref();
function onEdit() {
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
}
}
//
const noticeFormDrawerRef = ref();
function onEdit() {
noticeFormDrawerRef.value.showModal(noticeDetail.value.noticeId);
}
//
const filePreviewRef = ref();
function onPrevFile(fileItem) {
filePreviewRef.value.showPreview(fileItem);
}
//
function print() {
let bdhtml = window.document.body.innerHTML;
let sprnstr = '<!--startprint-->'; //<!--startprint--><!--endprint-->
let eprnstr = '<!--endprint-->';
let prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
let newWin = window.open(''); //
newWin.document.body.innerHTML = prnhtml;
newWin.document.close(); //IE使
newWin.focus(); //IE使
newWin.print(); //
newWin.close(); //
}
//
function print() {
let bdhtml = window.document.body.innerHTML;
let sprnstr = '<!--startprint-->'; //<!--startprint--><!--endprint-->
let eprnstr = '<!--endprint-->';
let prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
let newWin = window.open(''); //
newWin.document.body.innerHTML = prnhtml;
newWin.document.close(); //IE使
newWin.focus(); //IE使
newWin.print(); //
newWin.close(); //
}
</script>
<style lang="less" scoped>
:deep(.ant-descriptions-item-content) {
flex: 1;
overflow: hidden;
}
.file-list {
width: 100%;
display: flex;
flex-wrap: wrap;
.file-item {
display: block;
margin-right: 10px;
:deep(.ant-descriptions-item-content) {
flex: 1;
overflow: hidden;
}
}
.visible-list {
display: flex;
flex-wrap: wrap;
.visible-item {
margin-right: 10px;
color: #666;
}
}
.content-header {
.content-header-title {
margin: 10px 0px;
font-size: 18px;
font-weight: bold;
text-align: center;
}
.content-header-info {
margin: 10px 0px;
font-size: 14px;
color: #888;
text-align: center;
span {
margin: 0 10px;
cursor: pointer;
.file-list {
width: 100%;
display: flex;
flex-wrap: wrap;
.file-item {
display: block;
margin-right: 10px;
}
}
}
.content-html {
img {
max-width: 100%;
.visible-list {
display: flex;
flex-wrap: wrap;
.visible-item {
margin-right: 10px;
color: #666;
}
}
.content-header {
.content-header-title {
margin: 10px 0px;
font-size: 18px;
font-weight: bold;
text-align: center;
}
.content-header-info {
margin: 10px 0px;
font-size: 14px;
color: #888;
text-align: center;
span {
margin: 0 10px;
cursor: pointer;
}
}
}
.content-html {
img {
max-width: 100%;
}
}
}
</style>

View File

@ -45,7 +45,7 @@
<a-table rowKey="feedbackId" :dataSource="tableData" :columns="tableColumns" :pagination="false" :loading="tableLoading" size="small" bordered>
<template #bodyCell="{ text, column }">
<template v-if="column.dataIndex === 'feedbackAttachment'">
<FilePreview :fileList="text" />
<FilePreview :fileList="text" type="picture" />
</template>
<template v-if="column.dataIndex === 'userType'">
<span>{{ $smartEnumPlugin.getDescByValue('USER_TYPE_ENUM', text) }}</span>

View File

@ -86,13 +86,13 @@
<p class="line"></p>
</div>
<div class="login-type">
<img src="/@/assets/images/login/wechat-icon.png" />
<img src="/@/assets/images/login/ali-icon.png" />
<img src="/@/assets/images/login/douyin-icon.png" />
<img src="/@/assets/images/login/qq-icon.png" />
<img src="/@/assets/images/login/weibo-icon.png" />
<img src="/@/assets/images/login/feishu-icon.png" />
<img src="/@/assets/images/login/google-icon.png" />
<img :src="wechatIcon" />
<img :src="aliIcon" />
<img :src="douyinIcon" />
<img :src="qqIcon" />
<img :src="weiboIcon" />
<img :src="feishuIcon" />
<img :src="googleIcon" />
</div>
</div>
</div>
@ -106,10 +106,16 @@
import { SmartLoading } from '/@/components/framework/smart-loading';
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
import { useUserStore } from '/@/store/modules/system/user';
import gongzhonghao from '/@/assets/images/1024lab/1024lab-gzh.jpg';
import zhuoda from '/@/assets/images/1024lab/zhuoda-wechat.jpg';
import loginQR from '/@/assets/images/login/login-qr.png';
import gzh from '/@/assets/images/1024lab/gzh.jpg';
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
import aliIcon from '/@/assets/images/login/ali-icon.png';
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
import qqIcon from '/@/assets/images/login/qq-icon.png';
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
import googleIcon from '/@/assets/images/login/google-icon.png';
import { buildRoutes } from '/@/router/index';
import { smartSentry } from '/@/lib/smart-sentry';

View File

@ -50,13 +50,13 @@
<p class="line"></p>
</div>
<div class="login-type">
<img src="/@/assets/images/login/wechat-icon.png" />
<img src="/@/assets/images/login/ali-icon.png" />
<img src="/@/assets/images/login/douyin-icon.png" />
<img src="/@/assets/images/login/qq-icon.png" />
<img src="/@/assets/images/login/weibo-icon.png" />
<img src="/@/assets/images/login/feishu-icon.png" />
<img src="/@/assets/images/login/google-icon.png" />
<img :src="wechatIcon" />
<img :src="aliIcon" />
<img :src="douyinIcon" />
<img :src="qqIcon" />
<img :src="weiboIcon" />
<img :src="feishuIcon" />
<img :src="googleIcon" />
</div>
</div>
</div>
@ -71,6 +71,13 @@
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
import { useUserStore } from '/@/store/modules/system/user';
import loginQR from '/@/assets/images/login/login-qr.png';
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
import aliIcon from '/@/assets/images/login/ali-icon.png';
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
import qqIcon from '/@/assets/images/login/qq-icon.png';
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
import googleIcon from '/@/assets/images/login/google-icon.png';
import { buildRoutes } from '/@/router/index';
import { smartSentry } from '/@/lib/smart-sentry';

View File

@ -15,7 +15,7 @@
<p>欢迎登录 SmartAdmin V3</p>
<p class="sub-welcome">高质量代码的快速开发平台</p>
</div>
<img class="welcome-img" src="/@/assets/images/login/left-bg2.png" />
<img class="welcome-img" :src="leftBg2" />
</div>
<div class="box-item login">
<img class="login-qr" :src="loginQR" />
@ -51,13 +51,13 @@
<p class="line"></p>
</div>
<div class="login-type">
<img src="/@/assets/images/login/wechat-icon.png" />
<img src="/@/assets/images/login/ali-icon.png" />
<img src="/@/assets/images/login/douyin-icon.png" />
<img src="/@/assets/images/login/qq-icon.png" />
<img src="/@/assets/images/login/weibo-icon.png" />
<img src="/@/assets/images/login/feishu-icon.png" />
<img src="/@/assets/images/login/google-icon.png" />
<img :src="wechatIcon" />
<img :src="aliIcon" />
<img :src="douyinIcon" />
<img :src="qqIcon" />
<img :src="weiboIcon" />
<img :src="feishuIcon" />
<img :src="googleIcon" />
</div>
</div>
</div>
@ -72,6 +72,14 @@
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
import { useUserStore } from '/@/store/modules/system/user';
import loginQR from '/@/assets/images/login/login-qr.png';
import leftBg2 from '/@/assets/images/login/left-bg2.png';
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
import aliIcon from '/@/assets/images/login/ali-icon.png';
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
import qqIcon from '/@/assets/images/login/qq-icon.png';
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
import googleIcon from '/@/assets/images/login/google-icon.png';
import { buildRoutes } from '/@/router/index';
import { smartSentry } from '/@/lib/smart-sentry';