版本号更新
This commit is contained in:
@@ -38,6 +38,8 @@ export default {
|
|||||||
|
|
||||||
this.inputTime = this.time
|
this.inputTime = this.time
|
||||||
this.getTkhostdetail();
|
this.getTkhostdetail();
|
||||||
|
console.log(this.time)
|
||||||
|
|
||||||
console.log(this.getPrevious7Days(this.inputTime))
|
console.log(this.getPrevious7Days(this.inputTime))
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ import { ref, reactive, onMounted } from 'vue';
|
|||||||
import { getUser } from '@/utils/storage'
|
import { getUser } from '@/utils/storage'
|
||||||
import { defineEmits } from 'vue';
|
import { defineEmits } from 'vue';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const userInfo = ref(getUser())
|
const userInfo = ref(getUser())
|
||||||
|
|
||||||
let activeIndex = ref(userInfo.value.userType == 3 ? 1 : 2);
|
let activeIndex = ref(userInfo.value.userType == 3 ? 1 : 2);
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import axios from 'axios'
|
|||||||
import { getToken, getUser } from '@/utils/storage'
|
import { getToken, getUser } from '@/utils/storage'
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
|
import { usePythonBridge, } from '@/utils/pythonBridge'
|
||||||
|
|
||||||
|
const { stopScript } = usePythonBridge();
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -13,8 +16,9 @@ const router = useRouter();
|
|||||||
let baseURL = ''
|
let baseURL = ''
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// 生产环境
|
// 生产环境
|
||||||
baseURL = "http://api.tkpage.vvtiktok.cn"
|
// baseURL = "http://api.tkpage.vvtiktok.cn"
|
||||||
// baseURL = "http://192.168.0.116:8085/"
|
baseURL = "http://120.26.251.180:8085/"
|
||||||
|
// baseURL = "http://192.168.0.113:8085/"
|
||||||
} else {
|
} else {
|
||||||
// 开发环境
|
// 开发环境
|
||||||
baseURL = "http://api.tkpage.vvtiktok.cn"
|
baseURL = "http://api.tkpage.vvtiktok.cn"
|
||||||
@@ -90,7 +94,10 @@ export function postAxios({ url, data }) {
|
|||||||
reject('网络连接错误')
|
reject('网络连接错误')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error(err.message);
|
if (err.response.data.message) {
|
||||||
|
ElMessage.error(err.response.data.message);
|
||||||
|
}
|
||||||
|
|
||||||
reject(err.message)
|
reject(err.message)
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -146,6 +153,7 @@ function cheekalive() {
|
|||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
stopScript();
|
||||||
alert("账号在其他地方登录!")
|
alert("账号在其他地方登录!")
|
||||||
window.location.href = '/';
|
window.location.href = '/';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,8 +99,23 @@ export function usePythonBridge() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
const stopScript = () => {
|
||||||
|
if (bridge.value) {
|
||||||
|
bridge.value.stopScript();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取版本号
|
||||||
|
const getVersion = () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (bridge.value) {
|
||||||
|
bridge.value.currentVersion(function (result) {
|
||||||
|
resolve(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
// 在组件挂载时初始化桥接
|
// 在组件挂载时初始化桥接
|
||||||
onMounted(initBridge);
|
onMounted(initBridge);
|
||||||
|
|
||||||
@@ -112,6 +127,8 @@ export function usePythonBridge() {
|
|||||||
givePyAnchorId,
|
givePyAnchorId,
|
||||||
backStageloginStatus,
|
backStageloginStatus,
|
||||||
backStageloginStatusCopy,
|
backStageloginStatusCopy,
|
||||||
exportToExcel
|
exportToExcel,
|
||||||
|
stopScript,
|
||||||
|
getVersion
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -42,4 +42,13 @@ export function setTkUser(userdata) {
|
|||||||
// 用于获取tk账户密码
|
// 用于获取tk账户密码
|
||||||
export function getTkUser() {
|
export function getTkUser() {
|
||||||
return JSON.parse(localStorage.getItem('tkuser'));
|
return JSON.parse(localStorage.getItem('tkuser'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 用于列表筛选条件
|
||||||
|
export function setSerch(data) {
|
||||||
|
localStorage.setItem('Serch', JSON.stringify(data));
|
||||||
|
}
|
||||||
|
// 用于获取列表筛选条件
|
||||||
|
export function getSerch() {
|
||||||
|
return JSON.parse(localStorage.getItem('Serch'));
|
||||||
}
|
}
|
||||||
@@ -53,12 +53,16 @@
|
|||||||
<div class="from-input-item">
|
<div class="from-input-item">
|
||||||
<el-button class="loginButton" color="#8f7ee7" type="primary"
|
<el-button class="loginButton" color="#8f7ee7" type="primary"
|
||||||
@click="onSubmit">登录</el-button>
|
@click="onSubmit">登录</el-button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="version center-justify ">版本号:{{ version }}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -69,6 +73,20 @@ import { useRouter } from 'vue-router';
|
|||||||
import { login } from '@/api/account';
|
import { login } from '@/api/account';
|
||||||
import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/utils/storage';
|
import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/utils/storage';
|
||||||
import { ElLoading } from 'element-plus';
|
import { ElLoading } from 'element-plus';
|
||||||
|
import { usePythonBridge } from '@/utils/pythonBridge'
|
||||||
|
|
||||||
|
|
||||||
|
const { getVersion } = usePythonBridge();
|
||||||
|
let version = ref('0.0.0');
|
||||||
|
onMounted(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
getVersion().then((res) => {
|
||||||
|
version.value = res;
|
||||||
|
})
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -78,6 +96,7 @@ const formData = ref({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
const loading = ElLoading.service({
|
const loading = ElLoading.service({
|
||||||
lock: true,
|
lock: true,
|
||||||
@@ -88,6 +107,7 @@ const onSubmit = () => {
|
|||||||
login({
|
login({
|
||||||
userId: formData.value.userId,
|
userId: formData.value.userId,
|
||||||
password: formData.value.password,
|
password: formData.value.password,
|
||||||
|
source: 'app'
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
loading.close();
|
loading.close();
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@@ -101,7 +121,7 @@ const onSubmit = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
alert('账号或密码错误');
|
// alert('账号或密码错误');
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@@ -141,6 +161,18 @@ const onSubmit = () => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* 防止内容溢出 */
|
/* 防止内容溢出 */
|
||||||
|
|
||||||
|
.version {
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 20px;
|
||||||
|
bottom: 20px;
|
||||||
|
left: calc(50% - 50px);
|
||||||
|
// box-sizing: border-box;
|
||||||
|
// width: 1600px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.background-video {
|
.background-video {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<div style="height: 300px;">
|
<div style="height: 300px;">
|
||||||
<component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
<component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
||||||
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
||||||
:time="searchForm.time"></component>
|
:time="scope.row.createDt.split('T')[0].replace(/-/g, '').substring(0, 8)"></component>
|
||||||
</div>
|
</div>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<span @mouseover="openPopover(scope.row.hostId, label.paramCode)"
|
<span @mouseover="openPopover(scope.row.hostId, label.paramCode)"
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<div style="height: 300px;">
|
<div style="height: 300px;">
|
||||||
<component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
<component :is="EChartsComponent" v-if="isPopoverVisible[`${scope.row.hostId}-${label.paramCode}`]"
|
||||||
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
:title="label.paramCodeMeaning" :id="scope.row.hostId" :dataType="label.paramCode"
|
||||||
:time="searchForm.time">
|
:time="scope.row.createDt.split('T')[0].replace(/-/g, '').substring(0, 8)">
|
||||||
</component>
|
</component>
|
||||||
</div>
|
</div>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog v-model="filterdialogVisible" width="800px">
|
<el-dialog v-model="filterdialogVisible" width="800px" :before-close="handleClose">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<label>选择筛选条件</label>
|
<label>选择筛选条件</label>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<!-- <el-button @click="filterdialogVisible = false">取消</el-button> -->
|
<!-- <el-button @click="filterdialogVisible = false">取消</el-button> -->
|
||||||
<el-button type="primary" @click="filterdialogVisible = false">
|
<el-button type="primary" @click="handelClick">
|
||||||
确认
|
确认
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
// import { getToken, setToken, removeToken } from '@/utils/storage'
|
// import { getToken, setToken, removeToken } from '@/utils/storage'
|
||||||
import { tkhostdata, dicts, tkhostdetail, downList, getStaffList, managerhosts, upholdinfo, getCountryinfo } from '@/api/account';
|
import { tkhostdata, dicts, tkhostdetail, downList, getStaffList, managerhosts, upholdinfo, getCountryinfo } from '@/api/account';
|
||||||
import { usePythonBridge, } from '@/utils/pythonBridge'
|
import { usePythonBridge, } from '@/utils/pythonBridge'
|
||||||
import { getUser } from '@/utils/storage'
|
import { getUser, setSerch, getSerch } from '@/utils/storage'
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import EChartsComponent from '@/components/EChartsComponent.vue';
|
import EChartsComponent from '@/components/EChartsComponent.vue';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
@@ -205,7 +205,8 @@ const tableData = ref([])
|
|||||||
//选择国家
|
//选择国家
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
country: '',
|
country: '',
|
||||||
time: new Date().toISOString().split('T')[0].replace(/-/g, ''),
|
// time: new Date().toISOString().split('T')[0].replace(/-/g, ''),
|
||||||
|
time: '',
|
||||||
dataType: '',
|
dataType: '',
|
||||||
dataStart: '',
|
dataStart: '',
|
||||||
dataEnd: '',
|
dataEnd: '',
|
||||||
@@ -240,14 +241,17 @@ const isPopoverVisible = reactive({})
|
|||||||
|
|
||||||
let options = ref([])
|
let options = ref([])
|
||||||
|
|
||||||
onMounted(() => {
|
let version = ref('0.0.0');
|
||||||
//获取字典
|
|
||||||
getdictionary()
|
|
||||||
//获取下级员工
|
|
||||||
getStaff();
|
|
||||||
//获取国家
|
|
||||||
getCountry();
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
|
||||||
|
getdictionary()//获取字典
|
||||||
|
|
||||||
|
getStaff(); //获取下级员工
|
||||||
|
|
||||||
|
getCountry(); //获取国家
|
||||||
|
|
||||||
|
getSerchStorage();//获取搜索条件
|
||||||
|
|
||||||
getlist();//获取主播列表
|
getlist();//获取主播列表
|
||||||
})
|
})
|
||||||
@@ -347,7 +351,29 @@ const getlist = () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function handelClick() {
|
||||||
|
setSerch({ dataType: searchForm.value.dataType, dataStart: searchForm.value.dataStart, dataEnd: searchForm.value.dataEnd })
|
||||||
|
filterdialogVisible.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClose(done) {
|
||||||
|
console.log('关闭')
|
||||||
|
searchForm.value = {
|
||||||
|
dataType: '',
|
||||||
|
dataStart: '',
|
||||||
|
dataEnd: '',
|
||||||
|
}
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSerchStorage() {
|
||||||
|
if (getSerch()) {
|
||||||
|
searchForm.value.dataType = getSerch().dataType
|
||||||
|
searchForm.value.dataStart = getSerch().dataStart
|
||||||
|
searchForm.value.dataEnd = getSerch().dataEnd
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
function openComment(data) {
|
function openComment(data) {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
commentInfo.value = data.comment
|
commentInfo.value = data.comment
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<!-- <el-button class="reset-button" @click="reset">重置数据</el-button> -->
|
<!-- <el-button class="reset-button" @click="reset">重置数据</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>n
|
</template>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
@@ -211,6 +211,22 @@ const getIpInfo = async () => {
|
|||||||
countryData.value = getCountryName(data.country);
|
countryData.value = getCountryName(data.country);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('请求出错:', error);
|
console.error('请求出错:', error);
|
||||||
|
ElMessageBox.prompt('请输入将要获取国家的中文名', '获取国家失败', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
showClose: false,
|
||||||
|
closeOnClickModal: false,
|
||||||
|
showCancelButton: false,
|
||||||
|
})
|
||||||
|
.then(({ value }) => {
|
||||||
|
countryData.value = value
|
||||||
|
})
|
||||||
|
// .catch(() => {
|
||||||
|
// ElMessage({
|
||||||
|
// type: 'info',
|
||||||
|
// message: 'Input canceled',
|
||||||
|
// })
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<div v-show="activeIndex == 2">
|
<div v-show="activeIndex == 2">
|
||||||
<hostsList v-if="openList" />
|
<hostsList v-if="openList" />
|
||||||
</div>
|
</div>
|
||||||
|
<div style="position: absolute; bottom: 0; right: 0;">{{ version }}</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -21,6 +22,12 @@ import hostsList from '@/views/hosts/hostsList.vue'
|
|||||||
import workbenches from '@/views/hosts/workbenches.vue'
|
import workbenches from '@/views/hosts/workbenches.vue'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { getUser } from '@/utils/storage'
|
import { getUser } from '@/utils/storage'
|
||||||
|
// import { usePythonBridge } from '@/utils/pythonBridge'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let userType = ref(getUser().userType)
|
let userType = ref(getUser().userType)
|
||||||
let activeIndex = ref(userType.value == 3 ? 1 : 2)
|
let activeIndex = ref(userType.value == 3 ? 1 : 2)
|
||||||
@@ -53,6 +60,7 @@ html {
|
|||||||
width: 1600px;
|
width: 1600px;
|
||||||
height: 900px;
|
height: 900px;
|
||||||
background-color: #338F6A;
|
background-color: #338F6A;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user