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