@@ -64,9 +64,9 @@ export function associatedUserVoicesApi(data) { | |||||
* @param {*} | * @param {*} | ||||
* @returns | * @returns | ||||
*/ | */ | ||||
export function userListFindByIdApi() { | |||||
export function userListFindByIdApi(id) { | |||||
return request({ | return request({ | ||||
url: ` /wxCUserBasicInfo/findById?id=${id}`, | |||||
url: `/wxCUserBasicInfo/findById?id=${id}`, | |||||
method: 'get' | method: 'get' | ||||
}) | }) | ||||
} | } | ||||
@@ -110,7 +110,7 @@ export function rechargeListApi(params) { | |||||
} | } | ||||
/** | /** | ||||
* @description 充值列表 | |||||
* @description 视频列表 | |||||
* @param {*} (pageNum,pageSize) | * @param {*} (pageNum,pageSize) | ||||
* @returns data | * @returns data | ||||
*/ | */ | ||||
@@ -123,7 +123,7 @@ export function videoListApi(params) { | |||||
} | } | ||||
/** | /** | ||||
* @description 充值列表-查看 | |||||
* @description 视频列表-查看 | |||||
* @param {*} | * @param {*} | ||||
* @returns | * @returns | ||||
*/ | */ | ||||
@@ -135,7 +135,7 @@ export function videoListFindByIdApi(id) { | |||||
} | } | ||||
/** | /** | ||||
* @description 充值列表-删除 | |||||
* @description 视频列表-删除 | |||||
* @param {*} | * @param {*} | ||||
* @returns | * @returns | ||||
*/ | */ | ||||
@@ -22,7 +22,7 @@ import dayjs from "dayjs"; | |||||
const emit = defineEmits(["close"]); | const emit = defineEmits(["close"]); | ||||
const props = defineProps({ | const props = defineProps({ | ||||
serviceId: { | |||||
cUserId: { | |||||
required: true, | required: true, | ||||
} | } | ||||
}); | }); | ||||
@@ -38,7 +38,7 @@ const tableData = ref([]); | |||||
const modelAllListFunc = async () => { | const modelAllListFunc = async () => { | ||||
try { | try { | ||||
const res = await personMouldListApi(1, 10000); | const res = await personMouldListApi(1, 10000); | ||||
const modelIds = await userPersonMouldIdListApi(props.serviceId); | |||||
const modelIds = await userPersonMouldIdListApi(props.cUserId); | |||||
tableData.value = res.data.list; | tableData.value = res.data.list; | ||||
total.value = res.data.total * 1; | total.value = res.data.total * 1; | ||||
setTimeout(()=> { | setTimeout(()=> { | ||||
@@ -57,7 +57,7 @@ const modelAllListFunc = async () => { | |||||
const addModel = async () => { | const addModel = async () => { | ||||
const data = { | const data = { | ||||
mouldIds: checkboxGroup.value, | mouldIds: checkboxGroup.value, | ||||
cUserId: props.serviceId | |||||
userId: props.cUserId | |||||
} | } | ||||
const res = await associatedUserMouldsApi(data); | const res = await associatedUserMouldsApi(data); | ||||
if(res.code === 200) { | if(res.code === 200) { | ||||
@@ -0,0 +1,143 @@ | |||||
<template> | |||||
<el-table | |||||
ref="multipleTableRef" | |||||
:data="tableData" | |||||
style="width: 100%" | |||||
border | |||||
@selection-change="handleSelectionChange" | |||||
> | |||||
<el-table-column type="selection" width="55" align="center"/> | |||||
<el-table-column property="language" label="语言" align="center"/> | |||||
<el-table-column property="country" label="国家" align="center"/> | |||||
<el-table-column property="name" label="英文名称" align="center"/> | |||||
<el-table-column property="chineseName" label="中文名称" align="center"/> | |||||
<el-table-column | |||||
prop="createTime" | |||||
:label="$t('businessMangage.createTime')" | |||||
align="center"> | |||||
<template #default="scope"> | |||||
{{ getDate(scope.row.createDate) }} | |||||
</template> | |||||
</el-table-column> | |||||
</el-table> | |||||
<div class="pagination"> | |||||
<el-pagination | |||||
v-model:current-page="pageNum" | |||||
v-model:page-size="pageSize" | |||||
:page-sizes="[10, 50, 100]" | |||||
:small="false" | |||||
:disabled="false" | |||||
:background="true" | |||||
layout="total, sizes, prev, pager, next, jumper" | |||||
:total="total" | |||||
@size-change="handleSizeChange" | |||||
@current-change="handleCurrentChange" | |||||
/> | |||||
</div> | |||||
<div style="margin-top: 20px"> | |||||
<el-button @click="handleClose" | |||||
>取消</el-button | |||||
> | |||||
<el-button type="primary" @click="addModel()">确认关联</el-button> | |||||
</div> | |||||
</template> | |||||
<script setup> | |||||
import { voiceMouldListApi, userVoiceIdListApi, associatedUserVoicesApi } from '@/apis/userManage.js' | |||||
import dayjs from "dayjs"; | |||||
const emit = defineEmits(["close"]); | |||||
const props = defineProps({ | |||||
cUserId: { | |||||
required: true, | |||||
} | |||||
}); | |||||
const getDate = (val) => { | |||||
return dayjs(val).format("YYYY-MM-DD"); | |||||
}; | |||||
const multipleTableRef = ref() | |||||
const multipleSelection = ref([]) | |||||
const toggleSelection = (rows) => { | |||||
if (rows) { | |||||
rows.forEach((row) => { | |||||
// TODO: improvement typing when refactor table | |||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | |||||
// @ts-expect-error | |||||
multipleTableRef.value.toggleRowSelection(row, undefined) | |||||
}) | |||||
} else { | |||||
multipleTableRef.value.clearSelection() | |||||
} | |||||
} | |||||
const handleSelectionChange = (val) => { | |||||
multipleSelection.value = val | |||||
} | |||||
const pageNum = ref(1); | |||||
const pageSize = ref(10); | |||||
const total = ref(0); | |||||
const tableData = ref([]); | |||||
const handleSizeChange = (val) => { | |||||
pageSize.value = val; | |||||
modelAllListFunc(pageNum.value, pageSize.value); | |||||
}; | |||||
const handleCurrentChange = (val) => { | |||||
pageNum.value = val; | |||||
modelAllListFunc(pageNum.value, pageSize.value); | |||||
}; | |||||
const modelAllListFunc = async (PageNum, PageSize) => { | |||||
try { | |||||
const res = await voiceMouldListApi(PageNum, 10000); | |||||
const modelIds = await userVoiceIdListApi(props.cUserId); | |||||
let idIndx = [] | |||||
if(modelIds.data && modelIds.data.length > 0) { | |||||
res.data.list.forEach((ele, idx) => { | |||||
modelIds.data.forEach((item) => { | |||||
if (ele.id === item) { | |||||
idIndx.push(idx) | |||||
} | |||||
}) | |||||
}) | |||||
} | |||||
tableData.value = res.data.list; | |||||
total.value = res.data.total * 1; | |||||
// 选中关联模版 | |||||
if(idIndx.length) { | |||||
setTimeout(()=> { | |||||
let list = [] | |||||
idIndx.forEach(d => { | |||||
list.push(tableData.value[d]) | |||||
}) | |||||
toggleSelection(list) | |||||
}, 500) | |||||
} | |||||
} catch (error) { | |||||
console.log(error, "err"); | |||||
} | |||||
}; | |||||
const addModel = async () => { | |||||
console.log(multipleSelection.value) | |||||
let mouldIds = [] | |||||
multipleSelection.value.forEach(res => { | |||||
mouldIds.push(res.id) | |||||
}) | |||||
const data = { | |||||
voiceLanguageIdList: mouldIds, | |||||
userId: props.cUserId | |||||
} | |||||
const res = await associatedUserVoicesApi(data); | |||||
if(res.code === 200) { | |||||
ElMessage.success("关联成功!"); | |||||
handleClose() | |||||
} | |||||
}; | |||||
function handleClose() { | |||||
emit("close"); | |||||
} | |||||
onMounted(() => { | |||||
modelAllListFunc(1, 10); | |||||
}); | |||||
</script> |
@@ -6,7 +6,7 @@ | |||||
<el-input v-model="formInline.phone" placeholder="请输入手机号" clearable /> | <el-input v-model="formInline.phone" placeholder="请输入手机号" clearable /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="商品名"> | <el-form-item label="商品名"> | ||||
<el-input v-model="formInline.mouldSmIdLike" placeholder="请输入模版号" clearable /> | |||||
<el-input v-model="formInline.mouldSmIdLike" placeholder="请输入商品名" clearable /> | |||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="充值时间段"> | <el-form-item label="充值时间段"> | ||||
<el-date-picker | <el-date-picker | ||||
@@ -15,10 +15,12 @@ | |||||
range-separator="To" | range-separator="To" | ||||
start-placeholder="Start date" | start-placeholder="Start date" | ||||
end-placeholder="End date" | end-placeholder="End date" | ||||
value-format="YYYY-MM-DD" | |||||
:default-value="new Date()" | |||||
/> | /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item> | <el-form-item> | ||||
<el-button type="primary" @click="getListData"><el-icon><i-ep-plus /></el-icon> 查询</el-button> | |||||
<el-button type="primary" @click="getListData()">查询</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
@@ -31,28 +33,32 @@ | |||||
border | border | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
prop="name" | |||||
prop="orderNumber" | |||||
label="订单号" | label="订单号" | ||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
prop="productTitle" | |||||
label="商品名称" | label="商品名称" | ||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
prop="payVendor" | |||||
label="支付方式" | label="支付方式" | ||||
align="center" | align="center" | ||||
/> | |||||
> | |||||
<template #default="scope"> | |||||
{{ getPayVendor(scope.row.payVendor) }} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
prop="orderPriceStr" | |||||
label="支付金额" | label="支付金额" | ||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
prop="phone" | |||||
label="手机号" | label="手机号" | ||||
align="center" | align="center" | ||||
/> | /> | ||||
@@ -110,8 +116,12 @@ | |||||
const pageSize = ref(10); | const pageSize = ref(10); | ||||
const total = ref(0); | const total = ref(0); | ||||
const getPayVendor = (val) => { | |||||
return val === 2 ? "微信" : "支付宝"; | |||||
}; | |||||
const getDate = (val) => { | const getDate = (val) => { | ||||
return dayjs(val).format("YYYY-MM-DD"); | |||||
return dayjs(val).format("YYYY-MM-DD HH:mm:ss"); | |||||
}; | }; | ||||
const handleSizeChange = (val) => { | const handleSizeChange = (val) => { | ||||
@@ -125,7 +135,7 @@ | |||||
}; | }; | ||||
const formInline = ref({ | const formInline = ref({ | ||||
phone: '', | |||||
phone: route.query.phone || '', | |||||
productTitle: '', | productTitle: '', | ||||
time: '' | time: '' | ||||
}) | }) | ||||
@@ -135,11 +145,11 @@ const formInline = ref({ | |||||
let data = { | let data = { | ||||
PageNum: PageNum || 1, | PageNum: PageNum || 1, | ||||
PageSize: PageSize || 10, | PageSize: PageSize || 10, | ||||
phone: formInline.phone, | |||||
phone: formInline.value.phone, | |||||
projectType: 2, | projectType: 2, | ||||
productTitle: formInline.productTitle, | |||||
startDate: formInline.time ? formInline.time[0] : '', | |||||
endDate: formInline.time ? formInline.time[1] : '', | |||||
productTitle: formInline.value.productTitle, | |||||
startDate: formInline.value.time ? formInline.value.time[0] : '', | |||||
endDate: formInline.value.time ? formInline.value.time[1] : '', | |||||
} | } | ||||
const res = await rechargeListApi(data); | const res = await rechargeListApi(data); | ||||
tableData.value = res.data.list; | tableData.value = res.data.list; | ||||
@@ -6,7 +6,7 @@ | |||||
<el-input v-model="formInline.phone" placeholder="请输入手机号" clearable /> | <el-input v-model="formInline.phone" placeholder="请输入手机号" clearable /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item> | <el-form-item> | ||||
<el-button type="primary" @click="dialogVisible = true"><el-icon><i-ep-plus /></el-icon> 新增</el-button> | |||||
<el-button type="primary" @click="getListData()">查询</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
@@ -19,43 +19,44 @@ | |||||
border | border | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
prop="name" | |||||
prop="id" | |||||
label="用户ID" | label="用户ID" | ||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
prop="phone" | |||||
label="手机号" | label="手机号" | ||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | |||||
prop="poins" | |||||
label="当前币值" | |||||
align="center" | |||||
/> | |||||
<el-table-column | <el-table-column | ||||
prop="createDate" | prop="createDate" | ||||
label="注册时间" | |||||
label="创建时间" | |||||
align="center" | align="center" | ||||
> | > | ||||
<template #default="scope"> | <template #default="scope"> | ||||
{{ getDate(scope.row.createDate) }} | {{ getDate(scope.row.createDate) }} | ||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | |||||
prop="poins" | |||||
label="当前币值" | |||||
align="center" | |||||
/> | |||||
<el-table-column | <el-table-column | ||||
fixed="right" | fixed="right" | ||||
:label="$t('keyMangage.operations')" | :label="$t('keyMangage.operations')" | ||||
width="400" | |||||
align="center" | align="center" | ||||
> | > | ||||
<template #default="scope"> | <template #default="scope"> | ||||
<el-button link type="primary" size="small" @click="showDetail(scope.row.id)">查看</el-button> | <el-button link type="primary" size="small" @click="showDetail(scope.row.id)">查看</el-button> | ||||
<el-button link type="primary" size="small" @click="rechargeDetail(scope.row)">查看充值记录</el-button> | <el-button link type="primary" size="small" @click="rechargeDetail(scope.row)">查看充值记录</el-button> | ||||
<el-button link type="primary" size="small" @click="videoDetail(scope.row)"> 查看视频列表</el-button> | <el-button link type="primary" size="small" @click="videoDetail(scope.row)"> 查看视频列表</el-button> | ||||
<el-button link type="primary" size="small" @click="personMould(scope.row.id)">绑定定制模版</el-button> | |||||
<el-button link type="primary" size="small" @click="personVoice(scope.row.id)">绑定定制声纹</el-button> | |||||
</template> | </template> | ||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
@@ -77,18 +78,30 @@ | |||||
</div> | </div> | ||||
<el-dialog v-model="detailDialogVisible" v-if="detailDialogVisible" title="查看详情" width="60%" :before-close="handleClose" > | <el-dialog v-model="detailDialogVisible" v-if="detailDialogVisible" title="查看详情" width="60%" :before-close="handleClose" > | ||||
<el-form :model="form" label-width="120px"> | <el-form :model="form" label-width="120px"> | ||||
<el-form-item label="用户ID"> | |||||
<el-input v-model="form.name" /> | |||||
</el-form-item> | |||||
<el-form-item label="手机号"> | <el-form-item label="手机号"> | ||||
<el-input v-model="form.phone" /> | <el-input v-model="form.phone" /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="Level"> | |||||
<el-input v-model="form.level" /> | |||||
</el-form-item> | |||||
<el-form-item label="当前币值"> | |||||
<el-input v-model="form.poins" /> | |||||
</el-form-item> | |||||
<el-form-item label="创建时间"> | |||||
<el-input v-model="form.createDate" /> | |||||
</el-form-item> | |||||
<el-form-item> | <el-form-item> | ||||
<el-button type="primary" @click="onSubmit">Create</el-button> | |||||
<el-button>Cancel</el-button> | |||||
<el-button>关闭</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</el-dialog> | </el-dialog> | ||||
<el-dialog v-model="modelDialogVisible" v-if="modelDialogVisible" title="绑定定制模版" width="60%" :before-close="handleClose" > | |||||
<model :cUserId="cUserId" @close="handleClose"></model> | |||||
</el-dialog> | |||||
<el-dialog v-model="voiceDialogVisible" v-if="voiceDialogVisible" title="绑定定制声纹" width="60%" :before-close="handleClose" > | |||||
<voice :cUserId="cUserId" @close="handleClose"></voice> | |||||
</el-dialog> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -103,6 +116,8 @@ | |||||
import dayjs from "dayjs"; | import dayjs from "dayjs"; | ||||
import { useRoute, useRouter } from "vue-router"; | import { useRoute, useRouter } from "vue-router"; | ||||
import model from './personMould.vue' | |||||
import voice from './personVoice.vue' | |||||
const route = useRoute(); | const route = useRoute(); | ||||
const router = useRouter(); | const router = useRouter(); | ||||
@@ -135,7 +150,7 @@ | |||||
const total = ref(0); | const total = ref(0); | ||||
const getDate = (val) => { | const getDate = (val) => { | ||||
return dayjs(val).format("YYYY-MM-DD"); | |||||
return dayjs(val).format("YYYY-MM-DD HH:mm:ss"); | |||||
}; | }; | ||||
const handleSizeChange = (val) => { | const handleSizeChange = (val) => { | ||||
@@ -155,9 +170,9 @@ const formInline = ref({ | |||||
const getListData = async (PageNum, PageSize) => { | const getListData = async (PageNum, PageSize) => { | ||||
try { | try { | ||||
let data = { | let data = { | ||||
PageNum: PageNum, | |||||
PageSize: PageSize, | |||||
phone: formInline.phone | |||||
PageNum: PageNum || 1, | |||||
PageSize: PageSize || 10, | |||||
phone: formInline.value.phone | |||||
} | } | ||||
const res = await userListApi(data); | const res = await userListApi(data); | ||||
console.log(res, "res"); | console.log(res, "res"); | ||||
@@ -176,11 +191,27 @@ const formInline = ref({ | |||||
function showDetail(id) { | function showDetail(id) { | ||||
userListFindByIdApi(id).then(res => { | userListFindByIdApi(id).then(res => { | ||||
detailDialogVisible.value = true | detailDialogVisible.value = true | ||||
res.data.createDate = getDate(res.data.createDate) | |||||
form.value = res.data | form.value = res.data | ||||
}) | }) | ||||
} | } | ||||
function handleClose() { | function handleClose() { | ||||
detailDialogVisible.value = false | detailDialogVisible.value = false | ||||
modelDialogVisible.value = false | |||||
voiceDialogVisible.value = false | |||||
} | |||||
const modelDialogVisible = ref(false) | |||||
const cUserId = ref('') | |||||
function personMould(id) { | |||||
modelDialogVisible.value = true | |||||
cUserId.value = id | |||||
} | |||||
const voiceDialogVisible = ref(false) | |||||
function personVoice(id) { | |||||
voiceDialogVisible.value = true | |||||
cUserId.value = id | |||||
} | } | ||||
onMounted(() => { | onMounted(() => { | ||||
@@ -9,7 +9,7 @@ | |||||
<el-input v-model="formInline.mouldSmIdLike" placeholder="请输入模版号" clearable /> | <el-input v-model="formInline.mouldSmIdLike" placeholder="请输入模版号" clearable /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item> | <el-form-item> | ||||
<el-button type="primary" @click="getListData"><el-icon><i-ep-plus /></el-icon> 查询</el-button> | |||||
<el-button type="primary" @click="getListData()">查询</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
@@ -22,20 +22,38 @@ | |||||
border | border | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
prop="name" | |||||
label="模板信息" | |||||
prop="title" | |||||
label="模板名称" | |||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | |||||
prop="coverImg" | |||||
label="封面图" | |||||
align="center" | |||||
> | |||||
<template #default="scope"> | |||||
<img :src="scope.row.coverImg" width="50" height="50" alt="" /> | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
label="手机号" | |||||
prop="mouldSmId" | |||||
label="模版号" | |||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | |||||
prop="wxCUserBasicInfoList" | |||||
label="绑定手机号" | |||||
align="center" | |||||
> | |||||
<template #default="scope"> | |||||
{{ getListPhone(scope.row.wxCUserBasicInfoList) }} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="createDate" | prop="createDate" | ||||
label="注册时间" | |||||
label="创建时间" | |||||
align="center" | align="center" | ||||
> | > | ||||
<template #default="scope"> | <template #default="scope"> | ||||
@@ -44,7 +62,6 @@ | |||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
<!-- 登录账号 --> | |||||
<div class="pagination"> | <div class="pagination"> | ||||
<el-pagination | <el-pagination | ||||
v-model:current-page="pageNum" | v-model:current-page="pageNum" | ||||
@@ -88,7 +105,14 @@ | |||||
const getDate = (val) => { | const getDate = (val) => { | ||||
return dayjs(val).format("YYYY-MM-DD"); | return dayjs(val).format("YYYY-MM-DD"); | ||||
}; | }; | ||||
const getListPhone = (list) => { | |||||
let phone = [] | |||||
list && list.forEach(ele => { | |||||
phone.push(ele.phone) | |||||
}); | |||||
return phone.join(',') | |||||
} | |||||
const handleSizeChange = (val) => { | const handleSizeChange = (val) => { | ||||
pageSize.value = val; | pageSize.value = val; | ||||
getListData(pageNum.value, pageSize.value); | getListData(pageNum.value, pageSize.value); | ||||
@@ -109,8 +133,8 @@ const formInline = ref({ | |||||
let data = { | let data = { | ||||
PageNum: PageNum || 1, | PageNum: PageNum || 1, | ||||
PageSize: PageSize || 10, | PageSize: PageSize || 10, | ||||
phone: formInline.phone, | |||||
mouldSmIdLike: formInline.mouldSmIdLike | |||||
phone: formInline.value.phone, | |||||
mouldSmIdLike: formInline.value.mouldSmIdLike | |||||
} | } | ||||
const res = await userMouldListApi(data); | const res = await userMouldListApi(data); | ||||
console.log(res, "res"); | console.log(res, "res"); | ||||
@@ -9,7 +9,7 @@ | |||||
<el-input v-model="formInline.mouldSmIdLike" placeholder="请输入模版号" clearable /> | <el-input v-model="formInline.mouldSmIdLike" placeholder="请输入模版号" clearable /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item> | <el-form-item> | ||||
<el-button type="primary" @click="getListData"><el-icon><i-ep-plus /></el-icon> 查询</el-button> | |||||
<el-button type="primary" @click="getListData()"> 查询</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
@@ -23,19 +23,39 @@ | |||||
> | > | ||||
<el-table-column | <el-table-column | ||||
prop="name" | prop="name" | ||||
label="声纹信息" | |||||
label="英文名称" | |||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
label="手机号" | |||||
prop="chineseName" | |||||
label="中文名称" | |||||
align="center" | |||||
/> | |||||
<el-table-column | |||||
prop="country" | |||||
label="国家" | |||||
align="center" | |||||
/> | |||||
<el-table-column | |||||
prop="language" | |||||
label="语言" | |||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | |||||
prop="wxCUserBasicInfoList" | |||||
label="绑定手机号" | |||||
align="center" | |||||
> | |||||
<template #default="scope"> | |||||
{{ getListPhone(scope.row.wxCUserBasicInfoList) }} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="createDate" | prop="createDate" | ||||
label="注册时间" | |||||
label="创建时间" | |||||
align="center" | align="center" | ||||
> | > | ||||
<template #default="scope"> | <template #default="scope"> | ||||
@@ -44,7 +64,6 @@ | |||||
</el-table-column> | </el-table-column> | ||||
</el-table> | </el-table> | ||||
<!-- 登录账号 --> | |||||
<div class="pagination"> | <div class="pagination"> | ||||
<el-pagination | <el-pagination | ||||
v-model:current-page="pageNum" | v-model:current-page="pageNum" | ||||
@@ -89,6 +108,15 @@ const getDate = (val) => { | |||||
return dayjs(val).format("YYYY-MM-DD"); | return dayjs(val).format("YYYY-MM-DD"); | ||||
}; | }; | ||||
const getListPhone = (list) => { | |||||
let phone = [] | |||||
list && list.forEach(ele => { | |||||
phone.push(ele.phone) | |||||
}); | |||||
return phone.join(',') | |||||
} | |||||
const handleSizeChange = (val) => { | const handleSizeChange = (val) => { | ||||
pageSize.value = val; | pageSize.value = val; | ||||
getListData(pageNum.value, pageSize.value); | getListData(pageNum.value, pageSize.value); | ||||
@@ -109,8 +137,8 @@ const getListData = async (PageNum, PageSize) => { | |||||
let data = { | let data = { | ||||
PageNum: PageNum || 1, | PageNum: PageNum || 1, | ||||
PageSize: PageSize || 10, | PageSize: PageSize || 10, | ||||
phone: formInline.phone, | |||||
mouldSmIdLike: formInline.mouldSmIdLike | |||||
phone: formInline.value.phone, | |||||
mouldSmIdLike: formInline.value.mouldSmIdLike | |||||
} | } | ||||
const res = await userVoiceListAPi(data); | const res = await userVoiceListAPi(data); | ||||
console.log(res, "res"); | console.log(res, "res"); | ||||
@@ -6,7 +6,7 @@ | |||||
<el-input v-model="formInline.phone" placeholder="请输入手机号" clearable /> | <el-input v-model="formInline.phone" placeholder="请输入手机号" clearable /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="文本"> | <el-form-item label="文本"> | ||||
<el-input v-model="formInline.paperwork" placeholder="请输入模版号" clearable /> | |||||
<el-input v-model="formInline.paperwork" placeholder="请输入文本" clearable /> | |||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="类型"> | <el-form-item label="类型"> | ||||
<el-select | <el-select | ||||
@@ -35,10 +35,12 @@ | |||||
range-separator="To" | range-separator="To" | ||||
start-placeholder="Start date" | start-placeholder="Start date" | ||||
end-placeholder="End date" | end-placeholder="End date" | ||||
value-format="YYYY-MM-DD" | |||||
:default-value="new Date()" | |||||
/> | /> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item> | <el-form-item> | ||||
<el-button type="primary" @click="getListData"><el-icon><i-ep-plus /></el-icon> 查询</el-button> | |||||
<el-button type="primary" @click="getListData()">查询</el-button> | |||||
</el-form-item> | </el-form-item> | ||||
</el-form> | </el-form> | ||||
</div> | </div> | ||||
@@ -51,10 +53,14 @@ | |||||
border | border | ||||
> | > | ||||
<el-table-column | <el-table-column | ||||
prop="name" | |||||
prop="videoType" | |||||
label="类型" | label="类型" | ||||
align="center" | align="center" | ||||
/> | |||||
> | |||||
<template #default="scope"> | |||||
{{ getVideoType(scope.row.videoType) }} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="paperwork" | prop="paperwork" | ||||
@@ -62,10 +68,14 @@ | |||||
align="center" | align="center" | ||||
/> | /> | ||||
<el-table-column | <el-table-column | ||||
prop="address" | |||||
prop="isDel" | |||||
label="状态" | label="状态" | ||||
align="center" | align="center" | ||||
/> | |||||
> | |||||
<template #default="scope"> | |||||
{{ getIsDel(scope.row.isDel) }} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="title" | prop="title" | ||||
label="视频标题" | label="视频标题" | ||||
@@ -75,7 +85,11 @@ | |||||
prop="coverImg" | prop="coverImg" | ||||
label="封面图" | label="封面图" | ||||
align="center" | align="center" | ||||
/> | |||||
> | |||||
<template #default="scope"> | |||||
<img :src="scope.row.coverImg" width="50" height="50" alt="" /> | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | <el-table-column | ||||
prop="videoPlayUrl" | prop="videoPlayUrl" | ||||
label="视频地址" | label="视频地址" | ||||
@@ -86,9 +100,6 @@ | |||||
label="视频时长" | label="视频时长" | ||||
align="center" | align="center" | ||||
> | > | ||||
<template #default="scope"> | |||||
{{ getDate(scope.row.videoTime) }} | |||||
</template> | |||||
</el-table-column> | </el-table-column> | ||||
<el-table-column | <el-table-column | ||||
prop="videoSize" | prop="videoSize" | ||||
@@ -123,7 +134,6 @@ | |||||
<el-table-column | <el-table-column | ||||
fixed="right" | fixed="right" | ||||
:label="$t('keyMangage.operations')" | :label="$t('keyMangage.operations')" | ||||
width="400" | |||||
align="center" | align="center" | ||||
> | > | ||||
<template #default="scope"> | <template #default="scope"> | ||||
@@ -134,7 +144,6 @@ | |||||
</el-table> | </el-table> | ||||
<!-- 登录账号 --> | |||||
<div class="pagination"> | <div class="pagination"> | ||||
<el-pagination | <el-pagination | ||||
v-model:current-page="pageNum" | v-model:current-page="pageNum" | ||||
@@ -149,6 +158,44 @@ | |||||
@current-change="handleCurrentChange" | @current-change="handleCurrentChange" | ||||
/> | /> | ||||
</div> | </div> | ||||
<el-dialog v-model="dialogVisible" v-if="dialogVisible" title="视频详情:" width="40%"> | |||||
<el-form :model="form" label-width="120px"> | |||||
<el-form-item label="名称"> | |||||
<el-input v-model="form.title" /> | |||||
</el-form-item> | |||||
<el-form-item label="视频类型"> | |||||
<el-radio-group v-model="form.videoType"> | |||||
<el-radio :label="1">竖版</el-radio> | |||||
<el-radio :label="2">横版</el-radio> | |||||
</el-radio-group> | |||||
</el-form-item> | |||||
<el-form-item label="文案"> | |||||
<el-input v-model="form.paperwork" type="textarea" /> | |||||
</el-form-item> | |||||
<el-form-item label="封面图"> | |||||
<img :src="form.coverImg" alt="" style="width:100%;max-height: 200px;"> | |||||
</el-form-item> | |||||
<el-form-item label="视频地址"> | |||||
<el-input v-model="form.videoPlayUrl" /> | |||||
<!-- <video :src="form.videoPlayUrl" style="width:100%;max-height: 300px;"></video> --> | |||||
</el-form-item> | |||||
<el-form-item label="视频时长"> | |||||
<el-input v-model="form.videoTime" /> | |||||
</el-form-item> | |||||
<el-form-item label="创建时间"> | |||||
<el-input v-model="form.createDate" /> | |||||
</el-form-item> | |||||
<el-form-item label="消耗金币"> | |||||
<el-input v-model="form.costPoints" /> | |||||
</el-form-item> | |||||
<el-form-item label="消耗金币明细"> | |||||
<el-input v-model="form.costPointsDetail" /> | |||||
</el-form-item> | |||||
<el-form-item> | |||||
<el-button @click="dialogVisible = false">关闭</el-button> | |||||
</el-form-item> | |||||
</el-form> | |||||
</el-dialog> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
<script setup> | <script setup> | ||||
@@ -173,6 +220,13 @@ | |||||
const pageSize = ref(10); | const pageSize = ref(10); | ||||
const total = ref(0); | const total = ref(0); | ||||
const getVideoType = (val) => { | |||||
return val === 1 ? "竖版" : "横版"; | |||||
}; | |||||
const getIsDel = (val) => { | |||||
return val === 1 ? "已删除" : "未删除"; | |||||
}; | |||||
const getDate = (val) => { | const getDate = (val) => { | ||||
return dayjs(val).format("YYYY-MM-DD HH:mm:ss"); | return dayjs(val).format("YYYY-MM-DD HH:mm:ss"); | ||||
}; | }; | ||||
@@ -188,7 +242,7 @@ | |||||
}; | }; | ||||
const formInline = ref({ | const formInline = ref({ | ||||
phone: '', | |||||
phone: route.query.phone || '', | |||||
productTitle: '', | productTitle: '', | ||||
time: '' | time: '' | ||||
}) | }) | ||||
@@ -198,12 +252,15 @@ const formInline = ref({ | |||||
let data = { | let data = { | ||||
PageNum: PageNum || 1, | PageNum: PageNum || 1, | ||||
PageSize: PageSize || 10, | PageSize: PageSize || 10, | ||||
phone: formInline.phone, | |||||
phone: formInline.value.phone, | |||||
projectType: 2, | projectType: 2, | ||||
productTitle: formInline.productTitle, | |||||
startDate: formInline.time ? formInline.time[0] : '', | |||||
endDate: formInline.time ? formInline.time[1] : '', | |||||
id: route.query.id || '' | |||||
productTitle: formInline.value.productTitle, | |||||
startDate: formInline.value.time ? formInline.value.time[0] : '', | |||||
endDate: formInline.value.time ? formInline.value.time[1] : '', | |||||
id: route.query.id || '', | |||||
isDel: formInline.value.isDel, | |||||
videoType: formInline.value.videoType, | |||||
paperwork: formInline.value.paperwork | |||||
} | } | ||||
const res = await videoListApi(data); | const res = await videoListApi(data); | ||||
tableData.value = res.data.list; | tableData.value = res.data.list; | ||||
@@ -212,11 +269,25 @@ const formInline = ref({ | |||||
console.log(error, "err"); | console.log(error, "err"); | ||||
} | } | ||||
}; | }; | ||||
// 查看详情 | |||||
const dialogVisible = ref(false) | |||||
const form = ref({}) | |||||
function showDetail(id) { | |||||
videoListFindByIdApi(id).then(res => { | |||||
if(res.code === 200){ | |||||
dialogVisible.value = true | |||||
form.value = res.data | |||||
} | |||||
}) | |||||
} | |||||
function confirmDel(id) { | function confirmDel(id) { | ||||
ElMessageBox.confirm('你确定要删除吗?').then(() => { | ElMessageBox.confirm('你确定要删除吗?').then(() => { | ||||
videoListDelApi(id).then(res => { | videoListDelApi(id).then(res => { | ||||
debugger | |||||
if (res.code == 200) { | |||||
ElMessage.success("删除成功!"); | |||||
getListData(1, 10) | |||||
} | |||||
}) | }) | ||||
done() | done() | ||||
}).catch(() => { | }).catch(() => { | ||||