From 2e4d853e1bd5e92931d55ad8a04cf409bf9f796a Mon Sep 17 00:00:00 2001
From: xieyonghong <18010623010@163.com>
Date: Wed, 11 Jan 2023 18:04:28 +0800
Subject: [PATCH 1/8] =?UTF-8?q?update:=20=E4=BC=98=E5=8C=96config=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tsconfig.json | 6 +++++-
vite.config.ts | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tsconfig.json b/tsconfig.json
index 8e66e706..ca353357 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -16,7 +16,11 @@
"allowJs": true,
"baseUrl": "./",
"paths": {
- "@/*": ["./src/*"]
+ "@/*": ["./src/*"],
+ "components/*": ["./src/components/*"],
+ "layouts/*": ["./src/layouts/*"],
+ "store/*": ["./src/store/*"],
+ "style/*": ["./src/style/*"],
},
"types": ["ant-design-vue/typings/global"],
"suppressImplicitAnyIndexErrors": true
diff --git a/vite.config.ts b/vite.config.ts
index 939b1029..370a0e21 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -20,7 +20,7 @@ export default defineConfig(({ mode}) => {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
- 'styles': path.resolve(__dirname, 'src/style'),
+ 'style': path.resolve(__dirname, 'src/style'),
'layouts': path.resolve(__dirname, 'src/layouts'),
'components': path.resolve(__dirname, 'src/components'),
'store': path.resolve(__dirname, 'src/store'),
From ec79fa066983ef73462c65c0584a40cc6648fd55 Mon Sep 17 00:00:00 2001
From: xieyonghong <18010623010@163.com>
Date: Wed, 11 Jan 2023 18:26:30 +0800
Subject: [PATCH 2/8] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9ESearch=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Form/FormBuilder.vue | 2 +-
src/components/Search/Item.vue | 125 ++++++++++++++++++++++++++++
src/components/Search/Search.vue | 71 ++++++++++++++++
src/components/Search/index.ts | 3 +
src/components/Search/util.ts | 4 +
src/components/index.ts | 2 +
src/router/index.ts | 8 +-
src/router/menu.ts | 4 +
src/views/demo/Form.vue | 2 +-
src/views/demo/Search.vue | 15 ++++
10 files changed, 233 insertions(+), 3 deletions(-)
create mode 100644 src/components/Search/Item.vue
create mode 100644 src/components/Search/Search.vue
create mode 100644 src/components/Search/index.ts
create mode 100644 src/components/Search/util.ts
create mode 100644 src/views/demo/Search.vue
diff --git a/src/components/Form/FormBuilder.vue b/src/components/Form/FormBuilder.vue
index cac91d0a..afcbfa2d 100644
--- a/src/components/Form/FormBuilder.vue
+++ b/src/components/Form/FormBuilder.vue
@@ -241,7 +241,7 @@ watch(props.initValue, (newValue: any) => {
})
defineExpose({
- resetModel,
+ reset: resetModel,
formValidate,
setItemValue,
setData
diff --git a/src/components/Search/Item.vue b/src/components/Search/Item.vue
new file mode 100644
index 00000000..6f44c425
--- /dev/null
+++ b/src/components/Search/Item.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+ {{
+ index === 1 ? '第一组' : '第二组'
+ }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue
new file mode 100644
index 00000000..a3908588
--- /dev/null
+++ b/src/components/Search/Search.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Search/index.ts b/src/components/Search/index.ts
new file mode 100644
index 00000000..4edb3b21
--- /dev/null
+++ b/src/components/Search/index.ts
@@ -0,0 +1,3 @@
+import Search from './Search.vue'
+
+export default Search
\ No newline at end of file
diff --git a/src/components/Search/util.ts b/src/components/Search/util.ts
new file mode 100644
index 00000000..573b0d7d
--- /dev/null
+++ b/src/components/Search/util.ts
@@ -0,0 +1,4 @@
+export const typeOptions = [
+ { label: '或者', value: 'or' },
+ { label: '并且', value: 'and' },
+]
\ No newline at end of file
diff --git a/src/components/index.ts b/src/components/index.ts
index d3daf534..fb44f790 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -5,6 +5,7 @@ import JTable from './Table/index.vue'
import TitleComponent from "./TitleComponent/index.vue";
import Form from './Form';
import CardBox from './CardBox/index.vue';
+import Search from './Search'
export default {
install(app: App) {
@@ -14,5 +15,6 @@ export default {
.component('TitleComponent', TitleComponent)
.component('Form', Form)
.component('CardBox', CardBox)
+ .component('Search', Search)
}
}
diff --git a/src/router/index.ts b/src/router/index.ts
index 2da56030..389b7053 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -8,9 +8,15 @@ const router = createRouter({
routes: menus
})
+const filterPath = [
+ '/form',
+ '/search'
+]
+
router.beforeEach((to, from, next) => {
const token = LocalStore.get(TOKEN_KEY)
- if (token) {
+
+ if (token || filterPath.includes(to.path)) {
next()
} else {
if (to.path === LoginPath) {
diff --git a/src/router/menu.ts b/src/router/menu.ts
index 525ac2e8..2fd19758 100644
--- a/src/router/menu.ts
+++ b/src/router/menu.ts
@@ -44,6 +44,10 @@ export default [
path: '/form',
component: () => import('@/views/demo/Form.vue')
},
+ {
+ path: '/search',
+ component: () => import('@/views/demo/Search.vue')
+ },
// end: 测试用, 可删除
// link 运维管理
diff --git a/src/views/demo/Form.vue b/src/views/demo/Form.vue
index cd585a77..41b6f7e0 100644
--- a/src/views/demo/Form.vue
+++ b/src/views/demo/Form.vue
@@ -21,7 +21,7 @@ const submit = () => {
}
const reset = () => {
-
+ form.value.reset()
}
const setValue =() => {
diff --git a/src/views/demo/Search.vue b/src/views/demo/Search.vue
new file mode 100644
index 00000000..e7445026
--- /dev/null
+++ b/src/views/demo/Search.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From ce3d168f689499d0d89f4eac7904d0c614f7fca9 Mon Sep 17 00:00:00 2001
From: xieyonghong <18010623010@163.com>
Date: Thu, 12 Jan 2023 09:13:05 +0800
Subject: [PATCH 3/8] feat: merge components.d.ts
---
components.d.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/components.d.ts b/components.d.ts
index db063474..d67132e3 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -35,11 +35,14 @@ declare module '@vue/runtime-core' {
BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default']
CardBox: typeof import('./src/components/CardBox/index.vue')['default']
FormFormBuilder: typeof import('./src/components/Form/FormBuilder.vue')['default']
+ FormFormItem: typeof import('./src/components/Form/FormItem.vue')['default']
GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default']
MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default']
PermissionButton: typeof import('./src/components/PermissionButton/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
+ SearchItem: typeof import('./src/components/Search/Item.vue')['default']
+ SearchSearch: typeof import('./src/components/Search/Search.vue')['default']
Table: typeof import('./src/components/Table/index.vue')['default']
TitleComponent: typeof import('./src/components/TitleComponent/index.vue')['default']
ValueItem: typeof import('./src/components/ValueItem/index.vue')['default']
From 3135213a05e8c6ec4ca3b0734810341d72cecb1b Mon Sep 17 00:00:00 2001
From: xieyonghong <18010623010@163.com>
Date: Thu, 12 Jan 2023 09:54:56 +0800
Subject: [PATCH 4/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dcommit=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E6=97=A0=E6=B3=95=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.commitlintrc.cjs | 20 +++++++++++++-------
components.d.ts | 31 -------------------------------
src/components/Search/Search.vue | 1 +
3 files changed, 14 insertions(+), 38 deletions(-)
diff --git a/.commitlintrc.cjs b/.commitlintrc.cjs
index 34fee141..9ead01b6 100644
--- a/.commitlintrc.cjs
+++ b/.commitlintrc.cjs
@@ -17,12 +17,18 @@ module.exports = {
'perf', // 性能优化
]
],
- 'type-case': [0],
- 'type-empty': [0],
- 'scope-empty': [0],
'scope-case': [0],
- 'subject-full-stop': [0, 'never'],
- 'subject-case': [0, 'never'],
- 'header-max-length': [0, 'always', 72]
- }
+ },
+ plugins: [
+ {
+ rules: {
+ "commit-rule": ({ raw }) => {
+ return [
+ /^\[(build|feat|fix|update|refactor|docs|chore|style|revert|perf)].+/g.test(raw),
+ `commit备注信息格式错误,格式为 <[type] 修改内容>,type支持${types.join(",")}`
+ ]
+ }
+ }
+ }
+ ]
}
\ No newline at end of file
diff --git a/components.d.ts b/components.d.ts
index 2aeb1249..40a545e5 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -7,40 +7,9 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
- AAlert: typeof import('ant-design-vue/es')['Alert']
- ABadge: typeof import('ant-design-vue/es')['Badge']
- AButton: typeof import('ant-design-vue/es')['Button']
- ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
- ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
- ACol: typeof import('ant-design-vue/es')['Col']
- ACollapse: typeof import('ant-design-vue/es')['Collapse']
- ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
- ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
- ADivider: typeof import('ant-design-vue/es')['Divider']
- AEmpty: typeof import('ant-design-vue/es')['Empty']
- AForm: typeof import('ant-design-vue/es')['Form']
- AFormItem: typeof import('ant-design-vue/es')['FormItem']
- AInput: typeof import('ant-design-vue/es')['Input']
- AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
- AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
- AModal: typeof import('ant-design-vue/es')['Modal']
- APagination: typeof import('ant-design-vue/es')['Pagination']
- APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
- ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
- ARow: typeof import('ant-design-vue/es')['Row']
- ASelect: typeof import('ant-design-vue/es')['Select']
- ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
- ASpin: typeof import('ant-design-vue/es')['Spin']
- ASwitch: typeof import('ant-design-vue/es')['Switch']
- ATable: typeof import('ant-design-vue/es')['Table']
- ATimePicker: typeof import('ant-design-vue/es')['TimePicker']
- ATooltip: typeof import('ant-design-vue/es')['Tooltip']
- ATreeSelect: typeof import('ant-design-vue/es')['TreeSelect']
- AUpload: typeof import('ant-design-vue/es')['Upload']
BadgeStatus: typeof import('./src/components/BadgeStatus/index.vue')['default']
CardBox: typeof import('./src/components/CardBox/index.vue')['default']
FormFormBuilder: typeof import('./src/components/Form/FormBuilder.vue')['default']
- FormFormItem: typeof import('./src/components/Form/FormItem.vue')['default']
GeoComponent: typeof import('./src/components/GeoComponent/index.vue')['default']
MonacoEditor: typeof import('./src/components/MonacoEditor/index.vue')['default']
PermissionButton: typeof import('./src/components/PermissionButton/index.vue')['default']
diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue
index a3908588..2bcd6615 100644
--- a/src/components/Search/Search.vue
+++ b/src/components/Search/Search.vue
@@ -35,6 +35,7 @@ const props = defineProps({
type: String,
default: 'advanced'
},
+
key: {
type: String,
default: '',
From 48ca21ab3ddea4e9eb0db72161e00c8b07856b61 Mon Sep 17 00:00:00 2001
From: wangshuaiswim
Date: Thu, 12 Jan 2023 11:33:59 +0800
Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?api=E7=9B=AE=E5=BD=95=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BA=A7?=
=?UTF-8?q?=E5=93=81api?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/{device.ts => device/instance.ts} | 0
src/api/device/product.ts | 3 +++
src/components/PermissionButton/index.vue | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
rename src/api/{device.ts => device/instance.ts} (100%)
create mode 100644 src/api/device/product.ts
diff --git a/src/api/device.ts b/src/api/device/instance.ts
similarity index 100%
rename from src/api/device.ts
rename to src/api/device/instance.ts
diff --git a/src/api/device/product.ts b/src/api/device/product.ts
new file mode 100644
index 00000000..ac44c574
--- /dev/null
+++ b/src/api/device/product.ts
@@ -0,0 +1,3 @@
+import server from '@/utils/request'
+
+export const queryNoPagingPost = (data: any) => server.post(`/device-product/_query/no-paging?paging=false`, data)
\ No newline at end of file
diff --git a/src/components/PermissionButton/index.vue b/src/components/PermissionButton/index.vue
index cbeb5c37..d211e2ee 100644
--- a/src/components/PermissionButton/index.vue
+++ b/src/components/PermissionButton/index.vue
@@ -25,7 +25,7 @@
-