Compare commits
6 Commits
main
...
28214cade5
| Author | SHA1 | Date | |
|---|---|---|---|
| 28214cade5 | |||
| bf81c37459 | |||
| 22a49b1d65 | |||
| e522bf59a6 | |||
| 04e69632f9 | |||
| f8c38c5936 |
2
.env.dev
2
.env.dev
@@ -4,7 +4,7 @@ VITE_NODE_ENV=development
|
|||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径 注:/api 正常不需要 当前是访问演示环境nginx转发用
|
# 请求路径 注:/api 正常不需要 当前是访问演示环境nginx转发用
|
||||||
VITE_BASE_URL='http://10.28.117.100'
|
VITE_BASE_URL='https://demo.jeelowcode.com/api'
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||||
VITE_UPLOAD_TYPE=server
|
VITE_UPLOAD_TYPE=server
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<ConfigGlobal :size="currentSize">
|
<ConfigGlobal :size="currentSize">
|
||||||
<div class="h-100% w-100%" :class="greyMode ? `${prefixCls}-grey-mode` : ''">
|
<div class="h-100% w-100%" style="overflow-y: auto;" :class="greyMode ? `${prefixCls}-grey-mode` : ''">
|
||||||
<RouterView />
|
<RouterView />
|
||||||
</div>
|
</div>
|
||||||
<routerSearch />
|
<routerSearch />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
import { encryptAES } from '@/components/LowDesign/src/utils/aes'
|
||||||
|
import download from '@/utils/download'
|
||||||
|
|
||||||
//获取表单开发列表
|
//获取表单开发列表
|
||||||
export const getDbList = (data) => {
|
export const getDbList = (data) => {
|
||||||
@@ -158,6 +159,11 @@ export const exportExcelData = (tableId, data) => {
|
|||||||
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
return request.download({ url: `/jeelowcode/excel/exportExcel/${tableId}`, method: 'POST', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//导出Excel表数据
|
||||||
|
export const exportExcelDataCustom = (explain,tableId, data) => {
|
||||||
|
return request.download({ url: `/jeelowcode/excel/exportExcelCustom/${tableId}`, method: 'POST', data }).then((data) => download.excel(data, explain, 'xlsx'))
|
||||||
|
}
|
||||||
|
|
||||||
//下载导入模板
|
//下载导入模板
|
||||||
export const downloadImportTemplate = (tableId) => {
|
export const downloadImportTemplate = (tableId) => {
|
||||||
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
return request.download({ url: `/jeelowcode/excel/exportExcelTemplate/${tableId}` })
|
||||||
|
|||||||
@@ -18,6 +18,18 @@
|
|||||||
v-bind="userVBind"
|
v-bind="userVBind"
|
||||||
class="w-100%"
|
class="w-100%"
|
||||||
></userSelect>
|
></userSelect>
|
||||||
|
</span>
|
||||||
|
<span prop="delegateDictId" style="display:none">
|
||||||
|
|
||||||
|
<DicTableSelect
|
||||||
|
id="costomDictSelect"
|
||||||
|
:column="distSelectColumn"
|
||||||
|
size="default"
|
||||||
|
type="add"
|
||||||
|
prop="fields_7897245"
|
||||||
|
:scope="dictSelectScope"
|
||||||
|
@set-form-data="handleSetFormData"
|
||||||
|
></DicTableSelect>
|
||||||
</span>
|
</span>
|
||||||
<!-- 顶部统计 -->
|
<!-- 顶部统计 -->
|
||||||
<div
|
<div
|
||||||
@@ -383,12 +395,108 @@ interface Props {
|
|||||||
dicRowKey?: string //dicTable模式 行数据的 Key
|
dicRowKey?: string //dicTable模式 行数据的 Key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dictSelectScope = {
|
||||||
|
"key": 0,
|
||||||
|
"value": "",
|
||||||
|
"column": {
|
||||||
|
"type": "dicTableSelect",
|
||||||
|
"controlType": "select",
|
||||||
|
"label": "表格选择框",
|
||||||
|
"fixedSearch":{
|
||||||
|
"approveStatusName":"已审批"
|
||||||
|
},
|
||||||
|
"separator": " | ",
|
||||||
|
"multiple": true,
|
||||||
|
"display": true,
|
||||||
|
"span": 12,
|
||||||
|
"disabled": false,
|
||||||
|
"required": false,
|
||||||
|
"hideLabel": false,
|
||||||
|
"i18nCode": "fields_7897245",
|
||||||
|
"dictTable": "1959187451673116674",
|
||||||
|
"dictCode": "id",
|
||||||
|
"dictText": "personName",
|
||||||
|
"dictTableColumn": [
|
||||||
|
"personName",
|
||||||
|
"personAge",
|
||||||
|
"personSex",
|
||||||
|
"mobile",
|
||||||
|
"approveStatusName"
|
||||||
|
],
|
||||||
|
"prop": "fields_7897245",
|
||||||
|
"dataType": "string",
|
||||||
|
"className": "control-dicTableSelect control-fields_7897245 ",
|
||||||
|
"props": {
|
||||||
|
"lable": "personName",
|
||||||
|
"value": "id"
|
||||||
|
},
|
||||||
|
"rules": [
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"size": "default",
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
|
||||||
|
const distSelectColumn = {
|
||||||
|
"type": "dicTableSelect",
|
||||||
|
"controlType": "select",
|
||||||
|
"multiple": true,
|
||||||
|
"label": "表格选择框",
|
||||||
|
"separator": " | ",
|
||||||
|
"display": true,
|
||||||
|
"span": 12,
|
||||||
|
"disabled": false,
|
||||||
|
"fixedSearch":{
|
||||||
|
"approveStatusName":"已审批"
|
||||||
|
},
|
||||||
|
"required": false,
|
||||||
|
"hideLabel": false,
|
||||||
|
"i18nCode": "fields_7897245",
|
||||||
|
"dictTable": "1959187451673116674",
|
||||||
|
"dictCode": "id",
|
||||||
|
"dictText": "personName",
|
||||||
|
"dictTableColumn": [
|
||||||
|
"personName",
|
||||||
|
"personAge",
|
||||||
|
"personSex",
|
||||||
|
"mobile",
|
||||||
|
"approveStatusName"
|
||||||
|
]
|
||||||
|
,
|
||||||
|
"prop": "fields_7897245",
|
||||||
|
"dataType": "string",
|
||||||
|
"className": "control-dicTableSelect control-fields_7897245 ",
|
||||||
|
"props": {
|
||||||
|
"lable": "personName",
|
||||||
|
"value": "id"
|
||||||
|
},
|
||||||
|
"rules": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
model: 'default',
|
model: 'default',
|
||||||
fixedSearch: () => {
|
fixedSearch: () => {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const handleSetFormData = (key, val) => {
|
||||||
|
console.log(key);
|
||||||
|
console.log(val);
|
||||||
|
// 在这里添加其他处理逻辑
|
||||||
|
useFun.requestApi('get', '/jeelowcode/outsidePerson/importOutside?tableId='+props.tableId+'&ids=' + val, {
|
||||||
|
}).then(res => {
|
||||||
|
if (res.length > 0) {
|
||||||
|
message.success('下发成功')
|
||||||
|
useFun.refreshChange()
|
||||||
|
} else {
|
||||||
|
message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
const userVBind = {
|
const userVBind = {
|
||||||
prop: 'delegateUserId',
|
prop: 'delegateUserId',
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="dic-table-select-box w-100%">
|
<div class="dic-table-select-box w-100%">
|
||||||
|
{{ JSON.stringify(props) }}
|
||||||
<div
|
<div
|
||||||
class="table-input pos-relative"
|
class="table-input pos-relative"
|
||||||
:class="[{ disabled }, type, size]"
|
:class="[{ disabled }, type, size]"
|
||||||
@@ -273,9 +274,9 @@ const getCurrTableSelect = (type?) => {
|
|||||||
const dicObj = {}
|
const dicObj = {}
|
||||||
const textList: string[] = []
|
const textList: string[] = []
|
||||||
const ids = tableRef.value.tableSelect.map((item) => {
|
const ids = tableRef.value.tableSelect.map((item) => {
|
||||||
if (item[props.column.dictText]) {
|
if (item[props.column.dictCode]) {
|
||||||
dicObj[item[dicCode.value]] = item[props.column.dictText]
|
dicObj[item[dicCode.value]] = item[props.column.dictCode]
|
||||||
textList.push(item[props.column.dictText])
|
textList.push(item[props.column.dictCode])
|
||||||
}
|
}
|
||||||
return item[dicCode.value]
|
return item[dicCode.value]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { encryptAES, decryptAES } from '@/components/LowDesign/src/utils/aes'
|
|||||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
import router from '@/router/index'
|
import router from '@/router/index'
|
||||||
|
import {exportExcelDataCustom} from '@/api/design/table'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ export default {
|
|||||||
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
* @param options 请求配置 如:{ params:{ text:'测试' } }
|
||||||
*/
|
*/
|
||||||
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
requestApi: (Method, url, options) => callApiFun(Method, url, options),
|
||||||
|
exportExcelCustom: (tableId, data) => exportExcelDataCustom(tableId, data),
|
||||||
cloneDeep, //深拷贝
|
cloneDeep, //深拷贝
|
||||||
listToTree,//列表转树结构
|
listToTree,//列表转树结构
|
||||||
formatDate,//时间格式化
|
formatDate,//时间格式化
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ const canvasClick = (e) => {
|
|||||||
token: backToken.value
|
token: backToken.value
|
||||||
}
|
}
|
||||||
reqCheck(data).then((res) => {
|
reqCheck(data).then((res) => {
|
||||||
if (res?.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
barAreaColor.value = '#4cae4c'
|
barAreaColor.value = '#4cae4c'
|
||||||
barAreaBorderColor.value = '#5cb85c'
|
barAreaBorderColor.value = '#5cb85c'
|
||||||
text.value = t('captcha.success')
|
text.value = t('captcha.success')
|
||||||
@@ -228,14 +228,14 @@ const getPictrue = async () => {
|
|||||||
captchaType: captchaType.value
|
captchaType: captchaType.value
|
||||||
}
|
}
|
||||||
const res = await getCode(data)
|
const res = await getCode(data)
|
||||||
if (res?.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
pointBackImgBase.value = res?.repData?.originalImageBase64
|
pointBackImgBase.value = res.repData.originalImageBase64
|
||||||
backToken.value = res?.repData?.token
|
backToken.value = res.repData.token
|
||||||
secretKey.value = res?.repData?.secretKey
|
secretKey.value = res.repData.secretKey
|
||||||
poinTextList.value = res?.repData?.wordList || []
|
poinTextList.value = res.repData.wordList
|
||||||
text.value = t('captcha.point') + '【' + poinTextList.value?.join(',') + '】'
|
text.value = t('captcha.point') + '【' + poinTextList.value.join(',') + '】'
|
||||||
} else {
|
} else {
|
||||||
text.value = res?.repMsg
|
text.value = res.repMsg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//坐标转换函数
|
//坐标转换函数
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ const end = () => {
|
|||||||
token: backToken.value
|
token: backToken.value
|
||||||
}
|
}
|
||||||
reqCheck(data).then((res) => {
|
reqCheck(data).then((res) => {
|
||||||
if (res?.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
moveBlockBackgroundColor.value = '#5cb85c'
|
moveBlockBackgroundColor.value = '#5cb85c'
|
||||||
leftBarBorderColor.value = '#5cb85c'
|
leftBarBorderColor.value = '#5cb85c'
|
||||||
iconColor.value = '#fff'
|
iconColor.value = '#fff'
|
||||||
@@ -364,13 +364,13 @@ const getPictrue = async () => {
|
|||||||
captchaType: captchaType.value
|
captchaType: captchaType.value
|
||||||
}
|
}
|
||||||
const res = await getCode(data)
|
const res = await getCode(data)
|
||||||
if (res?.repCode == '0000') {
|
if (res.repCode == '0000') {
|
||||||
backImgBase.value = res?.repData?.originalImageBase64
|
backImgBase.value = res.repData.originalImageBase64
|
||||||
blockBackImgBase.value = res?.repData?.jigsawImageBase64
|
blockBackImgBase.value = res.repData.jigsawImageBase64
|
||||||
backToken.value = res?.repData?.token
|
backToken.value = res.repData.token
|
||||||
secretKey.value = res?.repData?.secretKey
|
secretKey.value = res.repData.secretKey
|
||||||
} else {
|
} else {
|
||||||
tipWords.value = res?.repMsg
|
tipWords.value = res.repMsg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,31 +1,56 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form v-show="getShow" ref="formLogin" :model="loginData.loginForm" :rules="LoginRules"
|
<el-form
|
||||||
class="login-form login-form-default" label-position="top" label-width="120px" size="large">
|
v-show="getShow"
|
||||||
|
ref="formLogin"
|
||||||
|
:model="loginData.loginForm"
|
||||||
|
:rules="LoginRules"
|
||||||
|
class="login-form login-form-default"
|
||||||
|
label-position="top"
|
||||||
|
label-width="120px"
|
||||||
|
size="large"
|
||||||
|
>
|
||||||
<el-row style="margin-right: -10px; margin-left: -10px">
|
<el-row style="margin-right: -10px; margin-left: -10px">
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<LoginFormTitle style="width: 100%" />
|
<LoginFormTitle style="width: 100%"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
|
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
|
||||||
<el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')"
|
<el-input
|
||||||
:prefix-icon="iconHouse" link type="primary" />
|
v-model="loginData.loginForm.tenantName"
|
||||||
|
:placeholder="t('login.tenantNamePlaceholder')"
|
||||||
|
:prefix-icon="iconHouse"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginData.loginForm.username" :placeholder="t('login.usernamePlaceholder')"
|
<el-input
|
||||||
:prefix-icon="iconAvatar" />
|
v-model="loginData.loginForm.username"
|
||||||
|
:placeholder="t('login.usernamePlaceholder')"
|
||||||
|
:prefix-icon="iconAvatar"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input v-model="loginData.loginForm.password" :placeholder="t('login.passwordPlaceholder')"
|
<el-input
|
||||||
:prefix-icon="iconLock" show-password type="password" @keyup.enter="getCode()" />
|
v-model="loginData.loginForm.password"
|
||||||
|
:placeholder="t('login.passwordPlaceholder')"
|
||||||
|
:prefix-icon="iconLock"
|
||||||
|
show-password
|
||||||
|
type="password"
|
||||||
|
@keyup.enter="getCode()"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px; margin-top: -20px; margin-bottom: -20px">
|
<el-col
|
||||||
|
:span="24"
|
||||||
|
style="padding-right: 10px; padding-left: 10px; margin-top: -20px; margin-bottom: -20px"
|
||||||
|
>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-row justify="space-between" style="width: 100%">
|
<el-row justify="space-between" style="width: 100%">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -41,21 +66,26 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" class="login-btn-col">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" class="login-btn-col">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<XButton :loading="loginLoading" :title="t('login.login')" class="w-[100%]" type="primary"
|
<XButton
|
||||||
@click="getCode()" />
|
:loading="loginLoading"
|
||||||
|
:title="t('login.login')"
|
||||||
|
class="w-[100%]"
|
||||||
|
type="primary"
|
||||||
|
@click="getCode()"
|
||||||
|
/>
|
||||||
<div v-if="loginType == 'easy'" class="w-100% mt-6px flex justify-end">
|
<div v-if="loginType == 'easy'" class="w-100% mt-6px flex justify-end">
|
||||||
<el-dropdown @command="easyCommand">
|
<el-dropdown @command="easyCommand">
|
||||||
<div class="mt--2px cursor-pointer">
|
<div class="mt--2px cursor-pointer">
|
||||||
<el-text type="primary">
|
<el-text type="primary">
|
||||||
<span class="text-14px">{{ t('login.otherLogin') }}</span>
|
<span class="text-14px">{{ t('login.otherLogin') }}</span>
|
||||||
<Icon :size="16" icon="iconamoon:arrow-down-2-light" />
|
<Icon :size="16" icon="iconamoon:arrow-down-2-light"/>
|
||||||
</el-text>
|
</el-text>
|
||||||
</div>
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<template v-for="item in easyDropdownList" :key="item.label">
|
<template v-for="item in easyDropdownList" :key="item.label">
|
||||||
<el-dropdown-item :command="item">
|
<el-dropdown-item :command="item">
|
||||||
<Icon :size="16" :icon="item.icon" />
|
<Icon :size="16" :icon="item.icon"/>
|
||||||
<span>{{ item.label }}</span>
|
<span>{{ item.label }}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -65,8 +95,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<Verify ref="verify" :captchaType="captchaType" :imgSize="{ width: '400px', height: '200px' }" mode="pop"
|
<Verify
|
||||||
@success="handleLogin" />
|
ref="verify"
|
||||||
|
:captchaType="captchaType"
|
||||||
|
:imgSize="{ width: '400px', height: '200px' }"
|
||||||
|
mode="pop"
|
||||||
|
@success="handleLogin"
|
||||||
|
/>
|
||||||
<template v-if="!loginType">
|
<template v-if="!loginType">
|
||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<!-- <el-form-item>
|
<!-- <el-form-item>
|
||||||
@@ -92,8 +127,15 @@
|
|||||||
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="w-[100%] flex justify-center">
|
<div class="w-[100%] flex justify-center">
|
||||||
<Icon v-for="(item, key) in socialList" :key="key" :icon="item.icon" :size="50"
|
<Icon
|
||||||
class="anticon cursor-pointer" color="#999" @click="doSocialLogin(item.type)" />
|
v-for="(item, key) in socialList"
|
||||||
|
:key="key"
|
||||||
|
:icon="item.icon"
|
||||||
|
:size="50"
|
||||||
|
class="anticon cursor-pointer"
|
||||||
|
color="#999"
|
||||||
|
@click="doSocialLogin(item.type)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -102,18 +144,18 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElLoading } from 'element-plus'
|
import {ElLoading} from 'element-plus'
|
||||||
import LoginFormTitle from './LoginFormTitle.vue'
|
import LoginFormTitle from './LoginFormTitle.vue'
|
||||||
import type { RouteLocationNormalizedLoaded } from 'vue-router'
|
import type {RouteLocationNormalizedLoaded} from 'vue-router'
|
||||||
|
|
||||||
import { useIcon } from '@/hooks/web/useIcon'
|
import {useIcon} from '@/hooks/web/useIcon'
|
||||||
|
|
||||||
import * as authUtil from '@/utils/auth'
|
import * as authUtil from '@/utils/auth'
|
||||||
import { usePermissionStore } from '@/store/modules/permission'
|
import {usePermissionStore} from '@/store/modules/permission'
|
||||||
import * as LoginApi from '@/api/login'
|
import * as LoginApi from '@/api/login'
|
||||||
import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
|
import {LoginStateEnum, useFormValid, useLoginState} from './useLogin'
|
||||||
|
|
||||||
defineOptions({ name: 'LoginForm' })
|
defineOptions({name: 'LoginForm'})
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
loginType?: 'easy'
|
loginType?: 'easy'
|
||||||
@@ -121,15 +163,15 @@ interface Props {
|
|||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
const { t } = useI18n()
|
const {t} = useI18n()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const iconHouse = useIcon({ icon: 'ep:house' })
|
const iconHouse = useIcon({icon: 'ep:house'})
|
||||||
const iconAvatar = useIcon({ icon: 'ep:avatar' })
|
const iconAvatar = useIcon({icon: 'ep:avatar'})
|
||||||
const iconLock = useIcon({ icon: 'ep:lock' })
|
const iconLock = useIcon({icon: 'ep:lock'})
|
||||||
const formLogin = ref()
|
const formLogin = ref()
|
||||||
const { validForm } = useFormValid(formLogin)
|
const {validForm} = useFormValid(formLogin)
|
||||||
const { setLoginState, getLoginState } = useLoginState()
|
const {setLoginState, getLoginState} = useLoginState()
|
||||||
const { currentRoute, push } = useRouter()
|
const {currentRoute, push} = useRouter()
|
||||||
const permissionStore = usePermissionStore()
|
const permissionStore = usePermissionStore()
|
||||||
const redirect = ref<string>('')
|
const redirect = ref<string>('')
|
||||||
const loginLoading = ref(false)
|
const loginLoading = ref(false)
|
||||||
@@ -161,7 +203,7 @@ const socialList = [
|
|||||||
// { icon: 'ant-design:dingtalk-circle-filled', type: 20 },
|
// { icon: 'ant-design:dingtalk-circle-filled', type: 20 },
|
||||||
// { icon: 'ant-design:github-filled', type: 0 },
|
// { icon: 'ant-design:github-filled', type: 0 },
|
||||||
// { icon: 'ant-design:alipay-circle-filled', type: 0 },
|
// { icon: 'ant-design:alipay-circle-filled', type: 0 },
|
||||||
{ icon: 'bx:planet', type: 100 },
|
{icon: 'bx:planet', type: 100},
|
||||||
]
|
]
|
||||||
|
|
||||||
const easyDropdownList = [
|
const easyDropdownList = [
|
||||||
@@ -177,15 +219,15 @@ const easyDropdownList = [
|
|||||||
type: LoginStateEnum.QR_CODE,
|
type: LoginStateEnum.QR_CODE,
|
||||||
code: 'page'
|
code: 'page'
|
||||||
},
|
},
|
||||||
{ label: t('login.btnWechat'), icon: 'ant-design:wechat-filled', type: 30, code: 'url' },
|
{label: t('login.btnWechat'), icon: 'ant-design:wechat-filled', type: 30, code: 'url'},
|
||||||
{
|
{
|
||||||
label: t('login.btnDingtalk'),
|
label: t('login.btnDingtalk'),
|
||||||
icon: 'ant-design:dingtalk-circle-filled',
|
icon: 'ant-design:dingtalk-circle-filled',
|
||||||
type: 20,
|
type: 20,
|
||||||
code: 'url'
|
code: 'url'
|
||||||
},
|
},
|
||||||
{ label: t('login.btnGitHub'), icon: 'ant-design:github-filled', type: 0, code: 'url' },
|
{label: t('login.btnGitHub'), icon: 'ant-design:github-filled', type: 0, code: 'url'},
|
||||||
{ label: t('login.btnAlipay'), icon: 'ant-design:alipay-circle-filled', type: 0, code: 'url' }
|
{label: t('login.btnAlipay'), icon: 'ant-design:alipay-circle-filled', type: 0, code: 'url'}
|
||||||
]
|
]
|
||||||
|
|
||||||
const easyCommand = (row) => {
|
const easyCommand = (row) => {
|
||||||
@@ -227,13 +269,11 @@ const getCookie = () => {
|
|||||||
// 根据域名,获得租户信息
|
// 根据域名,获得租户信息
|
||||||
const getTenantByWebsite = async () => {
|
const getTenantByWebsite = async () => {
|
||||||
const website = location.host
|
const website = location.host
|
||||||
try {
|
|
||||||
const res = await LoginApi.getTenantByWebsite(website)
|
const res = await LoginApi.getTenantByWebsite(website)
|
||||||
if (res) {
|
if (res) {
|
||||||
loginData.loginForm.tenantName = res.name
|
loginData.loginForm.tenantName = res.name
|
||||||
authUtil.setTenantId(res.id)
|
authUtil.setTenantId(res.id)
|
||||||
}
|
}
|
||||||
} catch (e) { }
|
|
||||||
}
|
}
|
||||||
const loading = ref() // ElLoading.service 返回的实例
|
const loading = ref() // ElLoading.service 返回的实例
|
||||||
// 登录
|
// 登录
|
||||||
@@ -268,7 +308,7 @@ const handleLogin = async (params) => {
|
|||||||
if (redirect.value.indexOf('sso') !== -1) {
|
if (redirect.value.indexOf('sso') !== -1) {
|
||||||
window.location.href = window.location.href.replace('/login?redirect=', '')
|
window.location.href = window.location.href.replace('/login?redirect=', '')
|
||||||
} else {
|
} else {
|
||||||
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
push({path: redirect.value || permissionStore.addRouters[0].path})
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
loginLoading.value = false
|
loginLoading.value = false
|
||||||
@@ -287,7 +327,7 @@ const doSocialLogin = async (type: number) => {
|
|||||||
await getTenantId()
|
await getTenantId()
|
||||||
// 如果获取不到,则需要弹出提示,进行处理
|
// 如果获取不到,则需要弹出提示,进行处理
|
||||||
if (!authUtil.getTenantId()) {
|
if (!authUtil.getTenantId()) {
|
||||||
await message.prompt('请输入租户名称', t('common.reminder')).then(async ({ value }) => {
|
await message.prompt('请输入租户名称', t('common.reminder')).then(async ({value}) => {
|
||||||
const res = await LoginApi.getTenantIdByName(value)
|
const res = await LoginApi.getTenantIdByName(value)
|
||||||
authUtil.setTenantId(res)
|
authUtil.setTenantId(res)
|
||||||
})
|
})
|
||||||
@@ -316,7 +356,7 @@ watch(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (redirect.value && import.meta.env.VITE_DEFAULT_SSO == 'true') {
|
if(redirect.value && import.meta.env.VITE_DEFAULT_SSO =='true'){
|
||||||
//默认
|
//默认
|
||||||
doSocialLogin(100)
|
doSocialLogin(100)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,6 +173,8 @@ const handleAudit = async (task, pass) => {
|
|||||||
getDetail()
|
getDetail()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const printPage = async () => {
|
const printPage = async () => {
|
||||||
|
|
||||||
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
|
const { href } = router.resolve({ name: 'BpmProcessInstanceInfo',
|
||||||
|
|||||||
@@ -61,6 +61,13 @@ const tabsPaneList = ref([
|
|||||||
calcHeight: 200,
|
calcHeight: 200,
|
||||||
fixedSearch: {file_main_type: 4}
|
fixedSearch: {file_main_type: 4}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '工作档案',
|
||||||
|
name: 'workArchive',
|
||||||
|
formId: '1966386366515343361',
|
||||||
|
calcHeight: 200,
|
||||||
|
fixedSearch: {file_main_type: 5}
|
||||||
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
// 定义点击tab的事件动作
|
// 定义点击tab的事件动作
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
// 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
|
// 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
|
||||||
proxy: {
|
proxy: {
|
||||||
['/admin-api']: {
|
['/admin-api']: {
|
||||||
target: 'http://10.28.117.100:48080',
|
target: env.VITE_BASE_URL,
|
||||||
ws: false,
|
ws: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
|
rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
|
||||||
|
|||||||
Reference in New Issue
Block a user