Commit 81447ad5 by 胡悦

修复第一轮bug

1 parent 34795b41
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-07-23 16:43:07 * @Date: 2024-07-23 16:43:07
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-07-29 15:46:54 * @LastEditTime: 2024-07-31 16:48:51
--> -->
<script lang="ts" setup> <script lang="ts" setup>
import { h, reactive, inject } from "vue"; import { h, reactive, inject } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { DataInfo, TableItem, BasicItem } from "./interface"; import { DataInfo, TableItem, BasicItem } from "./interface";
import { req } from "../../utils/request"; import { req } from "../../utils/request";
import { Message } from "@arco-design/web-vue";
const router = useRouter(); const router = useRouter();
// 获取全局对象 // 获取全局对象
const global: any = inject("global"); const global: any = inject("global");
...@@ -30,6 +31,8 @@ const columns = [ ...@@ -30,6 +31,8 @@ const columns = [
{ {
title: "标题", title: "标题",
dataIndex: "zhTitle", dataIndex: "zhTitle",
width: '320',
ellipsis: true
}, },
{ {
title: "公告类型", title: "公告类型",
...@@ -61,11 +64,11 @@ const vnode = (record: Partial<TableItem>) => { ...@@ -61,11 +64,11 @@ const vnode = (record: Partial<TableItem>) => {
]), ]),
h('div', { class: 'expand-item' }, [ h('div', { class: 'expand-item' }, [
h('span', { class: 'title' }, '外显发布时间:'), h('span', { class: 'title' }, '外显发布时间:'),
h('span', {}, `${externalReleaseDate}`) h('span', {}, `${externalReleaseDate ? externalReleaseDate : '--'}`)
]), ]),
h('div', { class: 'expand-item' }, [ h('div', { class: 'expand-item' }, [
h('span', { class: 'title' }, '简体:'), h('span', { class: 'title span-title' }, '简体:'),
h('span', {}, `${_CN?.title}`), h('span', { class: 'span-content'}, `${_CN?.title}`),
h('a', { h('a', {
class: 'pdf-link', class: 'pdf-link',
href: `${_CN?.filePath}`, href: `${_CN?.filePath}`,
...@@ -78,8 +81,8 @@ const vnode = (record: Partial<TableItem>) => { ...@@ -78,8 +81,8 @@ const vnode = (record: Partial<TableItem>) => {
]) ])
]), ]),
h('div', { class: 'expand-item' }, [ h('div', { class: 'expand-item' }, [
h('span', { class: 'title' }, '繁体:'), h('span', { class: 'title span-title' }, '繁体:'),
h('span', {}, `${_TW?.title}`), h('span', { class: 'span-content'}, `${_TW?.title}`),
h('a', { h('a', {
class: 'pdf-link', class: 'pdf-link',
href: `${_TW?.filePath}`, href: `${_TW?.filePath}`,
...@@ -92,8 +95,8 @@ const vnode = (record: Partial<TableItem>) => { ...@@ -92,8 +95,8 @@ const vnode = (record: Partial<TableItem>) => {
]) ])
]), ]),
h('div', { class: 'expand-item long' }, [ h('div', { class: 'expand-item long' }, [
h('span', { class: 'title' }, '英文:'), h('span', { class: 'title span-title' }, '英文:'),
h('span', {}, `${_US?.title}`), h('span', { class: 'span-content'}, `${_US?.title}`),
h('a', { h('a', {
class: 'pdf-link', class: 'pdf-link',
href: `${_US?.filePath}`, href: `${_US?.filePath}`,
...@@ -144,24 +147,10 @@ const publishOrDown = async(record: Partial<TableItem>) => { ...@@ -144,24 +147,10 @@ const publishOrDown = async(record: Partial<TableItem>) => {
id, id,
systemPublishStatus: systemPublishStatus === 3 ? 1 : 3 systemPublishStatus: systemPublishStatus === 3 ? 1 : 3
}) })
Message.success(`${systemPublishStatus === 3 ? '下架' : '发布'}成功`) // 没有发布时,若添加发布功能,需修改此处
getTableData() getTableData()
} }
const publish = async(record: Partial<TableItem>) => {
const { id } = record
const res = await req("gw.api.invnotice.updateStatus", {
id,
systemPublishStatus: 3
})
getTableData()
}
const down = async(record: Partial<TableItem>) => {
const { id } = record
const res = await req("gw.api.invnotice.updateStatus", {
id,
systemPublishStatus: 1
})
getTableData()
}
const edit = (record: Partial<TableItem>) => { const edit = (record: Partial<TableItem>) => {
router.push({ router.push({
path: "/layout/addInvnotice", path: "/layout/addInvnotice",
...@@ -171,8 +160,12 @@ const edit = (record: Partial<TableItem>) => { ...@@ -171,8 +160,12 @@ const edit = (record: Partial<TableItem>) => {
}); });
} }
const previewOA = (record: Partial<TableItem>) => { const previewOA = (record: Partial<TableItem>) => {
data.imgVisible = true if (record?.oaScreenshotUrl) {
data.imgUrl = record?.oaScreenshotUrl data.imgVisible = true
data.imgUrl = record?.oaScreenshotUrl
} else {
Message.warning('暂无该数据')
}
} }
// 接口定义、调用 // 接口定义、调用
const getList = async () => { const getList = async () => {
...@@ -269,6 +262,17 @@ getTableData() ...@@ -269,6 +262,17 @@ getTableData()
.title { .title {
color: #000814; color: #000814;
} }
.span-title {
display: inline-block;
width: 50px;
}
.span-content {
display: inline-block;
max-width: calc(100% - 90px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pdf-link { .pdf-link {
width: 24px; width: 24px;
height: 16px; height: 16px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!