Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
website-middleground
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cd35987f
authored
Jul 29, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
e5022f66
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
18 deletions
src/views/investorRelated/addInvnotice.vue
src/views/investorRelated/components/AddForm.vue
src/views/investorRelated/index.vue
src/views/investorRelated/interface.ts
src/views/investorRelated/addInvnotice.vue
View file @
cd35987
<
script
lang=
"ts"
setup
>
import
{
useRouter
}
from
"vue-router"
;
import
{
reactive
,
onMounted
}
from
'vue'
import
{
useRouter
,
useRoute
}
from
"vue-router"
;
import
{
reactive
,
onMounted
,
toRefs
}
from
'vue'
import
{
DataInfo
}
from
"./addInterface"
;
import
AddForm
from
"./components/AddForm.vue"
;
let
route
=
useRoute
()
let
{
query
}
=
toRefs
(
route
)
const
router
=
useRouter
();
const
form
=
reactive
<
Partial
<
DataInfo
>>
({
name
:
''
...
...
@@ -19,10 +21,10 @@ const handleSubmit = () => {
<
template
>
<a-breadcrumb>
<a-breadcrumb-item
class=
"back"
@
click=
"back"
>
投资者相关
</a-breadcrumb-item>
<a-breadcrumb-item>
新增
公告
</a-breadcrumb-item>
<a-breadcrumb-item>
{{
query
.
id
?
'编辑'
:
'新增'
}}
公告
</a-breadcrumb-item>
</a-breadcrumb>
<div
class=
"add-box"
>
<a-page-header
:style=
"
{ background: 'var(--color-bg-2)' }"
title="新增公告
" :show-back="false">
</a-page-header>
<a-page-header
:style=
"
{ background: 'var(--color-bg-2)' }"
:title="`${query.id ? '编辑' : '新增'}公告`
" :show-back="false">
</a-page-header>
<div
class=
"form"
>
<AddForm></AddForm>
</div>
...
...
src/views/investorRelated/components/AddForm.vue
View file @
cd35987
...
...
@@ -3,16 +3,23 @@
* @Author: huyue
* @Date: 2024-07-26 10:46:04
* @LastEditors: huyue
* @LastEditTime: 2024-07-29 1
6:13
:48
* @LastEditTime: 2024-07-29 1
7:17
:48
-->
<
script
lang=
"ts"
setup
>
import
{
reactive
,
ref
,
nextTick
}
from
"vue"
;
import
{
reactive
,
ref
,
nextTick
,
toRefs
,
onMounted
}
from
"vue"
;
import
{
DataInfo
}
from
"../addInterface"
;
import
{
RequestOption
,
FileItem
}
from
"@arco-design/web-vue"
import
{
req
,
uploadReq
}
from
"../../../utils/request"
;
import
{
getImageUrl
}
from
"@/utils/common"
import
{
Message
}
from
'@arco-design/web-vue'
;
import
*
as
dayjs
from
'dayjs'
import
{
useRoute
}
from
"vue-router"
;
let
route
=
useRoute
()
let
{
query
}
=
toRefs
(
route
)
onMounted
(()
=>
{
console
.
log
(
query
.
value
);
});
const
form
=
reactive
<
Partial
<
DataInfo
>>
({
name
:
""
,
gwInvnoticeTypeId
:
""
,
...
...
@@ -75,7 +82,7 @@ const handleSubmit = async () => {
const
invnoticeProductList
=
getParams
()
const
res
=
await
req
(
"gw.api.invnotice.addInvnoticeProduct"
,
{
invnoticeProductList
})
console
.
log
(
res
)
Message
.
success
(
"新增成功"
)
if
(
res
)
Message
.
success
(
"新增成功"
)
}
})
formRef
.
value
.
clearValidate
(
'invnoticeProductList'
)
...
...
@@ -93,14 +100,16 @@ const getParams = () => {
{
title
:
''
,
tags
:
''
,
filePath
:
''
,
languageCode
:
language
[
'u'
]
},
{
title
:
''
,
tags
:
''
,
filePath
:
''
,
languageCode
:
language
[
'e'
]
}
];
const
invnotice
ProductList
=
new
Array
(
len
).
fill
(
{
systemPublishTime
:
sendType
==
2
?
systemPublishTime
:
''
,
// 系统发布时间
const
invnotice
=
{
// systemPublishTime: sendType == 2 ? systemPublishTime : null
, // 系统发布时间
oaScreenshotUrl
:
oaFile
,
// OA截图
externalReleaseDate
:
externalReleaseDate
,
// 外网发布时间
invnoticeProductTranslationsList
:
invnoticeProductTranslationsList
,
// 新增公告list
gwInvnoticeTypeId
:
gwInvnoticeTypeId
.
gwInvnoticeTypeId
,
// 公告类型
sendType
// 发布类型
})
}
as
DataInfo
if
(
sendType
==
2
)
invnotice
.
systemPublishTime
=
systemPublishTime
const
invnoticeProductList
=
new
Array
(
len
).
fill
(
invnotice
)
Object
.
keys
(
language
).
forEach
((
l
,
index
)
=>
{
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
invnoticeProductList
[
i
].
invnoticeProductTranslationsList
[
index
].
title
=
form
[
`
${
l
}
_title
${
i
+
1
}
`
];
...
...
@@ -146,6 +155,14 @@ const getList = async () => {
const
res
=
await
req
(
"gw.api.invnotice.findAllTypeByLanguageCode"
);
data
.
sectionList
=
res
;
};
const
findById
=
async
()
=>
{
const
id
=
query
.
value
.
id
const
res
=
await
req
(
"gw.api.invnotice.findById"
,
{
id
});
console
.
log
(
res
)
// form = res;
// data.childPass = res.childPass;
}
findById
()
getList
();
/** 自定义上传 */
// 图片的
...
...
src/views/investorRelated/index.vue
View file @
cd35987
...
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-07-23 16:43:07
* @LastEditors: huyue
* @LastEditTime: 2024-07-29 16:
21:16
* @LastEditTime: 2024-07-29 16:
57:27
-->
<!--
* @Description:
...
...
@@ -13,7 +13,7 @@
* @LastEditTime: 2024-07-29 15:46:54
-->
<
script
lang=
"ts"
setup
>
import
{
h
,
reactive
}
from
"vue"
;
import
{
h
,
reactive
,
ref
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
DataInfo
,
TableItem
,
BasicItem
}
from
"./interface"
;
import
{
req
}
from
"../../utils/request"
;
...
...
@@ -28,7 +28,8 @@ const data = reactive<Partial<DataInfo>>({
pageNum
:
1
,
pageSize
:
10
},
imgVisible
:
false
imgVisible
:
false
,
imgUrl
:
''
})
/** table列配置 */
const
columns
=
[
...
...
@@ -57,7 +58,6 @@ const columns = [
const
vnode
=
(
record
:
Partial
<
TableItem
>
)
=>
{
const
{
invnoticeProductTranslationsList
,
externalReleaseDate
,
zhTag
}
=
record
;
const
_CN
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
==
'zh-CN'
)
console
.
log
(
_CN
)
const
_US
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
==
'en-US'
)
const
_TW
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
==
'zh-TW'
)
return
h
(
'div'
,
{},
[
...
...
@@ -147,10 +147,16 @@ const down = (record: Partial<TableItem>) => {
}
const edit = (record: Partial<TableItem>) => {
router.push({
path: "/layout/addInvnotice",
query: {
id: record?.id
}
});
}
const previewOA = () => {
const previewOA = (
record: Partial<TableItem>
) => {
data.imgVisible = true
data.imgUrl = record?.oaScreenshotUrl
}
// 接口定义、调用
const getList = async () => {
...
...
@@ -191,9 +197,9 @@ getTableData()
<a-button
type=
"text"
@
click=
"publish(record)"
v-if=
"record.systemPublishStatus === 1 || record.systemPublishStatus === 2"
>
发布
</a-button>
<a-button
type=
"text"
@
click=
"down(record)"
v-if=
"record.systemPublishStatus === 3"
>
下架
</a-button>
<a-button
type=
"text"
@
click=
"edit(record)"
v-if=
"record.systemPublishStatus === 1 || record.systemPublishStatus === 2"
>
编辑
</a-button>
<a-button
type=
"text"
@
click=
"previewOA"
>
OA截图
</a-button>
<a-button
type=
"text"
@
click=
"previewOA
(record)
"
>
OA截图
</a-button>
<a-image-preview
:src=
"
record.oaScreenshot
Url"
:src=
"
data.img
Url"
v-model:visible=
"data.imgVisible"
/>
</
template
>
...
...
src/views/investorRelated/interface.ts
View file @
cd35987
...
...
@@ -20,6 +20,7 @@ export interface DataInfo {
total
:
Number
;
page
:
Page
;
imgVisible
:
Boolean
;
imgUrl
:
String
;
}
export
interface
TableItem
{
...
...
@@ -31,4 +32,5 @@ export interface TableItem {
invnoticeProductTranslationsList
:
Partial
<
BasicItem
>
[],
externalReleaseDate
:
String
;
zhTag
:
String
;
oaScreenshotUrl
:
String
;
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment