| | |
| | | <!-- 已添加的标题列表 --> |
| | | <div v-for="(title, index) in form.titles" :key="index" class="title-item"> |
| | | <card class="title-text"> |
| | | <Input v-model="title.templateTitle" placeholder="请输入文本标题" style="width: 300px; margin-top: 8px;"/> |
| | | <div style="display: flex; align-items: center; gap: 8px;"> |
| | | <span>{{ title.contentType ==='TEXT' ? '文本标题': '图片标题'}} :</span> |
| | | <Input v-model="title.templateTitle" placeholder="请输入标题" style="width: 300px; margin-top: 8px;"/> |
| | | </div> |
| | | |
| | | <Button class="delete-btn" type="text" @click="removeTitle(index)" style="color: #ff4d4f;">删除</Button> |
| | | </card> |
| | | <!-- <card v-if="title.contentType === 'IMAGE'" class="title-image">--> |
| | |
| | | |
| | | }, |
| | | delTemplate(row){ |
| | | del(row.id).then(res =>{ |
| | | if (res.code === 200){ |
| | | this.$Message.success(res.msg) |
| | | this.$Modal.confirm({ |
| | | title: "操作确认", |
| | | content: "您确认要删除【 " + row.templateName + "】吗?", |
| | | onOk: () => { |
| | | del(row.id).then(res =>{ |
| | | if (res.code === 200){ |
| | | this.$Message.success(res.msg) |
| | | } |
| | | this.getList() |
| | | }) |
| | | } |
| | | this.getList() |
| | | }) |
| | | }); |
| | | |
| | | }, |
| | | async upLoadImg(file) { |
| | | console.log("打印上传1") |
| | |
| | | if (res.code === 200) { |
| | | this.$Message.success(res.msg); |
| | | this.modelShow = false; |
| | | this.showModal = false; |
| | | this.getList(); |
| | | } else { |
| | | this.$Message.error(res.msg); |
| | |
| | | console.error(error); |
| | | } finally { |
| | | this.submitLoading = false; |
| | | this.showModal = false; |
| | | } |
| | | } |
| | | }); |