自动化字典vite plugins
This commit is contained in:
parent
c6f85765b6
commit
fe588ec25a
|
@ -2,6 +2,7 @@
|
||||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
"name": "vben admin playground dev",
|
"name": "vben admin playground dev",
|
||||||
|
|
|
@ -8,5 +8,26 @@ export const overridesPreferences = defineOverridesPreferences({
|
||||||
// overrides
|
// overrides
|
||||||
app: {
|
app: {
|
||||||
name: import.meta.env.VITE_APP_TITLE,
|
name: import.meta.env.VITE_APP_TITLE,
|
||||||
|
accessMode: 'frontend',
|
||||||
|
authPageLayout: 'panel-center',
|
||||||
|
colorGrayMode: false,
|
||||||
|
colorWeakMode: false,
|
||||||
|
compact: false,
|
||||||
|
contentCompact: 'wide',
|
||||||
|
defaultAvatar: '',
|
||||||
|
dynamicTitle: true,
|
||||||
|
// 是否开启检查更新
|
||||||
|
enableCheckUpdates: true,
|
||||||
|
// 检查更新的时间间隔,单位为分钟
|
||||||
|
checkUpdatesInterval: 1,
|
||||||
|
// 开启布局设置按钮
|
||||||
|
enablePreferences: false,
|
||||||
|
enableRefreshToken: false,
|
||||||
|
isMobile: false,
|
||||||
|
layout: 'sidebar-nav',
|
||||||
|
locale: 'zh-CN',
|
||||||
|
loginExpiredMode: 'page',
|
||||||
|
preferencesButtonPosition: 'auto',
|
||||||
|
watermark: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
VITE_APP_TITLE=热力合同系统
|
VITE_APP_TITLE=热力合同系统
|
||||||
|
|
||||||
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
||||||
VITE_APP_NAMESPACE=erp-contract
|
VITE_APP_NAMESPACE=contract
|
||||||
|
|
|
@ -14,3 +14,6 @@ VITE_ROUTER_HISTORY=history
|
||||||
|
|
||||||
# 是否注入全局loading
|
# 是否注入全局loading
|
||||||
VITE_INJECT_APP_LOADING=true
|
VITE_INJECT_APP_LOADING=true
|
||||||
|
|
||||||
|
# 打包后是否生成dist.zip
|
||||||
|
VITE_ARCHIVER=true
|
||||||
|
|
|
@ -0,0 +1,134 @@
|
||||||
|
/* eslint-disable */
|
||||||
|
/* prettier-ignore */
|
||||||
|
// @ts-nocheck
|
||||||
|
// noinspection JSUnusedGlobalSymbols
|
||||||
|
// Generated by unplugin-auto-import
|
||||||
|
// biome-ignore lint: disable
|
||||||
|
export {}
|
||||||
|
declare global {
|
||||||
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
|
const computed: typeof import('vue')['computed']
|
||||||
|
const createApp: typeof import('vue')['createApp']
|
||||||
|
const customRef: typeof import('vue')['customRef']
|
||||||
|
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||||
|
const defineComponent: typeof import('vue')['defineComponent']
|
||||||
|
const effectScope: typeof import('vue')['effectScope']
|
||||||
|
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||||
|
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||||
|
const h: typeof import('vue')['h']
|
||||||
|
const inject: typeof import('vue')['inject']
|
||||||
|
const isProxy: typeof import('vue')['isProxy']
|
||||||
|
const isReactive: typeof import('vue')['isReactive']
|
||||||
|
const isReadonly: typeof import('vue')['isReadonly']
|
||||||
|
const isRef: typeof import('vue')['isRef']
|
||||||
|
const markRaw: typeof import('vue')['markRaw']
|
||||||
|
const nextTick: typeof import('vue')['nextTick']
|
||||||
|
const onActivated: typeof import('vue')['onActivated']
|
||||||
|
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||||
|
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||||
|
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||||
|
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||||
|
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||||
|
const onMounted: typeof import('vue')['onMounted']
|
||||||
|
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||||
|
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||||
|
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||||
|
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||||
|
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||||
|
const onUpdated: typeof import('vue')['onUpdated']
|
||||||
|
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
|
||||||
|
const provide: typeof import('vue')['provide']
|
||||||
|
const reactive: typeof import('vue')['reactive']
|
||||||
|
const readonly: typeof import('vue')['readonly']
|
||||||
|
const ref: typeof import('vue')['ref']
|
||||||
|
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||||
|
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||||
|
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||||
|
const shallowRef: typeof import('vue')['shallowRef']
|
||||||
|
const toRaw: typeof import('vue')['toRaw']
|
||||||
|
const toRef: typeof import('vue')['toRef']
|
||||||
|
const toRefs: typeof import('vue')['toRefs']
|
||||||
|
const toValue: typeof import('vue')['toValue']
|
||||||
|
const triggerRef: typeof import('vue')['triggerRef']
|
||||||
|
const unref: typeof import('vue')['unref']
|
||||||
|
const useAttrs: typeof import('vue')['useAttrs']
|
||||||
|
const useCssModule: typeof import('vue')['useCssModule']
|
||||||
|
const useCssVars: typeof import('vue')['useCssVars']
|
||||||
|
const useId: typeof import('vue')['useId']
|
||||||
|
const useModel: typeof import('vue')['useModel']
|
||||||
|
const useSlots: typeof import('vue')['useSlots']
|
||||||
|
const useTemplateRef: typeof import('vue')['useTemplateRef']
|
||||||
|
const watch: typeof import('vue')['watch']
|
||||||
|
const watchEffect: typeof import('vue')['watchEffect']
|
||||||
|
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||||
|
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||||
|
}
|
||||||
|
// for type re-export
|
||||||
|
declare global {
|
||||||
|
// @ts-ignore
|
||||||
|
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||||
|
import('vue')
|
||||||
|
}
|
||||||
|
// for vue template auto import
|
||||||
|
import { UnwrapRef } from 'vue'
|
||||||
|
declare module 'vue' {
|
||||||
|
interface GlobalComponents {}
|
||||||
|
interface ComponentCustomProperties {
|
||||||
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
||||||
|
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
|
||||||
|
readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
|
||||||
|
readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
|
||||||
|
readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
|
||||||
|
readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
|
||||||
|
readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
|
||||||
|
readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
|
||||||
|
readonly h: UnwrapRef<typeof import('vue')['h']>
|
||||||
|
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
||||||
|
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
||||||
|
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
||||||
|
readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
|
||||||
|
readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
|
||||||
|
readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
|
||||||
|
readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
|
||||||
|
readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
|
||||||
|
readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
|
||||||
|
readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
|
||||||
|
readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
|
||||||
|
readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
|
||||||
|
readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
|
||||||
|
readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
|
||||||
|
readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
|
||||||
|
readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
|
||||||
|
readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
|
||||||
|
readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
|
||||||
|
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
|
||||||
|
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
||||||
|
readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
|
||||||
|
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
||||||
|
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
||||||
|
readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
|
||||||
|
readonly ref: UnwrapRef<typeof import('vue')['ref']>
|
||||||
|
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||||
|
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
|
||||||
|
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
|
||||||
|
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
|
||||||
|
readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
|
||||||
|
readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
|
||||||
|
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
|
||||||
|
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
|
||||||
|
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
|
||||||
|
readonly unref: UnwrapRef<typeof import('vue')['unref']>
|
||||||
|
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
|
||||||
|
readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
|
||||||
|
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
|
||||||
|
readonly useId: UnwrapRef<typeof import('vue')['useId']>
|
||||||
|
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
|
||||||
|
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
|
||||||
|
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
|
||||||
|
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
||||||
|
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
|
||||||
|
readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
|
||||||
|
readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,10 +17,11 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm vite build --mode production",
|
"build": "pnpm vite build --mode production",
|
||||||
|
"build:dev": "pnpm vite build --mode development",
|
||||||
"build:analyze": "pnpm vite build --mode analyze",
|
"build:analyze": "pnpm vite build --mode analyze",
|
||||||
"dev": "pnpm vite --mode development",
|
"dev": "pnpm vite --mode development",
|
||||||
"dev:prod": "pnpm vite --mode production",
|
"dev:prod": "pnpm vite --mode production",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview --port 4174",
|
||||||
"typecheck": "vue-tsc --noEmit --skipLibCheck"
|
"typecheck": "vue-tsc --noEmit --skipLibCheck"
|
||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const ACCESS_TOKEN_FIELD = 'Token'
|
||||||
* 适用于同时连接多个后端功能开发,通过设置 proxy_type 值实现‘非重启更新’连接的后端
|
* 适用于同时连接多个后端功能开发,通过设置 proxy_type 值实现‘非重启更新’连接的后端
|
||||||
*/
|
*/
|
||||||
export function getBaseURL(): string {
|
export function getBaseURL(): string {
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.MODE === 'development') {
|
||||||
const proxyType = localStorage.getItem('@@@proxy_type') || '';
|
const proxyType = localStorage.getItem('@@@proxy_type') || '';
|
||||||
// return BASE_URL + "/zzz"
|
// return BASE_URL + "/zzz"
|
||||||
return BASE_URL + proxyType
|
return BASE_URL + proxyType
|
||||||
|
|
|
@ -102,7 +102,7 @@ function handleViewAll() {
|
||||||
router.push("/user/todo");
|
router.push("/user/todo");
|
||||||
}
|
}
|
||||||
|
|
||||||
const isDev = import.meta.env.DEV;
|
const isDev = import.meta.env.MODE === 'development';
|
||||||
const value = ref(localStorage.getItem("@@@proxy_type") || ""); // /zp
|
const value = ref(localStorage.getItem("@@@proxy_type") || ""); // /zp
|
||||||
function handleMenuClick(e) {
|
function handleMenuClick(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -111,6 +111,7 @@ function handleMenuClick(e) {
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem("@@@proxy_type", "/" + e.key);
|
localStorage.setItem("@@@proxy_type", "/" + e.key);
|
||||||
}
|
}
|
||||||
|
location.reload()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,72 +1,45 @@
|
||||||
/** 字典枚举 */
|
|
||||||
export enum DICT_TYPE {
|
export enum DICT_TYPE {
|
||||||
|
/** 系统通用状态 */
|
||||||
/** 静态枚举-划分标段 */
|
sys_normal_disable = 'sys_normal_disable',
|
||||||
sectionType = 'section_type',
|
|
||||||
sectionNum = 'section_num',
|
|
||||||
commonWhether = 'common_whether',
|
|
||||||
deadlineForPerformance = 'deadline_for_performance',
|
|
||||||
disputeSettlementMethods = 'dispute_settlement_methods',
|
|
||||||
|
|
||||||
sysNormalDisable = 'sys_normal_disable',
|
|
||||||
// 会议类型
|
|
||||||
meeting_type = 'meeting_type',
|
|
||||||
meeting_facilities = 'meeting_facilities',
|
|
||||||
meeting_room = 'meeting_room',
|
|
||||||
|
|
||||||
// 订餐
|
|
||||||
// 主食
|
|
||||||
canteen_staplefood = 'canteen_staplefood',
|
|
||||||
/** 就餐方式 */
|
|
||||||
canteen_dineway = 'canteen_dineway',
|
|
||||||
|
|
||||||
canteenTimeRange = 'canteen_time_range',
|
|
||||||
officesupplies_status = 'officesupplies_status',
|
|
||||||
|
|
||||||
supervise_task_type = 'supervise_task_type',
|
|
||||||
supervise_emergency_level = 'supervise_emergency_level',
|
|
||||||
|
|
||||||
/** 合同管理-资金流向 */
|
/** 合同管理-资金流向 */
|
||||||
contractFundFlow = 'contract_fund_flow',
|
contract_fund_flow = 'contract_fund_flow',
|
||||||
|
|
||||||
/** 合同管理-资金渠道 */
|
/** 合同管理-资金渠道 */
|
||||||
contractFundingSource = 'contract_funding_source',
|
contract_funding_source = 'contract_funding_source',
|
||||||
|
|
||||||
/** 合同管理-组织形式 */
|
/** 合同管理-组织形式 */
|
||||||
contractOrganizationForm = 'contract_organization_form',
|
contract_organization_form = 'contract_organization_form',
|
||||||
|
|
||||||
/** 合同管理-币种单位 */
|
/** 合同管理-币种单位 */
|
||||||
contractCurrencyUnit = 'contract_currency_unit',
|
contract_currency_unit = 'contract_currency_unit',
|
||||||
|
|
||||||
/** 合同管理-合同模块 */
|
/** 合同管理-合同模块 */
|
||||||
contractModule = 'contract_module',
|
contract_module = 'contract_module',
|
||||||
|
|
||||||
/** 合同管理-选商方式 */
|
/** 合同管理-选商方式 */
|
||||||
contractSelectionMethod = 'contract_selection_method',
|
contract_selection_method = 'contract_selection_method',
|
||||||
|
|
||||||
/** 合同管理-合同审批 */
|
/** 合同管理-合同审批 */
|
||||||
contractApproval = 'contract_approval',
|
contract_approval = 'contract_approval',
|
||||||
|
|
||||||
/** 合同管理-履行状态 */
|
/** 合同管理-履行状态 */
|
||||||
contractPerformanceStatus = 'contract_performance_status',
|
contract_performance_status = 'contract_performance_status',
|
||||||
|
|
||||||
/** 合同管理-授权类型 */
|
/** 合同管理-授权类型 */
|
||||||
contractAuthorizationType = 'contract_authorization_type',
|
contract_authorization_type = 'contract_authorization_type',
|
||||||
|
|
||||||
/** 合同管理-项目类型 */
|
/** 合同管理-项目类型 */
|
||||||
contractProjectType = 'contract_project_type',
|
contract_project_type = 'contract_project_type',
|
||||||
|
|
||||||
/** 合同管理-商务计价方式 */
|
/** 合同管理-商务计价方式 */
|
||||||
contractPriceStyle = 'contract_price_style',
|
contract_price_style = 'contract_price_style',
|
||||||
|
|
||||||
/** 综合管理-项目管理 */
|
/** 综合管理-项目管理 */
|
||||||
comprehensiveProject = 'comprehensive_project',
|
comprehensive_project = 'comprehensive_project',
|
||||||
|
|
||||||
/** 综合管理-项目名称管理 */
|
/** 综合管理-项目名称管理 */
|
||||||
comprehensiveProjectName = 'comprehensive_project_name',
|
comprehensive_project_name = 'comprehensive_project_name',
|
||||||
|
comprehensive_config = 'comprehensive_config',
|
||||||
comprehensiveConfig = 'comprehensive_config',
|
|
||||||
|
|
||||||
/** 合同管理-签约依据类型 */
|
/** 合同管理-签约依据类型 */
|
||||||
contractBasisType = 'contract_basis_type',
|
contract_basis_type = 'contract_basis_type',
|
||||||
|
/** 变更原因 */
|
||||||
|
cancel_reson = 'cancel_reson',
|
||||||
|
/** 划分标段 */
|
||||||
|
section_type = 'section_type',
|
||||||
|
/** 标段数 */
|
||||||
|
section_num = 'section_num',
|
||||||
|
/** 常用是否 */
|
||||||
|
common_whether = 'common_whether',
|
||||||
|
/** 履行期限 */
|
||||||
|
deadline_for_performance = 'deadline_for_performance',
|
||||||
|
/** 纠纷解决方式 */
|
||||||
|
dispute_settlement_methods = 'dispute_settlement_methods'
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
const createEntry = (annotation = '', data = []) => ({
|
||||||
|
annotation,
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default {
|
||||||
|
sys_normal_disable: createEntry('系统通用状态'),
|
||||||
|
|
||||||
|
contract_fund_flow: createEntry('合同管理-资金流向'),
|
||||||
|
contract_funding_source: createEntry('合同管理-资金渠道'),
|
||||||
|
contract_organization_form: createEntry('合同管理-组织形式'),
|
||||||
|
contract_currency_unit: createEntry('合同管理-币种单位'),
|
||||||
|
contract_module: createEntry('合同管理-合同模块'),
|
||||||
|
contract_selection_method: createEntry('合同管理-选商方式'),
|
||||||
|
contract_approval: createEntry('合同管理-合同审批'),
|
||||||
|
contract_performance_status: createEntry('合同管理-履行状态'),
|
||||||
|
contract_authorization_type: createEntry('合同管理-授权类型'),
|
||||||
|
contract_project_type: createEntry('合同管理-项目类型'),
|
||||||
|
contract_price_style: createEntry('合同管理-商务计价方式'),
|
||||||
|
|
||||||
|
comprehensive_project: createEntry('综合管理-项目管理'),
|
||||||
|
comprehensive_project_name: createEntry('综合管理-项目名称管理'),
|
||||||
|
comprehensive_config: createEntry(),
|
||||||
|
|
||||||
|
contract_basis_type: createEntry('合同管理-签约依据类型'),
|
||||||
|
|
||||||
|
cancel_reson: createEntry('变更原因', [
|
||||||
|
{ label: '未填写原因', value: '0' },
|
||||||
|
{ label: '用户取消', value: '1' },
|
||||||
|
{ label: '系统取消', value: '2' },
|
||||||
|
{ label: '其他原因', value: '3' },
|
||||||
|
]),
|
||||||
|
|
||||||
|
section_type: createEntry('划分标段', [
|
||||||
|
{ label: '是', value: '1' },
|
||||||
|
{ label: '否', value: '0' },
|
||||||
|
]),
|
||||||
|
|
||||||
|
section_num: createEntry('标段数', [
|
||||||
|
{ label: '1', value: '1' },
|
||||||
|
{ label: '2', value: '2' },
|
||||||
|
{ label: '3', value: '3' },
|
||||||
|
{ label: '4', value: '4' },
|
||||||
|
{ label: '5', value: '5' },
|
||||||
|
{ label: '6', value: '6' },
|
||||||
|
{ label: '7', value: '7' },
|
||||||
|
{ label: '8', value: '8' },
|
||||||
|
]),
|
||||||
|
|
||||||
|
common_whether: createEntry('常用是否', [
|
||||||
|
{ label: '是', value: '1' },
|
||||||
|
{ label: '否', value: '0' },
|
||||||
|
]),
|
||||||
|
|
||||||
|
deadline_for_performance: createEntry('履行期限', [
|
||||||
|
{ label: '确定', value: '1' },
|
||||||
|
{ label: '不确定', value: '0' },
|
||||||
|
]),
|
||||||
|
|
||||||
|
dispute_settlement_methods: createEntry('纠纷解决方式', [
|
||||||
|
{ label: '诉讼', value: '1' },
|
||||||
|
{ label: '仲裁', value: '2' },
|
||||||
|
{ label: '其它', value: '3' },
|
||||||
|
]),
|
||||||
|
};
|
|
@ -1,48 +0,0 @@
|
||||||
|
|
||||||
export default {
|
|
||||||
|
|
||||||
/** 变更原因 */
|
|
||||||
cancel_reson: [
|
|
||||||
{ label: "未填写原因", value: "0" },
|
|
||||||
{ label: "用户取消", value: "1" },
|
|
||||||
{ label: "系统取消", value: "2" },
|
|
||||||
{ label: "其他原因", value: "3" }
|
|
||||||
],
|
|
||||||
|
|
||||||
/** 划分标段 */
|
|
||||||
section_type: [
|
|
||||||
{ label: "是", value: "1" },
|
|
||||||
{ label: "否", value: "0" }
|
|
||||||
],
|
|
||||||
|
|
||||||
/** 标段数 */
|
|
||||||
section_num: [
|
|
||||||
{ label: "1", value: "1" },
|
|
||||||
{ label: "2", value: "2" }, ,
|
|
||||||
{ label: "3", value: "3" },
|
|
||||||
{ label: "4", value: "4" },
|
|
||||||
{ label: "5", value: "5" },
|
|
||||||
{ label: "6", value: "6" },
|
|
||||||
{ label: "7", value: "7" },
|
|
||||||
{ label: "8", value: "8" },
|
|
||||||
],
|
|
||||||
|
|
||||||
/** 常用是否 */
|
|
||||||
common_whether: [
|
|
||||||
{ label: "是", value: "1" },
|
|
||||||
{ label: "否", value: "0" }
|
|
||||||
],
|
|
||||||
|
|
||||||
/** 履行期限 */
|
|
||||||
deadline_for_performance:[
|
|
||||||
{ label: "确定", value: "1" },
|
|
||||||
{ label: "不确定", value: "0" }
|
|
||||||
],
|
|
||||||
|
|
||||||
/** 纠纷解决方式 */
|
|
||||||
dispute_settlement_methods: [
|
|
||||||
{ label: "诉讼", value: "1" },
|
|
||||||
{ label: "仲裁", value: "2" },
|
|
||||||
{ label: "其它", value: "3" }
|
|
||||||
],
|
|
||||||
}
|
|
|
@ -68,7 +68,7 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
const isDev = import.meta.env.DEV;
|
const isDev = import.meta.env.MODE === 'development';
|
||||||
function mockLogin(username: string, password: string, isSkip: boolean = true) {
|
function mockLogin(username: string, password: string, isSkip: boolean = true) {
|
||||||
authStore.authLogin({
|
authStore.authLogin({
|
||||||
username,
|
username,
|
||||||
|
|
|
@ -1,64 +1,64 @@
|
||||||
import { DICT_TYPE, getDictOptions } from "#/utils/dict";
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from '@fast-crud/fast-crud';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 筛选合同列表数据
|
* 筛选合同列表数据
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function filterContractTypes(contractTypeData: any = [], parentId: string) {
|
function filterContractTypes(contractTypeData: any = [], parentId: string) {
|
||||||
return contractTypeData.map((item) => {
|
return contractTypeData
|
||||||
|
.map((item) => {
|
||||||
item.label = item.contrLevelName;
|
item.label = item.contrLevelName;
|
||||||
item.value = item.contrLevelId;
|
item.value = item.contrLevelId;
|
||||||
return item;
|
return item;
|
||||||
}).filter((item) => item.parentId === parentId);
|
})
|
||||||
|
.filter((item) => item.parentId === parentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getFormSchema(params: any = {}) {
|
export function getFormSchema(params: any = {}) {
|
||||||
|
const { contractTypeData } = params;
|
||||||
const { contractTypeData } = params
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
contractName: {
|
contractName: {
|
||||||
title: "合同名称",
|
title: '合同名称',
|
||||||
key: "contractName",
|
key: 'contractName',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
},
|
},
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
ctrType: {
|
ctrType: {
|
||||||
title: "合同类别",
|
title: '合同类别',
|
||||||
key: "ctrType",
|
key: 'ctrType',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
async getData({ form = {} }) {
|
async getData({ form = {} }) {
|
||||||
return filterContractTypes(contractTypeData, "-1");
|
return filterContractTypes(contractTypeData, '-1');
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
valueChange({ form, value, getComponentRef }) {
|
valueChange({ form, value, getComponentRef }) {
|
||||||
form.ctrTwoType = undefined;
|
form.ctrTwoType = undefined;
|
||||||
if (value) {
|
if (value) {
|
||||||
getComponentRef("ctrTwoType").reloadDict(); // 执行city的select组件的reloadDict()方法,触发“city”重新加载字典
|
getComponentRef('ctrTwoType').reloadDict(); // 执行city的select组件的reloadDict()方法,触发“city”重新加载字典
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
ctrTwoType: {
|
ctrTwoType: {
|
||||||
title: "二级类别",
|
title: '二级类别',
|
||||||
key: "ctrTwoType",
|
key: 'ctrTwoType',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
async getData({ form = {} }) {
|
async getData({ form = {} }) {
|
||||||
|
@ -69,65 +69,65 @@ export function getFormSchema(params: any = {}) {
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
frameProtocol: {
|
frameProtocol: {
|
||||||
title: "框架协议",
|
title: '框架协议',
|
||||||
key: "frameProtocol",
|
key: 'frameProtocol',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: "是", value: 1, },
|
{ label: '是', value: 1 },
|
||||||
{ label: "否", value: 0 },
|
{ label: '否', value: 0 },
|
||||||
]
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
frameProtocolCtr: {
|
frameProtocolCtr: {
|
||||||
title: "框架协议下的合同",
|
title: '框架协议下的合同',
|
||||||
key: "frameProtocolCtr",
|
key: 'frameProtocolCtr',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
labelCol: { style: { width: "200px" } },
|
labelCol: { style: { width: '200px' } },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: "是", value: 1, },
|
{ label: '是', value: 1 },
|
||||||
{ label: "否", value: 0 },
|
{ label: '否', value: 0 },
|
||||||
]
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fundAllocation: {
|
fundAllocation: {
|
||||||
title: "资金流向",
|
title: '资金流向',
|
||||||
key: "fundAllocation",
|
key: 'fundAllocation',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundFlow)
|
data: getDictOptions(DICT_TYPE.contract_fund_flow),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择资金流向" }],
|
rules: [{ required: true, message: '请选择资金流向' }],
|
||||||
},
|
},
|
||||||
fundDitch: {
|
fundDitch: {
|
||||||
title: "资金渠道",
|
title: '资金渠道',
|
||||||
key: "fundDitch",
|
key: 'fundDitch',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundingSource)
|
data: getDictOptions(DICT_TYPE.contract_funding_source),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择资金渠道" }],
|
rules: [{ required: true, message: '请选择资金渠道' }],
|
||||||
},
|
},
|
||||||
budgetSum: {
|
budgetSum: {
|
||||||
title: '预算金额',
|
title: '预算金额',
|
||||||
|
@ -146,35 +146,34 @@ export function getFormSchema(params: any = {}) {
|
||||||
title: '',
|
title: '',
|
||||||
key: 'priceType',
|
key: 'priceType',
|
||||||
col: { span: 6 },
|
col: { span: 6 },
|
||||||
labelCol: { style: { width: "12px" } },
|
labelCol: { style: { width: '12px' } },
|
||||||
colon: false,
|
colon: false,
|
||||||
component: {
|
component: {
|
||||||
name: 'fs-dict-select',
|
name: 'fs-dict-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractCurrencyUnit)
|
data: getDictOptions(DICT_TYPE.contract_currency_unit),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
organiza: {
|
organiza: {
|
||||||
title: "组织形式",
|
title: '组织形式',
|
||||||
key: "organiza",
|
key: 'organiza',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择组织形式" }],
|
rules: [{ required: true, message: '请选择组织形式' }],
|
||||||
},
|
},
|
||||||
fileList: {
|
fileList: {
|
||||||
title: "相关附件",
|
title: '相关附件',
|
||||||
key: "fileList",
|
key: 'fileList',
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,7 @@ function getColumns(params): any {
|
||||||
width: 100,
|
width: 100,
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return getDictObj(DICT_TYPE.contractBasisType, row.basisTypeId)
|
return getDictObj(DICT_TYPE.contract_basis_type, row.basisTypeId)
|
||||||
?.label;
|
?.label;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -242,12 +242,12 @@ async function handleSave() {
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.fundDitchName = getDictObj(
|
newForm.fundDitchName = getDictObj(
|
||||||
DICT_TYPE.contractFundingSource,
|
DICT_TYPE.contract_funding_source,
|
||||||
newForm.fundDitch
|
newForm.fundDitch
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
newForm.priceTypeName = getDictObj(
|
newForm.priceTypeName = getDictObj(
|
||||||
DICT_TYPE.contractCurrencyUnit,
|
DICT_TYPE.contract_currency_unit,
|
||||||
newForm.priceType
|
newForm.priceType
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
|
|
|
@ -52,14 +52,14 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'organiza', title: '组织形式', width: 120, slots: {
|
field: 'organiza', title: '组织形式', width: 120, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.organiza, DICT_TYPE.contractOrganizationForm);
|
return useRender.renderDict(row.organiza, DICT_TYPE.contract_organization_form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contractFundFlow);
|
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contract_fund_flow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -103,7 +103,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -22,7 +22,7 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
width: 100,
|
width: 100,
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return getDictObj(DICT_TYPE.contractBasisType, row.basisTypeId)
|
return getDictObj(DICT_TYPE.contract_basis_type, row.basisTypeId)
|
||||||
?.label;
|
?.label;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -65,7 +65,7 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
width: 100,
|
width: 100,
|
||||||
slots: {
|
slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return getDictObj(DICT_TYPE.contractBasisType, row.basisTypeId)
|
return getDictObj(DICT_TYPE.contract_basis_type, row.basisTypeId)
|
||||||
?.label;
|
?.label;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -134,7 +134,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
async getData(form) {
|
async getData(form) {
|
||||||
return getDictOptions(DICT_TYPE.contractBasisType);
|
return getDictOptions(DICT_TYPE.contract_basis_type);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
|
@ -36,7 +36,7 @@ const formBinding = ref({
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
async getData(form) {
|
async getData(form) {
|
||||||
return getDictOptions(DICT_TYPE.contractBasisType);
|
return getDictOptions(DICT_TYPE.contract_basis_type);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
|
@ -31,14 +31,14 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'organiza', title: '组织形式', width: 120, slots: {
|
field: 'organiza', title: '组织形式', width: 120, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.organiza, DICT_TYPE.contractOrganizationForm);
|
return useRender.renderDict(row.organiza, DICT_TYPE.contract_organization_form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contractFundFlow);
|
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contract_fund_flow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -74,7 +74,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -31,14 +31,14 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'organiza', title: '组织形式', width: 120, slots: {
|
field: 'organiza', title: '组织形式', width: 120, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.organiza, DICT_TYPE.contractOrganizationForm);
|
return useRender.renderDict(row.organiza, DICT_TYPE.contract_organization_form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contractFundFlow);
|
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contract_fund_flow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -74,7 +74,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -121,7 +121,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
name: 'fs-dict-select',
|
name: 'fs-dict-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractCurrencyUnit)
|
data: getDictOptions(DICT_TYPE.contract_currency_unit)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -135,7 +135,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundFlow)
|
data: getDictOptions(DICT_TYPE.contract_fund_flow)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择资金流向" }],
|
rules: [{ required: true, message: "请选择资金流向" }],
|
||||||
|
@ -150,7 +150,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundingSource)
|
data: getDictOptions(DICT_TYPE.contract_funding_source)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择资金渠道" }],
|
rules: [{ required: true, message: "请选择资金渠道" }],
|
||||||
|
@ -198,7 +198,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: "请选择组织方式" }],
|
rules: [{ required: true, message: "请选择组织方式" }],
|
||||||
|
|
|
@ -1,177 +1,178 @@
|
||||||
import { DICT_TYPE, getDictOptions } from "#/utils/dict";
|
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from '@fast-crud/fast-crud';
|
||||||
|
|
||||||
export function getFormSchema(_params: any = {}) {
|
export function getFormSchema(_params: any = {}) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
projectNum: {
|
projectNum: {
|
||||||
title: "项目",
|
title: '项目',
|
||||||
key: "projectNum",
|
key: 'projectNum',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
},
|
},
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
projectProp: {
|
projectProp: {
|
||||||
title: "项目类别",
|
title: '项目类别',
|
||||||
key: "projectProp",
|
key: 'projectProp',
|
||||||
col: { span: 12 },
|
col: { span: 12 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractProjectType)
|
data: getDictOptions(DICT_TYPE.contract_project_type),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
projectName: {
|
projectName: {
|
||||||
title: "项目名称",
|
title: '项目名称',
|
||||||
key: "projectName",
|
key: 'projectName',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.comprehensiveProjectName)
|
data: getDictOptions(DICT_TYPE.comprehensive_project_name),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
priceStyleId: {
|
priceStyleId: {
|
||||||
title: "商务计价方式",
|
title: '商务计价方式',
|
||||||
key: "priceStyleId",
|
key: 'priceStyleId',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractPriceStyle)
|
data: getDictOptions(DICT_TYPE.contract_price_style),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
choiceType: {
|
choiceType: {
|
||||||
title: "选商方式",
|
title: '选商方式',
|
||||||
key: "choiceType",
|
key: 'choiceType',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractSelectionMethod)
|
data: getDictOptions(DICT_TYPE.contract_selection_method),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
choiceReason: {
|
choiceReason: {
|
||||||
title: "选商方式说明",
|
title: '选商方式说明',
|
||||||
key: "choiceReason",
|
key: 'choiceReason',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
qualificReq: {
|
qualificReq: {
|
||||||
title: "资质要求",
|
title: '资质要求',
|
||||||
key: "qualificReq",
|
key: 'qualificReq',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
isBid: {
|
isBid: {
|
||||||
title: "划分标段",
|
title: '划分标段',
|
||||||
key: "isBid",
|
key: 'isBid',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
// component: {
|
// component: {
|
||||||
// name: "fs-dict-radio",
|
// name: "fs-dict-radio",
|
||||||
// vModel: "value",
|
// vModel: "value",
|
||||||
// dict: dict({
|
// dict: dict({
|
||||||
// data: getDictOptions(DICT_TYPE.sectionType)
|
// data: getDictOptions(DICT_TYPE.section_type)
|
||||||
// }),
|
// }),
|
||||||
// },
|
// },
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
//注意此处的v-model写法
|
//注意此处的v-model写法
|
||||||
let options1 = getDictOptions(DICT_TYPE.sectionType,'string')
|
let options1 = getDictOptions(DICT_TYPE.section_type, 'string');
|
||||||
let options2 = getDictOptions(DICT_TYPE.sectionNum,'string')
|
let options2 = getDictOptions(DICT_TYPE.section_num, 'string');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<a-form-item class="inline-block !mb-0">
|
<a-form-item class="!mb-0 inline-block">
|
||||||
<a-radio-group v-model:value={form.isBid} options={options1} />
|
<a-radio-group v-model:value={form.isBid} options={options1} />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<div class="w-2"></div>
|
<div class="w-2"></div>
|
||||||
{form.isBid === 1 && (
|
{form.isBid === 1 && (
|
||||||
<a-form-item label="标段数" class="inline-block !mb-0">
|
<a-form-item label="标段数" class="!mb-0 inline-block">
|
||||||
<a-radio-group v-model:value={form.budgetSum2} options={options2} />
|
<a-radio-group
|
||||||
|
v-model:value={form.budgetSum2}
|
||||||
|
options={options2}
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
projectRange: {
|
projectRange: {
|
||||||
title: "项目范围",
|
title: '项目范围',
|
||||||
key: "projectRange",
|
key: 'projectRange',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectContent: {
|
projectContent: {
|
||||||
title: "项目内容",
|
title: '项目内容',
|
||||||
key: "projectContent",
|
key: 'projectContent',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
quality: {
|
quality: {
|
||||||
title: "工期/质量要求",
|
title: '工期/质量要求',
|
||||||
key: "quality",
|
key: 'quality',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
labelWrap: true,
|
labelWrap: true,
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
stockNums: {
|
stockNums: {
|
||||||
title: "工程/采购量",
|
title: '工程/采购量',
|
||||||
key: "stockNums",
|
key: 'stockNums',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
labelWrap: true,
|
labelWrap: true,
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
stockPlanMx: {
|
stockPlanMx: {
|
||||||
title: "计划投资明细",
|
title: '计划投资明细',
|
||||||
key: "stockPlanMx",
|
key: 'stockPlanMx',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
labelWrap: true,
|
labelWrap: true,
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autosize: { minRows: 4, maxRows: 6 }
|
autosize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,8 +156,8 @@ async function handleSave() {
|
||||||
let contractForm = formRefByBaseInfo.value.form;
|
let contractForm = formRefByBaseInfo.value.form;
|
||||||
let bussinessForm = formRef.value.form;
|
let bussinessForm = formRef.value.form;
|
||||||
|
|
||||||
bussinessForm.priceStyleName = getDictObj(DICT_TYPE.contractPriceStyle, bussinessForm.priceStyleId)?.label
|
bussinessForm.priceStyleName = getDictObj(DICT_TYPE.contract_price_style, bussinessForm.priceStyleId)?.label
|
||||||
bussinessForm.choiceTypeName = getDictObj(DICT_TYPE.contractSelectionMethod, bussinessForm.choiceType)?.label;
|
bussinessForm.choiceTypeName = getDictObj(DICT_TYPE.contract_selection_method, bussinessForm.choiceType)?.label;
|
||||||
|
|
||||||
// 合同附件
|
// 合同附件
|
||||||
{
|
{
|
||||||
|
@ -249,12 +249,12 @@ async function handleSave() {
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.fundDitchName = getDictObj(
|
newForm.fundDitchName = getDictObj(
|
||||||
DICT_TYPE.contractFundingSource,
|
DICT_TYPE.contract_funding_source,
|
||||||
newForm.fundDitch
|
newForm.fundDitch
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
newForm.priceTypeName = getDictObj(
|
newForm.priceTypeName = getDictObj(
|
||||||
DICT_TYPE.contractCurrencyUnit,
|
DICT_TYPE.contract_currency_unit,
|
||||||
newForm.priceType
|
newForm.priceType
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractSelectionMethod)
|
data: getDictOptions(DICT_TYPE.contract_selection_method)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -108,7 +108,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
name: 'fs-dict-select',
|
name: 'fs-dict-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractCurrencyUnit),
|
data: getDictOptions(DICT_TYPE.contract_currency_unit),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -157,12 +157,12 @@ async function handleSave() {
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.fundDitchName = getDictObj(
|
newForm.fundDitchName = getDictObj(
|
||||||
DICT_TYPE.contractFundingSource,
|
DICT_TYPE.contract_funding_source,
|
||||||
newForm.fundDitch,
|
newForm.fundDitch,
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
newForm.priceTypeName = getDictObj(
|
newForm.priceTypeName = getDictObj(
|
||||||
DICT_TYPE.contractCurrencyUnit,
|
DICT_TYPE.contract_currency_unit,
|
||||||
newForm.priceType,
|
newForm.priceType,
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
name: 'fs-dict-select',
|
name: 'fs-dict-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractCurrencyUnit),
|
data: getDictOptions(DICT_TYPE.contract_currency_unit),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
show: true,
|
show: true,
|
||||||
|
|
|
@ -101,7 +101,7 @@ const formBinding = ref({
|
||||||
name: "fs-dict-radio",
|
name: "fs-dict-radio",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.sysNormalDisable),
|
data: getDictOptions(DICT_TYPE.sys_normal_disable),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,7 +11,7 @@ export function getColumns(_params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'status', title: '状态', width: 150, slots: {
|
field: 'status', title: '状态', width: 150, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.status, DICT_TYPE.sysNormalDisable);
|
return useRender.renderDict(row.status, DICT_TYPE.sys_normal_disable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -62,7 +62,7 @@ const [BaseModal, baseModalApi] = useVbenModal({
|
||||||
isConfirmLoading.value = true
|
isConfirmLoading.value = true
|
||||||
|
|
||||||
let form = formRef.value?.form
|
let form = formRef.value?.form
|
||||||
form.type = DICT_TYPE.comprehensiveProjectName
|
form.type = DICT_TYPE.comprehensive_project_name
|
||||||
|
|
||||||
await Apis.dictData.post_save({ data: form });
|
await Apis.dictData.post_save({ data: form });
|
||||||
emit("success");
|
emit("success");
|
||||||
|
|
|
@ -36,7 +36,7 @@ const gridOptions = reactive(gridProps({
|
||||||
return Apis.dictData.get_page({
|
return Apis.dictData.get_page({
|
||||||
params: {
|
params: {
|
||||||
pageNum: page.currentPage, pageSize: page.pageSize,
|
pageNum: page.currentPage, pageSize: page.pageSize,
|
||||||
type: DICT_TYPE.comprehensiveProjectName,
|
type: DICT_TYPE.comprehensive_project_name,
|
||||||
...form
|
...form
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,7 +24,7 @@ export function getColumns(_params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'status', title: '状态', width: 150, slots: {
|
field: 'status', title: '状态', width: 150, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.status, DICT_TYPE.sysNormalDisable);
|
return useRender.renderDict(row.status, DICT_TYPE.sys_normal_disable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,7 +73,7 @@ const formBinding = ref({
|
||||||
name: "fs-dict-radio",
|
name: "fs-dict-radio",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.sysNormalDisable),
|
data: getDictOptions(DICT_TYPE.sys_normal_disable),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -156,7 +156,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
name: 'fs-dict-select',
|
name: 'fs-dict-select',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractCurrencyUnit),
|
data: getDictOptions(DICT_TYPE.contract_currency_unit),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -164,7 +164,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.contractCurrencyUnit,form.priceType)?.label}</span>;
|
return <span class="mr-2">{getDictObj(DICT_TYPE.contract_currency_unit,form.priceType)?.label}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -178,7 +178,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundFlow),
|
data: getDictOptions(DICT_TYPE.contract_fund_flow),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -186,7 +186,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.contractFundFlow,form.fundAllocation)?.label}</span>;
|
return <span class="mr-2">{getDictObj(DICT_TYPE.contract_fund_flow,form.fundAllocation)?.label}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -200,7 +200,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundingSource),
|
data: getDictOptions(DICT_TYPE.contract_funding_source),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -208,7 +208,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.contractFundingSource,form.fundDitch)?.label}</span>;
|
return <span class="mr-2">{getDictObj(DICT_TYPE.contract_funding_source,form.fundDitch)?.label}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -221,7 +221,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
name: 'fs-dict-radio',
|
name: 'fs-dict-radio',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.commonWhether),
|
data: getDictOptions(DICT_TYPE.common_whether),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -229,7 +229,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.commonWhether,form.frameProtocol)?.label}</span>;
|
return <span class="mr-2">{getDictObj(DICT_TYPE.common_whether,form.frameProtocol)?.label}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -242,7 +242,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
name: 'fs-dict-radio',
|
name: 'fs-dict-radio',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.commonWhether),
|
data: getDictOptions(DICT_TYPE.common_whether),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -250,7 +250,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.commonWhether,form.frameProtocolCtr)?.label}</span>;
|
return <span class="mr-2">{getDictObj(DICT_TYPE.common_whether,form.frameProtocolCtr)?.label}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -264,7 +264,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm),
|
data: getDictOptions(DICT_TYPE.contract_organization_form),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -272,7 +272,7 @@ export function getFormSchema(params: any = {}) {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.contractOrganizationForm,form.organiza)?.label}</span>;
|
return <span class="mr-2">{getDictObj(DICT_TYPE.contract_organization_form,form.organiza)?.label}</span>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,84 +1,90 @@
|
||||||
import { DICT_TYPE, getDictObj, getDictOptions } from "#/utils/dict";
|
import { DICT_TYPE, getDictObj, getDictOptions } from '#/utils/dict';
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from '@fast-crud/fast-crud';
|
||||||
|
|
||||||
export function getFormSchema(_params: any = {}) {
|
export function getFormSchema(_params: any = {}) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
initialForm: {
|
initialForm: {
|
||||||
projectNum4:'克拉玛依市热力有限责任公司'
|
signUnitName: '克拉玛依市热力有限责任公司',
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
projectNum: {
|
objects: {
|
||||||
title: "合同标的",
|
title: '合同标的',
|
||||||
key: "projectNum",
|
key: 'objects',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
},
|
},
|
||||||
rules: [{ required: true }],
|
rules: [{ required: true }],
|
||||||
},
|
},
|
||||||
projectNum1: {
|
objectsSum: {
|
||||||
title: "标的金额",
|
title: '标的金额',
|
||||||
key: "projectNum1",
|
key: 'objectsSum',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input-number",
|
name: 'a-input-number',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
},
|
},
|
||||||
suffixRender({ form, value }) {
|
suffixRender({ form, value }) {
|
||||||
return <span class="mr-2">{getDictObj(DICT_TYPE.contractCurrencyUnit,form.priceType)?.label}</span>;
|
return (
|
||||||
|
<span class="mr-2">
|
||||||
|
{
|
||||||
|
getDictObj(DICT_TYPE.contract_currency_unit, form.priceType)
|
||||||
|
?.label
|
||||||
}
|
}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
projectNum2: {
|
},
|
||||||
title: "是否含税",
|
isIncludeTax: {
|
||||||
key: "projectNum2",
|
title: '是否含税',
|
||||||
|
key: 'isIncludeTax',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.commonWhether)
|
data: getDictOptions(DICT_TYPE.common_whether),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum3: {
|
signUserId: {
|
||||||
title: "我方签约人",
|
title: '我方签约人',
|
||||||
key: "projectNum3",
|
key: 'signUserId',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-select",
|
name: 'fs-dict-select',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: []
|
data: [],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum4: {
|
signUnitName: {
|
||||||
title: "我方签约单位",
|
title: '我方签约单位',
|
||||||
key: "projectNum4",
|
key: 'signUnitName',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
readOnly:true
|
readOnly: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum5: {
|
projectNum5: {
|
||||||
title: "合同相对人",
|
title: '合同相对人',
|
||||||
key: "projectNum5",
|
key: 'projectNum5',
|
||||||
col: { span: 16 },
|
col: { span: 16 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractProjectType)
|
data: getDictOptions(DICT_TYPE.contract_project_type),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -91,23 +97,23 @@ export function getFormSchema(_params: any = {}) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum6: {
|
projectNum6: {
|
||||||
title: "公告发布方式",
|
title: '公告发布方式',
|
||||||
key: "projectNum6",
|
key: 'projectNum6',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
isBid: {
|
isBid: {
|
||||||
title: "划分标段",
|
title: '划分标段',
|
||||||
key: "isBid",
|
key: 'isBid',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
// component: {
|
// component: {
|
||||||
// name: "fs-dict-radio",
|
// name: "fs-dict-radio",
|
||||||
// vModel: "value",
|
// vModel: "value",
|
||||||
// dict: dict({
|
// dict: dict({
|
||||||
// data: getDictOptions(DICT_TYPE.sectionType)
|
// data: getDictOptions(DICT_TYPE.section_type)
|
||||||
// }),
|
// }),
|
||||||
// },
|
// },
|
||||||
conditionalRender: {
|
conditionalRender: {
|
||||||
|
@ -116,16 +122,22 @@ export function getFormSchema(_params: any = {}) {
|
||||||
},
|
},
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
//注意此处的v-model写法
|
//注意此处的v-model写法
|
||||||
let options1 = getDictOptions(DICT_TYPE.deadlineForPerformance,'string')
|
let options1 = getDictOptions(
|
||||||
|
DICT_TYPE.deadlineForPerformance,
|
||||||
|
'string',
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<a-form-item class="inline-block !mb-0">
|
<a-form-item class="!mb-0 inline-block">
|
||||||
<a-radio-group v-model:value={form.isBid} options={options1} />
|
<a-radio-group
|
||||||
|
v-model:value={form.isBid}
|
||||||
|
options={options1}
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<div class="w-2"></div>
|
<div class="w-2"></div>
|
||||||
{form.isBid === 1 && (
|
{form.isBid === 1 && (
|
||||||
<a-form-item label="相关约定" class="inline-block !mb-0">
|
<a-form-item label="相关约定" class="!mb-0 inline-block">
|
||||||
<a-input v-model:value={form.xxxx} />
|
<a-input v-model:value={form.xxxx} />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
)}
|
)}
|
||||||
|
@ -135,71 +147,70 @@ export function getFormSchema(_params: any = {}) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum7: {
|
projectNum7: {
|
||||||
title: "履行地点",
|
title: '履行地点',
|
||||||
key: "projectNum7",
|
key: 'projectNum7',
|
||||||
col: { span: 16 },
|
col: { span: 16 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum8: {
|
projectNum8: {
|
||||||
title: "专项号",
|
title: '专项号',
|
||||||
key: "projectNum8",
|
key: 'projectNum8',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: 'a-input',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum9: {
|
projectNum9: {
|
||||||
title: "纠纷解决方式",
|
title: '纠纷解决方式',
|
||||||
key: "projectNum9",
|
key: 'projectNum9',
|
||||||
col: { span: 16 },
|
col: { span: 16 },
|
||||||
component: {
|
component: {
|
||||||
name: "fs-dict-radio",
|
name: 'fs-dict-radio',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.disputeSettlementMethods)
|
data: getDictOptions(DICT_TYPE.dispute_settlement_methods),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
projectNum10: {
|
projectNum10: {
|
||||||
title: "质保金期限",
|
title: '质保金期限',
|
||||||
key: "projectNum10",
|
key: 'projectNum10',
|
||||||
col: { span: 8 },
|
col: { span: 8 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input-number",
|
name: 'a-input-number',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
},
|
},
|
||||||
suffixRender({ value }) {
|
suffixRender({ value }) {
|
||||||
return <span class="mr-2">个月</span>;
|
return <span class="mr-2">个月</span>;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
projectNum11: {
|
projectNum11: {
|
||||||
title: "预付款比例",
|
title: '预付款比例',
|
||||||
key: "projectNum11",
|
key: 'projectNum11',
|
||||||
col: { span: 16 },
|
col: { span: 16 },
|
||||||
component: {
|
component: {
|
||||||
name: "a-input-number",
|
name: 'a-input-number',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
},
|
},
|
||||||
suffixRender({ value }) {
|
suffixRender({ value }) {
|
||||||
return <span class="mr-2">%</span>;
|
return <span class="mr-2">%</span>;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
stockPlanMx: {
|
stockPlanMx: {
|
||||||
title: "承办人意见",
|
title: '承办人意见',
|
||||||
key: "stockPlanMx",
|
key: 'stockPlanMx',
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
labelWrap: true,
|
labelWrap: true,
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: 'a-textarea',
|
||||||
vModel: "value",
|
vModel: 'value',
|
||||||
autoSize: { minRows: 4, maxRows: 6 }
|
autoSize: { minRows: 4, maxRows: 6 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,11 +156,11 @@ async function handleSave() {
|
||||||
let bussinessForm = formRef.value.form;
|
let bussinessForm = formRef.value.form;
|
||||||
|
|
||||||
bussinessForm.priceStyleName = getDictObj(
|
bussinessForm.priceStyleName = getDictObj(
|
||||||
DICT_TYPE.contractPriceStyle,
|
DICT_TYPE.contract_price_style,
|
||||||
bussinessForm.priceStyleId,
|
bussinessForm.priceStyleId,
|
||||||
)?.label;
|
)?.label;
|
||||||
bussinessForm.choiceTypeName = getDictObj(
|
bussinessForm.choiceTypeName = getDictObj(
|
||||||
DICT_TYPE.contractSelectionMethod,
|
DICT_TYPE.contract_selection_method,
|
||||||
bussinessForm.choiceType,
|
bussinessForm.choiceType,
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
|
@ -256,12 +256,12 @@ async function handleSave() {
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.fundDitchName = getDictObj(
|
newForm.fundDitchName = getDictObj(
|
||||||
DICT_TYPE.contractFundingSource,
|
DICT_TYPE.contract_funding_source,
|
||||||
newForm.fundDitch,
|
newForm.fundDitch,
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
newForm.priceTypeName = getDictObj(
|
newForm.priceTypeName = getDictObj(
|
||||||
DICT_TYPE.contractCurrencyUnit,
|
DICT_TYPE.contract_currency_unit,
|
||||||
newForm.priceType,
|
newForm.priceType,
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractSelectionMethod)
|
data: getDictOptions(DICT_TYPE.contract_selection_method)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -139,7 +139,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
class: 'min-w-[200px]',
|
class: 'min-w-[200px]',
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractFundingSource)
|
data: getDictOptions(DICT_TYPE.contract_funding_source)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -48,7 +48,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -48,7 +48,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -87,7 +87,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
col: { span: 24 },
|
col: { span: 24 },
|
||||||
render({ form }) {
|
render({ form }) {
|
||||||
//注意此处的v-model写法
|
//注意此处的v-model写法
|
||||||
let options1 = getDictOptions(DICT_TYPE.disputeSettlementMethods,'string')
|
let options1 = getDictOptions(DICT_TYPE.dispute_settlement_methods,'string')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
|
|
@ -153,8 +153,8 @@ async function handleSave() {
|
||||||
let contractForm = formRefByBaseInfo.value.form;
|
let contractForm = formRefByBaseInfo.value.form;
|
||||||
let bussinessForm = formRef.value.form;
|
let bussinessForm = formRef.value.form;
|
||||||
|
|
||||||
bussinessForm.priceStyleName = getDictObj(DICT_TYPE.contractPriceStyle, bussinessForm.priceStyleId)?.label
|
bussinessForm.priceStyleName = getDictObj(DICT_TYPE.contract_price_style, bussinessForm.priceStyleId)?.label
|
||||||
bussinessForm.choiceTypeName = getDictObj(DICT_TYPE.contractSelectionMethod, bussinessForm.choiceType)?.label;
|
bussinessForm.choiceTypeName = getDictObj(DICT_TYPE.contract_selection_method, bussinessForm.choiceType)?.label;
|
||||||
|
|
||||||
// 合同附件
|
// 合同附件
|
||||||
{
|
{
|
||||||
|
@ -246,12 +246,12 @@ async function handleSave() {
|
||||||
}
|
}
|
||||||
|
|
||||||
newForm.fundDitchName = getDictObj(
|
newForm.fundDitchName = getDictObj(
|
||||||
DICT_TYPE.contractFundingSource,
|
DICT_TYPE.contract_funding_source,
|
||||||
newForm.fundDitch
|
newForm.fundDitch
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
newForm.priceTypeName = getDictObj(
|
newForm.priceTypeName = getDictObj(
|
||||||
DICT_TYPE.contractCurrencyUnit,
|
DICT_TYPE.contract_currency_unit,
|
||||||
newForm.priceType
|
newForm.priceType
|
||||||
)?.label;
|
)?.label;
|
||||||
|
|
||||||
|
|
|
@ -31,14 +31,14 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'organiza', title: '组织形式', width: 120, slots: {
|
field: 'organiza', title: '组织形式', width: 120, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.organiza, DICT_TYPE.contractOrganizationForm);
|
return useRender.renderDict(row.organiza, DICT_TYPE.contract_organization_form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contractFundFlow);
|
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contract_fund_flow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -74,7 +74,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -31,14 +31,14 @@ export function getColumns(params: any = {}): VxeGridPropTypes.Columns {
|
||||||
{
|
{
|
||||||
field: 'organiza', title: '组织形式', width: 120, slots: {
|
field: 'organiza', title: '组织形式', width: 120, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.organiza, DICT_TYPE.contractOrganizationForm);
|
return useRender.renderDict(row.organiza, DICT_TYPE.contract_organization_form);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
field: 'fundAllocation', title: '资金流向', width: 100, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contractFundFlow);
|
return useRender.renderDict(row.fundAllocation, DICT_TYPE.contract_fund_flow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -74,7 +74,7 @@ export function getFormSchema(_params: any = {}) {
|
||||||
class: 'min-w-[180px]',
|
class: 'min-w-[180px]',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
dict: dict({
|
dict: dict({
|
||||||
data: getDictOptions(DICT_TYPE.contractOrganizationForm)
|
data: getDictOptions(DICT_TYPE.contract_organization_form)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
autoSearchTrigger: 'enter',
|
autoSearchTrigger: 'enter',
|
||||||
|
|
|
@ -92,7 +92,7 @@ const gridOptions = reactive(gridProps({
|
||||||
{
|
{
|
||||||
field: 'status', title: '状态', minWidth: 100, slots: {
|
field: 'status', title: '状态', minWidth: 100, slots: {
|
||||||
default: ({ row }) => {
|
default: ({ row }) => {
|
||||||
return useRender.renderDict(row.status, DICT_TYPE.sysNormalDisable);
|
return useRender.renderDict(row.status, DICT_TYPE.sys_normal_disable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,47 +2,104 @@ import { defineConfig } from '@vben/vite-config';
|
||||||
|
|
||||||
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
|
||||||
import Components from 'unplugin-vue-components/vite';
|
import Components from 'unplugin-vue-components/vite';
|
||||||
import AutoImport from 'unplugin-auto-import/vite'
|
import AutoImport from 'unplugin-auto-import/vite';
|
||||||
import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import'
|
import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import';
|
||||||
|
import fs from 'fs';
|
||||||
|
import path from 'path';
|
||||||
|
import { pathToFileURL } from 'url';
|
||||||
|
|
||||||
|
async function autoBuildDict() {
|
||||||
|
return {
|
||||||
|
name: 'my-plugin',
|
||||||
|
async handleHotUpdate({ file, server }) {
|
||||||
|
if (file.endsWith('static.data.js')) {
|
||||||
|
console.log(`File changed: ${file}`);
|
||||||
|
const dataPath = path.resolve(
|
||||||
|
__dirname,
|
||||||
|
'src/utils/dict/static.data.js',
|
||||||
|
);
|
||||||
|
const sharedPath = path.resolve(__dirname, 'src/utils/dict/shared.ts');
|
||||||
|
|
||||||
|
// Append a query parameter to avoid caching
|
||||||
|
const dataUrl = `${pathToFileURL(dataPath).href}?update=${Date.now()}`;
|
||||||
|
console.log(`dataUrl: ${dataUrl}`);
|
||||||
|
|
||||||
|
// Import the data
|
||||||
|
const module = await import(dataUrl);
|
||||||
|
const data = module.default;
|
||||||
|
console.log(`data: ${data}`);
|
||||||
|
|
||||||
|
// Create new enum entries with annotations
|
||||||
|
const enumEntries = Object.entries(data)
|
||||||
|
.map(([key, { annotation }]) => {
|
||||||
|
const comment = annotation ? ` /** ${annotation} */\n` : '';
|
||||||
|
return `${comment} ${key} = '${key}'`;
|
||||||
|
})
|
||||||
|
.join(',\n');
|
||||||
|
|
||||||
|
// Create the new enum content
|
||||||
|
const enumContent = `export enum DICT_TYPE {\n${enumEntries}\n}\n`;
|
||||||
|
console.log(`sharedPath: ${sharedPath}`);
|
||||||
|
|
||||||
|
// Write the new content to shared.ts
|
||||||
|
fs.writeFileSync(sharedPath, enumContent);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default defineConfig(async () => {
|
export default defineConfig(async () => {
|
||||||
return {
|
return {
|
||||||
application: {},
|
application: {},
|
||||||
|
// plugins: [
|
||||||
|
// {
|
||||||
|
// condition: true,
|
||||||
|
// plugins: async () => {
|
||||||
|
// return [await build()];
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// AutoImport({
|
||||||
|
// // 自动导入 Vue 相关函数,如:ref, reactive, toRef 等
|
||||||
|
// imports: ['vue'],
|
||||||
|
// include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/],
|
||||||
|
// resolvers: [
|
||||||
|
// // // 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)
|
||||||
|
// // ElementPlusResolver(),
|
||||||
|
// // // 自动导入图标组件
|
||||||
|
// // IconsResolver({})
|
||||||
|
// ],
|
||||||
|
// vueTemplate: true, // 是否在 vue 模板中自动导入
|
||||||
|
// dts: true, // (false) 配置文件生成位置,默认是根目录 /auto-imports.d.ts
|
||||||
|
// }),
|
||||||
|
// Components({
|
||||||
|
// dts: true,
|
||||||
|
// resolvers: [
|
||||||
|
// AntDesignVueResolver({
|
||||||
|
// importStyle: false, // css in js
|
||||||
|
// }),
|
||||||
|
// ],
|
||||||
|
// }),
|
||||||
|
// lazyImport({
|
||||||
|
// resolvers: [
|
||||||
|
// VxeResolver({
|
||||||
|
// libraryName: 'vxe-table',
|
||||||
|
// }),
|
||||||
|
// ],
|
||||||
|
// }),
|
||||||
|
// ],
|
||||||
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
|
autoBuildDict(),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
// 自动导入 Vue 相关函数,如:ref, reactive, toRef 等
|
// 自动导入 Vue 相关函数,如:ref, reactive, toRef 等
|
||||||
imports: ['vue'],
|
imports: ['vue'],
|
||||||
include: [
|
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/],
|
||||||
/\.[tj]sx?$/,
|
|
||||||
/\.vue$/,
|
|
||||||
/\.vue\?vue/,
|
|
||||||
],
|
|
||||||
resolvers: [
|
resolvers: [
|
||||||
// // 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)
|
|
||||||
// ElementPlusResolver(),
|
|
||||||
// // 自动导入图标组件
|
|
||||||
// IconsResolver({})
|
|
||||||
],
|
],
|
||||||
vueTemplate: true, // 是否在 vue 模板中自动导入
|
vueTemplate: true, // 是否在 vue 模板中自动导入
|
||||||
dts: true // (false) 配置文件生成位置,默认是根目录 /auto-imports.d.ts
|
dts: true, // (false) 配置文件生成位置,默认是根目录 /auto-imports.d.ts
|
||||||
}),
|
|
||||||
Components({
|
|
||||||
dts: true,
|
|
||||||
resolvers: [
|
|
||||||
AntDesignVueResolver({
|
|
||||||
importStyle: false, // css in js
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}),
|
|
||||||
lazyImport({
|
|
||||||
resolvers: [
|
|
||||||
VxeResolver({
|
|
||||||
libraryName: 'vxe-table'
|
|
||||||
}),
|
|
||||||
]
|
|
||||||
})
|
|
||||||
],
|
|
||||||
vite: {
|
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
open: false,
|
open: false,
|
||||||
|
@ -52,14 +109,14 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/app/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/app/, '/'),
|
||||||
// target: `http://10.71.220.24:8083/rl`,
|
// target: `http://10.71.220.24:8083/rl`,
|
||||||
target: `http://192.168.147.164:8083/rl`,
|
target: `http://192.168.148.88:8083/rl`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/uc': {
|
'/api/uc': {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/uc/, '/'),
|
||||||
// target: `http://10.71.220.24:8082`,
|
// target: `http://10.71.220.24:8082`,
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/czg/app': {
|
'/api/czg/app': {
|
||||||
|
@ -73,7 +130,7 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/czg\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/czg\/uc/, '/'),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/zp/app': {
|
'/api/zp/app': {
|
||||||
|
@ -87,7 +144,7 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/zp\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/zp\/uc/, '/'),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/xmh/app': {
|
'/api/xmh/app': {
|
||||||
|
@ -101,7 +158,7 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/xmh\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/xmh\/uc/, '/'),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
VITE_APP_TITLE=ERP协同办公系统
|
VITE_APP_TITLE=ERP协同办公系统
|
||||||
|
|
||||||
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
# 应用命名空间,用于缓存、store等功能的前缀,确保隔离
|
||||||
VITE_APP_NAMESPACE=erp-office
|
VITE_APP_NAMESPACE=office
|
||||||
|
|
|
@ -7,7 +7,7 @@ VITE_BASE=/
|
||||||
VITE_GLOB_API_URL=/api
|
VITE_GLOB_API_URL=/api
|
||||||
|
|
||||||
# 是否开启 Nitro Mock服务,true 为开启,false 为关闭
|
# 是否开启 Nitro Mock服务,true 为开启,false 为关闭
|
||||||
VITE_NITRO_MOCK=true
|
VITE_NITRO_MOCK=false
|
||||||
|
|
||||||
# 是否打开 devtools,true 为打开,false 为关闭
|
# 是否打开 devtools,true 为打开,false 为关闭
|
||||||
VITE_DEVTOOLS=false
|
VITE_DEVTOOLS=false
|
||||||
|
|
|
@ -14,3 +14,6 @@ VITE_ROUTER_HISTORY=history
|
||||||
|
|
||||||
# 是否注入全局loading
|
# 是否注入全局loading
|
||||||
VITE_INJECT_APP_LOADING=true
|
VITE_INJECT_APP_LOADING=true
|
||||||
|
|
||||||
|
# 打包后是否生成dist.zip
|
||||||
|
VITE_ARCHIVER=true
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm vite build --mode production",
|
"build": "pnpm vite build --mode production",
|
||||||
|
"build:dev": "pnpm vite build --mode development",
|
||||||
"build:analyze": "pnpm vite build --mode analyze",
|
"build:analyze": "pnpm vite build --mode analyze",
|
||||||
"dev": "pnpm vite --mode development",
|
"dev": "pnpm vite --mode development",
|
||||||
"dev:prod": "pnpm vite --mode production",
|
"dev:prod": "pnpm vite --mode production",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview --port 4173",
|
||||||
"typecheck": "vue-tsc --noEmit --skipLibCheck"
|
"typecheck": "vue-tsc --noEmit --skipLibCheck"
|
||||||
},
|
},
|
||||||
"imports": {
|
"imports": {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const ACCESS_TOKEN_FIELD = 'Token'
|
||||||
* 适用于同时连接多个后端功能开发,通过设置 proxy_type 值实现‘非重启更新’连接的后端
|
* 适用于同时连接多个后端功能开发,通过设置 proxy_type 值实现‘非重启更新’连接的后端
|
||||||
*/
|
*/
|
||||||
export function getBaseURL(): string {
|
export function getBaseURL(): string {
|
||||||
if (import.meta.env.DEV) {
|
if (import.meta.env.MODE === 'development') {
|
||||||
const proxyType = localStorage.getItem('@@@proxy_type') || '';
|
const proxyType = localStorage.getItem('@@@proxy_type') || '';
|
||||||
// return BASE_URL + "/zzz"
|
// return BASE_URL + "/zzz"
|
||||||
return BASE_URL + proxyType
|
return BASE_URL + proxyType
|
||||||
|
|
|
@ -102,7 +102,7 @@ function handleViewAll() {
|
||||||
router.push("/user/todo");
|
router.push("/user/todo");
|
||||||
}
|
}
|
||||||
|
|
||||||
const isDev = import.meta.env.DEV;
|
const isDev = import.meta.env.MODE === 'development';
|
||||||
const value = ref(localStorage.getItem("@@@proxy_type") || ""); // /zp
|
const value = ref(localStorage.getItem("@@@proxy_type") || ""); // /zp
|
||||||
function handleMenuClick(e) {
|
function handleMenuClick(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
@ -111,6 +111,7 @@ function handleMenuClick(e) {
|
||||||
} else {
|
} else {
|
||||||
localStorage.setItem("@@@proxy_type", "/" + e.key);
|
localStorage.setItem("@@@proxy_type", "/" + e.key);
|
||||||
}
|
}
|
||||||
|
location.reload()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -8,5 +8,6 @@ export const overridesPreferences = defineOverridesPreferences({
|
||||||
// overrides
|
// overrides
|
||||||
app: {
|
app: {
|
||||||
name: import.meta.env.VITE_APP_TITLE,
|
name: import.meta.env.VITE_APP_TITLE,
|
||||||
|
authPageLayout: 'panel-center',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -68,7 +68,7 @@ const formSchema = computed((): VbenFormSchema[] => {
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
const isDev = import.meta.env.DEV;
|
const isDev = import.meta.env.MODE === 'development';
|
||||||
function mockLogin(username: string, password: string, isSkip: boolean = true) {
|
function mockLogin(username: string, password: string, isSkip: boolean = true) {
|
||||||
authStore.authLogin({
|
authStore.authLogin({
|
||||||
username,
|
username,
|
||||||
|
|
|
@ -72,8 +72,10 @@ async function loadAddressorData() {
|
||||||
.then(async (res: any) => {
|
.then(async (res: any) => {
|
||||||
|
|
||||||
for (const item of res.rows) {
|
for (const item of res.rows) {
|
||||||
|
if(item.fileUuid){
|
||||||
item.fileUuidArr = item.fileUuid.split(",");
|
item.fileUuidArr = item.fileUuid.split(",");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addressorData.value = res.rows;
|
addressorData.value = res.rows;
|
||||||
|
|
||||||
|
@ -257,7 +259,7 @@ function downloadFile(fileUrl) {
|
||||||
<div class="text-gray-600 my-4 relative z-10">
|
<div class="text-gray-600 my-4 relative z-10">
|
||||||
预计发言 {{ addressorData.length }} 个单位
|
预计发言 {{ addressorData.length }} 个单位
|
||||||
</div>
|
</div>
|
||||||
<ul class="list-disc list-inside space-y-2 relative z-10">
|
<ul class="list-disc list-inside space-y-2 relative z-10 h-[30vh] overflow-auto">
|
||||||
<li v-for="(speaker, index) in addressorData" :key="index" class="flex items-center">
|
<li v-for="(speaker, index) in addressorData" :key="index" class="flex items-center">
|
||||||
<span class="w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3">
|
<span class="w-8 h-8 rounded-full bg-blue-500 text-white flex items-center justify-center mr-3">
|
||||||
{{ speaker.addressor.substring(0, 1) }}
|
{{ speaker.addressor.substring(0, 1) }}
|
||||||
|
@ -366,15 +368,15 @@ function downloadFile(fileUrl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
.speaker-info:hover {
|
.speaker-info:hover {
|
||||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-area {
|
.content-area {
|
||||||
min-height: 150px;
|
|
||||||
background: #f9fafb;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
min-height: 150px;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
|
background: #f9fafb;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -46,20 +46,20 @@ export default defineConfig(async () => {
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
open: false,
|
open: false,
|
||||||
port: 9528,
|
port: 9529,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api/app': {
|
'/api/app': {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/app/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/app/, '/'),
|
||||||
// target: `http://10.71.220.24:8083/rl`,
|
// target: `http://10.71.220.24:8083/rl`,
|
||||||
target: `http://192.168.147.164:8083/rl`,
|
target: `http://192.168.148.88:8083/rl`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/uc': {
|
'/api/uc': {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/uc/, '/'),
|
||||||
// target: `http://10.71.220.24:8082`,
|
// target: `http://10.71.220.24:8082`,
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/czg/app': {
|
'/api/czg/app': {
|
||||||
|
@ -73,7 +73,7 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/czg\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/czg\/uc/, '/'),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/zp/app': {
|
'/api/zp/app': {
|
||||||
|
@ -87,7 +87,7 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/zp\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/zp\/uc/, '/'),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
'/api/xmh/app': {
|
'/api/xmh/app': {
|
||||||
|
@ -101,7 +101,7 @@ export default defineConfig(async () => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api\/xmh\/uc/, '/'),
|
rewrite: (path) => path.replace(/^\/api\/xmh\/uc/, '/'),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
target: `http://192.168.147.164:8082`,
|
target: `http://192.168.148.88:8082`,
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { defineBuildConfig } from 'unbuild';
|
||||||
|
|
||||||
|
export default defineBuildConfig({
|
||||||
|
clean: true,
|
||||||
|
declaration: true,
|
||||||
|
entries: ['src/index'],
|
||||||
|
});
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": "pansoft-utils",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"stub": "pnpm unbuild --stub"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"main": "./dist/index.mjs",
|
||||||
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
"*": [
|
||||||
|
"./dist/*",
|
||||||
|
"./*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./src/index.ts",
|
||||||
|
"import": "./dist/index.mjs",
|
||||||
|
"require": "./dist/index.cjs"
|
||||||
|
},
|
||||||
|
"./*": "./*"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"dayjs": "^1.11.13"
|
||||||
|
},
|
||||||
|
"devDependencies": {}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"extends": "@vben/tsconfig/node.json",
|
||||||
|
"include": ["src"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
|
@ -44,6 +44,7 @@
|
||||||
"commit": "czg",
|
"commit": "czg",
|
||||||
"dev": "turbo-run dev",
|
"dev": "turbo-run dev",
|
||||||
"dev:office": "pnpm -F web-office run dev",
|
"dev:office": "pnpm -F web-office run dev",
|
||||||
|
"dev:contract": "pnpm -F web-contract run dev",
|
||||||
"dev:antd": "pnpm -F @vben/web-antd run dev",
|
"dev:antd": "pnpm -F @vben/web-antd run dev",
|
||||||
"dev:docs": "pnpm -F @vben/docs run dev",
|
"dev:docs": "pnpm -F @vben/docs run dev",
|
||||||
"dev:ele": "pnpm -F @vben/web-ele run dev",
|
"dev:ele": "pnpm -F @vben/web-ele run dev",
|
||||||
|
@ -55,6 +56,8 @@
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"prepare": "is-ci || husky",
|
"prepare": "is-ci || husky",
|
||||||
"preview": "turbo-run preview",
|
"preview": "turbo-run preview",
|
||||||
|
"preview:office": "turbo-run preview --port 4173",
|
||||||
|
"preview:contract": "turbo-run preview --port 4174",
|
||||||
"publint": "vsh publint",
|
"publint": "vsh publint",
|
||||||
"reinstall": "pnpm clean --del-lock && pnpm bootstrap",
|
"reinstall": "pnpm clean --del-lock && pnpm bootstrap",
|
||||||
"test:unit": "vitest",
|
"test:unit": "vitest",
|
||||||
|
|
|
@ -1,6 +1,28 @@
|
||||||
import type { Preferences } from '@vben-core/preferences';
|
import type { Preferences } from '@vben-core/preferences';
|
||||||
import type { DeepPartial } from '@vben-core/typings';
|
import type { DeepPartial } from '@vben-core/typings';
|
||||||
|
|
||||||
|
function isObject(item) {
|
||||||
|
return item && typeof item === 'object' && !Array.isArray(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergeDeep(target, source) {
|
||||||
|
if (!isObject(target) || !isObject(source)) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const key in source) {
|
||||||
|
if (isObject(source[key])) {
|
||||||
|
if (!target[key]) {
|
||||||
|
Object.assign(target, { [key]: {} });
|
||||||
|
}
|
||||||
|
mergeDeep(target[key], source[key]);
|
||||||
|
} else {
|
||||||
|
Object.assign(target, { [key]: source[key] });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 如果你想所有的app都使用相同的默认偏好设置,你可以在这里定义
|
* 如果你想所有的app都使用相同的默认偏好设置,你可以在这里定义
|
||||||
* 而不是去修改 @vben-core/preferences 中的默认偏好设置
|
* 而不是去修改 @vben-core/preferences 中的默认偏好设置
|
||||||
|
@ -9,31 +31,7 @@ import type { DeepPartial } from '@vben-core/typings';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function defineOverridesPreferences(preferences: DeepPartial<Preferences>) {
|
function defineOverridesPreferences(preferences: DeepPartial<Preferences>) {
|
||||||
preferences = {
|
return mergeDeep(preferences, {
|
||||||
app: {
|
|
||||||
accessMode: 'frontend',
|
|
||||||
// authPageLayout: 'panel-center',
|
|
||||||
colorGrayMode: false,
|
|
||||||
colorWeakMode: false,
|
|
||||||
compact: false,
|
|
||||||
contentCompact: 'wide',
|
|
||||||
defaultAvatar: '',
|
|
||||||
dynamicTitle: true,
|
|
||||||
// 是否开启检查更新
|
|
||||||
enableCheckUpdates: true,
|
|
||||||
// 检查更新的时间间隔,单位为分钟
|
|
||||||
checkUpdatesInterval: 1,
|
|
||||||
// 开启布局设置按钮
|
|
||||||
enablePreferences: false,
|
|
||||||
enableRefreshToken: false,
|
|
||||||
isMobile: false,
|
|
||||||
layout: 'sidebar-nav',
|
|
||||||
locale: 'zh-CN',
|
|
||||||
loginExpiredMode: 'page',
|
|
||||||
name: 'ERP协同办公系统',
|
|
||||||
preferencesButtonPosition: 'auto',
|
|
||||||
watermark: false,
|
|
||||||
},
|
|
||||||
theme: {
|
theme: {
|
||||||
mode: 'light',
|
mode: 'light',
|
||||||
builtinType: 'custom',
|
builtinType: 'custom',
|
||||||
|
@ -61,8 +59,7 @@ function defineOverridesPreferences(preferences: DeepPartial<Preferences>) {
|
||||||
languageToggle: false,
|
languageToggle: false,
|
||||||
themeToggle: false,
|
themeToggle: false,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
return preferences;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { defineOverridesPreferences };
|
export { defineOverridesPreferences };
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
"name": "web-office",
|
"name": "web-office",
|
||||||
"path": "apps/web-office",
|
"path": "apps/web-office",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "pansoft-utils",
|
||||||
|
"path": "internal/common-utils",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "@vben/commitlint-config",
|
"name": "@vben/commitlint-config",
|
||||||
"path": "internal/lint-configs/commitlint-config",
|
"path": "internal/lint-configs/commitlint-config",
|
||||||
|
|
Loading…
Reference in New Issue