From 6c4ef23743f6e52775ec6f4459f216bc85cb5b7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?=
<188633308@qq.com>
Date: Wed, 12 May 2021 23:24:44 +0800
Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"update=20=E6=9E=84=E6=88=90?=
=?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=A1=B5=E7=9A=84=E7=A7=8D=E5=AD=90""?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 43a3184bba52092efa06e7f880206b5aef821773.
---
.../seed/form-page/only-form/index.vue | 105 +++++
.../seed/form-page/only-form/part.vue} | 38 +-
.../doc-code/seed/form-page/tab-form/tab.vue | 73 ++++
.../seed/form-page/tab-form/tabPane.vue | 90 ++++
.../doc-code/seed/{ => query-form}/form.vue | 0
.../doc-code/seed/{ => query-form}/query.vue | 0
.../seed/{ => query-form}/treeLayout.vue | 0
Web/src/assets/style/app.less | 3 +
Web/src/assets/style/lib/checkbox.less | 10 +
Web/src/assets/style/lib/container.less | 4 +
Web/src/assets/style/lib/font-size.less | 4 +-
Web/src/assets/style/lib/form-page.less | 134 ++++++
Web/src/assets/style/lib/input.less | 6 +
Web/src/components/container/index.vue | 11 +-
Web/src/main.js | 2 +
.../pages/business/house/houseCode/form.vue | 281 -------------
.../business/house/houseCode/form/index.vue | 114 +++++
.../business/house/houseCode/form/part.vue | 268 ++++++++++++
.../pages/business/house/houseCode/index.vue | 212 +---------
.../house/houseInfo/form/base/building.vue | 392 ++++++++++++++++++
.../house/houseInfo/form/base/index.vue | 85 ++++
.../business/house/houseInfo/form/index.vue | 71 ++++
.../pages/business/house/houseInfo/index.vue | 10 +
Web/src/pages/system/_seed/README.md | 5 -
Web/src/pages/system/_seed/index.vue | 216 ----------
Web/src/pages/system/_seed/treeLayout.vue | 256 ------------
Web/src/pages/system/doc/highlight.js | 11 +-
Web/src/pages/system/doc/index.vue | 4 +
Web/src/pages/system/doc/seed/form.vue | 2 +-
Web/src/pages/system/doc/seed/pageForm.vue | 44 ++
Web/src/pages/system/doc/seed/query.vue | 2 +-
Web/src/pages/system/doc/seed/treeLayout.vue | 2 +-
32 files changed, 1475 insertions(+), 980 deletions(-)
create mode 100644 Web/public/doc-code/seed/form-page/only-form/index.vue
rename Web/{src/pages/system/_seed/form.vue => public/doc-code/seed/form-page/only-form/part.vue} (80%)
create mode 100644 Web/public/doc-code/seed/form-page/tab-form/tab.vue
create mode 100644 Web/public/doc-code/seed/form-page/tab-form/tabPane.vue
rename Web/public/doc-code/seed/{ => query-form}/form.vue (100%)
rename Web/public/doc-code/seed/{ => query-form}/query.vue (100%)
rename Web/public/doc-code/seed/{ => query-form}/treeLayout.vue (100%)
create mode 100644 Web/src/assets/style/lib/checkbox.less
create mode 100644 Web/src/assets/style/lib/form-page.less
create mode 100644 Web/src/assets/style/lib/input.less
delete mode 100644 Web/src/pages/business/house/houseCode/form.vue
create mode 100644 Web/src/pages/business/house/houseCode/form/index.vue
create mode 100644 Web/src/pages/business/house/houseCode/form/part.vue
create mode 100644 Web/src/pages/business/house/houseInfo/form/base/building.vue
create mode 100644 Web/src/pages/business/house/houseInfo/form/base/index.vue
create mode 100644 Web/src/pages/business/house/houseInfo/form/index.vue
create mode 100644 Web/src/pages/business/house/houseInfo/index.vue
delete mode 100644 Web/src/pages/system/_seed/README.md
delete mode 100644 Web/src/pages/system/_seed/index.vue
delete mode 100644 Web/src/pages/system/_seed/treeLayout.vue
create mode 100644 Web/src/pages/system/doc/seed/pageForm.vue
diff --git a/Web/public/doc-code/seed/form-page/only-form/index.vue b/Web/public/doc-code/seed/form-page/only-form/index.vue
new file mode 100644
index 0000000..71cc94d
--- /dev/null
+++ b/Web/public/doc-code/seed/form-page/only-form/index.vue
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/system/_seed/form.vue b/Web/public/doc-code/seed/form-page/only-form/part.vue
similarity index 80%
rename from Web/src/pages/system/_seed/form.vue
rename to Web/public/doc-code/seed/form-page/only-form/part.vue
index fb4579d..98dcf89 100644
--- a/Web/src/pages/system/_seed/form.vue
+++ b/Web/public/doc-code/seed/form-page/only-form/part.vue
@@ -1,17 +1,21 @@
-
+
-
-
-
-
+
+
@@ -22,8 +26,13 @@ const defaultForm = {
};
export default {
+ props: ['param'],
+
data() {
return {
+ labelCol: { flex: '150px' },
+ wrapperCol: { flex: '1' },
+
/** 表单数据 */
form: {},
/** 验证格式 */
@@ -39,16 +48,23 @@ export default {
};
},
+ async created() {
+ await this.onInit();
+ this.onFillData();
+ },
+
methods: {
/**
* 必要的方法
* 在打开编辑页时允许填充数据
*/
- onFillData(params) {
+ onFillData() {
/** 将默认数据覆盖到form */
+ const record = this.param && this.param.record;
+
this.form = this.$_.cloneDeep({
...defaultForm,
- ...params.record,
+ ...record,
/** 在此处添加其他默认数据转换 */
/* ... */
});
@@ -100,7 +116,7 @@ export default {
* 必要方法
* 加载当前表单中所需要的异步数据
*/
- async onInit(params) {
+ async onInit() {
this.loading = true;
/** 可以在这里await获取一些异步数据 */
/* ... */
diff --git a/Web/public/doc-code/seed/form-page/tab-form/tab.vue b/Web/public/doc-code/seed/form-page/tab-form/tab.vue
new file mode 100644
index 0000000..d907105
--- /dev/null
+++ b/Web/public/doc-code/seed/form-page/tab-form/tab.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/public/doc-code/seed/form-page/tab-form/tabPane.vue b/Web/public/doc-code/seed/form-page/tab-form/tabPane.vue
new file mode 100644
index 0000000..98deaf0
--- /dev/null
+++ b/Web/public/doc-code/seed/form-page/tab-form/tabPane.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/public/doc-code/seed/form.vue b/Web/public/doc-code/seed/query-form/form.vue
similarity index 100%
rename from Web/public/doc-code/seed/form.vue
rename to Web/public/doc-code/seed/query-form/form.vue
diff --git a/Web/public/doc-code/seed/query.vue b/Web/public/doc-code/seed/query-form/query.vue
similarity index 100%
rename from Web/public/doc-code/seed/query.vue
rename to Web/public/doc-code/seed/query-form/query.vue
diff --git a/Web/public/doc-code/seed/treeLayout.vue b/Web/public/doc-code/seed/query-form/treeLayout.vue
similarity index 100%
rename from Web/public/doc-code/seed/treeLayout.vue
rename to Web/public/doc-code/seed/query-form/treeLayout.vue
diff --git a/Web/src/assets/style/app.less b/Web/src/assets/style/app.less
index 7919e32..3049253 100644
--- a/Web/src/assets/style/app.less
+++ b/Web/src/assets/style/app.less
@@ -21,8 +21,11 @@
@import './lib/table.less';
@import './lib/list.less';
@import './lib/form.less';
+@import './lib/form-page.less';
@import './lib/description.less';
+@import './lib/input.less';
@import './lib/select.less';
+@import './lib/checkbox.less';
@import './lib/cascader.less';
@import './lib/dropdown.less';
@import './lib/modal.less';
diff --git a/Web/src/assets/style/lib/checkbox.less b/Web/src/assets/style/lib/checkbox.less
new file mode 100644
index 0000000..1913738
--- /dev/null
+++ b/Web/src/assets/style/lib/checkbox.less
@@ -0,0 +1,10 @@
+@import (reference) '~@/assets/style/extend.less';
+.ant-checkbox-wrapper {
+ margin-right: @padding-xs;
+ &:last-child {
+ margin-right: 0;
+ }
+ +.ant-checkbox-wrapper {
+ margin-left: 0;
+ }
+}
diff --git a/Web/src/assets/style/lib/container.less b/Web/src/assets/style/lib/container.less
index 162aff0..d7443e4 100644
--- a/Web/src/assets/style/lib/container.less
+++ b/Web/src/assets/style/lib/container.less
@@ -37,3 +37,7 @@
.container-fluid {
.container-base();
}
+.container-flex {
+ display: flex;
+ justify-content: space-between;
+}
diff --git a/Web/src/assets/style/lib/font-size.less b/Web/src/assets/style/lib/font-size.less
index 08c8ffc..d9497af 100644
--- a/Web/src/assets/style/lib/font-size.less
+++ b/Web/src/assets/style/lib/font-size.less
@@ -17,9 +17,9 @@ h4,
}
h5,
.h5 {
- font-size: 14px;
+ font-size: 16px;
}
h6,
.h6 {
- font-size: 12px;
+ font-size: 14px;
}
diff --git a/Web/src/assets/style/lib/form-page.less b/Web/src/assets/style/lib/form-page.less
new file mode 100644
index 0000000..e083e86
--- /dev/null
+++ b/Web/src/assets/style/lib/form-page.less
@@ -0,0 +1,134 @@
+@import (reference) '~@/assets/style/extend.less';
+
+.yo-form-page {
+ position: relative;
+
+ height: 100%;
+
+ >.ant-tabs {
+ display: flex;
+ flex-direction: column;
+
+ height: 100%;
+
+ >.ant-tabs-bar {
+ margin-bottom: 0;
+
+ background-color: @white;
+
+ .ant-tabs-nav-container {
+ height: @tabs-card-height + @padding-xs;
+ padding: (@tabs-card-height + @padding-xs - @btn-height-base) / 2 @padding-md;
+ }
+
+ .ant-tabs-tab {
+ .ant-btn();
+
+ &:hover {
+ border-color: @btn-default-border;
+ }
+ }
+
+ .ant-tabs-tab {
+ line-height: @btn-height-base;
+
+ margin-right: -1px;
+ }
+
+ .ant-tabs-tab-active {
+ z-index: 2;
+
+ color: @btn-primary-color;
+ border-color: @btn-primary-bg;
+ background-color: @btn-primary-bg;
+
+ &:hover {
+ color: @btn-primary-color;
+ border-color: color(~`colorPalette('@{btn-primary-bg}', 5) `);
+ background-color: color(~`colorPalette('@{btn-primary-bg}', 5) `);
+ }
+ }
+ }
+
+ >.ant-tabs-content {
+ position: relative;
+
+ flex: 1;
+
+ >.ant-tabs-tabpane {
+ position: absolute;
+ top: 0;
+ left: 0;
+
+ overflow: auto;
+
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
+
+ &--bar {
+ position: sticky;
+ bottom: 0;
+ z-index: 200;
+
+ &--with-tab {
+ position: absolute;
+
+ display: flex;
+ align-items: flex-end;
+
+ width: 100%;
+ height: 0;
+ padding-right: 7px;
+
+ >.container-fluid {
+ width: 100%;
+ }
+
+ +.ant-tabs {
+ >.ant-tabs-content {
+ >.ant-tabs-tabpane {
+ padding-bottom: @padding-xs * 2 + @btn-height-base + @border-width-base * 2;
+ }
+ }
+ }
+ }
+ }
+
+ &--bar-inner {
+ display: flex;
+ justify-content: space-between;
+
+ padding: @padding-xs @padding-md;
+
+ border: @border-width-base @border-style-base @border-color-split;
+ background-color: fade(@white, 80%);
+
+ backdrop-filter: blur(5px);
+
+ >:first-child {
+ flex: 1;
+ }
+
+ .ant-btn {
+ margin-left: @padding-sm;
+ }
+ }
+
+ &--body {
+ >.ant-card-body {
+ padding: 0;
+
+ >section {
+ padding: @padding-lg;
+
+ >h5 {
+ border-left: @padding-xs @border-style-base @primary-color;
+ padding-left: @padding-md;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Web/src/assets/style/lib/input.less b/Web/src/assets/style/lib/input.less
new file mode 100644
index 0000000..2220f7c
--- /dev/null
+++ b/Web/src/assets/style/lib/input.less
@@ -0,0 +1,6 @@
+@import (reference) '~@/assets/style/extend.less';
+.yo-input-prefix-2 {
+ .ant-input:not(:first-child) {
+ padding-left: 45px;
+ }
+}
diff --git a/Web/src/components/container/index.vue b/Web/src/components/container/index.vue
index 549d3e3..a400420 100644
--- a/Web/src/components/container/index.vue
+++ b/Web/src/components/container/index.vue
@@ -1,5 +1,10 @@
-
@@ -9,6 +14,10 @@ export default {
mode: {
type: String,
},
+ flex: {
+ type: Boolean,
+ default: false,
+ },
},
};
\ No newline at end of file
diff --git a/Web/src/main.js b/Web/src/main.js
index d5a3c78..1ab253b 100644
--- a/Web/src/main.js
+++ b/Web/src/main.js
@@ -82,6 +82,8 @@ import YoModalForm from './components/yoModalForm'
Vue.component('YoModalForm', YoModalForm)
import YoImage from './components/yoImage'
Vue.component('YoImage', YoImage)
+import YoFormLink from './components/yoFormLink'
+Vue.component('YoFormLink', YoFormLink)
/**
* 引入主题样式
diff --git a/Web/src/pages/business/house/houseCode/form.vue b/Web/src/pages/business/house/houseCode/form.vue
deleted file mode 100644
index b93d05f..0000000
--- a/Web/src/pages/business/house/houseCode/form.vue
+++ /dev/null
@@ -1,281 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 宁波市 -
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.value }}
-
-
-
-
- {{ item.value }}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseCode/form/index.vue b/Web/src/pages/business/house/houseCode/form/index.vue
new file mode 100644
index 0000000..2942068
--- /dev/null
+++ b/Web/src/pages/business/house/houseCode/form/index.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseCode/form/part.vue b/Web/src/pages/business/house/houseCode/form/part.vue
new file mode 100644
index 0000000..e4a7052
--- /dev/null
+++ b/Web/src/pages/business/house/houseCode/form/part.vue
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+
+
+ 宁波市 -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.value }}
+
+
+
+
+ {{ item.value }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseCode/index.vue b/Web/src/pages/business/house/houseCode/index.vue
index a10161b..a2e4ffc 100644
--- a/Web/src/pages/business/house/houseCode/index.vue
+++ b/Web/src/pages/business/house/houseCode/index.vue
@@ -1,206 +1,10 @@
-
-
-
-
-
-
-
-
-
-
-
- 新增房屋编码
-
-
-
-
-
-
-
- 编辑
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+ });"
+ >打开表单
+
+
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseInfo/form/base/building.vue b/Web/src/pages/business/house/houseInfo/form/base/building.vue
new file mode 100644
index 0000000..dbe0c88
--- /dev/null
+++ b/Web/src/pages/business/house/houseInfo/form/base/building.vue
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+ 测试区
+
+
+
+
+ 测试街道
+
+
+
+
+ 欧阳社区
+
+
+
+
+ 片区一22(明湖片区)
+
+
+
+
+ 宁波市-测试区-测试街道-欧阳社区-项目十二(项目十二)-001
+
+
+
+
+ 330266066001012001
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.value }}
+
+
+
+
+
+
+ {{ item.value }}
+
+
+
+
+
+
+ {{ item.value }}
+
+
+
+
+
+
+ {{ item.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 建筑层数
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseInfo/form/base/index.vue b/Web/src/pages/business/house/houseInfo/form/base/index.vue
new file mode 100644
index 0000000..fcd9e5d
--- /dev/null
+++ b/Web/src/pages/business/house/houseInfo/form/base/index.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseInfo/form/index.vue b/Web/src/pages/business/house/houseInfo/form/index.vue
new file mode 100644
index 0000000..2729df5
--- /dev/null
+++ b/Web/src/pages/business/house/houseInfo/form/index.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/business/house/houseInfo/index.vue b/Web/src/pages/business/house/houseInfo/index.vue
new file mode 100644
index 0000000..d7fceb3
--- /dev/null
+++ b/Web/src/pages/business/house/houseInfo/index.vue
@@ -0,0 +1,10 @@
+
+
+
\ No newline at end of file
diff --git a/Web/src/pages/system/_seed/README.md b/Web/src/pages/system/_seed/README.md
deleted file mode 100644
index 3dbb9d7..0000000
--- a/Web/src/pages/system/_seed/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
-基本上所有列表页都可以通过拷贝此处的种子文件实现增删改查的功能
-所有带 ... 的注释是可以依据当前业务添加内容的地方
-其他所有尽量不要修改
-**/
\ No newline at end of file
diff --git a/Web/src/pages/system/_seed/index.vue b/Web/src/pages/system/_seed/index.vue
deleted file mode 100644
index f30ce6d..0000000
--- a/Web/src/pages/system/_seed/index.vue
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 新增...
-
-
-
-
-
-
-
- 编辑
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Web/src/pages/system/_seed/treeLayout.vue b/Web/src/pages/system/_seed/treeLayout.vue
deleted file mode 100644
index 91e861f..0000000
--- a/Web/src/pages/system/_seed/treeLayout.vue
+++ /dev/null
@@ -1,256 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 新增机构
-
-
-
-
-
-
-
- 编辑
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Web/src/pages/system/doc/highlight.js b/Web/src/pages/system/doc/highlight.js
index 9b86ab0..25bea35 100644
--- a/Web/src/pages/system/doc/highlight.js
+++ b/Web/src/pages/system/doc/highlight.js
@@ -32,7 +32,7 @@ export default {
this.baseCopy(this.code)
},
onCopyTemplate() {
- const code = '"' +
+ let code = '"' +
this.code
// 转义双引号 => \"
.replace(/"/g, '\\"')
@@ -43,6 +43,15 @@ export default {
// 替换行末 = ",
.replace(/\r/g, '",\r') +
'"'
+ let flag = true
+ while (flag) {
+ const p = code.match(/\$\${.*?}/)
+ if (p && p[0]) {
+ code = code.replace(p[0], `\$\{${p[0].slice(1)}\}`)
+ } else {
+ flag = false
+ }
+ }
this.baseCopy(code)
},
},
diff --git a/Web/src/pages/system/doc/index.vue b/Web/src/pages/system/doc/index.vue
index 674f4db..9275b0e 100644
--- a/Web/src/pages/system/doc/index.vue
+++ b/Web/src/pages/system/doc/index.vue
@@ -176,6 +176,10 @@ const docs = [
title: '树-查询表格',
path: '/seed/treeLayout',
},
+ {
+ title: '表单页',
+ path: '/seed/pageForm',
+ },
],
},
{
diff --git a/Web/src/pages/system/doc/seed/form.vue b/Web/src/pages/system/doc/seed/form.vue
index c7287d0..f2db59b 100644
--- a/Web/src/pages/system/doc/seed/form.vue
+++ b/Web/src/pages/system/doc/seed/form.vue
@@ -4,7 +4,7 @@
当前版本
1.2
-
+
diff --git a/Web/src/pages/system/doc/seed/query.vue b/Web/src/pages/system/doc/seed/query.vue
index e9cebd3..94b29c4 100644
--- a/Web/src/pages/system/doc/seed/query.vue
+++ b/Web/src/pages/system/doc/seed/query.vue
@@ -4,7 +4,7 @@
当前版本
1.2
-
+