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

优化

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