1625fb292d
- 全站业务状态标签文字化,el-tag.status-text 转为纯文本,统一字号、行高和基线对齐 - 临时额度详情弹窗加宽 label 列宽至 180px,避免标签折成三行 - 年检记录费用字段将单位“元”移至标签内,清理无效 append 配置和 template 代码 - 维修记录里程字段单位动态显示于标签,移除输入框右侧单位后缀 - 全站 Avue CRUD 弹窗标题自动添加页面全称,支持手动覆盖和自定义 - 合同管理独立表单页顶部补充“新增合同管理”标题,统一与其它表单页面样式 - 结算-正式结算页表格整合到“应付/应收”两个标签页内,复用组件并调整操作列宽度至320px - 业务相关弹窗和组件统一支持 dialogCustomClass 传递及样式适配 - 取消部分页面样式中冗余或注释代码,调整组件内按钮布局和权限判断函数逻辑 - 新增全局 mixin 以设置 CRUD 弹窗标题,主入口 main.js 注册相关初始化函数
117 lines
4.2 KiB
JavaScript
117 lines
4.2 KiB
JavaScript
import { createApp } from 'vue';
|
|
import website from './config/website';
|
|
import axios from './axios';
|
|
import router from './router/';
|
|
import store from './store';
|
|
import i18n from './lang/';
|
|
import { language, messages } from './lang/';
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
|
|
import ElementPlus from 'element-plus';
|
|
import 'element-plus/dist/index.css';
|
|
import Avue from '@smallwei/avue';
|
|
import '@smallwei/avue/lib/index.css';
|
|
import avueUeditor from 'avue-plugin-ueditor';
|
|
import crudCommon from '@/mixins/crud.js';
|
|
import { getScreen, findColumn } from './utils/util';
|
|
import { setupPaginationEnhancer } from './utils/pagination';
|
|
import { setupDialogFormLabelAlign } from './utils/dialog-form-label';
|
|
import { setupTableColumnDrag } from './utils/table-column-drag';
|
|
import { setupCrudDialogTitle } from './utils/crud-dialog-title';
|
|
import './permission';
|
|
import error from './error';
|
|
import App from './App.vue';
|
|
import 'animate.css';
|
|
import dayjs from 'dayjs';
|
|
import 'styles/common.scss';
|
|
// 系统组件
|
|
import debug from './debug';
|
|
import VueClipboard from 'vue3-clipboard';
|
|
import highlight from './components/highlight/main.vue';
|
|
import codeEditor from './components/code-editor/main.vue';
|
|
import cronEditor from './components/cron-editor/main.vue';
|
|
import basicBlock from './components/basic-block/main.vue';
|
|
import basicContainer from './components/basic-container/main.vue';
|
|
import emptyPagination from './components/empty-pagination/main.vue';
|
|
import vehicleAttachmentUpload from './components/vehicle-attachment-upload/main.vue';
|
|
import thirdRegister from './components/third-register/main.vue';
|
|
import flowDesign from './components/flow-design/main.vue';
|
|
import flowDesignStep from './components/flow-design-step/main.vue';
|
|
// 业务组件
|
|
import codeSetting from './views/tool/codesetting.vue';
|
|
import formSetting from './views/tool/formsetting.vue';
|
|
import tenantPackage from './views/system/tenantpackage.vue';
|
|
import tenantDatasource from './views/system/tenantdatasource.vue';
|
|
// 通用弹窗分组白卡(灰底弹窗内使用,标题在卡内)
|
|
import sectionCard from './components/section-card/main.vue';
|
|
|
|
window.$crudCommon = crudCommon;
|
|
debug();
|
|
window.axios = axios;
|
|
const app = createApp(App);
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
app.component(key, component);
|
|
}
|
|
app.component('basicContainer', basicContainer);
|
|
app.component('basicBlock', basicBlock);
|
|
app.component('emptyPagination', emptyPagination);
|
|
app.component('vehicleAttachmentUpload', vehicleAttachmentUpload);
|
|
app.component('highlight', highlight);
|
|
app.component('codeEditor', codeEditor);
|
|
app.component('cronEditor', cronEditor);
|
|
app.component('thirdRegister', thirdRegister);
|
|
app.component('flowDesign', flowDesign);
|
|
app.component('flowDesignStep', flowDesignStep);
|
|
app.component('codeSetting', codeSetting);
|
|
app.component('formSetting', formSetting);
|
|
app.component('tenantPackage', tenantPackage);
|
|
app.component('tenantDatasource', tenantDatasource);
|
|
app.component('sectionCard', sectionCard);
|
|
app.config.globalProperties.$app = app;
|
|
app.config.globalProperties.$dayjs = dayjs;
|
|
app.config.globalProperties.website = website;
|
|
app.config.globalProperties.getScreen = getScreen;
|
|
app.config.globalProperties.findColumn = findColumn;
|
|
app.use(error);
|
|
app.use(i18n);
|
|
app.use(store);
|
|
app.use(router);
|
|
app.use(ElementPlus, {
|
|
locale: messages[language],
|
|
table: { showOverflowTooltip: true },
|
|
});
|
|
app.use(Avue, {
|
|
axios,
|
|
calcHeight: 10,
|
|
crudOption: {
|
|
searchIcon: true,
|
|
searchIndex: 4,
|
|
searchLabelWidth: 88,
|
|
searchMenuSpan: 24,
|
|
searchMenuPosition: 'right',
|
|
menuWidth: 180,
|
|
showOverflowTooltip: true,
|
|
viewBtnIcon: ' ',
|
|
editBtnIcon: ' ',
|
|
copyBtnIcon: ' ',
|
|
delBtnIcon: ' ',
|
|
saveBtnIcon: ' ',
|
|
updateBtnIcon: ' ',
|
|
cancelBtnIcon: ' ',
|
|
mockBtnIcon: ' ',
|
|
},
|
|
labelPosition: 'right',
|
|
labelWidth: 'auto',
|
|
locale: language,
|
|
i18n: (key, options) => i18n.global.t(key, options),
|
|
});
|
|
app.use(avueUeditor, { axios });
|
|
app.use(VueClipboard, {
|
|
autoSetContainer: true,
|
|
appendToBody: true, // 这可以帮助解决一些更复杂的使用场景下的问题
|
|
});
|
|
setupTableColumnDrag(app);
|
|
setupCrudDialogTitle(app);
|
|
app.mount('#app');
|
|
setupPaginationEnhancer();
|
|
setupDialogFormLabelAlign();
|