|
@@ -345,6 +345,12 @@
|
|
|
prop="createtime"
|
|
prop="createtime"
|
|
|
label="创建时间"
|
|
label="创建时间"
|
|
|
>
|
|
>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ prop="evatime2"
|
|
|
|
|
+ label="截止日期"
|
|
|
|
|
+ >
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="200px">
|
|
<el-table-column label="操作" width="200px">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -414,14 +420,28 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<!-- banner -->
|
|
<!-- banner -->
|
|
|
- <div class="el-form-item">
|
|
|
|
|
|
|
+ <div class="el-form-item">
|
|
|
|
|
+ <label class="el-form-item__label" style="width: 100px">截止日期</label>
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="editCyInfo.evatime"
|
|
|
|
|
+ type="datetimerange"
|
|
|
|
|
+ align="right"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期"
|
|
|
|
|
+ :default-time="['12:00:00', '08:00:00']">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="el-form-item">
|
|
|
<label class="el-form-item__label" style="width: 100px">banner</label>
|
|
<label class="el-form-item__label" style="width: 100px">banner</label>
|
|
|
<div class="el-form-item__content" style="margin-left: 5px">
|
|
<div class="el-form-item__content" style="margin-left: 5px">
|
|
|
<el-button type="primary" @click="cyImgAdd">添加</el-button>
|
|
<el-button type="primary" @click="cyImgAdd">添加</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="el-form-item" v-if="editCyInfo.banner">
|
|
|
|
|
- <img style="width: 60px;height: 60px;object-fit: cover;" :src="editCyInfo.banner" alt="">
|
|
|
|
|
|
|
+ <div class="el-form-item" v-if="editCyInfo.banner">
|
|
|
|
|
+ <div style="position: relative;">
|
|
|
|
|
+ <div class="cha" @click="delImg">❌</div>
|
|
|
|
|
+ <img style="width: 60px;height: 60px;object-fit: cover;" :src="editCyInfo.banner" alt="">
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
</form>
|
|
@@ -533,7 +553,7 @@ export default {
|
|
|
cyloading:false,
|
|
cyloading:false,
|
|
|
|
|
|
|
|
// 社区添加与修改所存储的信息
|
|
// 社区添加与修改所存储的信息
|
|
|
- editCyInfo:{name:'',banner:''},
|
|
|
|
|
|
|
+ editCyInfo:{name:'',banner:'',evatime:''},
|
|
|
// 添加与修改社区共用一个弹框 0是添加信息 1 修改信息
|
|
// 添加与修改社区共用一个弹框 0是添加信息 1 修改信息
|
|
|
isedit:0,
|
|
isedit:0,
|
|
|
// 添加与修改社区弹框
|
|
// 添加与修改社区弹框
|
|
@@ -1066,7 +1086,17 @@ export default {
|
|
|
getcylist(params)
|
|
getcylist(params)
|
|
|
.then(async (res) => {
|
|
.then(async (res) => {
|
|
|
console.log(res);
|
|
console.log(res);
|
|
|
- this.cytableData = res.data[0]
|
|
|
|
|
|
|
+ let data = res.data[0]
|
|
|
|
|
+ data.forEach(e => {
|
|
|
|
|
+
|
|
|
|
|
+ if (e.evatime && e.evatime != 'null' && JSON.parse(e.evatime).length) {
|
|
|
|
|
+ e.evatime = JSON.parse(e.evatime)
|
|
|
|
|
+ e.evatime2 = e.evatime.map(dateStr => this.formatDateCy(dateStr)).join('——')
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ this.cytableData = data
|
|
|
|
|
+ console.log('this.cytableData',this.cytableData);
|
|
|
|
|
+
|
|
|
this.cyloading = false;
|
|
this.cyloading = false;
|
|
|
})
|
|
})
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
@@ -1074,6 +1104,26 @@ export default {
|
|
|
console.error("请求失败,错误信息:", error);
|
|
console.error("请求失败,错误信息:", error);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ formatDateCy(dateStr, format = 'YYYY-MM-DD HH:mm:ss') {
|
|
|
|
|
+ const date = new Date(dateStr);
|
|
|
|
|
+
|
|
|
|
|
+ const pad = (num) => num.toString().padStart(2, '0');
|
|
|
|
|
+
|
|
|
|
|
+ const year = date.getFullYear();
|
|
|
|
|
+ const month = pad(date.getMonth() + 1);
|
|
|
|
|
+ const day = pad(date.getDate());
|
|
|
|
|
+ const hours = pad(date.getHours());
|
|
|
|
|
+ const minutes = pad(date.getMinutes());
|
|
|
|
|
+ const seconds = pad(date.getSeconds());
|
|
|
|
|
+
|
|
|
|
|
+ return format
|
|
|
|
|
+ .replace('YYYY', year)
|
|
|
|
|
+ .replace('MM', month)
|
|
|
|
|
+ .replace('DD', day)
|
|
|
|
|
+ .replace('HH', hours)
|
|
|
|
|
+ .replace('mm', minutes)
|
|
|
|
|
+ .replace('ss', seconds);
|
|
|
|
|
+ },
|
|
|
// 点击添加社区 0 是添加社区 1是修改社区信息
|
|
// 点击添加社区 0 是添加社区 1是修改社区信息
|
|
|
editCy(val,row){
|
|
editCy(val,row){
|
|
|
console.log('row',row);
|
|
console.log('row',row);
|
|
@@ -1093,6 +1143,7 @@ export default {
|
|
|
nam: this.editCyInfo.name,
|
|
nam: this.editCyInfo.name,
|
|
|
oid:this.cyInfo.id,
|
|
oid:this.cyInfo.id,
|
|
|
ban: this.editCyInfo.banner,
|
|
ban: this.editCyInfo.banner,
|
|
|
|
|
+ eva: JSON.stringify(this.editCyInfo.evatime),
|
|
|
};
|
|
};
|
|
|
addCommunity(params)
|
|
addCommunity(params)
|
|
|
.then(async (response) => {
|
|
.then(async (response) => {
|
|
@@ -1111,7 +1162,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
this.dialogcyADD = false;
|
|
this.dialogcyADD = false;
|
|
|
this.getCy()
|
|
this.getCy()
|
|
|
- this.editCyInfo = {name:'',banner:''};
|
|
|
|
|
|
|
+ this.editCyInfo = {name:'',banner:'',evatime:''};
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
@@ -1126,7 +1177,10 @@ export default {
|
|
|
idL:this.editCyInfo.id,
|
|
idL:this.editCyInfo.id,
|
|
|
nam: this.editCyInfo.name,
|
|
nam: this.editCyInfo.name,
|
|
|
ban: this.editCyInfo.banner,
|
|
ban: this.editCyInfo.banner,
|
|
|
|
|
+ eva: JSON.stringify(this.editCyInfo.evatime),
|
|
|
};
|
|
};
|
|
|
|
|
+ console.log('params',params);
|
|
|
|
|
+
|
|
|
updateCommunity(params)
|
|
updateCommunity(params)
|
|
|
.then(async (response) => {
|
|
.then(async (response) => {
|
|
|
if (response) {
|
|
if (response) {
|
|
@@ -1144,7 +1198,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
this.dialogcyADD = false;
|
|
this.dialogcyADD = false;
|
|
|
this.getCy()
|
|
this.getCy()
|
|
|
- this.editCyInfo = {name:'',banner:''};
|
|
|
|
|
|
|
+ this.editCyInfo = {name:'',banner:'',evatime:''};
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
@@ -1189,7 +1243,10 @@ export default {
|
|
|
let _url = await this.uploadFile("image/*");
|
|
let _url = await this.uploadFile("image/*");
|
|
|
this.editCyInfo.banner = _url
|
|
this.editCyInfo.banner = _url
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ // 清除照片
|
|
|
|
|
+ delImg(){
|
|
|
|
|
+ this.editCyInfo.banner = ''
|
|
|
|
|
+ },
|
|
|
// 全选
|
|
// 全选
|
|
|
handleCheckAllChange2(val){
|
|
handleCheckAllChange2(val){
|
|
|
this.checkboxList3 = val ? this.teacherJuri.map(e=>e.userid) : [];
|
|
this.checkboxList3 = val ? this.teacherJuri.map(e=>e.userid) : [];
|
|
@@ -1379,7 +1436,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
handleClose2(){
|
|
handleClose2(){
|
|
|
this.editCyInfo = ''
|
|
this.editCyInfo = ''
|
|
|
- this.editCyInfo = {name:'',banner:''};
|
|
|
|
|
|
|
+ this.editCyInfo = {name:'',banner:'',evatime:''};
|
|
|
this.dialogcyADD=false;
|
|
this.dialogcyADD=false;
|
|
|
this.dialogcyperson = false
|
|
this.dialogcyperson = false
|
|
|
}
|
|
}
|
|
@@ -1544,4 +1601,8 @@ export default {
|
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
|
|
+.cha{
|
|
|
|
|
+ position: absolute;top: 0;right: 5px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|