This commit is contained in:
张良(004796)
2024-03-12 17:37:13 +08:00
parent 3b26224ef5
commit 4ff37871f8
7 changed files with 374 additions and 332 deletions

View File

@@ -26,11 +26,19 @@ export function addUserPictures(data) {
}) })
} }
// 修改用户相册管理 export function userPicturesAuditSuccess(data) {
export function updateUserPictures(data) {
return request({ return request({
url: '/xq/userPictures', url: '/xq/userPictures/audit/success',
method: 'put', method: 'post',
data: data
})
}
export function userPicturesAuditFail(data) {
return request({
url: '/xq/userPictures/audit/fail',
method: 'post',
data: data data: data
}) })
} }

View File

@@ -95,14 +95,17 @@ export default {
async handler(val) { async handler(val) {
if (val) { if (val) {
// 首先将值转为数组 // 首先将值转为数组
let list; let list = [];
if (Array.isArray(val)) { if (Array.isArray(val)) {
list = val; list = val;
} else { } else {
list = [{ let valSplit = val.split(",")
url: process.env.VUE_APP_COS_BASE_URL + val, valSplit.forEach(i => {
ossId: val, list.push({
path: val }]; url: i,
ossId: i,
path: i })
})
} }
// 然后将数组转为对象数组 // 然后将数组转为对象数组
this.fileList = list.map(item => { this.fileList = list.map(item => {
@@ -110,7 +113,7 @@ export default {
item = { name: item.ossId, url: item.url, ossId: item.ossId, path: item.path }; item = { name: item.ossId, url: item.url, ossId: item.ossId, path: item.path };
return item; return item;
}); });
console.log(this.fileList) console.log("watch",this.fileList)
} else { } else {
this.fileList = []; this.fileList = [];
return []; return [];
@@ -210,12 +213,10 @@ export default {
let strs = ""; let strs = "";
separator = separator || ","; separator = separator || ",";
for (let i in list) { for (let i in list) {
if (list[i].path) { if (list[i].url) {
strs += list[i].path + separator; strs += list[i].url + separator;
} }
} }
console.log("list",list)
console.log(strs);
return strs != "" ? strs.substr(0, strs.length - 1) : ""; return strs != "" ? strs.substr(0, strs.length - 1) : "";
} }
} }

View File

@@ -95,13 +95,6 @@ export const onlineStatusList = [
{ value: 1, label: '在线',listClass: listClass.danger}, { value: 1, label: '在线',listClass: listClass.danger},
] ]
export const auditStatusList = [
{ value: 0, label: '待提交',listClass: listClass.info},
{ value: 1, label: '审核中',listClass: listClass.warning},
{ value: 2, label: '审核通过',listClass: listClass.primary},
{ value: 3, label: '审核不通过',listClass: listClass.danger},
]
/** /**
* 开启视频接听 * 开启视频接听
*/ */
@@ -528,3 +521,10 @@ export const booleanList = [
{ value: true, label: '是',listClass: listClass.danger}, { value: true, label: '是',listClass: listClass.danger},
{ value: false, label: '否',listClass: listClass.info}, { value: false, label: '否',listClass: listClass.info},
] ]
export const auditStatusList = [
{ value: 0, label: '待提交',listClass: listClass.info},
{ value: 1, label: '审核中',listClass: listClass.warning},
{ value: 2, label: '审核通过',listClass: listClass.primary},
{ value: 3, label: '审核不通过',listClass: listClass.danger},
]

View File

@@ -0,0 +1,106 @@
<template>
<el-dialog title="新增客户图片" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item :label="'用户编号'" prop="usercode">
<el-autocomplete
class="inline-input"
v-model="form.usercode"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="手机号" v-if="info.mobile">
{{ info.mobile }}
</el-form-item>
<el-form-item label="昵称" v-if="info.nickname">
{{ info.nickname }} {{ info.usercode }}
</el-form-item>
<el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/>
</el-form-item>
<el-form-item label="图片" prop="picture">
<image-upload2 v-model="form.picture" :limit="3" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getUserByUsercode, listUserByUserCode } from '@/api/xq/user'
import { vipTypeList } from '@/constant/statusMap'
import { addUserPictures } from '@/api/xq/userPictures'
export default {
components: {
},
data () {
return {
vipTypeList,
open: false,
title: '',
form:{
usercode: undefined,
picture: undefined,
},
info:{
},
// 表单校验
rules: {
usercode: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
picture: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init () {
this.open = true;
this.info = {};
this.form.usercode = undefined
this.form.picture = undefined
},
querySearch(querySearch,cb){
listUserByUserCode(querySearch).then(res => {
cb(res.data.map((terminal) => {
return {
value: terminal,
name: terminal,
};
}))
})
},
handleSelect(item){
getUserByUsercode(item.value).then(res => {
this.info = res.data
})
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addUserPictures(this.form).then(data => {
this.$modal.msgSuccess("新增图片成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -0,0 +1,74 @@
<template>
<el-dialog title="审核用户上传图片" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="审核状态" prop="auditStatus">
<el-select v-model="form.auditStatus" size="small">
<el-option key="2" label="审核通过" :value="2" />
<el-option key="3" label="审核失败" :value="3" />
</el-select>
</el-form-item>
<el-form-item label="原因" prop="auditRemark" v-if="form.auditStatus === 3">
<el-input v-model="form.auditRemark" placeholder="请输入原因" type="textarea" :rows="2"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addUserPictures } from '@/api/xq/userPictures'
export default {
components: {
},
data () {
return {
open: false,
form:{
id: undefined,
auditStatus: undefined,
auditRemark: undefined,
},
// 表单校验
rules: {
auditStatus: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
auditRemark: [
{ required: true, message: "数据不能为空", trigger: "blur" }
],
},
buttonLoading: false,
}
},
created() {
},
methods: {
init (id) {
this.open = true;
this.form.id = id
this.form.auditStatus = undefined
this.form.auditRemark = undefined
},
// 表单提交
submitForm () {
this.$refs['form'].validate((valid) => {
if (valid) {
this.buttonLoading = true;
addUserPictures(this.form).then(data => {
this.$modal.msgSuccess("新增图片成功");
this.buttonLoading = false;
this.open = false
this.$emit('refreshDataList')
}).finally(() => {
this.buttonLoading = false;
});
}
})
},
}
}
</script>

View File

@@ -1,70 +1,30 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="用户ID" prop="userId"> <el-form-item label="用户编号" prop="usercode">
<el-input <el-input
v-model="queryParams.userId" v-model="queryParams.usercode"
placeholder="请输入用户ID" placeholder="请输入用户编号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="用户号" prop="usercode"> <el-form-item label="昵称" prop="nickname">
<el-input <el-input
v-model="queryParams.usercode" v-model="queryParams.nickname"
placeholder="请输入用户号" placeholder="请输入昵称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="相册" prop="picture"> <el-form-item label="手机号" prop="mobile">
<el-input <el-input
v-model="queryParams.picture" v-model="queryParams.mobile"
placeholder="请输入相册" placeholder="请输入手机号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="审核备注" prop="auditRemark">
<el-input
v-model="queryParams.auditRemark"
placeholder="请输入审核备注"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核时间" prop="auditTime">
<el-date-picker clearable
v-model="queryParams.auditTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择审核时间">
</el-date-picker>
</el-form-item>
<el-form-item label="审核人ID" prop="auditOpId">
<el-input
v-model="queryParams.auditOpId"
placeholder="请输入审核人ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核人名称" prop="auditOpName">
<el-input
v-model="queryParams.auditOpName"
placeholder="请输入审核人名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核人IP" prop="auditIp">
<el-date-picker clearable
v-model="queryParams.auditIp"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择审核人IP">
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -74,152 +34,123 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['xq:userPictures:add']" v-hasPermi="['xq:userPictures:add']"
>新增</el-button> >新增
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="danger"
plain plain
icon="el-icon-edit" icon="el-icon-delete"
size="mini" size="mini"
:disabled="single" :disabled="multiple"
@click="handleUpdate" @click="handleDelete"
v-hasPermi="['xq:userPictures:edit']" v-hasPermi="['xq:userPictures:remove']"
>修改</el-button> >删除
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="success"
plain plain
icon="el-icon-delete" icon="el-icon-edit"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleAuditSuccess"
v-hasPermi="['xq:userPictures:remove']" v-hasPermi="['xq:userPictures:edit']"
>删除</el-button> >批量审核通过
</el-col> </el-button>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['xq:userPictures:export']"
>导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="userPicturesList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="userPicturesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="" align="center" prop="id" v-if="true"/> <el-table-column label="用户编号" align="center" prop="usercode"/>
<el-table-column label="用户ID" align="center" prop="userId" /> <el-table-column label="昵称" align="center" prop="nickname" show-overflow-tooltip/>
<el-table-column label="用户号" align="center" prop="usercode" /> <el-table-column label="手机号" align="center" prop="mobile" width="100"/>
<el-table-column label="相册" align="center" prop="picture" /> <el-table-column label="头像" align="center" prop="avatar">
<el-table-column label="1-待审核 2-审核成功 3-审核失败" align="center" prop="auditStatus" /> <template v-slot="scope">
<el-table-column label="审核备注" align="center" prop="auditRemark" /> <image-avatar :src="scope.row.avatar"/>
<el-table-column label="审核时间" align="center" prop="auditTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核人ID" align="center" prop="auditOpId" /> <el-table-column label="相册" align="center" prop="picture">
<el-table-column label="审核人名称" align="center" prop="auditOpName" /> <template v-slot="scope">
<el-table-column label="审核人IP" align="center" prop="auditIp" width="180"> <image-preview :src="scope.row.picture"/>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.auditIp, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="状态" align="center" prop="auditStatus">
<template slot-scope="scope"> <template v-slot="scope">
<cai-dict-tag :options="auditStatusList" :value="scope.row.auditStatus"/>
</template>
</el-table-column>
<el-table-column label="审核备注" align="center" prop="auditRemark"/>
<el-table-column label="审核时间" align="center" prop="auditTime" width="180"/>
<el-table-column label="审核人" align="center" prop="auditOpName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
<template v-slot="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" @click="handleAuditSuccess(scope.row)"
@click="handleUpdate(scope.row)" v-if="scope.row.auditStatus === 1"
v-hasPermi="['xq:userPictures:edit']" v-hasPermi="['xq:userPictures:edit']"
>修改</el-button> >通过
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" v-if="scope.row.auditStatus === 1"
@click="handleDelete(scope.row)" @click="handleAuditFail(scope.row)"
v-hasPermi="['xq:userPictures:remove']" v-hasPermi="['xq:userPictures:edit']"
>删除</el-button> >不通过
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['xq:userPictures:remove']"
>删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<add-user-picture-dialog v-if="addUserPictureDialogVisible" ref="addUserPictureDialog" @refreshDataList="getList"/>
<!-- 添加或修改用户相册管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入用户ID" />
</el-form-item>
<el-form-item label="用户号" prop="usercode">
<el-input v-model="form.usercode" placeholder="请输入用户号" />
</el-form-item>
<el-form-item label="相册" prop="picture">
<el-input v-model="form.picture" placeholder="请输入相册" />
</el-form-item>
<el-form-item label="审核备注" prop="auditRemark">
<el-input v-model="form.auditRemark" placeholder="请输入审核备注" />
</el-form-item>
<el-form-item label="审核时间" prop="auditTime">
<el-date-picker clearable
v-model="form.auditTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择审核时间">
</el-date-picker>
</el-form-item>
<el-form-item label="审核人ID" prop="auditOpId">
<el-input v-model="form.auditOpId" placeholder="请输入审核人ID" />
</el-form-item>
<el-form-item label="审核人名称" prop="auditOpName">
<el-input v-model="form.auditOpName" placeholder="请输入审核人名称" />
</el-form-item>
<el-form-item label="审核人IP" prop="auditIp">
<el-date-picker clearable
v-model="form.auditIp"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择审核人IP">
</el-date-picker>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listUserPictures, getUserPictures, delUserPictures, addUserPictures, updateUserPictures } from "@/api/xq/userPictures"; import {
delUserPictures,
listUserPictures,
userPicturesAuditFail,
userPicturesAuditSuccess
} from '@/api/xq/userPictures'
import { auditStatusList } from '@/constant/statusMap'
import AddUserPictureDialog from '@/views/xq/userPictures/add-user-picture-dialog.vue'
export default { export default {
name: "UserPictures", name: 'UserPictures',
components: { AddUserPictureDialog },
data() { data() {
return { return {
// 按钮loading auditStatusList,
buttonLoading: false, addUserPictureDialogVisible : false,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 选中数组 // 选中数组
@@ -234,180 +165,105 @@ export default {
total: 0, total: 0,
// 用户相册管理表格数据 // 用户相册管理表格数据
userPicturesList: [], userPicturesList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userId: undefined,
usercode: undefined, usercode: undefined,
picture: undefined, nickname: undefined,
auditStatus: undefined, auditStatus: undefined,
auditRemark: undefined, mobile: undefined
auditTime: undefined,
auditOpId: undefined,
auditOpName: undefined,
auditIp: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
id: [
{ required: true, message: "不能为空", trigger: "blur" }
],
userId: [
{ required: true, message: "用户ID不能为空", trigger: "blur" }
],
usercode: [
{ required: true, message: "用户号不能为空", trigger: "blur" }
],
picture: [
{ required: true, message: "相册不能为空", trigger: "blur" }
],
auditStatus: [
{ required: true, message: "1-待审核 2-审核成功 3-审核失败不能为空", trigger: "change" }
],
auditRemark: [
{ required: true, message: "审核备注不能为空", trigger: "blur" }
],
auditTime: [
{ required: true, message: "审核时间不能为空", trigger: "blur" }
],
auditOpId: [
{ required: true, message: "审核人ID不能为空", trigger: "blur" }
],
auditOpName: [
{ required: true, message: "审核人名称不能为空", trigger: "blur" }
],
auditIp: [
{ required: true, message: "审核人IP不能为空", trigger: "blur" }
],
createTime: [
{ required: true, message: "创建时间不能为空", trigger: "blur" }
],
} }
}; }
}, },
created() { created() {
this.getList(); this.getList()
}, },
methods: { methods: {
/** 查询用户相册管理列表 */ /** 查询用户相册管理列表 */
getList() { getList() {
this.loading = true; this.loading = true
listUserPictures(this.queryParams).then(response => { listUserPictures(this.queryParams).then(response => {
this.userPicturesList = response.rows; this.userPicturesList = response.rows
this.total = response.total; this.total = response.total
this.loading = false; this.loading = false
}); })
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: undefined,
userId: undefined,
usercode: undefined,
picture: undefined,
auditStatus: undefined,
auditRemark: undefined,
auditTime: undefined,
auditOpId: undefined,
auditOpName: undefined,
auditIp: undefined,
createTime: undefined,
updateTime: undefined
};
this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd(row) {
this.reset(); this.addUserPictureDialogVisible = true
this.open = true; this.$nextTick(() => {
this.title = "添加用户相册管理"; this.$refs.addUserPictureDialog.init(row?.usercode)
})
}, },
/** 修改按钮操作 */ handleAuditSuccess(row){
handleUpdate(row) { const ids = row.id || this.ids
this.loading = true; this.$modal.confirm('是否确认审核通过用户相册管理编号为"' + ids + '"的数据项?').then(() => {
this.reset(); this.loading = true
const id = row.id || this.ids let idArray = ids.join(',')
getUserPictures(id).then(response => { return userPicturesAuditSuccess({ 'ids': idArray })
this.loading = false; }).then(() => {
this.form = response.data; this.loading = false
this.open = true; this.getList()
this.title = "修改用户相册管理"; this.$modal.msgSuccess('操作成功')
}); }).catch(() => {
}).finally(() => {
this.loading = false
})
}, },
/** 提交按钮 */ handleAuditFail(row){
submitForm() { this.$prompt('请输入失败原因', '提示', {
this.$refs["form"].validate(valid => { confirmButtonText: '确定',
if (valid) { cancelButtonText: '取消',
this.buttonLoading = true; inputPattern: /^.+$/,
if (this.form.id != null) { inputErrorMessage: '失败原因必填',
updateUserPictures(this.form).then(response => { inputType: 'textarea'
this.$modal.msgSuccess("修改成功"); }).then(({ value }) => {
this.open = false; this.loading = true
this.getList(); return userPicturesAuditFail({
}).finally(() => { 'auditRemark': value,
this.buttonLoading = false; 'id': row.id
}); })
} else { }).then(() => {
addUserPictures(this.form).then(response => { this.loading = false
this.$modal.msgSuccess("新增成功"); this.getList()
this.open = false; this.$modal.msgSuccess('审核成功')
this.getList(); }).catch(() => {
}).finally(() => { }).finally(() => {
this.buttonLoading = false; this.loading = false
}); })
}
}
});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids
this.$modal.confirm('是否确认删除用户相册管理编号为"' + ids + '"的数据项?').then(() => { this.$modal.confirm('是否确认删除用户相册管理编号为"' + ids + '"的数据项?').then(() => {
this.loading = true; this.loading = true
return delUserPictures(ids); return delUserPictures(ids)
}).then(() => { }).then(() => {
this.loading = false; this.loading = false
this.getList(); this.getList()
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess('删除成功')
}).catch(() => { }).catch(() => {
}).finally(() => { }).finally(() => {
this.loading = false; this.loading = false
}); })
},
/** 导出按钮操作 */
handleExport() {
this.download('xq/userPictures/export', {
...this.queryParams
}, `userPictures_${new Date().getTime()}.xlsx`)
} }
} }
}; }
</script> </script>

View File

@@ -32,9 +32,6 @@
<el-form-item label="头像" v-if="info.avatar"> <el-form-item label="头像" v-if="info.avatar">
<image-avatar :src="info.avatar"/> <image-avatar :src="info.avatar"/>
</el-form-item> </el-form-item>
<el-form-item>
注意若用户已是会员再次设置时将会使用最新的会员信息
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button> <el-button :loading="buttonLoading" type="primary" @click="submitForm"> </el-button>