GisForm使用示例代码
``` Vue
<template>
<div style="height: 100%; overflow-y:auto">
<gis-form ref="gisForm" style="height: auto" :rule="rule" :mode="mode" :config="config" v-model="formData" autoable
:portName="portName" :param="param" />
</div>
</template>
<script>
export default {
components: {
},
props: {
// 当前操作的模式 (1、add 新增 2、edit编辑 3、show 查看)
mode: {
type: String,
default: 'add'
},
// 初始化的参数
param: String
},
data () {
return {
// 接口名称
portName: "",
// 配置
config: {
span: 12, // 每个元素所占行内占比为12
},
formData: {
},
rule: [
{
title: "基础组件",
type: "title"
},
{
type: "input", // 组件类型 必填
field: "input", // 对应字段 必填
title: "输入框", // 中文标题 必填
className: "test", // 注入css类名,所有组件都支持 选填
iType: "password", // iview中的type,更名为iType 选填
},
{
type: "number", // 组件类型 必填
field: "number", // 对应字段 必填
title: "数字选择器", // 中文标题 必填
},
{
type: "date", // 组件类型 必填
field: "date", // 对应字段 必填
title: "日期选择器", // 中文标题 必填
},
{
type: "time", // 组件类型 必填
field: "time", // 对应字段 必填
title: "时间选择器", // 中文标题 必填
},
{
type: "select", // 组件类型 必填
field: "select", // 对应字段 必填
title: "选择框", // 中文标题 必填
options: [ // 选项 必填
{
label: "是",
value: "true"
},
{
label: "否",
value: "false"
}
]
},
{
type: "check", // 组件类型 必填
field: "check", // 对应字段 必填
title: "多选器", // 中文标题 必填
options: [ // 选项 必填
{
label: "是",
value: "是"
},
{
label: "否",
value: "否"
}
]
},
{
type: "radio", // 组件类型 必填
field: "radio", // 对应字段 必填
title: "单选器", // 中文标题 必填
options: [ // 选项 必填
{
label: "是",
value: "true"
},
{
label: "否",
value: "false"
}
]
},
{
type: "switch", // 组件类型 必填
field: "switch", // 对应字段 必填
title: "开关", // 中文标题 必填
},
{
type: "textarea", // 组件类型 必填
field: "textarea", // 对应字段 必填
title: "文本域", // 中文标题 必填
span: 24, // 行内宽度(最大24) 选填
},
{
type: "col", // 组件类型 必填
field: "col", // 对应字段 必填
title: "空白占位格", // 中文标题 必填
span: 24, // 行内宽度(最大24) 选填
},
{
title: "gisPlugin内置组件",
type: "title"
},
{
type: "upload", // 组件类型 必填
field: "upload", // 对应字段 必填
title: "上传组件", // 中文标题 必填
},
{
type: "photo", // 组件类型 必填
field: "photo", // 对应字段 必填
title: "图片上传", // 中文标题 必填
},
{
type: "table", // 组件类型 必填
field: "table", // 对应字段 必填
title: "表格", // 中文标题 必填
hiddenLabel: true, // 隐藏title 必填
label: "表格", // 表格内中文标题 必填
mode: "add", // 当前表格的操作状态 必填
column: [ // 行的配置 必填
{
title: "input",
key: "input",
type: "input",
},
{
type: "select",
title: "select",
key: "select",
clearable: true,
options: [
{
label: "是",
value: "true"
},
{
label: "否",
value: "false"
}
]
},
{
type: "date",
title: "date",
key: "date",
}
],
buttons: [ // 按钮配置 选填
{
title: "批量删除",
icon: "md-trash",
event: json => {
}
},
],
height: 150, // 表格默认高度,超过高度出现滚动 选填
on: {
"on-remove": (e) => { // 点击删除一行的回调,回调参数为行的内容
console.log(e)
}
}
},
{
type: "editor", // 组件类型 必填
field: "editor", // 对应字段 必填
title: "富文本编辑器", // 中文标题 必填
label: "动态图层定义",
},
{
type: "cell", // 组件类型 必填
field: "cell", // 对应字段 必填
title: "高阶组件", // 中文标题 必填
render: (h, data) => {
return h("Button", "高阶组件测试")
}
},
{
title: "自定义组件",
type: "title",
},
{
title: "自定义组件",
type: "custom",
component: {
template: "<Alert>自定义组件component方式</Alert>"
}
},
{
title: "自定义组件",
type: "custom",
component: {
render: (h) => {
return h("Alert", "自定义组件render方式")
}
}
}
]
}
},
methods: {
handleSubmit (process) {
this.formData.handleSubmit((data) => {
this.postRequest('/basicData/add', data).then(res => {
this.$Message.success(res.message)
this.$emit('handleSubmit')
})
}, () => {
this.$Message.console.error('请完善表单')
})
}
}
}
</script>
<style>
.test {
background-color: #dbdbdb;
}
</style>
```
效果图

GisTagForm组件示例代码
``` Vue
<template>
<div style="height:100%">
<gis-tag-form ref="tagForm" :tags="tags" :direction="direction" :rules="rules" v-model="data" style="height:100%">
</gis-tag-form>
</div>
</template>
<script>
export default {
data () {
return {
// tag 的排布放行 支持垂直或水平 (1、vertical 垂直 2、horizontal 水平)
direction: 'vertical',
tags: [
{
title: '模块一',
icon: "logo-android"
},
{
title: '模块二',
icon: "logo-apple"
},
{
title: '模块三',
icon: "logo-angular"
}
],
rules: [
[
{
type: "title",
title: "business",
},
{
type: "input",
title: "输入",
field: 'input',
icon: "md-add",
readonly: false,
span: 24,
on: {
'on-click': (e) => {
this.rule[1].readonly = true
this.rule[2].disabled = true
}
}
},
{
type: "date",
title: "date",
field: 'date',
validate: true
},
{
type: "select",
title: "select",
field: 'select',
options: [
{
value: 'London',
label: 'London',
icon: 'md-alarm'
},
{
value: 'New York',
label: 'New York'
},
{
value: 'Ottawa',
label: 'Ottawa'
}
],
clearable: true,
validate: true
},
],
[
{
type: "title",
title: "business2",
},
{
type: "radio",
title: "radio",
field: 'radio',
options: [
{
value: '1',
label: 'London'
},
{
value: '2',
label: 'New York'
},
{
value: '3',
label: 'Ottawa'
}
],
validate: true
},
{
type: "upload",
title: "upload",
field: 'upload',
span: 12,
validate: true
},
{
type: "date",
title: "date",
field: 'date',
validate: true
}
],
[
{
type: "table",
field: 'table',
hiddenLabel: true,
validate: true,
label: 'table',
showSummary: true,
draggable: true,
column: [
{ type: 'index', width: 40, align: 'center' },
{
title: 'Name',
key: 'name',
type: 'input'
},
{
title: 'Age',
key: 'age',
type: 'number'
},
{
title: 'Address',
key: 'address',
type: 'input'
},
{
title: 'Date',
key: 'date',
type: 'date'
}
],
on: {
'on-remove': (e) => {
console.log(e)
}
}
}
]
],
data: [
{}, {}, {}
]
}
},
methods: {
handleSubmit () {
this.$refs.tagForm.handleSubmit(() => {
this.$Message.success('ok')
}, () => {
this.$Message.error('error')
})
}
}
}
</script>
<style>
</style>
```
效果图

- 一、 开发环境
- 二、系统开发规范
- 1. 工程目录规范
- 1.1根目录规范
- 1.2.通用组件目录规范
- 1.3.自定义模块、项目目录规范
- 1.4.资源目录规范
- 1.5.文件命名规范
- 1.6.变量命名规范(小写驼峰)
- 1.7.函数命名规范(小写驼峰)
- 1.8.代码规范
- 1.9.参考文档
- 2. 前端编码规范
- 2.1.代码检查工具及常见规范
- 2.2.结构规范及编码逻辑
- 3. 后端编码规范
- 3.1.代码检测工具及常见规范
- 3.2.结构规范及编码逻辑
- 4. 数据库设计规范
- 4.1.参考文档
- 4.2.主流数据库字段命名长度限制
- 4.3.命名规范
- 4.4.使用规范
- 5. 系统运维规范
- 6. 安装部署规范
- 7. 组件版本规范
- 1.目标
- 2.组件概念
- 3.文件格式
- 4.组件规范
- 5.Vue 中函数的使用
- 6.提供组件 API 文档
- 7.使用 mixins
- 8、表单设计规范
- 三、自定义表单组件
- 1.设计思路
- 1.1 解决了哪些痛点
- 1.2 核心思路
- 2.1全局配置
- 2.2双向绑定
- 1.3 如何快速上手
- 2.gis-plugin基础使用说明
- 2.1 观前须知
- 2.2 基础配置
- 3. Form组件
- 3.1 基本使用
- 3.2 API说明
- 2.1 props
- 2.2 events
- 3.3 示例代码
- 3.4 常见问题
- 4.1 gis-tag-form的使用
- 4.2 gis-form配套组件的使用
- 4.2.1 gis-form-table 表单内置表格
- 4.2.2 gis-form-editor 表单内置富文本编辑器
- 4.2.3 gis-form-upload 表单内置上传组件
- 4.3 表单初始化常见问题
- 4.Table组件
- 4.1 基本使用
- 4.2 API说明
- 2.1 props
- 2.2 events
- 4.3 示例代码
- 4.4 常见问题
- 4.1 我有隐藏的查询条件,不在查询框上显示,该怎么办?
- 4.2 通过接口获取到的数据我要进一步做处理,该怎么办?
- 4.3 我使用了render,为什么字典值(dict)就无效了?
- 5.Model组件
- 5.1 基本使用
- 5.2 API说明
- 2.2 prop
- 2.2 events
- 5.3 示例代码
- 5.4 常见问题
- 6.附件上传
- 6.1 附件上传组件
- 6.2 图片上传组件
- 7. 文档处理
- Excel组件(基于POI实现)
- Word组件(基于POI实现)
- Pdf组件(基于POI实现)
- 8. 级联选择表单
- 四、自定义ArcGIS通用工具Exe
- 01. EXE接口说明
- 02. CAD转JSON接口
- 03. SHAPE转JSON接口
- 04. 从工作空间中导出文件
- 05. 从ESRIJSON导出文件
- 06. 坐标转换-ESRIJSON
- 07. 坐标转换-文件
- 08. 数据编辑-ESRIJSON
- 09. 数据编辑-新增-从CAD文件导入
- 10. 数据编辑-删除
- 11. 数据编辑-编辑-从CAD文件编辑
- 12. 面积&长度计算
- 13. 空间分析-ESRIJSON
- 14. 空间分析-工作空间
- 15. 数据编辑-从工作空间中导入
- 16. 空间分析-地图服务(一维)
- 17. 空间分析-地图服务(二维)
- 18. 空间分析-地图服务(多个)
- 19.数据编辑-从CAD文件导入(92坐标系CAD,双图层)
- 20.空间分析-验证是否闭合、是否自相交
- 21.WMF转PDF
- 22.数据统计-地图服务
- 五、项目建设规范
- 六、注意事项
- 七、常见问题
- 八、 WebGIS核心组件库
- 01.后台管理端
- 02.图形端
- 03.移动端
- 04.接口
- 九、工作流开发
- 1.前期工作
- 1.1 禁用Activiti自带登录验证
- 1.2 设置应用部署域名
- 2.流程审批步骤
- 2.1.创建模型
- 2.2.在线流程设计
- 2.3.部署发布
- 2.4.流程配置
- 2.5.流程申请
- 2.6.流程审核
- 3.流程设计demo
- 3.1.一般流程
- 3.2.带条件流程
- 3.3.会签流程
- 4.其他一些开发详解
- 4.1.关于内嵌Activiti在线流程设计器
- 4.2.关于对原框架中流程设计代码的调优
- 4.3.关于DelegateExecution对象的常用方法
- 5.工作流接入文档
- 十、框架更新日志
- 其它
- 代码生成器
- 短信平台管理与接口
- 单据编码管理与接口
- 定时任务管理与接口
- 文件管理与接口
- 地图打印管理与接口
- Excel文件导出接口
- 经典SQL语句
- 多实例运行Redis
- 多数据库操作
- 消息通知管理与接口
- 工作流数据清理
- 其他技术总结
- 发布/订阅功能使用说明
- 学习资料
- 十一、多数据源-dynamic-datasource
- 基础必读
- 连接池集成
- 连接池必读
- 集成Druid
- 集成HikariCP
- 集成BeeCP
- 集成DBCP2
- 集成Jndi
- 第三方集成
- 集成MybatisPlus
- 集成P6spy
- 集成Quartz
- 集成ShardingJdbc
- 进阶使用
- 动态添加移除数据源
- 动态解析数据源
- 数据库加密
- 启动初始化执行脚本
- 自动读写分离
- 懒启动数据源
- 无数据源启动
- 手动切换数据源
- 自定义
- 自定义注解
- 自定义数据源来源
- 自定义负载均衡策略
- 自定义切面
- 事务专栏
- 基础知识
- 本地事务
- seata事务
- 调试源码
- 常见问题
- 不可用版本
- 注意事项
- dynamic-datasource参考资料
