el-tree结合el-switch实现状态切换

news2024/11/24 13:49:19

<template>
	<div>
		<el-col :span="24">
			<el-card class="tree-card">
				<div class="sketch_content selectFile">
					<span class="span_title">组织列表 </span>
					<div style="display: flex; justify-content: flex-end; width: 55vw">
						<div
							style="display: flex; align-items: center; margin-right: 1.5vw"
						>
							<el-radio-group v-model="filterType" @change="radioChange">
								<el-radio :label="'all'">显示全部</el-radio>
								<el-radio :label="'on'">只显示开启</el-radio>
								<el-radio :label="'off'">只显示关闭</el-radio>
							</el-radio-group>
						</div>
						<el-button type="primary" size="small" @click="oneClickEnables"
							>一键启用</el-button
						>
					</div>
					<el-tree
						style="margin-top: 20px; width: 55vw"
						:data="organizationTreeData"
						node-key="id"
						default-expand-all
						:expand-on-click-node="false"
						v-if="
							organizationTreeData.length !== 0 && organizationTreeData !== ''
						"
						draggable
						@node-click="getOrganizationList"
						@drag-start="handleDragStart"
						@allow-drop="allowDrop"
						@drag-end="handleDragEnd"
						@node-drop="handleNodeDrop"
						@allow-drag="allowDrag"
					>
						<span class="custom-tree-node" slot-scope="{ node, data }">
							<span>{{ node.label }}</span>
							<div
								v-if="data.type !== 1"
								style="
									display: flex;
									justify-content: center;
									align-items: center;
								"
							>
								<el-button
									type="text"
									icon="el-icon-plus"
									class="edit"
									@click="showOrganizationDialog"
								>
								</el-button>
								<el-tooltip
									class="item"
									effect="dark"
									content="修改组织"
									placement="top"
								>
									<el-button
										type="text"
										@click="() => showEditOrganizationDialog(data)"
										icon="el-icon-edit"
										class="edit"
										style="margin-right: 2vw"
									>
									</el-button>
								</el-tooltip>
								<el-switch
									slot="reference"
									style="display: block"
									v-model="node.data.organizeStatus"
									active-color="#13ce66"
									inactive-color="#cccccc"
									:active-value="0"
									:inactive-value="1"
									active-text="启用"
									inactive-text="禁用"
									@change="statusChange(node)"
								>
								</el-switch>
							</div>
						</span>
					</el-tree>
					<div
						v-if="
							organizationTreeData.length == 0 || organizationTreeData == ''
						"
					>
						<el-empty description="暂无组织" />
						<el-button
							type="primary"
							size="small"
							@click="showDialog"
							v-if="add"
							>添加组织</el-button
						>
					</div>
				</div>
			</el-card>
		</el-col>

		<el-dialog
			width="580px"
			:visible.sync="addOrganizationDialogVisible"
			:close-on-click-modal="false"
			@close="closeOrganizationTreeDialog"
		>
			<div class="addOrganizationDialog">
				<span>新增组织</span>
			</div>
			<el-divider class="dialog_divider"></el-divider>
			<el-form
				:model="organizationForm"
				ref="addFileBackupTaskForm"
				label-width="100px"
				style="height: auto"
			>
				<el-form-item label="组织代码:" style="margin-left: -19px">
					<el-input
						v-model="organizationForm.id"
						size="mini"
						style="width: 200px; margin-left: -170px"
					></el-input>
				</el-form-item>
				<el-form-item label="上级组织:" style="margin-left: -19px">
					<el-input
						v-model="organizationForm.lead"
						size="mini"
						style="width: 200px; margin-left: -170px"
					></el-input>
				</el-form-item>
				<el-form-item
					label="组织名称:"
					prop="fileIp"
					style="margin-left: -19px"
				>
					<el-input
						v-model="organizationForm.organizationName"
						placeholder="请输入组织名称"
						size="mini"
						style="width: 200px; margin-left: -170px"
					></el-input>
				</el-form-item>
				<!-- <el-form-item
					label="上级组织:"
					prop="fileIp"
					style="margin-left: -19px"
				>
					<el-select
						placeholder="请选择上级组织"
						style="width: 200px; margin-left: -170px"
						size="mini"
					>
						<el-option label="部门1" value="0"></el-option>
						<el-option label="部门2" value="1"></el-option>
						<el-option label="生态单位1" value="2"></el-option>
					</el-select>
				</el-form-item> -->
				<el-form-item
					label="组织类型:"
					prop="fileType"
					style="margin-left: -19px"
				>
					<el-select
						style="width: 200px; margin-left: -170px"
						v-model="value1"
						@change="select"
					>
						<el-option
							v-for="item in options1"
							:key="item.value"
							:label="item.label"
							:value="item.value"
						>
						</el-option>
					</el-select>
				</el-form-item>
			</el-form>
			<el-divider></el-divider>
			<div class="dialogClose">
				<el-button @click="closeOrganizationTreeDialog">取消</el-button>
				<el-button type="primary" @click="addOrganization">确定</el-button>
			</div>
		</el-dialog>
		<el-dialog
			width="580px"
			:visible.sync="visible"
			:close-on-click-modal="false"
			@close="closeOrganizationTreeDialog"
		>
			<div class="addOrganizationDialog">
				<span>新增组织</span>
			</div>
			<el-divider class="dialog_divider"></el-divider>
			<el-form
				:model="organizationForm"
				ref="addFileBackupTaskForm"
				label-width="100px"
				style="height: auto"
			>
				<el-form-item
					label="组织名称:"
					prop="fileIp"
					style="margin-left: -19px"
				>
					<el-input
						v-model="organizationForm.organizationName"
						placeholder="请输入组织名称"
						size="mini"
						style="width: 200px; margin-left: -170px"
					></el-input>
				</el-form-item>

				<el-form-item
					label="组织类型:"
					prop="fileType"
					style="margin-left: -19px"
				>
					<el-select
						style="width: 200px; margin-left: -170px"
						v-model="value1"
						@change="select"
					>
						<el-option
							v-for="item in options1"
							:key="item.value"
							:label="item.label"
							:value="item.value"
						>
						</el-option>
					</el-select>
				</el-form-item>
			</el-form>
			<el-divider></el-divider>
			<div class="dialogClose">
				<el-button @click="closeOrganizationTreeDialog">取消</el-button>
				<el-button type="primary" @click="addOrganization1">确定</el-button>
			</div>
		</el-dialog>
		<!--    组织修改模块-->
		<el-dialog
			width="580px"
			:visible.sync="editOrganizationDialogVisible"
			:close-on-click-modal="false"
			@close="closeEditOrganizationDialog"
		>
			<div class="addOrganizationDialog">
				<span>修改组织</span>
			</div>
			<el-divider class="dialog_divider"></el-divider>
			<el-form
				:model="organizationForm"
				ref="addFileBackupTaskForm"
				label-width="100px"
				style="height: auto"
			>
				<el-form-item label="组织名称" prop="fileIp" style="margin-left: -19px">
					<el-input
						v-model="organizationForm.organizationName"
						placeholder="请输入组织名称"
						size="mini"
						style="width: 200px; margin-left: -170px"
					></el-input>
				</el-form-item>
				<el-form-item
					label="组织类型"
					prop="fileType"
					style="margin-left: -19px"
				>
					<el-select
						v-model="value"
						style="width: 200px; margin-left: -170px"
						:placeholder="placeholder"
						@change="change"
					>
						<el-option
							v-for="item in options"
							:key="item.value"
							:label="item.label"
							:value="item.value"
						>
						</el-option>
					</el-select>
				</el-form-item>
			</el-form>
			<el-divider></el-divider>
			<div class="dialogClose">
				<el-button @click="closeEditOrganizationDialog">取消</el-button>
				<el-button type="primary" @click="editOrganization">确定</el-button>
			</div>
		</el-dialog>
	</div>
</template>

<script>
import {
	getOrganizeList,
	restartOrganize,
	forbiddenOrganize,
	editOrganize,
	addOrganize,
	changeOrganize,
	oneClickEnable,
} from '@/api/index'
let id = 1000

export default {
	name: 'OrganizeMaintain',
	data() {
		return {
			value: '',
			see: true,
			placeholder: '请选择',
			add: true,
			options: [
				{ value: 0, label: '集团' },
				{ value: 1, label: '子集团' },
				{ value: 2, label: '公司' },
				{ value: 3, label: '部门' },
				{ value: 4, label: '生态单位' },
			],
			options1: [
				{ value: 0, label: '集团' },
				{ value: 1, label: '子集团' },
				{ value: 2, label: '公司' },
				{ value: 3, label: '部门' },
				{ value: 4, label: '生态单位' },
			],
			organizationTreeData: [],
			sectionList: [
				{
					id: 1,
					name: '部门1',
				},
				{
					id: 2,
					name: '部门2',
				},
				{
					id: 3,
					name: '部门3',
				},
				{
					id: 4,
					name: '生态单位',
				},
			],
			userList: [
				{
					id: 1,
					username: 'zzn',
				},
			],
			sectionUserList: [
				{
					id: 1,
					name: '用户1',
				},
				{
					id: 2,
					name: '用户2',
				},
				{
					id: 3,
					name: '用户3',
				},
			],
			addOrganizationDialogVisible: false,
			organizationForm: {
				organizationName: '',
				id: '',
				lead: '',
			},
			addTopOrganizationDialogVisible: false,
			// 节点的data
			organizationDialogData: '',
			editOrganizationDialogVisible: false,
			listTitle: '',
			data: [],
			type: 'text',
			node: '',
			organizeType: '',
			value1: '',
			addOrganizeType: '',
			draggedNode: null,
			visible: false,
			filterType: 'all',
		}
	},
	mounted() {
		this.getOrganizationList()

		getOrganizeList({ viewType: 2 })
	},
	methods: {
		async radioChange(value) {
			if (value == 'on') {
				this.add = false
				const res = await getOrganizeList({ viewType: 0 })
				this.organizationTreeData = [res.data.data[0]]
			} else if (value == 'off') {
				this.add = false
				const res = await getOrganizeList({ viewType: 1 })
				this.organizationTreeData = []
				this.organizationTreeData = [].concat(...res.data.data)
				console.log(this.organizationTreeData)
			} else {
				const res = await getOrganizeList({ viewType: 2 })
				this.organizationTreeData = [res.data.data[0]]
			}
		},
		getOrganizationList(data, node) {
			this.data = data
			this.node = node
			// this.listTitle = data.label
			// }
		},

		showOrganizationDialog() {
			setTimeout(() => {
				this.organizationForm.id = this.node.data.id
				this.organizationForm.lead = this.node.data.label
			})

			// this.organizationForm.id = this.node.parent.data.id
			// this.organizationForm.lead = this.node.parent.data.label

			this.addOrganizationDialogVisible = true
		},
		closeOrganizationTreeDialog() {
			this.addOrganizationDialogVisible = false
			this.visible = false
			this.organizationForm.organizationName = ''
			this.organizationForm.id = ''
			this.organizationForm.lead = ''
			this.value = ''
			this.value1 = ''
		},

		showEditOrganizationDialog() {
			this.editOrganizationDialogVisible = true
			setTimeout(() => {
				this.organizationForm.organizationName = this.data.label
				if (this.data.organizeType == 0) {
					this.placeholder = '集团'
				} else if (this.data.organizeType == 1) {
					this.placeholder = '子集团'
				} else if (this.data.organizeType == 2) {
					this.placeholder = '公司'
				} else if (this.data.organizeType == 3) {
					this.placeholder = '部门'
				} else if (this.data.organizeType == 4) {
					this.placeholder = '生态单位'
				}
			}, 0)
		},
		showDialog() {
			this.visible = true
		},
		closeEditOrganizationDialog() {
			this.editOrganizationDialogVisible = false
			this.organizationForm.organizationName = ''
		},
		// 新增组织
		async addOrganization() {
			const organizeName = this.organizationForm.organizationName
			const parentOrganize = this.organizationForm.id
			let organizeType = this.addOrganizeType
			if (organizeType == '集团') {
				organizeType = 0
			} else if (organizeType == '子集团') {
				organizeType = 1
			} else if (organizeType == '公司') {
				organizeType = 2
			} else if (organizeType == '部门') {
				organizeType = 3
			} else if (organizeType == '生态单位') {
				organizeType = 4
			}
			addOrganize({
				organizeName,
				parentOrganize,
				organizeType,
			}).then((res) => {
				if (res.data.status == 200) {
					this.$message({
						message: res.data.message,
						type: 'success',
					})
				} else {
					this.$message({
						message: res.data.message,
						type: 'error',
					})
				}
				const newChild = {
					id: id++,
					label: this.organizationForm.organizationName,
					children: [],
				}

				this.data.children.push(newChild)
				getOrganizeList({ viewType: 2 }).then(
					(res) => (this.organizationTreeData = [res.data.data[0]])
				)

				this.organizationForm.organizationName = ''
				this.value1 = ''
				this.value = ''
				this.organizationForm.id = ''
				this.organizationForm.lead = ''
				this.organizeType = ''
				this.addOrganizationDialogVisible = false
			})
		},
		async addOrganization1() {
			const organizeName = this.organizationForm.organizationName
			const parentOrganize = this.organizationForm.id
			let organizeType = this.addOrganizeType
			if (organizeType == '集团') {
				organizeType = 0
			} else if (organizeType == '子集团') {
				organizeType = 1
			} else if (organizeType == '公司') {
				organizeType = 2
			} else if (organizeType == '部门') {
				organizeType = 3
			} else if (organizeType == '生态单位') {
				organizeType = 4
			}
			const res = await addOrganize({
				organizeName,
				parentOrganize,
				organizeType,
			})
			const newChild = {
				id: id++,
				label: this.organizationForm.organizationName,
				children: [],
			}
			this.data = []
			this.data.push(newChild)
			const res1 = await getOrganizeList({ viewType: 2 })
			this.organizationTreeData = [res1.data.data[0]]
			this.visible = false
			// this.organizationForm.organizationName = ''
			// this.value = ''
			// this.organizationForm.id = ''
			// this.organizationForm.lead = ''
		},
		// 组织修改
		async editOrganization() {
			this.editOrganizationDialogVisible = false
			const id = this.data.id
			const organizeName = this.organizationForm.organizationName
			const organizeType = this.organizeType
			this.data.label = this.organizationForm.organizationName
			editOrganize({ id, organizeName, organizeType }).then((res) => {
				if (res.data.status === 200) {
					this.$message({
						message: res.data.message,
						type: 'success',
					})
				} else {
					this.$message({
						message: res.data.message,
						type: 'error',
					})
				}
			})
			const res1 = await getOrganizeList({ viewType: 2 })
			this.organizationTreeData = [res1.data.data[0]]
		},
		// 组织停用启用
		async statusChange(node) {
			setTimeout(() => {
				const organizeId = this.node.data.id
				const organizeName = this.node.data.organizeName
				console.log(node.data.organizeStatus)
				if (this.node.data.organizeStatus == 0) {
					restartOrganize({ organizeId, organizeName }).then((res) => {
						if (res.data.status == 200) {
							this.$message({
								message: res.data.message,
								type: 'success',
							})
						} else {
							this.$message({
								message: res.data.message,
								type: 'error',
							})
						}
						getOrganizeList({ viewType: 2 }).then((res) => {
							console.log(res.data.data[0])
							this.organizationTreeData = [res.data.data[0]]
						})
					})
				} else {
					forbiddenOrganize({ organizeId, organizeName }).then((res) => {
						if (res.data.status == 200) {
							this.$message({
								message: res.data.message,
								type: 'success',
							})
						} else {
							this.$message({
								message: res.data.message,
								type: 'error',
							})
						}
						getOrganizeList({ viewType: 2 }).then((res) => {
							this.organizationTreeData = [res.data.data[0]]
						})
					})
				}
			}, 0)
		},
		getSwitchValue(node) {
			// Convert numeric value to boolean
			return node.data.organizeStatus
		},
		oneClickEnables() {
			oneClickEnable().then((res) => {
				if (res.data.status == 200) {
					this.$message({
						message: res.data.message,
						type: 'success',
					})
					getOrganizeList({ viewType: 2 }).then((res) => {
						console.log(res.data.data[0])
						this.organizationTreeData = [res.data.data[0]]
					})
				} else {
					this.$message({
						message: res.data.message,
						type: 'error',
					})
				}
			})
		},
		// 获取修改组织类型
		change() {
			const selectedLabel = this.options.find(
				(item) => item.value === this.value
			)?.value

			this.organizeType = selectedLabel
		},
		// 获取新增组织类型
		select() {
			const selectedLabel = this.options1.find(
				(item) => item.value === this.value1
			)?.label

			this.addOrganizeType = selectedLabel
		},
		// 拖拽节点事件
		handleDragStart(draggingNode) {
			// 在拖拽开始时检查节点位置
			// 如果拖拽的节点是顶层节点并且已经有一个顶层节点存在,禁止拖拽
			if (draggingNode.level === 1 && this.hasTopLevelNode()) {
				this.draggable = false
			} else {
				this.draggable = true
			}
		},

		// 检查是否已经有一个顶层节点
		hasTopLevelNode() {
			return this.organizationTreeData.some((node) => node.level === 1)
		},
		handleDragEnd() {
			this.draggable = true
		},

		// 允许拖拽的条件
		allowDrop(draggingNode, dropNode, type) {
			// 如果拖拽的节点是顶层节点,不允许放置

			if (draggingNode.level === 1) {
				return false
			}

			// 如果拖拽的节点不是顶层节点但目标节点是顶层节点的同级,不允许放置
			if (draggingNode.level > 1 && dropNode.level === 1) {
				return false
			}

			// 其他情况允许放置
			return true
		},
		allowDrag(draggingNode, dropNode, type) {
			// 如果拖拽的节点是顶层节点,不允许放置
			// if (draggingNode.level === 1) {
			// 	return false
			// }
			// 如果拖拽的节点不是顶层节点但目标节点是顶层节点的同级,不允许放置
			// if (draggingNode.level > 1 && dropNode.level === 1) {
			// 	return false
			// }
			// 其他情况允许放置
			// return true
		},
		handleNodeDrop(draggingNode, dropNode, type) {
			// 在这里可以获取拖拽后节点的父节点
			const parentNode = dropNode.parent

			const currentOrganize = draggingNode.data.id
			const targetOrganize = dropNode.data.id
			changeOrganize({ currentOrganize, targetOrganize })
		},
	},
	watch: {
		// 监听拖拽后节点的变化
		draggedNode(newNode) {
			if (newNode) {
				// 这里可以访问拖拽后节点的父节点
				const parentNode = newNode.parent
			}
		},
	},
	computed: {
		filteredOrganizationTreeData() {
			// Filter out nodes with organizeStatus !== 0 (禁用)
			return this.organizationTreeData.filter((node) => {
				return node.data.organizeStatus === 0
			})
		},
	},
	async created() {
		const res = await getOrganizeList({ viewType: 2 })
		this.organizationTreeData = [res.data.data[0]]
		console.log([res.data.data[0]])
	},
}
</script>

<style scoped lang="scss">
.edit {
	width: 5vw;
}
.custom-tree-node {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	/*font-size: 15px;*/
	padding-right: 8px;
}

.selectFile {
	line-height: 19px;
}

.tree-card {
	overflow-y: auto; /* 开启滚动显示溢出内容 */
	width: 90%;
	height: 80vh;
	margin-left: 4vw;
	overflow-x: auto;
}

/*滚动条样式*/
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-thumb {
	background-color: #40b8ff;
	border-radius: 3px;
}

.el-tree-node__label {
	font-size: 50px;
}

.list-card {
	overflow-y: auto; /* 开启滚动显示溢出内容 */
	width: 98%;
	height: 80vh;
}

/* 查询*/
.select-organization {
	margin-top: -33px;
	display: flex;
	justify-content: right;
	line-height: 30px;
}

.findButton,
.reset {
	margin-top: 58px;
	height: 40px;
	width: 8%;
}

.selectEvent {
	margin-right: 30px;
	margin-top: 58px;
}

.list-span {
	font-family: 微软雅黑;
	font-size: 20px;
	height: 100px;
	font-weight: bold;
	color: #525252;
	display: flex;
	line-height: 100px;
}

::v-deep .el-collapse-item__header {
	font-size: 17px;
	font-weight: bold;
}

.addOrganizationDialog {
	font-size: 20px;
	text-align: left;
	margin-top: -105px;
}

.dialog_divider {
	margin-top: -50px;
}

.dialogClose {
	text-align: right;
	margin-top: -75px;
	margin-bottom: -80px;
}

.span_title {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	color: #222222;
	font-size: 17px;
	font-weight: bold;
}

/*解决table展开时高度异常问题*/
::v-deep .el-table__header {
	width: 100% !important;
}

::v-deep .el-table__body {
	width: 100% !important;
}
</style>

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

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

相关文章

windows通过命令给文件夹或文件增加权限

给Demo001追加everyone权限 D:\cmd>cacls Demo001 /p everyone:f /e 处理的目录: D:\cmd\Demo001D:\cmd> 给Demo001下的所有文件追加everyone权限 D:\cmd>cacls Demo001 /p everyone:f /e /t 处理的目录: D:\cmd\Demo001 处理的目录: D:\cmd\Demo001\A 处理的文件:…

Linux基础知识——(2)vim编辑器

目录 1 vi和vim简介2 vim三种模式3 vim命令模式3.1 光标移动3.2 复制操作3.3 剪切/删除3.4 撤销/恢复3.5 光标的快速移动 4 模式间的切换5 命令行模式5 编辑模式6 其他6.1 vim的配置文件6.2 异常退出6.3 退出方式“:x”6.4 vi编辑模式下Backspace无法退格删除6.5 修改只读【rea…

采集淘宝天猫整店商品api(店铺列表、店铺所有商品)

返回数据&#xff1a;请求链接 {"items": {"shop_id": "336945718","page": "1","real_total_results": "75","total_results": "75","page_size": 10,"page_coun…

深度学习人脸表情识别算法 - opencv python 机器视觉 计算机竞赛

文章目录 0 前言1 技术介绍1.1 技术概括1.2 目前表情识别实现技术 2 实现效果3 深度学习表情识别实现过程3.1 网络架构3.2 数据3.3 实现流程3.4 部分实现代码 4 最后 0 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 深度学习人脸表情识别系…

C++ DAY03 类与对象

概述 对象&#xff1a;真实存在的事物 类&#xff1a; 多个对象抽取其共同点形成的概念 静态特征提取出的概念称为成员变量, 又名属性 动态特征提取出的概念称为成员函数, 又名方法 类与对象的关系 在代码中先有类后有对象 一个类可以有多个对象 多个对象可以属于同一个…

.NET6使用MiniExcel根据数据源横向导出头部标题及数据

.NET6MiniExcel根据数据源横向导出头部标题 MiniExcel简单、高效避免OOM的.NET处理Excel查、写、填充数据工具。 特点: 低内存耗用&#xff0c;避免OOM、频繁 Full GC 情况 支持即时操作每行数据 兼具搭配 LINQ 延迟查询特性&#xff0c;能办到低消耗、快速分页等复杂查询 轻量…

深入Ansible

1.什么是ansible ansible是新出现的自动化运维工具&#xff0c;基于Python开发&#xff0c;集合了众多运维工具&#xff08;puppet、chef、func、fabric&#xff09;的优点&#xff0c;实现了批量系统配置、批量程序部署、批量运行命令等功能。 ansible是基于 paramiko 开发的…

JavaScript 字符处理

1.删除前几个字符 使用 slice console.log(12345.slice(1))// 23452.首字母大写 var word abcconsole.log(word.charAt(0).toUpperCase() word.slice(1))// Abc3.字符为数字时可直接相乘 console.log(2*3) 4.字符串中是否包含某个子字符串 子串既可以为数字也可为字符串 /…

不必购买Mac,这款国产设计工具能轻松替代Sketch!

介绍 即时设计是新一代可以直接在浏览器中使用的设计工具&#xff0c;具有Sketch和实时协作功能。与本地Sketch相比&#xff0c;增加了实时协作功能&#xff0c;即时设计可以看作是在线Sketch&#xff0c;两个工具可以简单粗暴地总结为一个公式&#xff1a; 即时设计Sketch云…

4.9每日一题(多元抽象复合函数求二阶偏导)

注意&#xff1a;f1的一阶导数里面也有&#xff08;x,y&#xff09;&#xff0c;即存在F11、F12、F22、F21

IDEA中更换java项目JDK

我们打开IDEA 打开项目 然后选择 File 下的 Project Structure 这里 我们下拉选择自己需要的JDK Sources这里 也要设置一下JDK对应版本 然后 上面这个 Project 中 也要设置一下对应jdk的版本 保持一直 然后 我们打开 File 下的 Settings 然后 找到如下图配置 如果JKD版本看…

第94步 深度学习图像分割:DeepLabv3建模

基于WIN10的64位系统演示 一、写在前面 本期&#xff0c;我们继续学习深度学习图像分割系列的最后一个模型&#xff0c;DeepLabv3。 二、DeepLabv3简介 DeepLabv3 是 DeepLab 系列中的第三个版本&#xff0c;以其高准确性和能够在多个尺度上识别物体轮廓而著称。 以下是 De…

CRM按行业细分的重要性

很多企业和销售会诟病CRM系统不够贴合行业、功能也不够细分和实用。因为各行各业的业务千差万别&#xff0c;所以功能完备、使用满意度高的CRM一定是与不同行业业务场景高度匹配的&#xff0c;是深度行业化的。因此行业化是CRM发展的重要趋势之一&#xff0c;为什么CRM一定要走…

Linux环境搭建(tomcat,jdk,mysql下载)

是否具备环境&#xff08;前端node&#xff0c;后端环境jdk&#xff09;安装jdk,配置环境变量 JDK下载 - 编程宝库 (codebaoku.com) 进入opt目录 把下好的安装包拖到我们的工具中 把解压包解压 解压完成&#xff0c;可以删除解压包 复制解压文件的目录&#xff0c;配置环境变量…

深度学习人体语义分割在弹幕防遮挡上的实现 - python 计算机竞赛

文章目录 1 前言1 课题背景2 技术原理和方法2.1基本原理2.2 技术选型和方法 3 实例分割4 实现效果5 最后 1 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; 深度学习人体语义分割在弹幕防遮挡上的应用 该项目较为新颖&#xff0c;适合作为竞…

企业怎样申请SSL证书?

对于很多企业而言&#xff0c;使用SSL证书加密网站已经显得尤为重要&#xff0c;这不仅仅是关乎企业的网站安全&#xff0c;同时也关系着企业的形象以及用户的信赖。既然使用https协议已经众多企业认可&#xff0c;那么我们该如何给自己的网站申请以及安装SSL证书&#xff1f; …

4.7每日一题(复合函数求导+隐函数求导)

先对F(x , y , z)对x求偏导&#xff1b;再通过另一个方程求出Zx的值&#xff1b;代入F&#xff08;x&#xff0c;y&#xff0c;z&#xff09;中即可

代码随想录算法训练营第五十八天丨 单调栈01

739. 每日温度 思路 首先想到的当然是暴力解法&#xff0c;两层for循环&#xff0c;把至少需要等待的天数就搜出来了。时间复杂度是O(n^2) 那么接下来在来看看使用单调栈的解法。 什么时候用单调栈呢&#xff1f; 通常是一维数组&#xff0c;要寻找任一个元素的右边或者左边…

easyExcel注解详情

前言11个注解字段注解 类注解基础综合示例补充颜色总结 11个注解 ExcelProperty ColumnWith 列宽 ContentFontStyle 文本字体样式 ContentLoopMerge 文本合并 ContentRowHeight 文本行高度 ContentStyle 文本样式 HeadFontStyle 标题字体样式 HeadRowHeight 标题高度 HeadStyle…

servlet乱码问题

问题&#xff1a;中文乱码 解决&#xff1a;加框的部分