mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	fix: sql脚本默认账号密码调整&终端默认配色调整
This commit is contained in:
		@@ -107,11 +107,11 @@ const themeConfigModule: Module<ThemeConfigState, RootStateTypes> = {
 | 
				
			|||||||
            layout: 'classic',
 | 
					            layout: 'classic',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // ssh终端字体颜色
 | 
					            // ssh终端字体颜色
 | 
				
			||||||
            terminalForeground: '#7e9192',
 | 
					            terminalForeground: '#d0d0d0',
 | 
				
			||||||
            // ssh终端背景色
 | 
					            // ssh终端背景色
 | 
				
			||||||
            terminalBackground: '#002833',
 | 
					            terminalBackground: '#1c1c1c',
 | 
				
			||||||
            // ssh终端cursor色
 | 
					            // ssh终端cursor色
 | 
				
			||||||
            terminalCursor: '#268F81',
 | 
					            terminalCursor: '#e4c9af',
 | 
				
			||||||
            terminalFontSize: 15,
 | 
					            terminalFontSize: 15,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -100,9 +100,17 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                <el-button type="primary" size="small" @click="tableCreateDialog.visible = true">创建表</el-button>
 | 
					                <el-button type="primary" size="small" @click="tableCreateDialog.visible = true">创建表</el-button>
 | 
				
			||||||
            </el-row>
 | 
					            </el-row>
 | 
				
			||||||
            <el-table v-loading="tableInfoDialog.loading" border stripe :data="tableInfoDialog.infos" size="small">
 | 
					            <el-table v-loading="tableInfoDialog.loading" border stripe :data="filterTableInfos" size="small">
 | 
				
			||||||
                <el-table-column property="tableName" label="表名" min-width="150" show-overflow-tooltip></el-table-column>
 | 
					                <el-table-column property="tableName" label="表名" min-width="150" show-overflow-tooltip>
 | 
				
			||||||
                <el-table-column property="tableComment" label="备注" min-width="150" show-overflow-tooltip></el-table-column>
 | 
					                    <template #header>
 | 
				
			||||||
 | 
					                        <el-input v-model="tableInfoDialog.tableNameSearch" size="small" placeholder="表名: 输入可过滤" clearable />
 | 
				
			||||||
 | 
					                    </template>
 | 
				
			||||||
 | 
					                </el-table-column>
 | 
				
			||||||
 | 
					                <el-table-column property="tableComment" label="备注" min-width="150" show-overflow-tooltip>
 | 
				
			||||||
 | 
					                    <template #header>
 | 
				
			||||||
 | 
					                        <el-input v-model="tableInfoDialog.tableCommentSearch" size="small" placeholder="备注: 输入可过滤" clearable />
 | 
				
			||||||
 | 
					                    </template>
 | 
				
			||||||
 | 
					                </el-table-column>
 | 
				
			||||||
                <el-table-column
 | 
					                <el-table-column
 | 
				
			||||||
                    prop="tableRows"
 | 
					                    prop="tableRows"
 | 
				
			||||||
                    label="Rows"
 | 
					                    label="Rows"
 | 
				
			||||||
@@ -244,7 +252,7 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang='ts'>
 | 
					<script lang='ts'>
 | 
				
			||||||
import { toRefs, reactive, onMounted, defineComponent } from 'vue';
 | 
					import { toRefs, reactive, computed, onMounted, defineComponent } from 'vue';
 | 
				
			||||||
import { ElMessage, ElMessageBox } from 'element-plus';
 | 
					import { ElMessage, ElMessageBox } from 'element-plus';
 | 
				
			||||||
import { formatByteSize } from '@/common/utils/format';
 | 
					import { formatByteSize } from '@/common/utils/format';
 | 
				
			||||||
import DbEdit from './DbEdit.vue';
 | 
					import DbEdit from './DbEdit.vue';
 | 
				
			||||||
@@ -317,6 +325,8 @@ export default defineComponent({
 | 
				
			|||||||
                loading: false,
 | 
					                loading: false,
 | 
				
			||||||
                visible: false,
 | 
					                visible: false,
 | 
				
			||||||
                infos: [],
 | 
					                infos: [],
 | 
				
			||||||
 | 
					                tableNameSearch: '',
 | 
				
			||||||
 | 
					                tableCommentSearch: '',
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            columnDialog: {
 | 
					            columnDialog: {
 | 
				
			||||||
                visible: false,
 | 
					                visible: false,
 | 
				
			||||||
@@ -345,6 +355,26 @@ export default defineComponent({
 | 
				
			|||||||
            state.projects = await projectApi.accountProjects.request(null);
 | 
					            state.projects = await projectApi.accountProjects.request(null);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        const filterTableInfos = computed(() => {
 | 
				
			||||||
 | 
					            const infos = state.tableInfoDialog.infos;
 | 
				
			||||||
 | 
					            const tableNameSearch = state.tableInfoDialog.tableNameSearch;
 | 
				
			||||||
 | 
					            const tableCommentSearch = state.tableInfoDialog.tableCommentSearch;
 | 
				
			||||||
 | 
					            if (!tableNameSearch && !tableCommentSearch) {
 | 
				
			||||||
 | 
					                return infos;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return infos.filter((data: any) => {
 | 
				
			||||||
 | 
					                let tnMatch = true;
 | 
				
			||||||
 | 
					                let tcMatch = true;
 | 
				
			||||||
 | 
					                if (tableNameSearch) {
 | 
				
			||||||
 | 
					                    tnMatch = data.tableName.toLowerCase().includes(tableNameSearch.toLowerCase());
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                if (tableCommentSearch) {
 | 
				
			||||||
 | 
					                    tcMatch = data.tableComment.includes(tableCommentSearch);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                return tnMatch && tcMatch;
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const choose = (item: any) => {
 | 
					        const choose = (item: any) => {
 | 
				
			||||||
            if (!item) {
 | 
					            if (!item) {
 | 
				
			||||||
                return;
 | 
					                return;
 | 
				
			||||||
@@ -572,6 +602,7 @@ export default defineComponent({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            ...toRefs(state),
 | 
					            ...toRefs(state),
 | 
				
			||||||
 | 
					            filterTableInfos,
 | 
				
			||||||
            enums,
 | 
					            enums,
 | 
				
			||||||
            search,
 | 
					            search,
 | 
				
			||||||
            choose,
 | 
					            choose,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,9 +65,9 @@ export default defineComponent({
 | 
				
			|||||||
                // cursorStyle: 'underline', //光标样式
 | 
					                // cursorStyle: 'underline', //光标样式
 | 
				
			||||||
                disableStdin: false,
 | 
					                disableStdin: false,
 | 
				
			||||||
                theme: {
 | 
					                theme: {
 | 
				
			||||||
                    foreground: getThemeConfig.value.terminalForeground || '#7e9192', //字体
 | 
					                    foreground: getThemeConfig.value.terminalForeground || '#d0d0d0', //字体
 | 
				
			||||||
                    background: getThemeConfig.value.terminalBackground || '#002833', //背景色
 | 
					                    background: getThemeConfig.value.terminalBackground || '#1c1c1c', //背景色
 | 
				
			||||||
                    cursor: getThemeConfig.value.terminalCursor || '#268F81', //设置光标
 | 
					                    cursor: getThemeConfig.value.terminalCursor || '#e4c9af', //设置光标
 | 
				
			||||||
                } as any,
 | 
					                } as any,
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            const fitAddon = new FitAddon();
 | 
					            const fitAddon = new FitAddon();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,6 +21,9 @@ func PwdAesEncrypt(password string) string {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// 使用config.yml的aes.key进行密码解密
 | 
					// 使用config.yml的aes.key进行密码解密
 | 
				
			||||||
func PwdAesDecrypt(encryptPwd string) string {
 | 
					func PwdAesDecrypt(encryptPwd string) string {
 | 
				
			||||||
 | 
						if encryptPwd == "" {
 | 
				
			||||||
 | 
							return ""
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	aes := config.Conf.Aes
 | 
						aes := config.Conf.Aes
 | 
				
			||||||
	if aes == nil {
 | 
						if aes == nil {
 | 
				
			||||||
		return encryptPwd
 | 
							return encryptPwd
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -260,7 +260,7 @@ DROP TABLE IF EXISTS `t_redis`;
 | 
				
			|||||||
CREATE TABLE `t_redis` (
 | 
					CREATE TABLE `t_redis` (
 | 
				
			||||||
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 | 
					  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
 | 
				
			||||||
  `host` varchar(255) COLLATE utf8mb4_bin NOT NULL,
 | 
					  `host` varchar(255) COLLATE utf8mb4_bin NOT NULL,
 | 
				
			||||||
  `password` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
 | 
					  `password` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
 | 
				
			||||||
  `db` int(32) DEFAULT NULL,
 | 
					  `db` int(32) DEFAULT NULL,
 | 
				
			||||||
  `mode` varchar(32) DEFAULT NULL,
 | 
					  `mode` varchar(32) DEFAULT NULL,
 | 
				
			||||||
  `enable_ssh_tunnel` tinyint(2) DEFAULT NULL COMMENT '是否启用ssh隧道',
 | 
					  `enable_ssh_tunnel` tinyint(2) DEFAULT NULL COMMENT '是否启用ssh隧道',
 | 
				
			||||||
@@ -304,7 +304,7 @@ CREATE TABLE `t_sys_account` (
 | 
				
			|||||||
-- Records of t_sys_account
 | 
					-- Records of t_sys_account
 | 
				
			||||||
-- ----------------------------
 | 
					-- ----------------------------
 | 
				
			||||||
BEGIN;
 | 
					BEGIN;
 | 
				
			||||||
INSERT INTO `t_sys_account` VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, '2021-11-17 16:30:02', '12.0.216.228', '2020-01-01 19:00:00', 1, 'admin', '2020-01-01 19:00:00', 1, 'admin');
 | 
					INSERT INTO `t_sys_account` VALUES (1, 'admin', '$2a$10$w3Wky2U.tinvR7c/s0aKPuwZsIu6pM1/DMJalwBDMbE6niHIxVrrm', 1, '2021-11-17 16:30:02', '12.0.216.228', '2020-01-01 19:00:00', 1, 'admin', '2020-01-01 19:00:00', 1, 'admin');
 | 
				
			||||||
COMMIT;
 | 
					COMMIT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- ----------------------------
 | 
					-- ----------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,4 +10,4 @@
 | 
				
			|||||||
服务关闭:./shutdown.sh
 | 
					服务关闭:./shutdown.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
直接通过 host:ip即可访问项目
 | 
					直接通过 host:ip即可访问项目
 | 
				
			||||||
初始账号 admin/123456
 | 
					初始账号 admin/admin123.
 | 
				
			||||||
		Reference in New Issue
	
	Block a user