From 06b7757e3de40b5c380df429a06b859389c80fbc Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期三, 10 五月 2023 18:15:18 +0800 Subject: [PATCH] 修改公共时间 --- src/views/common/Publicity.vue | 62 ++++++++++++++++++++++++++++++- 1 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/views/common/Publicity.vue b/src/views/common/Publicity.vue index 9c1292e..dde7c14 100644 --- a/src/views/common/Publicity.vue +++ b/src/views/common/Publicity.vue @@ -58,6 +58,8 @@ </el-button> <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎 </el-button> + <el-button type="text" size="medium" @click="delTime(scope.row.id)" style="color:#ff0000">淇敼鏃堕棿 + </el-button> </template> </el-table-column> </el-table> @@ -208,7 +210,19 @@ </el-table-column> --> </el-dialog> - + <el-dialog + title="淇敼鏃堕棿" + :visible.sync="dialogVisibleTime" + width="30%" + :before-close="handleCloseTime"> + <el-date-picker v-model="detailsRow.releaseTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisibleTime = false">鍙� 娑�</el-button> + <el-button type="primary" @click="subTIme">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -223,6 +237,8 @@ name: "Publicity", data() { return { + detailsId:null, + dialogVisibleTime:false, fileList: [], dialogImageUrl: '', dialogVisible: false, @@ -234,7 +250,8 @@ addPublicityForm: { publicityTitle: '', text: '', - img: [] + img: [], + releaseTime:[] }, //娣诲姞寮规 addPublicityVisibel: false, @@ -292,6 +309,9 @@ }, methods: { + handleCloseTime(){ + this.dialogVisibleTime = false + }, uploadSuccess3(res, file) { if (res.code === 200) { this.addPublicityForm.img.push({ @@ -323,6 +343,44 @@ this.search(); }) }, + subTIme(){ + let obj = { + id: this.detailsId, + time:this.detailsRow.releaseTime + } + this.$http.get('/api/publicity/changTime?id='+obj.id+'&'+'time='+obj.time).then(res=>{ + console.log(res) + let val = res.data + if (val.code ==200){ + + this.dialogVisibleTime =false + this.init() + }else { + this.$message.error(val.msg) + } + }) + + }, + delTime(e){ + console.log(e) + this.getDelial(e) + this.detailsId = e + this.dialogVisibleTime =true + + }, + getDelial(val){ + this.$http.get('/api/publicity/' + val).then(res => { + this.detailsRow = res.data.data + this.detailsRow.img = this.detailsRow['photoStr'].split(',').map(item => { + return { + name: item, + url: '/minio/img/' + item, + uid: this.detailsRow['photoStr'].split(',').length + } + }) + this.fileList = this.detailsRow.img + }); + }, //鍙戝竷/涓嬫灦 punlish(val, val2) { if (val2 == 0) { -- Gitblit v1.8.0