yolo
This commit is contained in:
@@ -7,24 +7,16 @@
|
||||
</el-select>
|
||||
|
||||
<div></div>
|
||||
<el-date-picker v-model="searchForm.time" type="date" value-format="YYYYMMDD" placeholder="选择查询时间" size="large"
|
||||
style="margin-left: 50px;width: 160px;" />
|
||||
<el-date-picker v-model="searchForm.createTime" type="date" value-format="YYYY-MM-DD" placeholder="选择查询时间"
|
||||
size="large" style="margin-left: 50px;width: 160px;" />
|
||||
|
||||
<el-input v-model="searchForm.hostId" placeholder="请输入主播id" size="large"
|
||||
<el-input v-model="searchForm.hostsId" placeholder="请输入主播id" size="large"
|
||||
style="width: 160px; margin-left: 50px;" clearable />
|
||||
|
||||
<el-select v-if="userInfo.userType == 3" v-model="searchForm.belongYn" filterable placeholder="分配情况"
|
||||
style="width: 120px; margin-left: 50px;">
|
||||
<el-option
|
||||
v-for="item in [{ label: '全部', value: '' }, { label: '未分配', value: '0' }, { label: '已分配', value: '1' }]"
|
||||
:key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
<el-button class="serch-button" style="margin-left: 50px;" type="primary" @click="serch">查询</el-button>
|
||||
<el-button class="put-button" :disabled="tableData.length == 0" type="primary"
|
||||
@click="exportList">导出Excel数据</el-button>
|
||||
<el-button v-if="userInfo.userType == 3" class="put-button" type="primary"
|
||||
@click="dialogFormVisible = true">分配给指定员工</el-button>
|
||||
<!-- <el-button class="put-button" type="primary" @click="dialogFormVisible = true">分配给指定员工</el-button> -->
|
||||
<el-button @click="filterdialogVisible = true" style="width: 50px;" class="put-button" type="primary"><img
|
||||
style="height: 30px;" src="@/assets/filter.png"></el-button>
|
||||
</div>
|
||||
@@ -33,121 +25,29 @@
|
||||
<el-table ref="multipleTableRef" :data="tableData" stripe v-loading="loading" height="500"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="35" />
|
||||
|
||||
<el-table-column fixed prop="hostId" label="主播id" width="160">
|
||||
<template #default="scope">
|
||||
<div class="hostIdText" :style="{ color: scope.row.useable == 'Y' ? 'green' : '#0f0092' }"
|
||||
@click="openHTML(scope.row.hostId)"> {{
|
||||
scope.row.hostId }}</div>
|
||||
|
||||
<div class="hostIdText" @click="openHTML(scope.row.hostId)"> {{
|
||||
scope.row.hostId }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="hostName" label="主播名字" min-width="160">
|
||||
<template #default="scope">
|
||||
{{ scope.row.hostName }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column v-if="userInfo.userType == 3" prop="belongBy" label="分配情况" width="120">
|
||||
<template #default="scope">
|
||||
<el-popover v-if="scope.row.belongBy" placement="bottom" :width="200" trigger="hover"
|
||||
@show="openAccountName(scope.row.belongBy)">
|
||||
<template #reference>
|
||||
<!-- <div @click="openAccountName(scope.row.belongBy)"> -->
|
||||
<div style="color: green;">
|
||||
{{ scope.row.belongBy == null || scope.row.belongBy == '' ? "未分配" : "已分配" }}
|
||||
</div>
|
||||
</template>
|
||||
<div v-for="str in staffId" :key="str">
|
||||
{{ str }}
|
||||
</div>
|
||||
<!-- <el-table :data="gridData">
|
||||
<el-table-column width="150" property="date" label="date" />
|
||||
<el-table-column width="100" property="name" label="name" />
|
||||
</el-table> -->
|
||||
</el-popover>
|
||||
<div v-show="!scope.row.belongBy">未分配</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="hostlevel" label="等级" width="120">
|
||||
|
||||
<el-table-column prop="hostlevel" label="等级" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.hostlevel }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-for="label in labelList" :key="label.paramCode" :prop="label.paramCode"
|
||||
:label="label.paramCodeMeaning" width="120">
|
||||
<template v-if="label.paramCode != 'createDt'" #default="scope">
|
||||
<el-popover v-if="!(label.paramCode == 'hostcoins' || label.paramCode == 'ysthostcoins')"
|
||||
placement="bottom" :width="600" trigger="hover">
|
||||
<div style="height: 300px;">
|
||||
<!-- createDt往前推7天 -->
|
||||
<!-- <component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
||||
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
||||
:time="scope.row.createDt.split('T')[0].replace(/-/g, '').substring(0, 8)"></component> -->
|
||||
<component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
||||
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
||||
:time="scope.row.updateDt"></component>
|
||||
</div>
|
||||
<template #reference>
|
||||
<span @mouseover="openPopover(scope.row.hostId, label.paramCode)"
|
||||
@mouseout="closePopover(scope.row.hostId, label.paramCode)">
|
||||
{{ scope.row[label.paramCode] }}
|
||||
</span>
|
||||
</template>
|
||||
</el-popover>
|
||||
|
||||
<el-popover v-else placement="bottom" :width="500" trigger="hover">
|
||||
<div style="height: 300px;">
|
||||
<!-- <component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
||||
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
||||
:time="scope.row.createDt.split('T')[0].replace(/-/g, '').substring(0, 8)">
|
||||
</component> -->
|
||||
<component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
||||
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
||||
:time="scope.row.updateDt">
|
||||
</component>
|
||||
</div>
|
||||
<template #reference>
|
||||
<!-- 鼠标移入时开启 -->
|
||||
|
||||
<span @mouseover="openPopover(scope.row.hostId, label.paramCode)"
|
||||
@mouseout="closePopover(scope.row.hostId, label.paramCode)">
|
||||
{{ scope.row[label.paramCode] }}
|
||||
</span>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column v-if="userInfo.userType == 4" fixed="right" label="操作" width="120">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popover placement="top-start" :width="200" trigger="hover" :content="scope.row.comment">
|
||||
<template #reference>
|
||||
<el-button @click="openComment(scope.row)" link type="primary" size="small">维护情况</el-button>
|
||||
</template>
|
||||
</el-popover>
|
||||
|
||||
|
||||
<select @change="handleSelectChange($event, scope.row)" v-model="scope.row.useable" class="m-2"
|
||||
placeholder="Select" size="small" style="width: 70px">
|
||||
<option label="未转化" value="N" />
|
||||
<option label="已转化" value="Y" />
|
||||
</select>
|
||||
|
||||
<el-dialog :modal="false" v-model="commentVisible" title="维护情况" align-center>
|
||||
<el-input maxlength="80" v-model="commentInfo" placeholder="请输入维护情况" clearable show-word-limit />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="commentVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="uphostcomment()">
|
||||
提交
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="操作">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center">
|
||||
@@ -156,7 +56,9 @@
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<!-- 分页 -->
|
||||
<div class="center-justify" style="margin-top: 30px;">
|
||||
<el-pagination v-model:current-page="page" v-model:page-size="pageSize" background
|
||||
layout="sizes, prev, pager, next" :total="total" :page-sizes="[10, 20, 50, 100]"
|
||||
@@ -165,63 +67,26 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<el-dialog v-model="dialogFormVisible" title="分配主播" align-center>
|
||||
<el-select v-model="staffValue" filterable placeholder="Select" style="width: 240px">
|
||||
<el-option v-for="item in staffOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="allocation">
|
||||
分配
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- <el-dialog v-model="hostNameVisible" title="分配情况" align-center>
|
||||
{{ staffId }}
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="hostNameVisible = false">
|
||||
确定
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog> -->
|
||||
|
||||
<el-dialog v-model="filterdialogVisible" width="800px" :before-close="handleClose">
|
||||
<el-row :gutter="20" v-for="item in filterOptions" :key="item.type">
|
||||
<el-row v-for="(field, index) in fields" :key="index" :gutter="20" style="margin-bottom: 10px">
|
||||
<el-col :span="4">
|
||||
<!-- <label>选择筛选条件</label> -->
|
||||
<div style="height: 100%;padding-top: 10px;" class="center-justify">
|
||||
{{ item.label }}
|
||||
<div style="height: 100%; padding-top: 10px" class="center-justify">
|
||||
{{ field.label }}
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div v-if="!(item.type == 'InvitationType')"><label>最小值</label></div>
|
||||
<div v-else><label>普票/金票</label></div>
|
||||
|
||||
<el-input v-show="!(item.type == 'InvitationType')" oninput="if(value.length>10)value=value.slice(0,10)"
|
||||
type="number" v-model.number="item.dataStart" placeholder="请输入最小值" />
|
||||
<el-select v-show="(item.type == 'InvitationType')" v-model="item.dataStart" filterable placeholder="请选择"
|
||||
style="width: 240px">
|
||||
<el-option
|
||||
v-for="item in [{ label: '全部', value: '' }, { label: '普票', value: '1' }, { label: '金票', value: '2' }]"
|
||||
:key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
<div><label>最小值</label></div>
|
||||
<el-input type="number" :oninput="'if(value.length>9)value=value.slice(0,9)'"
|
||||
v-model.number="searchForm[field.minModel]" placeholder="请输入最小值" />
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div v-show="!(item.type == 'InvitationType')"><label>最大值</label></div>
|
||||
|
||||
<el-input v-show="!(item.type == 'InvitationType')" oninput="if(value.length>10)value=value.slice(0,10)"
|
||||
type="number" v-model.number="item.dataEnd" placeholder="请输入最大值" />
|
||||
<div><label>最大值</label></div>
|
||||
<el-input type="number" :oninput="'if(value.length>9)value=value.slice(0,9)'"
|
||||
v-model.number="searchForm[field.maxModel]" placeholder="请输入最大值" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<!-- <label>选择筛选条件</label> -->
|
||||
@@ -235,7 +100,7 @@
|
||||
|
||||
|
||||
<el-select v-model="sortData.sortType" filterable placeholder="请选择" style="width: 240px">
|
||||
<el-option v-for="item in filterOptions" :key="item.value" :label="item.label" :value="item.type" />
|
||||
<el-option v-for="item in sortNameOptions" :key="item.type" :label="item.label" :value="item.type" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
@@ -250,7 +115,9 @@
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
|
||||
<el-button type="primary" @click="reset">
|
||||
重置
|
||||
</el-button>
|
||||
<!-- <el-button @click="filterdialogVisible = false">取消</el-button> -->
|
||||
<el-button type="primary" @click="handelClick">
|
||||
确认
|
||||
@@ -284,25 +151,42 @@ const userInfo = ref(getUser())
|
||||
//主播列表DOM
|
||||
const multipleTableRef = ref(null)
|
||||
|
||||
let labelList = ref([])
|
||||
let labelList = ref([
|
||||
{ paramCode: 'country', paramCodeMeaning: '国家' },
|
||||
{ paramCode: 'createTime', paramCodeMeaning: '创建时间' },
|
||||
{ paramCode: 'hostsCoins', paramCodeMeaning: '主播金币' },
|
||||
{ paramCode: 'yesterdayCoins', paramCodeMeaning: '昨日金币' },
|
||||
{ paramCode: 'fans', paramCodeMeaning: '粉丝数' },
|
||||
{ paramCode: 'fllowernum', paramCodeMeaning: '关注数' },
|
||||
{ paramCode: 'onlineFans', paramCodeMeaning: '在线粉丝' },
|
||||
{ paramCode: 'hostsKind', paramCodeMeaning: '主播类型' },
|
||||
]);
|
||||
const tableData = ref([])
|
||||
//主播列表传参
|
||||
const searchForm = ref({
|
||||
hostId: '',
|
||||
belongYn: '',
|
||||
country: '',
|
||||
// time: new Date().toISOString().split('T')[0].replace(/-/g, ''),
|
||||
time: '',
|
||||
dataType: '',
|
||||
dataStart: '',
|
||||
dataEnd: '',
|
||||
})
|
||||
const searchForm = ref({})
|
||||
const fields = [
|
||||
{ label: '粉丝数', minModel: 'fansMin', maxModel: 'fansMax' },
|
||||
{ label: '在线人数', minModel: 'onlineFansMin', maxModel: 'onlineFansMax' },
|
||||
{ label: '金币数', minModel: 'hostsCoinsMin', maxModel: 'hostsCoinsMax' },
|
||||
{ label: '关注数', minModel: 'fllowernumMin', maxModel: 'fllowernumMax' },
|
||||
]
|
||||
//排序
|
||||
let sortData = ref({ sortForm: 'desc', sortType: 'hostcoins' })
|
||||
let sortData = ref({ sortForm: 'desc', sortType: "createTime" })
|
||||
|
||||
//排序类型
|
||||
let sortNameOptions = ref([
|
||||
{ label: '创建时间', type: 'createTime' },
|
||||
{ label: '主播金币', type: 'hostsCoins' },
|
||||
{ label: '粉丝数', type: 'fans' },
|
||||
{ label: '昨日金币', type: 'yesterdayCoins' },
|
||||
{ label: '在线粉丝', type: 'onlineFans' },
|
||||
{ label: '关注数', type: 'fllowernum' },
|
||||
|
||||
])
|
||||
//员工选择列表
|
||||
let staffOptions = ref([])
|
||||
//筛选条件选择列表
|
||||
let filterOptions = ref([])
|
||||
|
||||
//选择的员工
|
||||
let staffValue = ref('')
|
||||
//选择的主播列表
|
||||
@@ -336,19 +220,17 @@ let version = ref('0.0.0');
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
getdictionary()//获取字典
|
||||
|
||||
getStaff(); //获取下级员工
|
||||
|
||||
getCountry(); //获取国家
|
||||
|
||||
getSerchStorage();//获取搜索条件
|
||||
// getSerchStorage();//获取搜索条件
|
||||
|
||||
getlist();//获取主播列表
|
||||
})
|
||||
|
||||
function serch() {
|
||||
|
||||
page.value = 1
|
||||
getlist();
|
||||
}
|
||||
|
||||
@@ -356,28 +238,7 @@ function exportList() {
|
||||
if (searchForm.value.dataType == 'InvitationType') {
|
||||
searchForm.value.dataEnd = searchForm.value.dataStart
|
||||
}
|
||||
exportToExcel({
|
||||
hostId: searchForm.value.hostId == '' ? null : searchForm.value.hostId,
|
||||
belongYn: searchForm.value.belongYn == '' ? null : searchForm.value.belongYn,
|
||||
searchTime: searchForm.value.time == '' ? null : searchForm.value.time,
|
||||
region: searchForm.value.country == '' ? null : searchForm.value.country,
|
||||
sortType: sortData.value.sortType,
|
||||
sortForm: sortData.value.sortForm,
|
||||
conditions: filterOptions.value.map(option => {
|
||||
return {
|
||||
...option,
|
||||
dataEnd: option.dataEnd == '' ? null : option.dataEnd,
|
||||
dataStart: option.dataStart == '' ? null : option.dataStart
|
||||
};
|
||||
}),
|
||||
// dataType: searchForm.value.dataType == '' ? null : searchForm.value.dataType,
|
||||
// dataStart: searchForm.value.dataStart == '' ? null : searchForm.value.dataStart,
|
||||
// dataEnd: searchForm.value.dataEnd == '' ? null : searchForm.value.dataEnd,
|
||||
pageSize: pageSize.value,
|
||||
page: page.value,
|
||||
userId: userInfo.value.userId,
|
||||
userType: userInfo.value.userType
|
||||
})
|
||||
exportToExcel({})
|
||||
|
||||
|
||||
// //浏览器导出方法
|
||||
@@ -388,7 +249,6 @@ function exportList() {
|
||||
// pageSize: pageSize.value,
|
||||
// page: page.value,
|
||||
// userId: userInfo.value.userId,
|
||||
// userType: userInfo.value.userType
|
||||
// }
|
||||
// );
|
||||
|
||||
@@ -418,68 +278,56 @@ function handleSelectionChange(data) {
|
||||
}
|
||||
//获取主播列表
|
||||
const getlist = () => {
|
||||
if (searchForm.value.dataType == 'InvitationType') {
|
||||
searchForm.value.dataEnd = searchForm.value.dataStart
|
||||
}
|
||||
|
||||
|
||||
|
||||
loading.value = true
|
||||
console.log(searchForm.value)
|
||||
tkhostdata({
|
||||
hostId: searchForm.value.hostId == '' ? null : searchForm.value.hostId,
|
||||
belongYn: searchForm.value.belongYn == '' ? null : searchForm.value.belongYn,
|
||||
searchTime: searchForm.value.time == '' ? null : searchForm.value.time,
|
||||
region: searchForm.value.country == '' ? null : searchForm.value.country,
|
||||
sortType: sortData.value.sortType,
|
||||
sortForm: sortData.value.sortForm,
|
||||
conditions: filterOptions.value.map(option => {
|
||||
return {
|
||||
...option,
|
||||
dataEnd: option.dataEnd == '' ? null : option.dataEnd,
|
||||
dataStart: option.dataStart == '' ? null : option.dataStart
|
||||
};
|
||||
}),
|
||||
// dataType: searchForm.value.dataType == '' ? null : searchForm.value.dataType,
|
||||
// dataStart: searchForm.value.dataStart == '' ? null : searchForm.value.dataStart,
|
||||
// dataEnd: searchForm.value.dataEnd == '' ? null : searchForm.value.dataEnd,
|
||||
pageSize: pageSize.value,
|
||||
page: page.value,
|
||||
userId: userInfo.value.userId,
|
||||
userType: userInfo.value.userType
|
||||
tenantId: Number(userInfo.value.tenantId),
|
||||
sort: sortData.value.sortForm,//正序倒序
|
||||
sortName: sortData.value.sortType,//排序类型
|
||||
"current": page.value,
|
||||
"pageSize": pageSize.value,
|
||||
...searchForm.value,//筛选条件
|
||||
}).then(res => {
|
||||
loading.value = false
|
||||
total.value = res.total
|
||||
tableData.value = []
|
||||
res.records.forEach(item => {
|
||||
if (item.infoMap.InvitationType == '1') {
|
||||
item.infoMap.InvitationType = '普票'
|
||||
} else if (item.infoMap.InvitationType == '2') {
|
||||
item.infoMap.InvitationType = '金票'
|
||||
if (res) {
|
||||
console.log('主播列表', res)
|
||||
total.value = Number(res.total)
|
||||
tableData.value = res.records.map(item => ({
|
||||
hostId: item.hostsId, // 注意:原字段是 hostId,你的数据是 hostsId,需手动映射
|
||||
hostlevel: item.hostsLevel, // 原字段 hostlevel 对应你的数据 hostsLevel
|
||||
country: item.country,
|
||||
createTime: item.createTime,
|
||||
fans: item.fans,
|
||||
fllowernum: item.fllowernum,
|
||||
hostsCoins: item.hostsCoins,
|
||||
hostsKind: item.hostsKind,
|
||||
onlineFans: item.onlineFans,
|
||||
yesterdayCoins: item.yesterdayCoins,
|
||||
// 保留原有字段(如 belongBy、useable 等)
|
||||
belongBy: item.belongBy,
|
||||
useable: item.useable
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
console.log(item.infoMap)
|
||||
item = { ...item, ...item.infoMap }
|
||||
tableData.value.push(item)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
function handelClick() {
|
||||
|
||||
filterOptions.value.forEach(item => {
|
||||
if (item.type == 'InvitationType') {
|
||||
item.dataEnd = item.dataStart
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
setSerch(filterOptions.value)
|
||||
console.log(filterOptions.value)
|
||||
filterdialogVisible.value = false
|
||||
}
|
||||
|
||||
function reset() {
|
||||
searchForm.value.fansMin = null
|
||||
searchForm.value.fansMax = null
|
||||
searchForm.value.onlineFansMin = null
|
||||
searchForm.value.onlineFansMax = null
|
||||
searchForm.value.hostsCoinsMin = null
|
||||
searchForm.value.hostsCoinsMax = null
|
||||
searchForm.value.fllowernumMin = null
|
||||
searchForm.value.fllowernumMax = null
|
||||
}
|
||||
function handleClose(done) {
|
||||
console.log('关闭')
|
||||
// searchForm.value = {
|
||||
@@ -490,135 +338,106 @@ function handleClose(done) {
|
||||
done()
|
||||
}
|
||||
|
||||
function getSerchStorage() {
|
||||
if (getSerch()) {
|
||||
// filterOptions.value = getSerch()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
function openComment(data) {
|
||||
console.log(data)
|
||||
commentInfo.value = data.comment
|
||||
commentHost.value = data.hostId
|
||||
commentVisible.value = true
|
||||
}
|
||||
|
||||
//修改主播维护状态
|
||||
function handleSelectChange(event, data) {
|
||||
// function handleSelectChange(event, data) {
|
||||
|
||||
upholdinfo({
|
||||
"hostId": data.hostId,
|
||||
"userId": userInfo.value.userId,
|
||||
"tenantId": userInfo.value.tenantId,
|
||||
// "comment": "我已经尽力维护,但是失败了",
|
||||
"useable": event.target.value
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
// upholdinfo({
|
||||
// "hostId": data.hostId,
|
||||
// "userId": userInfo.value.userId,
|
||||
// "tenantId": userInfo.value.tenantId,
|
||||
// // "comment": "我已经尽力维护,但是失败了",
|
||||
// "useable": event.target.value
|
||||
// }).then(res => {
|
||||
// console.log(res)
|
||||
// })
|
||||
// }
|
||||
|
||||
//更改主播维护备注
|
||||
|
||||
function uphostcomment() {
|
||||
upholdinfo({
|
||||
"hostId": commentHost.value,
|
||||
"userId": userInfo.value.userId,
|
||||
"tenantId": userInfo.value.tenantId,
|
||||
"comment": commentInfo.value,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
serch()
|
||||
commentVisible.value = false
|
||||
})
|
||||
// function uphostcomment() {
|
||||
// upholdinfo({
|
||||
// "hostId": commentHost.value,
|
||||
// "userId": userInfo.value.userId,
|
||||
// "tenantId": userInfo.value.tenantId,
|
||||
// "comment": commentInfo.value,
|
||||
// }).then(res => {
|
||||
// console.log(res)
|
||||
// serch()
|
||||
// commentVisible.value = false
|
||||
// })
|
||||
// }
|
||||
|
||||
function filterTag(value, row) {
|
||||
console.log(row.useable, value)
|
||||
return row.useable === value;
|
||||
}
|
||||
//获取字典
|
||||
const getdictionary = () => {
|
||||
dicts({
|
||||
paramType: "hostsdata",
|
||||
// page: 1,
|
||||
offset: 1,
|
||||
pageSize: 100
|
||||
}).then(res => {
|
||||
// labelList.value = res.records
|
||||
labelList.value = res
|
||||
console.log(labelList.value)
|
||||
|
||||
labelList.value.forEach(item => {
|
||||
if (item.paramCodeMeaning != '获取时间') {
|
||||
filterOptions.value.push({
|
||||
type: item.paramCode,
|
||||
label: item.paramCodeMeaning,
|
||||
dataStart: '',
|
||||
dataEnd: ''
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//获取国家
|
||||
function getCountry() {
|
||||
getCountryinfo({}).then(res => {
|
||||
console.log(res)
|
||||
res.forEach(item => {
|
||||
options.value.push({ value: item.countryGroupName, label: item.countryGroupName })
|
||||
if (item.countryGroupName) {
|
||||
options.value.push({ value: item.countryGroupName, label: item.countryGroupName })
|
||||
|
||||
}
|
||||
})
|
||||
console.log(options.value)
|
||||
}).catch(err => {
|
||||
console.log('getCountry', err)
|
||||
})
|
||||
}
|
||||
|
||||
//获取下级员工
|
||||
const getStaff = () => {
|
||||
getStaffList({
|
||||
userId: userInfo.value.userId,
|
||||
userType: userInfo.value.userType,
|
||||
activeYn: userInfo.value.activeYn,
|
||||
tenantId: userInfo.value.tenantId,
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
res.forEach(item => {
|
||||
staffOptions.value.push({
|
||||
value: item.userId,
|
||||
label: item.userName
|
||||
})
|
||||
})
|
||||
})
|
||||
// const getStaff = () => {
|
||||
// getStaffList({
|
||||
// userId: userInfo.value.userId,
|
||||
// activeYn: userInfo.value.activeYn,
|
||||
// tenantId: userInfo.value.tenantId,
|
||||
// }).then(res => {
|
||||
// console.log(res)
|
||||
// res.forEach(item => {
|
||||
// staffOptions.value.push({
|
||||
// value: item.userId,
|
||||
// label: item.userName
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
|
||||
}
|
||||
//分配主播给员工
|
||||
function allocation() {
|
||||
managerhosts({
|
||||
"manaId": userInfo.value.userId,
|
||||
"userId": staffValue.value,
|
||||
"tenantId": userInfo.value.tenantId,
|
||||
"hostIds": selectHostList.value
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
dialogFormVisible.value = false
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// //分配主播给员工
|
||||
// function allocation() {
|
||||
// managerhosts({
|
||||
// "manaId": userInfo.value.userId,
|
||||
// "userId": staffValue.value,
|
||||
// "tenantId": userInfo.value.tenantId,
|
||||
// "hostIds": selectHostList.value
|
||||
// }).then(res => {
|
||||
// if (res) {
|
||||
// dialogFormVisible.value = false
|
||||
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
//获取主播信息
|
||||
const getTkhostdetail = (id) => {
|
||||
tkhostdetail({
|
||||
hostId: id,
|
||||
// page: 1,
|
||||
searchTimeStart: '20250401',
|
||||
searchTimeEnd: '20250403'
|
||||
}).then(res => {
|
||||
// const getTkhostdetail = (id) => {
|
||||
// tkhostdetail({
|
||||
// hostId: id,
|
||||
// // page: 1,
|
||||
// searchTimeStart: '20250401',
|
||||
// searchTimeEnd: '20250403'
|
||||
// }).then(res => {
|
||||
|
||||
console.log(labelList.value)
|
||||
// console.log(labelList.value)
|
||||
|
||||
})
|
||||
// })
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
function openPopover(hostId, paramCode) {
|
||||
@@ -637,30 +456,30 @@ function closePopover(hostId, paramCode) {
|
||||
function openHTML(id) {
|
||||
givePyAnchorId(id)
|
||||
|
||||
upholdinfo({
|
||||
"hostId": id,
|
||||
"userId": userInfo.value.userId,
|
||||
"tenantId": userInfo.value.tenantId,
|
||||
// "comment": "我已经尽力维护,但是失败了",
|
||||
"useable": "Y"
|
||||
}).then(res => {
|
||||
// upholdinfo({
|
||||
// "hostId": id,
|
||||
// "userId": userInfo.value.userId,
|
||||
// "tenantId": userInfo.value.tenantId,
|
||||
// // "comment": "我已经尽力维护,但是失败了",
|
||||
// "useable": "Y"
|
||||
// }).then(res => {
|
||||
|
||||
getlist();
|
||||
})
|
||||
// getlist();
|
||||
// })
|
||||
|
||||
}
|
||||
|
||||
function openAccountName(idStr) {
|
||||
if (idStr) {
|
||||
hostNameVisible.value = true
|
||||
accountName(idStr).then(res => {
|
||||
staffId.value = JSON.stringify(res).replace(/[{}"]/g, '') // 移除所有 {} 和 "
|
||||
.split(',') // 按逗号分割成数组
|
||||
// function openAccountName(idStr) {
|
||||
// if (idStr) {
|
||||
// hostNameVisible.value = true
|
||||
// accountName(idStr).then(res => {
|
||||
// staffId.value = JSON.stringify(res).replace(/[{}"]/g, '') // 移除所有 {} 和 "
|
||||
// .split(',') // 按逗号分割成数组
|
||||
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
}
|
||||
// console.log(res)
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@@ -688,7 +507,7 @@ function openAccountName(idStr) {
|
||||
.serch-button {
|
||||
width: 80px;
|
||||
height: 47px;
|
||||
background: #E7CA92;
|
||||
background: @btn-bg-color;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}
|
||||
@@ -696,7 +515,7 @@ function openAccountName(idStr) {
|
||||
.put-button {
|
||||
width: 132px;
|
||||
height: 47px;
|
||||
background: #E7CA92;
|
||||
background: @btn-bg-color;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
|
||||
@@ -708,6 +527,8 @@ function openAccountName(idStr) {
|
||||
--el-dialog-font-line-height: 50px;
|
||||
--el-dialog-width: 600px;
|
||||
--el-dialog-border-radius: 8px;
|
||||
|
||||
// border: 10px solid @bg-color-light;
|
||||
}
|
||||
|
||||
.center-line {
|
||||
@@ -736,20 +557,20 @@ function openAccountName(idStr) {
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
::v-deep(.el-input__wrapper) {
|
||||
background-color: #F2FAF9;
|
||||
border: 1px solid #B7CEC5;
|
||||
border: 1px solid @bg-color;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
::v-deep(.el-select__wrapper) {
|
||||
background-color: #F2FAF9;
|
||||
border: 1px solid #B7CEC5;
|
||||
border: 1px solid @bg-color;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
::v-deep(.el-pagination.is-background .el-pager li.is-active) {
|
||||
background-color: #338F6A;
|
||||
background-color: @bg-color;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user