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 e5022f66
authored
Jul 29, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
eb153561
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
56 additions
and
23 deletions
package-lock.json
package.json
src/utils/http.ts
src/utils/request.ts
src/utils/util.ts
src/views/investorRelated/components/AddForm.vue
src/views/investorRelated/index.vue
src/views/investorRelated/interface.ts
package-lock.json
View file @
e5022f6
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
"dependencies"
:
{
"dependencies"
:
{
"@arco-plugins/vite-vue"
:
"^1.4.5"
,
"@arco-plugins/vite-vue"
:
"^1.4.5"
,
"axios"
:
"^0.27.2"
,
"axios"
:
"^0.27.2"
,
"dayjs"
:
"^1.11.12"
,
"echarts"
:
"^5.4.0"
,
"echarts"
:
"^5.4.0"
,
"js-sha1"
:
"^0.6.0"
,
"js-sha1"
:
"^0.6.0"
,
"md5"
:
"^2.3.0"
,
"md5"
:
"^2.3.0"
,
...
@@ -1172,8 +1173,7 @@
...
@@ -1172,8 +1173,7 @@
"node_modules/dayjs"
:
{
"node_modules/dayjs"
:
{
"version"
:
"1.11.12"
,
"version"
:
"1.11.12"
,
"resolved"
:
"https://registry.npmmirror.com/dayjs/-/dayjs-1.11.12.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/dayjs/-/dayjs-1.11.12.tgz"
,
"integrity"
:
"sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg=="
,
"integrity"
:
"sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg=="
"dev"
:
true
},
},
"node_modules/debug"
:
{
"node_modules/debug"
:
{
"version"
:
"4.3.5"
,
"version"
:
"4.3.5"
,
...
@@ -4171,8 +4171,7 @@
...
@@ -4171,8 +4171,7 @@
"dayjs"
:
{
"dayjs"
:
{
"version"
:
"1.11.12"
,
"version"
:
"1.11.12"
,
"resolved"
:
"https://registry.npmmirror.com/dayjs/-/dayjs-1.11.12.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/dayjs/-/dayjs-1.11.12.tgz"
,
"integrity"
:
"sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg=="
,
"integrity"
:
"sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg=="
"dev"
:
true
},
},
"debug"
:
{
"debug"
:
{
"version"
:
"4.3.5"
,
"version"
:
"4.3.5"
,
...
...
package.json
View file @
e5022f6
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
"dependencies"
:
{
"dependencies"
:
{
"@arco-plugins/vite-vue"
:
"^1.4.5"
,
"@arco-plugins/vite-vue"
:
"^1.4.5"
,
"axios"
:
"^0.27.2"
,
"axios"
:
"^0.27.2"
,
"dayjs"
:
"^1.11.12"
,
"echarts"
:
"^5.4.0"
,
"echarts"
:
"^5.4.0"
,
"js-sha1"
:
"^0.6.0"
,
"js-sha1"
:
"^0.6.0"
,
"md5"
:
"^2.3.0"
,
"md5"
:
"^2.3.0"
,
...
...
src/utils/http.ts
View file @
e5022f6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-08-23 11:04:56
* @Date: 2022-08-23 11:04:56
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-07-2
6 22:26:13
* @LastEditTime: 2024-07-2
9 16:14:07
*/
*/
import
axios
,
{
AxiosInstance
,
AxiosRequestConfig
,
AxiosResponse
,
AxiosError
}
from
'axios'
import
axios
,
{
AxiosInstance
,
AxiosRequestConfig
,
AxiosResponse
,
AxiosError
}
from
'axios'
// import { Toast } from 'vant';
// import { Toast } from 'vant';
...
@@ -25,7 +25,8 @@ interface Config {
...
@@ -25,7 +25,8 @@ interface Config {
},
},
secret
:
string
,
secret
:
string
,
sign
:
object
,
sign
:
object
,
vconsole
:
boolean
vconsole
:
boolean
,
noSignAttr
:
Array
<
string
>
}
}
const
mockConfig
:
Config
=
JSON
.
parse
(
options
)
const
mockConfig
:
Config
=
JSON
.
parse
(
options
)
const
{
response
,
request
,
sign
,
secret
}
=
mockConfig
const
{
response
,
request
,
sign
,
secret
}
=
mockConfig
...
@@ -40,8 +41,8 @@ const service: AxiosInstance = axios.create({
...
@@ -40,8 +41,8 @@ const service: AxiosInstance = axios.create({
// 添加请求拦截器
// 添加请求拦截器
service
.
interceptors
.
request
.
use
((
config
:
AxiosRequestConfig
)
=>
{
service
.
interceptors
.
request
.
use
((
config
:
AxiosRequestConfig
)
=>
{
let
{
data
=
{},
domain
}
=
config
let
{
data
=
{},
domain
,
noSignAttr
=
[]
}
=
config
data
=
createSign
(
Object
.
assign
({},
sign
,
data
),
secret
)
data
=
createSign
(
Object
.
assign
({},
sign
,
data
),
secret
,
noSignAttr
)
config
.
baseURL
=
mockConfig
[
domain
].
baseURL
config
.
baseURL
=
mockConfig
[
domain
].
baseURL
if
(
config
.
method
)
{
if
(
config
.
method
)
{
const
method
=
config
.
method
.
toLowerCase
()
const
method
=
config
.
method
.
toLowerCase
()
...
@@ -53,12 +54,14 @@ service.interceptors.request.use((config: AxiosRequestConfig) => {
...
@@ -53,12 +54,14 @@ service.interceptors.request.use((config: AxiosRequestConfig) => {
}
}
return
config
return
config
},
(
error
:
AxiosError
)
=>
{
},
(
error
:
AxiosError
)
=>
{
Message
.
error
(
error
)
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
})
})
// 添加响应拦截器
// 添加响应拦截器
service
.
interceptors
.
response
.
use
((
r
:
AxiosResponse
)
=>
{
service
.
interceptors
.
response
.
use
((
r
:
AxiosResponse
)
=>
{
const
{
data
:
res
,
config
:
{
returnAll
}
}
=
r
const
{
data
:
res
,
config
:
{
returnAll
}
}
=
r
console
.
log
(
r
,
'==='
)
const
{
code_key
,
code_success_value
,
data_key
=
'data'
,
errId
=
'errId'
,
code_error_value
,
errId_logout_value
}
=
response
const
{
code_key
,
code_success_value
,
data_key
=
'data'
,
errId
=
'errId'
,
code_error_value
,
errId_logout_value
}
=
response
let
codekey
=
Array
.
isArray
(
code_key
)
?
code_key
.
find
(
key
=>
res
.
hasOwnProperty
(
key
))
:
code_key
let
codekey
=
Array
.
isArray
(
code_key
)
?
code_key
.
find
(
key
=>
res
.
hasOwnProperty
(
key
))
:
code_key
let
code
=
res
[
codekey
]
let
code
=
res
[
codekey
]
...
@@ -85,7 +88,7 @@ service.interceptors.response.use((r: AxiosResponse) => {
...
@@ -85,7 +88,7 @@ service.interceptors.response.use((r: AxiosResponse) => {
return
res
[
data_key
]
return
res
[
data_key
]
},
error
=>
{
},
error
=>
{
// Toast(error.message)
// Toast(error.message)
Message
.
error
(
error
)
Message
.
error
(
error
||
'出错了,请联系管理员'
)
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
})
})
export
default
service
export
default
service
\ No newline at end of file
\ No newline at end of file
src/utils/request.ts
View file @
e5022f6
...
@@ -3,12 +3,13 @@
...
@@ -3,12 +3,13 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-12-06 16:17:36
* @Date: 2022-12-06 16:17:36
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2024-07-2
6 22:26:36
* @LastEditTime: 2024-07-2
9 15:40:03
*/
*/
import
http
from
'./http'
import
http
from
'./http'
import
{
useUserStore
}
from
'../store/user'
import
{
useUserStore
}
from
'../store/user'
const
PATH
=
'rop-sk-gw/router'
const
PATH
=
'rop-sk-gw/router'
const
UPLOADPATH
=
'rop-scrm-carlife/router'
const
UPLOADPATH
=
'/router'
// const UPLOADPATH = 'rop-scrm-carlife/router'
const
req
:
any
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
const
req
:
any
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
data
.
method
=
url
data
.
method
=
url
const
options
=
{
const
options
=
{
...
@@ -20,14 +21,16 @@ const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST
...
@@ -20,14 +21,16 @@ const req: any = (url: string, data: any = {}, returnAll = false, method = 'POST
}
}
return
http
(
options
)
return
http
(
options
)
}
}
const
uploadReq
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,)
=>
{
const
uploadReq
=
(
url
:
string
,
data
:
any
=
{},
returnAll
=
false
,
method
=
'POST'
,
noSignAttr
=
[
'file'
])
=>
{
console
.
log
(
noSignAttr
)
data
.
method
=
url
data
.
method
=
url
const
options
=
{
const
options
=
{
domain
:
'uploadRequest'
,
domain
:
'uploadRequest'
,
url
:
UPLOADPATH
,
url
:
UPLOADPATH
,
method
,
method
,
data
,
data
,
returnAll
returnAll
,
noSignAttr
}
}
return
http
(
options
)
return
http
(
options
)
}
}
...
...
src/utils/util.ts
View file @
e5022f6
...
@@ -3,12 +3,12 @@
...
@@ -3,12 +3,12 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-10-10 10:54:14
* @Date: 2022-10-10 10:54:14
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 202
2-10-20 10:12:0
9
* @LastEditTime: 202
4-07-29 10:07:1
9
*/
*/
import
sha1
from
'sha1'
import
sha1
from
'sha1'
import
qs
from
'qs'
import
qs
from
'qs'
export
const
Util
=
{
export
const
Util
=
{
createSign
:
function
(
params
:
object
,
secret
:
string
,
noSignAttr
=
[],
way
=
'hexSha2'
)
{
createSign
:
function
(
params
:
object
,
secret
:
string
,
noSignAttr
=
[],
way
=
'hexSha2'
)
{
delete
params
.
sign
delete
params
.
sign
params
.
timestamp
=
new
Date
().
getTime
()
params
.
timestamp
=
new
Date
().
getTime
()
var
strQs
=
qs
.
stringify
(
params
,
{
arrayFormat
:
'indices'
,
allowDots
:
true
,
encodeValuesOnly
:
true
})
var
strQs
=
qs
.
stringify
(
params
,
{
arrayFormat
:
'indices'
,
allowDots
:
true
,
encodeValuesOnly
:
true
})
...
...
src/views/investorRelated/components/AddForm.vue
View file @
e5022f6
This diff is collapsed.
Click to expand it.
src/views/investorRelated/index.vue
View file @
e5022f6
...
@@ -3,7 +3,14 @@
...
@@ -3,7 +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-25 17:50:13
* @LastEditTime: 2024-07-29 16:21:16
-->
<!--
* @Description:
* @Author: huyue
* @Date: 2024-07-23 16:43:07
* @LastEditors: huyue
* @LastEditTime: 2024-07-29 15:46:54
-->
-->
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
h
,
reactive
}
from
"vue"
;
import
{
h
,
reactive
}
from
"vue"
;
...
@@ -20,7 +27,8 @@ const data = reactive<Partial<DataInfo>>({
...
@@ -20,7 +27,8 @@ const data = reactive<Partial<DataInfo>>({
page
:
{
page
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
}
},
imgVisible
:
false
})
})
/** table列配置 */
/** table列配置 */
const
columns
=
[
const
columns
=
[
...
@@ -48,9 +56,10 @@ const columns = [
...
@@ -48,9 +56,10 @@ const columns = [
/** 表格展开内容 */
/** 表格展开内容 */
const
vnode
=
(
record
:
Partial
<
TableItem
>
)
=>
{
const
vnode
=
(
record
:
Partial
<
TableItem
>
)
=>
{
const
{
invnoticeProductTranslationsList
,
externalReleaseDate
,
zhTag
}
=
record
;
const
{
invnoticeProductTranslationsList
,
externalReleaseDate
,
zhTag
}
=
record
;
const
_CN
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
===
'zh-CN'
)
const
_CN
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
==
'zh-CN'
)
const
_US
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
===
'en-US'
)
console
.
log
(
_CN
)
const
_TW
=
invnoticeProductTranslationsList
?.
find
((
item
:
Partial
<
BasicItem
>
)
=>
item
.
languageCode
===
'zh-TW'
)
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'
,
{},
[
return
h
(
'div'
,
{},
[
h
(
'div'
,
{
class
:
'expand-item'
},
[
h
(
'div'
,
{
class
:
'expand-item'
},
[
h
(
'span'
,
{
class
:
'title'
},
'公告标签:'
),
h
(
'span'
,
{
class
:
'title'
},
'公告标签:'
),
...
@@ -131,6 +140,18 @@ const changeSize = (size: number) => {
...
@@ -131,6 +140,18 @@ const changeSize = (size: number) => {
data.page!.pageSize = size
data.page!.pageSize = size
getTableData()
getTableData()
}
}
/** 操作类 */
const publish = (record: Partial<TableItem>) => {
}
const down = (record: Partial<TableItem>) => {
}
const edit = (record: Partial<TableItem>) => {
}
const previewOA = () => {
data.imgVisible = true
}
// 接口定义、调用
// 接口定义、调用
const getList = async () => {
const getList = async () => {
const res = await req("gw.api.invnotice.findAllTypeByLanguageCode")
const res = await req("gw.api.invnotice.findAllTypeByLanguageCode")
...
@@ -167,9 +188,14 @@ getTableData()
...
@@ -167,9 +188,14 @@ getTableData()
</a-tabs>
</a-tabs>
<a-table
:columns=
"columns"
:data=
"data.tableData"
row-key=
"id"
:expandable=
"expandable"
:pagination=
"false"
:bordered=
"false"
>
<a-table
:columns=
"columns"
:data=
"data.tableData"
row-key=
"id"
:expandable=
"expandable"
:pagination=
"false"
:bordered=
"false"
>
<
template
#
operation=
"{ record }"
>
<
template
#
operation=
"{ record }"
>
<a-button
type=
"text"
>
发布
</a-button>
<a-button
type=
"text"
@
click=
"publish(record)"
v-if=
"record.systemPublishStatus === 1 || record.systemPublishStatus === 2"
>
发布
</a-button>
<a-button
type=
"text"
>
编辑
</a-button>
<a-button
type=
"text"
@
click=
"down(record)"
v-if=
"record.systemPublishStatus === 3"
>
下架
</a-button>
<a-button
type=
"text"
>
OA截图
</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-image-preview
:src=
"record.oaScreenshotUrl"
v-model:visible=
"data.imgVisible"
/>
</
template
>
</
template
>
</a-table>
</a-table>
<a-pagination
class=
"pagination"
:total=
"data.total"
@
change=
"changePage"
@
page-size-change=
"changeSize"
show-total
show-jumper
show-page-size
/>
<a-pagination
class=
"pagination"
:total=
"data.total"
@
change=
"changePage"
@
page-size-change=
"changeSize"
show-total
show-jumper
show-page-size
/>
...
...
src/views/investorRelated/interface.ts
View file @
e5022f6
...
@@ -19,6 +19,7 @@ export interface DataInfo {
...
@@ -19,6 +19,7 @@ export interface DataInfo {
currentId
?:
Number
|
String
;
currentId
?:
Number
|
String
;
total
:
Number
;
total
:
Number
;
page
:
Page
;
page
:
Page
;
imgVisible
:
Boolean
;
}
}
export
interface
TableItem
{
export
interface
TableItem
{
...
...
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