f1595d83 by chentao

新增系列、问题是否打包

1 parent 33ff5c2d
...@@ -63,6 +63,7 @@ export default { ...@@ -63,6 +63,7 @@ export default {
63 blockName: '系列名称', 63 blockName: '系列名称',
64 typeName: '类型', 64 typeName: '类型',
65 sortName: '排序', 65 sortName: '排序',
66 packName: '是否打包',
66 groupName: '套件', 67 groupName: '套件',
67 tableControlsName: '操作', 68 tableControlsName: '操作',
68 controlsDelName: '删除', 69 controlsDelName: '删除',
...@@ -77,6 +78,7 @@ export default { ...@@ -77,6 +78,7 @@ export default {
77 tableSortName: '排序', 78 tableSortName: '排序',
78 dialogPhoto: '图片', 79 dialogPhoto: '图片',
79 dialogConfim: '确认', 80 dialogConfim: '确认',
81 dialogPack: '是否打包',
80 dialogExit: '退出', 82 dialogExit: '退出',
81 }, 83 },
82 // 课程 84 // 课程
...@@ -120,6 +122,7 @@ export default { ...@@ -120,6 +122,7 @@ export default {
120 tableBuildingBlockName: '系列', 122 tableBuildingBlockName: '系列',
121 tableSortName: '排序', 123 tableSortName: '排序',
122 tableShowName: '展示', 124 tableShowName: '展示',
125 packName: '是否打包',
123 tableStateName: '发布状态', 126 tableStateName: '发布状态',
124 tableControlsName: '操作', 127 tableControlsName: '操作',
125 controlsDelName: '删除', 128 controlsDelName: '删除',
...@@ -136,6 +139,7 @@ export default { ...@@ -136,6 +139,7 @@ export default {
136 dialogMovie: '视频', 139 dialogMovie: '视频',
137 dialogShow: '展示', 140 dialogShow: '展示',
138 dialogSort: '排序', 141 dialogSort: '排序',
142 dialogPack: '是否打包',
139 dialogSubmit: '直接发布', 143 dialogSubmit: '直接发布',
140 dialogSave: '保存', 144 dialogSave: '保存',
141 dialogExit: '退出', 145 dialogExit: '退出',
......
...@@ -43,6 +43,14 @@ ...@@ -43,6 +43,14 @@
43 <el-table-column :label="$t('block.indexName')" type="index" width="80" /> 43 <el-table-column :label="$t('block.indexName')" type="index" width="80" />
44 <el-table-column :label="$t('block.blockName')" prop="name" /> 44 <el-table-column :label="$t('block.blockName')" prop="name" />
45 <el-table-column :label="$t('block.sortName')" prop="sort" /> 45 <el-table-column :label="$t('block.sortName')" prop="sort" />
46 <el-table-column :label="$t('block.packName')" prop="canPack">
47 <template #default="{ row }">
48 <dict-tag
49 :options="constrain_status"
50 :value="row.canPack"
51 ></dict-tag>
52 </template>
53 </el-table-column>
46 <el-table-column :label="$t('block.tableControlsName')" class-name="small-padding fixed-width"> 54 <el-table-column :label="$t('block.tableControlsName')" class-name="small-padding fixed-width">
47 <template #default="{ row }"> 55 <template #default="{ row }">
48 <el-button 56 <el-button
...@@ -81,6 +89,21 @@ ...@@ -81,6 +89,21 @@
81 style="width: 180px;" 89 style="width: 180px;"
82 /> 90 />
83 </el-form-item> 91 </el-form-item>
92 <el-form-item :label="$t('block.dialogPack')" prop="canPack" label-width="80">
93 <el-select
94 v-model="showForm.form.canPack"
95 placeholder="请选择是否打包"
96 closeabled
97 style="width: 180px;"
98 >
99 <el-option
100 v-for="item in constrain_status"
101 :key="item.value"
102 :label="item.label"
103 :value="item.value"
104 />
105 </el-select>
106 </el-form-item>
84 <el-form-item :label="$t('block.tableSortName')" label-width="80"> 107 <el-form-item :label="$t('block.tableSortName')" label-width="80">
85 <el-input-number v-model="showForm.form.sort" controls-position="right" :min="0" /> 108 <el-input-number v-model="showForm.form.sort" controls-position="right" :min="0" />
86 </el-form-item> 109 </el-form-item>
...@@ -105,13 +128,14 @@ import { useTableHeight } from '@/hooks/useTableHeight' ...@@ -105,13 +128,14 @@ import { useTableHeight } from '@/hooks/useTableHeight'
105 import { getBuildingBlockList, getBuildingBlockLists, addBuildingBlock, editBuildingBlock, delBuildingBlock } from '@/api/legao/block' 128 import { getBuildingBlockList, getBuildingBlockLists, addBuildingBlock, editBuildingBlock, delBuildingBlock } from '@/api/legao/block'
106 import { reactive, toRefs } from 'vue'; 129 import { reactive, toRefs } from 'vue';
107 const { windowSize } = useTableHeight('max-height') 130 const { windowSize } = useTableHeight('max-height')
131 // 导入字典
132 const { proxy } = getCurrentInstance();
133 const { constrain_status } = proxy.useDict("constrain_status");
108 134
109 const props = { 135 const props = {
110 label: 'name', 136 label: 'name',
111 value: 'id', 137 value: 'id',
112 } 138 }
113 // 导入字典
114 const { proxy } = getCurrentInstance();
115 139
116 const data = reactive({ 140 const data = reactive({
117 status: { 141 status: {
...@@ -175,7 +199,10 @@ function handleEdit (row) { ...@@ -175,7 +199,10 @@ function handleEdit (row) {
175 showForm.value = { 199 showForm.value = {
176 ...showForm.value, 200 ...showForm.value,
177 open: true, 201 open: true,
178 form: {...row} 202 form: {
203 ...row,
204 canPack: row.canPack ? String(row.canPack) : '0' // 将数字转换为字符串
205 }
179 } 206 }
180 } 207 }
181 208
...@@ -183,7 +210,10 @@ function btn_add () { ...@@ -183,7 +210,10 @@ function btn_add () {
183 showForm.value.title = proxy.$t('advertisement.dialogTitleAdd') 210 showForm.value.title = proxy.$t('advertisement.dialogTitleAdd')
184 showForm.value = { 211 showForm.value = {
185 ...showForm.value, 212 ...showForm.value,
186 open: true 213 open: true,
214 form: {
215 canPack: '0' // 设置默认值
216 }
187 } 217 }
188 } 218 }
189 219
......
...@@ -49,6 +49,14 @@ ...@@ -49,6 +49,14 @@
49 <el-table-column :label="$t('problem.tableAnsName')" prop="title" /> 49 <el-table-column :label="$t('problem.tableAnsName')" prop="title" />
50 <el-table-column :label="$t('problem.tableBuildingBlockName')" prop="buildingBlockName" /> 50 <el-table-column :label="$t('problem.tableBuildingBlockName')" prop="buildingBlockName" />
51 <el-table-column :label="$t('problem.tableSortName')" prop="sort" /> 51 <el-table-column :label="$t('problem.tableSortName')" prop="sort" />
52 <el-table-column :label="$t('problem.packName')" prop="canPack">
53 <template #default="{ row }">
54 <dict-tag
55 :options="constrain_status"
56 :value="row.canPack"
57 ></dict-tag>
58 </template>
59 </el-table-column>
52 <el-table-column :label="$t('problem.tableShowName')" prop="showStr" /> 60 <el-table-column :label="$t('problem.tableShowName')" prop="showStr" />
53 <el-table-column :label="$t('problem.tableStateName')" prop="status"> 61 <el-table-column :label="$t('problem.tableStateName')" prop="status">
54 <template #default="{ row }"> 62 <template #default="{ row }">
...@@ -108,6 +116,21 @@ ...@@ -108,6 +116,21 @@
108 style="width: 180px;" 116 style="width: 180px;"
109 /> 117 />
110 </el-form-item> 118 </el-form-item>
119 <el-form-item :label="$t('problem.dialogPack')" prop="canPack" label-width="80">
120 <el-select
121 v-model="showForm.form.canPack"
122 placeholder="请选择是否打包"
123 closeabled
124 style="width: 180px;"
125 >
126 <el-option
127 v-for="item in constrain_status"
128 :key="item.value"
129 :label="item.label"
130 :value="item.value"
131 />
132 </el-select>
133 </el-form-item>
111 <el-form-item :label="$t('problem.dialogPhote')" label-width="80"> 134 <el-form-item :label="$t('problem.dialogPhote')" label-width="80">
112 <imageUpload v-model="showForm.form.coverOssId" :limit="1" :fileType='["png", "jpg", "jpeg", "ico"]'/> 135 <imageUpload v-model="showForm.form.coverOssId" :limit="1" :fileType='["png", "jpg", "jpeg", "ico"]'/>
113 </el-form-item> 136 </el-form-item>
...@@ -147,13 +170,14 @@ import { getQuestionList, updateStatus, addQuestion, editQuestion, delQuestion } ...@@ -147,13 +170,14 @@ import { getQuestionList, updateStatus, addQuestion, editQuestion, delQuestion }
147 import { getBuildingBlockLists } from '@/api/legao/kit' 170 import { getBuildingBlockLists } from '@/api/legao/kit'
148 import { reactive, toRefs } from 'vue'; 171 import { reactive, toRefs } from 'vue';
149 const { windowSize } = useTableHeight('max-height') 172 const { windowSize } = useTableHeight('max-height')
173 // 导入字典
174 const { proxy } = getCurrentInstance();
175 const { advert_state, constrain_status } = proxy.useDict("advert_state", "constrain_status");
176
150 const props = { 177 const props = {
151 label: 'name', 178 label: 'name',
152 value: 'id', 179 value: 'id',
153 } 180 }
154 // 导入字典
155 const { proxy } = getCurrentInstance();
156 const { advert_state } = proxy.useDict("advert_state");
157 181
158 182
159 const data = reactive({ 183 const data = reactive({
...@@ -219,7 +243,10 @@ function handleEdit (row) { ...@@ -219,7 +243,10 @@ function handleEdit (row) {
219 showForm.value = { 243 showForm.value = {
220 ...showForm.value, 244 ...showForm.value,
221 open: true, 245 open: true,
222 form: {...row} 246 form: {
247 ...row,
248 canPack: row.canPack ? String(row.canPack) : '0' // 将数字转换为字符串
249 }
223 } 250 }
224 } 251 }
225 252
...@@ -231,6 +258,7 @@ function btn_add () { ...@@ -231,6 +258,7 @@ function btn_add () {
231 showWindows: 0, 258 showWindows: 0,
232 showAndroid: 0, 259 showAndroid: 0,
233 showIos: 0, 260 showIos: 0,
261 canPack: '0' // 设置默认值
234 } 262 }
235 console.log(showForm.value.form) 263 console.log(showForm.value.form)
236 } 264 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!