diff --git a/dist.rar b/dist.rar
deleted file mode 100644
index fc33774..0000000
Binary files a/dist.rar and /dev/null differ
diff --git a/src/components/EChartsComponent.vue b/src/components/EChartsComponent.vue
index bbb09c0..e6e6eb1 100644
--- a/src/components/EChartsComponent.vue
+++ b/src/components/EChartsComponent.vue
@@ -38,6 +38,8 @@ export default {
this.inputTime = this.time
this.getTkhostdetail();
+ console.log(this.time)
+
console.log(this.getPrevious7Days(this.inputTime))
},
diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue
index e7ff715..30f9b77 100644
--- a/src/components/Sidebar.vue
+++ b/src/components/Sidebar.vue
@@ -45,6 +45,8 @@ 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);
diff --git a/src/utils/axios.js b/src/utils/axios.js
index e5ecf4c..3100a5a 100644
--- a/src/utils/axios.js
+++ b/src/utils/axios.js
@@ -6,6 +6,9 @@ import axios from 'axios'
import { getToken, getUser } from '@/utils/storage'
import { useRouter } from 'vue-router';
import { ElMessage } from 'element-plus';
+import { usePythonBridge, } from '@/utils/pythonBridge'
+
+const { stopScript } = usePythonBridge();
const router = useRouter();
@@ -13,8 +16,9 @@ const router = useRouter();
let baseURL = ''
if (process.env.NODE_ENV === 'development') {
// 生产环境
- baseURL = "http://api.tkpage.vvtiktok.cn"
- // baseURL = "http://192.168.0.116:8085/"
+ // baseURL = "http://api.tkpage.vvtiktok.cn"
+ baseURL = "http://120.26.251.180:8085/"
+ // baseURL = "http://192.168.0.113:8085/"
} else {
// 开发环境
baseURL = "http://api.tkpage.vvtiktok.cn"
@@ -90,7 +94,10 @@ export function postAxios({ url, data }) {
reject('网络连接错误')
} else {
- ElMessage.error(err.message);
+ if (err.response.data.message) {
+ ElMessage.error(err.response.data.message);
+ }
+
reject(err.message)
}
@@ -146,6 +153,7 @@ function cheekalive() {
if (res.data) {
} else {
+ stopScript();
alert("账号在其他地方登录!")
window.location.href = '/';
}
diff --git a/src/utils/pythonBridge.js b/src/utils/pythonBridge.js
index b92164f..33ef1ee 100644
--- a/src/utils/pythonBridge.js
+++ b/src/utils/pythonBridge.js
@@ -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);
@@ -112,6 +127,8 @@ export function usePythonBridge() {
givePyAnchorId,
backStageloginStatus,
backStageloginStatusCopy,
- exportToExcel
+ exportToExcel,
+ stopScript,
+ getVersion
};
}
\ No newline at end of file
diff --git a/src/utils/storage.js b/src/utils/storage.js
index 6dc01f9..cc1182a 100644
--- a/src/utils/storage.js
+++ b/src/utils/storage.js
@@ -42,4 +42,13 @@ export function setTkUser(userdata) {
// 用于获取tk账户密码
export function getTkUser() {
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'));
}
\ No newline at end of file
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index c96e19f..1fe0c2b 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -53,12 +53,16 @@
登录
+
+ 版本号:{{ version }}
+
+
@@ -69,6 +73,20 @@ import { useRouter } from 'vue-router';
import { login } from '@/api/account';
import { getToken, setToken, setUser, setUserPass, getUserPass } from '@/utils/storage';
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();
@@ -78,6 +96,7 @@ const formData = ref({
});
+
const onSubmit = () => {
const loading = ElLoading.service({
lock: true,
@@ -88,6 +107,7 @@ const onSubmit = () => {
login({
userId: formData.value.userId,
password: formData.value.password,
+ source: 'app'
}).then((res) => {
loading.close();
console.log(res)
@@ -101,7 +121,7 @@ const onSubmit = () => {
}
} else {
- alert('账号或密码错误');
+ // alert('账号或密码错误');
}
}).catch((err) => {
@@ -141,6 +161,18 @@ const onSubmit = () => {
overflow: hidden;
/* 防止内容溢出 */
+ .version {
+ color: #fff;
+ position: absolute;
+ font-size: 20px;
+ bottom: 20px;
+ left: calc(50% - 50px);
+ // box-sizing: border-box;
+ // width: 1600px;
+
+ }
+
+
.background-video {
position: absolute;
top: 0;
diff --git a/src/views/hosts/hostsList.vue b/src/views/hosts/hostsList.vue
index d861e51..37ab4df 100644
--- a/src/views/hosts/hostsList.vue
+++ b/src/views/hosts/hostsList.vue
@@ -46,7 +46,7 @@
+ :time="scope.row.createDt.split('T')[0].replace(/-/g, '').substring(0, 8)">
+ :time="scope.row.createDt.split('T')[0].replace(/-/g, '').substring(0, 8)">
@@ -138,7 +138,7 @@
-
+
@@ -169,7 +169,7 @@
@@ -185,7 +185,7 @@
// import { getToken, setToken, removeToken } from '@/utils/storage'
import { tkhostdata, dicts, tkhostdetail, downList, getStaffList, managerhosts, upholdinfo, getCountryinfo } from '@/api/account';
import { usePythonBridge, } from '@/utils/pythonBridge'
-import { getUser } from '@/utils/storage'
+import { getUser, setSerch, getSerch } from '@/utils/storage'
import { ref, reactive, onMounted } from 'vue';
import EChartsComponent from '@/components/EChartsComponent.vue';
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -205,7 +205,8 @@ const tableData = ref([])
//选择国家
const searchForm = ref({
country: '',
- time: new Date().toISOString().split('T')[0].replace(/-/g, ''),
+ // time: new Date().toISOString().split('T')[0].replace(/-/g, ''),
+ time: '',
dataType: '',
dataStart: '',
dataEnd: '',
@@ -240,14 +241,17 @@ const isPopoverVisible = reactive({})
let options = ref([])
-onMounted(() => {
- //获取字典
- getdictionary()
- //获取下级员工
- getStaff();
- //获取国家
- getCountry();
+let version = ref('0.0.0');
+onMounted(() => {
+
+ getdictionary()//获取字典
+
+ getStaff(); //获取下级员工
+
+ getCountry(); //获取国家
+
+ getSerchStorage();//获取搜索条件
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) {
console.log(data)
commentInfo.value = data.comment
diff --git a/src/views/hosts/workbenches.vue b/src/views/hosts/workbenches.vue
index 7e18489..f974791 100644
--- a/src/views/hosts/workbenches.vue
+++ b/src/views/hosts/workbenches.vue
@@ -55,7 +55,7 @@
- n
+
@@ -21,6 +22,12 @@ import hostsList from '@/views/hosts/hostsList.vue'
import workbenches from '@/views/hosts/workbenches.vue'
import { ref } from 'vue'
import { getUser } from '@/utils/storage'
+// import { usePythonBridge } from '@/utils/pythonBridge'
+
+
+
+
+
let userType = ref(getUser().userType)
let activeIndex = ref(userType.value == 3 ? 1 : 2)
@@ -53,6 +60,7 @@ html {
width: 1600px;
height: 900px;
background-color: #338F6A;
+ position: relative;
}