commit:前端webpack版本

This commit is contained in:
Jerry
2024-07-14 22:11:19 +08:00
parent 8295a6a167
commit ed5b9fc602
47 changed files with 23209 additions and 5197 deletions

View File

@@ -9,7 +9,7 @@ watch(
() => route.name,
() => {
//console.log('路由发生了变化', route.name, route.fullPath, route.path, route);
document.title = import.meta.env.VITE_PROJECT_NAME;
document.title = process.env.VUE_APP_PROJECT_NAME;
if (route.meta && route.meta.title) {
document.title += ' - ' + route.meta.title;
}

View File

@@ -61,71 +61,71 @@ $--color-primary-light-9: color-mix(in srgb, $--color-white 90%, $--color-primar
/**
* 弹窗样式封装的layer的弹窗
**/
body .layer-dialog .layui-layer-title{
.layui-layer-page .layui-layer-title{
border:1px solid #01000000;
border-radius: 4px 4px 0 0;
background-color: #f8f8f8;
}
body .layer-dialog .slot-fragment {
.layui-layer-page .slot-fragment {
height: 100%;
}
body .layer-dialog .layui-layer-setwin {color: #fff}
.layui-layer-page .layui-layer-setwin {color: #fff}
body .layer-dialog {
.layui-layer-page {
border:1px solid #01000000;
border-radius: 4px;
}
body .layer-dialog .layui-layer-content {
.layui-layer-page .layui-layer-content {
padding: $box-padding-size;
}
body .layer-dialog.one_to_one_query .layui-layer-content {
.layui-layer-page.one_to_one_query .layui-layer-content {
padding: 0;
}
body .layer-dialog.layui-layer-iframe .layui-layer-content {
.layui-layer-page.layui-layer-iframe .layui-layer-content {
padding: 0!important;
}
/**
* 左树右表弹窗样式
*/
body .layer-advance-dialog {
.layer-advance-dialog {
background-color: #F8F8F8;
border:1px solid #01000000;
border-radius: 4px;
}
body .layer-advance-dialog .layui-layer-title{
.layer-advance-dialog .layui-layer-title{
border:1px solid #01000000;
border-radius: 4px 4px 0 0;
}
body .layer-advance-dialog .layui-layer-content {
.layer-advance-dialog .layui-layer-content {
padding: 5px 15px;
}
/**
* 全屏弹窗样式
*/
body .fullscreen-dialog {
.fullscreen-dialog {
background-color: #F8F8F8;
border: none;
border-radius: 0;
}
body .fullscreen-dialog .layui-layer-title {
.fullscreen-dialog .layui-layer-title {
display: none;
}
body .fullscreen-dialog .layui-layer-setwin {
.fullscreen-dialog .layui-layer-setwin {
display: none;
}
body .fullscreen-dialog .layui-layer-content {
.fullscreen-dialog .layui-layer-content {
height: 100vh!important;
padding: 0;
}
@@ -735,7 +735,7 @@ body .fullscreen-dialog .layui-layer-content {
border-radius: 8px;
line-height: 40px;
}
.logo {;
.logo {
display: inline-block;
padding-left: 0;
margin-right: 8px;

View File

@@ -19,10 +19,7 @@ export const useDate = () => {
statsType = allowStatsType.indexOf(statsType) === -1 ? 'day' : statsType;
if (statsType === 'datetime') format = 'YYYY-MM-DD HH:mm:ss';
//console.log('date', statsType, format, date);
const tempDate = date instanceof Date ? date : parseDate(date, format);
//console.log('tempDate', tempDate);
if (!tempDate) return undefined;
switch (statsType) {
case 'time':

View File

@@ -25,7 +25,6 @@ export const useDownload = () => {
},
)
.then(res => {
console.log('============= download', res);
const data = res instanceof Blob ? res : res.data;
if (data instanceof Blob) {
const url = window.URL.createObjectURL(data);
@@ -41,7 +40,6 @@ export const useDownload = () => {
}
})
.catch(e => {
console.error('============= download', e);
if (e instanceof Blob) {
const reader = new FileReader();
reader.onload = function () {

View File

@@ -16,14 +16,11 @@ export const useDropdown = <T>(options: DropdownOptions<T>) => {
const { loadData, isTree, idKey, parentIdKey } = finalOptions;
//console.log('dropdown', loadData, isTree, idKey, parentIdKey);
const loadDropdownData = (): Promise<T[]> => {
return new Promise((resolve, reject) => {
if (!loaded && !loading.value) {
loadData()
.then(res => {
console.log(`loadDropdownData 加载了${res.dataList.length}条数据`);
loaded = true;
dropdownList.value = isTree
? treeDataTranslate(res.dataList, idKey, parentIdKey)

View File

@@ -5,7 +5,6 @@ export const usePermissions = () => {
const loginStorage = useLoginStore();
const checkPermCodeExist = (permCode: string) => {
//console.log(permCode);
if (getAppId() != null && getAppId() !== '') return true;
if (loginStorage.userInfo == null) {

View File

@@ -35,7 +35,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
// 监听pageSize变化
watch(pageSize, (newVal, oldVal) => {
//console.log('pageSize change', newVal, oldVal);
if (newVal != oldVal) {
loadData(1, newVal)
.then(() => {
@@ -70,14 +69,8 @@ export const useTable = <T>(options: TableOptions<T>) => {
*/
const loadData = (pageNum: number, pageSize: number, reload = false): Promise<void> => {
if (paged && !reload && oldPage == pageNum && oldPageSize == pageSize) {
console.log('数据已加载,无须重复执行');
return Promise.resolve();
}
if (paged) {
console.log(`开始加载数据, 第${pageNum}页,每页${pageSize}, 强制加载:${reload}`);
} else {
console.log(`开始加载数据, 无分页, 强制加载:${reload}`);
}
const params = {} as RequestParam;
if (orderInfo.fieldName != null) params.orderParam = [orderInfo];
@@ -91,13 +84,11 @@ export const useTable = <T>(options: TableOptions<T>) => {
loading.value = true;
loadTableData(params)
.then(res => {
//console.log(res.dataList, res.totalCount);
// vxetable需要用到对象的hasOwnerProperty方法因此需要重新构造对象
dataList.value = res.dataList.map((item: T) => {
return { ...item };
});
totalCount.value = res.totalCount;
console.log(`本次加载${res.dataList.length}条数据,共有${res.totalCount}条数据`);
resolve();
})
.catch(e => {
@@ -105,7 +96,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
})
.finally(() => {
loading.value = false;
//console.log('加载数据完毕');
});
});
};
@@ -125,7 +115,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
* @param {String} order 正序还是倒序
*/
const onSortChange = ({ prop, field, order }: SortInfo) => {
//console.log(prop, field, order);
orderInfo.fieldName = prop || field;
orderInfo.asc = order == 'ascending' || order == 'asc';
refreshTable();
@@ -137,7 +126,6 @@ export const useTable = <T>(options: TableOptions<T>) => {
* @param showMsg 是否显示查询结果成功与否消息
*/
const refreshTable = (research = false, pageNum = 0, showMsg = false) => {
//console.log(research, pageNum, showMsg);
let reload = false;
if (research) {
if (!verifyTableParameter()) return;

View File

@@ -13,7 +13,7 @@ export const useUpload = () => {
* @returns {Array} 上传文件信息,[{name, downloadUri, filename, url}]
*/
const parseUploadData = (jsonData: string, params: ANY_OBJECT) => {
let pathList = [];
let pathList: Array<ANY_OBJECT> = [];
if (jsonData != null) {
try {
pathList = JSON.parse(jsonData);
@@ -39,7 +39,7 @@ export const useUpload = () => {
* @param {*} item 上传文件
* @param {*} params 上传文件的参数
*/
const getUploadFileUrl = (item: { downloadUri: string }, params?: ANY_OBJECT) => {
const getUploadFileUrl = (item: ANY_OBJECT, params?: ANY_OBJECT) => {
if (item == null || item.downloadUri == null) {
return null;
} else {
@@ -101,7 +101,6 @@ export const useUpload = () => {
},
)
.then((res: ANY_OBJECT) => {
console.log('uploaded file fetchUpload', res);
if (res.data && res.success) {
resolve(res.data);
}

View File

@@ -9,14 +9,13 @@ export const useUrlBuilder = () => {
* @returns 请求全路径(含参数)
*/
const buildGetUrl = (actionName: string, params: ANY_OBJECT | null = null) => {
console.log('getUrl', actionName);
const queryString = objectToQueryString(params);
if (actionName != null && actionName !== '') {
if (actionName.substring(0, 1) === '/') actionName = actionName.substring(1);
}
return (
import.meta.env.VITE_SERVER_HOST + actionName + (queryString == null ? '' : '?' + queryString)
process.env.VUE_APP_SERVER_HOST + actionName + (queryString == null ? '' : '?' + queryString)
);
};
@@ -25,14 +24,13 @@ export const useUrlBuilder = () => {
* @param actionName action方法名称
*/
const requestUrl = (actionName: string) => {
console.log('requestUrl', actionName);
if (actionName) {
if (actionName.substring(0, 1) === '/') actionName = actionName.substring(1);
}
if (actionName.indexOf('http://') === 0 || actionName.indexOf('https://') === 0) {
return actionName;
} else {
return import.meta.env.VITE_SERVER_HOST + actionName;
return process.env.VUE_APP_SERVER_HOST + actionName;
}
};

View File

@@ -12,7 +12,6 @@ const documentClientHeight = ref(0);
*/
export const useWindowResize = () => {
const windowResize = () => {
//console.log('窗口尺寸发生变化');
documentClientHeight.value = document.documentElement.clientHeight;
if (window.innerWidth <= WIDTH) {
layoutStore.defaultFormItemSize = 'default';

View File

@@ -23,7 +23,6 @@ const axiosInstance: AxiosInstance = axios.create({
},
transformResponse: [
function (data) {
//console.log('transformResponse', data);
if (typeof data === 'string') {
return JSONbig({ storeAsString: true }).parse(data);
} else {
@@ -58,7 +57,6 @@ const loginInvalid = () => {
// 创建响应拦截
axiosInstance.interceptors.response.use(
<T>(response: AxiosResponse): AxiosPromise<ResponseDataType<T>> => {
//console.log('axios response => ', response);
const { data, status } = response;
// 如果401响应放行至此执行此逻辑
if (status === 401) {
@@ -80,7 +78,6 @@ axiosInstance.interceptors.response.use(
if (response.headers['refreshedtoken'] != null) {
setToken(response.headers['refreshedtoken']);
}
//console.log('response', response, 'blob', response.data instanceof Blob);
// 判断请求是否成功
if (!(response.data instanceof Blob) && !response.data.success) {
return Promise.reject(new Error(response.data.errorMessage || 'error'));

View File

@@ -1,4 +1,4 @@
export const serverDefaultCfg = {
baseURL: import.meta.env.VITE_SERVER_HOST, // 请求基础地址,可根据环境自定义
baseURL: process.env.VUE_APP_SERVER_HOST, // 请求基础地址,可根据环境自定义
mockURL: '',
};

View File

@@ -61,26 +61,21 @@ class LoadingManager {
showMask() {
this.refCount++;
//console.log('loading >>>', this.refCount);
if (this.refCount <= 1 && this.loading == null) {
//console.log('loading do create serice');
this.loading = ElLoading.service(this.options);
}
}
hideMask() {
//console.log('loading hideMask', this.refCount);
if (this.refCount <= 1 && this.loading != null) {
this.loading.close();
this.loading = null;
//console.log('loading hideMask do close');
}
this.refCount--;
this.refCount = Math.max(0, this.refCount);
}
}
//console.log('new LoadingManager');
const loadingManager = new LoadingManager({
fullscreen: true,
background: 'rgba(0, 0, 0, 0.1)',
@@ -142,7 +137,6 @@ export async function commonRequest<D>(
...data,
...finalAxiosOption,
});
//console.log('result:', result);
if (result instanceof Blob || result.success) {
return Promise.resolve(result);
} else {
@@ -254,13 +248,6 @@ export const download = async (
method?: RequestMethods,
options?: RequestOption,
) => {
// console.log(
// 'download file url=%s, params:%s, filename:%s, options:%s',
// url,
// params,
// filename,
// options,
// );
return new Promise((resolve, reject) => {
downloadBlob(url, params, method, options)
.then(blobData => {
@@ -300,13 +287,11 @@ export const downloadBlob = (
const axiosOption: AxiosRequestConfig = {
responseType: 'blob',
transformResponse: function (data) {
//console.log(data);
return data instanceof Blob && data.size > 0 ? data : undefined;
},
};
commonRequest<Blob>(requestUrl(url), params, method, options, axiosOption)
.then(res => {
//console.log('download blob response >>>', res);
if (res instanceof Blob) {
const blobData = new Blob([res.data], { type: 'application/octet-stream' });
resolve(blobData);
@@ -337,7 +322,6 @@ export const downloadBlob = (
* @param options 请求设置(showMask-是否显示Loading层默认为trueshowError-是否显示错误信息默认为truethrottleFlag-是否开户节流默认为falsethrottleTimeout-节流时效默认为50毫秒)
*/
export const upload = async (url: string, params: ANY_OBJECT, options?: RequestOption) => {
//console.log('upload file url=%s, params:%s, options:%s', url, params, options);
const axiosOption: AxiosRequestConfig = {
headers: {
'Content-Type': 'multipart/form-data',

View File

@@ -1,5 +1,7 @@
import * as generatedDict from './generated';
import * as baseDict from './index';
export default {
...baseDict,
...generatedDict,
};

View File

@@ -0,0 +1,4 @@
import { DictionaryBase } from './types';
export {};

View File

@@ -274,7 +274,7 @@ export function setObjectToSessionStorage(key: string, value: ANY_OBJECT) {
* @param {*} defaultValue 默认值
*/
export function getObjectFromSessionStorage(key: string, defaultValue: ANY_OBJECT): ANY_OBJECT {
let jsonObj = null;
let jsonObj: ANY_OBJECT;
try {
const val: string | null = sessionStorage.getItem(key);
if (val == null) return defaultValue;
@@ -590,11 +590,9 @@ export function fileToBase64(file: File) {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = e => {
console.log('file loaded', e);
resolve(e.target?.result as string);
};
reader.onerror = e => {
console.warn('file load', e);
reject(e);
};
});
@@ -640,7 +638,6 @@ export function deepMerge(obj1: ANY_OBJECT, obj2: ANY_OBJECT) {
tempObj[key] = copyObject(val2);
}
} else if (Array.isArray(val2)) {
//console.log('......deepMerge.......', val1, val2, obj1, obj2);
// 如果两个值都是数组,则合并数组
if (Array.isArray(val1)) {
tempObj[key] = val2.map((arrVal2, index) => {

View File

@@ -149,7 +149,7 @@ const loadGroupData = () => {
}
if (currentGroup.value == null) currentGroup.value = dataList[0];
setTimeout(() => {
if (groupTree.value)
if (groupTree.value && currentGroup.value)
groupTree.value.setCurrentKey(currentGroup.value[props.treePanel.keyColumnName]);
}, 50);
})

View File

@@ -70,11 +70,10 @@ export class Dialog {
},
};
let layerOptions = {
let layerOptions: ANY_OBJECT = {
title: title,
type: 1,
skin:
'layer-dialog ' + (window.innerWidth <= 1900 ? 'container-default' : 'container-large'),
skin: 'layui-layer-page',
resize: false,
offset: 'auto',
shadeClose: false,
@@ -103,7 +102,8 @@ export class Dialog {
console.log('dialog params', params);
//layerOptions.content = h(component, params);
layerOptions.content = h(Layout, () => h(component, params));
const vueComponent = h(Layout, () => h(component, params));
layerOptions.content = vueComponent;
const id = layer.open(layerOptions);
observer.index = id;

View File

@@ -965,6 +965,9 @@ const getWidth = () => {
return '100%';
};
export default class Sheet {
cell(ri, ci, sheetIndex) {
throw new Error('Method not implemented.');
}
constructor(targetEl, data) {
this.eventMap = createEventEmitter();
const { showToolbar, showContextmenu, mode } = data.settings;

View File

@@ -1,193 +0,0 @@
declare module 'x-data-spreadsheet' {
export interface ExtendToolbarOption {
tip?: string;
el?: HTMLElement;
icon?: string;
onClick?: (data: object, sheet: object) => void;
}
export interface Options {
mode?: 'edit' | 'read';
showToolbar?: boolean;
showGrid?: boolean;
showContextmenu?: boolean;
showBottomBar?: boolean;
extendToolbar?: {
left?: ExtendToolbarOption[];
right?: ExtendToolbarOption[];
};
autoFocus?: boolean;
view?: {
height: () => number;
width: () => number;
};
row?: {
len: number;
height: number;
};
col?: {
len: number;
width: number;
indexWidth: number;
minWidth: number;
};
style?: {
bgcolor: string;
align: 'left' | 'center' | 'right';
valign: 'top' | 'middle' | 'bottom';
textwrap: boolean;
strike: boolean;
underline: boolean;
color: string;
font: {
name: 'Helvetica';
size: number;
bold: boolean;
italic: false;
};
};
}
export type CELL_SELECTED = 'cell-selected';
export type CELLS_SELECTED = 'cells-selected';
export type CELL_EDITED = 'cell-edited';
export type CellMerge = [number, number];
export interface SpreadsheetEventHandler {
(envt: CELL_SELECTED, callback: (cell: Cell, rowIndex: number, colIndex: number) => void): void;
(
envt: CELLS_SELECTED,
callback: (
cell: Cell,
parameters: { sri: number; sci: number; eri: number; eci: number },
) => void,
): void;
(evnt: CELL_EDITED, callback: (text: string, rowIndex: number, colIndex: number) => void): void;
}
export interface ColProperties {
width?: number;
}
/**
* Data for representing a cell
*/
export interface CellData {
text: string;
style?: number;
merge?: CellMerge;
}
/**
* Data for representing a row
*/
export interface RowData {
cells: {
[key: number]: CellData;
};
}
/**
* Data for representing a sheet
*/
export interface SheetData {
name?: string;
freeze?: string;
styles?: CellStyle[];
merges?: string[];
cols?: {
len?: number;
[key: number]: ColProperties;
};
rows?: {
[key: number]: RowData;
};
}
/**
* Data for representing a spreadsheet
*/
export interface SpreadsheetData {
[index: number]: SheetData;
}
export interface CellStyle {
align?: 'left' | 'center' | 'right';
valign?: 'top' | 'middle' | 'bottom';
font?: {
bold?: boolean;
};
bgcolor?: string;
textwrap?: boolean;
color?: string;
border?: {
top?: string[];
right?: string[];
bottom?: string[];
left?: string[];
};
}
export interface Editor {}
export interface Element {}
export interface Row {}
export interface Table {}
export interface Cell {}
export interface Sheet {}
export default class Spreadsheet {
constructor(container: string | HTMLElement, opts?: Options);
on: SpreadsheetEventHandler;
/**
* retrieve cell
* @param rowIndex {number} row index
* @param colIndex {number} column index
* @param sheetIndex {number} sheet iindex
*/
cell(rowIndex: number, colIndex: number, sheetIndex: number): Cell;
/**
* retrieve cell style
* @param rowIndex
* @param colIndex
* @param sheetIndex
*/
cellStyle(rowIndex: number, colIndex: number, sheetIndex: number): CellStyle;
/**
* get/set cell text
* @param rowIndex
* @param colIndex
* @param text
* @param sheetIndex
*/
cellText(rowIndex: number, colIndex: number, text: string, sheetIndex?: number): this;
/**
* remove current sheet
*/
deleteSheet(): void;
/**s
* load data
* @param json
*/
loadData(json: Record<string, any>): this;
/**
* get data
*/
getData(): Record<string, any>;
/**
* bind handler to change event, including data change and user actions
* @param callback
*/
change(callback: (json: Record<string, any>) => void): this;
/**
* set locale
* @param lang
* @param message
*/
static locale(lang: string, message: object): void;
}
global {
interface Window {
x_spreadsheet(container: string | HTMLElement, opts?: Options): Spreadsheet;
}
}
}

View File

@@ -23,7 +23,7 @@
}}</span>
</template>
<template v-for="child in menu.children" :key="child.menuId">
<sub-menu class="nest-menu" :menu="child" :isChild="true" />
<sub-menu class="nest-menu" :index="child.menuId" :menu="child" :isChild="true" />
</template>
</el-sub-menu>
</div>
@@ -63,7 +63,7 @@ const getTextStyle = (isShow: boolean) => {
.nest-menu :deep(.el-menu-item span:first-child),
.nest-menu :deep(.el-menu-item .menu-icon:first-child),
.nest-menu :deep(.el-submenu__title span:first-child) {
padding-left: 8px !important;
padding-left: 14px !important;
}
.nest-menu :deep(.el-submenu__title .menu-icon:first-child) {
margin-left: 8px !important;

View File

@@ -144,7 +144,7 @@ const route = useRoute();
const layoutStore = useLayoutStore();
const loginStore = useLoginStore();
const documentClientHeight = inject('documentClientHeight', ref(500));
const projectName = import.meta.env.VITE_PROJECT_NAME;
const projectName = process.env.VUE_APP_PROJECT_NAME;
const { getUploadFileUrl } = useUpload();

View File

@@ -31,6 +31,7 @@ import * as olineDicgt from '@/common/staticDict/online';
import * as flowDict from '@/common/staticDict/flow';
import { ANY_OBJECT } from '@/types/generic';
import { debounce } from 'lodash';
function useTable(app: ANY_OBJECT) {
app.use(VxeTable).use(VxeColumn).use(Edit);
@@ -41,6 +42,15 @@ function useStaticDict(app: ANY_OBJECT, staticDict: ANY_OBJECT) {
});
}
// webpack需要重写ResizeObserver否则会报错
const resizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends resizeObserver {
constructor(callback) {
callback = debounce(callback, 10);
super(callback);
}
};
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);

View File

@@ -199,7 +199,9 @@ import { SysOnlineFieldKind } from '@/common/staticDict/online';
import { useUpload } from '@/common/hooks/useUpload';
import { SortInfo } from '@/common/types/sortinfo';
import { API_CONTEXT } from '@/api/config';
import { useLayoutStore } from '@/store';
const layoutStore = useLayoutStore();
const { downloadFile } = useDownload();
const { parseUploadData } = useUpload();
@@ -247,8 +249,6 @@ const form = inject('form', () => {
console.error('OnlineCustomTable: form not injected');
return { isEdit: false } as ANY_OBJECT;
});
import { useLayoutStore } from '@/store';
const layoutStore = useLayoutStore();
const slots = useSlots();

View File

@@ -7,7 +7,7 @@
</template>
<el-input
v-if="inputWidgetType === SysCustomWidgetType.Input"
size="default"
size="small"
style="width: 100%"
clearable
v-model="valStr"
@@ -17,7 +17,7 @@
/>
<el-row v-if="inputWidgetType === SysCustomWidgetType.NumberInput" type="flex">
<el-input-number
size="default"
size="small"
clearable
style="width: 100%"
controls-position="right"
@@ -30,21 +30,19 @@
/>
</el-row>
<el-row v-if="inputWidgetType === SysCustomWidgetType.Radio" type="flex" align="middle">
<el-radio-group
size="default"
v-model="valNum"
v-bind="attributeProps"
@change="onValueChange"
>
<el-radio-button v-for="item in dropdownData" :key="item.id" :value="item.id">
{{ item.name }}
</el-radio-button>
<el-radio-group size="small" v-model="valNum" v-bind="attributeProps" @change="onValueChange">
<el-radio-button
v-for="item in dropdownData"
:key="item.id"
:value="item.id"
:label="item.name"
/>
</el-radio-group>
</el-row>
<el-slider
v-if="inputWidgetType === SysCustomWidgetType.Slider"
style="width: 95%; margin-left: 5px"
size="default"
size="small"
:min="attributeItem.min"
:max="attributeItem.max"
v-model="valNum"
@@ -54,7 +52,7 @@
/>
<el-row v-if="inputWidgetType === SysCustomWidgetType.Switch" type="flex" align="middle">
<el-select
size="default"
size="small"
style="width: 100%"
v-model="valBool"
@input="onValueChange"
@@ -65,18 +63,12 @@
<el-option label="是" :value="true" />
<el-option label="否" :value="false" />
</el-select>
<!--
<el-switch size="default"
:value="value" @input="onValueChange"
@change="$emit('change')"
/>
-->
</el-row>
<el-select
v-if="inputWidgetType === SysCustomWidgetType.Select"
style="width: 100%"
clearable
size="default"
size="small"
v-model="valNum"
v-bind="attributeProps"
@change="onValueChange"
@@ -86,7 +78,7 @@
</el-select>
<el-color-picker
v-if="inputWidgetType === SysCustomWidgetType.ColorPicker"
size="default"
size="small"
v-model="valStr"
@input="onValueChange"
v-bind="attributeProps"

View File

@@ -547,7 +547,7 @@ export const useForm = (props: ANY_OBJECT, formRef: Ref<FormInstance> | null = n
if (widget.props.dictInfo && Array.isArray(widget.props.dictInfo.paramList)) {
widget.props.dictInfo.paramList.forEach((param: ANY_OBJECT) => {
if (param.dictValueType === SysOnlineParamValueType.STATIC_DICT) {
let errorItem = null;
let errorItem: ANY_OBJECT | null = null;
if (Array.isArray(param.dictValue) && param.dictValue.length === 2) {
const dicts = StaticDict as ANY_OBJECT;
const staticDict = dicts[param.dictValue[0]];

View File

@@ -131,7 +131,7 @@ import { useThirdParty } from '@/components/thirdParty/hooks';
import { ThirdProps } from '@/components/thirdParty/types';
import { useLayoutStore } from '@/store';
import BasicForm from './basic/index.vue';
import DataModel from './dataModel/indev.vue';
import DataModel from './dataModel/index.vue';
import FormDesign from './formDesign/index.vue';
import EditOnlineForm from './editOnlineForm.vue';
const layoutStore = useLayoutStore();
@@ -220,7 +220,6 @@ const onNextClick = () => {
})
.then(res => {
res.forEach((item, index) => {
console.log('RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR', item);
getPageDatasourceTableList.value[index].columnList = item;
return getPageDatasourceTableList.value[index];
});
@@ -232,7 +231,7 @@ const onNextClick = () => {
activeStep.value = SysOnlinePageSettingStep.FORM_DESIGN;
})
.catch(e => {
console.error(e);
console.warn(e);
});
break;
}

View File

@@ -34,7 +34,6 @@ export const useWidgetToolkit = () => {
widgetType: number,
formType: number,
) {
console.log(column, widgetType, formType);
if (column == null) {
return {
disabled: true,
@@ -43,7 +42,7 @@ export const useWidgetToolkit = () => {
}
const columnFieldType = getColumnDataType(column);
let disabled = false;
let warningMsg = null;
let warningMsg: string | null = null;
if (column.fieldKind === SysOnlineFieldKind.UPLOAD) {
disabled = widgetType !== SysCustomWidgetType.Upload;
warningMsg = SysOnlineFieldKind.getValue(column.fieldKind);

View File

@@ -133,7 +133,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="示例说明" name="cases">
<el-tab-pane label="示例说明" name="cases" :lazy="true">
<p style="margin-bottom: 16px">
<strong>在线表单</strong>
通过在线表单编辑器创建配置并绑定菜单后即可生效无代码修改适用于相对简单的表单页面

View File

@@ -425,31 +425,6 @@
</el-config-provider>
</template>
<script lang="ts">
const defaultApprovalStatus = [
{
id: 1,
name: '同意',
},
{
id: 2,
name: '拒绝',
},
{
id: 3,
name: '驳回',
},
{
id: 4,
name: '会签同意',
},
{
id: 5,
name: '会签拒绝',
},
];
</script>
<script setup lang="ts">
import { VxeTable, VxeColumn } from 'vxe-table';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';
@@ -494,7 +469,13 @@ import ProcessDesigner from '../components/ProcessDesigner.vue';
import EditFlowEntryStatus from './formEditFlowEntryStatus.vue';
import EditFlowEntryVariable from './formEditFlowEntryVariable.vue';
const layoutStore = useLayoutStore();
const defaultApprovalStatus = [
{ id: 1, name: '同意' },
{ id: 2, name: '拒绝' },
{ id: 3, name: '驳回' },
{ id: 4, name: '会签同意' },
{ id: 5, name: '会签拒绝' },
];
interface IProps extends ThirdProps {
flowEntry?: ANY_OBJECT;
// 当使用Dialog.show弹出组件时须定义该prop属性以便对dialog进行回调

View File

@@ -125,14 +125,12 @@ import { useLayoutStore } from '@/store';
const layoutStore = useLayoutStore();
interface IProps extends ThirdProps {
flowEntry: ANY_OBJECT;
flowEntry?: ANY_OBJECT | undefined;
// 当使用Dialog.show弹出组件时须定义该prop属性以便对dialog进行回调
dialog?: DialogProp<ANY_OBJECT>;
}
const props = withDefaults(defineProps<IProps>(), {
flowEntry: () => {
return {};
},
flowEntry: undefined,
});
const { thirdParams } = useThirdParty(props);
const formItemSize = computed(() => {

View File

@@ -1,4 +1,4 @@
import { RouteLocationNormalizedLoaded } from 'vue-router';
import { RouteLocationNormalizedLoaded, RouteRecordRaw } from 'vue-router';
import Layout from '@/components/layout/index.vue';
import Welcome from '@/pages/welcome/index.vue';
import Login from '@/pages/login/index.vue';
@@ -9,7 +9,7 @@ function getProps(route: RouteLocationNormalizedLoaded) {
}
// 系统生成路由
export const routers = [
export const routers: Array<RouteRecordRaw> = [
{
path: '/login',
component: Login,
@@ -217,7 +217,7 @@ export const routers = [
// 第三方接入路由
{
path: '/thirdParty',
component: import('@/components/thirdParty/index.vue'),
component: () => import('@/components/thirdParty/index.vue'),
name: 'thirdParty',
props: getProps,
children: [

View File

@@ -1,10 +1,9 @@
/// <reference types="vite/client" />
/* eslint-disable */
declare module '*.vue' {
import { DefineComponent } from 'vue';
import type { DefineComponent } from 'vue';
const component: DefineComponent<{}, {}, any>;
export default component;
}
declare module '*.svg';
declare module '*.png';
declare module '*.jpg';
@@ -18,12 +17,3 @@ declare module 'ejs';
declare module 'bpmn-js/lib/Modeler';
declare module 'xml-js';
declare module 'bpmn-js-token-simulation';
interface ImportMetaEnv {
VITE_SERVER_HOST: string;
VITE_PROJECT_NAME: string;
}
interface ImportMeta {
env: ImportMetaEnv;
}

View File

@@ -26,4 +26,6 @@ export interface ColumnInfo {
fieldKind: number;
maxFileCount: number;
dictId: string;
maskFieldType: number;
encodedRule: ANY_OBJECT | string | undefined;
}