Commit 9d8ff324 authored by 沈翠玲's avatar 沈翠玲

优化

parent 7d8b62df
...@@ -23,9 +23,6 @@ VITE_GLOB_API_URL = ...@@ -23,9 +23,6 @@ VITE_GLOB_API_URL =
# 接口前缀 # 接口前缀
VITE_GLOB_API_URL_PREFIX = /api VITE_GLOB_API_URL_PREFIX = /api
# websocket地址
VITE_APP_SOCKET_URL = ws://8.152.205.9:8080
# 文件上传地址 # 文件上传地址
VITE_GLOB_UPLOAD_URL= VITE_GLOB_UPLOAD_URL=
......
...@@ -13,9 +13,6 @@ VITE_GLOB_API_URL = ...@@ -13,9 +13,6 @@ VITE_GLOB_API_URL =
# 接口前缀 # 接口前缀
VITE_GLOB_API_URL_PREFIX = /api VITE_GLOB_API_URL_PREFIX = /api
# websocket地址
VITE_APP_SOCKET_URL = ws://8.152.205.9:8080
# 图片上传地址 # 图片上传地址
VITE_GLOB_UPLOAD_URL= VITE_GLOB_UPLOAD_URL=
......
...@@ -66,9 +66,22 @@ ...@@ -66,9 +66,22 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
import useSocketStore from '../../../../stores/modules/websocket'; import useSocketStore from '../../../../stores/modules/websocket';
import {useUserStore} from '../../../../stores/modules/user';
const activeName = ref('first'); const activeName = ref('first');
const socketStore = useSocketStore(); const socketStore = useSocketStore();
socketStore.sendMsg({ aa: 44 }); import { getAppEnvConfig } from '@/utils/env';
const envs = getAppEnvConfig();
const { userInfo } = useUserStore();
if(!socketStore.ws && userInfo.id) {
let url = `ws://8.152.205.9:8080/websocket/${userInfo.id}`;
console.log('url', url)
socketStore.connection(url);
}
if (socketStore.ws){
socketStore.sendMsg({ aa: 44 });
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -25,7 +25,6 @@ export function getAppEnvConfig() { ...@@ -25,7 +25,6 @@ export function getAppEnvConfig() {
VITE_GLOB_API_URL, VITE_GLOB_API_URL,
VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX, VITE_GLOB_API_URL_PREFIX,
VITE_APP_SOCKET_URL,
VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_URL,
VITE_GLOB_FILE_URL, VITE_GLOB_FILE_URL,
VITE_USE_MOCK, VITE_USE_MOCK,
...@@ -43,7 +42,6 @@ export function getAppEnvConfig() { ...@@ -43,7 +42,6 @@ export function getAppEnvConfig() {
VITE_GLOB_API_URL, VITE_GLOB_API_URL,
VITE_GLOB_APP_SHORT_NAME, VITE_GLOB_APP_SHORT_NAME,
VITE_GLOB_API_URL_PREFIX, VITE_GLOB_API_URL_PREFIX,
VITE_APP_SOCKET_URL,
VITE_GLOB_UPLOAD_URL, VITE_GLOB_UPLOAD_URL,
VITE_GLOB_FILE_URL, VITE_GLOB_FILE_URL,
VITE_USE_MOCK, VITE_USE_MOCK,
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
field: 'borrower.name', field: 'borrower.name',
title: '借款人名字', title: '借款人名字',
search: { el: 'input', key: 'borrower' }, search: { el: 'input', key: 'borrower' },
width: 80, width: 90,
}, },
{ {
field: 'totalRepayAmount', field: 'totalRepayAmount',
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
field: 'borrower.name', field: 'borrower.name',
title: '借款人名字', title: '借款人名字',
search: { el: 'input', key: 'borrower' }, search: { el: 'input', key: 'borrower' },
width: 80, width: 90,
}, },
{ {
field: 'reduceAmount', field: 'reduceAmount',
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
field: 'borrower.name', field: 'borrower.name',
title: '借款人名字', title: '借款人名字',
search: { el: 'input', key: 'borrower' }, search: { el: 'input', key: 'borrower' },
width: 80, width: 90,
}, },
{ {
field: 'id', field: 'id',
......
...@@ -146,9 +146,8 @@ ...@@ -146,9 +146,8 @@
const { result: userInfo } = await getUserInfo(); const { result: userInfo } = await getUserInfo();
userStore.setUserInfo(userInfo); userStore.setUserInfo(userInfo);
let url = `${envs.VITE_APP_SOCKET_URL}/websocket/${userInfo.id}`; let url = `ws://8.152.205.9:8080/websocket/${userInfo.id}`;
console.log('url', url, userInfo); socketStore.connection(url);
socketStore.connection(url, result);
// 如果有多个租户,需要选择租户进入系统 // 如果有多个租户,需要选择租户进入系统
if (userInfo.tenants.length > 1) { if (userInfo.tenants.length > 1) {
tenantRef.value.openModal(); tenantRef.value.openModal();
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
{ label: '已还款', value: 'Repaired' }, { label: '已还款', value: 'Repaired' },
{ label: '代履行还款', value: 'repayment_others' }, { label: '代履行还款', value: 'repayment_others' },
]; ];
const creditStatusOpt = [ const caseStatusOpt = [
{ label: '正常', value: 'normal' }, { label: '正常', value: 'normal' },
{ label: '撤案', value: 'withdraw' }, { label: '撤案', value: 'withdraw' },
{ label: '留案', value: 'stay' }, { label: '留案', value: 'stay' },
...@@ -215,18 +215,18 @@ ...@@ -215,18 +215,18 @@
}, },
}, },
{ {
field: 'creditStatus', field: 'caseStatus',
title: '案件状态', title: '案件状态',
width: 80, width: 80,
enum: creditStatusOpt, enum: caseStatusOpt,
search: { el: 'select', props: { filterable: true }, span: 1 }, search: { el: 'select', props: { filterable: true }, span: 1 },
fieldNames: { label: 'label', value: 'value' }, fieldNames: { label: 'label', value: 'value' },
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.creditStatus {row.caseStatus
? creditStatusOpt.find((v) => v.value === row.creditStatus).label ? caseStatusOpt.find((v) => v.value === row.caseStatus).label
: ''} : ''}
</> </>
); );
......
<template> <template>
<div class="table-box importwrapper"> <div class="table-box">
<div class="card flex mb-2"> <div class="card flex mb-2">
<div class="flex-1 pr-3"> <div class="flex-1 pr-3">
<div class="mb-1">1、上传文件</div> <div class="mb-1">1、上传文件</div>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
> >
</div> </div>
</div> </div>
<div class="flex-1"> <div class="flex-1 importwrapper">
<div class="mb-1 text-center">3、上传数据</div> <div class="mb-1 text-center">3、上传数据</div>
<div class="pr-4"> <div class="pr-4">
<el-form ref="formRef" inline :model="form" :rules="rules" label-width="85px"> <el-form ref="formRef" inline :model="form" :rules="rules" label-width="85px">
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
if (res.success) { if (res.success) {
checkObj.result.success = res.result.success; checkObj.result.success = res.result.success;
checkObj.result.error = res.result.error; checkObj.result.error = res.result.error;
if (checkObj.result.error.length === 0) { if (checkObj.result.error === 0) {
checkObj.checksuccess = true; checkObj.checksuccess = true;
} }
checkObj.result.loanErrors = res.result.loanErrors; checkObj.result.loanErrors = res.result.loanErrors;
...@@ -290,6 +290,10 @@ ...@@ -290,6 +290,10 @@
uploadRef.value.clearFiles(); uploadRef.value.clearFiles();
form.path = ''; form.path = '';
query(); query();
form['path'] = ''
form['code'] = ''
form['contractNo'] = ''
form['discount'] = ''
}); });
}; };
onMounted(() => { onMounted(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment