Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f1595d83
authored
2025-10-21 00:13:59 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增系列、问题是否打包
1 parent
33ff5c2d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
8 deletions
src/lang/package/zh-cn.js
src/views/legao/block/index.vue
src/views/legao/problem/index.vue
src/lang/package/zh-cn.js
View file @
f1595d8
...
...
@@ -63,6 +63,7 @@ export default {
blockName
:
'系列名称'
,
typeName
:
'类型'
,
sortName
:
'排序'
,
packName
:
'是否打包'
,
groupName
:
'套件'
,
tableControlsName
:
'操作'
,
controlsDelName
:
'删除'
,
...
...
@@ -77,6 +78,7 @@ export default {
tableSortName
:
'排序'
,
dialogPhoto
:
'图片'
,
dialogConfim
:
'确认'
,
dialogPack
:
'是否打包'
,
dialogExit
:
'退出'
,
},
// 课程
...
...
@@ -120,6 +122,7 @@ export default {
tableBuildingBlockName
:
'系列'
,
tableSortName
:
'排序'
,
tableShowName
:
'展示'
,
packName
:
'是否打包'
,
tableStateName
:
'发布状态'
,
tableControlsName
:
'操作'
,
controlsDelName
:
'删除'
,
...
...
@@ -136,6 +139,7 @@ export default {
dialogMovie
:
'视频'
,
dialogShow
:
'展示'
,
dialogSort
:
'排序'
,
dialogPack
:
'是否打包'
,
dialogSubmit
:
'直接发布'
,
dialogSave
:
'保存'
,
dialogExit
:
'退出'
,
...
...
src/views/legao/block/index.vue
View file @
f1595d8
...
...
@@ -43,6 +43,14 @@
<el-table-column
:label=
"$t('block.indexName')"
type=
"index"
width=
"80"
/>
<el-table-column
:label=
"$t('block.blockName')"
prop=
"name"
/>
<el-table-column
:label=
"$t('block.sortName')"
prop=
"sort"
/>
<el-table-column
:label=
"$t('block.packName')"
prop=
"canPack"
>
<template
#
default=
"
{ row }">
<dict-tag
:options=
"constrain_status"
:value=
"row.canPack"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('block.tableControlsName')"
class-name=
"small-padding fixed-width"
>
<
template
#
default=
"{ row }"
>
<el-button
...
...
@@ -81,6 +89,21 @@
style=
"width: 180px;"
/>
</el-form-item>
<el-form-item
:label=
"$t('block.dialogPack')"
prop=
"canPack"
label-width=
"80"
>
<el-select
v-model=
"showForm.form.canPack"
placeholder=
"请选择是否打包"
closeabled
style=
"width: 180px;"
>
<el-option
v-for=
"item in constrain_status"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('block.tableSortName')"
label-width=
"80"
>
<el-input-number
v-model=
"showForm.form.sort"
controls-position=
"right"
:min=
"0"
/>
</el-form-item>
...
...
@@ -105,13 +128,14 @@ import { useTableHeight } from '@/hooks/useTableHeight'
import
{
getBuildingBlockList
,
getBuildingBlockLists
,
addBuildingBlock
,
editBuildingBlock
,
delBuildingBlock
}
from
'@/api/legao/block'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
// 导入字典
const
{
proxy
}
=
getCurrentInstance
();
const
{
constrain_status
}
=
proxy
.
useDict
(
"constrain_status"
);
const
props
=
{
label
:
'name'
,
value
:
'id'
,
}
// 导入字典
const
{
proxy
}
=
getCurrentInstance
();
const
data
=
reactive
({
status
:
{
...
...
@@ -175,7 +199,10 @@ function handleEdit (row) {
showForm
.
value
=
{
...
showForm
.
value
,
open
:
true
,
form
:
{...
row
}
form
:
{
...
row
,
canPack
:
row
.
canPack
?
String
(
row
.
canPack
)
:
'0'
// 将数字转换为字符串
}
}
}
...
...
@@ -183,7 +210,10 @@ function btn_add () {
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleAdd'
)
showForm
.
value
=
{
...
showForm
.
value
,
open
:
true
open
:
true
,
form
:
{
canPack
:
'0'
// 设置默认值
}
}
}
...
...
src/views/legao/problem/index.vue
View file @
f1595d8
...
...
@@ -49,6 +49,14 @@
<el-table-column
:label=
"$t('problem.tableAnsName')"
prop=
"title"
/>
<el-table-column
:label=
"$t('problem.tableBuildingBlockName')"
prop=
"buildingBlockName"
/>
<el-table-column
:label=
"$t('problem.tableSortName')"
prop=
"sort"
/>
<el-table-column
:label=
"$t('problem.packName')"
prop=
"canPack"
>
<template
#
default=
"
{ row }">
<dict-tag
:options=
"constrain_status"
:value=
"row.canPack"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('problem.tableShowName')"
prop=
"showStr"
/>
<el-table-column
:label=
"$t('problem.tableStateName')"
prop=
"status"
>
<
template
#
default=
"{ row }"
>
...
...
@@ -108,6 +116,21 @@
style=
"width: 180px;"
/>
</el-form-item>
<el-form-item
:label=
"$t('problem.dialogPack')"
prop=
"canPack"
label-width=
"80"
>
<el-select
v-model=
"showForm.form.canPack"
placeholder=
"请选择是否打包"
closeabled
style=
"width: 180px;"
>
<el-option
v-for=
"item in constrain_status"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('problem.dialogPhote')"
label-width=
"80"
>
<imageUpload
v-model=
"showForm.form.coverOssId"
:limit=
"1"
:fileType=
'["png", "jpg", "jpeg", "ico"]'
/>
</el-form-item>
...
...
@@ -147,13 +170,14 @@ import { getQuestionList, updateStatus, addQuestion, editQuestion, delQuestion }
import
{
getBuildingBlockLists
}
from
'@/api/legao/kit'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
// 导入字典
const
{
proxy
}
=
getCurrentInstance
();
const
{
advert_state
,
constrain_status
}
=
proxy
.
useDict
(
"advert_state"
,
"constrain_status"
);
const
props
=
{
label
:
'name'
,
value
:
'id'
,
}
// 导入字典
const
{
proxy
}
=
getCurrentInstance
();
const
{
advert_state
}
=
proxy
.
useDict
(
"advert_state"
);
const
data
=
reactive
({
...
...
@@ -219,7 +243,10 @@ function handleEdit (row) {
showForm
.
value
=
{
...
showForm
.
value
,
open
:
true
,
form
:
{...
row
}
form
:
{
...
row
,
canPack
:
row
.
canPack
?
String
(
row
.
canPack
)
:
'0'
// 将数字转换为字符串
}
}
}
...
...
@@ -231,6 +258,7 @@ function btn_add () {
showWindows
:
0
,
showAndroid
:
0
,
showIos
:
0
,
canPack
:
'0'
// 设置默认值
}
console
.
log
(
showForm
.
value
.
form
)
}
...
...
Write
Preview
Styling with
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