Merge remote-tracking branch 'origin/main' into multi-tenant

This commit is contained in:
TsMask
2024-06-27 20:19:46 +08:00
114 changed files with 4066 additions and 1781 deletions

View File

@@ -449,7 +449,11 @@ function fnGetList(pageNum?: number) {
}
tablePagination.total = res.total;
tableState.data = res.rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
@@ -698,8 +702,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -762,11 +767,13 @@ onMounted(() => {
{{ t('common.close') }}
</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -855,7 +862,7 @@ onMounted(() => {
/>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -602,8 +602,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -691,11 +692,13 @@ onMounted(() => {
t('common.cancel')
}}</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -818,9 +821,8 @@ onMounted(() => {
</a-col>
</a-row>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>
<style lang="less" scoped>
</style>
<style lang="less" scoped></style>

View File

@@ -301,7 +301,6 @@ function fnModalVisibleByVive(row: Record<string, string>) {
* @param dictCode 数据编号id, 不传为新增
*/
function fnModalVisibleByEdit(dictCode?: string | number, record?: any) {
console.log(record);
if (!dictCode) {
modalStateFrom.resetFields();
modalState.from.dictType = queryParams.dictType;
@@ -463,7 +462,11 @@ function fnGetList(pageNum?: number) {
}
tablePagination.total = res.total;
tableState.data = res.rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
@@ -714,8 +717,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -844,11 +848,13 @@ onMounted(() => {
{{ t('common.close') }}
</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -999,7 +1005,7 @@ onMounted(() => {
/>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -452,7 +452,11 @@ function fnGetList(pageNum?: number) {
}
tablePagination.total = res.total;
tableState.data = res.rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
@@ -718,8 +722,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -753,11 +758,13 @@ onMounted(() => {
t('common.cancel')
}}</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -810,7 +817,7 @@ onMounted(() => {
/>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -626,8 +626,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -749,7 +750,7 @@ onMounted(() => {
{{ t('common.cancel') }}
</a-button>
</template>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -717,8 +717,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -907,11 +908,13 @@ onMounted(() => {
t('common.cancel')
}}</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -1182,7 +1185,7 @@ onMounted(() => {
/>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -631,8 +631,9 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -715,11 +716,13 @@ onMounted(() => {
t('common.cancel')
}}</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -804,7 +807,7 @@ onMounted(() => {
/>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -98,8 +98,8 @@ function fnTabCreate() {
title: 'SSH_NE_22',
addr: '',
port: 22,
user: '',
authMode: '0',
user: 'omcuser',
authMode: '2',
password: '',
privateKey: '',
passPhrase: '',
@@ -313,16 +313,19 @@ function fnGetList() {
listAllNeInfo({
bandHost: true,
}).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
for (const item of res.data) {
if (item.neType === 'OMC') continue;
if (item.neType === 'OMC' || !Array.isArray(item.hosts)) continue;
tabState.panes.push({
key: `${item.neType}@${item.neId}`,
data: item,
status: false,
});
}
// 没有终端信息时,新建一个占位
if (tabState.panes.length === 0) {
fnTabCreate();
}
// 选择首个
if (tabState.panes.length > 0) {
tabState.activeKey = tabState.panes[0].key;

View File

@@ -151,7 +151,7 @@ async function fnRecordInstall() {
// 开始安装
let preinput = {};
if (row.neType.toUpperCase() === 'IMS') {
preinput = { pisCSCF: 'y', updateMFetc: 'No', updateMFshare: 'No' }
preinput = { pisCSCF: 'y', updateMFetc: 'No', updateMFshare: 'No' };
}
const installData = {
neType: row.neType,
@@ -315,8 +315,9 @@ onMounted(() => {
></UploadMoreFile>
<!-- 勾选网元版本进行安装框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:destroyOnClose="true"
:body-style="{ height: '520px', overflowY: 'scroll' }"
:keyboard="false"
:mask-closable="false"
@@ -363,7 +364,7 @@ onMounted(() => {
</template>
</a-alert>
</p>
</a-modal>
</ProModal>
</template>
<style lang="less" scoped>

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { fnToStepName, stepState } from '../hooks/useStep';
import useI18n from '@/hooks/useI18n';
import { reactive } from 'vue';
import { nextTick, onMounted, reactive, watch } from 'vue';
import useAppStore from '@/store/modules/app';
import { parseUrlPath } from '@/plugins/file-static-url';
import { Modal, message } from 'ant-design-vue/lib';
@@ -36,7 +36,7 @@ type StateType = {
const state: StateType = reactive({
confirmLoading: false,
filePath: '',
type: 'icon',
type: appStore.logoType,
icon: getLogoURL('icon'),
brand: getLogoURL('brand'),
title: appStore.appName,
@@ -44,7 +44,7 @@ const state: StateType = reactive({
open: appStore.i18nOpen,
openOld: appStore.i18nOpen,
username: 'admin',
password: 'Abcd1234..',
password: 'Abcd@1234..',
});
// LOGO地址
@@ -117,7 +117,6 @@ function fnSaveAcount() {
// 发送保存
state.confirmLoading = true;
bootloaderAccount(state.username, state.password).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS) {
message.success(t('common.operateOk'));
} else {
@@ -158,7 +157,6 @@ function fnSaveSystem() {
// 发送保存
state.confirmLoading = true;
Promise.all(reqArr).then(resArr => {
console.log(resArr);
message.success(t('views.system.quickStart.sysSaveOk'));
state.confirmLoading = false;
});
@@ -197,6 +195,30 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
});
}
}
/**检查系统名称是否超出范围进行滚动 */
function fnCheckAppNameOverflow() {
const container: HTMLDivElement | null = document.querySelector(
'.header-icon > .app-name'
);
if (!container) return;
const text: HTMLDivElement | null = container.querySelector('.marquee');
if (!text) return;
if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable');
} else {
text.classList.remove('app-name_scrollable');
}
}
watch(
() => state.title,
() => nextTick(fnCheckAppNameOverflow)
);
onMounted(() => {
fnCheckAppNameOverflow();
});
</script>
<template>
@@ -273,8 +295,10 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
</div>
<div class="header-icon" v-show="state.type === 'icon'">
<img :src="state.icon" />
<h1 :title="state.title">
{{ state.title }}
<h1 class="app-name" :title="state.title">
<span class="marquee app-name_scrollable">
{{ state.title }}
</span>
</h1>
</div>
<div class="header-menu">
@@ -363,15 +387,31 @@ function fnStepNext(stepName: 'NeInfoConfig' | 'Done') {
border-style: none;
border-radius: 6.66px;
}
& > h1 {
& > .app-name {
overflow: hidden;
text-overflow: ellipsis;
/* text-overflow: ellipsis; */
white-space: nowrap;
width: 130px;
width: 148px;
color: #fff;
margin: 0 0 0 12px;
font-weight: 600;
font-size: 16px;
font-size: 18px;
> .app-name_scrollable {
// padding-left: 100%;
display: inline-block;
animation: scrollable-animation linear 6s infinite both;
}
@keyframes scrollable-animation {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-100%, 0, 0);
}
}
}
}

View File

@@ -183,7 +183,11 @@ function fnGetList(pageNum?: number) {
}
tablePagination.total = res.total;
tableState.data = res.rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) {
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
fnGetList(queryParams.pageNum - 1);
}
@@ -231,8 +235,11 @@ watch(
</script>
<template>
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:forceFullscreen="true"
:title="props.title"
:visible="props.visible"
:keyboard="false"
@@ -309,7 +316,7 @@ watch(
</template>
</template>
</a-table>
</a-modal>
</ProModal>
</template>
<style lang="less" scoped>

View File

@@ -999,8 +999,10 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="false"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -1098,11 +1100,13 @@ onMounted(() => {
t('common.cancel')
}}</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -1242,11 +1246,13 @@ onMounted(() => {
</a-tree>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
<!-- 分配角色数据权限修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByDataScope"
@@ -1387,7 +1393,7 @@ onMounted(() => {
</a-tree>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
</PageContainer>
</template>

View File

@@ -28,7 +28,6 @@ let state: StateType = reactive({
/**上传前检查或转换压缩 */
function fnBeforeUpload(file: FileType) {
console.log(file.type);
if (state.loading) return false;
const isType = ['application/pdf'].includes(file.type);
if (!isType) {

View File

@@ -3,7 +3,7 @@ import { Modal, message } from 'ant-design-vue/lib';
import { FileType } from 'ant-design-vue/lib/upload/interface';
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
import IconFont from '@/components/IconFont/index.vue';
import { onMounted, reactive, watch, computed } from 'vue';
import { onMounted, reactive, watch, computed, nextTick } from 'vue';
import useAppStore from '@/store/modules/app';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
@@ -182,7 +182,26 @@ watch(
}
);
/**检查系统名称是否超出范围进行滚动 */
function fnCheckAppNameOverflow() {
const container: HTMLDivElement | null = document.querySelector('.header-icon > .app-name');
if (!container) return;
const text: HTMLDivElement | null = container.querySelector('.marquee');
if (!text) return;
if (text.offsetWidth > container.offsetWidth) {
text.classList.add('app-name_scrollable');
} else {
text.classList.remove('app-name_scrollable');
}
}
watch(
() => appStore.appName,
() => nextTick(fnCheckAppNameOverflow)
);
onMounted(() => {
fnCheckAppNameOverflow()
Object.assign(state, {
language: currentLocale.value,
filePath: '',
@@ -205,8 +224,10 @@ onMounted(() => {
</div>
<div class="header-icon" v-show="state.type === 'icon'">
<img :src="state.icon" />
<h1 :title="appStore.appName">
{{ appStore.appName }}
<h1 class="app-name" :title="appStore.appName">
<span class="marquee app-name_scrollable">
{{ appStore.appName }}
</span>
</h1>
</div>
<div class="header-menu">
@@ -329,15 +350,32 @@ onMounted(() => {
border-style: none;
border-radius: 6.66px;
}
& > h1 {
& > .app-name {
overflow: hidden;
text-overflow: ellipsis;
/* text-overflow: ellipsis; */
white-space: nowrap;
width: 130px;
width: 148px;
color: #fff;
margin: 0 0 0 12px;
font-weight: 600;
font-size: 16px;
font-size: 18px;
> .app-name_scrollable {
// padding-left: 100%;
display: inline-block;
animation: scrollable-animation linear 6s infinite both;
}
@keyframes scrollable-animation {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-100%, 0, 0);
}
}
}
}

View File

@@ -3,9 +3,9 @@ import { message } from 'ant-design-vue/lib';
import { reactive } from 'vue';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useLockedStore from '@/store/modules/locked';
import { bootloaderReset } from '@/api/system/quick-start/bootloader';
const lockedStore = useLockedStore();
import useMaskStore from '@/store/modules/mask';
const maskStore = useMaskStore();
const { t } = useI18n();
type StateType = {
@@ -36,13 +36,13 @@ function fnModalVisible() {
/**对话框提交确认 */
function fnModalOk() {
// 发送请求
lockedStore.fnLock('reset');
maskStore.handleMaskType('reset');
bootloaderReset().then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
fnModalCancel();
lockedStore.fnLock('reload');
maskStore.handleMaskType('reload');
} else {
lockedStore.fnLock('none');
maskStore.handleMaskType('none');
message.error(res.msg, 3);
clearInterval(state.timer);
state.timer = null;
@@ -67,6 +67,9 @@ function fnModalCancel() {
</a-button>
</a-col>
<a-modal
:drag="true"
:width="416"
:destroyOnClose="true"
:mask-closable="false"
v-model:visible="state.visible"
:title="t('common.tipTitle')"

View File

@@ -265,7 +265,7 @@ let modalState: ModalStateType = reactive({
phonenumber: '',
postIds: [],
roleIds: [],
sex: '1',
sex: '0',
status: '0',
remark: '',
createTime: 0,
@@ -392,6 +392,7 @@ function fnModalVisibleByEdit(userId?: string | number) {
modalState.from = Object.assign(modalState.from, user);
modalState.from.roleIds = roleIds;
modalState.from.postIds = postIds;
modalState.from.deptId = deptTreeData.value[0].id;
modalState.title =
t('common.addText') + t('views.system.user.userInfo');
modalState.visibleByEdit = true;
@@ -968,7 +969,7 @@ onMounted(() => {
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList(1)">
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>
@@ -1095,8 +1096,10 @@ onMounted(() => {
</a-card>
<!-- 详情框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="false"
:visible="modalState.visibleByView"
:title="modalState.title"
@cancel="fnModalCancel"
@@ -1218,7 +1221,12 @@ onMounted(() => {
</a-select>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-col
:lg="12"
:md="12"
:xs="24"
v-perms:has="['system:user:editRole']"
>
<a-form-item
:label="t('views.system.user.permission')"
name="roleIds"
@@ -1274,11 +1282,13 @@ onMounted(() => {
{{ t('common.close') }}
</a-button>
</template>
</a-modal>
</ProModal>
<!-- 新增框或修改框 -->
<a-modal
width="800px"
<ProModal
:drag="true"
:width="800"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
@@ -1346,7 +1356,12 @@ onMounted(() => {
></a-input>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-col
:lg="12"
:md="12"
:xs="24"
v-perms:has="['system:user:editPost']"
>
<a-form-item
:label="t('views.system.user.userWork')"
name="postIds"
@@ -1410,7 +1425,15 @@ onMounted(() => {
</a-select>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-col
:lg="12"
:md="12"
:xs="24"
v-if="
modalState.from.userId !== '1' &&
modalState.from.userId !== userStore.userId
"
>
<a-form-item :label="t('views.system.user.status')" name="status">
<a-select
v-model:value="modalState.from.status"
@@ -1481,11 +1504,12 @@ onMounted(() => {
/>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
<!-- 重置密码修改框 -->
<a-modal
width="500px"
<ProModal
:drag="true"
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByResetPwd"
@@ -1521,7 +1545,7 @@ onMounted(() => {
</a-input-password>
</a-form-item>
</a-form>
</a-modal>
</ProModal>
<!-- 上传导入表格数据文件框 -->
<UploadModal