样式加bug改动
This commit is contained in:
parent
4e367b7afd
commit
ae56305735
@ -2,4 +2,6 @@
|
||||
NODE_ENV = 'development'
|
||||
|
||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||
VITE_API_URL = '/api'
|
||||
# VITE_API_URL = 'http://192.168.34.122:6688'
|
||||
|
||||
VITE_API_URL = 'http://139.9.66.234:6688'
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
// * 后端微服务端口名
|
||||
export const PORT1 = "http://139.9.66.234:6688";
|
||||
export const PORT2 = "http://192.168.34.122:6688";
|
||||
export const PORT1 = "http://192.168.34.122:6688";
|
||||
export const PORT2 = "http://139.9.66.234:6688";
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
// import { ResPage, User } from "@/api/interface/index";
|
||||
import { ResPage, User } from "@/api/types/common";
|
||||
import { PORT1 } from "@/api/config/servicePort";
|
||||
// import { PORT1 } from "@/api/config/servicePort";
|
||||
import http from "@/api";
|
||||
|
||||
const PORT1 = import.meta.env.VITE_API_URL;
|
||||
|
||||
/**
|
||||
* @name 用户管理模块
|
||||
*/
|
||||
@ -65,7 +67,7 @@ export const getDictionaryList = (params: User.ReqUserParams) => {
|
||||
|
||||
// 查询detail
|
||||
export const getDictionaryDetail = (params: User.ReqUserParams) => {
|
||||
return http.post<ResPage<User.ResResults>>(PORT1 + `/xmgl/systemDictData/page`, params);
|
||||
return http.post<ResPage<User.ResUserList>>(PORT1 + `/xmgl/systemDictData/page`, params);
|
||||
};
|
||||
// 查询字典
|
||||
export const getDicList = (params: User.ReqUserParams) => {
|
||||
@ -75,7 +77,7 @@ export const getDicList = (params: User.ReqUserParams) => {
|
||||
export const addDictionary = (params: FormData) => {
|
||||
return http.post(PORT1 + `/xmgl/systemDictType/add`, params);
|
||||
};
|
||||
|
||||
// 字典类型新增
|
||||
export const addDiaDictionary = (params: FormData) => {
|
||||
return http.post(PORT1 + `/xmgl/systemDictData/add`, params);
|
||||
};
|
||||
@ -85,6 +87,10 @@ export const editDictionary = (params: { id: string }) => {
|
||||
return http.post(PORT1 + `/xmgl/systemDictType/edit`, params);
|
||||
};
|
||||
|
||||
// 字典数据的编辑用户
|
||||
export const editDiaDictionary = (params: { id: string }) => {
|
||||
return http.post(PORT1 + `/xmgl/systemDictData/edit`, params);
|
||||
};
|
||||
// * 删除用户
|
||||
export const deleteDictionary = (params: { id: number }) => {
|
||||
return http.post(PORT1 + `/xmgl/systemDictType/delete`, params);
|
||||
@ -95,7 +101,7 @@ export const deleteDia = (params: { id: number }) => {
|
||||
return http.post(PORT1 + `/xmgl/systemDictData/delete`, params);
|
||||
};
|
||||
|
||||
// app管理
|
||||
// app管理 !!!!!!!!!!!!!!!!!!!!!
|
||||
export const getAppList = (params: User.ReqUserParams) => {
|
||||
return http.post<ResPage<User.ResUserList>>(PORT1 + `/xmgl/appVersion/page`, params);
|
||||
};
|
||||
@ -137,11 +143,11 @@ export const deleteMunu = (params: { id: number }) => {
|
||||
return http.post(PORT1 + `/xmgl/baseModule/delete`, params);
|
||||
};
|
||||
// 删除系统菜单信息
|
||||
export const deletesysMenu = (params: { menuId: number }) => {
|
||||
export const deletesysMenu = (params: { menuId: number | string }) => {
|
||||
return http.post(PORT1 + `/xmgl/baseMenu/delete`, params);
|
||||
};
|
||||
// 菜单管理的表格查询
|
||||
export const menuList = (params: { moduleId: string }) => {
|
||||
export const menuList = (params: { moduleId: string | number }) => {
|
||||
return http.post<ResPage<User.ResResults>>(PORT1 + `/xmgl/baseMenu/list`, params);
|
||||
};
|
||||
// 获取菜单下所有操作 点击按钮管理的table
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Login } from "@/api/interface/index";
|
||||
import { PORT1 } from "@/api/config/servicePort";
|
||||
// import { PORT1 } from "@/api/config/servicePort";
|
||||
import DynamicRouter from "@/assets/json/dynamicRouter.json";
|
||||
import AuthButtons from "@/assets/json/authButtons.json";
|
||||
import qs from "qs";
|
||||
@ -9,6 +9,9 @@ import http from "@/api";
|
||||
* @name 登录模块
|
||||
*/
|
||||
// * 用户登录
|
||||
|
||||
const PORT1 = import.meta.env.VITE_API_URL;
|
||||
|
||||
export const loginApi = (params: Login.ReqLoginForm) => {
|
||||
return http.post<Login.ResLogin>(PORT1 + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 正常 post json 请求 ==> application/json
|
||||
return http.post<Login.ResLogin>(PORT1 + `/xmgl/systemUser/login`, params, { headers: { noLoading: true } }); // 控制当前请求不显示 loading
|
||||
|
||||
@ -11,7 +11,9 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
.icon-xiaoxi::before {
|
||||
font-size: 21.2px;
|
||||
font-size: 14px;
|
||||
// width: 12px;
|
||||
// height: 14px;
|
||||
content: "\e61f";
|
||||
}
|
||||
.icon-zhuti::before {
|
||||
|
||||
@ -86,7 +86,7 @@
|
||||
v-model="form[item.prop]"
|
||||
:disabled="item.disabled"
|
||||
:min="1"
|
||||
:max="10"
|
||||
:max="999"
|
||||
size="large"
|
||||
controls-position="right"
|
||||
:style="{ width: item.width + 'px' }"
|
||||
@ -255,5 +255,8 @@ onMounted(() => {
|
||||
:deep(.el-select--large) {
|
||||
width: 100%;
|
||||
}
|
||||
:deep(.el-input-number--large) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -30,14 +30,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格主体 -->
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
v-bind="$attrs"
|
||||
:data="tableData"
|
||||
:border="border"
|
||||
:row-key="getRowKeys"
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<!-- :border="border" -->
|
||||
<el-table ref="tableRef" v-bind="$attrs" :data="tableData" :row-key="getRowKeys" @selection-change="selectionChange">
|
||||
<!-- 默认插槽 -->
|
||||
<slot></slot>
|
||||
<template v-for="item in tableColumns" :key="item">
|
||||
@ -125,7 +119,7 @@ const props = withDefaults(defineProps<ProTableProps>(), {
|
||||
columns: () => [],
|
||||
pagination: true,
|
||||
initParam: {},
|
||||
border: true,
|
||||
border: false,
|
||||
toolButton: true,
|
||||
selectId: "id",
|
||||
searchCol: () => ({ xs: 1, sm: 2, md: 4, lg: 6, xl: 6 })
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<el-form ref="formRef" :model="searchParam">
|
||||
<Grid ref="gridRef" :collapsed="collapsed" :gap="[20, 0]" :cols="searchCol">
|
||||
<GridItem v-for="(item, index) in columns" class="girdItem" :key="item.prop" v-bind="getResponsive(item)" :index="index">
|
||||
<el-form-item :label="`${item.label} :`">
|
||||
<el-form-item :label="`${item.label} `">
|
||||
<SearchFormItem :column="item" :searchParam="searchParam" />
|
||||
</el-form-item>
|
||||
</GridItem>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 55px;
|
||||
height: 72px;
|
||||
padding: 0 15px 0 0;
|
||||
background: linear-gradient(to right, #0e63d9 0%, #00378f 100%);
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
@ -20,10 +20,12 @@
|
||||
// width: 210px;
|
||||
margin-left: 16px;
|
||||
span {
|
||||
font-size: 21.5px;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
// font-weight: bold;
|
||||
color: #dadada;
|
||||
white-space: nowrap;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
img {
|
||||
width: 28px;
|
||||
@ -53,7 +55,7 @@
|
||||
}
|
||||
}
|
||||
.el-aside {
|
||||
width: auto;
|
||||
width: 200px;
|
||||
overflow: inherit;
|
||||
background-color: #ffffff;
|
||||
border-right: 1px solid var(--el-border-color);
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
:collapse-transition="false"
|
||||
:unique-opened="true"
|
||||
background-color="#ffffff"
|
||||
text-color="#303133"
|
||||
text-color="#333333 "
|
||||
>
|
||||
<SubMenu :menuList="menuList" />
|
||||
</el-menu>
|
||||
@ -72,13 +72,14 @@ const isCollapse = computed(() => globalStore.themeConfig.isCollapse);
|
||||
.el-menu--popup {
|
||||
.el-menu-item {
|
||||
&.is-active {
|
||||
background: var(--el-color-primary-light-9);
|
||||
// background: var(--el-color-primary-light-9);
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: 12px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 4px;
|
||||
height: 38px;
|
||||
content: "";
|
||||
background: var(--el-color-primary);
|
||||
}
|
||||
|
||||
@ -1,14 +1,16 @@
|
||||
<template>
|
||||
<div class="tool-bar-ri">
|
||||
<div class="header-icon">
|
||||
<AssemblySize id="assemblySize" />
|
||||
<!-- <AssemblySize id="assemblySize" />
|
||||
<Language id="language" />
|
||||
<SearchMenu id="searchMenu" />
|
||||
<ThemeSetting id="themeSetting" />
|
||||
<ThemeSetting id="themeSetting" /> -->
|
||||
<Message id="message" />
|
||||
<Fullscreen id="fullscreen" />
|
||||
<!-- <Fullscreen id="fullscreen" /> -->
|
||||
<div class="messagetext">消息</div>
|
||||
<span style="margin: 0 26px">|</span>
|
||||
</div>
|
||||
<span class="username">Geeker</span>
|
||||
<!-- <span class="username">Geeker</span> -->
|
||||
<Avatar />
|
||||
</div>
|
||||
</template>
|
||||
@ -28,12 +30,21 @@ import Avatar from "./components/Avatar.vue";
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 30px 0 0;
|
||||
// margin: 0 30px 0 0;
|
||||
width: 16%;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
.header-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
& > * {
|
||||
margin-left: 21px;
|
||||
// font-size: 16px;
|
||||
// & > * {
|
||||
// margin-right: 21px;
|
||||
// width: 12px;
|
||||
// height: 14px;
|
||||
// }
|
||||
.messagetext {
|
||||
margin-left: 18px;
|
||||
}
|
||||
}
|
||||
.username {
|
||||
|
||||
@ -1,18 +1,22 @@
|
||||
<template>
|
||||
<el-dropdown trigger="click">
|
||||
<div class="avatar">
|
||||
<img src="@/assets/images/avatar.gif" alt="avatar" />
|
||||
<!-- <img src="@/assets/images/avatar.gif" alt="avatar" /> -->
|
||||
<span>admin</span>
|
||||
<el-icon><CaretBottom /></el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="openDialog('infoRef')">
|
||||
<el-dropdown-menu virtual-triggering>
|
||||
<!-- <el-dropdown-item @click="openDialog('infoRef')">
|
||||
<el-icon><User /></el-icon>{{ $t("header.personalData") }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-item> -->
|
||||
<el-dropdown-item @click="openDialog('passwordRef')">
|
||||
<el-icon><Edit /></el-icon>{{ $t("header.changePassword") }}
|
||||
<!-- <el-icon><Edit /></el-icon> -->
|
||||
{{ $t("header.changePassword") }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="logout" divided>
|
||||
<el-icon><SwitchButton /></el-icon>{{ $t("header.logout") }}
|
||||
<!-- <el-icon><SwitchButton /></el-icon> -->
|
||||
{{ $t("header.logout") }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
@ -67,14 +71,19 @@ const openDialog = (refName: string) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 16px;
|
||||
// width: 40px;
|
||||
// height: 40px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
border-radius: 50%;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// border-radius: 50%;
|
||||
// img {
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// }
|
||||
color: #fff;
|
||||
.el-icon {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -90,8 +90,8 @@ const activeName = ref("first");
|
||||
border: none;
|
||||
}
|
||||
.message-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin: 0 20px 0 5px;
|
||||
}
|
||||
.message-content {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Maximize v-if="themeConfig.maximize" />
|
||||
<Tabs v-if="themeConfig.tabs" />
|
||||
<!-- <Tabs v-if="themeConfig.tabs" /> -->
|
||||
<el-main>
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<transition appear name="fade-transform" mode="out-in">
|
||||
@ -47,15 +47,15 @@ watch(
|
||||
|
||||
// 监听窗口大小变化,折叠侧边栏
|
||||
const screenWidth = ref(0);
|
||||
const listeningWindow = useDebounceFn(() => {
|
||||
screenWidth.value = document.body.clientWidth;
|
||||
if (!isCollapse.value && screenWidth.value < 1200) globalStore.setThemeConfig({ ...themeConfig.value, isCollapse: true });
|
||||
if (isCollapse.value && screenWidth.value > 1200) globalStore.setThemeConfig({ ...themeConfig.value, isCollapse: false });
|
||||
}, 100);
|
||||
window.addEventListener("resize", listeningWindow, false);
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("resize", listeningWindow);
|
||||
});
|
||||
// const listeningWindow = useDebounceFn(() => {
|
||||
// screenWidth.value = document.body.clientWidth;
|
||||
// if (!isCollapse.value && screenWidth.value < 1200) globalStore.setThemeConfig({ ...themeConfig.value, isCollapse: true });
|
||||
// if (isCollapse.value && screenWidth.value > 1200) globalStore.setThemeConfig({ ...themeConfig.value, isCollapse: false });
|
||||
// }, 100);
|
||||
// window.addEventListener("resize", listeningWindow, false);
|
||||
// onBeforeUnmount(() => {
|
||||
// window.removeEventListener("resize", listeningWindow);
|
||||
// });
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -23,7 +23,7 @@ export const GlobalStore = defineStore({
|
||||
// 当前页面是否全屏
|
||||
maximize: false,
|
||||
// 布局切换 ==> 纵向:vertical | 经典:classic | 横向:transverse | 分栏:columns
|
||||
layout: "vertical",
|
||||
layout: "classic",
|
||||
// 默认 primary 主题颜色
|
||||
primary: DEFAULT_PRIMARY,
|
||||
// 深色模式
|
||||
@ -35,15 +35,15 @@ export const GlobalStore = defineStore({
|
||||
// 折叠菜单
|
||||
isCollapse: false,
|
||||
// 面包屑导航
|
||||
breadcrumb: true,
|
||||
breadcrumb: false,
|
||||
// 面包屑导航图标
|
||||
breadcrumbIcon: true,
|
||||
breadcrumbIcon: false,
|
||||
// 标签页
|
||||
tabs: true,
|
||||
tabs: false,
|
||||
// 标签页图标
|
||||
tabsIcon: true,
|
||||
tabsIcon: false,
|
||||
// 页脚
|
||||
footer: true
|
||||
footer: false
|
||||
}
|
||||
}),
|
||||
getters: {},
|
||||
|
||||
@ -89,9 +89,10 @@
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
border-radius: 12px;
|
||||
// table-search 表格搜索样式
|
||||
.table-search {
|
||||
border-radius: 12px;
|
||||
padding: 18px 18px 0;
|
||||
margin-bottom: 10px;
|
||||
.el-form {
|
||||
|
||||
@ -14,7 +14,9 @@
|
||||
<!-- 表格操作 -->
|
||||
<template #downloadPath="scope">
|
||||
<el-button type="primary" link @click="handleEditItem(scope.row)">下载</el-button>
|
||||
<el-button type="primary" link v-copy="`${fileUrl + scope.row.downloadPath}`">复制apk地址</el-button>
|
||||
<el-button type="primary" link v-copy="`${baseUrl + '/xmgl/file/preview?fileUrl=' + scope.row.downloadPath}`"
|
||||
>复制apk地址</el-button
|
||||
>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="onUpload(row)"
|
||||
@ -22,12 +24,12 @@
|
||||
>
|
||||
</template>
|
||||
</ProTable>
|
||||
<el-dialog v-model="visible" title="更新版本" width="40%">
|
||||
<el-form :data="formData" center>
|
||||
<el-dialog v-model="visible" title="更新版本" width="30%">
|
||||
<el-form :data="formData" center label-width="90px" :label-position="labelPosition">
|
||||
<el-form-item label="版本名称:">
|
||||
<el-input v-model="formData.versionName" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号:">
|
||||
<el-form-item label="版本号11:">
|
||||
<el-input v-model="formData.versionNum" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本描述:">
|
||||
@ -38,7 +40,7 @@
|
||||
:headers="headers"
|
||||
v-model:file-list="fileList"
|
||||
class="upload-demo"
|
||||
action="http://139.9.66.234:6688/xmgl/file/upload"
|
||||
:action="`${baseUrl}` + '/xmgl/file/upload'"
|
||||
multiple
|
||||
:limit="1"
|
||||
:on-success="uploadSuccess"
|
||||
@ -61,7 +63,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="jxjSystem">
|
||||
import { ref, reactive } from "vue";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { User } from "@/api/interface";
|
||||
@ -75,10 +77,12 @@ import { getAppList, editApp, addApp, exportApp } from "@/api/modules/jxjview";
|
||||
|
||||
const router = useRouter();
|
||||
const globalStore = GlobalStore();
|
||||
const fileUrl = ref("http://192.168.34.122:6688/xmgl/file/preview?fileUrl=");
|
||||
// const fileUrl = ref("http://192.168.34.122:6688/xmgl/file/preview?fileUrl=");
|
||||
const baseUrl = import.meta.env.VITE_API_URL;
|
||||
const data = ref<string>("复制成功");
|
||||
const headers = ref({ Authorization: "Bearer " + globalStore.token });
|
||||
const fileList = ref([]);
|
||||
const labelPosition = ref("right");
|
||||
|
||||
const visible = ref(false);
|
||||
const formData = ref({
|
||||
@ -93,6 +97,10 @@ const formData = ref({
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref();
|
||||
|
||||
onMounted(() => {
|
||||
console.log(baseUrl);
|
||||
});
|
||||
|
||||
// 修改数据按钮
|
||||
const handleEditItem = async (row: any) => {
|
||||
ElMessageBox.confirm("确认下载数据?", "温馨提示", { type: "warning" }).then(() =>
|
||||
@ -102,10 +110,11 @@ const handleEditItem = async (row: any) => {
|
||||
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{
|
||||
prop: "versionId",
|
||||
label: "序号"
|
||||
},
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
// {
|
||||
// prop: "versionId",
|
||||
// label: "序号"
|
||||
// },
|
||||
{
|
||||
prop: "versionName",
|
||||
label: "版本名称"
|
||||
|
||||
@ -17,7 +17,11 @@
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="scope">
|
||||
<el-button type="primary" link :icon="EditPen" @click="handleEditItem('edit', scope.row)">编辑</el-button>
|
||||
<el-button type="primary" link :icon="Delete" @click="deleteAccount(scope.row)">删除</el-button>
|
||||
<el-button type="danger" link :icon="Delete" @click="deleteAccount(scope.row)">删除</el-button>
|
||||
</template>
|
||||
<template #status="{ row }">
|
||||
<!-- <el-button type="primary" @click="handleAddItem()">新增</el-button> -->
|
||||
{{ row.status === 1 ? "正常" : "停用" }}
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
@ -32,44 +36,49 @@
|
||||
>
|
||||
</DialogForm>
|
||||
|
||||
<el-dialog v-model="dialogTableVisible" title="Shipping address" ref="DialogTable" width="800px" height="800px">
|
||||
<el-button type="primary" style="margin-top: -24px" @click="DiaAddItem(diaTableData.dictType)">新增</el-button>
|
||||
<el-dialog v-model="dialogTableVisible" title="字典数据" ref="DialogTable" width="800px" height="800px">
|
||||
<el-button type="primary" style="margin-top: -24px" @click="DiaAddItem(1, diaTableData.dictType)">新增</el-button>
|
||||
<el-table :data="gridData">
|
||||
<el-table-column property="dictCode" label="序号" width="150" />
|
||||
<el-table-column property="dictValue" label="字典名称" width="200" />
|
||||
<el-table-column property="dictCode" label="序号" />
|
||||
<el-table-column property="dictValue" label="字典名称" />
|
||||
<el-table-column property="dictSort" label="字典排序" />
|
||||
<el-table-column property="isDefault" label="状态" />
|
||||
<el-table-column property="status" label="状态">
|
||||
<template #default="{ row }">
|
||||
{{ row.status === 0 ? "停用" : "正常" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="remark" label="备注" />
|
||||
<el-table-column property="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<el-table-column property="createTime" width="180" label="创建时间" />
|
||||
<el-table-column label="操作" width="160" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" text @click="DeleteBtn(scope.row)">
|
||||
<!-- <img src="@/assets/images/tableIcon/deleteIcon.png" alt="" class="configureIcon" /> -->
|
||||
<span class="redDelete">删除</span>
|
||||
</el-button>
|
||||
<el-button type="primary" text @click="DiaAddItem(2, scope.row)"> 编辑 </el-button>
|
||||
<el-button type="danger" text @click="DeleteBtn(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<!-- 点击名字的弹窗 -->
|
||||
<el-dialog v-model="DiaVisible" title="新增字典数据">
|
||||
<el-form :data="DiaformData">
|
||||
<el-form-item label="字典类型">
|
||||
<el-dialog v-model="DiaVisible" :title="title">
|
||||
<el-form :data="DiaformData" label-width="100px">
|
||||
<el-form-item label="字典类型:">
|
||||
<el-input v-model="form.dictType" disabled placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典标签">
|
||||
<el-form-item label="字典名称:">
|
||||
<el-input v-model="form.dictValue" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典标签:">
|
||||
<el-input v-model="form.dictLabel" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示排序">
|
||||
<el-input-number v-model="form.dictSort" :min="1" :max="10" />
|
||||
<el-form-item label="显示排序:">
|
||||
<el-input-number controls-position="right" v-model="form.dictSort" :min="1" :max="10" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-form-item label="状态:">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">正常</el-radio>
|
||||
<el-radio :label="0">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -100,7 +109,8 @@ import {
|
||||
deleteDia,
|
||||
editDictionary,
|
||||
addDictionary,
|
||||
addDiaDictionary
|
||||
addDiaDictionary,
|
||||
editDiaDictionary
|
||||
} from "@/api/modules/jxjview";
|
||||
|
||||
const router = useRouter();
|
||||
@ -124,21 +134,22 @@ const diaTableData = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
startTime: "",
|
||||
status: 0
|
||||
status: ""
|
||||
});
|
||||
const form = reactive({
|
||||
const form = ref({
|
||||
dictType: "",
|
||||
dictLabel: "",
|
||||
dictSort: 1,
|
||||
status: 1,
|
||||
remark: ""
|
||||
status: "",
|
||||
remark: "",
|
||||
dictValue: ""
|
||||
});
|
||||
|
||||
// 添加数据按钮
|
||||
const handleAddItem = () => {
|
||||
mode.value = "add";
|
||||
visible.value = true;
|
||||
title.value = "新增";
|
||||
title.value = "新增字典类型";
|
||||
formData.value = reactive({});
|
||||
};
|
||||
|
||||
@ -146,16 +157,18 @@ const handleAddItem = () => {
|
||||
function handleEditItem(index: string, row: any) {
|
||||
mode.value = "edit";
|
||||
visible.value = true;
|
||||
title.value = "编辑";
|
||||
title.value = "编辑字典类型";
|
||||
formData.value = reactive(row);
|
||||
console.log(formData);
|
||||
}
|
||||
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{
|
||||
prop: "dictId",
|
||||
label: "序号"
|
||||
},
|
||||
// {
|
||||
// prop: "dictId",
|
||||
// label: "序号"
|
||||
// },
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{
|
||||
prop: "dictName",
|
||||
label: "字典名称",
|
||||
@ -178,11 +191,11 @@ const columns: ColumnProps[] = [
|
||||
},
|
||||
{
|
||||
prop: "status",
|
||||
label: "状态",
|
||||
enum: [
|
||||
{ label: "正常", value: "1" },
|
||||
{ label: "停用", value: "0" }
|
||||
]
|
||||
label: "状态"
|
||||
// enum: [
|
||||
// { label: "正常", value: "1" },
|
||||
// { label: "停用", value: "0" }
|
||||
// ]
|
||||
// search: { el: "select" }
|
||||
},
|
||||
{ prop: "remark", label: "备注" },
|
||||
@ -198,7 +211,7 @@ const formConfig = {
|
||||
formItemConfig: [
|
||||
{
|
||||
label: "字典名称",
|
||||
prop: "dictValue",
|
||||
prop: "dictName",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
@ -211,8 +224,8 @@ const formConfig = {
|
||||
prop: "status",
|
||||
type: "radio",
|
||||
data: [
|
||||
{ label: "正常", value: "1" },
|
||||
{ label: "停用", value: "0" }
|
||||
{ label: "正常", value: 1 },
|
||||
{ label: "停用", value: 0 }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -252,18 +265,34 @@ const dataCallback = (data: any) => {
|
||||
const typeVisable = async (dictType: string) => {
|
||||
// console.log(111);
|
||||
dialogTableVisible.value = true;
|
||||
form.dictType = dictType;
|
||||
form.value.dictType = dictType;
|
||||
diaTableData.dictType = dictType;
|
||||
const res = await getDiaTabList(diaTableData);
|
||||
// console.log(dictType);
|
||||
const res = await getDictionaryDetail(diaTableData);
|
||||
gridData.value = res.result.records;
|
||||
};
|
||||
|
||||
const DiaAddItem = async (dictType: string) => {
|
||||
title.value = "新增字典数据";
|
||||
DiaVisible.value = true;
|
||||
// form = reactive({});
|
||||
// console.log(dictType);
|
||||
const DiaAddItem = async (index: number, row: any) => {
|
||||
if (index === 2) {
|
||||
// console.log(2);
|
||||
|
||||
DiaVisible.value = true;
|
||||
title.value = "编辑字典数据";
|
||||
// row.status = Number(row.status);
|
||||
form.value = reactive({ ...row });
|
||||
console.log("编辑", row);
|
||||
} else {
|
||||
// console.log("新增", row);
|
||||
form.value = reactive({
|
||||
dictType: diaTableData.dictType,
|
||||
dictLabel: "",
|
||||
dictSort: 1,
|
||||
status: "",
|
||||
remark: "",
|
||||
dictValue: ""
|
||||
});
|
||||
title.value = "新增字典数据";
|
||||
DiaVisible.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
// 如果你想在请求之前对当前请求参数做一些操作,可以自定义如下函数:params 为当前所有的请求参数(包括分页),最后返回请求列表接口
|
||||
@ -276,11 +305,6 @@ const getTableList = (params: any) => {
|
||||
return getDictionaryList(newParams);
|
||||
};
|
||||
|
||||
const getDiaTabList = async (params: any) => {
|
||||
await getDictionaryDetail(params);
|
||||
return getDictionaryDetail(params);
|
||||
};
|
||||
|
||||
// 新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
if (form.dictId) {
|
||||
@ -295,12 +319,18 @@ const saveItem = async (form: any) => {
|
||||
}
|
||||
visible.value = false;
|
||||
};
|
||||
|
||||
// 编辑字典类型
|
||||
const DiaSubmit = async (form: any) => {
|
||||
const res = await addDiaDictionary(form);
|
||||
ElMessage.success("新增成功");
|
||||
if (!form.dictCode) {
|
||||
const res = await addDiaDictionary(form);
|
||||
ElMessage.success("新增成功");
|
||||
} else {
|
||||
await editDiaDictionary(form);
|
||||
ElMessage.success("编辑成功");
|
||||
}
|
||||
DiaVisible.value = false;
|
||||
getDiaTabList(diaTableData);
|
||||
const res1 = await getDictionaryDetail(diaTableData);
|
||||
gridData.value = res1.result.records;
|
||||
};
|
||||
|
||||
// 删除用户信息
|
||||
@ -312,6 +342,12 @@ const deleteAccount = async (params: jxj_User.ResUserList) => {
|
||||
// 删除弹窗用户信息
|
||||
const DeleteBtn = async (params: jxj_User.ResUserList) => {
|
||||
await useHandleData(deleteDia, { id: params.dictCode }, `删除【${params.dictValue}】用户`);
|
||||
proTable.value.getTableList();
|
||||
const res1 = await getDictionaryDetail(diaTableData);
|
||||
gridData.value = res1.result.records;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -16,7 +16,16 @@
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="scope">
|
||||
<el-button type="primary" link :icon="Delete" @click="onConfiguration(scope.row)">授权配置</el-button>
|
||||
<el-button type="primary" link :icon="Stamp" @click="onConfiguration(scope.row)">授权配置</el-button>
|
||||
</template>
|
||||
<template #state="{ row }">
|
||||
<!-- <el-button type="primary" link :icon="Delete" @click="onConfiguration(.row)">授权配置</el-button> -->
|
||||
{{ row.state === 1 ? "启用" : "停用" }}
|
||||
</template>
|
||||
authProject
|
||||
<template #authProject="{ row }">
|
||||
<!-- <el-button type="primary" link :icon="Delete" @click="onConfiguration(.row)">授权配置</el-button> -->
|
||||
{{ row.installProject + "/" + row.authProject }}
|
||||
</template>
|
||||
</ProTable>
|
||||
<el-dialog v-model="configureDialogVisible" title="授权配置" show-close>
|
||||
@ -58,7 +67,13 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="到期日期:">
|
||||
<el-date-picker type="date" v-model="form.expireTime" format="YYYY/MM/DD" placeholder="请选择" />
|
||||
<el-date-picker
|
||||
type="date"
|
||||
format="YYYY/MM/DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-model="form.expireTime"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -73,7 +88,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="授权项目数:">
|
||||
<el-input-number v-model="form.authProject" :min="1" :max="10" />
|
||||
<el-input-number v-model="form.authProject" :min="0" :max="999" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -81,9 +96,10 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选择系统版本:">
|
||||
<el-radio-group @change="onRadio" v-model="form.moduleStyle">
|
||||
<el-radio :label="1">标准版</el-radio>
|
||||
<!-- <el-radio :label="1">标准版</el-radio>
|
||||
<el-radio :label="2">星璇版</el-radio>
|
||||
<el-radio :label="3">衢州版</el-radio>
|
||||
<el-radio :label="3">衢州版</el-radio> -->
|
||||
<el-radio v-for="item in optionStyle" :label="`${item.value}`">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -136,14 +152,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="jxjSystem">
|
||||
import { ref, reactive } from "vue";
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { User } from "@/api/interface";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import { CirclePlus, Delete, EditPen, Download, Upload, View, Refresh, CircleCloseFilled } from "@element-plus/icons-vue";
|
||||
import { CirclePlus, Delete, EditPen, Download, Upload, View, Refresh, CircleCloseFilled, Stamp } from "@element-plus/icons-vue";
|
||||
import {
|
||||
getGovermentList,
|
||||
addGovernment,
|
||||
@ -151,7 +167,8 @@ import {
|
||||
getGoverDetail,
|
||||
getGoverType,
|
||||
getGoverForm,
|
||||
editGoverCheck
|
||||
editGoverCheck,
|
||||
getDicList
|
||||
} from "@/api/modules/jxjview";
|
||||
|
||||
const router = useRouter();
|
||||
@ -169,6 +186,8 @@ const governmentSelectList = ref([]);
|
||||
const projectSelectList = ref([]);
|
||||
const companySelectList = ref([]);
|
||||
|
||||
const optionStyle = ref([]);
|
||||
|
||||
// const government = ref([]);
|
||||
// 添加数据按钮
|
||||
const handleAddItem = () => {
|
||||
@ -181,10 +200,11 @@ function handleEditItem(index: string, row: any) {}
|
||||
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{
|
||||
prop: "governmentId",
|
||||
label: "序号"
|
||||
},
|
||||
// {
|
||||
// prop: "governmentId",
|
||||
// label: "序号"
|
||||
// },
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{
|
||||
prop: "governmentName",
|
||||
label: "政务名称",
|
||||
@ -247,7 +267,7 @@ const form = ref({
|
||||
governmentSn: ""
|
||||
});
|
||||
|
||||
const AuthIdData = ref([]);
|
||||
// const AuthIdData = ref([]);
|
||||
|
||||
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||
const initParam = reactive({
|
||||
@ -314,10 +334,11 @@ const onSubmitConfig = async () => {
|
||||
});
|
||||
}
|
||||
});
|
||||
await editGovernment(form.value).then(res => {
|
||||
editGoverCheck(checkItem.value);
|
||||
await editGovernment(form.value).then(async res => {
|
||||
await editGoverCheck(checkItem.value);
|
||||
ElMessage.success("保存成功");
|
||||
configureDialogVisible.value = false;
|
||||
await proTable.value.getTableList();
|
||||
});
|
||||
};
|
||||
// 授权配置btn
|
||||
@ -344,6 +365,16 @@ const onConfiguration = async (row: any) => {
|
||||
});
|
||||
});
|
||||
};
|
||||
onMounted(async () => {
|
||||
const res = await getDicList({ dictType: "module_style_type" });
|
||||
optionStyle.value = res.result.map(i => {
|
||||
return {
|
||||
label: i.dictValue,
|
||||
value: i.dictLabel
|
||||
};
|
||||
});
|
||||
// console.log(optionStyle.value);
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.littleTitle {
|
||||
|
||||
@ -21,19 +21,11 @@
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #moduleType="{ row }">
|
||||
<!-- <template #moduleType="{ row }">
|
||||
{{
|
||||
row.moduleType == 1
|
||||
? "jxjadmin模块"
|
||||
: row.moduleType == 2
|
||||
? "政务模块"
|
||||
: row.moduleType == 3
|
||||
? "企业模块"
|
||||
: row.moduleType == 4
|
||||
? "项目模块"
|
||||
: ""
|
||||
row.moduleType == moduleTypeName
|
||||
}}
|
||||
</template>
|
||||
</template> -->
|
||||
<template #appShow="{ row }">
|
||||
<!-- <el-button type="primary" @click="handleAddItem()">新增</el-button> -->
|
||||
{{ row.appShow == 1 ? "是" : "否" }}
|
||||
@ -41,11 +33,11 @@
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link :icon="Menu" @click="onmenuManage(row)">菜单管理</el-button>
|
||||
<el-button type="primary" link :icon="EditPen" @click="handleEditItem('edit', row)">编辑</el-button>
|
||||
<el-button type="primary" link :icon="Delete" @click="deleteAccount(row)">删除</el-button>
|
||||
<el-button type="danger" link :icon="Delete" @click="deleteAccount(row)">删除</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
<el-dialog v-model="dialogMenuVisible" title="菜单管理" append-to-body ref="DialogTable" width="800px" height="800px">
|
||||
<el-dialog v-model="dialogMenuVisible" title="菜单管理" append-to-body ref="DialogTable" width="800px">
|
||||
<el-button type="primary" style="margin-top: -24px" @click="DiaAddItem(toTag)">新增</el-button>
|
||||
<el-table :data="gridData">
|
||||
<el-table-column property="menuName" label="菜单名称" width="150" />
|
||||
@ -59,7 +51,7 @@
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link :icon="Menu" @click="onBtnManage(scope.row)">按钮管理</el-button>
|
||||
<el-button type="primary" link :icon="EditPen" @click="onEditItem(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" link :icon="Delete" @click="deleteMenu(scope.row)">删除</el-button>
|
||||
<el-button type="danger" link :icon="Delete" @click="deleteMenu(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -79,7 +71,7 @@
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link :icon="EditPen" @click="onDiabtnAdd(2, scope.row)">编辑</el-button>
|
||||
<el-button type="primary" link :icon="Delete" @click="onBtnDelete(scope.row)">删除</el-button>
|
||||
<el-button type="danger" link :icon="Delete" @click="onBtnDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -198,10 +190,11 @@ import {
|
||||
deleteAction,
|
||||
getDicList
|
||||
} from "@/api/modules/jxjview";
|
||||
import { array } from "snabbdom";
|
||||
|
||||
const router = useRouter();
|
||||
const type = ref("");
|
||||
const style = ref("");
|
||||
const type = ref("政务后台");
|
||||
const style = ref("标准版");
|
||||
// 页面新增和编辑
|
||||
const visible = ref(false);
|
||||
const dialogMenuVisible = ref(false);
|
||||
@ -214,6 +207,8 @@ const fatherNameTo = ref([]);
|
||||
const toTag = ref([{ moduleName: "", moduleId: "" }]);
|
||||
const title = ref("");
|
||||
const formData = ref({});
|
||||
// 页面表格模块类型
|
||||
// const moduleType = ref("");
|
||||
// 获取字典风格
|
||||
const diaTableData = reactive({
|
||||
dictType: "module_style_type"
|
||||
@ -286,7 +281,7 @@ function handleEditItem(index: string, row: any) {
|
||||
}
|
||||
|
||||
// 按钮管理的新增
|
||||
const onDiabtnAdd = (index, row) => {
|
||||
const onDiabtnAdd = (index: number, row) => {
|
||||
if (index === 1) {
|
||||
formbtnData.value = reactive({ actionName: "", actionCode: "", status: "", menuId: "" });
|
||||
btnvisible.value = true;
|
||||
@ -307,6 +302,9 @@ const DiaAddItem = async (val: any) => {
|
||||
const onEditItem = async (row: any) => {
|
||||
addOrEditDialogVisibleMenu.value = true;
|
||||
title.value = "编辑菜单";
|
||||
// if ((row.parentId = "0")) {
|
||||
// formMenu.value.parentId = "无";
|
||||
// }
|
||||
formMenu.value = reactive({ ...row });
|
||||
};
|
||||
|
||||
@ -315,7 +313,7 @@ const onmenuManage = async (row: any) => {
|
||||
title.value = "菜单管理";
|
||||
dialogMenuVisible.value = true;
|
||||
toTag.value = [{ moduleName: row.moduleName, moduleId: row.moduleId }];
|
||||
const res = await getMenuTabList({ moduleId: row.moduleId });
|
||||
const res = await menuList({ moduleId: row.moduleId });
|
||||
gridData.value = res.result;
|
||||
fatherNameTo.value = res.result.filter(i => {
|
||||
return {
|
||||
@ -327,14 +325,14 @@ const onmenuManage = async (row: any) => {
|
||||
};
|
||||
|
||||
// 菜单管理的表格
|
||||
const getMenuTabList = async (params: any) => {
|
||||
const res = await menuList(params);
|
||||
gridData.value = res.result;
|
||||
return menuList(params);
|
||||
};
|
||||
// const getMenuTabList = async (params: any) => {
|
||||
// const res = await menuList(params);
|
||||
// gridData.value = res.result;
|
||||
// // return menuList(params);
|
||||
// };
|
||||
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
const columns: ColumnProps[] = reactive([
|
||||
{
|
||||
prop: "labelName",
|
||||
label: "标签名称"
|
||||
@ -351,12 +349,12 @@ const columns: ColumnProps[] = [
|
||||
{ prop: "moduleIconChecked", label: "解锁模块图标" },
|
||||
{ prop: "moduleIconNormal", label: "未解锁模块图标" },
|
||||
{
|
||||
prop: "moduleType",
|
||||
prop: "moduleTypeName",
|
||||
label: "模块类型"
|
||||
},
|
||||
{ prop: "appShow", label: "是否在APP端显示" },
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 330 }
|
||||
];
|
||||
]);
|
||||
|
||||
// 弹窗中的配置
|
||||
const formConfig = reactive({
|
||||
@ -369,7 +367,7 @@ const formConfig = reactive({
|
||||
{
|
||||
label: "标签排序",
|
||||
prop: "labelSortNum",
|
||||
type: "input"
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "模块名称",
|
||||
@ -486,8 +484,8 @@ const formbtnConfig = {
|
||||
|
||||
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||
const initParam = reactive({
|
||||
moduleType: "",
|
||||
styleType: ""
|
||||
moduleType: "2",
|
||||
styleType: "1"
|
||||
});
|
||||
|
||||
// dataCallback 是对于返回的表格数据做处理,如果你后台返回的数据不是 list && total && pageNum && pageSize 这些字段,那么你可以在这里进行处理成这些字段
|
||||
@ -546,7 +544,8 @@ const onSubmitMenu = async (form: any) => {
|
||||
ElMessage.success("新增成功");
|
||||
}
|
||||
addOrEditDialogVisibleMenu.value = false;
|
||||
getMenuTabList({ moduleId: form.moduleId });
|
||||
const res = await menuList({ moduleId: form.moduleId });
|
||||
gridData.value = res.result;
|
||||
};
|
||||
|
||||
const getBtnTabList = async (params: any) => {
|
||||
@ -570,7 +569,8 @@ const deleteAccount = async (params: jxj_User.ResUserList) => {
|
||||
// 删除系统菜单信息
|
||||
const deleteMenu = async (params: jxj_User.ResUserList) => {
|
||||
await useHandleData(deletesysMenu, { menuId: params.menuId }, `删除【${params.username}】用户`);
|
||||
await menuList({ moduleId: params.moduleId });
|
||||
const res = await menuList({ moduleId: params.moduleId });
|
||||
gridData.value = res.result;
|
||||
};
|
||||
// 删除按钮信息
|
||||
const onBtnDelete = async (params: jxj_User.ResUserList) => {
|
||||
@ -578,11 +578,11 @@ const onBtnDelete = async (params: jxj_User.ResUserList) => {
|
||||
getBtnTabList({ menuId: params.menuId });
|
||||
};
|
||||
|
||||
const onChangeStyle = async (val: number) => {
|
||||
const onChangeStyle = async (val: string) => {
|
||||
initParam.styleType = val;
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
const onChangeType = async (val: number) => {
|
||||
const onChangeType = async (val: string) => {
|
||||
initParam.moduleType = val;
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
@ -595,7 +595,7 @@ onMounted(async () => {
|
||||
value: i.dictLabel
|
||||
};
|
||||
});
|
||||
formConfig.formItemConfig[3].data = optionStyle.value;
|
||||
|
||||
const res1 = await getDicList(diaTableType);
|
||||
optionType.value = res1.result.map(i => {
|
||||
return {
|
||||
@ -603,6 +603,16 @@ onMounted(async () => {
|
||||
value: i.dictLabel
|
||||
};
|
||||
});
|
||||
formConfig.formItemConfig[4].data = optionType.value;
|
||||
formConfig.formItemConfig[4].data = optionStyle.value;
|
||||
formConfig.formItemConfig[3].data = optionType.value;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-select--default) {
|
||||
width: 100%;
|
||||
}
|
||||
:deep(.el-dialog__body) {
|
||||
min-height: 300px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -14,15 +14,15 @@
|
||||
>
|
||||
<!-- 表格 header 按钮 -->
|
||||
<!-- <template #tableHeader="scope">
|
||||
<el-button type="primary" :icon="CirclePlus" @click="handleAddItem()">新增用户</el-button>
|
||||
</template> -->
|
||||
<el-button type="primary" :icon="CirclePlus" @click="handleAddItem()">新增用户</el-button>
|
||||
</template> -->
|
||||
<template #formButton="scope">
|
||||
<el-button type="primary" @click="handleAddItem()">新增</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="scope">
|
||||
<el-button type="primary" link :icon="EditPen" @click="handleEditItem('edit', scope.row)">编辑</el-button>
|
||||
<el-button type="primary" link :icon="Delete" @click="deleteAccount(scope.row)">删除</el-button>
|
||||
<el-button type="danger" link :icon="Delete" @click="deleteAccount(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
|
||||
@ -64,7 +64,7 @@ const proTable = ref();
|
||||
const handleAddItem = () => {
|
||||
mode.value = "add";
|
||||
visible.value = true;
|
||||
title.value = "新增";
|
||||
title.value = "新增配置";
|
||||
formData.value = reactive({});
|
||||
};
|
||||
|
||||
@ -72,16 +72,17 @@ const handleAddItem = () => {
|
||||
function handleEditItem(index: string, row: any) {
|
||||
mode.value = "edit";
|
||||
visible.value = true;
|
||||
title.value = "编辑";
|
||||
title.value = "编辑配置";
|
||||
formData.value = reactive(row);
|
||||
}
|
||||
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{
|
||||
prop: "configId",
|
||||
label: "序号"
|
||||
},
|
||||
// {
|
||||
// prop: "configId",
|
||||
// label: "序号"
|
||||
// },
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{
|
||||
prop: "configKey",
|
||||
label: "配置名称",
|
||||
|
||||
@ -107,6 +107,8 @@ const projectLogon = () => {
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
console.log(import.meta.env.VITE_API_URL);
|
||||
|
||||
// 监听enter事件(调用登录)
|
||||
document.onkeydown = (e: any) => {
|
||||
e = window.event || e;
|
||||
|
||||
@ -43,7 +43,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||
// 跨域代理配置
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://139.9.66.234:6688", // easymock
|
||||
target: viteEnv.VITE_API_URL, // easymock
|
||||
// target: "https://www.fastmock.site/mock/f81e8333c1a9276214bcdbc170d9e0a0", // fastmock
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, "")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user