当前位置: 首页 > news >正文

亚马逊wordpress网站建设制作设计seo优化山东

亚马逊wordpress,网站建设制作设计seo优化山东,哪家公司做跳转网站,手机壁纸网站大全TOC ssm676基于VUE的儿童教育网站的设计与实现vue 第一章 课题背景及研究内容 1.1 课题背景 信息数据从传统到当代#xff0c;是一直在变革当中#xff0c;突如其来的互联网让传统的信息管理看到了革命性的曙光#xff0c;因为传统信息管理从时效性#xff0c;还是安全…TOC ssm676基于VUE的儿童教育网站的设计与实现vue 第一章 课题背景及研究内容 1.1 课题背景 信息数据从传统到当代是一直在变革当中突如其来的互联网让传统的信息管理看到了革命性的曙光因为传统信息管理从时效性还是安全性还是可操作性等各个方面来讲遇到了互联网时代才发现能补上自古以来的短板有效的提升管理的效率和业务水平。传统的管理模式时间越久管理的内容越多也需要更多的人来对数据进行整理并且数据的汇总查询方面效率也是极其的低下并且数据安全方面永远不会保证安全性能。结合数据内容管理的种种缺点在互联网时代都可以得到有效的补充。结合先进的互联网技术开发符合需求的软件让数据内容管理不管是从录入的及时性查看的及时性还是汇总分析的及时性都能让正确率达到最高管理更加的科学和便捷。本次开发的儿童教育网站实现了字典管理、名师管理、视频管理、视频收藏管理、视频留言管理、章节管理、章节收藏管理、文章管理、文章收藏管理、文章留言管理、文章目录管理、文章目录收藏管理、用户管理、管理员管理等功能。系统用到了关系型数据库中王者MySql作为系统的数据库有效的对数据进行安全的存储有效的备份对数据可靠性方面得到了保证。并且程序也具备程序需求的所有功能使得操作性还是安全性都大大提高让儿童教育网站更能从理念走到现实确确实实的让人们提升信息处理效率。 1.2 开发目的和意义 小康时代的到来使得人们满意度上升生活各个方面都产生了许多变化比如办公都有相应软件很多工作都要求员工会操作计算机可以说现在的时代基本被软件覆盖得差不多了软件行业的特征就是大家都在使用软件代替传统手工记载操作软件的出现让我们的生活还有工作又向前翻了新篇章。儿童教育网站是一个利用软件形式管理车辆租赁信息的平台。管理员管理租车信息也不再需要用纸张进行信息记录及查询管理操作所有的操作都是利用电脑进行办公用户需要使用密码还有用户名进行系统登录操作按照系统主页界面的各个功能展示进行相关操作无论添加或者是删除拟或是修改查询等操作时间上不需要太多短短几分钟就会搞定。况且软件是不限制办公地点以及办公时间的只要有操作需要随时随地登录系统就可以完成任务。办公效率提高这个不再是难题。文章租赁店对于租车信息的管理操作早就应该进行变革了利用软件管理租车信息节约人力物力成本这是一个新的租车信息管理的创举。 1.3 论文研究内容 本次开发的儿童教育网站的论文从下面几个部分进行编写 第一章本章介绍了程序开发背景和目的意义罗列出了论文写作内容信息让我们知道论文编写是如何进展的。 第二章本章主要讲解了系统开发用到的相关技术方面的知识比如SSM技术MySQL数据库知识等内容。帮助人们更好的理解系统技术上面的相关知识。 第三章文章第3章主要介绍了系统开发的可行性问题从经济时间操作等内容上面进行了大致介绍确定系统开发确实可行然后分析了系统的开发流程确定系统需要具备的大概的功能保障系统能够稳定使用和运行。 第四章这个章节主要绘制出了系统功能架构让我们更直观了解儿童教育网站的功能对后台数据库表进行了设计还画出了对应的图。 第五章这个章节主要介绍系统各个部分功能具体实现的界面效果。让我们了解到各个部分的功能详细情况。 第六章这个部分主要就是对儿童教育网站进行整体测试看看程序是否能够达到用户使用要求程序能否进行验收上交操作。 第二章 相关技术 本次开发儿童教育网站使用的是B/S结构模式进行程序开发儿童教育网站的数据信息选择MySQL数据库进行存放。 2.1 B/S结构 B/S结构实际上就是Browser/Server浏览器/服务器的缩写B/S结构是目前软件开发中的主流结构大多数软件开发者都采用B/S这样的三层体系结构。采用B/S结构开发的儿童教育网站能够大大方便用户使用操作用户随时随地都可以进行儿童教育网站的访问操作只需要用户拥有一台会连上网络的计算机就行了并且使用B/S 模式开发的儿童教育网站是基于浏览器的操作方式在与用户进行交互以及程序的表现方式上面将会更加吸引人这样的模式也给程序员开发程序降低了难度程序开发成本也会相应缩减不少。我们在使用儿童教育网站期间系统也会随着用户需求进行完善升级使用B/S 模式开发的儿童教育网站就完全不需要担心因为它的升级速度快升级产生的成本费用很低大多依赖于用户自己在网络上下载最新版本进行安装完成程序更新。下图为B/S结构图。 图2.2 B/S结构图 2.2 MySQL数据库 开发的程序面向用户的只是程序的功能界面让用户操作程序界面的各个功能那么很多人就会问用户使用程序功能生成的数据信息放在哪里的这个就需要涉及到数据库的知识了一般来说程序开发通常就会对常用数据存储工具的特点进行分析比对比如Mysql数据库的特点与优势Access数据库的特点与优势Sqlserver数据库的特点与优势等最终看哪个数据库与需要开发的程序比较匹配也符合程序功能运行需要的数据存储要求比如需要开发商业级别的程序存储的数据对数据库要求较高可以选用Oracle如果只是比较简单的程序对数据存储没有过多要求可以选用微软旗下的Access当开发程序要求数据库占用空间小并能满足程序数据存储要求时就可以考虑Oracle公司从瑞典MySQL AB公司在很早之前就收购过一个关系型数据库它是现在的Mysql数据库。所以儿童教育网站后台数据库使用的是MySQL进行数据库方面的开发工作的MySQL它是微软开发的一款平台软件这个软件可以给用户提供高效率的智能数据并且数据信息还是很可靠使用它进行数据存储可以满足大众企业管理各种各样的数据信息的需求。MySQL在MySQL版本里面它是最全面的也是最强大的开发平台 MySQL在许多关键之处都进行了改进的操作它也增加了很多新特性这些改进和更新让公司能够对关键应用程序进行高效运行并且还可以让公司降低发送信息给用户的成本以及降低数据信息管理的基础设施。因此MySQL在公司以及企业中它的地位是非常高的ERP还有OA系统以及公司财务的系统都离不开MySQL在软件开发非常流行的今天MySQL也被用来作为网站开发的网站后台数据库可以说公司使用MySQL进行数据管理不仅节约成本还可以让公司数据信息的管理效率大大提高公司数据存放在MySQL平台上数据信息的安全性也不用担心因为MySQL他可以给数据库里面的日志还有数据文件以及整个数据库进行加密操作另外MySQL还提供在线备份功能这样可以节约存储空间加快数据备份的速度。总之选择MySQL进行在线系统的后台数据库开发是很有优势的。这是个不错的软件选择。 第三章 系统分析 3.1可行性分析 可行性分析从时间经济以及操作和技术上面进行调查和研究确保合理利用信息资源避免在进行程序设计过程中因为考虑不周到所带来的困扰帮助我们更好的进行程序设计。 3.1.1时间可行性 本次进行系统开发我预留了两个月时间来完成从系统的需求分析功能结构设计功能详细设计以及系统测试等环节两个月时间是可以完成程序开发操作的我打算每天早中晚都进行程序的编写操作这期间也包括查阅各种资料信息加上同学以及老师的帮助和指点相信程序开发的时间也会缩短不少。所以时间上是可行的。 3.1.2 经济可行性 儿童教育网站的开发平台是IDEA数据库选用MySQL数据库使用的浏览器都是大众浏览器这些软件是不需要收费就能进行下载安装操作的。在系统开发的硬件选择上面我使用的是自己的笔记本进行开发操作。因此在进行系统开发时经济上面无需额外支出。开发出来的程序可以提高办公效率带来的经济效益比较高系统开发的投入产出比很可观。 3.1.3 操作可行性 儿童教育网站的界面设计比较简单界面布局根据用户日常使用习惯进行设计网站各个功能在导航栏里面清晰可见网站的数据操作可视化用户操作网站不需要培训就能上手只需要跟着网站功能提示进行操作就行。 3.1.4 技术可行性 作为计算机专业学生在学校期间就学习到许多关于编程方面的知识像SSM技术还有MySQL数据库等知识我对IDEA开发平台以及MySQL数据库的操作也比较熟练所以技术上面还是有一定把握。 3.1.5 法律可行性 自己本人开发的软件和用到的资料来源都是图书馆以及百度文库和百度网页等渠道并不涉及违法。在个人毕业设计上面无论源代码还是论文编写内容不存在抄袭行为。 从上面的经济操作以及时间上面进行的分析得出结论就是这次开发的儿童教育网站在开发上面是能够进行的系统开发出来能创造更大的经济效益越早开发升值空间越大。 3.2系统流程分析 儿童教育网站的开发也是有对应的流程开发之前必须要进行用户功能需求的分析最后根据功能需求进行网站设计还有数据库相关数据的设计工作此次开发的儿童教育网站开发流程如图3.1所示。 图3.1 系统开发流程图 系统开发完成之后会给用户提供登录入口在这个界面用户输入的信息会得到验证通过验证之后才能进去儿童教育网站的访问主界面系统登录执行流程如下 图3.2 系统执行流程图 3.3系统功能需求分析 系统的开发离不开前期的需求分析这个阶段就是让程序员知道自己该做什么事情在进行需求分析的时候着重点就是用户对系统的功能要求这个阶段要是分析得很到位系统开发出来投入使用时用户就会发现系统的功能跟用户需求保持一致程序稳定性也是达标的可以说需求分析是决定系统开发成败的关键它主要就是把现实世界进行抽象化然后把抽象化的对象用来构建模型。 儿童教育网站的受益群体主要是工作人员该网站能够方便使用者进行数据信息的查找和管理工作本次开发的网站我们设计的界面展示主要分为管理员界面以及用户界面具体界面的功能分布如下。 儿童教育网站管理员可以管理用户的基本信息可以管理文章信息可以管理文章信息等。 3.4 系统非功能需求分析 1完整性需求 本次开发的儿童教育网站里面记录的数据信息不能保持为空并且数据信息一定要核对正确才行系统里面数据之间存在的联系不能出错不能够张冠李戴数据表里面同一数据在不同数据表里面的显示内容要一样。 2性能需求 用户在操作儿童教育网站的各个部分内容时弹出的页面响应时间不能太长最好控制在三秒钟以内最大限制值就是四秒这个是给用户一个好的程序体验。并且系统还要能够承载多人同时在线进行儿童教育网站的访问操作。 3界面需求 儿童教育网站界面设计上面应该考虑到用户日常操作习惯比如导航栏的设计不能在右边这个完全违背了用户使用网站的操作习惯同时功能导航的字体以及颜色应该比较显眼方便用户容易找寻避免用户在进行功能操作上面浪费太多时间。 4安全性需求 儿童教育网站的安全性要有保证给用户一种可靠可以信赖的感觉系统在运行过程中不能总是出错与用户进行功能界面交互时要及时给出反馈信息另外系统要设置登录窗口让不是系统的用户不可以进行系统功能界面的访问操作。系统用户也要经过用户名密码的填写操作才可以进入系统主界面这样就可以保障系统数据信息处于一种安全状态。 第四章 系统设计 4.1 总体功能 儿童教育网站是根据需求定制开发开发软件选用IDEA平台配合MySQL数据库进行开发环境的搭建操作网站采用WEB应用程序中最流行的B/S结构进行开发用户访问系统数据仅仅需要在客户端安装谷歌浏览器或者是当下常用浏览器就可以访问网站内容。 4.2 系统模块设计 儿童教育网站系统在进行系统中功能模块的划分时采用层次图来进行表示。层次图具有树形结构它能使用矩形框来描绘数据信息。顶层代表的数据结构很完整顶层下面的矩形框表示的数据就是子集数据当然处于最下面的矩形框就是不能再进行细分的数据元素了使用层次方框图描述系统功能能让用户一目了然能够明白系统的功能以及对应功能板块下面的子功能都可以清楚领会。儿童教育网站分为管理员和用户两部分操作角色下面将对他们的功能进行阐述。 管理员可以管理用户的基本信息可以管理等功能。管理员功能结构图如下 儿童教育网站 系个人信息管理 管用户管理 管视频留言管理 管视频收藏管理 大视频管理 修个人信息修改 密 修改密码 新视频新增 是视频修改 删视频删除 删视频收藏删除 申 视频收藏新增 申 视频收藏修改 删用户删除 新用户新增 修用户修改 用视频留言新增 用视频留言修改 用视频留言删除 管文章管理 新文章新增 吸文章修改 删文章删除 图4.1 管理员功能结构图 4.3 数据库设计 开发一个系统也需要提前设计数据库。这里的数据库是相关数据的集合存储在一起的这些数据也是按照一定的组织方式进行的。目前数据库能够服务于多种应用程序则是源于它存储方式最佳具备数据冗余率低的优势。虽然数据库为程序提供信息存储服务但它与程序之间也可以保持较高的独立性。总而言之数据库经历了很长一段时间的发展从最初的不为人知到现在的人尽皆知其相关技术也越发成熟同时也拥有着坚实的理论基础。 4.3.1 数据库概念设计 这部分内容需要借助数据库关系图来完成也需要使用专门绘制数据库关系图的工具比如Visio工具就可以设计E-R图数据库关系图。设计数据库也需要按照设计的流程进行首先还是要根据需求完成实体的确定分析实体具有的特征还有对实体间的关联关系进行确定。最后才是使用E-R模型的表示方法绘制本系统的E-R图。不管是使用亿图软件还是Visio工具对于E-R模型的表示符号都一样通常矩形代表实体实体间存在的关系用菱形符号表示实体的属性也就是实体的特征用符号椭圆表示。最后使用直线将矩形菱形和椭圆等符号连接起来。接下来就开始对本系统的E-R图进行绘制。 1下图是用户实体和其具备的属性。 图4.1 用户实体属性图 2下图是文章留言实体和其具备的属性。 图4.2 文章留言实体属性图 3下图是文章目录实体和其具备的属性。 图4.3 文章目录实体属性图 4下图是文章目录收藏实体和其具备的属性。 图4.4 文章目录收藏实体属性图 5下图是章节收藏实体和其具备的属性。 图4.5 章节收藏实体属性图 6下图是章节实体和其具备的属性。 图4.6 章节实体属性图 7下图是视频收藏实体和其具备的属性。 图4.7 视频收藏实体属性图 8下图是名师实体和其具备的属性。 图4.8 名师实体属性图 9下图是文章收藏实体和其具备的属性。 图4.9 文章收藏实体属性图 10下图是文章实体和其具备的属性。 图4.10 文章实体属性图 11下图是视频实体和其具备的属性。 图4.11 视频实体属性图 12下图是视频留言实体和其具备的属性。 图4.12 视频留言实体属性图 4.3.3 数据库表设计 数据库里面的数据表存放的就是各种数据记录我们在进行系统增删改查操作时其实也是在对应数据表里面进行的增删改查操作一个好的数据库能够缩短信息处理时间所以说数据库的设计工作不容小觑数据库里面设置哪些表表里面的字段设计以及字段类型和字段长度等信息都要考虑周到才行比如时间这个字段它的数据类型就不能是int型不然在系统操作中就会弹出输入数据格式不符合要求的报错提示。下面简单介绍儿童教育网站的一些数据表。 表4.1字典表 序号列名数据类型说明允许空1IdIntid否2dic_codeString字段是3dic_nameString字段名是4code_indexInteger编码是5index_nameString编码名字是6super_idInteger父字段id是7beizhuString备注是8create_timeDate创建时间是 表4.2名师表 序号列名数据类型说明允许空1IdIntid否2usernameString账户是3passwordString密码是4laoshi_nameString老师姓名是5sex_typesInteger性别是6ageInteger年龄是7laoshi_photoString老师照片是8jiguanString籍贯是9biyeyuanxiaoString毕业院校是10biyenianString毕业于哪一年是11shanchangString擅长是12laoshi_contentString老师介绍是13create_timeDate创建时间是 表4.3视频表 序号列名数据类型说明允许空1IdIntid否2shipin_uuid_numberString视频编号是3shipin_nameString视频名称是4shipin_photoString视频照片是5shipin_videoString视频试看是6shipin_typesInteger视频类型是7zan_numberInteger赞是8cai_numberInteger踩是9vipshipin_typesInteger是否vip视频是10nianlingduan_typesInteger适合年龄段是11shipin_contentString视频介绍是12shangxia_typesInteger是否上架是13shipin_deleteInteger逻辑删除是14create_timeDate创建时间是 表4.4视频收藏表 序号列名数据类型说明允许空1IdIntid否2shipin_idInteger视频是3yonghu_idInteger用户是4shipin_collection_typesInteger类型是5insert_timeDate收藏时间是6create_timeDate创建时间是 表4.5视频留言表 序号列名数据类型说明允许空1IdIntid否2shipin_idInteger视频是3yonghu_idInteger用户是4shipin_liuyan_textString留言内容是5insert_timeDate留言时间是6reply_textString回复内容是7update_timeDate回复时间是8create_timeDate创建时间是 表4.6章节表 序号列名数据类型说明允许空1IdIntid否2shipin_idInteger视频是3shipin_zhangjie_nameString章节名称是4shipin_zhangjie_photoString章节照片是5shipin_zhangjie_videoString章节视频是6shipin_zhangjie_contentString章节介绍是7create_timeDate创建时间是 表4.7章节收藏表 序号列名数据类型说明允许空1IdIntid否2shipin_zhangjie_idInteger章节是3yonghu_idInteger用户是4shipin_zhangjie_collection_typesInteger类型是5insert_timeDate收藏时间是6create_timeDate创建时间是 表4.8文章表 序号列名数据类型说明允许空1IdIntid否2wenzhang_uuid_numberString文章编号是3wenzhang_nameString文章名称是4wenzhang_photoString文章照片是5wenzhang_typesInteger文章类型是6zan_numberInteger赞是7cai_numberInteger踩是8vipwenzhang_typesInteger是否vip文章是9nianlingduan_typesInteger适合年龄段是10wenzhang_contentString文章介绍是11shangxia_typesInteger是否上架是12wenzhang_deleteInteger逻辑删除是13create_timeDate创建时间是 表4.9文章收藏表 序号列名数据类型说明允许空1IdIntid否2wenzhang_idInteger文章是3yonghu_idInteger用户是4wenzhang_collection_typesInteger类型是5insert_timeDate收藏时间是6create_timeDate创建时间是 表4.10文章留言表 序号列名数据类型说明允许空1IdIntid否2wenzhang_idInteger文章是3yonghu_idInteger用户是4wenzhang_liuyan_textString留言内容是5insert_timeDate留言时间是6reply_textString回复内容是7update_timeDate回复时间是8create_timeDate创建时间是 表4.11文章目录表 序号列名数据类型说明允许空1IdIntid否2wenzhang_idInteger文章是3wenzhang_mulu_nameString文章目录名称是4wenzhang_mulu_photoString文章目录照片是5wenzhang_mulu_contentString内容是6create_timeDate创建时间是 表4.12文章目录收藏表 序号列名数据类型说明允许空1IdIntid否2wenzhang_mulu_idInteger文章目录是3yonghu_idInteger用户是4wenzhang_mulu_collection_typesInteger类型是5insert_timeDate收藏时间是6create_timeDate创建时间是 表4.13用户表 序号列名数据类型说明允许空1IdIntid否2yonghu_nameString用户姓名是3yonghu_phoneString用户手机号是4yonghu_id_numberString用户身份证号是5yonghu_photoString用户头像是6yonghu_emailString电子邮箱是7new_moneyBigDecimal余额是8vip_typesInteger是否vip是9create_timeDate创建时间是 表4.14管理员表 序号列名数据类型说明允许空1IdIntid否2usernameString用户名是3passwordString密码是4roleString角色是5addtimeDate新增时间是 第五章 系统实现 5.1 管理员功能模块的实现 5.1.1 视频列表 如图5.1显示的就是视频列表页面此页面提供给管理员的功能有查看视频、新增视频、修改视频、删除视频等。 图5.1 视频列表页面 5.1.2 文章信息管理 管理员可以对前台的注册用户的基本信息进行管理可以设置注册用户的账号为冻结或者是在用状态管理员也能选择很多个已经失效的注册用户的信息进行批量删除操作。注册用户管理界面如图5.2所示。 图5.2 文章信息管理页面 5.1.3 文章类型管理 文章类型管理页面显示所有文章类型在此页面既可以让管理员添加新的文章信息类型也能对已有的文章类型信息执行编辑更新失效的文章类型信息也能让管理员快速删除。下图就是文章类型管理页面。文章类型管理界面如图5.3所示。 图5.3文章类型管理界面 LaoshiServiceImpl.java package com.service.impl;import com.utils.StringUtil; import org.springframework.stereotype.Service; import java.lang.reflect.Field; import java.util.*; import com.baomidou.mybatisplus.plugins.Page; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import org.springframework.transaction.annotation.Transactional; import com.utils.PageUtils; import com.utils.Query; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import com.dao.LaoshiDao; import com.entity.LaoshiEntity; import com.service.LaoshiService; import com.entity.view.LaoshiView;/*** 名师 服务实现类*/ Service(laoshiService) Transactional public class LaoshiServiceImpl extends ServiceImplLaoshiDao, LaoshiEntity implements LaoshiService {Overridepublic PageUtils queryPage(MapString,Object params) {if(params ! null (params.get(limit) null || params.get(page) null)){params.put(page,1);params.put(limit,10);}PageLaoshiView page new QueryLaoshiView(params).getPage();page.setRecords(baseMapper.selectListView(page,params));return new PageUtils(page);}} ShipinController.java package com.controller;import java.io.File; import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import com.service.TokenService; import com.utils.*; import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService; import org.apache.commons.lang3.StringUtils; import com.annotation.IgnoreAuth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.entity.*; import com.entity.view.*; import com.service.*; import com.utils.PageUtils; import com.utils.R; import com.alibaba.fastjson.*;/*** 视频* 后端接口* author* email */ RestController Controller RequestMapping(/shipin) public class ShipinController {private static final Logger logger LoggerFactory.getLogger(ShipinController.class);Autowiredprivate ShipinService shipinService;Autowiredprivate TokenService tokenService;Autowiredprivate DictionaryService dictionaryService;//级联表serviceAutowiredprivate YonghuService yonghuService;/*** 后端列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(page方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永不会进入);else if(用户.equals(role))params.put(yonghuId,request.getSession().getAttribute(userId));params.put(shipinDeleteStart,1);params.put(shipinDeleteEnd,1);if(params.get(orderBy)null || params.get(orderBy)){params.put(orderBy,id);}PageUtils page shipinService.queryPage(params);//字典表数据转换ListShipinView list (ListShipinView)page.getList();for(ShipinView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put(data, page);}/*** 后端详情*/RequestMapping(/info/{id})public R info(PathVariable(id) Long id, HttpServletRequest request){logger.debug(info方法:,,Controller:{},,id:{},this.getClass().getName(),id);ShipinEntity shipin shipinService.selectById(id);if(shipin !null){//entity转viewShipinView view new ShipinView();BeanUtils.copyProperties( shipin , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 后端保存*/RequestMapping(/save)public R save(RequestBody ShipinEntity shipin, HttpServletRequest request){logger.debug(save方法:,,Controller:{},,shipin:{},this.getClass().getName(),shipin.toString());String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永远不会进入);WrapperShipinEntity queryWrapper new EntityWrapperShipinEntity().eq(shipin_uuid_number, shipin.getShipinUuidNumber()).eq(shipin_name, shipin.getShipinName()).eq(shipin_video, shipin.getShipinVideo()).eq(shipin_types, shipin.getShipinTypes()).eq(zan_number, shipin.getZanNumber()).eq(cai_number, shipin.getCaiNumber()).eq(vipshipin_types, shipin.getVipshipinTypes()).eq(nianlingduan_types, shipin.getNianlingduanTypes()).eq(shangxia_types, shipin.getShangxiaTypes()).eq(shipin_delete, shipin.getShipinDelete());logger.info(sql语句:queryWrapper.getSqlSegment());ShipinEntity shipinEntity shipinService.selectOne(queryWrapper);if(shipinEntitynull){shipin.setShangxiaTypes(1);shipin.setShipinDelete(1);shipin.setCreateTime(new Date());shipinService.insert(shipin);return R.ok();}else {return R.error(511,表中有相同数据);}}/*** 后端修改*/RequestMapping(/update)public R update(RequestBody ShipinEntity shipin, HttpServletRequest request){logger.debug(update方法:,,Controller:{},,shipin:{},this.getClass().getName(),shipin.toString());String role String.valueOf(request.getSession().getAttribute(role)); // if(false) // return R.error(511,永远不会进入);//根据字段查询是否有相同数据WrapperShipinEntity queryWrapper new EntityWrapperShipinEntity().notIn(id,shipin.getId()).andNew().eq(shipin_uuid_number, shipin.getShipinUuidNumber()).eq(shipin_name, shipin.getShipinName()).eq(shipin_video, shipin.getShipinVideo()).eq(shipin_types, shipin.getShipinTypes()).eq(zan_number, shipin.getZanNumber()).eq(cai_number, shipin.getCaiNumber()).eq(vipshipin_types, shipin.getVipshipinTypes()).eq(nianlingduan_types, shipin.getNianlingduanTypes()).eq(shangxia_types, shipin.getShangxiaTypes()).eq(shipin_delete, shipin.getShipinDelete());logger.info(sql语句:queryWrapper.getSqlSegment());ShipinEntity shipinEntity shipinService.selectOne(queryWrapper);if(.equals(shipin.getShipinPhoto()) || null.equals(shipin.getShipinPhoto())){shipin.setShipinPhoto(null);}if(.equals(shipin.getShipinVideo()) || null.equals(shipin.getShipinVideo())){shipin.setShipinVideo(null);}if(shipinEntitynull){shipinService.updateById(shipin);//根据id更新return R.ok();}else {return R.error(511,表中有相同数据);}}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Integer[] ids){logger.debug(delete:,,Controller:{},,ids:{},this.getClass().getName(),ids.toString());ArrayListShipinEntity list new ArrayList();for(Integer id:ids){ShipinEntity shipinEntity new ShipinEntity();shipinEntity.setId(id);shipinEntity.setShipinDelete(2);list.add(shipinEntity);}if(list ! null list.size() 0){shipinService.updateBatchById(list);}return R.ok();}/*** 批量上传*/RequestMapping(/batchInsert)public R save( String fileName, HttpServletRequest request){logger.debug(batchInsert方法:,,Controller:{},,fileName:{},this.getClass().getName(),fileName);Integer yonghuId Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId)));SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd HH:mm:ss);try {ListShipinEntity shipinList new ArrayList();//上传的东西MapString, ListString seachFields new HashMap();//要查询的字段Date date new Date();int lastIndexOf fileName.lastIndexOf(.);if(lastIndexOf -1){return R.error(511,该文件没有后缀);}else{String suffix fileName.substring(lastIndexOf);if(!.xls.equals(suffix)){return R.error(511,只支持后缀为xls的excel文件);}else{URL resource this.getClass().getClassLoader().getResource(../../upload/ fileName);//获取文件路径File file new File(resource.getFile());if(!file.exists()){return R.error(511,找不到上传文件请联系管理员);}else{ListListString dataList PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行因为第一行是提示for(ListString data:dataList){//循环ShipinEntity shipinEntity new ShipinEntity(); // shipinEntity.setShipinUuidNumber(data.get(0)); //视频编号 要改的 // shipinEntity.setShipinName(data.get(0)); //视频名称 要改的 // shipinEntity.setShipinPhoto();//详情和图片 // shipinEntity.setShipinVideo(data.get(0)); //视频试看 要改的 // shipinEntity.setShipinTypes(Integer.valueOf(data.get(0))); //视频类型 要改的 // shipinEntity.setZanNumber(Integer.valueOf(data.get(0))); //赞 要改的 // shipinEntity.setCaiNumber(Integer.valueOf(data.get(0))); //踩 要改的 // shipinEntity.setVipshipinTypes(Integer.valueOf(data.get(0))); //是否vip视频 要改的 // shipinEntity.setNianlingduanTypes(Integer.valueOf(data.get(0))); //适合年龄段 要改的 // shipinEntity.setShipinContent();//详情和图片 // shipinEntity.setShangxiaTypes(Integer.valueOf(data.get(0))); //是否上架 要改的 // shipinEntity.setShipinDelete(1);//逻辑删除字段 // shipinEntity.setCreateTime(date);//时间shipinList.add(shipinEntity);//把要查询是否重复的字段放入map中//视频编号if(seachFields.containsKey(shipinUuidNumber)){ListString shipinUuidNumber seachFields.get(shipinUuidNumber);shipinUuidNumber.add(data.get(0));//要改的}else{ListString shipinUuidNumber new ArrayList();shipinUuidNumber.add(data.get(0));//要改的seachFields.put(shipinUuidNumber,shipinUuidNumber);}}//查询是否重复//视频编号ListShipinEntity shipinEntities_shipinUuidNumber shipinService.selectList(new EntityWrapperShipinEntity().in(shipin_uuid_number, seachFields.get(shipinUuidNumber)).eq(shipin_delete, 1));if(shipinEntities_shipinUuidNumber.size() 0 ){ArrayListString repeatFields new ArrayList();for(ShipinEntity s:shipinEntities_shipinUuidNumber){repeatFields.add(s.getShipinUuidNumber());}return R.error(511,数据库的该表中的 [视频编号] 字段已经存在 存在数据为:repeatFields.toString());}shipinService.insertBatch(shipinList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,批量插入数据异常请联系管理员);}}/*** 前端列表*/IgnoreAuthRequestMapping(/list)public R list(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(list方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));// 没有指定排序字段就默认id倒序if(StringUtil.isEmpty(String.valueOf(params.get(orderBy)))){params.put(orderBy,id);}PageUtils page shipinService.queryPage(params);//字典表数据转换ListShipinView list (ListShipinView)page.getList();for(ShipinView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put(data, page);}/*** 前端详情*/RequestMapping(/detail/{id})public R detail(PathVariable(id) Long id, HttpServletRequest request){logger.debug(detail方法:,,Controller:{},,id:{},this.getClass().getName(),id);ShipinEntity shipin shipinService.selectById(id);if(shipin !null){//entity转viewShipinView view new ShipinView();BeanUtils.copyProperties( shipin , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 前端保存*/RequestMapping(/add)public R add(RequestBody ShipinEntity shipin, HttpServletRequest request){logger.debug(add方法:,,Controller:{},,shipin:{},this.getClass().getName(),shipin.toString());WrapperShipinEntity queryWrapper new EntityWrapperShipinEntity().eq(shipin_uuid_number, shipin.getShipinUuidNumber()).eq(shipin_name, shipin.getShipinName()).eq(shipin_video, shipin.getShipinVideo()).eq(shipin_types, shipin.getShipinTypes()).eq(zan_number, shipin.getZanNumber()).eq(cai_number, shipin.getCaiNumber()).eq(vipshipin_types, shipin.getVipshipinTypes()).eq(nianlingduan_types, shipin.getNianlingduanTypes()).eq(shangxia_types, shipin.getShangxiaTypes()).eq(shipin_delete, shipin.getShipinDelete());logger.info(sql语句:queryWrapper.getSqlSegment());ShipinEntity shipinEntity shipinService.selectOne(queryWrapper);if(shipinEntitynull){shipin.setShipinDelete(1);shipin.setCreateTime(new Date());shipinService.insert(shipin);return R.ok();}else {return R.error(511,表中有相同数据);}}} WenzhangCollectionController.java package com.controller;import java.io.File; import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import com.service.TokenService; import com.utils.*; import java.lang.reflect.InvocationTargetException;import com.service.DictionaryService; import org.apache.commons.lang3.StringUtils; import com.annotation.IgnoreAuth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.entity.*; import com.entity.view.*; import com.service.*; import com.utils.PageUtils; import com.utils.R; import com.alibaba.fastjson.*;/*** 文章收藏* 后端接口* author* email */ RestController Controller RequestMapping(/wenzhangCollection) public class WenzhangCollectionController {private static final Logger logger LoggerFactory.getLogger(WenzhangCollectionController.class);Autowiredprivate WenzhangCollectionService wenzhangCollectionService;Autowiredprivate TokenService tokenService;Autowiredprivate DictionaryService dictionaryService;//级联表serviceAutowiredprivate WenzhangService wenzhangService;Autowiredprivate YonghuService yonghuService;/*** 后端列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(page方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永不会进入);else if(用户.equals(role))params.put(yonghuId,request.getSession().getAttribute(userId));if(params.get(orderBy)null || params.get(orderBy)){params.put(orderBy,id);}PageUtils page wenzhangCollectionService.queryPage(params);//字典表数据转换ListWenzhangCollectionView list (ListWenzhangCollectionView)page.getList();for(WenzhangCollectionView c:list){//修改对应字典表字段dictionaryService.dictionaryConvert(c, request);}return R.ok().put(data, page);}/*** 后端详情*/RequestMapping(/info/{id})public R info(PathVariable(id) Long id, HttpServletRequest request){logger.debug(info方法:,,Controller:{},,id:{},this.getClass().getName(),id);WenzhangCollectionEntity wenzhangCollection wenzhangCollectionService.selectById(id);if(wenzhangCollection !null){//entity转viewWenzhangCollectionView view new WenzhangCollectionView();BeanUtils.copyProperties( wenzhangCollection , view );//把实体数据重构到view中//级联表WenzhangEntity wenzhang wenzhangService.selectById(wenzhangCollection.getWenzhangId());if(wenzhang ! null){BeanUtils.copyProperties( wenzhang , view ,new String[]{ id, createTime, insertTime, updateTime});//把级联的数据添加到view中,并排除id和创建时间字段view.setWenzhangId(wenzhang.getId());}//级联表YonghuEntity yonghu yonghuService.selectById(wenzhangCollection.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,查不到数据);}}/*** 后端保存*/RequestMapping(/save)public R save(RequestBody WenzhangCollectionEntity wenzhangCollection, HttpServletRequest request){logger.debug(save方法:,,Controller:{},,wenzhangCollection:{},this.getClass().getName(),wenzhangCollection.toString());String role String.valueOf(request.getSession().getAttribute(role));if(false)return R.error(511,永远不会进入);else if(用户.equals(role))wenzhangCollection.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId))));WrapperWenzhangCollectionEntity queryWrapper new EntityWrapperWenzhangCollectionEntity().eq(wenzhang_id, wenzhangCollection.getWenzhangId()).eq(yonghu_id, wenzhangCollection.getYonghuId()).eq(wenzhang_collection_types, wenzhangCollection.getWenzhangCollectionTypes());logger.info(sql语句:queryWrapper.getSqlSegment());WenzhangCollectionEntity wenzhangCollectionEntity wenzhangCollectionService.selectOne(queryWrapper);if(wenzhangCollectionEntitynull){wenzhangCollection.setInsertTime(new Date());wenzhangCollection.setCreateTime(new Date());wenzhangCollectionService.insert(wenzhangCollection);return R.ok();}else {return R.error(511,表中有相同数据);}}/*** 后端修改*/RequestMapping(/update)public R update(RequestBody WenzhangCollectionEntity wenzhangCollection, HttpServletRequest request){logger.debug(update方法:,,Controller:{},,wenzhangCollection:{},this.getClass().getName(),wenzhangCollection.toString());String role String.valueOf(request.getSession().getAttribute(role)); // if(false) // return R.error(511,永远不会进入); // else if(用户.equals(role)) // wenzhangCollection.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId))));//根据字段查询是否有相同数据WrapperWenzhangCollectionEntity queryWrapper new EntityWrapperWenzhangCollectionEntity().notIn(id,wenzhangCollection.getId()).andNew().eq(wenzhang_id, wenzhangCollection.getWenzhangId()).eq(yonghu_id, wenzhangCollection.getYonghuId()).eq(wenzhang_collection_types, wenzhangCollection.getWenzhangCollectionTypes());logger.info(sql语句:queryWrapper.getSqlSegment());WenzhangCollectionEntity wenzhangCollectionEntity wenzhangCollectionService.selectOne(queryWrapper);if(wenzhangCollectionEntitynull){wenzhangCollectionService.updateById(wenzhangCollection);//根据id更新return R.ok();}else {return R.error(511,表中有相同数据);}}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Integer[] ids){logger.debug(delete:,,Controller:{},,ids:{},this.getClass().getName(),ids.toString());wenzhangCollectionService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 批量上传*/RequestMapping(/batchInsert)public R save( String fileName, HttpServletRequest request){logger.debug(batchInsert方法:,,Controller:{},,fileName:{},this.getClass().getName(),fileName);Integer yonghuId Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId)));SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd HH:mm:ss);try {ListWenzhangCollectionEntity wenzhangCollectionList new ArrayList();//上传的东西MapString, ListString seachFields new HashMap();//要查询的字段Date date new Date();int lastIndexOf fileName.lastIndexOf(.);if(lastIndexOf -1){return R.error(511,该文件没有后缀);}else{String suffix fileName.substring(lastIndexOf);if(!.xls.equals(suffix)){return R.error(511,只支持后缀为xls的excel文件);}else{URL resource this.getClass().getClassLoader().getResource(../../upload/ fileName);//获取文件路径File file new File(resource.getFile());if(!file.exists()){return R.error(511,找不到上传文件请联系管理员);}else{ListListString dataList PoiUtil.poiImport(file.getPath());//读取xls文件dataList.remove(0);//删除第一行因为第一行是提示for(ListString data:dataList){//循环WenzhangCollectionEntity wenzhangCollectionEntity new WenzhangCollectionEntity(); // wenzhangCollectionEntity.setWenzhangId(Integer.valueOf(data.get(0))); //文章 要改的 // wenzhangCollectionEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的 // wenzhangCollectionEntity.setWenzhangCollectionTypes(Integer.valueOf(data.get(0))); //类型 要改的 // wenzhangCollectionEntity.setInsertTime(date);//时间 // wenzhangCollectionEntity.setCreateTime(date);//时间wenzhangCollectionList.add(wenzhangCollectionEntity);//把要查询是否重复的字段放入map中}//查询是否重复wenzhangCollectionService.insertBatch(wenzhangCollectionList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,批量插入数据异常请联系管理员);}}/*** 前端列表*/IgnoreAuthRequestMapping(/list)public R list(RequestParam MapString, Object params, HttpServletRequest request){logger.debug(list方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params));// 没有指定排序字段就默认id倒序if(StringUtil.isEmpty(String.valueOf(params.get(orderBy)))){params.put(orderBy,id);}PageUtils page wenzhangCollectionService.queryPage(params);//字典表数据转换ListWenzhangCollectionView list (ListWenzhangCollectionView)page.getList();for(WenzhangCollectionView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put(data, page);}/*** 前端详情*/RequestMapping(/detail/{id})public R detail(PathVariable(id) Long id, HttpServletRequest request){logger.debug(detail方法:,,Controller:{},,id:{},this.getClass().getName(),id);WenzhangCollectionEntity wenzhangCollection wenzhangCollectionService.selectById(id);if(wenzhangCollection !null){//entity转viewWenzhangCollectionView view new WenzhangCollectionView();BeanUtils.copyProperties( wenzhangCollection , view );//把实体数据重构到view中//级联表WenzhangEntity wenzhang wenzhangService.selectById(wenzhangCollection.getWenzhangId());if(wenzhang ! null){BeanUtils.copyProperties( wenzhang , view ,new String[]{ id, createDate});//把级联的数据添加到view中,并排除id和创建时间字段view.setWenzhangId(wenzhang.getId());}//级联表YonghuEntity yonghu yonghuService.selectById(wenzhangCollection.getYonghuId());if(yonghu ! null){BeanUtils.copyProperties( yonghu , view ,new String[]{ id, createDate});//把级联的数据添加到view中,并排除id和创建时间字段view.setYonghuId(yonghu.getId());}//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put(data, view);}else {return R.error(511,查不到数据);}}/*** 前端保存*/RequestMapping(/add)public R add(RequestBody WenzhangCollectionEntity wenzhangCollection, HttpServletRequest request){logger.debug(add方法:,,Controller:{},,wenzhangCollection:{},this.getClass().getName(),wenzhangCollection.toString());WrapperWenzhangCollectionEntity queryWrapper new EntityWrapperWenzhangCollectionEntity().eq(wenzhang_id, wenzhangCollection.getWenzhangId()).eq(yonghu_id, wenzhangCollection.getYonghuId()).eq(wenzhang_collection_types, wenzhangCollection.getWenzhangCollectionTypes());logger.info(sql语句:queryWrapper.getSqlSegment());WenzhangCollectionEntity wenzhangCollectionEntity wenzhangCollectionService.selectOne(queryWrapper);if(wenzhangCollectionEntitynull){wenzhangCollection.setInsertTime(new Date());wenzhangCollection.setCreateTime(new Date());wenzhangCollectionService.insert(wenzhangCollection);return R.ok();}else {return R.error(511,您已经收藏过了);}}} list.vue templatediv classmain-content!-- 列表页 --div v-ifshowFlagel-form :inlinetrue :modelsearchForm classform-contentel-row :gutter20 classslt :style{justifyContent:contents.searchBoxPosition1?flex-start:contents.searchBoxPosition2?center:flex-end}el-form-item label性别类型el-input prefix-iconel-icon-search v-modelsearchForm.indexNameSearch placeholder性别类型 clearable/el-input/el-form-itemel-form-itemel-button iconel-icon-search typesuccess clicksearch()查询/el-button/el-form-item/el-rowel-row classad :style{justifyContent:contents.btnAdAllBoxPosition1?flex-start:contents.btnAdAllBoxPosition2?center:flex-end}el-form-itemel-buttonv-ifisAuth(dictionarySex,新增)typesuccessiconel-icon-plusclickaddOrUpdateHandler()新增/el-buttonel-buttonv-ifisAuth(dictionarySex,删除):disableddataListSelections.length 0typedangericonel-icon-deleteclickdeleteHandler()删除/el-button/el-form-item/el-row/el-formdiv classtable-contentel-table classtables :sizecontents.tableSize :show-headercontents.tableShowHeader:header-row-styleheaderRowStyle :header-cell-styleheaderCellStyle:bordercontents.tableBorder:fitcontents.tableFit:stripecontents.tableStripe:row-stylerowStyle:cell-stylecellStyle:style{width: 100%,fontSize:contents.tableContentFontSize,color:contents.tableContentFontColor}v-ifisAuth(dictionarySex,查看):datadataListv-loadingdataListLoadingselection-changeselectionChangeHandlerel-table-column v-ifcontents.tableSelectiontypeselectionheader-aligncenteraligncenterwidth50/el-table-columnel-table-column label索引 v-ifcontents.tableIndex typeindex width50 /el-table-column :sortablecontents.tableSortable :aligncontents.tableAlignpropcodeIndexheader-aligncenterlabel性别类型编码template slot-scopescope{{scope.row.codeIndex}}/template/el-table-columnel-table-column :sortablecontents.tableSortable :aligncontents.tableAlignpropindexNameheader-aligncenterlabel性别类型名称template slot-scopescope{{scope.row.indexName}}/template/el-table-column!--el-table-column :sortablecontents.tableSortable :aligncontents.tableAlignpropbeizhuheader-aligncenterlabel备注template slot-scopescope{{scope.row.beizhu}}/template/el-table-column--el-table-column width300 :aligncontents.tableAlignheader-aligncenterlabel操作template slot-scopescopeel-button v-ifisAuth(dictionarySex,查看) typesuccess iconel-icon-tickets sizemini clickaddOrUpdateHandler(scope.row.id,info)详情/el-buttonel-button v-ifisAuth(dictionarySex,修改) typeprimary iconel-icon-edit sizemini clickaddOrUpdateHandler(scope.row.id)修改/el-buttonel-button v-ifisAuth(dictionarySex,删除) typedanger iconel-icon-delete sizemini clickdeleteHandler(scope.row.id)删除/el-button/template/el-table-column/el-tableel-paginationclssspages:layoutlayoutssize-changesizeChangeHandlecurrent-changecurrentChangeHandle:current-pagepageIndex:page-sizes[10, 20, 50, 100]:page-sizeNumber(contents.pageEachNum):totaltotalPage:smallcontents.pageStyleclasspagination-content:backgroundcontents.pageBtnBG:style{textAlign:contents.pagePosition1?left:contents.pagePosition2?center:right}/el-pagination/div/div!-- 添加/修改页面 将父组件的search方法传递给子组件--add-or-update v-ifaddOrUpdateFlag :parentthis refaddOrUpdate/add-or-update/div /template scriptimport AddOrUpdate from ./add-or-update;import styleJs from ../../../utils/style.js;export default {data() {return {searchForm: {key: },form:{},dataList: [],pageIndex: 1,pageSize: 10,totalPage: 0,dataListLoading: false,dataListSelections: [],showFlag: true,sfshVisiable: false,shForm: {},chartVisiable: false,addOrUpdateFlag:false,contents:null,layouts: ,};},created() {this.contents styleJs.listStyle();this.init();this.getDataList();this.contentStyleChange()},mounted() {},filters: {htmlfilter: function (val) {return val.replace(/[^]*/g).replace(/undefined/g,);}},components: {AddOrUpdate,},methods: {contentStyleChange() {this.contentSearchStyleChange()this.contentBtnAdAllStyleChange()this.contentSearchBtnStyleChange()this.contentTableBtnStyleChange()this.contentPageStyleChange()},contentSearchStyleChange() {this.$nextTick((){document.querySelectorAll(.form-content .slt .el-input__inner).forEach(el{let textAlign leftif(this.contents.inputFontPosition 2) textAlign centerif(this.contents.inputFontPosition 3) textAlign rightel.style.textAlign textAlignel.style.height this.contents.inputHeightel.style.lineHeight this.contents.inputHeightel.style.color this.contents.inputFontColorel.style.fontSize this.contents.inputFontSizeel.style.borderWidth this.contents.inputBorderWidthel.style.borderStyle this.contents.inputBorderStyleel.style.borderColor this.contents.inputBorderColorel.style.borderRadius this.contents.inputBorderRadiusel.style.backgroundColor this.contents.inputBgColor})if(this.contents.inputTitle) {document.querySelectorAll(.form-content .slt .el-form-item__label).forEach(el{el.style.color this.contents.inputTitleColorel.style.fontSize this.contents.inputTitleSizeel.style.lineHeight this.contents.inputHeight})}setTimeout((){document.querySelectorAll(.form-content .slt .el-input__prefix).forEach(el{el.style.color this.contents.inputIconColorel.style.lineHeight this.contents.inputHeight})document.querySelectorAll(.form-content .slt .el-input__suffix).forEach(el{el.style.color this.contents.inputIconColorel.style.lineHeight this.contents.inputHeight})document.querySelectorAll(.form-content .slt .el-input__icon).forEach(el{el.style.lineHeight this.contents.inputHeight})},10)})},// 搜索按钮contentSearchBtnStyleChange() {this.$nextTick((){document.querySelectorAll(.form-content .slt .el-button--success).forEach(el{el.style.height this.contents.searchBtnHeightel.style.color this.contents.searchBtnFontColorel.style.fontSize this.contents.searchBtnFontSizeel.style.borderWidth this.contents.searchBtnBorderWidthel.style.borderStyle this.contents.searchBtnBorderStyleel.style.borderColor this.contents.searchBtnBorderColorel.style.borderRadius this.contents.searchBtnBorderRadiusel.style.backgroundColor this.contents.searchBtnBgColor})})},// 新增、批量删除contentBtnAdAllStyleChange() {this.$nextTick((){document.querySelectorAll(.form-content .ad .el-button--success).forEach(el{el.style.height this.contents.btnAdAllHeightel.style.color this.contents.btnAdAllAddFontColorel.style.fontSize this.contents.btnAdAllFontSizeel.style.borderWidth this.contents.btnAdAllBorderWidthel.style.borderStyle this.contents.btnAdAllBorderStyleel.style.borderColor this.contents.btnAdAllBorderColorel.style.borderRadius this.contents.btnAdAllBorderRadiusel.style.backgroundColor this.contents.btnAdAllAddBgColor})document.querySelectorAll(.form-content .ad .el-button--danger).forEach(el{el.style.height this.contents.btnAdAllHeightel.style.color this.contents.btnAdAllDelFontColorel.style.fontSize this.contents.btnAdAllFontSizeel.style.borderWidth this.contents.btnAdAllBorderWidthel.style.borderStyle this.contents.btnAdAllBorderStyleel.style.borderColor this.contents.btnAdAllBorderColorel.style.borderRadius this.contents.btnAdAllBorderRadiusel.style.backgroundColor this.contents.btnAdAllDelBgColor})document.querySelectorAll(.form-content .ad .el-button--warning).forEach(el{el.style.height this.contents.btnAdAllHeightel.style.color this.contents.btnAdAllWarnFontColorel.style.fontSize this.contents.btnAdAllFontSizeel.style.borderWidth this.contents.btnAdAllBorderWidthel.style.borderStyle this.contents.btnAdAllBorderStyleel.style.borderColor this.contents.btnAdAllBorderColorel.style.borderRadius this.contents.btnAdAllBorderRadiusel.style.backgroundColor this.contents.btnAdAllWarnBgColor})})},// 表格rowStyle({ row, rowIndex}) {if (rowIndex % 2 1) {if(this.contents.tableStripe) {return {color:this.contents.tableStripeFontColor}}} else {return }},cellStyle({ row, rowIndex}){if (rowIndex % 2 1) {if(this.contents.tableStripe) {return {backgroundColor:this.contents.tableStripeBgColor}}} else {return }},headerRowStyle({ row, rowIndex}){return {color: this.contents.tableHeaderFontColor}},headerCellStyle({ row, rowIndex}){return {backgroundColor: this.contents.tableHeaderBgColor}},// 表格按钮contentTableBtnStyleChange(){},// 分页contentPageStyleChange(){let arr []if(this.contents.pageTotal) arr.push(total)if(this.contents.pageSizes) arr.push(sizes)if(this.contents.pagePrevNext){arr.push(prev)if(this.contents.pagePager) arr.push(pager)arr.push(next)}if(this.contents.pageJumper) arr.push(jumper)this.layouts arr.join()this.contents.pageEachNum 10},init () {},search() {this.pageIndex 1;this.getDataList();},// 获取数据列表getDataList() {this.dataListLoading true;let params {page: this.pageIndex,limit: this.pageSize,sort: id,}if(this.searchForm.indexNameSearch! this.searchForm.indexNameSearch!undefined){params[indexName] this.searchForm.indexNameSearch}//本表的params[dicCode] sex_types//编码名字params[dicName] 性别类型,//汉字名字this.$http({url: dictionary/page,method: get,params: params}).then(({ data }) {if (data data.code 0) {this.dataList data.data.list;this.totalPage data.data.total;} else {this.dataList [];this.totalPage 0;}this.dataListLoading false;});},// 每页数sizeChangeHandle(val) {this.pageSize val;this.pageIndex 1;this.getDataList();},// 当前页currentChangeHandle(val) {this.pageIndex val;this.getDataList();},// 多选selectionChangeHandler(val) {this.dataListSelections val;},// 添加/修改addOrUpdateHandler(id,type) {this.showFlag false;this.addOrUpdateFlag true;this.crossAddOrUpdateFlag false;if(type!info){type else;}this.$nextTick(() {this.$refs.addOrUpdate.init(id,type);});},// 删除deleteHandler(id) {var ids id? [Number(id)]: this.dataListSelections.map(item {return Number(item.id);});this.$confirm(确定进行[${id ? 删除 : 批量删除}]操作?, 提示, {confirmButtonText: 确定,cancelButtonText: 取消,type: warning}).then(() {this.$http({url: dictionary/delete,method: post,data: ids}).then(({ data }) {if (data data.code 0) {this.$message({message: 操作成功,type: success,duration: 1500,onClose: () {this.search();}});} else {this.$message.error(data.msg);}});});},}}; /script style langscss scoped .slt {margin: 0 !important;display: flex;}.ad {margin: 0 !important;display: flex;}.pages { /deep/ el-pagination__sizes{ /deep/ el-input__inner {height: 22px;line-height: 22px;}}}.el-button.el-button {margin:0;} .tables { /deep/ .el-button--success {height: 40px;color: rgba(88, 84, 84, 1);font-size: 10px;border-width: 1px;border-style: solid;border-color: #DCDFE6;border-radius: 20px;background-color: rgba(153, 204, 51, 1);} /deep/ .el-button--primary {height: 40px;color: rgba(91, 87, 87, 1);font-size: 10px;border-width: 1px;border-style: solid;border-color: #DCDFE6;border-radius: 20px;background-color: rgba(255, 255, 102, 1);} /deep/ .el-button--danger {height: 40px;color: rgba(255, 255, 255, 1);font-size: 10px;border-width: 1px;border-style: solid;border-color: #DCDFE6;border-radius: 20px;background-color: rgba(51, 102, 0, 1);} /deep/ .el-button {margin: 4px;}} /style 声明 本博客适用于广泛的学术和教育用途包括但不限于个人学习、开发设计产品设计。仅供学习参考旨在为读者提供深入理解和学术研究的材料。
http://www.hkea.cn/news/14433416/

相关文章:

  • 汕头兼职网站建设温岭网站建设公司
  • 加建网网站制作网线水晶头
  • 永城做网站做网站虚拟主机
  • 合肥网站建设过程服装网站建设方案
  • 网站建设市场推广招聘给我免费观看片在线
  • 主播做的头像在哪个网站上做的梅州免费建站
  • 博物馆网站做的好的网站首页引导页
  • 时尚女装网站模版抖音小程序开发一个多少钱
  • 企业营销型网站推广方法珠海主题网站设计模板
  • 江苏省建设协会网站100件机械创意产品设计
  • 深圳珠宝品牌网站设计网页设计与制作课程大纲
  • 个人免费网站注册滕州网站优化
  • 栾城做网站网站建设的行业代码是多少钱
  • 自己做网站用什么软件下载杭州赛虎网站建设
  • 青岛高级网站建设服务网站ui界面设计模板
  • 宁波市内做公司网站的公司广州3d建模培训机构
  • 17做网站 一件代发做感恩网站的图片大全
  • 建设网站怎么备案个人怎么注册小微企业
  • asp在线生成网站地图源代码电子商务网站建设 价格
  • 天河建设网站南通开发区人才网
  • 个人做网站哪种类型的网站好天津网络网站公司
  • 陕西省建设监理协会网站主页网站建设 投资合作
  • 潍坊建设企业网站wordpress 获取用户邮箱
  • 舆情网站推荐wordpress 获取分类名称
  • 规划网站需要几个步骤网站开发所需能力
  • 电子商务网站名字太仓广告设计公司网站
  • 网站代理软件无锡制作网站公司
  • 乡土文化网站怎么做那个网站教我做美食最好
  • eclipse用来做网站前端seo搜索优化试卷
  • 查网站有没有做推广永久免费win云服务器