提交 f80d52cf 作者: Hao

add

父级 4e581bb4
NODE_ENV=development NODE_ENV=development
VITE_USER_APP_API_URL=192.168.31.135 VITE_USER_APP_API_URL=192.168.31.112
\ No newline at end of file \ No newline at end of file
NODE_ENV=production NODE_ENV=production
VITE_USER_APP_API_URL=192.168.31.101 VITE_USER_APP_API_URL=192.168.31.112
\ No newline at end of file \ No newline at end of file
...@@ -99,7 +99,6 @@ export const upLoadHander = async (obj: any) => { ...@@ -99,7 +99,6 @@ export const upLoadHander = async (obj: any) => {
uploadMixin.uploadMixinType = result.uploadType; uploadMixin.uploadMixinType = result.uploadType;
staticDomain = result.staticDomain || "https://cdn.tikcos.cn"; staticDomain = result.staticDomain || "https://cdn.tikcos.cn";
if (uploadMixin.uploadMixinType === "txcos") { if (uploadMixin.uploadMixinType === "txcos") {
console.log(result.response, " result.response");
const ress = res.result.response; const ress = res.result.response;
const credentials = ress.credentials; const credentials = ress.credentials;
uploadMixin.uploadMixinCredentials = { uploadMixin.uploadMixinCredentials = {
...@@ -109,11 +108,6 @@ export const upLoadHander = async (obj: any) => { ...@@ -109,11 +108,6 @@ export const upLoadHander = async (obj: any) => {
StartTime: ress?.startTime, StartTime: ress?.startTime,
ExpiredTime: ress?.expiredTime, ExpiredTime: ress?.expiredTime,
}; };
console.log(result, "result");
console.log(
uploadMixin.uploadMixinCredentials,
" uploadMixin.uploadMixinCredentials"
);
} }
} else { } else {
resResult = false; resResult = false;
...@@ -123,10 +117,7 @@ export const upLoadHander = async (obj: any) => { ...@@ -123,10 +117,7 @@ export const upLoadHander = async (obj: any) => {
if (resResult) { if (resResult) {
const query = {}; const query = {};
// const res: any = await getUploadConfigInfo(query); // const res: any = await getUploadConfigInfo(query);
console.log(
uploadMixin.uploadMixinCredentials,
" console.log(uploadMixin.uploadMixinCredentials)"
);
const result: any = uploadMixin.upLoadMixinResult; const result: any = uploadMixin.upLoadMixinResult;
if (uploadMixin.uploadMixinType === "txcos") { if (uploadMixin.uploadMixinType === "txcos") {
//走对象存储 //走对象存储
...@@ -147,17 +138,10 @@ export const upLoadHander = async (obj: any) => { ...@@ -147,17 +138,10 @@ export const upLoadHander = async (obj: any) => {
Key: uploadMixin.uploadMixinPath + tempFolder + folder, Key: uploadMixin.uploadMixinPath + tempFolder + folder,
Body: fileInfo.file, Body: fileInfo.file,
onProgress: function (progressData) { onProgress: function (progressData) {
console.log(progressData, "ada");
obj.onProgress(progressData); obj.onProgress(progressData);
}, },
}, },
(err, data) => { (err, data) => {
console.log(err, data, "打印一下");
console.log({ success: true });
console.log(
`${staticDomain}/${uploadMixin.uploadMixinPath}${tempFolder}${folder}`,
"打印一下,数据"
);
if (!err && data.statusCode === 200) { if (!err && data.statusCode === 200) {
const imgurl = `${staticDomain}/${uploadMixin.uploadMixinPath}${tempFolder}${folder}`; const imgurl = `${staticDomain}/${uploadMixin.uploadMixinPath}${tempFolder}${folder}`;
...@@ -178,7 +162,8 @@ export const upLoadHander = async (obj: any) => { ...@@ -178,7 +162,8 @@ export const upLoadHander = async (obj: any) => {
let formData = new FormData(); let formData = new FormData();
formData.append("biz", fileInfo.biz); formData.append("biz", fileInfo.biz);
formData.append("file", newFile); formData.append("file", newFile);
const uploadRes = await axios.post(`http://${VUE_APP_API_URL}:8080/sys/common/upload`, const uploadRes = await axios.post(
`http://${VUE_APP_API_URL}:8080/sys/common/upload`,
formData, formData,
{ {
headers: { ...obj.headers }, headers: { ...obj.headers },
...@@ -193,6 +178,7 @@ export const upLoadHander = async (obj: any) => { ...@@ -193,6 +178,7 @@ export const upLoadHander = async (obj: any) => {
url = uploadRes.message.replaceAll("//", "/"); url = uploadRes.message.replaceAll("//", "/");
const pre = url.startsWith("/") ? "" : "/"; const pre = url.startsWith("/") ? "" : "/";
url = `http://${VUE_APP_API_URL}/sys/common/static` + pre + url; url = `http://${VUE_APP_API_URL}/sys/common/static` + pre + url;
console.log(url, "图片上传失败");
obj.onSuccess({ success: true, message: url }); obj.onSuccess({ success: true, message: url });
} else { } else {
obj.onError({ obj.onError({
......
export type appType = {
sidebar:{
opened:boolean;
withoutAnimation: boolean;
isClickCollapse: boolean;
}
}
export type setType ={
path:string,
name:string,
query?:object
}
\ No newline at end of file
...@@ -32,7 +32,9 @@ export const useUserStore = defineStore("user", { ...@@ -32,7 +32,9 @@ export const useUserStore = defineStore("user", {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const query = { const query = {
code: this.userInfo.username, code: this.userInfo.username,
name:res.nickame
}; };
console.log(query)
getUserList(query).then(({ success, result, message }: any) => { getUserList(query).then(({ success, result, message }: any) => {
if (success) { if (success) {
this.userList = result.map((item: any) => { this.userList = result.map((item: any) => {
......
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
<el-container> <el-container>
<el-aside width="280px" class="el-aside-left"> <el-aside width="280px" class="el-aside-left">
<el-header class="el-header-left"> <el-header class="el-header-left">
<el-input placeholder="搜索" /> <el-input placeholder="搜索" v-model="queryParams.nickame" @input="handleInput" />
</el-header> </el-header>
<div <div
active-text-color="#000" active-text-color="#000"
background-co background-color="#fff"
lor="#fff"
class="el-menu-item-box" class="el-menu-item-box"
> >
<div <div
...@@ -16,7 +15,7 @@ ...@@ -16,7 +15,7 @@
:class="getMenuItem(item)" :class="getMenuItem(item)"
:index="item?.id" :index="item?.id"
:key="item?.id" :key="item?.id"
v-for="item in list" v-for="(item, index) in list"
@click="handleMenuClick(item)" @click="handleMenuClick(item)"
> >
<div class="user-info-box"> <div class="user-info-box">
...@@ -331,7 +330,6 @@ import { InquiryAdd, checkMesssages } from '../axios/model/user' ...@@ -331,7 +330,6 @@ import { InquiryAdd, checkMesssages } from '../axios/model/user'
import useMenu from '@/components/Menu/RightClickMenu' import useMenu from '@/components/Menu/RightClickMenu'
import ShopList from '@/components/ShopList.vue' import ShopList from '@/components/ShopList.vue'
let { showContextMenu } = useMenu() let { showContextMenu } = useMenu()
console.log(useMenu(), 'useMenu')
const ruleForm = ref({}) const ruleForm = ref({})
const ruleFormRef = ref<FormInstance>() const ruleFormRef = ref<FormInstance>()
const shopListRef = ref(null) const shopListRef = ref(null)
...@@ -340,7 +338,6 @@ const getUseUserStore = useUserStore() ...@@ -340,7 +338,6 @@ const getUseUserStore = useUserStore()
const list = ref([]) const list = ref([])
const automaticPromptRef = ref('') const automaticPromptRef = ref('')
const inquiryInfo = ref([]) const inquiryInfo = ref([])
console.log(shopListRef)
const rules = reactive({ const rules = reactive({
customerName: [ customerName: [
{ {
...@@ -391,20 +388,27 @@ let currentInfo = ref({ ...@@ -391,20 +388,27 @@ let currentInfo = ref({
messages: [], messages: [],
username: '', username: '',
}) })
let queryParams = ref({})
const connectMsg = () => { const connectMsg = () => {
const useUser = useUserStore() // const useUser = useUserStore()
const toIp = `ws://${ const toIp = `ws://${
import.meta.env.VITE_USER_APP_API_URL import.meta.env.VITE_USER_APP_API_URL
}:8081?type=kf&code=${getUseUserStore.userInfo?.username}` }:8081?type=kf&code=${getUseUserStore.userInfo?.username}`
useUser.connect() getUseUserStore.connect()
initWebSocket(toIp) initWebSocket(toIp)
useUser.setUserListMessages({}).then((res: any) => { getUserList()
list.value = useUser.userList
})
} }
onMounted(() => { onMounted(() => {
connectMsg() connectMsg()
}) })
const getUserList = (queryParams:any) => {
getUseUserStore.setUserListMessages(queryParams).then((res: any) => {
list.value = getUseUserStore.userList
})
}
const handleInput = () => {
getUserList(queryParams)
}
//设置message //设置message
const isSelf = computed(() => { const isSelf = computed(() => {
return (e: any) => { return (e: any) => {
...@@ -537,6 +541,7 @@ const handleDelete = (item, index) => { ...@@ -537,6 +541,7 @@ const handleDelete = (item, index) => {
//提交询价单 //提交询价单
const sumbitFuleForm = (formEl: FormInstance | undefined) => { const sumbitFuleForm = (formEl: FormInstance | undefined) => {
console.log('sumbitFuleForm', formEl)
if (!formEl) return if (!formEl) return
formEl.validate(async (valid: boolean) => { formEl.validate(async (valid: boolean) => {
if (valid) { if (valid) {
...@@ -602,7 +607,6 @@ const selectionChange = (arr: any) => { ...@@ -602,7 +607,6 @@ const selectionChange = (arr: any) => {
item.count = 1 item.count = 1
return item return item
}) })
console.log(inquiryInfo.value)
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -958,6 +962,9 @@ const selectionChange = (arr: any) => { ...@@ -958,6 +962,9 @@ const selectionChange = (arr: any) => {
.el-input__wrapper { .el-input__wrapper {
width: 48px; width: 48px;
} }
.query{
}
.avatar-input-box { .avatar-input-box {
:deep(.el-input-number__increase), :deep(.el-input-number__increase),
:deep(.el-input-number__decrease) { :deep(.el-input-number__decrease) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论