bate版本提交
This commit is contained in:
BIN
public/bg.mp4
BIN
public/bg.mp4
Binary file not shown.
@@ -4,28 +4,44 @@ export function apiGetCart() {
|
||||
return getAxios({ url: '/cgi-bin/cart/latest' })
|
||||
}
|
||||
export function login(data) {
|
||||
return postAxios({ url: 'account/login', data })
|
||||
return postAxios({ url: 'api/account/login', data })
|
||||
}
|
||||
export function cheekalive(data) {
|
||||
return postAxios({ url: 'account/cheekalive', data })
|
||||
return postAxios({ url: 'api/account/cheekalive', data })
|
||||
}
|
||||
export function tkhostdata(data) {
|
||||
return postAxios({ url: 'tkinfo/tkhostdata', data })
|
||||
return postAxios({ url: 'api/tkinfo/tkhostdata', data })
|
||||
}
|
||||
export function dicts(data) {
|
||||
return postAxios({ url: 'param/dicts', data })
|
||||
return postAxios({ url: 'api/param/dicts', data })
|
||||
}
|
||||
export function tkhostdetail(data) {
|
||||
return postAxios({ url: 'tkinfo/tkhostdetail', data })
|
||||
return postAxios({ url: 'api/tkinfo/tkhostdetail', data })
|
||||
}
|
||||
//导出表格
|
||||
export function exporthosts(data) {
|
||||
return postAxios({ url: 'export/hostsinfo', data })
|
||||
return postAxios({ url: 'api/export/hostsinfo', data })
|
||||
}
|
||||
export function downList(url, data) {
|
||||
return downFile(url, data)
|
||||
}
|
||||
//查询tk账号查询次数
|
||||
export function tkaccountuseinfo(data) {
|
||||
return postAxios({ url: 'tkinfo/tkaccountuseinfo', data })
|
||||
return postAxios({ url: 'api/tkinfo/tkaccountuseinfo', data })
|
||||
}
|
||||
//查询员工
|
||||
export function getStaffList(data) {
|
||||
return postAxios({ url: 'api/account/list', data })
|
||||
}
|
||||
//分配主播
|
||||
export function managerhosts(data) {
|
||||
return postAxios({ url: 'api/account/managerhosts', data })
|
||||
}
|
||||
//编辑主播
|
||||
export function upholdinfo(data) {
|
||||
return postAxios({ url: 'api/tkinfo/upholdinfo', data })
|
||||
}
|
||||
//获取
|
||||
export function getCountryinfo(data) {
|
||||
return postAxios({ url: 'api/tkinfo/countryinfo', data })
|
||||
}
|
||||
|
||||
BIN
src/assets/filter.png
Normal file
BIN
src/assets/filter.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB |
BIN
src/assets/logoBg.png
Normal file
BIN
src/assets/logoBg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
@@ -5,38 +5,57 @@
|
||||
<img src="@/assets/logotext.png">
|
||||
</div>
|
||||
<ul>
|
||||
<li @click="activeIndex = 1">
|
||||
<RouterLink to="/workBenches">
|
||||
<img v-if="activeIndex == 1" src="@/assets/navAction.png" autoplay loop muted class="background-img">
|
||||
<li @click="updateActiveIndex(1)" v-show="userInfo.userType == 3">
|
||||
<div>
|
||||
<img v-show="activeIndex == 1" src="@/assets/navAction.png" autoplay loop muted class="background-img">
|
||||
<div style="display: flex;">
|
||||
<img v-if="activeIndex == 1" src="@/assets/workAction.png" style="margin-right: 10px;">
|
||||
<img v-else src="@/assets/workAction.png" style="margin-right: 10px;">
|
||||
<img v-show="activeIndex == 1" src="@/assets/workAction.png" style="margin-right: 10px;">
|
||||
<img v-show="activeIndex == 2" src="@/assets/workAction.png" style="margin-right: 10px;">
|
||||
<div :style="activeIndex == 1 ? 'color: #000' : 'color: #fff'" class="center-justify">工作台</div>
|
||||
|
||||
</div>
|
||||
</RouterLink>
|
||||
</div>
|
||||
</li>
|
||||
<li @click="activeIndex = 2">
|
||||
<RouterLink to="/hostsList">
|
||||
<img v-if="activeIndex == 2" src="@/assets/navAction.png" autoplay loop muted class="background-img">
|
||||
<li @click="updateActiveIndex(2)">
|
||||
<div>
|
||||
<img v-show="activeIndex == 2" src="@/assets/navAction.png" autoplay loop muted class="background-img">
|
||||
|
||||
<div style="display: flex;">
|
||||
<img v-if="activeIndex == 2" src="@/assets/listAction.png" style="margin-right: 10px;">
|
||||
<img v-else src="@/assets/listAction.png" style="margin-right: 10px;">
|
||||
<img v-show="activeIndex == 2" src="@/assets/listAction.png" style="margin-right: 10px;">
|
||||
<img v-show="activeIndex == 1" src="@/assets/listAction.png" style="margin-right: 10px;">
|
||||
<div :style="activeIndex == 2 ? 'color: #000' : 'color: #fff'" class="center-justify">主播列表</div>
|
||||
|
||||
</div>
|
||||
</RouterLink>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a @click="$router.push('/')" href="javascript:void(0);"
|
||||
style="position: absolute; bottom: 30px; color: aliceblue; font-size: 20px; font-weight: 500;">
|
||||
退出登录
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { getUser } from '@/utils/storage'
|
||||
import { defineEmits } from 'vue';
|
||||
|
||||
const userInfo = ref(getUser())
|
||||
|
||||
let activeIndex = ref(userInfo.value.userType == 3 ? 1 : 2);
|
||||
|
||||
const emit = defineEmits(['update:activeIndex']);
|
||||
|
||||
|
||||
let activeIndex = ref(1);
|
||||
const updateActiveIndex = (index) => {
|
||||
activeIndex.value = index;
|
||||
emit('activeIndex', index);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -80,6 +99,7 @@ let activeIndex = ref(1);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
|
||||
const routes = [
|
||||
@@ -11,24 +11,23 @@ const routes = [
|
||||
{
|
||||
path: '/nav',
|
||||
name: 'nav',
|
||||
redirect: '/workBenches', // 默认跳转
|
||||
// redirect: '/nav/hostsList', // 默认跳转
|
||||
component: () => import(/* webpackChunkName: "hostsList" */ '../views/nav.vue'),
|
||||
children: [
|
||||
{
|
||||
path: '/hostsList',
|
||||
path: 'hostsList',
|
||||
name: 'hostsList',
|
||||
component: () => import(/* webpackChunkName: "hostsList" */ '../views/hosts/hostsList.vue')
|
||||
},
|
||||
{
|
||||
path: '/workBenches',
|
||||
path: 'workBenches',
|
||||
name: 'workBenches',
|
||||
component: () => import(/* webpackChunkName: "hostsList" */ '../views/hosts/workbenches.vue')
|
||||
},]
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
history: createWebHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ const router = useRouter();
|
||||
let baseURL = ''
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 生产环境
|
||||
baseURL = "http://120.26.251.180:8085/api/"
|
||||
// baseURL = "http://192.168.0.108:8085/api/"
|
||||
baseURL = "http://120.26.251.180:8085/"
|
||||
// baseURL = "http://192.168.0.114:8085/"
|
||||
} else {
|
||||
// 开发环境
|
||||
baseURL = ""
|
||||
baseURL = "http://120.26.251.180:8085/"
|
||||
}
|
||||
|
||||
// 请求拦截器
|
||||
@@ -72,9 +72,9 @@ export function getAxios({ url, params }) {
|
||||
|
||||
// axios的post请求
|
||||
export function postAxios({ url, data }) {
|
||||
if (url != 'account/login') {
|
||||
if (url != 'api/account/login') {
|
||||
|
||||
axios.post('account/cheekalive', {
|
||||
axios.post('api/account/cheekalive', {
|
||||
userId: getUser().userId,
|
||||
currcode: getToken(),
|
||||
},
|
||||
@@ -84,6 +84,14 @@ export function postAxios({ url, data }) {
|
||||
}
|
||||
}
|
||||
).then(res => {
|
||||
if (res) {
|
||||
|
||||
} else {
|
||||
alert("账号在其他地方登录!")
|
||||
router.push('/login')
|
||||
}
|
||||
|
||||
|
||||
}).catch(err => {
|
||||
if (err.message == "Network Error") {
|
||||
// alert("网络错误,请检查网络连接")
|
||||
|
||||
@@ -90,6 +90,14 @@ export function usePythonBridge() {
|
||||
|
||||
};
|
||||
|
||||
//导出表格
|
||||
const exportToExcel = (data) => {
|
||||
if (bridge.value) {
|
||||
bridge.value.exportToExcel(JSON.stringify(data));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 在组件挂载时初始化桥接
|
||||
onMounted(initBridge);
|
||||
@@ -101,6 +109,7 @@ export function usePythonBridge() {
|
||||
loginTikTok,
|
||||
givePyAnchorId,
|
||||
backStageloginStatus,
|
||||
backStageloginStatusCopy
|
||||
backStageloginStatusCopy,
|
||||
exportToExcel
|
||||
};
|
||||
}
|
||||
@@ -2,12 +2,7 @@
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
<div class="right">
|
||||
<!-- 视频背景 -->
|
||||
<video autoplay loop muted class="background-video">
|
||||
<source :src="require('@/assets/video/bg.mp4')" type="video/mp4">
|
||||
您的浏览器不支持 HTML5 视频。
|
||||
</video>
|
||||
|
||||
<img src="../assets/logoBg.png" class="background-video" alt="">
|
||||
<!-- 设置 -->
|
||||
<div class="center-align">
|
||||
<div></div>
|
||||
@@ -95,9 +90,14 @@ const onSubmit = () => {
|
||||
password: formData.value.password,
|
||||
}).then((res) => {
|
||||
loading.close();
|
||||
setToken(res.currcode);
|
||||
setUser(res);
|
||||
router.push('/nav');
|
||||
if (res) {
|
||||
setToken(res.currcode);
|
||||
setUser(res);
|
||||
router.push('/nav');
|
||||
} else {
|
||||
alert('账号或密码错误');
|
||||
}
|
||||
|
||||
}).catch((err) => {
|
||||
loading.close();
|
||||
});
|
||||
@@ -106,14 +106,25 @@ const onSubmit = () => {
|
||||
|
||||
<style lang="less">
|
||||
.main {
|
||||
width: 100vw;
|
||||
width: 1600px;
|
||||
height: 900px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
|
||||
/* 页面无法选中 */
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
width: 1600px;
|
||||
height: 900px;
|
||||
|
||||
.right {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
width: 1600px;
|
||||
height: 900px;
|
||||
@@ -130,7 +141,6 @@ const onSubmit = () => {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
z-index: -1;
|
||||
/* 确保视频在内容之下 */
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="hostList">
|
||||
<div>
|
||||
<div style="display: flex;">
|
||||
<el-select v-model="searchForm.country" placeholder="选择国家" size="large" style="width: 240px">
|
||||
<el-select v-model="searchForm.country" filterable placeholder="选择国家" size="large" style="width: 240px">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<div></div>
|
||||
@@ -12,17 +12,23 @@
|
||||
<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 @click="filterdialogVisible = true" style="width: 50px;" class="put-button" type="primary"><img
|
||||
style="height: 30px;" src="@/assets/filter.png"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="hostTable center-justify">
|
||||
<el-table :data="tableData" stripe v-loading="loading" height="500">
|
||||
<el-table-column fixed prop="hostId" label="主播id" width="200">
|
||||
<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" @click="openHTML(scope.row.hostId)"> {{ scope.row.hostId }}</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="hostName" label="主播名字" min-width="200">
|
||||
<el-table-column prop="hostName" label="主播名字" min-width="160">
|
||||
<template #default="scope">
|
||||
{{ scope.row.hostName }}
|
||||
</template>
|
||||
@@ -68,6 +74,36 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column 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">
|
||||
@@ -83,29 +119,116 @@
|
||||
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</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="filterdialogVisible" width="800px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<label>选择筛选条件</label>
|
||||
<el-select v-model="searchForm.dataType" filterable placeholder="筛选条件" style="width: 240px">
|
||||
<el-option v-for="item in filterOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div v-if="!(searchForm.dataType == 'InvitationType')"><label>最小值</label></div>
|
||||
<div v-else><label>普票/金票</label></div>
|
||||
|
||||
<el-input v-show="!(searchForm.dataType == 'InvitationType')" type="number" v-model="searchForm.dataStart"
|
||||
placeholder="请输入最小值" />
|
||||
<el-select v-show="(searchForm.dataType == 'InvitationType')" v-model="searchForm.dataStart" filterable
|
||||
placeholder="请选择" style="width: 240px">
|
||||
<el-option v-for="item in [{ label: '普票', value: '1' }, { label: '金票', value: '2' }]" :key="item.value"
|
||||
:label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div v-show="!(searchForm.dataType == 'InvitationType')"><label>最大值</label></div>
|
||||
|
||||
<el-input v-show="!(searchForm.dataType == 'InvitationType')" type="number" v-model="searchForm.dataEnd"
|
||||
placeholder="请输入最大值" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<!-- <el-button @click="filterdialogVisible = false">取消</el-button> -->
|
||||
<el-button type="primary" @click="filterdialogVisible = false">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// import { getToken, setToken, removeToken } from '@/utils/storage'
|
||||
import { tkhostdata, dicts, tkhostdetail, exporthosts, downList } from '@/api/account';
|
||||
import { tkhostdata, dicts, tkhostdetail, downList, getStaffList, managerhosts, upholdinfo, getCountryinfo } from '@/api/account';
|
||||
import { usePythonBridge, } from '@/utils/pythonBridge'
|
||||
import { getUser } from '@/utils/storage'
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import EChartsComponent from '@/components/EChartsComponent.vue';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const loading = ref(false)
|
||||
//py方法
|
||||
const { givePyAnchorId } = usePythonBridge();
|
||||
const { givePyAnchorId, exportToExcel } = usePythonBridge();
|
||||
|
||||
let num = ref(0)
|
||||
//账号信息
|
||||
const userInfo = ref(getUser())
|
||||
//主播列表DOM
|
||||
const multipleTableRef = ref(null)
|
||||
|
||||
let labelList = ref([])
|
||||
const tableData = ref([])
|
||||
//选择国家
|
||||
const searchForm = ref({
|
||||
country: '',
|
||||
time: ''
|
||||
time: new Date().toISOString().split('T')[0].replace(/-/g, ''),
|
||||
dataType: '',
|
||||
dataStart: '',
|
||||
dataEnd: '',
|
||||
})
|
||||
|
||||
//员工选择列表
|
||||
let staffOptions = ref([])
|
||||
//筛选条件选择列表
|
||||
let filterOptions = ref([])
|
||||
//选择的员工
|
||||
let staffValue = ref('')
|
||||
//选择的主播列表
|
||||
let selectHostList = ref([])
|
||||
//分配弹窗是否弹出
|
||||
let dialogFormVisible = ref(false)
|
||||
//备注弹窗是否弹出
|
||||
let commentVisible = ref(false)
|
||||
//筛选弹窗是否弹出
|
||||
let filterdialogVisible = ref(false)
|
||||
|
||||
//备注信息
|
||||
let commentInfo = ref('')
|
||||
//备注信息主播
|
||||
let commentHost = ref('')
|
||||
//分页
|
||||
let pageSize = ref(10)
|
||||
let page = ref(1)
|
||||
@@ -114,27 +237,15 @@ let total = ref(0)
|
||||
const isPopoverVisible = reactive({})
|
||||
|
||||
|
||||
const options = [
|
||||
{
|
||||
value: '日本',
|
||||
label: '日本',
|
||||
},
|
||||
{
|
||||
value: '美国',
|
||||
label: '美国',
|
||||
},
|
||||
{
|
||||
value: '荷兰',
|
||||
label: '荷兰',
|
||||
},
|
||||
{
|
||||
value: '澳大利亚',
|
||||
label: '澳大利亚',
|
||||
}
|
||||
]
|
||||
let options = ref([])
|
||||
|
||||
onMounted(() => {
|
||||
//获取字典
|
||||
getdictionary()
|
||||
//获取下级员工
|
||||
getStaff();
|
||||
//获取国家
|
||||
getCountry();
|
||||
})
|
||||
|
||||
function serch() {
|
||||
@@ -143,66 +254,131 @@ function serch() {
|
||||
}
|
||||
|
||||
function exportList() {
|
||||
downList('export/hostsinfo',
|
||||
{
|
||||
searchTime: searchForm.value.time,
|
||||
region: searchForm.value.country,
|
||||
pageSize: pageSize.value,
|
||||
page: page.value,
|
||||
userId: getUser().userId,
|
||||
userType: getUser().userType
|
||||
}
|
||||
);
|
||||
// exporthosts({
|
||||
// searchTime: searchForm.value.time,
|
||||
// region: searchForm.value.country,
|
||||
// pageSize: pageSize.value,
|
||||
// page: page.value,
|
||||
// userId: getUser().userId,
|
||||
// userType: getUser().userType
|
||||
// }).then(res => {
|
||||
// const blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
|
||||
// const url = window.URL.createObjectURL(blob);
|
||||
// const a = document.createElement('a');
|
||||
// a.href = url;
|
||||
// a.download = 'table-data.xlsx'; // 下载的文件名
|
||||
// document.body.appendChild(a);
|
||||
// a.click();
|
||||
// a.remove();
|
||||
// window.URL.revokeObjectURL(url);
|
||||
// })
|
||||
if (searchForm.value.dataType == 'InvitationType') {
|
||||
searchForm.value.dataEnd = searchForm.value.dataStart
|
||||
}
|
||||
exportToExcel({
|
||||
searchTime: searchForm.value.time,
|
||||
region: searchForm.value.country,
|
||||
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
|
||||
})
|
||||
|
||||
|
||||
// //浏览器导出方法
|
||||
// downList('export/hostsinfo',
|
||||
// {
|
||||
// searchTime: searchForm.value.time,
|
||||
// region: searchForm.value.country,
|
||||
// pageSize: pageSize.value,
|
||||
// page: page.value,
|
||||
// userId: userInfo.value.userId,
|
||||
// userType: userInfo.value.userType
|
||||
// }
|
||||
// );
|
||||
|
||||
}
|
||||
//分页每页条数
|
||||
function handleSizeChange(val) {
|
||||
console.log(`${val} items per page`)
|
||||
getlist();
|
||||
|
||||
}
|
||||
//分页页数
|
||||
function handleCurrentChange(val) {
|
||||
console.log(`current page: ${val}`)
|
||||
getlist();
|
||||
|
||||
}
|
||||
//选择行
|
||||
function handleSelectionChange(data) {
|
||||
console.log(data)
|
||||
data.forEach(item => {
|
||||
selectHostList.value.push(item.hostId)
|
||||
})
|
||||
// multipleTableRef.value = data
|
||||
// console.log(multipleTableRef.value)
|
||||
|
||||
}
|
||||
//获取主播列表
|
||||
const getlist = () => {
|
||||
if (searchForm.value.dataType == 'InvitationType') {
|
||||
searchForm.value.dataEnd = searchForm.value.dataStart
|
||||
}
|
||||
|
||||
|
||||
|
||||
loading.value = true
|
||||
console.log(searchForm.value)
|
||||
tkhostdata({
|
||||
searchTime: searchForm.value.time,
|
||||
region: searchForm.value.country,
|
||||
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: getUser().userId,
|
||||
userType: getUser().userType
|
||||
userId: userInfo.value.userId,
|
||||
userType: userInfo.value.userType
|
||||
}).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 = '金票'
|
||||
|
||||
}
|
||||
console.log(item.infoMap)
|
||||
item = { ...item, ...item.infoMap }
|
||||
tableData.value.push(item)
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function openComment(data) {
|
||||
console.log(data)
|
||||
commentInfo.value = data.comment
|
||||
commentHost.value = data.hostId
|
||||
commentVisible.value = true
|
||||
}
|
||||
|
||||
//修改主播维护状态
|
||||
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)
|
||||
})
|
||||
}
|
||||
|
||||
//更改主播维护备注
|
||||
|
||||
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
|
||||
})
|
||||
}
|
||||
//获取字典
|
||||
const getdictionary = () => {
|
||||
dicts({
|
||||
@@ -214,10 +390,62 @@ const getdictionary = () => {
|
||||
// labelList.value = res.records
|
||||
labelList.value = res
|
||||
console.log(labelList.value)
|
||||
labelList.value.forEach(item => {
|
||||
filterOptions.value.push({
|
||||
value: item.paramCode,
|
||||
label: item.paramCodeMeaning
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//获取国家
|
||||
function getCountry() {
|
||||
getCountryinfo({}).then(res => {
|
||||
console.log(res)
|
||||
res.forEach(item => {
|
||||
options.value.push({ value: item.countryGroupName, label: item.countryGroupName })
|
||||
})
|
||||
console.log(options.value)
|
||||
})
|
||||
}
|
||||
|
||||
//获取下级员工
|
||||
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
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
//分配主播给员工
|
||||
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({
|
||||
@@ -254,12 +482,18 @@ function openHTML(id) {
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.main {
|
||||
.hostList {
|
||||
box-sizing: border-box;
|
||||
// height: 100vh;
|
||||
width: 100%;
|
||||
padding: 40px;
|
||||
|
||||
/* 页面无法选中 */
|
||||
// -webkit-user-select: none;
|
||||
// -moz-user-select: none;
|
||||
// -ms-user-select: none;
|
||||
// user-select: none;
|
||||
|
||||
.hostTable {
|
||||
width: 100%;
|
||||
padding: 40px 0;
|
||||
@@ -289,6 +523,13 @@ function openHTML(id) {
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog {
|
||||
|
||||
--el-dialog-font-line-height: 50px;
|
||||
--el-dialog-width: 600px;
|
||||
--el-dialog-border-radius: 8px;
|
||||
}
|
||||
|
||||
.center-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -319,7 +560,7 @@ function openHTML(id) {
|
||||
::v-deep(.el-input__wrapper) {
|
||||
background-color: #F2FAF9;
|
||||
border: 1px solid #B7CEC5;
|
||||
height: 48px;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
::v-deep(.el-select__wrapper) {
|
||||
|
||||
@@ -114,7 +114,6 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
// import { useIPCountry } from '@/utils/useIPCountry';
|
||||
import { usePythonBridge, } from '@/utils/pythonBridge'
|
||||
import { setNumData, getNumData, getUser, setTkUser, getTkUser } from '@/utils/storage'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
@@ -136,7 +135,7 @@ let hostData = ref({
|
||||
|
||||
});
|
||||
//是否开启tk
|
||||
let isTk = ref(false);
|
||||
let isTk = ref(true);
|
||||
|
||||
//设置状态轮询定时器
|
||||
let statusTimer = ref(null);
|
||||
@@ -190,8 +189,8 @@ onMounted(() => {
|
||||
tkData.value[1].code = 0;
|
||||
}
|
||||
|
||||
tkData.value[0].num = tkaccountuse(tkData.value[0].account)
|
||||
tkData.value[1].num = tkaccountuse(tkData.value[1].account)
|
||||
tkaccountuse(tkData.value[0].account, 0)
|
||||
tkaccountuse(tkData.value[1].account, 1)
|
||||
|
||||
getIpInfo()
|
||||
//查询次数查询
|
||||
@@ -218,6 +217,14 @@ const getIpInfo = async () => {
|
||||
const submit = () => {
|
||||
pyData.value.country = countryData.value;
|
||||
console.log('提交的区间值:', pyData.value);
|
||||
if (tkData.value[0].account == '' || tkData.value[1].account == '') {
|
||||
ElMessage.error('请输入账号密码');
|
||||
return;
|
||||
}
|
||||
if (tkData.value[0].password == '' || tkData.value[1].password == '') {
|
||||
ElMessage.error('请输入账号密码');
|
||||
return;
|
||||
}
|
||||
ElMessageBox.confirm(
|
||||
'确认开始爬取数据?',
|
||||
'开始',
|
||||
@@ -346,13 +353,14 @@ function getloginStatusCopy() {
|
||||
}
|
||||
|
||||
|
||||
function tkaccountuse(id) {
|
||||
function tkaccountuse(id, index) {
|
||||
let num = 0;
|
||||
tkaccountuseinfo({ userId: id }).then((res) => {
|
||||
num = res
|
||||
console.log(num)
|
||||
tkData.value[index].num = num
|
||||
console.log('账号使用次数', tkData.value[index].num)
|
||||
})
|
||||
return num
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -362,7 +370,15 @@ function tkaccountuse(id) {
|
||||
}
|
||||
|
||||
.workbenches {
|
||||
padding: 45px 29px 22px 27px
|
||||
padding: 45px 29px 22px 27px;
|
||||
|
||||
/* 页面无法选中 */
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.box-card {
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<Sidebar />
|
||||
<Sidebar class="noneText" @activeIndex="activeIndexFn" />
|
||||
<div class="content ">
|
||||
<RouterView />
|
||||
<div v-show="activeIndex == 1">
|
||||
<workbenches v-if="openWerk" />
|
||||
</div>
|
||||
<div v-show="activeIndex == 2">
|
||||
<hostsList v-if="openList" />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -10,6 +17,26 @@
|
||||
<script setup>
|
||||
import Sidebar from '../components/Sidebar.vue';
|
||||
import { RouterLink, RouterView } from 'vue-router'
|
||||
import hostsList from '@/views/hosts/hostsList.vue'
|
||||
import workbenches from '@/views/hosts/workbenches.vue'
|
||||
import { ref } from 'vue'
|
||||
import { getUser } from '@/utils/storage'
|
||||
|
||||
let userType = ref(getUser().userType)
|
||||
let activeIndex = ref(userType.value == 3 ? 1 : 2)
|
||||
let openWerk = ref(userType.value == 3 ? true : false)
|
||||
let openList = ref(userType.value == 3 ? false : true)
|
||||
console.log("用户等级", getUser().userType)
|
||||
|
||||
|
||||
|
||||
function activeIndexFn(data) {
|
||||
activeIndex.value = data
|
||||
openWerk.value = true
|
||||
openList.value = true
|
||||
console.log(data)
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -27,6 +54,15 @@ html {
|
||||
height: 900px;
|
||||
background-color: #338F6A;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.noneText {
|
||||
/* 页面无法选中 */
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
|
||||
Reference in New Issue
Block a user