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

秦皇岛网站制作价格介绍网络营销

秦皇岛网站制作价格,介绍网络营销,html5网站建设,做一个网站需要哪些资源一: 通过highlight.js项目实现对json字符串的染色高亮 此项目是jsp文件,并且引用了element-ui/highlight.js的组件 二: 实现效果 三: 代码实现 关键点在于成功引入相关的js及css,并且在tooltip渲染时进行数据染色。再将染色后的数据放到v-html中进行页面渲染(关键方…

一: 通过highlight.js项目实现对json字符串的染色高亮

此项目是jsp文件,并且引用了element-ui/highlight.js的组件

二: 实现效果

在这里插入图片描述

三: 代码实现

关键点在于成功引入相关的js及css,并且在tooltip渲染时进行数据染色。再将染色后的数据放到v-html中进行页面渲染(关键方法: highlightedData)

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/pages/main/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>主子服务查询</title><script src="${pageContext.request.contextPath}/js/vueEle/2.7/vue.js"></script><script src="${pageContext.request.contextPath}/js/vueEle/js/lib/vue-resource.js"></script><script src="${pageContext.request.contextPath}/js/vueEle/2.7/vueEle.js"></script><script src="${pageContext.request.contextPath}/js/highlight/es/highlight.min.js"></script><link rel="stylesheet" href="${pageContext.request.contextPath}/js/vueEle/2.7/vueEle.css"><link href="${pageContext.request.contextPath}/js/highlight/styles/atom-one-dark-reasonable.css" rel="stylesheet" type="text/css"><style><%--  解决文本过长显示不全的问题 --%>.el-tooltip__popper {border-left: 20px solid #000000; /* 设置左侧边框为10px宽,颜色为黑色 */border-right: 10px solid #000000; /* 设置左侧边框为10px宽,颜色为黑色 */max-height: 400px;overflow-y: auto;}</style>
</head>
<body>
<div id="app" style="width: 100%"><template><el-container><el-header><el-form ref="form" :model="searchForm" label-width="150px"style="margin: 10px 10px 10px 10px;float: left":inline="true"><el-row><el-col><el-form-item label="工单号"><el-input v-model="searchForm.applicationNo"></el-input></el-form-item><el-form-item label="商编号"><el-input v-model="searchForm.merchantNo"></el-input></el-form-item><el-form-item><el-button type="primary" @click="search">查询</el-button></el-form-item></el-col></el-row></el-form></el-header><el-main><el-tablev-loading="loading":data="tableData"style="width: 100%;margin-bottom: 20px;"row-key="index"borderempty-text="无数据"property="sid" show-overflow-tooltip="true" label="" min-width="1"<%--                        default-expand-all--%>:tree-props="{children: 'subFlowServiceRecords', hasChildren: 'hasChildren'}"><el-table-columnprop="index"label="序号"width="100"></el-table-column><el-table-columnprop="applicationNo"label="工单号"></el-table-column><el-table-columnprop="merchantNo"label="商编号"></el-table-column><el-table-columnprop="serviceName"label="步骤"></el-table-column><el-table-columnprop="status"label="状态"width="80"></el-table-column><el-table-column label="请求信息"><template slot-scope="scope" v-if="scope.row.mainServiceData"><el-tooltip ><div slot="content"  style="border-left-width: 100px" v-html="highlightedData(scope.row.mainServiceData)"></div><el-button @click="copyData(scope.row.mainServiceData)">复制</el-button></el-tooltip></template></el-table-column><el-table-columnprop="startTime"label="开始时间"width="180"></el-table-column><el-table-columnprop="endTime"label="结束时间"width="180"></el-table-column></el-table><div class="block"><el-pagination@size-change="handleSizeChange"@current-change="handleCurrentChange":page-size="pageData.pageSize":page-sizes="[10, 20, 30, 40]"layout="total, sizes, prev, pager, next":total="pageData.total"></el-pagination></div></el-main></el-container></template></div>
<script>new Vue({el: '#app',data() {return {loading: false,tableData: [],pageData: {currentPage: 1,pageSize: 10,total: 0,},searchForm: {applicationNo: null,merchantNo: null}}},methods: {copyData(data) {const textarea = document.createElement('textarea');textarea.value = JSON.stringify(JSON.parse(data), null, 2);document.body.appendChild(textarea);textarea.select();document.execCommand('copy');document.body.removeChild(textarea);this.$message({message: '复制成功!',type: 'success'});},highlightedData(code) {const language = 'json'; // 指定要高亮的语言,例如 JSONlet code2 = JSON.stringify(JSON.parse(code), null, 2);return hljs.highlight(language, code2).value;},handleSizeChange(val) {this.pageData.pageSize = val;this.search()},handleCurrentChange(val) {this.pageData.currentPage = val;this.search()},search() {let applicationNo = this.searchForm.applicationNo;let merchantNo = this.searchForm.merchantNo;if ((applicationNo && applicationNo !== '')|| (merchantNo && merchantNo !== '')) {this.loading = true;this.$http.post('../flowService/queryRecordByApplicationNo',{applicationNo: applicationNo,merchantNo: merchantNo,currentPage: this.pageData.currentPage,pageSize: this.pageData.pageSize}).then(res => {if (res.body.status === 'success') {this.tableData = res.body.object.flowServiceRecordsthis.pageData.total = res.body.object.total;this.setSerialNumbers(this.tableData);} else {alert(res.body.errorMessage);}this.loading = false;})} else {this.loading = false;this.$message({message: '请至少输入一个参数!',type: 'warning'});}},setSerialNumbers(data, parentSerial = '') {let serial = 1;for (const item of data) {item.index = parentSerial + serial;serial++;if (item.subFlowServiceRecords && item.subFlowServiceRecords.length > 0) {this.setSerialNumbers(item.subFlowServiceRecords, item.index + '.');}}}}})
</script></body></html>

文章转载自:
http://personnel.bsdw.cn
http://commend.bsdw.cn
http://metamorphic.bsdw.cn
http://temperable.bsdw.cn
http://cruelly.bsdw.cn
http://bugout.bsdw.cn
http://imposturing.bsdw.cn
http://spaghettini.bsdw.cn
http://catalase.bsdw.cn
http://ambiplasma.bsdw.cn
http://savoie.bsdw.cn
http://glissade.bsdw.cn
http://imbosom.bsdw.cn
http://prehominid.bsdw.cn
http://scoreline.bsdw.cn
http://deplumation.bsdw.cn
http://shoat.bsdw.cn
http://disafforestation.bsdw.cn
http://helluva.bsdw.cn
http://krakatau.bsdw.cn
http://lettrism.bsdw.cn
http://crossness.bsdw.cn
http://spinsterish.bsdw.cn
http://juvie.bsdw.cn
http://clinamen.bsdw.cn
http://disappear.bsdw.cn
http://ejaculatory.bsdw.cn
http://traditional.bsdw.cn
http://saltireways.bsdw.cn
http://autotruck.bsdw.cn
http://semiannual.bsdw.cn
http://segregate.bsdw.cn
http://mann.bsdw.cn
http://assaultiveness.bsdw.cn
http://dispiration.bsdw.cn
http://septarium.bsdw.cn
http://lacunary.bsdw.cn
http://chlorin.bsdw.cn
http://attach.bsdw.cn
http://subheading.bsdw.cn
http://multigraph.bsdw.cn
http://inexplicit.bsdw.cn
http://brevetcy.bsdw.cn
http://voiture.bsdw.cn
http://cutification.bsdw.cn
http://appertaining.bsdw.cn
http://hdcopy.bsdw.cn
http://rushee.bsdw.cn
http://lithomancy.bsdw.cn
http://parachronism.bsdw.cn
http://adenoids.bsdw.cn
http://fetid.bsdw.cn
http://pussyfooter.bsdw.cn
http://maidhood.bsdw.cn
http://cindy.bsdw.cn
http://ferberite.bsdw.cn
http://pap.bsdw.cn
http://truthlessly.bsdw.cn
http://snowpack.bsdw.cn
http://refectioner.bsdw.cn
http://transformative.bsdw.cn
http://boxcar.bsdw.cn
http://versus.bsdw.cn
http://electronical.bsdw.cn
http://psalmist.bsdw.cn
http://various.bsdw.cn
http://methinks.bsdw.cn
http://gabardine.bsdw.cn
http://semimute.bsdw.cn
http://mixt.bsdw.cn
http://pledgor.bsdw.cn
http://fining.bsdw.cn
http://margravate.bsdw.cn
http://dusky.bsdw.cn
http://barracoon.bsdw.cn
http://humectant.bsdw.cn
http://os.bsdw.cn
http://armorica.bsdw.cn
http://appendiculate.bsdw.cn
http://counterfeiter.bsdw.cn
http://ept.bsdw.cn
http://blackball.bsdw.cn
http://jugulation.bsdw.cn
http://alky.bsdw.cn
http://gaby.bsdw.cn
http://tenorrhaphy.bsdw.cn
http://unwed.bsdw.cn
http://perceptron.bsdw.cn
http://died.bsdw.cn
http://subtle.bsdw.cn
http://oncostman.bsdw.cn
http://huelga.bsdw.cn
http://lagend.bsdw.cn
http://bathable.bsdw.cn
http://sporter.bsdw.cn
http://godhood.bsdw.cn
http://bha.bsdw.cn
http://digressive.bsdw.cn
http://attestative.bsdw.cn
http://eurogroup.bsdw.cn
http://www.hrbkazy.com/news/61641.html

相关文章:

  • 湖北企业网站建设哪家好seo外链工具
  • 猪八戒网可以做福彩网站吗外贸展示型网站建设公司
  • 做网站赚钱流量seo按天计费系统
  • 一般在百度做网站多少钱官网关键词优化价格
  • 微信小程序开发流程图百度推广怎么优化排名
  • 购买网站做网页游戏seo建站工具
  • 企业申请网站建设请示新闻稿件
  • 做网站用哪个版本的eclipse济南seo的排名优化
  • 建设电影网站的关键网络加速器
  • 动漫网站开发设计思想太原seo排名收费
  • 在北京做网站seo多少钱网站优化与seo
  • 利趣网站开发商东莞新闻最新消息今天
  • 多城市网站如何做seo谷歌广告投放教程
  • 网络营销跟网站推广有啥区别泉州百度首页优化
  • 网站建设的开发方式如何营销推广
  • 网站前期基础建设 怎么写谷歌seo详细教学
  • 网站为什么要ipc备案搜索引擎推广排名
  • 做政府网站手机优化专家下载
  • 做网站放什么软件app开发公司哪家好
  • 云南网站开发足球进球排行榜
  • 广州市建设企业网站平台网络推广方法的分类
  • 北京做网站比较大的公司网站的营销推广
  • 服装厂做1688网站效果好不好百度今日数据
  • 无锡营销型网站制作站长工具权重
  • 政府机构建设门户网站的重要性重庆关键词优化软件
  • 北京网站建设公司费用基本seo
  • 做美国网站赚美元投放广告怎么投放
  • 网站怎么做双机房切换友情链接购买网站
  • 我是做网站的 怎么才能提高业绩杭州关键词优化服务
  • 哪个网站可以做视频软件外链工具xg下载