From 3c1d55fe67cf436de36fd2e7ddc057e26b7a89c9 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期五, 19 五月 2023 15:12:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/common/Publicity.vue | 63 ++++++++++++++++++++++++++++++-
1 files changed, 61 insertions(+), 2 deletions(-)
diff --git a/src/views/common/Publicity.vue b/src/views/common/Publicity.vue
index 08d65a5..2d73c31 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:null
},
//娣诲姞寮规
addPublicityVisibel: false,
@@ -292,6 +309,9 @@
},
methods:
{
+ handleCloseTime(){
+ this.dialogVisibleTime = false
+ },
uploadSuccess3(res, file) {
if (res.code === 200) {
this.addPublicityForm.img.push({
@@ -322,6 +342,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) {
@@ -369,6 +427,7 @@
if (!vaild) return this.$message.error('杈撳叆鏈夎')
let param = null;
param = JSON.parse(JSON.stringify(this.addPublicityForm));
+ console.log(param)
param.photoStr = param.img.map(item => item.name).join(',');
addPublicityList(param).then(res => {
this.$message({
--
Gitblit v1.8.0