AMIS的组件学习使用

news2024/11/16 13:58:24

部分代码片段

{
	"id": "filterForm",
	"className": " xysd-zbkb-pubquery",
	"labelWidth": 130,
	"body": [
		{
			"type": "grid",
			"className": "xysd-grid-query-input",
			"columns": [
				{
					"md": 8,
					"body": [
						{
							"type": "input-group",
							"className": "xysd-pubquery-searchKeyWords",
							"body": [
								{
									"label": "",
									"name": "keyWords",
									"type": "input-text",
									"placeholder": "请输入信息标题、内容相关的关键字检索。多关键词,、;隔开"
								},
								{
									"label": "查询",
									"type": "button",
									"icon": "fa fa-search",
									"level": "primary",
									"align": "right",
									"size": "lg",
									"onEvent": {
										"click": {
											"actions": [
												{
													"actionType": "submit",
													"componentId": "filterForm"
												}
											]
										}
									}
								}
							]
						}
					]
				},
				{
					"md": 4,
					"body": [
						{
							"type": "tpl",
							"tpl": "<div class='xysd-pubquery-moreQuery-btn' οnclick='handleCollapse(`xysd-pubquery-moreQuery`,`xysd-pubquery-moreQuery-ss`)'>更多查询</div>"
						}
					]
				}
			]
		},
		{
			"type": "wrapper",
			"className": "xysd-pubquery-moreQuery xysd-pubquery-moreQuery-ss",
			"body": [
				{
					"type": "group",
					"mode": "horizontal",
					"body": [
						{
							"type": "input-date-range",
							"name": "reportTime",
							"label": "首报时间",
							"columnRatio": 3,
							"format": "YYYY-MM-DD"
						},
						{
							"initiallyOpen": false,
							"label": "首报单位",
							"columnRatio": 3,
							"multiple": true,
							"name": "firstReportOrgIds",
							"onlyLeaf": true,
							"searchable": true,
							"selectMode": "tree",
							"showOutline": true,
							"hideNodePathLabel": true,
							"source": {
								"method": "get",
								"url": "/zbxxgl/api/sysdatas/getptv/tree/open?ptvType=zbxtbsdw"
							},
							"type": "tree-select",
							"hideNodePathLabel": true,
							"initiallyOpen": false,
							"unfoldedLevel": 1,
							"onlyChildren": true
						},
						{
							"label": "报送形式",
							"columnRatio": 3,
							"type": "select",
							"clearable": true,
							"name": "reportType",
							"options": [
								{
									"label": "快报",
									"value": "kb"
								},
								{
									"label": "短信",
									"value": "dx"
								}
							]
						},
						{
							"format": "YYYY-MM-DD",
							"label": "事发/接警时间",
							"columnRatio": 3,
							"name": "incidentTime",
							"type": "input-date-range",
							"value": "${YEAR(NOW())}-1-1,${YEAR(NOW())}-12-31"
						}
					]
				},
				{
					"type": "group",
					"mode": "horizontal",
					"body": [
						{
							"label": "事件类型",
							"columnRatio": 3,
							"multiple": true,
							"checkAll": true,
							"name": "eventTypeIds",
							"source": {
								"method": "get",
								"url": "/zbxxgl/api/sysdatas/get?dataKeys=dicZbxtKbSjlxList"
							},
							"type": "select"
						},
						{
							"columnRatio": 2,
							"initiallyOpen": false,
							"label": "事发地点",
							"className": "xysd-grid-scroll-select",
							"multiple": true,
							"name": "siteTypeIds",
							"searchable": true,
							"selectMode": "tree",
							"showOutline": true,
							"source": {
								"method": "get",
								"url": "/zbxxgl/api/sysdatas/getdict/tree/bytype?dictType=zbxtshudi&hidden=0"
							},
							"type": "tree-select",
							"unfoldedLevel": 2
						},
						{
							"label": "",
							"columnRatio": 1,
							"name": "detailedSite",
							"type": "input-text",
							"className": "hiddenLabel"
						},
						{
							"label": "受伤人数",
							"columnRatio": 2,
							"type": "select",
							"clearable": true,
							"name": "injuredNumWay",
							"options": [
								{
									"label": ">",
									"value": ">"
								},
								{
									"label": "<",
									"value": "<"
								},
								{
									"label": "=",
									"value": "="
								},
								{
									"label": ">=",
									"value": ">="
								},
								{
									"label": "<=",
									"value": "<="
								}
							]
						},
						{
							"label": "",
							"columnRatio": 1,
							"name": "injuredNum",
							"type": "input-number",
							"className": "hiddenLabel"
						},
						{
							"label": "亡人数",
							"columnRatio": 2,
							"type": "select",
							"clearable": true,
							"name": "deathNumWay",
							"options": [
								{
									"label": ">",
									"value": ">"
								},
								{
									"label": "<",
									"value": "<"
								},
								{
									"label": "=",
									"value": "="
								},
								{
									"label": ">=",
									"value": ">="
								},
								{
									"label": "<=",
									"value": "<="
								}
							]
						},
						{
							"label": "",
							"columnRatio": 1,
							"name": "deathNum",
							"type": "input-number",
							"className": "hiddenLabel"
						}
					]
				},
				{
					"type": "group",
					"mode": "horizontal",
					"body": [
						{
							"label": "提出就医需求数",
							"columnRatio": 2,
							"type": "select",
							"clearable": true,
							"name": "medicineNumWay",
							"options": [
								{
									"label": ">",
									"value": ">"
								},
								{
									"label": "<",
									"value": "<"
								},
								{
									"label": "=",
									"value": "="
								},
								{
									"label": ">=",
									"value": ">="
								},
								{
									"label": "<=",
									"value": "<="
								}
							]
						},
						{
							"label": "",
							"columnRatio": 1,
							"name": "medicineNum",
							"type": "input-number",
							"className": "hiddenLabel"
						},
						{
							"label": "涉事人数",
							"columnRatio": 2,
							"type": "select",
							"clearable": true,
							"name": "involveNumWay",
							"options": [
								{
									"label": ">",
									"value": ">"
								},
								{
									"label": "<",
									"value": "<"
								},
								{
									"label": "=",
									"value": "="
								},
								{
									"label": ">=",
									"value": ">="
								},
								{
									"label": "<=",
									"value": "<="
								}
							]
						},
						{
							"label": "",
							"columnRatio": 1,
							"name": "involveNum",
							"type": "input-number",
							"className": "hiddenLabel"
						},
						{
							"label": "敏感身份",
							"columnRatio": 3,
							"multiple": true,
							"checkAll": true,
							"name": "identityTypeIds",
							"source": {
								"method": "get",
								"url": "/zbxxgl/api/sysdatas/getdict/bytype?dictType=zbxtmgsf"
							},
							"type": "select"
						},
						{
							"initiallyOpen": false,
							"label": "报送单位",
							"columnRatio": 3,
							"multiple": true,
							"name": "reportOrgIds",
							"joinValues": true,
							"onlyLeaf": true,
							"searchable": true,
							"selectMode": "tree",
							"showOutline": true,
							"hideNodePathLabel": true,
							"source": {
								"method": "get",
								"url": "/zbxxgl/api/sysdatas/getptv/tree/open?ptvType=zbxtbsdw"
							},
							"type": "tree-select",
							"unfoldedLevel": 1,
							"onlyChildren": true
						},
						{
							"type": "hidden",
							"name": "ids",
							"id": "ids"
						}
					]
				}
			]
		}
	],
	"title": "",
	"submitText": "",
	"actions": []
}

最终效果图

Wrapper

是一个包裹容器组件,相当于div。可以自定义样式

//项目种一般使用className
//样式单独定义在一个css文件,在html页面使用link标签引入即可
//当然如果是非常简单的样式,也可以使用style,两者选择其一即可
//建议项目中使用className
{
        "type": "wrapper",
        "body": "内容",
        "className": "xysd-pubquery-moreQuery xysd-pubquery-moreQuery-ss",
        "style": {
          "color": "red",
          "fontSize": "30px"
        }
      }

在这里插入图片描述

group

Group 组件用于在一行展示多个表单项

//同样支持className
{
	"type": "group",
	"mode": "horizontal",//让label和后面的组件在同一行
	"body": [
		{
			"type": "input-date-range",
			"name": "reportTime",
			"label": "首报时间",
			"columnRatio": 3,
			"format": "YYYY-MM-DD"
		},
		{
			"initiallyOpen": false,
			"label": "首报单位",
			"columnRatio": 3,
			"multiple": true,
			"name": "firstReportOrgIds",
			"onlyLeaf": true,
			"searchable": true,
			"selectMode": "tree",
			"showOutline": true,
			"hideNodePathLabel": true,
			"source": {
				"method": "get",
				"url": "/zbxxgl/api/sysdatas/getptv/tree/open?ptvType=zbxtbsdw"
			},
			"type": "tree-select",
			"hideNodePathLabel": true,
			"initiallyOpen": false,
			"unfoldedLevel": 1,
			"onlyChildren": true
		},
		{
			"label": "报送形式",
			"columnRatio": 3,
			"type": "select",
			"clearable": true,
			"name": "reportType",
			"options": [
				{
					"label": "快报",
					"value": "kb"
				},
				{
					"label": "短信",
					"value": "dx"
				}
			]
		},
		{
			"format": "YYYY-MM-DD",
			"label": "事发/接警时间",
			"columnRatio": 3,
			"name": "incidentTime",
			"type": "input-date-range",
			"value": "${YEAR(NOW())}-1-1,${YEAR(NOW())}-12-31"
		}
	]
}

tree-select

树形选择器

{
	"columnRatio": 2,//这个配置可以将当前行平分为12格(Group组件)
	"initiallyOpen": false,//默认是否展开所有子节点(InputTree)
	"label": "事发地点",
	"className": "xysd-grid-scroll-select",
	"multiple": true,//多选
	"name": "siteTypeIds",//这是后端接口参数名
	"searchable": true,//支持搜索,这里的搜索只是在后端返回值的基础上进行数据的查找,不会走后端接口(Select组件)
	"selectMode": "tree",//搜索之后下拉项按照属性结构展示(Select组件)
	"showOutline": true,//控制是否显示展开线(InputTree组件)
	"source": {//配置后端接口
		"method": "get",
		"url": "/zbxxgl/api/sysdatas/getdict/tree/bytype?dictType=zbxtshudi&hidden=0"
	},
	"type": "tree-select",
	"unfoldedLevel": 2,//层级比较多,可以指定展开指定的层级(InputTree组件)
	"hideNodePathLabel": true,//这个可以控制选中的节点是否已全层级的方式显示,true为只显示所选当前节点
	"onlyLeaf": true,//只能选择子节点
	"onlyChildren": true//只会显示最末层级节点
}
//其他一些通用属性参考InputTree组件

Select

选择器

{
	"label": "敏感身份",
	"columnRatio": 3,
	"multiple": true,//多选
	"checkAll": true,//全选
	"name": "identityTypeIds",//后端接口参数
	"source": {//后端接口
		"method": "get",
		"url": "/zbxxgl/api/sysdatas/getdict/bytype?dictType=zbxtmgsf"
	},
	"type": "select",
	"selectMode":"tree",//下拉项展示格式tree是树形格式,group 分组形式,table表格格式
	"clearable":true//单选模式下是否可以清空
}

{
	"label": "受伤人数",
	"columnRatio": 2,
	"type": "select",
	"clearable": true,
	"name": "injuredNumWay",
	//也可以通过options属性指定下拉项
	"options": [
		{
			"label": ">",
			"value": ">"
		},
		{
			"label": "<",
			"value": "<"
		},
		{
			"label": "=",
			"value": "="
		},
		{
			"label": ">=",
			"value": ">="
		},
		{
			"label": "<=",
			"value": "<="
		}
	]
}

其他属性参考
属性表

InputDateRange

日期范围选择器

{
	"type": "input-date-range",
	"name": "reportTime",
	"label": "首报时间",
	"columnRatio": 3,
	"format": "YYYY-MM-DD",//传参数据格式
	"displayFormat":"YYYY-MM-DD"//日期显示格式
	"placeholder":"请选择日期"//占位符
}
{
	"format": "YYYY-MM-DD",
	"label": "事发/接警时间",
	"columnRatio": 3,
	"name": "incidentTime",
	"type": "input-date-range",
	"value": "${YEAR(NOW())}-1-1,${YEAR(NOW())}-12-31"//value可以设置默认值,也可以通过函数设置默认值
}

属性表

inputGroup

输入框组合

{
	"type": "input-group",
	"className": "xysd-pubquery-searchKeyWords",
	"body": [
		{
			"label": "",
			"name": "keyWords",
			"type": "input-text",
			"placeholder": "请输入信息标题、内容相关的关键字检索。多关键词,、;隔开"
		},
		{
			"label": "查询",
			"type": "button",
			"icon": "fa fa-search",
			"level": "primary",
			"align": "right",
			"size": "lg",
			"onEvent": {
				"click": {
					"actions": [
						{
							"actionType": "submit",
							"componentId": "filterForm"
						}
					]
				}
			}
		}
	]
}

Grid

水平分栏
这里主要就是使用分栏 md 属性

{
	"type": "grid",
	"className": "xysd-grid-query-input",
	"columns": [
		{
			"md": 8,
			"body": [
				{
					"type": "input-group",
					"className": "xysd-pubquery-searchKeyWords",
					"body": [
						{
							"label": "",
							"name": "keyWords",
							"type": "input-text",
							"placeholder": "请输入信息标题、内容相关的关键字检索。多关键词,、;隔开"
						},
						{
							"label": "查询",
							"type": "button",
							"icon": "fa fa-search",
							"level": "primary",
							"align": "right",
							"size": "lg",
							"onEvent": {
								"click": {
									"actions": [
										{
											"actionType": "submit",
											"componentId": "filterForm"
										}
									]
								}
							}
						}
					]
				}
			]
		},
		{
			"md": 4,
			"body": [
				{
					"type": "tpl",
					"tpl": "<div class='xysd-pubquery-moreQuery-btn' οnclick='handleCollapse(`xysd-pubquery-moreQuery`,`xysd-pubquery-moreQuery-ss`)'>更多查询</div>"
				}
			]
		}
	]
}

Page

Page 组件是 amis 页面 JSON 配置中顶级容器组件,是整个页面配置的入口组件

{
	"type": "page",
	"title": "离京报备登记",//标题,在页面的左上角
	"body": {
		"type": "service",//引用外部的一个json文件
		"schemaApi": {
			"url": "/zbxxgl/amis/fetchSchema",
			"data": {
				"path": "#/pc/html/ljbb/dj"
			},
			"method": "post"
		}
	},
	"id": "u:88fac01c5570",
	"asideResizor": false,//页面的边栏区域宽度是否可调整
	"pullRefresh": {//下拉刷新配置(仅用于移动端)
		"disabled": true
	},
	"regions": [//定义页面整体分布 头,身体,底部
		"body",
		"header",
		"toolbar"
	],
	"toolbar": [//往页面的右上角加内容,需要注意的是,当有 title 时,该区域在右上角,没有时该区域在顶部
		{//这个是报备记录查询
			"label": "",
			"type": "button",
			"className": "btn-bbjlcx",
			"icon": "",
			"iconClassName": "text-white text-xl",
			"onEvent": {
				"click": {
					"weight": 0,
					"actions": [
						{
							"args": {
								"url": "/zbxxgl/pc/index.html#/pc/html/ljbb/bsdw_ljcx"
							},
							"actionType": "url",
							"blank": false
						}
					]
				}
			}
		},
		{//这个是点击跳转首页
			"label": "",
			"type": "button",
			"className": "btn-backhome",
			"icon": "fa fa-times-circle",
			"iconClassName": "text-white text-xl",
			"onEvent": {
				"click": {
					"weight": 0,
					"actions": [
						{
							"args": {
								"url": "/zbxxgl/pc/index.html#/pc/bsdw/portal"
							},
							"actionType": "url",
							"blank": false
						}
					]
				}
			}
		}
	]
}

效果图

在这里插入图片描述

Service 功能型容器

Service组件就是专门为该类组件而生,它的功能是:配置初始化接口,进行数据域的初始化,然后在Service内容器中配置子组件,这些子组件通过数据链的方法,获取Service所拉取到的数据

//这是在一个页面中嵌入service组件的定义
{
	"type": "service",
	"schemaApi": {//用来获取远程 Schema 接口地址
		"url": "/zbxxgl/amis/fetchSchema",
		"data": {
			"path": "#/pc/html/ljbb/dj"
		},
		"method": "post"
	}
}
//这个是上面service组件的实现
{
	"type": "service",
	"api": {//初始化数据域接口地址
		"method": "get",
		"url": "/zbxxgl/api/leaveStation/getCurrentIsSldParty"
	},
	"body": [
		
	]
}

Form

主要作用是提交或者展示表单数据

{
	"type": "form",
	"panelClassName": "form-dj",
	"debug": false,//调试
	"id": "myForm",
	"title": "",
	"initApi": {//初始化数据
		"method": "get",
		"url": "/zbxxgl/api/leaveStation/get?id=${id}"
	},
	"body": [
		{
			"type": "service",
			"api": "/zbxxgl/api/leaveStation/getInfo?dataKeys=leaveUser",
			"body": [
				{
					"type": "hidden",
					"id": "sccg",
					"name": "sccg",
					"value": false
				},
				{
					"type": "grid",
					"columns": [
						{
							"md": 4,
							"body": []
						},
						{
							"body": []
						}
					]
				}
			]
		}
	],
	"mode": "horizontal",//表单显示方式 normal inline horizontal
	"actions": [//表单行为 按钮
		{
			"type": "button",
			"label": "上报",
			"size": "lg",
			"block": false,
			"actionType": "submit",
			"api": {
				"url": "/zbxxgl/api/leaveStation/report",
				"method": "post",
				"messages": {
					"success": "成功",
					"failed": "失败"
				}
			},
			"level": "primary",
			"visibleOn": "${ privilegeDTO.report}",
			"confirmText": "是否确认上报?上报后信息无法删除!"
		}
	]
}

属性表

Hidden

对于隐藏的字段同时又希望提交表单的时候带过去,可以使用 hidden 组件

{
	"type": "service",
	"api": "/zbxxgl/api/leaveStation/getInfo?dataKeys=leaveUser",
	"body": [
		{
			"type": "hidden",
			"id": "sccg",
			"name": "sccg",
			"value": false
		}
	]
}

Tpl 模板

{
	"type": "tpl",
	"className": "method-title-sub",
	"tpl": "方式一:智能填写"
}

{
	"type": "tpl",
	"className": "method-content",
	"style": {
		"margin-bottom": "10px"
	},
	"tpl": "填写电子版离京外出审批表(模板可通过本系统下载),履行线下请假审批程序,领导签批后,将已填写的电子版审批表上传至系统,系统自动识别表格内容至右侧在线表单,核对修改完善表单信息后,在审批信息处注明“X月X日由XX领导批准”(无需提交离京报备表及审批证明材料扫描件),提交上报。"
}

divider 分割线

{
	"type": "divider",
	"title": "Text",
	"titlePosition": "left",
	"color": "red",
	"lineStyle": "dashed",
	"direction": "vertical"
}

{
	"type": "divider",
	"title": "Text",
	"titlePosition": "center",
	"color": "blue",
	"lineStyle": "solid",
	"direction": "horizontal",
	"style": {
		"margin": "0px"
	}
}

在这里插入图片描述

button 按钮

button 实际上是 action 的别名,更多用法见 action

"actions":[
	{
		"type": "button",
		"label": "导出审批表",
		"hiddenOn": "${sccg}",
		"visibleOn": "${oneIdentyQuery==1 || privilegeDTO.isDcztZBS}",
		"id": "dcsb_button",
		"size": "lg",
		"level": "primary",
		"actionType": "download",
		"required": [],
		"api": {
			"method": "post",
			"url": "/zbxxgl/api/leaveStation/export?orgIdentityTypeId=${oneOrgIdentityTypeId}",
			"messages": {
				"success": "成功",
				"failed": "失败"
			}
		}
	},
	{
		"type": "button",
		"label": "导出审批表",
		"visibleOn": "${oneIdentyQuery==0 && !privilegeDTO.isDcztZBS}",
		"size": "lg",
		"level": "primary",
		"onEvent": {
			"click": {
				"actions": [
					{
						"actionType": "dialog",
						"args": {
							"dialog": {
								"type": "dialog",
								"id": "dialogSubmit",
								"title": "请选择审批表模板",
								"className": "xysd-dialog-padding",
								"actions": [],
								"body": [
									{
										"type": "form",
										"id": "mergeForm",
										"body": [
											{
												"type": "select",
												"name": "orgIdentityTypeId",
												"source": "/zbxxgl/api/leaveStation/getMoreIdentity",
												"required": true,
												"label": false
											},
											{
												"type": "wrapper",
												"className": "flex justify-end xysd-handle-btn-margin",
												"body": [
													{
														"type": "button",
														"label": "确认",
														"level": "primary",
														"onEvent": {
															"click": {
																"actions": [
																	{
																		"actionType": "custom",
																		"script": "window.amisScoped.getComponentById('mergeForm').validate().then(function(res){if(res){console.log(event.data);doAction([{\t\"actionType\": \"download\",\t\"args\": {\"api\": {\t\"method\": \"post\",\t\"url\": \"/zbxxgl/api/leaveStation/export\",\t\"messages\": {\t\t\"success\": \"成功\",\t\t\"failed\": \"失败\"\t},\t\"data\": {\t\t...event.data.__super.__super\t,\t\t\"orgIdentityTypeId\": event.data.orgIdentityTypeId}}}},{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"actionType\": \"cancel\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"componentId\": \"dialogSubmit\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}])}})"
																	}
																]
															}
														}
													},
													{
														"type": "button",
														"label": "取消",
														"onEvent": {
															"click": {
																"actions": [
																	{
																		"actionType": "cancel",
																		"componentId": "dialogSubmit"
																	}
																]
															}
														}
													}
												]
											}
										]
									}
								]
							}
						}
					}
				]
			}
		}
	},
	{
		"type": "submit",
		"label": "${privilegeDTO.isDcztZBS ? '保存': '暂存'}",
		"size": "lg",
		"visibleOn": "${ privilegeDTO.save}",
		"api": {
			"url": "/zbxxgl/api/leaveStation/save",
			"method": "post",
			"dataType": "json",
			"messages": {
				"success": "成功",
				"failed": "失败"
			}
		},
		"level": "primary"
	},
	{
		"type": "button",
		"label": "上报",
		"size": "lg",
		"block": false,
		"actionType": "submit",
		"api": {
			"url": "/zbxxgl/api/leaveStation/report",
			"method": "post",
			"messages": {
				"success": "成功",
				"failed": "失败"
			}
		},
		"level": "primary",
		"visibleOn": "${ privilegeDTO.report}",
		"confirmText": "是否确认上报?上报后信息无法删除!"
	}
]

Action 行为按钮

一般type都设置为button,所以这里就已type是button为例

{
	"type": "button",
	"columnRatio": 12,
	"className": "method-btn",
	"level":"success",//如果对于按钮的样式没有特别要求可以使用level 取值 primary secondary info success warning danger light
	"label": "下载离京外出审批表模板",
	"icon": "fas fa-arrow-down",//图标
	"style": {//样式
		"margin-bottom": "15px"
	},
	"actionType": "download",//按钮行为  这里是下载
	"api": {//后端接口
		"url": "/zbxxgl/api/leaveStation/template",
		"method": "get"
	}
}

{
	"label": "",
	"type": "button",
	"className": "btn-backhome",
	"icon": "fa fa-times-circle",
	"iconClassName": "text-white text-xl",
	"onEvent": {//click事件 可以跳转到首页 指定的页面
		"click": {
			"weight": 0,
			"actions": [
				{
					"args": {
						"url": "/zbxxgl/pc/index.html#/pc/bsdw/portal"
					},
					"actionType": "url",
					"blank": false
				}
			]
		}
	}
}

更多操作

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1408373.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

鲲鹏微认证——openEuler开源操作系统迁移实践

文章目录 为什么要系统搬迁为什么选择欧拉欧拉系统迁移概述实施路径工具实战 为什么要系统搬迁 2020年12月&#xff0c;CentOs作为由开源社区免费提供的操作系统&#xff0c;宣布将对CentO58于2021年底停止服务&#xff0c;CentO57则于2024年6月底停止服务。 这将直接导致操作…

MyBatis详解(1)-- ORM模型

MyBatis详解&#xff08;1&#xff09; JDBC的弊端&#xff1a; ORM 模型常见的ORM模型&#xff1a;mybatis和Hibernate的区别 ***优势&#xff1a;mybatis解决问题&#xff1a;优点&#xff1a; MyBatisMyBatis环境搭建项目架构mybatis生命周期 JDBC的弊端&#xff1a; 1.硬编…

dataGrip连接数据库mysql和intersystems的iris

intersystems公司的产品iris是cache的升级版本&#xff0c;目前绝大多数数据库工具都没法连接这个数据库 datagrip下载地址 https://download-cdn.jetbrains.com.cn/datagrip/datagrip-2023.3.3.exe 选择对应的数据库产品类型 新建数据库资源连接 填上对应的数据库连接和账…

12.前端--CSS-背景属性

1.背景颜色 样式名称&#xff1a; background-color 定义元素的背景颜色 使用方式: background-color:颜色值; 其他说明&#xff1a; 元素背景颜色默认值是 transparent&#xff08;透明&#xff09;      background-color:transparent; 代码演示&#xff1a; 背景色…

将AWS iot消息数据发送Kinesis Firehose Stream存向S3

观看此文章之前&#xff0c;请先学习AWS iot的数据收集&#xff1a; 使用Linux SDK客户端向AWS Iot发送数据-CSDN博客 1、工作原理&#xff1a; 1.1 规则 规则可让您的设备与 AWS 服务进行交互。分析规则并根据物品发送的消息执行操作。您可以使用规则来支持任务&#xff0…

Lucene 源码分析——BKD-Tree

Lucene 源码分析——BKD-Tree - AIQ Bkd-Tree Bkd-Tree作为一种基于K-D-B-tree的索引结构&#xff0c;用来对多维度的点数据(multi-dimensional point data)集进行索引。Bkd-Tree跟K-D-B-tree的理论部分在本篇文章中不详细介绍&#xff0c;对应的两篇论文在附件中&#xff0c…

配置ntp时间服务器和ssh免密登录实验

1&#xff1a;配置ntp时间服务器&#xff0c;确保客户端主机能和服务主机同步时间 第一步&#xff0c;将服务器的时间同步对象改为阿里的时间服务器&#xff08;这样比较精准&#xff09; 先启动服务&#xff1a;[rootserver ~]# systemctl start chronyd 进入配置文件&#xf…

源 “MySQL 5.7 Community Server“ 的 GPG 密钥已安装,但是不适用于此软件包。请检查源的公钥 URL 是否配置正确

Is this ok [y/d/N]: y Downloading packages: 警告&#xff1a;/var/cache/yum/x86_64/7/mysql57-community/packages/mysql-community-server-5.7.44-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY 从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 检…

知识图谱符号表示比较:特性图、RDF和OWL

目录 前言1 特性图&#xff1a;灵活的图结构表示1.1 优势与灵活性1.2 存储优化与查询优势1.3 挑战&#xff1a;缺乏工业标准支持 2 RDF&#xff08;Resource Description Framework&#xff09;&#xff1a;面向Web的数据标准2.1 三元组结构的优势2.2 语义标准与词汇丰富性2.3 …

蓝桥杯备战——1.点亮LED灯

1.解析原理图 由上图可以看到8个共阳LED灯接到了573输出口&#xff0c;而573输入接到单片机P0口上。当573 LE脚输入高电平时&#xff0c;输出随输入变化&#xff0c;当LE为低电平时&#xff0c;输出锁存。 由上图可以看到Y4C接到了或非门74HC02的输出端&#xff0c;而输入端为…

顺序表的增、删、改、查

小伙伴们好&#xff0c;学完C语言&#xff0c;就要开始学数据结构了&#xff0c;数据结构也是非常重要的&#xff0c;今天我们主要来学习在数据结构中最常用的增删改查操作。话不多说&#xff0c;一起来学习吧 1.数据结构相关概念 1.什么是数据结构&#xff1f; 数据结构是由…

【Web前端开发基础】CSS3之Web字体、字体图标、平面转换、渐变

CSS3之Web字体、字体图标、平面转换、渐变 目录 CSS3之Web字体、字体图标、平面转换、渐变一、Web字体1.1 Web字体概述1.2 字体文件1.3 font-face 规则 二、字体图标2.1 字体图标2.2 字体图标的优点2.3 图标库2.4 下载字体包2.5 字体图标的使用步骤2.6 字体图标使用注意点2.7 上…

12.常用统计分析方法——聚类分析

目录 基础知识 实操 层次聚类 划分聚类 方法一&#xff1a;K均值聚类&#xff08;最常见&#xff09; 方法二&#xff1a;基于中心点的划分&#xff08;PAM&#xff09; 避免不存在的类 基础知识 概念&#xff1a; 聚类分析是一种数据归约技术&#xff0c;旨在揭露一个…

prometheus监控RabbitMQ策略

一般用官方的rabbitmq_exporter采取数据即可&#xff0c;然后在普米配置。但如果rabbitmq节点的队列数超过了5000&#xff0c;往往rabbitmq_exporter就会瘫痪&#xff0c;因为rabbitmq_exporter采集的信息太多&#xff0c;尤其是那些队列的细节&#xff0c;所以队列多了&#x…

vue3-深入组件-组件注册和props更多细节

组件注册 定义好的组件需要注册才能被使用。 注册方式有两种 全局注册 局部注册 全局注册 .component() 方法&#xff0c;让组件在当前 Vue 应用中全局可用。 在 main.ts 中 import ./assets/main.cssimport { createApp } from vue import { createPinia } from pinia i…

无人机航迹规划(五):七种元启发算法(DBO、LO、SWO、COA、LSO、KOA、GRO)求解无人机路径规划(提供MATLAB代码)

一、七种算法&#xff08;DBO、LO、SWO、COA、LSO、KOA、GRO&#xff09;简介 1、蜣螂优化算法DBO 蜣螂优化算法&#xff08;Dung beetle optimizer&#xff0c;DBO&#xff09;由Jiankai Xue和Bo Shen于2022年提出&#xff0c;该算法主要受蜣螂的滚球、跳舞、觅食、偷窃和繁…

10. UE5 RPG使用GameEffect创建血瓶修改角色属性

前面我们通过代码实现了UI显示角色的血量和蓝量&#xff0c;并实现了初始化和在数值变动时实时更新。为了测试方便&#xff0c;没有使用GameEffect去修改角色的属性&#xff0c;而是通过代码直接修改的数值。 对于GameEffect的基础&#xff0c;这里不再讲解&#xff0c;如果需要…

微机原理常考填空以及注意事项第(三)弹~

前面已经总结了200个常考题注意事项&#xff0c;可以翻阅查看。 以下仅个人总结的易错以及注意事项&#xff1a; 1&#xff0c;汇编语言源程序的基本格式&#xff1a; DATA SEGMENT;存放数据项的数据段 DATA ENDS EXTRA SEGMENT;存放数据项的附加段 EXTRA ENDS STACK1 SEGM…

Mybatis四大组件

一、Mybatis四大组件 SqlSessionFactoryBuild、SqlSessionFactory、SqlSession、Mapper。 二、SqlSession四大对象 Executor、StatementHandler、ParameterHandler、ResultSetHandler。 这里阐述一下上图的流程 Exeutor发起sql执行任务 1、先调用statementHandler中的pre…

输入某年某月某日,判断这一天是这一年的第几天?(Java)

思路&#xff1a; 1&#xff0c;分别定义三个变量来接收 年 月 日 2&#xff0c;累加已经过完的月份的天数 日期 3&#xff0c;二月份的天数要根据是否是闰年&#xff0c;随之改变 1 3 5 7 8 10 12 ---> 31天 4 6 9 11 ---> 30天 2 ---> 闰…