Commit 1834ae1d by Cat

zd 社团

parent db30ea86
......@@ -226,7 +226,7 @@
<img
v-for="(item, index) in form.file"
:key="index"
:src="pev + form.file"
:src="pev + item"
class="avatar"
/>
</div>
......
......@@ -157,7 +157,7 @@
<img
v-for="(item, index) in form.file"
:key="index"
:src="pev + form.file"
:src="pev + item"
class="avatar"
/>
</div>
......@@ -212,19 +212,6 @@ export default {
// 输入框字数限制
TEXT_SIZE,
srcList: [],
//是否上传的院徽
isUploadPic: false,
//照片是否删除
options: [
{
value: 0,
label: "否",
},
{
value: 1,
label: "是",
},
],
//获取子组件传来的信息
pic: [],
// 图片路径
......@@ -272,31 +259,6 @@ export default {
},
],
seqencing: [{ required: true, message: "请输入排序", trigger: "blur" }],
remark: [
{
max: TEXT_SIZE,
message: "备注信息在0到200字之间",
trigger: "blur",
},
],
},
//设置table列隐藏与显示
columns: [
{ key: 0, label: `园区照片`, visible: true },
{ key: 1, label: `相片名称`, visible: true },
// {key: 2, label: `相片路径`, visible: true},
{ key: 2, label: `排序`, visible: true },
{ key: 3, label: `备注`, visible: true },
{ key: 4, label: `创建者`, visible: true },
{ key: 5, label: `创建时间`, visible: true },
{ key: 6, label: `操作`, visible: true },
],
// 作为临时图片展示
tempImage: "",
// 导出选项
exportOptions: {
title: "选择导出类别",
open: false,
},
//查看状态
check: false,
......@@ -306,20 +268,7 @@ export default {
created() {
this.getList();
},
watch: {
pic: {
handler(newValue, oldValue) {
console.log("watch----oldValue", oldValue);
console.log("watch----newValue", newValue);
this.isUploadPic = newValue[3];
},
},
},
methods: {
//是否删除 选中值发生变化时id处理函数
selectChangeHandler(value) {
this.form.isShow = value;
},
/** 查询列表 */
getList() {
this.loading = true;
......@@ -328,20 +277,12 @@ export default {
cid: this.$route.query.id,
theme: this.queryParams.theme,
};
// console.log(params);
getCommunityInfo(params).then((response) => {
console.log("response", response);
this.picList = response.rows;
// this.picList.file = response.rows.file.split(',');
this.total = response.total;
this.loading = false;
});
},
//获取图片信息
getSchoolInfoPic(val) {
this.pic = val;
},
// 取消按钮
cancel() {
this.open = false;
......@@ -402,8 +343,6 @@ export default {
this.form = response.data;
this.form.file = response.data.file.split(",");
this.imageUrl = this.pev + this.form.picUrl;
console.log(this.form.file, "this.form.file222222222");
// console.log(this.imageUrl, "this.imageUrl");
this.open = true;
this.title = "修改园区照片";
});
......@@ -424,21 +363,10 @@ export default {
},
// 上传成功回调
handleAvatarSuccess(res, file) {
console.log("response上传成功回调", res);
console.log("file上传成功回调", file);
if (res.code == 200) {
this.uploadList.push(res.fileName);
this.form.file = this.uploadList;
console.log("this.form.file", this.form.file);
}
console.log(this.uploadList, "this.uploadList");
console.log(this.form.file, "this.form.file");
console.log(this.pev, "this.pev");
console.log(res.fileName, "res.fileName");
// this.imageUrl = res.data.url;
// console.log(file);
// this.commonUpload(file);
},
// 上传前格式和图片大小限制
beforeAvatarUpload(file) {
......@@ -460,26 +388,6 @@ export default {
handleRemove(file, fileList) {
this.imageUrl = "";
},
// 上传图片
// uploadImage(file) {
// const fileData = file.file;
// const formData = new FormData();
// formData.append("file", fileData);
// this.uploadLoading = true;
// commonUpload(formData)
// .then((response) => {
// this.uploadLoading = false;
// this.$modal.msgSuccess("上传成功");
// this.imageUrl = this.pev + response.url;
// // this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
// this.form.file = this.pev + response.url;
// this.form.picUrl = response.url;
// })
// .catch((error) => {
// this.uploadLoading = false;
// });
// },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
......@@ -491,7 +399,6 @@ export default {
theme: this.form.theme,
file: this.uploadList.toString(),
};
console.log(params, "修改params");
editCommunityInfo(params)
.then((response) => {
this.getList();
......@@ -506,7 +413,6 @@ export default {
theme: this.form.theme,
file: this.uploadList.toString(),
};
console.log(params, "新增params");
addCommunityInfo(params)
.then((response) => {
this.getList();
......@@ -546,28 +452,6 @@ export default {
/** 是否发布 */
handleIsShow(row) {
// console.log(row);
// const data = {
// id: row.id,
// };
// this.$modal
// .confirm("是否发布此信息?")
// .then(() => {
// this.$modal.loading("正在修改状态,请稍等...");
// isCommunityFb(data)
// .then((response) => {
// this.$modal.closeLoading();
// this.$message.success("修改成功");
// this.getList();
// })
// .catch((error) => {
// this.$modal.closeLoading();
// });
// })
// .catch(() => {
// // 取消操作时的逻辑
// });
const data = {
id: row.id,
};
......@@ -579,7 +463,7 @@ export default {
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("修改成功");
// this.getList();
this.getList();
})
.catch((error) => {
this.$modal.closeLoading();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment