Commit 4ebb050a by Cat

zd 社团修改

parent 29b98332
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
type="info" type="info"
size="small" size="small"
round round
@click="clubActivityRecord(task.id)" @click="clubActivityRecord(task.id, task.name)"
>社团活动记录</el-button >社团活动记录</el-button
> >
<el-button <el-button
...@@ -316,11 +316,12 @@ export default { ...@@ -316,11 +316,12 @@ export default {
}); });
}, },
// 社团活动记录 // 社团活动记录
clubActivityRecord(id) { clubActivityRecord(id, name) {
this.$router.push({ this.$router.push({
path: "/massOrganization/clubActivityRecord", path: "/massOrganization/clubActivityRecord",
query: { query: {
id, id,
name,
}, },
}); });
}, },
...@@ -351,10 +352,8 @@ export default { ...@@ -351,10 +352,8 @@ export default {
}, },
// 搜索按钮 // 搜索按钮
handleQuery() { handleQuery() {
this.throttle(() => { this.queryForm.pageNum = 1;
this.queryForm.pageNum = 1; this.getList();
this.getList();
});
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
......
...@@ -69,24 +69,14 @@ ...@@ -69,24 +69,14 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
v-for="(item, index) in scope.row.file.split(',')" v-for="(item, index) in scope.row.file.split(',')"
:key="index" :key="index.id"
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
:src="item" :src="item"
:preview-src-list="[item]" :preview-src-list="[pev + item]"
> >
</el-image> </el-image>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="是否发布" align="center" prop="isfb">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isShow"
active-value="1"
inactive-value="0"
@change="handleIsShow(scope.row)"
></el-switch>
</template>
</el-table-column> -->
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
...@@ -139,7 +129,7 @@ ...@@ -139,7 +129,7 @@
> >
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="风采主题:" prop="theme"> <el-form-item label="活动主题:" prop="theme">
<el-input <el-input
v-model="form.theme" v-model="form.theme"
placeholder="请输入" placeholder="请输入"
...@@ -232,11 +222,11 @@ ...@@ -232,11 +222,11 @@
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload" :before-upload="beforeAvatarUpload"
> >
<img v-if="form.file" :src="form.file" class="avatar" /> <!-- <img v-if="form.file" :src="form.file" class="avatar" /> -->
<div v-if="form.file"> <div v-if="form.file">
<img <img
v-for="(item, index) in form.file" v-for="(item, img) in form.file"
:key="index" :key="img.id"
:src="item" :src="item"
class="avatar" class="avatar"
/> />
...@@ -275,7 +265,7 @@ export default { ...@@ -275,7 +265,7 @@ export default {
data() { data() {
return { return {
//图片上传列表 //图片上传列表
uploadList: [], uploadList: {},
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址 uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
pev: process.env.VUE_APP_BASE_API, pev: process.env.VUE_APP_BASE_API,
...@@ -333,7 +323,7 @@ export default { ...@@ -333,7 +323,7 @@ export default {
endTime: "", endTime: "",
fzr: "", fzr: "",
id: "", id: "",
orgName: "", orgName: this.$route.query.name,
file: "", file: "",
remark: "", remark: "",
}, },
...@@ -410,10 +400,8 @@ export default { ...@@ -410,10 +400,8 @@ export default {
theme: this.queryParams.theme, theme: this.queryParams.theme,
}; };
getClubInfo(params).then((response) => { getClubInfo(params).then((response) => {
// console.log("response", response);
this.picList = response.rows; this.picList = response.rows;
this.picList.file = response.rows.file; this.picList.file = response.rows.file;
// console.log(this.picList.file);
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
...@@ -467,10 +455,10 @@ export default { ...@@ -467,10 +455,10 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.uploadList = []; this.uploadList = [];
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "新增社团活动记录"; this.title = "新增社团活动记录";
this.form.orgName = this.$route.query.name;
}, },
/** 编辑按钮操作 */ /** 编辑按钮操作 */
handleUpdate(row) { handleUpdate(row) {
...@@ -478,14 +466,15 @@ export default { ...@@ -478,14 +466,15 @@ export default {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.uploadList = []; this.uploadList = [];
this.form.file = []; this.form.file = [];
this.form.orgName = this.$route.query.name;
console.log(
this.form.orgName,
"this.form.orgName = this.$route.query.name;"
);
listClubInfo(ids).then((response) => { listClubInfo(ids).then((response) => {
this.form = response.data; this.form = response.data;
this.form.file = response.data.file.split(","); this.form.file = response.data.file.split(",");
console.log("this.form.file", this.form.file);
this.imageUrl = this.pev + this.form.picUrl; this.imageUrl = this.pev + this.form.picUrl;
console.log(this.imageUrl, "this.imageUrl");
this.open = true; this.open = true;
this.title = "编辑社团活动记录"; this.title = "编辑社团活动记录";
}); });
...@@ -496,32 +485,23 @@ export default { ...@@ -496,32 +485,23 @@ export default {
this.open = true; this.open = true;
this.uploadList = []; this.uploadList = [];
this.form.file = []; this.form.file = [];
const ids = row.id || this.ids; const ids = row.id || this.ids;
listClubInfo(ids).then((response) => { listClubInfo(ids).then((response) => {
this.form = response.data; this.form = response.data;
// this.form.file = response.data.file;
console.log("this.form.file", this.form.file);
this.form.file = response.data.file.split(","); this.form.file = response.data.file.split(",");
// console.log(this.form.file);
this.open = true; this.open = true;
}); });
this.title = "查看社团活动记录"; this.title = "查看社团活动记录";
}, },
// 上传成功回调 // 上传成功回调
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
// this.imageUrl = res.data.url;
// console.log(file);
// this.commonUpload(file);
console.log("Success res", res);
console.log("Success file", file);
if (res.code == 200) { if (res.code == 200) {
this.uploadList.push(this.pev + res.fileName); this.uploadList.push(this.pev + res.fileName);
this.form.file = this.uploadList; this.form.file = this.uploadList;
console.log("this.uploadList", this.uploadList);
console.log("this.form.file", this.form.file);
} }
console.log(this.pev, "this.uploadList111111");
console.log(res.fileName, "res.fileName");
console.log(this.form.file, "this.form.file");
// this.imageUrl = res.data.url; // this.imageUrl = res.data.url;
// console.log(file); // console.log(file);
...@@ -548,24 +528,24 @@ export default { ...@@ -548,24 +528,24 @@ export default {
this.imageUrl = ""; this.imageUrl = "";
}, },
// 上传图片 // 上传图片
uploadImage(file) { // uploadImage(file) {
const fileData = file.file; // const fileData = file.file;
const formData = new FormData(); // const formData = new FormData();
formData.append("file", fileData); // formData.append("file", fileData);
this.uploadLoading = true; // this.uploadLoading = true;
commonUpload(formData) // commonUpload(formData)
.then((response) => { // .then((response) => {
this.uploadLoading = false; // this.uploadLoading = false;
this.$modal.msgSuccess("上传成功"); // this.$modal.msgSuccess("上传成功");
this.imageUrl = this.pev + response.url; // this.imageUrl = this.pev + response.url;
// this.form.picUrl = process.env.VUE_APP_BASE_API + response.url // // this.form.picUrl = process.env.VUE_APP_BASE_API + response.url
this.form.file = this.pev + response.url; // this.form.file = this.pev + response.url;
console.log(this.form.picUrl, "this.form.picUrl"); // console.log(this.form.picUrl, "this.form.picUrl");
}) // })
.catch((error) => { // .catch((error) => {
this.uploadLoading = false; // this.uploadLoading = false;
}); // });
}, // },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
......
...@@ -428,10 +428,6 @@ export default { ...@@ -428,10 +428,6 @@ export default {
this.form.file = this.uploadList; this.form.file = this.uploadList;
} }
console.log(this.pev, "this.uploadList111111");
console.log(res.fileName, "res.fileName");
console.log(this.form.file, "this.form.file");
// this.imageUrl = res.data.url; // this.imageUrl = res.data.url;
// console.log(file); // console.log(file);
// this.commonUpload(file); // this.commonUpload(file);
......
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