ToB企服应用市场:ToB评测及商务社交产业平台

标题: 基于SpringBoot+Vue的通例应急物资管理系统 [打印本页]

作者: 老婆出轨    时间: 2024-8-17 06:48
标题: 基于SpringBoot+Vue的通例应急物资管理系统
@TOC
springboot156基于SpringBoot+Vue的通例应急物资管理系统

第一章 绪论**

1.1研究配景

近年来,第三产业发展非常迅速,诸如盘算机服务、旅游、娱乐、体育等服务行业,对整个社会的经济建设起到了极大地促进作用,这一点是毋庸置疑的。现下,国家也出台了一系列的政策来支持和鼓励第三服务产业的发展与美满,用以带动社会经济的发展[1]。所以,整体来说,国家是比力提倡发展第三方服务行业的。纵观盘算机领域的整个发展历程,从盘算机的诞生到如今,已经有几百年的汗青了,盘算机应用技术也逐步趋于成熟,并且相干的设计人员也在不断地对其进行改进和美满。再到如今,盘算机已经发展成为一个比力热门的行业了。在高校中,盘算机、人工智能等专业热度非常高,许多门生在选择专业的时间,大都优先考虑盘算机专业。在社会上,盘算机类行业也成为了比力受接待的行业,从在欣赏器中访问的网址,得手机上的各种应用步伐,再到大型的软件服务装备,基本上都离不开盘算机技术支持,以及硬件的支撑。
如今,互联网险些遍布于世界的各个角落,人工智能、大数据占据越来越紧张的地位,好比疫情期间,通过大数据技术进行筛查,确定哪些人员无接触史,哪些人员必要重点观察,由此可以在极短的时间内,以最快的速度对疫情进行防控。在这个大配景环境的推动下,本人通过学习Java语言、MySQL数据库、SSM框架等相干的盘算机技术,打好坚实的技术基础,方便后期对系统进行研发。而后再通过对系统进行分析,确定系统的总体功能需求,以及实现的大概性,方便接下来详细地设计相干的功能模块,最后乐成的研发了一款基于SpringBoot+Vue的通例应急物资管理系统。本系统改善了传统的管理模式,将原先的手工记录和管理信息,改进为使用盘算机存储和管理信息记录,极大地方便了工作人员对相干数据进行处理,为相干行业节省了不少的员工费用和管理开销,并且能够在较短的时间内相应用户的需求,这种便捷的操作,对于用户来说可以节省不少时间和精神,也省去了不少的麻烦,极大地方便了用户。
1.2研究意义

传统的信息管理模式,重要是以人力为主进行管理和控制,由工作人员负责登记用户信息,再通过对照之前的信息记录,确定是否给用户提供相干的使用需求,以及如何提供能让用户满意的使用需求。这种管理模式已经适应不了时代的变化了,正在不断地走下坡路,并且逐步被信息化管理模式所代替。所谓的信息化管理模式,是如今主流的一种管理模式,其通过与盘算机技术相联合的方式,对行业的整个工作模式和服务流程进行改进和美满。其重要通过使用盘算机等装备,将工作服务流程电子化,并且进行存储记录,用以进步行业整体的服务水平。联合盘算机技术,本人研发出一款基于SpringBoot+Vue的通例应急物资管理系统,采用电子化的方式对数据信息进行存储,便于工作人员对相干信息进行记录和管理,有利于进步相干行业的工作运营服从以及工作人员的管理速度,以此更好的满足用户的相干需求,终极达到提拔用户的使用感受的目标,由此可见设计和实现本系统具有紧张的意义和价值。
1.3国内外研究现状

1.3.1国外研究现状

美国是最先发展盘算机技术的众多国家之一,早在上个世纪,美国的盘算机技术就快速地发展起来,并且运用在军事、医院、学校、社会服务等场所。日本、德国等国家紧随厥后,不断地发展和美满盘算机技术,偏重将医疗、社会服务等领域与盘算机技术相联合[2]。而后随着社会的发展与进步,盘算机技术渐渐趋于成熟。许多发达国家在探索将盘算机技术应用于各行各业中时,从另一个角度来看,也在不断地推进相干行业的信息化管理历程,使得相干行业管理也变得更加网络化、信息化。有许多专家表示,可以联合使用图像处理软件、人工智能技术等相干工具,深度地分析通例应急物资管理系统,重要从简化运行操作,加设功能模块,美化系统界面,保障数据安全等方面,更深层次地提拔和优化系统,并且尽大概地在理想状态下做到及时的信息共享。
1.3.2国内研究现状

国内的盘算机技术的发展虽然晚于国外,尤其是美国、英国、德国等发达国家。但是我国的盘算机技术发展势头非常迅猛,近些年,也渐渐走向成熟和美满的阶段。如今,选择网上购物已经成为人们一样平常生活的一种常态趋势,固然这也离不开对于天猫、付出宝、微信等应用软件的使用[3]。许多企业联合使用了云盘算、人工智能等先进的盘算机技术,自主研发了行业相干的信息管理系统,盘算机技术渐渐趋于成熟,使用设计的功能渐渐趋于完备。联合盘算机技术,采用主流的B/S开辟结构模式开辟一款基于SpringBoot+Vue的通例应急物资管理系统。由此,本系统能够支持工作人员随时随地的通过使用欣赏器进行访问操作,支持随时随地对相干的通例应急物资信息进行管理,便于及时为用户提供一定的功能服务。并且所设计的系统基本上能够符合用户的客观使用需求,有利于充分协调相干行业的人力、财力、物力等资源,不断进步相干工作人员的管理质量和水平[4]。
1.4研究内容与方法

1.4.1研究内容

本文起首介绍了通例应急物资管理系统的研究配景与意义,其次介绍了系统的总体功能设计,接着将对系统规划好的总体功能拆分成了各个功能子模块,然后详细地对每一个小的功能子模块进行设计,最后介绍了展示设计好的功能模块以及测试结果。系统重要分为管理员脚色和用户脚色,具体的功能设计包括注册登录管理、用户信息管理、物资信息管理、物资运输管理等模块。注册登录管理功能是新用户在使用系统前,必要通过注册步骤,登记详细的信息资料,而后再通过输入正确的账号和暗码,乐成登录系统后,即可通过一系列的操作来满足自己的相干需求。用户信息管理功能是管理相干的用户信息资料,管理人员根据实际环境的必要,选择性的对用户信息记录进行更新处理。物资信息管理是管理相干的物资信息记录,保存详情的物资信息环境,方便及时相应用户的服务哀求。物资运输管理是管理相干的物资运输信息记录,方便相干人员及时查看物资运输信息,如果遇到异常的物资运输信息,可以及时对其进行处理,在较短的时间内解决题目,进步用户的使用体验。
1.4.2研究方法

本系统以B/S架构进行实现,通过使用idea工具编写相干的java代码,设计系统功能模块,再通过MySQL数据库管控数据资源,由此有利于对系统相干数据进行必要的管理和控制。系统设计的最关键的环节,则是必要通过SSM框架设计系统功能架构,再通过Tomcat服务器将系统发布到欣赏器上,以便相干用户的操作和使用。本系统的设计和实现促进了相干行业的信息化建设,有利于简化相干人员工作流程,进步工作服从,提拔工作幸福感。
1.5论文的构造结构

基于SpringBoot+Vue的通例应急物资管理系统的设计与实现的论文构造结构,大抵可以分为七个章节,具体的内容如下:
第一章为绪论,本章重要介绍了系统的配景、现状、方法等内容。根据研究配景与意义,介绍所要设计的系统的研究配景和理论依据,再通过国内外研究现状,相识当前相干的系统软件产物的实际研究环境,最后通过研究内容与方法,总体概括系统的整个开辟流程和实现步骤,为系统提供可靠的理论依据和技术支持。
第二章为相干技术介绍,本章重要介绍了开辟所使用的相干技术。本系统重要使用的开辟技术包括Java语言、SSM框架、MySQL数据库等,并且所使用的开辟模式为B/S架构。其中,Java语言具有跨平台性,可移植性高,可以支持在不同的欣赏器上运行本系统,MySQL数据库占用内存少,执行速度快,对于中小型系统的数据管理黑白常好的选择。
第三章为系统分析,系统分析阶段重要是对系统进行需求和可行性分析,规划系统的功能设计,判断系统实现的大概性。根据需求分析,确认使用者对系统的基本功能需求,再通过在经济、操作、法律上进行可行性分析,分析系统研发的实际意义和使用价值,系统性能的稳固性和功能操作的便捷性,以及乐成投入市场的大概性。
第四章为系统设计,本章重要介绍了系统的总体功能设计、数据库设计等内容。通过介绍系统的总体功能设计,规划设计出系统实际必要设计的功能模块,便于相干的技术人员后期设计系统的功能模块做好准备工作。再通过介绍数据库设计,便于设计出数据库能够存放和管控的数据表,有利于相干的设计人员管理必要的数据资源,维护和更新数据信息的安全。
第五章为系统实现,系统实现阶段重要是对物资信息管理、物资运输管理等功能模块进行论述。通过前面介绍的系统分析,功能及数据库设计等相干内容,详细地实现系统功能模块。这一过程就是系统的具体实现阶段,站在系统的整体设计角度出发,对系统的实现进行必要分析可知,这一阶段是极为紧张,直接关系到用户对系统的使用感受。
第六章为系统测试,本章重要是对测试相干的内容进行叙述。本系统重要使用功能测试的方法,查抄测验系统重要功能,测试所设计的系统功能可否正常使用,并且用户能够正常操作和使用,在系统运行过程中是否发生异常,如运行异常、数据异常、结果异常等,并且根据测试结果,给出相应的测试总结,由此得出相干结论,说明系统是否达到预期要求、设计目标。
第二章 开辟技术介绍

2.1 B/S架构

就软件开辟的现状而言,目前重要使用的系统开辟结构模式大抵可以分为C/S模式和B/S模式[5]。用户在使用基于C/S模式开辟的系统时,必须下载相应的客户端,即应用步伐,才能操作和使用软件系统的相干功能模块。从使用者的角度来看,由于下载和安装客户端的步骤比力繁琐,期间还必要确保下载网速的稳固性,以及安装步骤的正确性,进而增加了用户放弃使用该系统的大概性,由此可见C/S模式具有很大的局限性。
由于C/S模式适用于小范围的局域网,并且具有较好的通信服从,所以在从前系统规模很小的时代,重要使用C/S模式开辟系统。随着时代的发展以及社会的进步,C/S模式也越来越满足不了开辟者的设计必要,以及使用者的使用需求。当下,C/S模式已经满足不了实际的系统步伐设计要求,由此,B/S模式以C/S模式为基础而被提出,并且在近些年渐渐发展成为主流的开辟结构模式。在B/S模式下开辟的系统,不再必要用户下载和安装相应的应用步伐,直接通过使用欣赏器,输入正确的网站所在,以访问网站的形式实现系统的相干功能操作。这一特点对C/S模式下的开辟设计做出了极大的改进,固然,使用本系统的前提是确保账号和暗码是合法的。
2.2 Java语言

Java语言是一种将数据和操作方法封装成对象整体的步伐设计语言,它拥有着良好的技术体系结构。目前在市场上,很大一部分的应用系统重要使用Java语言进行开辟[6]。Java语言具有简朴易懂,操作方便,结实性强等长处,开辟人员能够在短时间内理解和掌握Java语言,并将其运用到具体的系统开辟过程中。针对于系统内存管理题目,Java语言为解决这类题目,内部提供了垃圾接纳机制。为了极大地简化了开辟编程的难易水平,Java语言还将C语言中的指针,改进成了引用,所以受到了很多开辟人员的喜爱。Java语言还具有跨平台性的特点,意味着它的可移植性非常高,这一特点有利于开辟人员更新和维护相干代码,由它所开辟的系统可以支持在不同的欣赏器中打开。因为使用Java开辟的系统兼容性较强,代码通用性较高,为了后期方便对系统进行美满和维护,所以本人终极选择使用Java语言开辟本系统。
2.3 SSM框架

SSM框架重要由Spring、SpringMVC、MyBatis这三个框架所集成的,是如今比力流行的一种Java开辟框架,能够适用于大中型的应用步伐的设计和搭建。Spring是前几十年前鼓起的一种轻量级的、开源的Java开辟框架,使用它可以解决相干的系统对象创建和对象依赖题目,并且也可以将高耦合的系统分解为低耦合的多个功能模块,方便对系统模块进行明确的分工,对功能代码进行理解和修改,这就极大地减轻了设计人员的开辟压力[7]。SpringMVC框架是基于Spring框架而被提出的,它以MVC三层架构为焦点,对Spring的相干技术进行了整合,重要针对于Web端进行技术架构,通过对相干哀求消息进行细化处理,对相干的用户哀求做出一定的相应处理。MyBatis框架是一种开源的Java持久层框架,它重要是通过改进手动设置参数和获取结果记录的方式,通过支持对数据库进行存储过程、高级映射等处理,使得数据库的操作更加定制化、透明化,因此降低了数据库访问的复杂性,进步了开辟的工作服从。
2.4 vue框架

vue框架是一种用于构建相干的用户使用界面的渐进式框架,由此便可以控制某个系统页面的标签,大概控制整个页面的不同标签,又大概控制整个前端项目标不同标签[8]。使用vue框架编写的代码,不再必要手动更新相干的控件的变量值,当与其绑定的变量值发生改变时,相干的组件会自动地进行更新。vue框架重要通过自底向上的方式对系统的用户界面进行设计和创建,而且vue框架只关注图层内容,如此一来,其不仅能够为各种支持的类库的比力复杂繁琐的单页提供相应的驱动,还能够整合第三方库大概相干的项目。因为vue框架的语法界说简朴,比力容易学习和掌握,所以相干的开辟技术人员大多选择使用vue框架编写相干的前端页面显示代码,创建相应的系统网站页面。这样的页面设计便于用户查询相干的数据信息,理解系统的操作和使用。
2.5 MySQL数据库

MySQL数据库是一种使用频繁的关系型数据库。因为其具有开源免费、占用内存少、安装简朴、操作便捷、使用灵活等长处,所以经常被运用于中小型的系统开辟中[9]。MySQL数据库可以支持多线程,在同一个时间内,能够同时相应多个用户的使用需求。MySQL数据库还自带了优化器,方便设计人员在 使用过程中,快速的查询相干的数据信息。除此之外,SQLServer数据库在当下也是使用比力频繁的,它在数据安全、系统稳固等方面照旧比力不错的,但是由于其收费使用、占用内存大、操作复杂、维护成本高, 一样平常适用于中型及以上的系统开辟中。MySQL数据库也有着许多的应用步伐接口,以供相干的编程语言使用,编写的代码具有极高的通用性和可维护性,并且MySQL数据库能够迅速的处理上千条数据记录,在系统发生故障时,能通过日志文件快速恢复。MySQL数据库与SQLServer数据库相比力,综合考虑成本开销、占用内存大小、代码通用、数据维护、操作难易水平等方面,MySQL数据库占据很大的上风,在数据库设计人员的眼中,MySQL数据库的实际运用价值极高。
第三章 系统分析

3.1系统的需求分析

需求分析阶段是设计系统功能模块的总方向,可以这样来说,系统的整个的开辟流程以及设计进度,基本上都是以需求分析为基本依据的[10]。需求分析阶段可以确定系统的基本功能设计,以及在最后的系统验收阶段,再通过对需求分析陈诉进行对比,验证系统的功能设计是否合理,可否满足用户的基本必要,终极判断总结系统是否乐成实际。本文重要通干涉卷调查的方式,来分析通例应急物资管理系统所必要的相干功能[11]。根据调查结果显示,系统用户重要有两种范例,一种是以使用为重要目标的用户脚色范例,另一种是以管理为重要目标的管理员脚色范例。本系统重要功能需求包括物资信息管理、物资运输管理等模块。其中,暗码信息、用户信息、物资信息、物资运输信息等都黑白常紧张的数据记录,在系统设计的过程中,必要进行一定的加密处理,确保数据安全性,切实的保护好用户的紧张信息。
3.2系统的可行性分析

3.2.1经济可行性

对系统进行经济可行性分析,也可以被称为对系统进行经济可行性研究,它是从社会的经济发展出发,通过研究整个的系统可行性,对成本收益环境进行全面地、具体地分析,并且根据所分析的可行性陈诉,为相干的投资者提供最科学的决策理论和最优的投资方案。本系统的开辟促进了相干行业的信息化管理,管理人员可以直接通过在欣赏器上发布通例应急物资管理系统的网站所在,用户即可根据一定的必要,有选择的对系统相干功能进行操作。这种方式突破了时间和空间的限制,可以使得相干行业在较短的时间内最大化地管理通例应急物资的相干信息。并且本系统所使用的开辟技术和相干工具,大部分是开源的、免费的,所以可以节省很大一笔开辟成本。综合上述内容分析可知,本系统的实如今经济层面上是具备可行性的。
3.2.2技术可行性

本系统是基于Java语言而进行开辟的,因为Java语言简朴易学、稳固性强、代码利用率高等特点,所以许多的开辟技术人员均喜欢使用Java语言进行系统设计。现今很多步伐系统的研究和开辟,是通过使用Java语言进行编码设计的。此外,Java语言还具有跨平台的长处,这意味着所设计的系统是与平台无关的,也就说明由Java语言开辟的系统可以支持在不同的欣赏器上运行和使用。在条件大抵雷同的环境下,对比其他数据库,本系统使用的是MySQL数据库的相干语法简朴易懂,数据库设计人员可以尽大概快的对其掌握和使用。MySQL数据库还具有占用系统内存少、功能齐备、相应速度快、使用不收费等特点,能够在极短时间内处理上千条信息记录,所以能够保证系统可以高效地运行和工作。综合上述内容分析可知,系统的实如今技术层面上是具备可行性的。
3.2.3操作可行性

如今,人们的一样平常生活已经离不开互联网的使用,在一定水平上,相干行业的信息化建设促进着社会的发展。人们通过使用手机上的应用步伐,好比,通过使用电子商务系统,可以实现网上购物、在线付出等功能;通过使用国家官方网站,可以查看最新消息,申报个人业务;通过使用医院管理系统,可以进行网上预约挂号,在线查看体检陈诉等操作。在这些应用的配景下,本系统使用的是B/S开辟结构模式,网站界面以人性化的设计为主,具有美观友爱、交互性好等长处,用户不必要掌握一定的编程技术,直接通过对系统进行简朴的功能操作,即可满足自己的使用需求。本系统还设计了一些提示信息,便于用户更好的理解系统相干功能,较快的以正确的操作方式来使用系统。综合上述内容分析可知,系统的实如今操作层面上是具备可行性的。
第四章 系统设计

4.1系统的总体功能设计

系统的总体功能设计阶段,是通过联合系统分析阶段的相干内容,对系统的整体功能设计进行规划的过程。系统的总体功能设计是系统详细功能设计的一个大方向,也就是说系统的各类子功能模块的设计,都是以总体功能设计为目标而进行的。通过对系统进行需求分析可知,可以大抵相识系统具体所必要的相干的重要功能模块。本系统重要的功能需求包括物资信息管理、物资运输管理等模块。管理员功能设计图如图4-1所示,用户功能设计图如图4-2所示。

图4-1管理员功能设计图

图4-2用户功能设计图
4.2数据库设计

4.2.1概念设计

本系统使用轻量级的MySQL数据库,对系统相干的数据信息进行管理和维护[12]。数据库设计阶段一样平常可以被分为概念设计和逻辑设计这两个阶段。概念设计阶段是对系统进行数据库设计的紧张基础,将实际世界中用户的相干需求抽象化为虚拟世界中的概念模子,为后续的逻辑设计做好准备工作。本人通过设计E-R图,详细的对系统中的实体以及实体之间的联系进行了表达。各实体信息的实体属性图如图4-3、图4-4、图4-5、图4-6、图4-7、图4-8、图4-9、图4-10所示,系统总体E-R图如图4-11所示。

图4-3管理员信息实体属性图

图4-4用户信息实体属性图

图4-5字典信息实体属性图

图4-6部分信息实体属性图

图4-7物资信息实体属性图

图4-8物资申请信息实体属性图

图4-9 物资运输信息实体属性图

图4-10健康打卡信息实体属性图

图4-11系统总体E-R图
4.2.2逻辑设计

逻辑设计阶段重要的工作是将概念设计中的E-R图,转换成方便系统进行存储和管理的二维表格形式。这一阶段也可以被称为数据库的详细设计,其直接关系到系统功能模块的正常运行、数据信息的正常更新等[13]。在设计过程中,必要充分考虑数据库的规范性和合理性,使得能够满足系统的功能和性能需求。本系统相干的数据表格设计内容如下所示。
表4-1 管理员信息表
序号列名数据范例说明答应空1idInt编号否2usernameString用户名是3passwordString暗码是4roleString脚色是5addtimeDate新增时间是 表4-2 用户信息表
序号列名数据范例说明答应空1IdIntid否2usernameString账户是3passwordString暗码是4bumen_idInteger部分是5yonghu_nameString用户姓名是6yonghu_phoneString用户手机号是7yonghu_id_numberString用户身份证号是8yonghu_photoString用户头像是9sex_typesInteger性别是10yonghu_emailString电子邮箱是11create_timeDate创建时间是 表4-3 字典信息表
序号列名数据范例说明答应空1idInt编号否2dic_codeString字段是3dic_nameString字段名是4code_indexInteger编码是5index_nameString编码名字是6super_idInteger父字段编号是7beizhuString备注是8create_timeDate创建时间是 表4-4 部分信息表
序号列名数据范例说明答应空1IdIntid否2bumen_nameString部分名称是3bumen_zhizeString部分职责是4bumen_numberInteger部分人数是5bumen_contentString部分介绍是6insert_timeDate添加时间是7create_timeDate创建时间是 表4-5 物资信息表
序号列名数据范例说明答应空1IdIntid否2wuzi_nameString物资名称是3wuzi_photoString物资照片是4wuzi_typesInteger物资范例是5wuzi_kucun_numberInteger物资库存是6wuzi_danweiString单位是7wuzi_deleteInteger逻辑删除是8wuzi_contentString物资介绍是9create_timeDate创建时间是 表4-6 物资申请信息表
序号列名数据范例说明答应空1IdIntid否2yonghu_idInteger用户是3wuzi_idInteger物资是4wuzishenqing_numberInteger申请数目是5wuzishenqing_contentString申请详情是6insert_timeDate申请时间是7wuzishenqing_yesno_typesInteger审核是8wuzishenqing_yesno_textString审核意见是9create_timeDate创建时间是 表4-7 物资运输信息表
序号列名数据范例说明答应空1IdIntid否2wuzi_idInteger物资是3wuziyunshu_uuid_numberString运输唯一编号是4wuziyunshu_quxiangString去向是5wuziyunshu_numberInteger运输数目是6wuziyunshu_contentString运输详情是7wuziyunshu_typesInteger当前状态是8insert_timeDate添加时间是9update_timeDate最后更新时间是10create_timeDate创建时间是 表4-8 健康打卡信息表
序号列名数据范例说明答应空1IdIntid否2yonghu_idInteger用户是3daka_contentString打卡备注是4insert_timedate打卡日期是5create_timeDate创建时间是 第五章 系统实现

5.1管理员脚色功能设计

5.1.1管理员首页

通过设计的首页功能模块,管理用户可以乐成登录系统,并且选择点击相干的功能模块按钮,操作和实现自己所必要的功能,管理员首页解饿设计如图5-1所示。

图5-1管理员首页界面
本功能模块的焦点代码如下:
/**
* 登录
*/
@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
UsersEntity user = usersService.selectOne(new EntityWrapper     ().eq("username", username));  
if(user==null || !user.getPassword().equals(password)) {
return R.error("账号或暗码不正确");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
R r = R.ok();
r.put("token", token);
r.put("role",user.getRole());
r.put("userId",user.getId());
return r;
}
/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper     ew = new EntityWrapper       ();     
PageUtils page = usersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}
5.1.2个人中心

通过设计的个人中心功能模块,管理用户可以选择修改账号暗码,查看个人资料信息,通过不定期的对个人账户暗码进行更新,保障个人信息安全,修改暗码界面设计如图5-1所示,个人信息界面设计如图5-2所示。

图5-1修改暗码界面

图5-2个人信息界面
本功能模块的焦点代码如下:
/**
* 暗码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = usersService.selectOne(new EntityWrapper     ().eq("username", username));  
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
usersService.update(user,null);
return R.ok("暗码已重置为:123456");
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
5.1.3健康打卡管理

通过设计的健康打卡管理功能模块,管理用户可以管理相干的健康打卡信息记录,好比进行查看健康打卡的详细信息,修改健康打卡的日期信息,删除已经失效的健康打卡信息记录等操作,健康打卡管理界面设计如图5-3所示。

图5-3健康打卡管理界面
本功能模块的焦点代码如下:
/**
* 健康打卡后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody DakaEntity daka, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,daka:{}",this.getClass().getName(),daka.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("用户".equals(role))
// daka.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
//根据字段查询是否有雷同数据
Wrapper     queryWrapper = new EntityWrapper       ()     
.notIn("id",daka.getId())
.andNew()
.eq("yonghu_id", daka.getYonghuId())
.eq("insert_time", new SimpleDateFormat("yyyy-MM-dd").format(daka.getInsertTime()))
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
DakaEntity dakaEntity = dakaService.selectOne(queryWrapper);
if(dakaEntity==null){
dakaService.updateById(daka);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有雷同数据");
}
}
5.1.4基础数据管理

通过设计的基础数据管理功能模块,管理用户可以管理相干的物资范例信息记录,好比进行查看物资范例的详细信息,修改物资范例的名称信息,删除已经失效的物资范例信息记录等操作,物资范例管理界面设计如图5-4所示。

图5-4物资范例管理界面
本功能模块的焦点代码如下:
/**
* 基础数据后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有雷同数据
Wrapper     queryWrapper = new EntityWrapper       ()     
.notIn("id",dictionary.getId())
.eq("dic_code", dictionary.getDicCode())
.eq("index_name", dictionary.getIndexName())
;
if(dictionary.getDicCode().contains("_erji_types")){
queryWrapper.eq("super_id",dictionary.getSuperId());
}
logger.info("sql语句:"+queryWrapper.getSqlSegment());
DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);
if(dictionaryEntity==null){
dictionaryService.updateById(dictionary);//根据id更新
//如果字典表修改数据的话,把数据再重新查出,放入监听器中
List     dictionaryEntities = dictionaryService.selectList(new EntityWrapper       ());     
ServletContext servletContext = request.getServletContext();
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode());
if(m ==null || m.isEmpty()){
m = new HashMap<>();
}
m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(),m);
}
servletContext.setAttribute("dictionaryMap",map);
return R.ok();
}else {
return R.error(511,"表中有雷同数据");
}
}
5.1.5物资管理

通过设计的物资管理功能模块,管理用户可以管理相干的物资信息记录,好比进行查看物资的详细信息,修改物资的库存信息,删除已经失效的物资信息记录等操作,物资管理界面设计如图5-5所示。

图5-5物资管理界面
本功能模块的焦点代码如下:
/**
* 物资后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody WuziEntity wuzi, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,wuzi:{}",this.getClass().getName(),wuzi.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有雷同数据
Wrapper     queryWrapper = new EntityWrapper       ()     
.notIn("id",wuzi.getId())
.andNew()
.eq("wuzi_name", wuzi.getWuziName())
.eq("wuzi_types", wuzi.getWuziTypes())
.eq("wuzi_kucun_number", wuzi.getWuziKucunNumber())
.eq("wuzi_danwei", wuzi.getWuziDanwei())
.eq("wuzi_delete", wuzi.getWuziDelete())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
WuziEntity wuziEntity = wuziService.selectOne(queryWrapper);
if("".equals(wuzi.getWuziPhoto()) || "null".equals(wuzi.getWuziPhoto())){
wuzi.setWuziPhoto(null);
}
if(wuziEntity==null){
wuziService.updateById(wuzi);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有雷同数据");
}
}
5.1.6物资申请管理

通过设计的物资申请管理功能模块,管理用户可以管理相干的物资申请信息记录,好比进行查看物资申请的详细信息,修改物资的申请时间信息,删除已经失效的物资申请信息记录等操作,物资申请管理界面设计如图5-6所示。

图5-6物资申请管理界面
本功能模块的焦点代码如下:
/**
* 物资申请后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody WuzishenqingEntity wuzishenqing, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,wuzishenqing:{}",this.getClass().getName(),wuzishenqing.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("用户".equals(role))
wuzishenqing.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
wuzishenqing.setInsertTime(new Date());
wuzishenqing.setWuzishenqingYesnoTypes(1);
wuzishenqing.setCreateTime(new Date());
wuzishenqingService.insert(wuzishenqing);
return R.ok();
}
/**
* 物资申请后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody WuzishenqingEntity wuzishenqing, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,wuzishenqing:{}",this.getClass().getName(),wuzishenqing.toString());
wuzishenqingService.updateById(wuzishenqing);//根据id更新
return R.ok();
}
5.1.7物资运输管理

通过设计的物资运输管理功能模块,管理用户可以管理相干的物资运输信息记录,好比进行查看物资运输的详细信息,修改物资运输的当前状态信息,删除已经失效的物资运输信息记录等操作,物资运输管理界面设计如图5-7所示。

图5-7物资运输管理界面
本功能模块的焦点代码如下:
/**
* 物资运输后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody WuziyunshuEntity wuziyunshu, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,wuziyunshu:{}",this.getClass().getName(),wuziyunshu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
wuziyunshu.setUpdateTime(new Date());
wuziyunshu.setInsertTime(new Date());
wuziyunshu.setCreateTime(new Date());
wuziyunshuService.insert(wuziyunshu);
return R.ok();
}
/**
* 物资运输后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody WuziyunshuEntity wuziyunshu, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,wuziyunshu:{}",this.getClass().getName(),wuziyunshu.toString());
wuziyunshu.setUpdateTime(new Date());
wuziyunshuService.updateById(wuziyunshu);//根据id更新
return R.ok();
}
5.1.8用户管理

通过设计的用户管理功能模块,管理用户可以管理相干的用户信息资料,好比进行查看用户的详细资料,修改用户的联系方式,删除已经注销的用户信息记录等操作,用户管理界面设计如图5-8所示。

图5-8用户管理界面
本功能模块的焦点代码如下:
/**
* 用户后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有雷同数据
Wrapper     queryWrapper = new EntityWrapper       ()     
.notIn("id",yonghu.getId())
.andNew()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.or()
.eq("yonghu_id_number", yonghu.getYonghuIdNumber())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if("".equals(yonghu.getYonghuPhoto()) || "null".equals(yonghu.getYonghuPhoto())){
yonghu.setYonghuPhoto(null);
}
if(yonghuEntity==null){
yonghuService.updateById(yonghu);//根据id更新
return R.ok();
}else {
return R.error(511,"账户大概用户手机号大概用户身份证号已经被使用");
}
}
5.1.9部分管理

通过设计的部分管理功能模块,管理用户可以管理相干的部分信息记录,好比进行查看部分的详细信息,修改部分的职责信息,删除已经失效的部分信息记录等操作,部分管理界面设计如图5-9所示。

图5-9部分管理界面
本功能模块的焦点代码如下:
/**
* 部分后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody BumenEntity bumen, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,bumen:{}",this.getClass().getName(),bumen.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有雷同数据
Wrapper     queryWrapper = new EntityWrapper       ()     
.notIn("id",bumen.getId())
.andNew()
.eq("bumen_name", bumen.getBumenName())
.eq("bumen_zhize", bumen.getBumenZhize())
.eq("bumen_number", bumen.getBumenNumber())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
BumenEntity bumenEntity = bumenService.selectOne(queryWrapper);
if(bumenEntity==null){
bumenService.updateById(bumen);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有雷同数据");
}
}
5.2用户功能设计

5.2.1用户首页

通过设计的首页功能模块,管理用户可以乐成登录系统,并且选择点击相干的功能模块按钮,操作和实现自己所必要的功能,管理员首页解饿设计如图5-10所示。

图5-10用户首页界面
本功能模块的焦点代码如下:
/**
* 首页后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper     queryWrapper = new EntityWrapper       ()     
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.or()
.eq("yonghu_id_number", yonghu.getYonghuIdNumber())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if(yonghuEntity==null){
yonghu.setCreateTime(new Date());
yonghu.setPassword("123456");
yonghuService.insert(yonghu);
return R.ok();
}else {
return R.error(511,"账户大概用户手机号大概用户身份证号已经被使用");
}
}
5.2.2个人中心

通过设计的个人中心管理功能模块,用户可以选择查看个人资料信息,选择更新个人相干的资料信息记录;也可以选择修改账号暗码,通过不定期的对个人账户暗码进行更新,保障个人信息安全,修改暗码界面设计如图5-11所示,个人信息界面设计如图5-12所示。

图5-11修改暗码界面

图5-12个人信息界面
本功能模块的焦点代码如下:
//查询是否重复
//账户
List     yonghuEntities_username = yonghuService.selectList(new EntityWrapper       ().in("username", seachFields.get("username")));     
if(yonghuEntities_username.size() >0 ){
ArrayList     repeatFields = new ArrayList<>();  
for(YonghuEntity s:yonghuEntities_username){
repeatFields.add(s.getUsername());
}
return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());
}
//用户手机号
List     yonghuEntities_yonghuPhone = yonghuService.selectList(new EntityWrapper       ().in("yonghu_phone", seachFields.get("yonghuPhone")));     
if(yonghuEntities_yonghuPhone.size() >0 ){
ArrayList     repeatFields = new ArrayList<>();  
for(YonghuEntity s:yonghuEntities_yonghuPhone){
repeatFields.add(s.getYonghuPhone());
}
return R.error(511,"数据库的该表中的 [用户手机号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
//用户身份证号
List     yonghuEntities_yonghuIdNumber = yonghuService.selectList(new EntityWrapper       ().in("yonghu_id_number", seachFields.get("yonghuIdNumber")));     
if(yonghuEntities_yonghuIdNumber.size() >0 ){
ArrayList     repeatFields = new ArrayList<>();  
for(YonghuEntity s:yonghuEntities_yonghuIdNumber){
repeatFields.add(s.getYonghuIdNumber());
}
return R.error(511,"数据库的该表中的 [用户身份证号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
yonghuService.insertBatch(yonghuList);
return R.ok();
}
5.2.3健康打卡管理

通过设计的健康打卡管理功能模块,用户可以管理相干的健康打卡信息记录,好比进行查看健康打卡的详细信息,修改健康打卡的日期信息,删除已经失效的健康打卡信息记录等操作,健康打卡管理界面设计如图5-13所示。

图5-13健康打卡管理界面
本功能模块的焦点代码如下:
/**
* 健康打卡后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
DakaEntity daka = dakaService.selectById(id);
if(daka !=null){
//entity转view
DakaView view = new DakaView();
BeanUtils.copyProperties( daka , view );//把实体数据重构到view中
//级联表
YonghuEntity yonghu = yonghuService.selectById(daka.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
5.2.4物资管理

通过设计的物资管理功能模块,管理用户可以查看相干的物资信息记录,可以查到物资名称、物资图片、物资范例、物资库存等详细信息,物资管理界面设计如图5-14所示。

图5-14物资管理界面
本功能模块的焦点代码如下:
/**
* 物资后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
WuziEntity wuzi = wuziService.selectById(id);
if(wuzi !=null){
//entity转view
WuziView view = new WuziView();
BeanUtils.copyProperties( wuzi , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
5.2.5物资申请管理

通过设计的物资申请管理功能模块,用户可以管理相干的物资申请信息记录,好比进行查看物资申请的详细信息,新增相干的物资申请信息记录,物资申请管理界面设计如图5-15所示。

图5-15物资申请管理界面
本功能模块的焦点代码如下:
/**
* 物资申请后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
WuzishenqingEntity wuzishenqing = wuzishenqingService.selectById(id);
if(wuzishenqing !=null){
//entity转view
WuzishenqingView view = new WuzishenqingView();
BeanUtils.copyProperties( wuzishenqing , view );//把实体数据重构到view中
//级联表
WuziEntity wuzi = wuziService.selectById(wuzishenqing.getWuziId());
if(wuzi != null){
BeanUtils.copyProperties( wuzi , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setWuziId(wuzi.getId());
}
//级联表
YonghuEntity yonghu = yonghuService.selectById(wuzishenqing.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
5.2.6物资运输管理

通过设计的物资运输管理功能模块,用户可以查看相干的物资运输信息记录,好比查到物资名称、物资图片、单位、运输数目、当前状态等详细信息,物资运输管理界面设计如图5-16所示。

图5-16物资运输管理界面
本功能模块的焦点代码如下:
/**
* 物资运输后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
WuziyunshuEntity wuziyunshu = wuziyunshuService.selectById(id);
if(wuziyunshu !=null){
//entity转view
WuziyunshuView view = new WuziyunshuView();
BeanUtils.copyProperties( wuziyunshu , view );//把实体数据重构到view中
//级联表
WuziEntity wuzi = wuziService.selectById(wuziyunshu.getWuziId());
if(wuzi != null){
BeanUtils.copyProperties( wuzi , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setWuziId(wuzi.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}


MybatisPlusConfig.java

  1. package com.config;
  2. import org.springframework.context.annotation.Bean;
  3. import org.springframework.context.annotation.Configuration;
  4. import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
  5. import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
  6. /**
  7. * mybatis-plus配置
  8. */
  9. @Configuration
  10. public class MybatisPlusConfig {
  11.     /**
  12.      * 分页插件
  13.      */
  14.     @Bean
  15.     public PaginationInterceptor paginationInterceptor() {
  16.         return new PaginationInterceptor();
  17.     }
  18.    
  19. }
复制代码
DictionaryServiceImpl.java

  1. package com.service.impl;
  2. import com.utils.StringUtil;
  3. import org.springframework.stereotype.Service;
  4. import java.lang.reflect.Field;
  5. import java.util.*;
  6. import com.baomidou.mybatisplus.plugins.Page;
  7. import com.baomidou.mybatisplus.service.impl.ServiceImpl;
  8. import org.springframework.transaction.annotation.Transactional;
  9. import com.utils.PageUtils;
  10. import com.utils.Query;
  11. import org.springframework.web.context.ContextLoader;
  12. import javax.servlet.ServletContext;
  13. import javax.servlet.http.HttpServletRequest;
  14. import com.dao.DictionaryDao;
  15. import com.entity.DictionaryEntity;
  16. import com.service.DictionaryService;
  17. import com.entity.view.DictionaryView;
  18. /**
  19. * 字典 服务实现类
  20. */
  21. @Service("dictionaryService")
  22. @Transactional
  23. public class DictionaryServiceImpl extends ServiceImpl<DictionaryDao, DictionaryEntity> implements DictionaryService {
  24.     @Override
  25.     public PageUtils queryPage(Map<String,Object> params) {
  26.         if(params != null && (params.get("limit") == null || params.get("page") == null)){
  27.             params.put("page","1");
  28.             params.put("limit","10");
  29.         }
  30.         Page<DictionaryView> page =new Query<DictionaryView>(params).getPage();
  31.         page.setRecords(baseMapper.selectListView(page,params));
  32.         return new PageUtils(page);
  33.     }
  34.      /**
  35.      * 赋值给字典表
  36.      * @param obj view对象
  37.      */
  38.     public void dictionaryConvert(Object obj, HttpServletRequest request) {
  39.         try {
  40.             if (obj == null) return;
  41.             //当前view和entity中的所有types的字段
  42.             List<String> fieldNameList = new ArrayList<>();
  43.             Class tempClass = obj.getClass();
  44.             while (tempClass !=null) {
  45.                 Field[] declaredFields = tempClass.getDeclaredFields();
  46.                 for (Field f : declaredFields) {
  47.                     f.setAccessible(true);
  48.                     if (f.getType().getName().equals("java.lang.Integer") && f.getName().contains("Types")) {
  49.                         fieldNameList.add(f.getName());
  50.                     }
  51.                 }
  52.                 tempClass = tempClass.getSuperclass(); //得到父类,然后赋给自己
  53.             }
  54.             // 获取监听器中的字典表
  55. //            ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
  56.             ServletContext servletContext = request.getServletContext();
  57.             Map<String, Map<Integer, String>> dictionaryMap= (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
  58.             //通过Types的值给Value字段赋值
  59.             for (String s : fieldNameList) {
  60.                 Field types = null;
  61.                 if(hasField(obj.getClass(),s)){
  62.                     //判断view中有没有这个字段,有就通过反射取出字段
  63.                     types= obj.getClass().getDeclaredField(s);//获取Types私有字段
  64.                 }else{
  65.                     //本表中没有这个字段,说明它是父表中的字段,也就是entity中的字段,从entity中取值
  66.                     types=obj.getClass().getSuperclass().getDeclaredField(s);
  67.                 }
  68.                 Field value = obj.getClass().getDeclaredField(s.replace("Types", "Value"));//获取value私有字段
  69.                 //设置权限
  70.                 types.setAccessible(true);
  71.                 value.setAccessible(true);
  72.                 //赋值
  73.                 if (StringUtil.isNotEmpty(String.valueOf(types.get(obj)))) { //types的值不为空
  74.                     int i = Integer.parseInt(String.valueOf(types.get(obj)));//type
  75.                     //把s1字符中的所有大写转小写,并在前面加 _
  76.                     char[] chars = s.toCharArray();
  77.                     StringBuffer sbf = new StringBuffer();
  78.                     for(int  b=0; b< chars.length; b++){
  79.                         char ch = chars[b];
  80.                         if(ch <= 90 && ch >= 65){
  81.                             sbf.append("_");
  82.                             ch += 32;
  83.                         }
  84.                         sbf.append(ch);
  85.                     }
  86.                     String s2 = dictionaryMap.get(sbf.toString()).get(i);
  87.                     value.set(obj, s2);
  88.                 } else {
  89.                     new Exception("字典表赋值出现问题::::"+value.getName());
  90.                     value.set(obj, "");
  91.                 }
  92.             }
  93.         } catch (IllegalAccessException e) {
  94.             e.printStackTrace();
  95.         } catch (NoSuchFieldException e) {
  96.             e.printStackTrace();
  97.         } catch (Exception e) {
  98.             e.printStackTrace();
  99.         }
  100.     }
  101.     /**
  102.      * 判断本实体有没有这个字段
  103.      * @param c
  104.      * @param fieldName
  105.      * @return
  106.      */
  107.     public boolean hasField(Class c, String fieldName){
  108.         Field[] fields = c.getDeclaredFields();
  109.         for (Field f : fields) {
  110.             if (fieldName.equals(f.getName())) {
  111.                 return true;
  112.             }
  113.         }
  114.         return false;
  115.     }
  116. }
复制代码
WuzishenqingController.java

  1. package com.controller;
  2. import java.io.File;
  3. import java.math.BigDecimal;
  4. import java.net.URL;
  5. import java.text.SimpleDateFormat;
  6. import com.alibaba.fastjson.JSONObject;
  7. import java.util.*;
  8. import org.springframework.beans.BeanUtils;
  9. import javax.servlet.http.HttpServletRequest;
  10. import org.springframework.web.context.ContextLoader;
  11. import javax.servlet.ServletContext;
  12. import com.service.TokenService;
  13. import com.utils.*;
  14. import java.lang.reflect.InvocationTargetException;
  15. import com.service.DictionaryService;
  16. import org.apache.commons.lang3.StringUtils;
  17. import com.annotation.IgnoreAuth;
  18. import org.slf4j.Logger;
  19. import org.slf4j.LoggerFactory;
  20. import org.springframework.beans.factory.annotation.Autowired;
  21. import org.springframework.stereotype.Controller;
  22. import org.springframework.web.bind.annotation.*;
  23. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  24. import com.baomidou.mybatisplus.mapper.Wrapper;
  25. import com.entity.*;
  26. import com.entity.view.*;
  27. import com.service.*;
  28. import com.utils.PageUtils;
  29. import com.utils.R;
  30. import com.alibaba.fastjson.*;
  31. /**
  32. * 物资申请
  33. * 后端接口
  34. * @author
  35. * @email
  36. */
  37. @RestController
  38. @Controller
  39. @RequestMapping("/wuzishenqing")
  40. public class WuzishenqingController {
  41.     private static final Logger logger = LoggerFactory.getLogger(WuzishenqingController.class);
  42.     @Autowired
  43.     private WuzishenqingService wuzishenqingService;
  44.     @Autowired
  45.     private TokenService tokenService;
  46.     @Autowired
  47.     private DictionaryService dictionaryService;
  48.     //级联表service
  49.     @Autowired
  50.     private WuziService wuziService;
  51.     @Autowired
  52.     private YonghuService yonghuService;
  53.     /**
  54.     * 后端列表
  55.     */
  56.     @RequestMapping("/page")
  57.     public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
  58.         logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
  59.         String role = String.valueOf(request.getSession().getAttribute("role"));
  60.         if(false)
  61.             return R.error(511,"永不会进入");
  62.         else if("用户".equals(role))
  63.             params.put("yonghuId",request.getSession().getAttribute("userId"));
  64.         if(params.get("orderBy")==null || params.get("orderBy")==""){
  65.             params.put("orderBy","id");
  66.         }
  67.         PageUtils page = wuzishenqingService.queryPage(params);
  68.         //字典表数据转换
  69.         List<WuzishenqingView> list =(List<WuzishenqingView>)page.getList();
  70.         for(WuzishenqingView c:list){
  71.             //修改对应字典表字段
  72.             dictionaryService.dictionaryConvert(c, request);
  73.         }
  74.         return R.ok().put("data", page);
  75.     }
  76.     /**
  77.     * 后端详情
  78.     */
  79.     @RequestMapping("/info/{id}")
  80.     public R info(@PathVariable("id") Long id, HttpServletRequest request){
  81.         logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
  82.         WuzishenqingEntity wuzishenqing = wuzishenqingService.selectById(id);
  83.         if(wuzishenqing !=null){
  84.             //entity转view
  85.             WuzishenqingView view = new WuzishenqingView();
  86.             BeanUtils.copyProperties( wuzishenqing , view );//把实体数据重构到view中
  87.                 //级联表
  88.                 WuziEntity wuzi = wuziService.selectById(wuzishenqing.getWuziId());
  89.                 if(wuzi != null){
  90.                     BeanUtils.copyProperties( wuzi , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
  91.                     view.setWuziId(wuzi.getId());
  92.                 }
  93.                 //级联表
  94.                 YonghuEntity yonghu = yonghuService.selectById(wuzishenqing.getYonghuId());
  95.                 if(yonghu != null){
  96.                     BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
  97.                     view.setYonghuId(yonghu.getId());
  98.                 }
  99.             //修改对应字典表字段
  100.             dictionaryService.dictionaryConvert(view, request);
  101.             return R.ok().put("data", view);
  102.         }else {
  103.             return R.error(511,"查不到数据");
  104.         }
  105.     }
  106.     /**
  107.     * 后端保存
  108.     */
  109.     @RequestMapping("/save")
  110.     public R save(@RequestBody WuzishenqingEntity wuzishenqing, HttpServletRequest request){
  111.         logger.debug("save方法:,,Controller:{},,wuzishenqing:{}",this.getClass().getName(),wuzishenqing.toString());
  112.         String role = String.valueOf(request.getSession().getAttribute("role"));
  113.         if(false)
  114.             return R.error(511,"永远不会进入");
  115.         else if("用户".equals(role))
  116.             wuzishenqing.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
  117.             wuzishenqing.setInsertTime(new Date());
  118.             wuzishenqing.setWuzishenqingYesnoTypes(1);
  119.             wuzishenqing.setCreateTime(new Date());
  120.             wuzishenqingService.insert(wuzishenqing);
  121.             return R.ok();
  122.     }
  123.     /**
  124.     * 后端修改
  125.     */
  126.     @RequestMapping("/update")
  127.     public R update(@RequestBody WuzishenqingEntity wuzishenqing, HttpServletRequest request){
  128.         logger.debug("update方法:,,Controller:{},,wuzishenqing:{}",this.getClass().getName(),wuzishenqing.toString());
  129.             wuzishenqingService.updateById(wuzishenqing);//根据id更新
  130.             return R.ok();
  131.     }
  132.     /**
  133.     * 删除
  134.     */
  135.     @RequestMapping("/delete")
  136.     public R delete(@RequestBody Integer[] ids){
  137.         logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
  138.         wuzishenqingService.deleteBatchIds(Arrays.asList(ids));
  139.         return R.ok();
  140.     }
  141.     /**
  142.      * 批量上传
  143.      */
  144.     @RequestMapping("/batchInsert")
  145.     public R save( String fileName){
  146.         logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
  147.         try {
  148.             List<WuzishenqingEntity> wuzishenqingList = new ArrayList<>();//上传的东西
  149.             Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
  150.             Date date = new Date();
  151.             int lastIndexOf = fileName.lastIndexOf(".");
  152.             if(lastIndexOf == -1){
  153.                 return R.error(511,"该文件没有后缀");
  154.             }else{
  155.                 String suffix = fileName.substring(lastIndexOf);
  156.                 if(!".xls".equals(suffix)){
  157.                     return R.error(511,"只支持后缀为xls的excel文件");
  158.                 }else{
  159.                     URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
  160.                     File file = new File(resource.getFile());
  161.                     if(!file.exists()){
  162.                         return R.error(511,"找不到上传文件,请联系管理员");
  163.                     }else{
  164.                         List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
  165.                         dataList.remove(0);//删除第一行,因为第一行是提示
  166.                         for(List<String> data:dataList){
  167.                             //循环
  168.                             WuzishenqingEntity wuzishenqingEntity = new WuzishenqingEntity();
  169. //                            wuzishenqingEntity.setYonghuId(Integer.valueOf(data.get(0)));   //用户 要改的
  170. //                            wuzishenqingEntity.setWuziId(Integer.valueOf(data.get(0)));   //物资 要改的
  171. //                            wuzishenqingEntity.setWuzishenqingNumber(Integer.valueOf(data.get(0)));   //申请数量 要改的
  172. //                            wuzishenqingEntity.setWuzishenqingContent("");//照片
  173. //                            wuzishenqingEntity.setInsertTime(date);//时间
  174. //                            wuzishenqingEntity.setWuzishenqingYesnoTypes(Integer.valueOf(data.get(0)));   //审核 要改的
  175. //                            wuzishenqingEntity.setWuzishenqingYesnoText(data.get(0));                    //审核意见 要改的
  176. //                            wuzishenqingEntity.setCreateTime(date);//时间
  177.                             wuzishenqingList.add(wuzishenqingEntity);
  178.                             //把要查询是否重复的字段放入map中
  179.                         }
  180.                         //查询是否重复
  181.                         wuzishenqingService.insertBatch(wuzishenqingList);
  182.                         return R.ok();
  183.                     }
  184.                 }
  185.             }
  186.         }catch (Exception e){
  187.             return R.error(511,"批量插入数据异常,请联系管理员");
  188.         }
  189.     }
  190. }
复制代码
add-or-update.vue

  1. <template>
  2.     <div class="addEdit-block">
  3.         <el-form
  4.                 class="detail-form-content"
  5.                 ref="ruleForm"
  6.                 :model="ruleForm"
  7.                 :rules="rules"
  8.                 label-width="80px"
  9.                 :style="{backgroundColor:addEditForm.addEditBoxColor}"
  10.         >
  11.             <el-row>
  12.                 <el-col :span="12">
  13.                     <el-form-item class="input" v-if="type!='info'"  label="申请状态编码" prop="codeIndex">
  14.                         <el-input v-model="ruleForm.codeIndex"
  15.                                   placeholder="申请状态编码" clearable  :readonly="ro.codeIndex"></el-input>
  16.                     </el-form-item>
  17.                     <div v-else>
  18.                         <el-form-item class="input" label="申请状态编码" prop="codeIndex">
  19.                             <el-input v-model="ruleForm.codeIndex"
  20.                                       placeholder="申请状态编码" readonly></el-input>
  21.                         </el-form-item>
  22.                     </div>
  23.                 </el-col>
  24.                 <el-col :span="12">
  25.                     <el-form-item class="input" v-if="type!='info'"  label="申请状态" prop="indexName">
  26.                         <el-input v-model="ruleForm.indexName"
  27.                                   placeholder="申请状态" clearable  :readonly="ro.indexName"></el-input>
  28.                     </el-form-item>
  29.                     <div v-else>
  30.                         <el-form-item class="input" label="申请状态" prop="indexName">
  31.                             <el-input v-model="ruleForm.indexName"
  32.                                       placeholder="申请状态" readonly></el-input>
  33.                         </el-form-item>
  34.                     </div>
  35.                 </el-col>
  36.             </el-row>
  37.             <el-form-item class="btn">
  38.                 <el-button v-if="type!='info'" type="primary" class="btn-success" @click="onSubmit">提交</el-button>
  39.                 <el-button v-if="type!='info'" class="btn-close" @click="back()">取消</el-button>
  40.                 <el-button v-if="type=='info'" class="btn-close" @click="back()">返回</el-button>
  41.             </el-form-item>
  42.         </el-form>
  43.     </div>
  44. </template>
  45. <script>
  46.     import styleJs from "../../../utils/style.js";
  47.     // 数字,邮件,手机,url,身份证校验
  48.     import { isNumber,isIntNumer,isEmail,isPhone, isMobile,isURL,checkIdCard } from "@/utils/validate";
  49.     export default {
  50.         data() {
  51.             let self = this
  52.             return {
  53.                 addEditForm:null,
  54.                 id: '',
  55.                 type: '',
  56.                 ro:{
  57.                     codeIndex : true,
  58.                     indexName : false,
  59.                     superId : false,
  60.                     beizhu : false,
  61.                 },
  62.                 ruleForm: {
  63.                     codeIndex: '',
  64.                     indexName: '',
  65.                     superId : '',
  66.                     beizhu : '',
  67.                 },
  68.                 rules: {
  69.                 }
  70.             };
  71.         },
  72.         props: ["parent"],
  73.         computed: {
  74.         },
  75.         created() {
  76.             this.addEditForm = styleJs.addStyle();
  77.             this.addEditStyleChange()
  78.             this.addEditUploadStyleChange()
  79.         },
  80.         methods: {
  81.             // 初始化
  82.             init(id,type) {
  83.                 if (id) {
  84.                     this.id = id;
  85.                     this.type = type;
  86.                 }
  87.                 if(this.type=='info'||this.type=='else'){
  88.                     this.info(id);
  89.                 }else{
  90.                     //查询最大值 start
  91.                     this.$http({
  92.                         url: `dictionary/maxCodeIndex`,
  93.                         method: "post",
  94.                         data: {"dicCode":"wuzishenqing_yesno_types"}
  95.                     }).then(({ data }) => {
  96.                         if (data && data.code === 0) {
  97.                             this.ruleForm.codeIndex = data.maxCodeIndex;
  98.                         } else {
  99.                             this.$message.error(data.msg);
  100.                         }
  101.                     });
  102.                     //查询最大值 end
  103.                 }
  104.             },
  105.             // 多级联动参数
  106.             info(id) {
  107.                 this.$http({
  108.                     url: `dictionary/info/${id}`,
  109.                     method: "get"
  110.                 }).then(({ data }) => {
  111.                     if (data && data.code === 0) {
  112.                     this.ruleForm = data.data;
  113.                     //解决前台上传图片后台不显示的问题
  114.                     let reg=new RegExp('../../../upload','g')//g代表全部
  115.                 } else {
  116.                     this.$message.error(data.msg);
  117.                 }
  118.             });
  119.             },
  120.             // 提交
  121.             onSubmit() {
  122.                 if((!this.ruleForm.indexName)){
  123.                     this.$message.error('申请状态不能为空');
  124.                     return
  125.                 }
  126.                 this.$refs["ruleForm"].validate(valid => {
  127.                     if (valid) {
  128.                         let ruleForm = this.ruleForm;
  129.                         ruleForm["dicCode"]="wuzishenqing_yesno_types";
  130.                         ruleForm["dicName"]="申请状态";
  131.                         this.$http({
  132.                             url: `dictionary/${!this.ruleForm.id ? "save" : "update"}`,
  133.                             method: "post",
  134.                             data: ruleForm
  135.                         }).then(({ data }) => {
  136.                             if (data && data.code === 0) {
  137.                                 this.$message({
  138.                                     message: "操作成功",
  139.                                     type: "success",
  140.                                     duration: 1500,
  141.                                     onClose: () => {
  142.                                         this.parent.showFlag = true;
  143.                                         this.parent.addOrUpdateFlag = false;
  144.                                         this.parent.dictionaryCrossAddOrUpdateFlag = false;
  145.                                         this.parent.search();
  146.                                         this.parent.contentStyleChange();
  147.                                     }
  148.                                 });
  149.                             } else {
  150.                                 this.$message.error(data.msg);
  151.                             }
  152.                         });
  153.                     }
  154.                 });
  155.             },
  156.             // 返回
  157.             back() {
  158.                 this.parent.showFlag = true;
  159.                 this.parent.addOrUpdateFlag = false;
  160.                 this.parent.dictionaryCrossAddOrUpdateFlag = false;
  161.                 this.parent.contentStyleChange();
  162.             },
  163.             addEditStyleChange() {
  164.                 this.$nextTick(()=>{
  165.                     // input
  166.                     document.querySelectorAll('.addEdit-block .input .el-input__inner').forEach(el=>{
  167.                     el.style.height = this.addEditForm.inputHeight
  168.                 el.style.color = this.addEditForm.inputFontColor
  169.                 el.style.fontSize = this.addEditForm.inputFontSize
  170.                 el.style.borderWidth = this.addEditForm.inputBorderWidth
  171.                 el.style.borderStyle = this.addEditForm.inputBorderStyle
  172.                 el.style.borderColor = this.addEditForm.inputBorderColor
  173.                 el.style.borderRadius = this.addEditForm.inputBorderRadius
  174.                 el.style.backgroundColor = this.addEditForm.inputBgColor
  175.             })
  176.                 document.querySelectorAll('.addEdit-block .input .el-form-item__label').forEach(el=>{
  177.                     el.style.lineHeight = this.addEditForm.inputHeight
  178.                 el.style.color = this.addEditForm.inputLableColor
  179.                 el.style.fontSize = this.addEditForm.inputLableFontSize
  180.             })
  181.                 // select
  182.                 document.querySelectorAll('.addEdit-block .select .el-input__inner').forEach(el=>{
  183.                     el.style.height = this.addEditForm.selectHeight
  184.                 el.style.color = this.addEditForm.selectFontColor
  185.                 el.style.fontSize = this.addEditForm.selectFontSize
  186.                 el.style.borderWidth = this.addEditForm.selectBorderWidth
  187.                 el.style.borderStyle = this.addEditForm.selectBorderStyle
  188.                 el.style.borderColor = this.addEditForm.selectBorderColor
  189.                 el.style.borderRadius = this.addEditForm.selectBorderRadius
  190.                 el.style.backgroundColor = this.addEditForm.selectBgColor
  191.             })
  192.                 document.querySelectorAll('.addEdit-block .select .el-form-item__label').forEach(el=>{
  193.                     el.style.lineHeight = this.addEditForm.selectHeight
  194.                 el.style.color = this.addEditForm.selectLableColor
  195.                 el.style.fontSize = this.addEditForm.selectLableFontSize
  196.             })
  197.                 document.querySelectorAll('.addEdit-block .select .el-select__caret').forEach(el=>{
  198.                     el.style.color = this.addEditForm.selectIconFontColor
  199.                 el.style.fontSize = this.addEditForm.selectIconFontSize
  200.             })
  201.                 // date
  202.                 document.querySelectorAll('.addEdit-block .date .el-input__inner').forEach(el=>{
  203.                     el.style.height = this.addEditForm.dateHeight
  204.                 el.style.color = this.addEditForm.dateFontColor
  205.                 el.style.fontSize = this.addEditForm.dateFontSize
  206.                 el.style.borderWidth = this.addEditForm.dateBorderWidth
  207.                 el.style.borderStyle = this.addEditForm.dateBorderStyle
  208.                 el.style.borderColor = this.addEditForm.dateBorderColor
  209.                 el.style.borderRadius = this.addEditForm.dateBorderRadius
  210.                 el.style.backgroundColor = this.addEditForm.dateBgColor
  211.             })
  212.                 document.querySelectorAll('.addEdit-block .date .el-form-item__label').forEach(el=>{
  213.                     el.style.lineHeight = this.addEditForm.dateHeight
  214.                 el.style.color = this.addEditForm.dateLableColor
  215.                 el.style.fontSize = this.addEditForm.dateLableFontSize
  216.             })
  217.                 document.querySelectorAll('.addEdit-block .date .el-input__icon').forEach(el=>{
  218.                     el.style.color = this.addEditForm.dateIconFontColor
  219.                 el.style.fontSize = this.addEditForm.dateIconFontSize
  220.                 el.style.lineHeight = this.addEditForm.dateHeight
  221.             })
  222.                 // upload
  223.                 let iconLineHeight = parseInt(this.addEditForm.uploadHeight) - parseInt(this.addEditForm.uploadBorderWidth) * 2 + 'px'
  224.                 document.querySelectorAll('.addEdit-block .upload .el-upload--picture-card').forEach(el=>{
  225.                     el.style.width = this.addEditForm.uploadHeight
  226.                 el.style.height = this.addEditForm.uploadHeight
  227.                 el.style.borderWidth = this.addEditForm.uploadBorderWidth
  228.                 el.style.borderStyle = this.addEditForm.uploadBorderStyle
  229.                 el.style.borderColor = this.addEditForm.uploadBorderColor
  230.                 el.style.borderRadius = this.addEditForm.uploadBorderRadius
  231.                 el.style.backgroundColor = this.addEditForm.uploadBgColor
  232.             })
  233.                 document.querySelectorAll('.addEdit-block .upload .el-form-item__label').forEach(el=>{
  234.                     el.style.lineHeight = this.addEditForm.uploadHeight
  235.                 el.style.color = this.addEditForm.uploadLableColor
  236.                 el.style.fontSize = this.addEditForm.uploadLableFontSize
  237.             })
  238.                 document.querySelectorAll('.addEdit-block .upload .el-icon-plus').forEach(el=>{
  239.                     el.style.color = this.addEditForm.uploadIconFontColor
  240.                 el.style.fontSize = this.addEditForm.uploadIconFontSize
  241.                 el.style.lineHeight = iconLineHeight
  242.                 el.style.display = 'block'
  243.             })
  244.                 // 多文本输入框
  245.                 document.querySelectorAll('.addEdit-block .textarea .el-textarea__inner').forEach(el=>{
  246.                     el.style.height = this.addEditForm.textareaHeight
  247.                 el.style.color = this.addEditForm.textareaFontColor
  248.                 el.style.fontSize = this.addEditForm.textareaFontSize
  249.                 el.style.borderWidth = this.addEditForm.textareaBorderWidth
  250.                 el.style.borderStyle = this.addEditForm.textareaBorderStyle
  251.                 el.style.borderColor = this.addEditForm.textareaBorderColor
  252.                 el.style.borderRadius = this.addEditForm.textareaBorderRadius
  253.                 el.style.backgroundColor = this.addEditForm.textareaBgColor
  254.             })
  255.                 document.querySelectorAll('.addEdit-block .textarea .el-form-item__label').forEach(el=>{
  256.                     // el.style.lineHeight = this.addEditForm.textareaHeight
  257.                     el.style.color = this.addEditForm.textareaLableColor
  258.                 el.style.fontSize = this.addEditForm.textareaLableFontSize
  259.             })
  260.                 // 保存
  261.                 document.querySelectorAll('.addEdit-block .btn .btn-success').forEach(el=>{
  262.                     el.style.width = this.addEditForm.btnSaveWidth
  263.                 el.style.height = this.addEditForm.btnSaveHeight
  264.                 el.style.color = this.addEditForm.btnSaveFontColor
  265.                 el.style.fontSize = this.addEditForm.btnSaveFontSize
  266.                 el.style.borderWidth = this.addEditForm.btnSaveBorderWidth
  267.                 el.style.borderStyle = this.addEditForm.btnSaveBorderStyle
  268.                 el.style.borderColor = this.addEditForm.btnSaveBorderColor
  269.                 el.style.borderRadius = this.addEditForm.btnSaveBorderRadius
  270.                 el.style.backgroundColor = this.addEditForm.btnSaveBgColor
  271.             })
  272.                 // 返回
  273.                 document.querySelectorAll('.addEdit-block .btn .btn-close').forEach(el=>{
  274.                     el.style.width = this.addEditForm.btnCancelWidth
  275.                 el.style.height = this.addEditForm.btnCancelHeight
  276.                 el.style.color = this.addEditForm.btnCancelFontColor
  277.                 el.style.fontSize = this.addEditForm.btnCancelFontSize
  278.                 el.style.borderWidth = this.addEditForm.btnCancelBorderWidth
  279.                 el.style.borderStyle = this.addEditForm.btnCancelBorderStyle
  280.                 el.style.borderColor = this.addEditForm.btnCancelBorderColor
  281.                 el.style.borderRadius = this.addEditForm.btnCancelBorderRadius
  282.                 el.style.backgroundColor = this.addEditForm.btnCancelBgColor
  283.             })
  284.             })
  285.             },
  286.             addEditUploadStyleChange() {
  287.                 this.$nextTick(()=>{
  288.                     document.querySelectorAll('.addEdit-block .upload .el-upload-list--picture-card .el-upload-list__item').forEach(el=>{
  289.                     el.style.width = this.addEditForm.uploadHeight
  290.                 el.style.height = this.addEditForm.uploadHeight
  291.                 el.style.borderWidth = this.addEditForm.uploadBorderWidth
  292.                 el.style.borderStyle = this.addEditForm.uploadBorderStyle
  293.                 el.style.borderColor = this.addEditForm.uploadBorderColor
  294.                 el.style.borderRadius = this.addEditForm.uploadBorderRadius
  295.                 el.style.backgroundColor = this.addEditForm.uploadBgColor
  296.             })
  297.             })
  298.             },
  299.         }
  300.     };
  301. </script>
  302. <style lang="scss">
  303. .editor{
  304.   height: 500px;
  305.   & /deep/ .ql-container {
  306.           height: 310px;
  307.   }
  308. }
  309. .amap-wrapper {
  310.   width: 100%;
  311.   height: 500px;
  312. }
  313. .search-box {
  314.   position: absolute;
  315. }
  316. .addEdit-block {
  317.         margin: -10px;
  318. }
  319. .detail-form-content {
  320.         padding: 12px;
  321. }
  322. .btn .el-button {
  323.   padding: 0;
  324. }</style>
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4