Commit 150588ef authored by sunguoshu's avatar sunguoshu

update

parent 36c5a016
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
vform@1.3.18 sunguoshu@csii.com.cn 2023-11-15 13:51:32
{"widgetList":[{"key":17285,"type":"card","category":"container","icon":"card","sizeList":[{"label":"default","value":""},{"label":"small","value":"small"}],"widgetList":[{"key":9783,"type":"magnifier","icon":"magnifier-field","formItemFlag":true,"sizeList":[{"label":"default","value":"default"},{"label":"large","value":"large"},{"label":"small","value":"small"}],"options":{"name":"magnifier32980","label":"客户名称","isAloneWidthSetting":false,"labelWidth":0,"wrapperWidth":0,"labelAlign":"left","disabled":false,"hidden":false,"readonly":false,"required":false,"formItemField":"custNm","verify":[],"verifyTrigger":"blur","allowClear":true,"placeholder":"","size":"default","isCheckBox":false,"tablePostUrl":"http://localhost:8080/","title":"选择申请人","totalNumber":"","searchItem":{"name":"a1","label":"客户查询条件"},"tableSize":"middle","columns":[{"formatCode":"","title":"客户姓名","dataIndex":"a1","align":"center"},{"formatCode":"","title":"证件类型","dataIndex":"a2","align":"center"},{"formatCode":"","title":"证件号码","dataIndex":"a3","align":"center"},{"formatCode":"","title":"组织机构","dataIndex":"a4","align":"center"},{"formatCode":"","title":"贷款卡号","dataIndex":"a5","align":"center"},{"formatCode":"","title":"是否冻结","dataIndex":"a6","align":"center"},{"formatCode":"","title":"是否有效","dataIndex":"a7","align":"center"}],"customClass":[],"onOk":""},"id":"magnifier32980"},{"key":9783,"type":"magnifier","icon":"magnifier-field","formItemFlag":true,"sizeList":[{"label":"default","value":"default"},{"label":"large","value":"large"},{"label":"small","value":"small"}],"options":{"name":"magnifier94994","label":"调整字段组合","isAloneWidthSetting":false,"labelWidth":0,"wrapperWidth":0,"labelAlign":"left","disabled":false,"hidden":false,"readonly":false,"required":false,"formItemField":"abortBizReason","verify":[],"verifyTrigger":"blur","allowClear":true,"placeholder":"","size":"default","isCheckBox":false,"tablePostUrl":"","title":"选择字段组合","totalNumber":"","searchItem":{"name":"","label":""},"tableSize":"middle","columns":[{"formatCode":"","title":"组合编号","dataIndex":"a1","align":"center"},{"formatCode":"","title":"组合名称","dataIndex":"a2","align":"center"},{"formatCode":"","title":"调整类型","dataIndex":"a3","align":"center"},{"formatCode":"","title":"使用客户类型","dataIndex":"a4","align":"center"},{"formatCode":"","title":"审批权限","dataIndex":"a5","align":"center"}],"customClass":[],"onOk":""},"id":"magnifier94994"},{"key":56872,"type":"select","icon":"select-field","formItemFlag":true,"sizeList":[{"label":"default","value":""},{"label":"large","value":"large"},{"label":"small","value":"small"}],"options":{"name":"select38193","placeholder":"","size":"default","label":"调整类型","isAloneWidthSetting":false,"labelWidth":0,"wrapperWidth":0,"labelAlign":"left","disabled":false,"hidden":false,"readonly":false,"required":false,"formItemField":"a","verify":[],"verifyTrigger":"blur","allowClear":true,"selectListName":"mySelect","selectMode":"default","beforeSlot":"","maxLength":12,"optionItems":[{"label":"业务申请数据","value":1}],"onChange":"","onPressEnter":"","onFocus":"","onBlur":"","defaultValue":"","columnWidth":"200px","customClass":[]},"id":"select38193"},{"key":60353,"type":"flex-box","category":"container","icon":"flex-box","widgetList":[{"key":108281,"type":"button","icon":"button","formItemFlag":false,"typeList":[{"label":"主要","value":"primary"},{"label":"默认","value":""},{"label":"虚线","value":"dashed"},{"label":"危险","value":"danger"},{"label":"链接","value":"link"}],"sizeList":[{"label":"large","value":"large"},{"label":"默认","value":""},{"label":"small","value":"small"}],"functionList":[{"label":"普通按钮","value":"default"},{"label":"提交按钮","value":"submit"},{"label":"重置按钮","value":"cancel"}],"displayStyle":"block","options":{"name":"button41106","label":"启动","size":"","ghost":false,"componentType":"primary","shape":"","icon":"","customClass":[],"functionType":"default","beforeSlot":"","afterSlot":"","onClick":"this.$go('1011_1')"},"id":"button41106"}],"options":{"name":"flexbox67832","customClass":[],"justify":"center","align":"middle","space":0},"id":"flexbox67832"}],"options":{"extraSlot":[],"name":"card8127","size":"default","title":"数据调整启动","bordered":true,"isConcise":false,"isInner":false,"hoverable":false,"buttonMargin":5,"customClass":[]},"id":"card8127"}],"formConfig":{"cName":"特殊项调整启动","cCode":"1011","modelName":"formData","labelAlign":"right","labelCol":6,"wrapperCol":11,"globalVariable":[],"refName":"vForm","rulesName":"rules","size":"","cssCode":".header{\n \n}\n.header>h1{\n font-size: 25px;\n font-weight: bold;\n margin-bottom: unset !important;\n}\n.marginBtm{\n margin-bottom:16px;\n}\n.marginLr{\n margin : 0 16px 0;\n}","customClass":["marginLr"],"functions":[],"layoutType":"PC","jsonVersion":3,"enum":[],"filters":[],"onFormMounted":"this.$remote({\r\n url: '/trades/3000',\r\n params: {},\r\n successFn: (response) => {\r\n this.table.list.pagination.total = response.total\r\n this.params.list = response.data\r\n },\r\n failedFn: (error) => {\r\n console.log(error)\r\n },\r\n conf: {\r\n timeout: 1000\r\n }\r\n })","onFormDataChange":"","onFormCreated":"","wapperCol":14,"labelWidth":150,"labelPosition":"left","onFormValidate":""}}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
vform@1.3.2 jiangweijia@csii.com.cn 2023-08-28 13:11:57
{"widgetList":[{"key":53334,"type":"description","category":"container","icon":"description","sizeList":[{"label":"default","value":"default"},{"label":"middle","value":"middle"},{"label":"small","value":"small"}],"widgetList":[{"type":"description-item","category":"container","internal":true,"widgetList":[],"options":{"name":"descriptionItem75487","customClass":"","dataFilter":"","label":"aa","value":"aa"},"id":"description-item-75487"}],"options":{"name":"description17379","title":"","customClass":[],"bordered":true,"column":2,"size":"default","layout":"horizontal"},"id":"description17379"}],"formConfig":{"cName":"11031","cCode":"11031","modelName":"formData","labelAlign":"right","labelCol":6,"wrapperCol":11,"globalVariable":[],"refName":"vForm","rulesName":"rules","size":"","cssCode":".header{\n \n}\n.header>h1{\n font-size: 25px;\n font-weight: bold;\n margin-bottom: unset !important;\n}\n.marginBtm{\n margin-bottom:16px;\n}\n.marginLr{\n margin : 0 16px 0;\n}","customClass":["marginLr"],"functions":[],"layoutType":"PC","jsonVersion":3,"enum":[],"filters":[],"onFormMounted":"\nthis.$remote({\n url:\"/sso/department/queryDepartmentList\",\n params:{},\n successFn:(res)=>{\n console.log(res)\n let arr =res.data.map(item=>{\n return {\n label: item.depName,\n value: item.depId\n }\n })\n this.options.orgList =arr\n }\n})\n\nthis.$submit(params => {\n this.$remote({\n url:\"trade/$customData.code.do\",\n params:{ \n ...params,\n },\n successFn:(response)=> {\n /*成功回调函数 (数据存储在response)*/\n },\n failedFn:(error)=> {\n console.log(error);\n },\n conf:{\n timeout:1000\n }\n });\n});","onFormDataChange":"","onFormCreated":"","labelWidth":150,"labelPosition":"left","onFormValidate":"","wapperCol":14}}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
vform@1.3.18 sunguoshu@csii.com.cn 2023-11-22 15:23:53
{"widgetList":[],"formConfig":{"cName":"特殊项调整历史查询","cCode":"2010","modelName":"formData","labelAlign":"right","labelCol":6,"wrapperCol":11,"globalVariable":[],"refName":"vForm","rulesName":"rules","size":"","cssCode":".header{\n \n}\n.header>h1{\n font-size: 25px;\n font-weight: bold;\n margin-bottom: unset !important;\n}\n.marginBtm{\n margin-bottom:16px;\n}\n.marginLr{\n margin : 0 16px 0;\n}","customClass":["marginLr"],"functions":[],"layoutType":"PC","jsonVersion":3,"enum":[],"filters":[],"onFormMounted":"this.$remote({\r\n url: '/trades/3000',\r\n params: {},\r\n successFn: (response) => {\r\n this.table.list.pagination.total = response.total\r\n this.params.list = response.data\r\n },\r\n failedFn: (error) => {\r\n console.log(error)\r\n },\r\n conf: {\r\n timeout: 1000\r\n }\r\n })","onFormDataChange":"","onFormCreated":"","wapperCol":14,"labelWidth":150,"labelPosition":"left","onFormValidate":""}}
\ No newline at end of file
This diff is collapsed.
vform@1.3.19 sunguoshu@csii.com.cn 2023-11-17 14:19:15
{"widgetList":[{"key":58370,"type":"select","icon":"select-field","formItemFlag":true,"sizeList":[{"label":"default","value":""},{"label":"large","value":"large"},{"label":"small","value":"small"}],"options":{"name":"select33937","placeholder":"","size":"default","label":"提交类型","isAloneWidthSetting":false,"labelWidth":0,"wrapperWidth":0,"labelAlign":"left","disabled":false,"hidden":false,"readonly":false,"required":true,"formItemField":"accountNo","verify":[],"verifyTrigger":"blur","allowClear":true,"selectListName":"","selectMode":"default","beforeSlot":"","maxLength":12,"optionItems":[{"label":"提交审查岗","value":1},{"label":"取消提交","value":2}],"onChange":"","onPressEnter":"","onFocus":"","onBlur":"","defaultValue":"","columnWidth":"200px","customClass":[]},"id":"select33937"},{"key":87201,"type":"textarea","icon":"textarea-field","formItemFlag":true,"options":{"name":"textarea27788","label":"意见描述","isAloneWidthSetting":false,"labelWidth":0,"wrapperWidth":0,"labelAlign":"left","disabled":false,"hidden":false,"readonly":false,"required":false,"formItemField":"accountNo22","verify":[],"verifyTrigger":"blur","maxLength":12,"placeholder":"","size":"default","allowClear":true,"autosizeMinRows":2,"autosizeMaxRows":2,"customClass":[],"onChange":""},"id":"textarea27788"},{"key":114800,"type":"flex-box","category":"container","icon":"flex-box","widgetList":[{"key":47459,"type":"button","icon":"button","formItemFlag":false,"typeList":[{"label":"主要","value":"primary"},{"label":"默认","value":""},{"label":"虚线","value":"dashed"},{"label":"危险","value":"danger"},{"label":"链接","value":"link"}],"sizeList":[{"label":"large","value":"large"},{"label":"默认","value":""},{"label":"small","value":"small"}],"functionList":[{"label":"普通按钮","value":"default"},{"label":"提交按钮","value":"submit"},{"label":"重置按钮","value":"cancel"}],"displayStyle":"block","options":{"name":"button94654","label":"提交","size":"","ghost":false,"componentType":"primary","shape":"","icon":"","customClass":[],"functionType":"default","beforeSlot":"","afterSlot":"","onClick":"this.$closeModal()"},"id":"button94654"},{"key":47459,"type":"button","icon":"button","formItemFlag":false,"typeList":[{"label":"主要","value":"primary"},{"label":"默认","value":""},{"label":"虚线","value":"dashed"},{"label":"危险","value":"danger"},{"label":"链接","value":"link"}],"sizeList":[{"label":"large","value":"large"},{"label":"默认","value":""},{"label":"small","value":"small"}],"functionList":[{"label":"普通按钮","value":"default"},{"label":"提交按钮","value":"submit"},{"label":"重置按钮","value":"cancel"}],"displayStyle":"block","options":{"name":"button67679","label":"重置","size":"","ghost":false,"componentType":"primary","shape":"","icon":"","customClass":"","functionType":"default","beforeSlot":"","afterSlot":"","onClick":""},"id":"button67679"},{"key":47459,"type":"button","icon":"button","formItemFlag":false,"typeList":[{"label":"主要","value":"primary"},{"label":"默认","value":""},{"label":"虚线","value":"dashed"},{"label":"危险","value":"danger"},{"label":"链接","value":"link"}],"sizeList":[{"label":"large","value":"large"},{"label":"默认","value":""},{"label":"small","value":"small"}],"functionList":[{"label":"普通按钮","value":"default"},{"label":"提交按钮","value":"submit"},{"label":"重置按钮","value":"cancel"}],"displayStyle":"block","options":{"name":"button104260","label":"关闭","size":"","ghost":false,"componentType":"primary","shape":"","icon":"","customClass":[],"functionType":"default","beforeSlot":"","afterSlot":"","onClick":"this.$closeModal()"},"id":"button104260"}],"options":{"name":"flexbox94318","customClass":[],"justify":"center","align":"middle","space":10},"id":"flexbox94318"}],"formConfig":{"cName":"特殊项调整启动","cCode":"1011_2","modelName":"formData","labelAlign":"right","labelCol":6,"wrapperCol":11,"globalVariable":[],"refName":"vForm","rulesName":"rules","size":"","cssCode":".header{\n \n}\n.header>h1{\n font-size: 25px;\n font-weight: bold;\n margin-bottom: unset !important;\n}\n.marginBtm{\n margin-bottom:16px;\n}\n.marginLr{\n margin : 0 16px 0;\n}","customClass":["marginLr"],"functions":[],"layoutType":"PC","jsonVersion":3,"enum":[],"filters":[],"onFormMounted":"this.$remote({\r\n url: '/trades/3000',\r\n params: {},\r\n successFn: (response) => {\r\n this.table.list.pagination.total = response.total\r\n this.params.list = response.data\r\n },\r\n failedFn: (error) => {\r\n console.log(error)\r\n },\r\n conf: {\r\n timeout: 1000\r\n }\r\n })","onFormDataChange":"","onFormCreated":"","wapperCol":14,"labelWidth":150,"labelPosition":"left","onFormValidate":""}}
\ No newline at end of file
This diff is collapsed.
...@@ -10,6 +10,7 @@ declare module 'vue' { ...@@ -10,6 +10,7 @@ declare module 'vue' {
Lock: typeof import('./src/components/TheLock/components/Lock.vue')['default'] Lock: typeof import('./src/components/TheLock/components/Lock.vue')['default']
Magnifier: typeof import('./src/components/Magnifier/magnifier.vue')['default'] Magnifier: typeof import('./src/components/Magnifier/magnifier.vue')['default']
MagnifierDialog: typeof import('./src/components/Magnifier/magnifierDialog.vue')['default'] MagnifierDialog: typeof import('./src/components/Magnifier/magnifierDialog.vue')['default']
Modal: typeof import('./src/components/Modal/Modal.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
TimeBetween: typeof import('./src/components/TimeBetween/components/TimeBetween.vue')['default'] TimeBetween: typeof import('./src/components/TimeBetween/components/TimeBetween.vue')['default']
......
...@@ -74,6 +74,42 @@ const menu: Menu[] = [ ...@@ -74,6 +74,42 @@ const menu: Menu[] = [
path: '/trades/1004_1' path: '/trades/1004_1'
} }
] ]
},
{
id: 'specialManage',
name: 'specialManage',
title: '特殊项调整',
type: 'dir',
children: [
{
id: '1011',
name: '1011',
title: '特殊项调整启动',
type: 'menu',
path: '/trades/1011'
},
{
id: '1011_1',
name: '1011_1',
title: '特殊项调整启动_1',
type: 'route',
path: '/trades/1011_1'
},
{
id: '1011_2',
name: '1011_2',
title: '特殊项调整启动_2',
type: 'route',
path: '/trades/1011_2'
},
{
id: '1012',
name: '1012',
title: '特殊项调整历史查询',
type: 'menu',
path: '/trades/1012'
}
]
} }
] ]
}, },
......
...@@ -132,6 +132,27 @@ export default defineMock([ ...@@ -132,6 +132,27 @@ export default defineMock([
} }
], ],
'total': 100 'total': 100
}) as any })
},
{
url: '/api/trades/1012',
body: mockjs.mock({
'data|10': [
{
'id|+1': 1,
'acctTwoNm': '@pick(["贷款出账冲正", "贷款出账确认流程"])',
'custNm': '@number(10000, 99999)-@cname()公司',
'matainBizNo': /\d{10-15}/,
'cashApplyNo': '',
'adjPerson': '0172- [0172]董军 ',
'adjPerson2': '0172- [0172]董军 ',
'adjPerson3': '0172- [0172]董军 ',
'procStepNo': '@pick(["客户经理录入", "客户经理发起", "柜面确认岗"])',
'authInitiateTm': '@datetime',
'allocDnExeTm': '机构@natural(1000, 9999)'
}
],
'total': 100
})
} }
]) ])
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
"a-calc": "^1.2.6", "a-calc": "^1.2.6",
"ant-design-vue": "1.7.8", "ant-design-vue": "1.7.8",
"axios": "^1.4.0", "axios": "^1.4.0",
"dayjs": "^1.11.8",
"debounce-promise": "^3.1.2", "debounce-promise": "^3.1.2",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"moment": "^2.29.4", "moment": "^2.29.4",
...@@ -60,7 +59,6 @@ ...@@ -60,7 +59,6 @@
"swagger-editor-dist": "^4.10.0", "swagger-editor-dist": "^4.10.0",
"terser": "^5.18.2", "terser": "^5.18.2",
"typescript": "^5.1.5", "typescript": "^5.1.5",
"unocss": "^0.53.6",
"unplugin-auto-import": "^0.16.4", "unplugin-auto-import": "^0.16.4",
"unplugin-vue-components": "^0.25.1", "unplugin-vue-components": "^0.25.1",
"unplugin-vue-macros": "^2.3.6", "unplugin-vue-macros": "^2.3.6",
......
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"
#Specify inspection profile for code analysis
profile:
name: qodana.starter
#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>
#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>
#The following options are only applied in CI/CD environment
#These options are ignored during local run
#Execute shell command before Qodana execution
#bootstrap: sh ./prepare-qodana.sh
#Install IDE plugins before Qodana execution
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
#Specify Qodana linter for analysis
linter: jetbrains/qodana-js:latest
<template> <template>
<div> <a-modal
<a-modal v-model:visible="visible"
v-model:visible="visible" :title="title"
:title="title" :width="width"
:width="width" :footer="null"
:footer="null" :maskClosable="false"
:maskClosable="false" :destroyOnClose="true"
:destroyOnClose="true" >
> <component @mounted="onMounted()" :is="code" ref="trade" />
<component @mounted="onMounted()" :is="code" ref="trade" /> </a-modal>
</a-modal>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
const trades = import.meta.glob('@/views/trades/**/index.vue') const trades = import.meta.glob('@/views/trades/**/index.vue')
let tradeComponents: any = {} let tradeComponents: Record<string, any> = {}
Object.keys(trades).forEach((key) => { Object.keys(trades).forEach((key) => {
const name = key.match(/views\/trades\/(.*)\/index.vue/)![1] const name = key.match(/views\/trades\/(.*)\/index.vue/)![1]
tradeComponents['t' + name] = () => trades[key]() tradeComponents['t' + name] = () => trades[key]()
...@@ -38,22 +36,39 @@ export default defineComponent({ ...@@ -38,22 +36,39 @@ export default defineComponent({
title: '交易弹框', title: '交易弹框',
width: 800, width: 800,
cb: null cb: null
} as {
code: string | null
visible: boolean
title: string
width: number
cb: Function | null
} }
}, },
created() { created() {
this.$bus.$on('openTradeModal', this.open) this.$bus.$on('openTradeModal', this.open)
this.$bus.$on('closeTradeModal', this.close)
}, },
methods: { methods: {
checkTradeModal(code: string) {
if (Object.keys(tradeComponents).indexOf('t' + code) === -1) {
this.$notification.error({
message: '打开弹框错误',
description: `找不到交易弹框 ${code}`
})
throw new Error(`找不到交易弹框 ${code}`)
}
},
reset() { reset() {
this.code = null this.code = null
this.title = '交易弹框' this.title = '交易弹框'
this.width = 800 this.width = 800
this.cb = null this.cb = null
}, },
open(code: string, params: Params, cb?: () => void) { open(code: string, params: Params, cb = () => {}) {
this.checkTradeModal(code)
this.code = 't' + code this.code = 't' + code
this.title = params.title this.title = params?.title || '交易弹框'
this.width = params.width this.width = params?.width || 800
this.cb = cb this.cb = cb
this.visible = true this.visible = true
}, },
...@@ -62,7 +77,7 @@ export default defineComponent({ ...@@ -62,7 +77,7 @@ export default defineComponent({
this.reset() this.reset()
}, },
onMounted() { onMounted() {
const tradeInstance = this.$refs.trade as any const tradeInstance = this.$refs.trade
this.cb && this.cb(tradeInstance) this.cb && this.cb(tradeInstance)
} }
} }
......
...@@ -135,10 +135,3 @@ export const StepItem = defineComponent({ ...@@ -135,10 +135,3 @@ export const StepItem = defineComponent({
return () => null return () => null
} }
}) })
export default {
install(app: any) {
app.component(Step.name, Step)
app.component(StepItem.name, StepItem)
}
}
...@@ -120,11 +120,3 @@ export const DateRange = defineComponent({ ...@@ -120,11 +120,3 @@ export const DateRange = defineComponent({
} }
} }
}) })
export default {
install(app: any) {
app.component(Time.name, Time)
app.component(Date.name, Date)
app.component(DateRange.name, DateRange)
}
}
import dayjs from 'dayjs' import moment from 'moment'
export const useTime = () => { export const useTime = () => {
let timer: any = null let timer: any = null
const day = ref(dayjs()) const day = ref(moment())
const second = computed(() => day.value.second()) const second = computed(() => day.value.second())
const minute = computed(() => day.value.minute()) const minute = computed(() => day.value.minute())
const hour = computed(() => day.value.hour()) const hour = computed(() => day.value.hour())
onMounted(() => { onMounted(() => {
timer = setInterval(() => { timer = setInterval(() => {
day.value = dayjs() day.value = moment()
}, 1000) }, 1000)
}) })
......
import Vue from 'vue' import Vue from 'vue'
import Antd from 'ant-design-vue' import { createHead, HeadVuePlugin } from '@vueuse/head'
import moment from 'moment' import moment from 'moment'
import 'moment/locale/zh-cn' import 'moment/locale/zh-cn'
import dayjs from 'dayjs' import lodash from 'lodash'
import 'dayjs/locale/zh-cn'
import { createHead, HeadVuePlugin } from '@vueuse/head'
import 'virtual:uno.css'
import i18n from './locales' import i18n from './locales'
import router from './router' import router from './router'
import pinia from './store' import pinia from './store'
import App from './App.vue' import App from './App.vue'
import './register'
import './filter'
import './directives' import './directives'
import './themes/default.less' import './themes/default.less'
import { createWaterMark } from './utils/waterMark'
import lodash from 'lodash'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import { useAppStore } from '@/store/modules' import { useAppStore } from '@/store/modules'
import TimeDate from '@/components/TimeDate' import { createWaterMark } from '@/utils/waterMark'
import Step from '@/components/Step'
import magnifier from '@/components/Magnifier/magnifier.vue'
import { post } from '@/utils/remote/remote'
import api from '@/utils/remote' import api from '@/utils/remote'
import { VITE_APP_NAME } from '@/enums/env' import { VITE_APP_NAME } from '@/enums/env'
dayjs.locale('zh-cn')
const isLogin = location.hash.startsWith('#/login') const isLogin = location.hash.startsWith('#/login')
import './filter'
// ********** 组件 **********
Vue.use(Antd)
Vue.use(VXETable)
Vue.use(TimeDate)
Vue.use(Step)
Vue.component('magnifier', magnifier)
// ********** 方法 ********** // ********** 方法 **********
const bus = new Vue() const bus = new Vue()
Vue.prototype.$bus = bus // 事件总线 Vue.prototype.$bus = bus // 事件总线
Vue.prototype.$moment = moment Vue.prototype.$moment = moment
Vue.prototype.$remote = post Vue.prototype.$remote = api.post
Vue.prototype.$api = api
Vue.prototype.$lodash = lodash Vue.prototype.$lodash = lodash
Vue.prototype.$openTradeModal = (code: string, params: any, cb = () => {}) => {
bus.$emit('openTradeModal', code, params, cb)
}
Vue.prototype.$queryEnum = (code: string) => {
return {}
}
Vue.prototype.$getTableFiled = (table: string, filed: string, index: string) =>
table + '[' + index + ']' + '.' + filed
Vue.mixin({
mounted() {
this.$emit('mounted')
}
})
// ********** 插件 ********** // ********** 插件 **********
const head = createHead({ const head = createHead({
title: isLogin ? '信贷系统 - 登录' : '信贷系统' title: isLogin ? '信贷系统 - 登录' : '信贷系统'
......
// @ts-nocheck
import { Icon } from '@iconify/vue2'
export default {
beforeRouteLeave(to, from, next) {
next()
},
beforeRouteEnter(to, from, next) {
const _autorun = to.params._autorun
next((vm) => {
_autorun && _autorun(vm)
from && (vm.$from = from.name)
})
},
components: {
Icon
},
data() {
return {
enums: [],
options: {}
}
},
methods: {
// 跳转页面
$go(code: string, callback: Function, replace = false) {
const tradeName = `trades-${code}`
const isExist = this.$router.getRoutes().some((item) => item.name === tradeName)
if (!isExist) {
this.$notification.error({
key: `${tradeName}-go-error`,
message: '访问页面错误',
description: `交易${code}不存在`
})
return
}
this.$router.push({
name: tradeName,
params: {
_autorun: callback,
_replace: replace
}
})
},
// 返回上一页
$back(callback: Function) {
if (!this.$from) return
this.$go(this.$from, callback, true)
},
// 打开交易弹窗
$openTradeModal(code: string, params: any, cb = () => {}, rcb = () => {}) {
this.$bus.$emit('openTradeModal', code, params, cb, rcb, this)
},
// 获取枚举
async $getOptions() {
const options = await this.$queryEnum(this.enums.join(';'))
Object.keys(options).forEach((key) => {
if (options[key] !== null && typeof options[key] === 'object') {
this.options[key] = Object.entries(options[key]).map(([value, label]) => ({
value,
label
}))
}
})
},
// 获取枚举
async $queryEnum(code: string) {
return {}
},
// 提交表单
$submit(callback: Function) {
this.$refs.form.validate((state, data) => state && callback && callback(this.params))
},
// 重置表单
$reset() {
this.$refs.form.resetFields()
},
// 清除表单验证
$clearValidate(props: any) {
this.$refs.form.clearValidate(props)
},
// 获取表格字段
$getTableFiled(table: string, filed: string, index: string) {
return table + '[' + index + ']' + '.' + filed
},
$closeModal(cb = () => {}) {
this.$bus.$emit('closeTradeModal', cb)
}
},
beforeCreate() {
this.$emit('beforeCreate')
},
created() {
this.$emit('created')
},
beforeMount() {
this.$emit('beforeMount')
},
mounted() {
this.$emit('mounted')
this.$getOptions()
},
beforeUpdate() {
this.$emit('beforeUpdate')
},
updated() {
this.$emit('updated')
},
beforeDestroy() {
this.$emit('beforeDestroy')
},
destroyed() {
this.$emit('destroyed')
}
}
import Vue from 'vue'
import Antd from 'ant-design-vue'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import { Time, Date, DateRange } from '@/components/TimeDate'
import { Step, StepItem } from '@/components/Step'
import magnifier from '@/components/Magnifier/magnifier.vue'
Vue.use(Antd)
Vue.use(VXETable)
Vue.component('Time', Time)
Vue.component('Date', Date)
Vue.component('DateRange', DateRange)
Vue.component('StepItem', StepItem)
Vue.component('Step', Step)
Vue.component('magnifier', magnifier)
export * from './object'
export * from './tree'
export const pick = (obj: any, keys: string[]) => {
return keys.reduce((a, c) => {
if (obj[c]) {
a[c] = obj[c]
}
return a
}, {} as any)
}
export const exclude = (obj: any, keys: string[]) => {
return Object.keys(obj).reduce((a, c) => {
if (!keys.includes(c)) {
a[c] = obj[c]
}
return a
}, {} as any)
}
...@@ -60,5 +60,7 @@ export function post<T>( ...@@ -60,5 +60,7 @@ export function post<T>(
} }
export default { export default {
request: remote.request.bind(remote) as <T>(config: AxiosRequestConfig) => Promise<T> request: remote.request.bind(remote) as <T>(config: AxiosRequestConfig) => Promise<T>,
get,
post
} }
import axios from './request'
const remote = new axios({
baseURL: import.meta.env.VITE_BASIC_URL, // 配置参数
timeout: import.meta.env.VITE_TIME_OUT, // 配置参数
responseType: 'json',
params: {},
interceptors: {
// 请求拦截
requestInterceptor: (config) => {
const { data } = config
return config
},
// 响应拦截
responseInterceptor: (res) => {
const { data, config } = res
if (!data) {
throw new Error('请求出错')
}
return data
}
}
})
export function get(
url: string,
params: any,
callback?: (arg: any) => void,
errorback?: (arg: any) => void,
conf?: any
) {
return new Promise((resolve, reject) => {
remote
.get({ url, data: params })
.then((res: any) => {
callback?.(res)
callback || resolve(res)
})
.catch((err: any) => {
errorback?.(err)
callback || reject(err)
})
})
}
export function post({ url, params, successFn, failedFn, conf }) {
remote
.post({ url, data: params || {}, ...conf })
.then((res: any) => {
successFn?.(res)
})
.catch((err: any) => {
failedFn?.(err)
})
}
export default {
request: remote,
get,
post
}
/**
* 根据 id 和 pid 生成树形结构
*/
export interface CreateTreeOptions {
id: string // 节点id
pid: string // 父节点id
children: string // 子节点key
}
export interface CreateTree<T> {
(data: T[], options: CreateTreeOptions): (T & Record<string, T>)[]
}
// 生成树形结构,带参数
export const createTree: CreateTree<any> = (data, options) => {
const { id, pid, children } = options
const tree: any[] = []
const nodeOf: Record<string, any> = {}
data.forEach((item) => {
const newItem = { ...item }
const { [id]: itemId } = item
nodeOf[itemId] = newItem // 这步拿到了一个 key是id value 是item的对象属性集合
})
data.forEach((item) => {
const { [id]: itemId, [pid]: itemPid } = item
const node = nodeOf[itemId]
if (itemPid) {
const pNode = nodeOf[itemPid]
if (!pNode) {
//因为这里加了模糊查询,很有可能查出来的多条数据是没有上下级关系的,所以直接放入 平铺展示,
return tree.push(node)
}
pNode[children] = pNode[children] || []
pNode[children].push(node)
} else {
tree.push(node)
}
})
return tree
}
// 生成树形结构,不带参数
export const createTreeFactory = (options: CreateTreeOptions) => {
return (data: any[]) => createTree(data, options)
}
import './index.less' import './index.less'
import { Icon } from '@iconify/vue2' import tradeMixin from '@/mixins/trade'
let _that let _that
export default { export default {
cName: '对公客户', cName: '对公客户',
cCode: '1001', cCode: '1001',
beforeRouteLeave(to, from, next) { mixins: [tradeMixin],
next()
},
beforeRouteEnter(to, from, next) {
const _autorun = to.params._autorun
next((vm) => {
_autorun && _autorun(vm)
from && (vm.$from = from.name)
})
},
components: {
Icon
},
filters: {}, filters: {},
props: {}, props: {},
data() { data() {
...@@ -56,46 +46,6 @@ export default { ...@@ -56,46 +46,6 @@ export default {
computed: {}, computed: {},
watch: {}, watch: {},
methods: { methods: {
// ----------------- 系统自带方法,严禁修改 -----------------
// 获取枚举
async $getOptions() {
const options = await this.$queryEnum(this.enums.join(';'))
Object.keys(options).forEach((key) => {
if (options[key] !== null && typeof options[key] === 'object') {
this.options[key] = Object.entries(options[key]).map(([value, label]) => ({
value,
label
}))
}
})
},
// 提交表单
$submit(callback) {
this.$refs.form.validate((state, data) => state && callback && callback(this.params))
},
// 重置表单
$reset() {
this.$refs.form.resetFields()
},
// 清除表单验证
$clearValidate(props) {
this.$refs.form.clearValidate(props)
},
// 跳转页面
$go(code, callback, replace = false) {
this.$router.push({
name: code,
params: {
_autorun: callback,
_replace: replace
}
})
},
// 返回上一页
$back(callback) {
if (!this.$from) return
this.$go(this.$from, callback, true)
},
// ----------------- 表格数据请求、分页、按钮方法 ----------------------------- // ----------------- 表格数据请求、分页、按钮方法 -----------------------------
async handlePageChange_table67369(current, pageSize) { async handlePageChange_table67369(current, pageSize) {
...@@ -128,7 +78,10 @@ export default { ...@@ -128,7 +78,10 @@ export default {
}) })
}, },
async table_btn_99424() { async table_btn_99424() {
this.$router.push({ name: 'trades-1001_1' }) this.$go('1011', (vm) => {
console.log(vm)
vm.params.custNm = 'hello'
})
}, },
// render table row buttn // render table row buttn
...@@ -173,7 +126,6 @@ export default { ...@@ -173,7 +126,6 @@ export default {
_that = this _that = this
}, },
mounted() { mounted() {
this.$getOptions()
this.button27913_onClick() this.button27913_onClick()
}, },
updated() {} updated() {}
......
This diff is collapsed.
This diff is collapsed.
<template>
<h1>1002</h1>
</template>
<script setup lang="ts"></script>
<style scoped lang="less"></style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
.header {
}
.header > h1 {
font-size: 25px;
font-weight: bold;
margin-bottom: unset !important;
}
.marginBtm {
margin-bottom: 16px;
}
.marginLr {
margin: 0 16px 0;
}
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
.header {
}
.header > h1 {
font-size: 25px;
font-weight: bold;
margin-bottom: unset !important;
}
.marginBtm {
margin-bottom: 16px;
}
.marginLr {
margin: 0 16px 0;
}
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
.header {
}
.header > h1 {
font-size: 25px;
font-weight: bold;
margin-bottom: unset !important;
}
.marginBtm {
margin-bottom: 16px;
}
.marginLr {
margin: 0 16px 0;
}
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
.header {
}
.header > h1 {
font-size: 25px;
font-weight: bold;
margin-bottom: unset !important;
}
.marginBtm {
margin-bottom: 16px;
}
.marginLr {
margin: 0 16px 0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.ant-form-item {
width: 100%;
}
.header {
}
.header > h1 {
font-size: 25px;
font-weight: bold;
margin-bottom: unset !important;
}
.marginBtm {
margin-bottom: 16px;
}
.marginLr {
margin: 0 16px 0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup
} from 'unocss'
export default defineConfig({
shortcuts: [],
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
warn: true
}),
presetTypography(),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono'
}
})
],
transformers: [transformerDirectives(), transformerVariantGroup()]
})
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment