版本暂存

This commit is contained in:
dragon
2024-11-14 15:37:31 +08:00
parent 7610a2768f
commit ed618598c2
6 changed files with 1827 additions and 788 deletions

View File

@@ -0,0 +1,12 @@
import request from '@/utils/request';
import { genQueryParam } from '@/utils/maintainer';
import qs from 'qs';
// 地区接口
export const listPartitionInfo = query => {
return request({
url: '/partition/listPartitionInfo',
method: 'get',
params: query
});
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,151 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>平台ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="x" align="center" label="个人主页id" />
<el-table-column prop="x" align="center" label="个人主页名称" />
<el-table-column prop="x" align="center" label="用户uID" />
<el-table-column prop="x" align="center" label="用户昵称" />
<el-table-column prop="x" align="center" label="赠送天数" />
<el-table-column prop="x" align="center" label="备注" />
<el-table-column prop="x" align="center" label="操作时间" />
<el-table-column prop="x" align="center" label="操作人" />
<!-- <el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
operationDialog = true;
operationValue.partitionId = scope.row.x;
operationValue.nameZh = scope.row.x;
operationValue.nameEn = scope.row.x;
operationValue.nameAr = scope.row.x;
operationValue.nameTr = scope.row.x;
operationValue.price = scope.row.x;
operationValue.day = scope.row.x;
operationValue.imageUrl = scope.row.x;
operationValue.status = scope.row.x;
"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
<el-button
@click="send()"
class="primary"
type="primary"
size="default"
>赠送</el-button
>
</template>
</el-table-column> -->
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
// import { } from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageGiftRecordManagement",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
},
// 表格
tableData: [{ x: "x" }],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {},
methods: {
// 查询接口
getData() {
this.loading = true;
// get({}).then((res) => {
// if (res.code == 200) {
// this.loading = false;
// } else {
// ElMessage({
// showClose: true,
// message: res.message,
// type: "error",
// });
// }
// });
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,152 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>平台ID</span>
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="x" align="center" label="个人主页id" />
<el-table-column prop="x" align="center" label="个人主页名称" />
<el-table-column prop="x" align="center" label="用户uID" />
<el-table-column prop="x" align="center" label="用户昵称" />
<el-table-column prop="x" align="center" label="拥有个人主页" />
<el-table-column prop="x" align="center" label="个人主页状态" />
<el-table-column prop="x" align="center" label="购买时间" />
<el-table-column prop="x" align="center" label="有效时间" />
<el-table-column prop="x" align="center" label="过期时间" />
<!-- <el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
operationDialog = true;
operationValue.partitionId = scope.row.x;
operationValue.nameZh = scope.row.x;
operationValue.nameEn = scope.row.x;
operationValue.nameAr = scope.row.x;
operationValue.nameTr = scope.row.x;
operationValue.price = scope.row.x;
operationValue.day = scope.row.x;
operationValue.imageUrl = scope.row.x;
operationValue.status = scope.row.x;
"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
<el-button
@click="send()"
class="primary"
type="primary"
size="default"
>赠送</el-button
>
</template>
</el-table-column> -->
</el-table>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
// import { } from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageRecordManagement",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
id: "",
},
// 表格
tableData: [{ x: "x" }],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {},
methods: {
// 查询接口
getData() {
this.loading = true;
// get({}).then((res) => {
// if (res.code == 200) {
// this.loading = false;
// } else {
// ElMessage({
// showClose: true,
// message: res.message,
// type: "error",
// });
// }
// });
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,369 @@
<template>
<div class="box">
<!-- 查询 -->
<div class="inquire">
<span>地区</span>
<el-select v-model="inquire.partitionId" placeholder="请选择">
<el-option
v-for="item in inquire.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="inquire">
<span>名称</span>
<el-input v-model="inquire.name" placeholder="" class="input"></el-input>
</div>
<div class="inquire">
<span>状态</span>
<el-select v-model="inquire.status" placeholder="请选择">
<el-option
v-for="item in inquire.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<!-- 查询按钮 -->
<el-button class="primary" type="primary" @click="getData()"
>查询</el-button
>
<!-- 新增按钮 -->
<el-button
class="primary"
type="primary"
@click="
operationDialog = true;
operationValue.partitionId = '';
operationValue.nameZh = '';
operationValue.nameEn = '';
operationValue.nameAr = '';
operationValue.nameTr = '';
operationValue.price = '';
operationValue.day = '';
operationValue.imageUrl = '';
operationValue.status = '';
"
>新增</el-button
>
<!-- 表格 -->
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%; margin-top: 25px"
>
<el-table-column prop="x" align="center" label="地区" />
<el-table-column prop="x" align="center" label="名称" />
<el-table-column prop="x" align="center" label="阿语名称" />
<el-table-column prop="x" align="center" label="英语名称" />
<el-table-column prop="x" align="center" label="土耳其名称" />
<el-table-column prop="x" align="center" label="价格" />
<el-table-column prop="x" align="center" label="有效期" />
<el-table-column prop="x" align="center" label="图片">
<template v-slot="scope">
<el-image
style="width: 200px; height: 200px"
:src="scope.row.x"
:zoom-rate="1.1"
:preview-src-list="[scope.row.x]"
fit="scale-down"
preview-teleported="true"
hide-on-click-modal="true"
/>
</template>
</el-table-column>
<el-table-column prop="x" align="center" label="状态">
<template v-slot="scope">
{{ scope.row.x }}
</template>
</el-table-column>
<el-table-column prop="x" align="center" label="操作人" />
<el-table-column prop="x" align="center" label="操作时间" />
<el-table-column align="center" label="操作" width="300">
<template v-slot="scope">
<el-button
@click="
operationDialog = true;
operationValue.partitionId = scope.row.x;
operationValue.nameZh = scope.row.x;
operationValue.nameEn = scope.row.x;
operationValue.nameAr = scope.row.x;
operationValue.nameTr = scope.row.x;
operationValue.price = scope.row.x;
operationValue.day = scope.row.x;
operationValue.imageUrl = scope.row.x;
operationValue.status = scope.row.x;
"
class="primary"
type="primary"
size="default"
>编辑</el-button
>
<el-button
@click="send()"
class="primary"
type="primary"
size="default"
>赠送</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 新增&操作弹窗 -->
<el-dialog
v-model="operationDialog"
:title="operationDialogTitle"
width="28%"
center
>
<div class="operation">
<span style="margin-right: 20px">地区</span>
<el-select v-model="operationValue.partitionId" placeholder="请选择">
<el-option
v-for="item in operationValue.partitionArr"
:key="item.id"
:label="item.desc"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="operation">
<span style="margin-right: 20px">华语名称</span>
<el-input
v-model="operationValue.nameZh"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">英语名称</span>
<el-input
v-model="operationValue.nameEn"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">阿拉伯名称</span>
<el-input
v-model="operationValue.nameAr"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">土耳其名称</span>
<el-input
v-model="operationValue.nameTr"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">价格</span>
<el-input
v-model="operationValue.price"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span style="margin-right: 20px">有效天数</span>
<el-input
v-model="operationValue.day"
style="width: 200px"
class="input"
></el-input>
</div>
<div class="operation">
<span class="left" style="margin-right: 20px">图片</span>
<el-upload
class="avatar-uploader"
action="/admin/tencent/cos/upload/file"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
:on-error="handleAvatarError"
>
<img
v-if="operationValue.imageUrl"
:src="operationValue.imageUrl"
class="avatar"
/>
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</el-upload>
</div>
<div class="operation">
<span style="margin-right: 20px">状态</span>
<el-select v-model="operationValue.status" placeholder="请选择">
<el-option
v-for="item in operationValue.options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="operationDialog = false">取消</el-button>
<el-button type="primary" @click="operation()"> 确认 </el-button>
</span>
</template>
</el-dialog>
<!-- 分页 -->
<el-pagination
style="margin-top: 10px"
class="paginationClass"
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
layout="sizes, prev, pager, next"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
<script>
import { listPartitionInfo } from "@/api/personalHomepageResourceManagement/personalHomepageResourceManagement";
// @ts-ignore
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
export default {
name: "personalHomepageResourceManagement",
data() {
return {
loading: false,
//查询所需条件对象
inquire: {
partitionId: "",
partitionArr: [],
name: "",
status: "",
options: [
{ label: "有效", value: 1 },
{ label: "无效", value: 0 },
],
},
operationDialog: false,
operationDialogTitle: "新增%编辑",
operationValue: {
partitionId: "",
partitionArr: [],
nameZh: "",
nameEn: "",
nameAr: "",
nameTr: "",
price: "",
day: "",
imageUrl: "",
status: "",
options: [
{ label: "有效", value: 1 },
{ label: "无效", value: 0 },
],
},
// 表格
tableData: [{ x: "x" }],
// 分页
total: 10, //总页数
currentPage: 1, //页码
pageSize: 10, //条数
};
},
created() {
listPartitionInfo().then((res) => {
this.inquire.partitionArr = this.operationValue.partitionArr = res.data;
// this.getData();
});
},
methods: {
// 查询接口
getData() {
this.loading = true;
// get({}).then((res) => {
// if (res.code == 200) {
// this.loading = false;
// } else {
// ElMessage({
// showClose: true,
// message: res.message,
// type: "error",
// });
// }
// });
},
beforeAvatarUpload() {
ElMessage({
showClose: true,
message: "上传中~",
type: "warning",
});
},
handleAvatarError() {
ElMessage({
showClose: true,
message: "上传失败!",
type: "error",
});
},
handleAvatarSuccess(res, file) {
console.log(file);
this.ediObj.imageUrl1 = file.response.data;
ElMessage({
showClose: true,
message: "上传成功!",
type: "success",
});
},
// 分页导航
handleSizeChange() {
this.getData();
},
handleCurrentChange() {
this.getData();
},
},
};
</script>
<style lang="less" scoped>
.box {
padding-top: 20px;
background: #ecf0f5;
.inquire {
display: inline-block;
margin-right: 20px;
span {
margin-right: 10px;
}
.input {
width: 180px;
margin-right: 10px;
}
}
.dialogTableVisibleBut {
display: block;
margin: 30px 0 0 830px;
}
.paginationClass {
margin: 15px 0 5px 0px;
}
}
.operation {
margin-bottom: 20px;
width: 55%;
display: flex;
align-items: baseline;
justify-content: space-between;
}
</style>

File diff suppressed because it is too large Load Diff