@@ -12,6 +12,18 @@ export function userListApi(params) { | |||
params | |||
}) | |||
} | |||
/** | |||
* @description 用户列表-状态 | |||
* @param {*} | |||
* @returns | |||
*/ | |||
export function updateStatusApi(data) { | |||
return request({ | |||
url: `/wxCUserBasicInfo/updateStatus`, | |||
method: 'post', | |||
data | |||
}) | |||
} | |||
// 绑定定制模板 | |||
export function personMouldListApi(pageNum, pageSize) { | |||
return request({ | |||
@@ -287,7 +287,7 @@ export default { | |||
video: { | |||
time: 'Total time consumed', | |||
code: 'Access Party Code', | |||
videoTime: 'Video duration', | |||
videoTime: 'Video duration(S)', | |||
videoUrl: 'Video link', | |||
createTime: 'CreateTime', | |||
detail: 'View video details', | |||
@@ -372,7 +372,7 @@ export default { | |||
title: 'Video Title', | |||
coverImg: 'Cover Image', | |||
videoPlayUrl: 'Video address', | |||
videoTime: 'Video duration', | |||
videoTime: 'Video duration(S)', | |||
videoSize: 'Video size', | |||
videoMsg: 'Video Generation Information', | |||
costPoints: 'Consumption coins', | |||
@@ -383,7 +383,8 @@ export default { | |||
videoDetail: 'Video Details', | |||
name: 'name', | |||
videType: 'Video type', | |||
close: 'Close' | |||
close: 'Close', | |||
all: 'All' | |||
}, | |||
businessCheck: { | |||
detail: 'Key details', | |||
@@ -286,7 +286,7 @@ export default { | |||
video: { | |||
time: '已消耗总时长', | |||
code: '接入方编码', | |||
videoTime: '视频时长', | |||
videoTime: '视频时长(秒)', | |||
videoUrl: '视频链接', | |||
createTime: '创建时间', | |||
detail: '查看视频详情', | |||
@@ -371,7 +371,7 @@ export default { | |||
title: '视频标题', | |||
coverImg: '封面图', | |||
videoPlayUrl: '视频地址', | |||
videoTime: '视频时长', | |||
videoTime: '视频时长(秒)', | |||
videoSize: '视频大小', | |||
videoMsg: '视频生成信息', | |||
costPoints: '消耗金币', | |||
@@ -382,7 +382,8 @@ export default { | |||
videoDetail: '视频详情', | |||
name: '名称', | |||
videType: '视频类型', | |||
close: '关闭' | |||
close: '关闭', | |||
all: '全部' | |||
}, | |||
businessCheck: { | |||
detail: '密钥详情', | |||
@@ -2,6 +2,7 @@ | |||
export {} | |||
declare global { | |||
const EffectScope: typeof import('vue')['EffectScope'] | |||
const ElForm: typeof import('element-plus/es')['ElForm'] | |||
const ElMessage: typeof import('element-plus/es')['ElMessage'] | |||
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] | |||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] | |||
@@ -270,6 +271,7 @@ import { UnwrapRef } from 'vue' | |||
declare module 'vue' { | |||
interface ComponentCustomProperties { | |||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']> | |||
readonly ElForm: UnwrapRef<typeof import('element-plus/es')['ElForm']> | |||
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']> | |||
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']> | |||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']> | |||
@@ -37,7 +37,6 @@ const getDate = (val) => { | |||
const checkboxGroup = ref([]) | |||
const total = ref(0); | |||
const tableData = ref([]); | |||
const modelAllListFunc = async () => { | |||
try { | |||
const res = await personMouldListApi(1, 10000); | |||
@@ -48,6 +47,8 @@ const modelAllListFunc = async () => { | |||
if(modelIds.data && modelIds.data.length > 0) { | |||
modelIds.data.forEach((item) => { | |||
checkboxGroup.value.push(item) | |||
let set = new Set(checkboxGroup.value) | |||
checkboxGroup.value = Array.from(set) | |||
}) | |||
} | |||
}, 500) | |||
@@ -28,7 +28,7 @@ | |||
:small="false" | |||
:disabled="false" | |||
:background="true" | |||
layout="total, sizes, prev, pager, next, jumper" | |||
layout="total, prev, pager, next, jumper" | |||
:total="total" | |||
@size-change="handleSizeChange" | |||
@current-change="handleCurrentChange" | |||
@@ -6,17 +6,16 @@ | |||
<el-input v-model="formInline.phone" :placeholder="$t('rechargeList.phonePlaceholder')" clearable /> | |||
</el-form-item> | |||
<el-form-item :label="$t('rechargeList.productName')"> | |||
<el-input v-model="formInline.mouldSmIdLike" :placeholder="$t('rechargeList.productNamePlaceholder')" clearable /> | |||
<el-input v-model="formInline.productTitle" :placeholder="$t('rechargeList.productNamePlaceholder')" clearable /> | |||
</el-form-item> | |||
<el-form-item :label="$t('rechargeList.time')"> | |||
<el-date-picker | |||
v-model="formInline.time" | |||
type="daterange" | |||
range-separator="To" | |||
start-placeholder="Start date" | |||
end-placeholder="End date" | |||
value-format="YYYY-MM-DD" | |||
:default-value="new Date()" | |||
type="datetimerange" | |||
start-placeholder="Start Date" | |||
end-placeholder="End Date" | |||
value-format="YYYY-MM-DD HH:mm:ss" | |||
:default-time="defaultTime" | |||
/> | |||
</el-form-item> | |||
<el-form-item> | |||
@@ -119,6 +118,11 @@ | |||
const pageNum = ref(1); | |||
const pageSize = ref(10); | |||
const total = ref(0); | |||
const defaultTime = [ | |||
new Date(2000, 1, 1, 0, 0, 0), | |||
new Date(2000, 2, 1, 23, 59, 59), | |||
] // '12:00:00', '08:00:00' | |||
const getPayVendor = (val) => { | |||
return val === 2 ? "微信" : "支付宝"; | |||
@@ -52,6 +52,7 @@ | |||
align="center" | |||
> | |||
<template #default="scope"> | |||
<el-button link type="primary" size="small" @click="setStatus(scope.row)">{{ scope.row.status === 0 ? '封禁' : '恢复' }}</el-button> | |||
<el-button link type="primary" size="small" @click="showDetail(scope.row.id)">{{$t('userList.view')}}</el-button> | |||
<el-button link type="primary" size="small" @click="rechargeDetail(scope.row)">{{$t('userList.rechargeDetail')}}</el-button> | |||
<el-button link type="primary" size="small" @click="videoDetail(scope.row)"> {{$t('userList.videoDetail')}}</el-button> | |||
@@ -90,9 +91,9 @@ | |||
<el-form-item :label="$t('userList.createDate')"> | |||
<el-input v-model="form.createDate" /> | |||
</el-form-item> | |||
<el-form-item> | |||
<!-- <el-form-item> | |||
<el-button>{{$t('userList.close')}}</el-button> | |||
</el-form-item> | |||
</el-form-item> --> | |||
</el-form> | |||
</el-dialog> | |||
@@ -109,7 +110,7 @@ | |||
<script setup> | |||
//#region 导入 | |||
import { userListApi, userListFindByIdApi } from '@/apis/userManage.js' | |||
import { userListApi, userListFindByIdApi, updateStatusApi } from '@/apis/userManage.js' | |||
import { useI18n } from "vue-i18n"; | |||
@@ -213,6 +214,16 @@ const formInline = ref({ | |||
voiceDialogVisible.value = true | |||
cUserId.value = id | |||
} | |||
// 状态 | |||
function setStatus(item) { | |||
updateStatusApi({id: item.id, status: item.status === 0 ? 1 : 0}).then(res => { | |||
if (res.code === 200) { | |||
ElMessage.success((lanChange.value) == "zh-cn" ? "操作成功!" : 'Operation successful!'); | |||
getListData(1, 10); | |||
} | |||
}) | |||
} | |||
onMounted(() => { | |||
getListData(1, 10); | |||
@@ -14,6 +14,7 @@ | |||
:placeholder="$t('videoList.typePlaceholder')" | |||
clearable | |||
> | |||
<el-option :label="$t('videoList.notDeleted')" value="" /> | |||
<el-option :label="$t('videoList.portrait')" value="1" /> | |||
<el-option :label="$t('videoList.transversePlate')" value="2" /> | |||
</el-select> | |||
@@ -24,6 +25,7 @@ | |||
:placeholder="$t('videoList.statusPlaceholder')" | |||
clearable | |||
> | |||
<el-option :label="$t('videoList.all')" value="" /> | |||
<el-option :label="$t('videoList.notDeleted')" value="0" /> | |||
<el-option :label="$t('videoList.deleted')" value="1" /> | |||
</el-select> | |||
@@ -31,12 +33,11 @@ | |||
<el-form-item :label="$t('videoList.time')"> | |||
<el-date-picker | |||
v-model="formInline.time" | |||
type="daterange" | |||
range-separator="To" | |||
start-placeholder="Start date" | |||
end-placeholder="End date" | |||
value-format="YYYY-MM-DD" | |||
:default-value="new Date()" | |||
type="datetimerange" | |||
start-placeholder="Start Date" | |||
end-placeholder="End Date" | |||
value-format="YYYY-MM-DD HH:mm:ss" | |||
:default-time="defaultTime" | |||
/> | |||
</el-form-item> | |||
<el-form-item> | |||
@@ -66,7 +67,11 @@ | |||
prop="paperwork" | |||
:label="$t('videoList.text')" | |||
align="center" | |||
/> | |||
> | |||
<template #default="scope"> | |||
{{ scope.row.paperwork.substring(0, 10) + '...' }} | |||
</template> | |||
</el-table-column> | |||
<el-table-column | |||
prop="isDel" | |||
:label="$t('videoList.status')" | |||
@@ -173,11 +178,11 @@ | |||
<el-input v-model="form.paperwork" type="textarea" /> | |||
</el-form-item> | |||
<el-form-item :label="$t('videoList.coverImg')"> | |||
<img :src="form.coverImg" alt="" style="width:100%;max-height: 200px;"> | |||
<img :src="form.coverImg" alt="" style="width:100%;"> | |||
</el-form-item> | |||
<el-form-item :label="$t('videoList.videoPlayUrl')"> | |||
<el-input v-model="form.videoPlayUrl" /> | |||
<!-- <video :src="form.videoPlayUrl" style="width:100%;max-height: 300px;"></video> --> | |||
<video :src="form.videoPlayUrl" controls style="width:100%;"></video> | |||
</el-form-item> | |||
<el-form-item :label="$t('videoList.videoTime')"> | |||
<el-input v-model="form.videoTime" /> | |||
@@ -219,7 +224,11 @@ | |||
const pageNum = ref(1); | |||
const pageSize = ref(10); | |||
const total = ref(0); | |||
const defaultTime = [ | |||
new Date(2000, 1, 1, 0, 0, 0), | |||
new Date(2000, 2, 1, 23, 59, 59), | |||
] // '12:00:00', '08:00:00' | |||
const getVideoType = (val) => { | |||
return val === 1 ? "竖版" : "横版"; | |||
}; | |||