This commit is contained in:
许允枞 2025-03-20 11:24:36 +08:00
parent a915f54d41
commit 46664b5b7f
5 changed files with 42 additions and 21 deletions

View File

@ -5,9 +5,13 @@ ENV = 'development'
VUE_APP_TITLE = "车联通"后台管理系统
# 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://localhost:48080'
# VUE_APP_BASE_API = 'http://localhost:48080'
VUE_APP_BASE_API = 'http://122.51.230.86:48080'
# 附件请求地址前缀
# VUE_APP_FILE_API = 'https://www.nuoyunr.com/minio/'
VUE_APP_FILE_API = 'http://122.51.230.86:9000/'
VUE_APP_PREVIEW_URL = 'https://www.nuoyunr.com/minio/'
VUE_APP_IMAGE_URL = 'http://122.51.230.86:9000'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -5,12 +5,15 @@ NODE_ENV = 'production'
VUE_APP_TITLE = "车联通"后台管理系统
# 芋道管理系统/生产环境
VUE_APP_BASE_API = 'https://www.nuoyunr.com'
# VUE_APP_BASE_API = 'https://www.nuoyunr.com'
VUE_APP_BASE_API = 'http://122.51.230.86:48080'
# 根据服务器或域名修改
PUBLIC_PATH = 'http://159.75.168.143:82'
# 附件请求地址前缀
VUE_APP_FILE_API = 'https://www.nuoyunr.com/minio/'
# VUE_APP_FILE_API = 'https://www.nuoyunr.com/minio/'
VUE_APP_FILE_API = 'http://122.51.230.86:9000/'
VUE_APP_PREVIEW_URL = 'https://www.nuoyunr.com/minio/'
# 二级部署路径
VUE_APP_APP_NAME ='yudao-admin'

View File

@ -147,3 +147,11 @@ export function reqCheck(data) {
export class socialBindLogin {
}
export function getUserTenant(data) {
return request({
url: '/system/auth/getTenant',
method: 'post',
data: data
})
}

View File

@ -109,7 +109,7 @@
</template>
<script>
import {sendSmsCode, socialAuthRedirect} from "@/api/login";
import {getUserTenant, sendSmsCode, socialAuthRedirect} from "@/api/login";
import {getTenantIdByWebsite,getTenantIdByName} from "@/api/system/tenant";
import {SystemUserSocialTypeEnum} from "@/utils/constants";
import {getCaptchaEnable, getTenantEnable} from "@/utils/ruoyi";
@ -243,7 +243,8 @@ export default {
};
},
handleLogin(captchaParams) {
this.$refs.loginForm.validate(valid => {
this.$refs.loginForm.validate(async valid => {
console.log("登录", this.loginForm)
if (valid) {
this.loading = true;
// Cookie
@ -259,6 +260,11 @@ export default {
removeTenantName()
}
this.loginForm.captchaVerification = captchaParams.captchaVerification
//
// await getUserTenant(this.loginForm).then(res => {
// console.log('', res)
// setTenantId(res.data.tenant_id)
// });
//
// console.log("", this.loginForm);
this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {

View File

@ -262,6 +262,7 @@ export default {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/uploadDetail",
imageUrl: process.env.VUE_APP_FILE_API,
previewUrl: process.env.VUE_APP_PREVIEW_URL,
//
loading: true,
//
@ -372,7 +373,8 @@ export default {
},
//
preview(item) {
this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' + this.imageUrl + item.filePath
console.log('预览文件地址', this.previewUrl)
this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' + this.previewUrl + item.filePath
// this.fileUrl = 'https://view.xdocin.com/view?src=' + this.imageUrl + item.filePath
console.log(this.fileUrl)
this.$nextTick(() => {
@ -617,21 +619,19 @@ export default {
submitBatchForm() {
console.log(this.form, '内容')
console.log(this.fileList, '文件')
this.$refs["formBatch"].validate(valid => {
this.fileList.forEach(item => {
item.fatherId = this.fatherId
item.type = '2'
item.fileName = this.getFileNameWithoutExtension(item.name)
item.filePath = item.url
item.warnTime = this.form.warnTime
})
addBatchInspectionFile(this.fileList).then(res => {
this.$modal.msgSuccess("新增成功");
this.openBatch = false
this.resetBatch()
this.getList();
})
});
this.fileList.forEach(item => {
item.fatherId = this.fatherId
item.type = '2'
item.fileName = this.getFileNameWithoutExtension(item.name)
item.filePath = item.url
item.warnTime = this.form.warnTime
})
addBatchInspectionFile(this.fileList).then(res => {
this.$modal.msgSuccess("新增成功");
this.openBatch = false
this.resetBatch()
this.getList();
})
},
/** 分配文件权限给对应用户 */
saveStaff() {