Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ai_web_page_prod
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
ai_web_page_prod
Commits
15592f93
Commit
15592f93
authored
May 18, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
56d408ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
38 deletions
+36
-38
src/constants/admin_form.ts
+27
-3
src/pages/AILiveStreaming/DiscourseManagementCreate/index.vue
+2
-22
src/pages/AILiveStreaming/DiscourseManagementEdit/index.vue
+7
-13
No files found.
src/constants/admin_form.ts
View file @
15592f93
import
{
getLocalData
,
setLocalData
}
from
'@/utils/tool'
;
import
{
getLocalData
,
setLocalData
}
from
'@/utils/tool'
;
import
router
from
'@/router'
;
import
router
from
'@/router'
;
import
{
show_message
}
from
'@/utils/tdesign_tool'
;
import
{
show_message
}
from
'@/utils/tdesign_tool'
;
// 语言列表
export
const
voice_list
=
[
{
label
:
'柜姐'
,
value
:
'guijie'
,
},
{
label
:
'小仙'
,
value
:
'xiaoxian'
,
},
{
label
:
'艾飞'
,
value
:
'aifei'
,
},
{
label
:
'老铁'
,
value
:
'laotie'
,
},
{
label
:
'老妹'
,
value
:
'laomei'
,
},
];
// 清空admin-form的value值
// 清空admin-form的value值
export
const
ResetForm
=
(
list
:
any
[])
=>
{
export
const
ResetForm
=
(
list
:
any
[])
=>
{
list
.
forEach
((
item
:
any
)
=>
{
list
.
forEach
((
item
:
any
)
=>
{
...
@@ -26,7 +50,7 @@ export const getFilterParams = (list: any[]) => {
...
@@ -26,7 +50,7 @@ export const getFilterParams = (list: any[]) => {
export
const
EditButtonEvent
=
(
key
:
string
,
path
:
string
,
row
:
any
)
=>
{
export
const
EditButtonEvent
=
(
key
:
string
,
path
:
string
,
row
:
any
)
=>
{
if
(
key
&&
path
)
{
if
(
key
&&
path
)
{
// 行数据存本地
// 行数据存本地
setLocalData
(
key
,
JSON
.
stringify
(
row
)
,
'session'
);
setLocalData
(
key
,
row
,
'session'
);
router
.
push
({
router
.
push
({
path
:
path
,
path
:
path
,
});
});
...
@@ -57,10 +81,10 @@ export const EditFillData = (form: any[], row: any) => {
...
@@ -57,10 +81,10 @@ export const EditFillData = (form: any[], row: any) => {
// 查找name相同的字段
// 查找name相同的字段
Object
.
keys
(
row
).
forEach
((
key
:
string
)
=>
{
Object
.
keys
(
row
).
forEach
((
key
:
string
)
=>
{
// console.log(value);
// console.log(value);
console
.
log
(
it
.
name
);
if
(
it
.
name
==
key
)
{
if
(
it
.
name
==
key
)
{
console
.
log
(
it
.
name
);
// 填充数据
// 填充数据
it
.
value
=
row
[
key
];
it
.
value
=
row
[
key
]
+
''
;
}
}
});
});
});
});
...
...
src/pages/AILiveStreaming/DiscourseManagementCreate/index.vue
View file @
15592f93
...
@@ -7,6 +7,7 @@ import PageEdit from '@/components/Admin/PageEdit.vue';
...
@@ -7,6 +7,7 @@ import PageEdit from '@/components/Admin/PageEdit.vue';
import
{
reactive
}
from
'vue'
;
import
{
reactive
}
from
'vue'
;
import
{
getLocalData
,
isDevContext
}
from
'@/utils/tool'
;
import
{
getLocalData
,
isDevContext
}
from
'@/utils/tool'
;
import
{
show_message
}
from
'@/utils/tdesign_tool'
;
import
{
show_message
}
from
'@/utils/tdesign_tool'
;
import
{
voice_list
}
from
'@/constants/admin_form'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
imgs
=
{
const
imgs
=
{
...
@@ -89,28 +90,7 @@ const ManagementForm = reactive({
...
@@ -89,28 +90,7 @@ const ManagementForm = reactive({
placeholder
:
'请选择语音'
,
placeholder
:
'请选择语音'
,
value
:
''
,
value
:
''
,
align
:
'left'
,
align
:
'left'
,
options
:
[
options
:
voice_list
,
{
label
:
'柜姐'
,
value
:
'guijie'
,
},
{
label
:
'小仙'
,
value
:
'xiaoxian'
,
},
{
label
:
'艾飞'
,
value
:
'aifei'
,
},
{
label
:
'老铁'
,
value
:
'laotie'
,
},
{
label
:
'老妹'
,
value
:
'laomei'
,
},
],
},
},
{
{
type
:
'textarea'
,
type
:
'textarea'
,
...
...
src/pages/AILiveStreaming/DiscourseManagementEdit/index.vue
View file @
15592f93
...
@@ -9,7 +9,11 @@ import { discourse_management_edit } from '@/constants/token';
...
@@ -9,7 +9,11 @@ import { discourse_management_edit } from '@/constants/token';
import
{
getLocalData
,
isDevContext
}
from
'@/utils/tool'
;
import
{
getLocalData
,
isDevContext
}
from
'@/utils/tool'
;
import
{
show_message
}
from
'@/utils/tdesign_tool'
;
import
{
show_message
}
from
'@/utils/tdesign_tool'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
getEditLocalData
,
EditFillData
}
from
'@/constants/admin_form'
;
import
{
getEditLocalData
,
EditFillData
,
voice_list
,
}
from
'@/constants/admin_form'
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
imgs
=
{
const
imgs
=
{
fill
:
new
URL
(
'../../../assets/svg/form/edit.svg'
,
import
.
meta
.
url
).
href
,
fill
:
new
URL
(
'../../../assets/svg/form/edit.svg'
,
import
.
meta
.
url
).
href
,
...
@@ -75,7 +79,7 @@ const ManagementForm = reactive({
...
@@ -75,7 +79,7 @@ const ManagementForm = reactive({
{
{
type
:
'select'
,
type
:
'select'
,
label
:
'语言'
,
label
:
'语言'
,
name
:
'language
_1
'
,
name
:
'language'
,
placeholder
:
'请选择语言'
,
placeholder
:
'请选择语言'
,
value
:
''
,
value
:
''
,
align
:
'left'
,
align
:
'left'
,
...
@@ -97,16 +101,7 @@ const ManagementForm = reactive({
...
@@ -97,16 +101,7 @@ const ManagementForm = reactive({
placeholder
:
'请选择语音'
,
placeholder
:
'请选择语音'
,
value
:
''
,
value
:
''
,
align
:
'left'
,
align
:
'left'
,
options
:
[
options
:
voice_list
,
{
label
:
'小微 (直播间专属)'
,
value
:
'123'
,
},
{
label
:
'小爱 (直播间专属)'
,
value
:
'12345'
,
},
],
},
},
{
{
type
:
'textarea'
,
type
:
'textarea'
,
...
@@ -125,7 +120,6 @@ onBeforeMount(() => {
...
@@ -125,7 +120,6 @@ onBeforeMount(() => {
discourse_management_edit
,
discourse_management_edit
,
ManagementForm
.
back_url
ManagementForm
.
back_url
);
);
console
.
log
(
row
);
// 填充数据
// 填充数据
EditFillData
(
ManagementForm
.
form_options
,
row
);
EditFillData
(
ManagementForm
.
form_options
,
row
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment