测试问题修复

This commit is contained in:
BianLzhaoMin 2025-01-21 16:10:54 +08:00
parent ba8076d5a2
commit 01cdc5581c
7 changed files with 30 additions and 14 deletions

4
env/.env.dev vendored
View File

@ -8,9 +8,9 @@ VITE_API_URL = '/proxyApi'
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭 # VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
# VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅 # VITE_proxyTarget = 'http://192.168.2.246:28080' # 马帅
# VITE_proxyTarget = 'http://192.168.2.122:28080' # 梁超 VITE_proxyTarget = 'http://192.168.2.122:28080' # 梁超
# VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务 # VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务
VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 # VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
# VITE_proxyTarget = 'http://192.168.2.75:28080' # 盛旭 # VITE_proxyTarget = 'http://192.168.2.75:28080' # 盛旭
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)

View File

@ -7,8 +7,11 @@ onMounted(async () => {
console.log(origin.split('ticket=')[1], 'origin') console.log(origin.split('ticket=')[1], 'origin')
if (origin.indexOf('ticket') != -1) { if (origin.indexOf('ticket') != -1) {
console.log('origin.split爱玩送ticket') // console.log('origin.splitticket')
const res = await loginNewApi({ ticket: origin.split('ticket=')[1],sysType:0 }) const res = await loginNewApi({
ticket: origin.split('ticket=')[1].split('#/')[0],
sysType: 0,
})
console.log(res, '登录结果') console.log(res, '登录结果')
} }
}) })

View File

@ -253,7 +253,12 @@ const onJumpUser = () => {
if (host.indexOf('sgwpdm.ah.sgcc.com.cn') > -1) { if (host.indexOf('sgwpdm.ah.sgcc.com.cn') > -1) {
window.open(`${host}/iws/glweb/login?token@${store.token}@`) window.open(`${host}/iws/glweb/login?token@${store.token}@`)
} else { } else {
window.open(`${host}/glweb/?token@${store.token}@`) // window.open(`${host}/glweb/?token@${store.token}@`)
if (import.meta.env.VITE_ENV === 'production') {
window.open(`${host}/glweb/?token@${store.token}@`)
} else {
window.open(`${host}/iws/glweb/?token@${store.token}@`)
}
} }
} else { } else {
router.push({ name: 'my-user' }) router.push({ name: 'my-user' })

View File

@ -367,10 +367,8 @@ const onLeaseDateChange = (value: any, companyIndex: number, goodsIndex: number)
} else { } else {
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0] cardList.value[companyIndex].devInfoVoList[goodsIndex].rentBeginTime = value[0]
cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1] cardList.value[companyIndex].devInfoVoList[goodsIndex].rentEndTime = value[1]
cardList.value[companyIndex].devInfoVoList[goodsIndex].days = moment(value[1]).diff( cardList.value[companyIndex].devInfoVoList[goodsIndex].days =
value[0], moment(value[1]).diff(value[0], 'day') + 1
'day',
)
} }
// cardList.value.forEach((e: any) => { // cardList.value.forEach((e: any) => {

View File

@ -32,7 +32,6 @@
<el-image <el-image
style="width: 100%; height: 98%; margin-top: 1%; cursor: pointer" style="width: 100%; height: 98%; margin-top: 1%; cursor: pointer"
:src="item.fileUrl" :src="item.fileUrl"
fit="cover"
/> />
</div> </div>
</div> </div>
@ -1200,6 +1199,7 @@ onMounted(() => {
display: flex; display: flex;
height: 80%; height: 80%;
justify-content: space-around; justify-content: space-around;
overflow: hidden;
.img-item { .img-item {
// width: calc((100% - 30px) / 4); // width: calc((100% - 30px) / 4);

View File

@ -136,7 +136,12 @@ const sendParams = ref<any>({
// //
const getMessageListData = async () => { const getMessageListData = async () => {
const { data: res }: any = await getMessageListApi() const { data: res }: any = await getMessageListApi()
messageList.value = [...new Set([...messageListAll.value, ...res])] // messageList.value = [...new Set([...messageListAll.value, ...res])]
const uniqueMessages = [
...new Map([...res, ...messageListAll.value].map((item) => [item.uuid, item])).values(),
]
messageList.value = uniqueMessages
} }
const getMessageListAllData = async () => { const getMessageListAllData = async () => {
@ -182,7 +187,7 @@ const onClickMessage = async (item: any) => {
fromCompany: queryDetailsCompanyId.value, fromCompany: queryDetailsCompanyId.value,
}) })
console.log(res, '已读结果--') // console.log(res, '--')
getMessageInfoData(queryDetailsCompanyId.value) getMessageInfoData(queryDetailsCompanyId.value)
@ -200,6 +205,11 @@ const onSendMessage = debounce(async () => {
const res: any = await sendMessageApi(sendParams.value) const res: any = await sendMessageApi(sendParams.value)
if (res.code == 200) { if (res.code == 200) {
sendParams.value.messageContent = '' sendParams.value.messageContent = ''
const result: any = await messageIsReadApi({
toCompany: myCompanyId.value,
fromCompany: queryDetailsCompanyId.value,
})
} }
}, 500) }, 500)
const errorHandler = () => true const errorHandler = () => true
@ -215,7 +225,6 @@ onMounted(() => {
sendParams.value.toCompany = companyId sendParams.value.toCompany = companyId
sendParams.value.toCompanyName = companyName sendParams.value.toCompanyName = companyName
queryDetailsCompanyId.value = companyId queryDetailsCompanyId.value = companyId
getMessageInfoData(queryDetailsCompanyId.value) getMessageInfoData(queryDetailsCompanyId.value)
setTimeout(() => { setTimeout(() => {
@ -228,6 +237,7 @@ onMounted(() => {
setTimeout(() => { setTimeout(() => {
messageListInterval.value = setInterval(() => { messageListInterval.value = setInterval(() => {
getMessageListAllData()
getMessageListData() getMessageListData()
}, 5000) }, 5000)
}, 3000) }, 3000)

View File

@ -329,7 +329,7 @@ const onLeaseDateChange = (value: any, companyIndex: number, goodsIndex: number)
} else { } else {
e.rentBeginTime = value[0] e.rentBeginTime = value[0]
e.rentEndTime = value[1] e.rentEndTime = value[1]
e.days = moment(value[1]).diff(value[0], 'day') e.days = moment(value[1]).diff(value[0], 'day') + 1
} }
}) })
} }