修复一些小bug
parent
e76080d176
commit
4da6c77856
|
@ -15,6 +15,8 @@ import { configVisualizerConfig } from './visualizer';
|
|||
import { configThemePlugin } from './theme';
|
||||
import { configImageminPlugin } from './imagemin';
|
||||
import { configSvgIconsPlugin } from './svgSprite';
|
||||
import OptimizationPersist from 'vite-plugin-optimize-persist'
|
||||
import PkgConfig from 'vite-plugin-package-config'
|
||||
|
||||
export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
||||
const { VITE_USE_IMAGEMIN, VITE_USE_MOCK, VITE_LEGACY, VITE_BUILD_COMPRESS, VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE } = viteEnv;
|
||||
|
@ -71,5 +73,8 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
|
|||
vitePlugins.push(configPwaConfig(viteEnv));
|
||||
}
|
||||
|
||||
//vite-plugin-theme【解决vite首次打开界面加载慢问题】
|
||||
vitePlugins.push(PkgConfig());
|
||||
vitePlugins.push(OptimizationPersist());
|
||||
return vitePlugins;
|
||||
}
|
||||
|
|
|
@ -251,7 +251,11 @@ export function useFormEvents({
|
|||
const res = handleFormValues(values);
|
||||
emit('submit', res);
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
//update-begin-author:taoyan date:2022-11-4 for: 列表查询表单会触发校验错误导致重置失败,原因不明
|
||||
emit('submit', {});
|
||||
console.error('query form validate error, please ignore!', error)
|
||||
//throw new Error(error);
|
||||
//update-end-author:taoyan date:2022-11-4 for: 列表查询表单会触发校验错误导致重置失败,原因不明
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
import { treeProps } from '/@/components/Form/src/jeecg/props/props';
|
||||
import { BasicTree, TreeActionType } from '/@/components/Tree';
|
||||
import { useTreeBiz } from '/@/components/Form/src/jeecg/hooks/useTreeBiz';
|
||||
import {propTypes} from "/@/utils/propTypes";
|
||||
|
||||
export default defineComponent({
|
||||
name: 'DeptSelectModal',
|
||||
|
@ -52,6 +53,7 @@
|
|||
type: String,
|
||||
default: '部门选择',
|
||||
},
|
||||
value: propTypes.oneOfType([propTypes.string, propTypes.array])
|
||||
},
|
||||
emits: ['register', 'getSelectResult'],
|
||||
setup(props, { emit, refs }) {
|
||||
|
@ -59,7 +61,12 @@
|
|||
const [register, { closeModal }] = useModalInner();
|
||||
const attrs = useAttrs();
|
||||
const treeRef = ref<Nullable<TreeActionType>>(null);
|
||||
const getBindValue = Object.assign({}, unref(props), unref(attrs));
|
||||
|
||||
//update-begin-author:taoyan date:2022-10-28 for: 部门选择警告类型不匹配
|
||||
let propValue = props.value === ''?[]:props.value;
|
||||
const getBindValue = Object.assign({}, unref(props), unref(attrs), {value: propValue});
|
||||
//update-end-author:taoyan date:2022-10-28 for: 部门选择警告类型不匹配
|
||||
|
||||
const queryUrl = getQueryUrl();
|
||||
const [{ visibleChange, checkedKeys, getCheckStrictly, getSelectTreeData, onCheck, onLoadData, treeData, checkALL, expandAll, onSelect }] =
|
||||
useTreeBiz(treeRef, queryUrl, getBindValue);
|
||||
|
|
|
@ -68,6 +68,10 @@ export function useSelectBiz(getList, props) {
|
|||
columnWidth: 20,
|
||||
selectedRowKeys: checkedKeys,
|
||||
onChange: onSelectChange,
|
||||
//update-begin-author:wangshuai---date:20221102--for: [VUEN-2562]用户选择,跨页选择后,只有当前页人员 ---
|
||||
//table4.4.0新增属性选中之后是否清空上一页下一页的数据,默认false
|
||||
preserveSelectedRowKeys:true,
|
||||
//update-end-author:wangshuai---date:20221102--for: [VUEN-2562]用户选择,跨页选择后,只有当前页人员 ---
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,7 +59,8 @@
|
|||
const collapsed = ref(true);
|
||||
// 配置的按钮
|
||||
const btns = computed(() => {
|
||||
let btns = props.toolbarConfig?.btn || ['add', 'remove', 'clearSelection'];
|
||||
let { btn, btns } = props.toolbarConfig || {};
|
||||
btns = btn || btns || ['add', 'remove', 'clearSelection'];
|
||||
// 排除掉没有授权的按钮
|
||||
return btns.filter((btn) => {
|
||||
// 系统默认的批量删除编码配置为 batch_delete 此处需要兼容一下
|
||||
|
|
|
@ -5,22 +5,22 @@
|
|||
<a-row :gutter="24">
|
||||
<template v-for="(item, index) in queryInfo">
|
||||
<template v-if="item.hidden === '1'">
|
||||
<a-col :md="8" :sm="24" :key="'query' + index" v-show="toggleSearchStatus">
|
||||
<a-col :md="6" :sm="24" :key="'query' + index" v-show="toggleSearchStatus">
|
||||
<SearchFormItem :formElRef="formRef" :queryParam="queryParam" :item="item" :dictOptions="dictOptions"></SearchFormItem>
|
||||
</a-col>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-col :md="8" :sm="24" :key="'query' + index">
|
||||
<a-col :md="6" :sm="24" :key="'query' + index">
|
||||
<SearchFormItem :formElRef="formRef" :queryParam="queryParam" :item="item" :dictOptions="dictOptions"></SearchFormItem>
|
||||
</a-col>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<a-col :md="8" :sm="8">
|
||||
<a-col :md="6" :sm="8">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset">重置</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery" style="margin-left: 8px">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a @click="handleToggleSearch" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
|
@ -63,7 +63,8 @@
|
|||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
||||
import { usePopBiz } from '/@/components/jeecg/OnLine/hooks/usePopBiz';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'JPopupOnlReport',
|
||||
components: {
|
||||
|
@ -89,7 +90,10 @@
|
|||
const toggleSearchStatus = ref(false);
|
||||
const attrs = useAttrs();
|
||||
const tableScroll = ref({ x: true });
|
||||
const getBindValue = Object.assign({}, unref(props), unref(attrs));
|
||||
const route = useRoute();
|
||||
console.log('route.query = ',route.query)
|
||||
const getBindValue = Object.assign({}, {routeQuery: route.query}, unref(props), unref(attrs));
|
||||
|
||||
const [
|
||||
{
|
||||
visibleChange,
|
||||
|
|
|
@ -29,7 +29,7 @@ export function useRuleFormItem<T extends Recordable>(props: T, key: keyof T = '
|
|||
const state: any = computed({
|
||||
get() {
|
||||
//修复多选时空值显示问题
|
||||
return innerState.value === '' ? [] : innerState.value;
|
||||
return !innerState.value || innerState.value === '' ? [] : innerState.value;
|
||||
},
|
||||
set(value) {
|
||||
if (isEqual(value, defaultState.value)) return;
|
||||
|
|
|
@ -30,7 +30,7 @@ export async function registerThirdComp(app: App) {
|
|||
app.provide('$globalEmojiIndex', myEmojiIndex)
|
||||
//---------------------------------------------------------------------
|
||||
// 注册全局dayjs
|
||||
dayjs.locale('zh');
|
||||
dayjs.locale('zh-cn');
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(customParseFormat);
|
||||
app.config.globalProperties.$dayjs = dayjs
|
||||
|
|
|
@ -23,7 +23,59 @@
|
|||
<a-input style="width: 80%" v-model:value="model.printContent" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的:</span>
|
||||
<span>打印目的1:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的2:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的3:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的4:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的5:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的6:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的7:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的8:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的9:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的10:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的11:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的12:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的13:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 20px">
|
||||
<span>打印目的14:</span>
|
||||
<a-input style="width: 80%" v-model:value="model.printReason" />
|
||||
</a-col>
|
||||
<a-col style="margin-top: 20px" :span="24">
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
const { prefixCls, tableContext } = useListPage({
|
||||
tableProps: {
|
||||
api: customList,
|
||||
tableSetting:{
|
||||
cacheKey:'customer'
|
||||
},
|
||||
columns: customColumns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
const { prefixCls, tableContext } = useListPage({
|
||||
tableProps: {
|
||||
api: ticketList,
|
||||
tableSetting:{
|
||||
cacheKey:'ticket'
|
||||
},
|
||||
columns: ticketColumns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
const { tableContext } = useListPage({
|
||||
tableProps: {
|
||||
api: list,
|
||||
tableSetting:{
|
||||
cacheKey:'erp_main'
|
||||
},
|
||||
columns: columns,
|
||||
canResize: false,
|
||||
rowSelection: { type: 'radio' },
|
||||
|
|
|
@ -46,6 +46,7 @@ export const formSchema: FormSchema[] = [
|
|||
dropdownStyle: {
|
||||
maxHeight: '100vh',
|
||||
},
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -96,6 +96,10 @@
|
|||
field: 'selecteddeparts',
|
||||
show: !data?.departDisabled ?? false,
|
||||
},
|
||||
{
|
||||
field: 'selectedroles',
|
||||
show: !data?.departDisabled ?? false,
|
||||
},
|
||||
]);
|
||||
// 无论新增还是编辑,都可以设置表单值
|
||||
if (typeof data.record === 'object') {
|
||||
|
@ -118,12 +122,13 @@
|
|||
let values = await validate();
|
||||
setDrawerProps({ confirmLoading: true });
|
||||
values.userIdentity === 1 && (values.departIds = '');
|
||||
let isUpdateVal = unref(isUpdate);
|
||||
//提交表单
|
||||
await saveOrUpdateUser(values, unref(isUpdate));
|
||||
await saveOrUpdateUser(values, isUpdateVal);
|
||||
//关闭弹窗
|
||||
closeDrawer();
|
||||
//刷新列表
|
||||
emit('success');
|
||||
emit('success',{isUpdateVal ,values});
|
||||
} finally {
|
||||
setDrawerProps({ confirmLoading: false });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue