diff --git a/src/views/Banners/Banners.vue b/src/views/Banners/Banners.vue index a881756..e42fd5a 100644 --- a/src/views/Banners/Banners.vue +++ b/src/views/Banners/Banners.vue @@ -124,6 +124,7 @@ options: [ { value: 1, label: '小程序' }, { value: 2, label: 'h5' }, + { value: 3, label: '图片' }, ], props: { multiple: false }, optionProps: { value: 'value', label: 'label' }, diff --git a/src/views/Banners/components/AddBanners.vue b/src/views/Banners/components/AddBanners.vue index 59fbd54..e2e1677 100644 --- a/src/views/Banners/components/AddBanners.vue +++ b/src/views/Banners/components/AddBanners.vue @@ -65,6 +65,7 @@ v-for="(option, optionIndex) in [ { value: 1, label: '小程序' }, { value: 2, label: 'h5' }, + { value: 3, label: '图片' }, ]" :key="optionIndex" :label="option['label']" diff --git a/src/views/Banners/components/ShowBanners.vue b/src/views/Banners/components/ShowBanners.vue index 697083c..70bb469 100644 --- a/src/views/Banners/components/ShowBanners.vue +++ b/src/views/Banners/components/ShowBanners.vue @@ -10,38 +10,38 @@ @close="$emit('update:isShow',false)">
- + {{ form['name'] }} - + {{ form['sub_name'] }} - + {{ [{'value':1,'label':'首页'}].find(i => i['value'] === form['position']) ? [{'value':1,'label':'首页'}].find(i => i['value'] === form['position'])['label'] : '' }} - + - {{ [{'value':1,'label':'小程序'},{'value':2,'label':'h5'}].find(i => i['value'] === form['jump_type']) ? [{'value':1,'label':'小程序'},{'value':2,'label':'h5'}].find(i => i['value'] === form['jump_type'])['label'] : '' }} + {{ [{'value':1,'label':'小程序'},{'value':2,'label':'h5'}, { value: 3, label: '图片' },].find(i => i['value'] === form['jump_type']) ? [{'value':1,'label':'小程序'},{'value':2,'label':'h5'}].find(i => i['value'] === form['jump_type'])['label'] : '' }} - + {{ form['jump_url'] }} - + {{ typeof form['sort'] === 'number' ? form['sort'].toFixed(2) : form['sort'] }} - + - +
@@ -59,28 +59,28 @@ default: false, required: true }, - + }, data() { return { loading: false, visible: false, form: { - + name: '', - + sub_name: '', - + position: '', - + jump_type: '', - + jump_url: '', - + sort: '', - + image_id: [], - + }, } }, diff --git a/src/views/Batch/Batch.vue b/src/views/Batch/Batch.vue index f8c2c0c..9cfacb7 100644 --- a/src/views/Batch/Batch.vue +++ b/src/views/Batch/Batch.vue @@ -85,6 +85,118 @@ + + + + { + let flag = true + row.batch_subs.forEach(i => { + if (i.name !== '' && i.name !== undefined && i.name !== null && i.name !== 'null') { + + } else { + flag = false + } + }) + if (flag) { + } else { + this.$message.warning('请填写批次详情名称') + throw new Error('请填写批次详情名称') + } + } + validBatchSub() await this.$confirm("确认保存?", "提示", { confirmButtonText: "确认", cancelButtonText: "取消", @@ -449,9 +578,9 @@ export default { for (const key in form) { form[key] = row[key]; } - this.loading = true; await save(form, false); + await Promise.all(row.batch_subs.map(item => batchSubSave(item))) await this.getList(); this.loading = false; } catch (err) { diff --git a/src/views/Batch/components/AddBatch.vue b/src/views/Batch/components/AddBatch.vue index e86f286..659cd59 100644 --- a/src/views/Batch/components/AddBatch.vue +++ b/src/views/Batch/components/AddBatch.vue @@ -55,6 +55,96 @@ style="width: 100%" > + + + + + + + + + + + + + + + + + + + + + + + + @@ -70,6 +160,7 @@ + + diff --git a/src/views/BatchSubSchool/BatchSubSchool.vue b/src/views/BatchSubSchool/BatchSubSchool.vue index 53a3ad2..1391175 100644 --- a/src/views/BatchSubSchool/BatchSubSchool.vue +++ b/src/views/BatchSubSchool/BatchSubSchool.vue @@ -84,6 +84,13 @@ > + + + + +