qa-prevention-gwj-vue/static/bi/index.html

2144 lines
73 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>秦安双控数据可视化平台</title>
<link rel="stylesheet" type="text/css" href="./css/style.css" />
<link rel="stylesheet" href="./swiper-master/package/swiper-bundle.min.css">
<script src="./js/vue.js"></script>
<script type="text/javascript" src="./js/jquery-3.3.1.min.js"></script>
<script src="../config.js"></script>
<script src="./js/sweetalert.min.js"></script>
<script src="./js/ezuikit.js"></script>
<script src="./swiper-master/package/swiper-bundle.min.js"></script>
<script src="https://statics.ys7.com/openweb/common/scripts/jquery-39b5fb0510.cookie.js"></script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@4/dist/echarts.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-gl@1/dist/echarts-gl.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-stat@1/dist/ecStat.min.js"></script> -->
<script src="./js/echarts/echarts.js"></script>
</head>
<style>
.tab-item{
height:100%
}
</style>
<body>
<div class="full-page" id="app">
<div class="header">
<div class="logo">
<img src="images/logo-title.png">
</div>
<div class="btn-group">
<a :href="weburl+'#/index'" class="home-btn"></a>
<a onclick="fullScreen()" class="full-btn"></a>
</div>
</div>
<div class="bi-main">
<div class="bi-left">
<div class="bi-step1">
<div class="step-title-left">
<h1>风险管控统计分析</h1>
<div class="step-name">
{{ corpinfo.CORP_NAME }}
</div>
</div>
<div class="round-box">
<div class="round-grap">
<h1>{{unitcount}}</h1>
<span>风险点(单元)</span>
</div>
<div class="round-jt">
</div>
<div class="round-grap">
<h1>{{idcount}}</h1>
<span>辨识部位</span>
</div>
<div class="round-jt">
</div>
<div class="round-grap">
<h1>{{acount+bcount+ccount+dcount}}</h1>
<span>存在风险</span>
</div>
</div>
</div>
<div class="bi-step2">
<div class="bi-step2-loop">
<span class="light"></span>
<span class="light"></span>
<span class="light"></span>
<span class="light"></span>
</div>
<div class="step-title step-int">
<h1 style="margin-top: 0.4vh;">隐患排查数据</h1>
<!-- <div class="step-run">-->
<!-- <ul class="slide-list js-slide-list">-->
<!-- <li class="odd" v-for="(data,index) in ideCheckRecordList">-->
<!-- <span>{{data.CHECK_TIME}}</span><span class="t2span">{{data.NAME}}</span>-->
<!-- <span class="t3span">{{data.PARTSNAME}}</span>-->
<!-- </li>-->
<!-- </ul>-->
<!-- </div>-->
</div>
<div class="hidden-box">
<div class="hidden-h1">
<div class="hidden-h1-lable">
企业人员数
</div>
<div class="hidden-h1-date">
<span class="color-blue f36">{{allUser}}</span>
</div>
</div>
<div class="hidden-h2">
<div class="hidden-h2-flex">
<div class="hidden-h2-lable">
部门
</div>
<div class="hidden-h2-date">
<span class="color-blue f22">{{allDep}}</span>
</div>
</div>
<div class="hidden-h2-flex">
<div class="hidden-h2-lable">
清单
</div>
<div class="hidden-h2-date">
<span class="color-blue f22">{{allList}}</span>
</div>
</div>
</div>
<div class="hidden-h3">
<div class="hidden-h3-lable">
清单类型占比指数
</div>
<div class="hidden-h3-date" id="listPercent">
</div>
</div>
</div>
</div>
<div class="bi-step3">
<div class="step-title step-int">
<h1>任务处理情况</h1>
<ul class="step-tabs w160">
<li id="rcli" class="actived" @click="qhtab('rcli')">隐患处理</li>
<li id="yhli" @click="qhtab('yhli')">日常检查</li>
</ul>
</div>
<div v-if="showTask == 1" class="task-box swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-nian.png">
</div>
<div class="title">
本年隐患
</div>
</div>
<el-tooltip class="item" effect="dark" content="本周期除已验收、已归档的重大隐患、忽略隐患及重大隐患以外的数量" placement="top">
<div class="task-text">
<div class="title">
待处理
</div>
<div class="color-blue f22">
{{hdCount.yearUncheck}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="本周期已验收、已归档的重大隐患、忽略隐患及重大隐患的数量" placement="top">
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{hdCount.yearChecked}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="(本周期已处理/(本周期待处理+本周期已处理))*100%" placement="top">
<div class="task-text">
<div class="title">
隐患整改率
</div>
<div class="color-org">
<span
class="f22">{{hdCount.yearTotal==0?0:((hdCount.yearChecked/hdCount.yearTotal*100).toFixed(2))}}</span>
<span class="f14">%</span>
</div>
</div>
</el-tooltip>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-ji.png">
</div>
<div class="title">
本季隐患
</div>
</div>
<el-tooltip class="item" effect="dark" content="本周期除已验收、已归档的重大隐患、忽略隐患及重大隐患以外的数量" placement="top">
<div class="task-text">
<div class="title">
待处理
</div>
<div class="color-blue f22">
{{hdCount.quarterUncheck}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="本周期已验收、已归档的重大隐患、忽略隐患及重大隐患的数量" placement="top">
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{hdCount.quarterChecked}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="(本周期已处理/(本周期待处理+本周期已处理))*100%" placement="top">
<div class="task-text">
<div class="title">
隐患整改率
</div>
<div class="color-org">
<span
class="f22">{{hdCount.quarterTotal==0?0:((hdCount.quarterChecked/hdCount.quarterTotal*100).toFixed(2))}}</span>
<span class="f14">%</span>
</div>
</div>
</el-tooltip>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-yue.png">
</div>
<div class="title">
本月隐患
</div>
</div>
<el-tooltip class="item" effect="dark" content="本周期除已验收、已归档的重大隐患、忽略隐患及重大隐患以外的数量" placement="top">
<div class="task-text">
<div class="title">
待处理
</div>
<div class="color-blue f22">
{{hdCount.monthUncheck}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="本周期已验收、已归档的重大隐患、忽略隐患及重大隐患的数量" placement="top">
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{hdCount.monthChecked}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="(本周期已处理/(本周期待处理+本周期已处理))*100%" placement="top">
<div class="task-text">
<div class="title">
隐患整改率
</div>
<div class="color-org">
<span
class="f22">{{hdCount.monthTotal==0?0:((hdCount.monthChecked/hdCount.monthTotal*100).toFixed(2))}}</span>
<span class="f14">%</span>
</div>
</div>
</el-tooltip>
</div>
</div>
<div class="swiper-slide">
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-xun.png">
</div>
<div class="title">
本旬隐患
</div>
</div>
<el-tooltip class="item" effect="dark" content="本周期除已验收、已归档的重大隐患、忽略隐患及重大隐患以外的数量" placement="top">
<div class="task-text">
<div class="title">
待处理
</div>
<div class="color-blue f22">
{{hdCount.xunUncheck}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="本周期已验收、已归档的重大隐患、忽略隐患及重大隐患的数量" placement="top">
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{hdCount.xunChecked}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="(本周期已处理/(本周期待处理+本周期已处理))*100%" placement="top">
<div class="task-text">
<div class="title">
隐患整改率
</div>
<div class="color-org">
<span
class="f22">{{hdCount.xunTotal==0?0:((hdCount.xunChecked/hdCount.xunTotal*100).toFixed(2))}}</span>
<span class="f14">%</span>
</div>
</div>
</el-tooltip>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-zou.png">
</div>
<div class="title">
本周隐患
</div>
</div>
<el-tooltip class="item" effect="dark" content="本周期除已验收、已归档的重大隐患、忽略隐患及重大隐患以外的数量" placement="top">
<div class="task-text">
<div class="title">
待处理
</div>
<div class="color-blue f22">
{{hdCount.weekUncheck}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="本周期已验收、已归档的重大隐患、忽略隐患及重大隐患的数量" placement="top">
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{hdCount.weekChecked}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="(本周期已处理/(本周期待处理+本周期已处理))*100%" placement="top">
<div class="task-text">
<div class="title">
隐患整改率
</div>
<div class="color-org">
<span
class="f22">{{hdCount.weekTotal==0?0:((hdCount.weekChecked/hdCount.weekTotal*100).toFixed(2))}}</span>
<span class="f14">%</span>
</div>
</div>
</el-tooltip>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-ri.png">
</div>
<div class="title">
本日隐患
</div>
</div>
<el-tooltip class="item" effect="dark" content="本周期除已验收、已归档的重大隐患、忽略隐患及重大隐患以外的数量" placement="top">
<div class="task-text">
<div class="title">
待处理
</div>
<div class="color-blue f22">
{{hdCount.dayUncheck}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="本周期已验收、已归档的重大隐患、忽略隐患及重大隐患的数量" placement="top">
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{hdCount.dayChecked}}
</div>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="(本周期已处理/(本周期待处理+本周期已处理))*100%" placement="top">
<div class="task-text">
<div class="title">
隐患整改率
</div>
<div class="color-org">
<span
class="f22">{{hdCount.dayTotal==0?0:((hdCount.dayChecked/hdCount.dayTotal*100).toFixed(2))}}</span>
<span class="f14">%</span>
</div>
</div>
</el-tooltip>
</div>
</div>
</div>
</div>
<div v-else-if="showTask == 2" class="task-box swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-ri.png">
</div>
<div class="title">
本日应检查
</div>
</div>
<div class="task-text">
<div class="title">
待检查
</div>
<div class="color-blue f22">
{{listCountDay.denominator-listCountDay.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
已检查
</div>
<div class="color-blue f22">
{{listCountDay.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
本日完成率
</div>
<div class="color-org">
<span class="f22">{{listCountDay.percentage}}</span>
<span class="f14">%</span>
</div>
</div>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-zou.png">
</div>
<div class="title">
本周应检查
</div>
</div>
<div class="task-text">
<div class="title">
待检查
</div>
<div class="color-blue f22">
{{listCountWeek.denominator-listCountWeek.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
已检查
</div>
<div class="color-blue f22">
{{listCountWeek.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
本周完成率
</div>
<div class="color-org">
<span class="f22">{{listCountWeek.percentage}}</span>
<span class="f14">%</span>
</div>
</div>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-xun.png">
</div>
<div class="title">
本旬应检查
</div>
</div>
<div class="task-text">
<div class="title">
待检查
</div>
<div class="color-blue f22">
{{listCountXun.denominator-listCountXun.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
已检查
</div>
<div class="color-blue f22">
{{listCountXun.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
本旬完成率
</div>
<div class="color-org">
<span class="f22">{{listCountXun.percentage}}</span>
<span class="f14">%</span>
</div>
</div>
</div>
</div>
<div class="swiper-slide">
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-yue.png">
</div>
<div class="title">
本月应检查
</div>
</div>
<div class="task-text">
<div class="title">
待检查
</div>
<div class="color-blue f22">
{{listCountMonth.denominator-listCountMonth.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
已检查
</div>
<div class="color-blue f22">
{{listCountMonth.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
本月完成率
</div>
<div class="color-org">
<span class="f22">{{listCountMonth.percentage}}</span>
<span class="f14">%</span>
</div>
</div>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-ji.png">
</div>
<div class="title">
本季应检查
</div>
</div>
<div class="task-text">
<div class="title">
待检查
</div>
<div class="color-blue f22">
{{listCountQuarter.denominator-listCountQuarter.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
已处理
</div>
<div class="color-blue f22">
{{listCountQuarter.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
本季完成率
</div>
<div class="color-org">
<span class="f22">{{listCountQuarter.percentage}}</span>
<span class="f14">%</span>
</div>
</div>
</div>
<div class="task-item">
<div class="task-textsp">
<div class="task-icon">
<img src="images/icon-nian.png">
</div>
<div class="title">
本年应检查
</div>
</div>
<div class="task-text">
<div class="title">
待检查
</div>
<div class="color-blue f22">
{{listCountYear.denominator-listCountYear.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
已检查
</div>
<div class="color-blue f22">
{{listCountYear.molecule}}
</div>
</div>
<div class="task-text">
<div class="title">
本年完成率
</div>
<div class="color-org">
<span class="f22">{{listCountYear.percentage}}</span>
<span class="f14">%</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
</div>
<div class="bi-center">
<div class="map-step">
<div class="import-map">
<iframe src="tree/index.html" style="border: none" width="100%" height="100%" scrolling="no"></iframe>
</div>
</div>
<div class="bi-step-bottom">
<div class="bi-step7">
<div class="step-title step-interval">
<h1>隐患处理情况分析</h1>
</div>
<div class="chart-bread" id="hdclasscard">
</div>
</div>
<div class="bi-step8">
<div class="step-title step-interval">
<h1>视频中心</h1>
<ul class="step-tabs w240">
<li id="ptli" @click="qiehuan('ptli')">企业监控</li>
<li v-if="isshow==true" id="qysxt" @click="qiehuan('qysxt')">企业监控</li>
<li id="qyli" class="actived" @click="qiehuan('qyli')">企业视频</li>
</ul>
</div>
<div class="chart-video">
<div v-show="showVideoType == 1" class="tab-item show" id="ptDiv">
<iframe :src="url" width="100%" height="100%" allowfullscreen allow="autoplay; fullscreen" style="position: relative;border:none"></iframe>
</div>
<div v-show="showVideoType == 2" class="tab-item" id="qyVidoDiv" style="position: relative;">
<iframe :src="qurl" width="100%" height="100%" allowfullscreen allow="autoplay; fullscreen" style="position: relative;border:none"></iframe>
</div>
<div v-show="showVideoType == 3" class="tab-item" id="qyDiv">
<!-- <iframe :src="qqurl" width="100%" height="100%" allowfullscreen allow="autoplay; fullscreen" style="position: relative;border:none"></iframe>-->
<video
id="cpVideo"
ref="cpVideo"
:src="url"
style="height: 100%; width: 100%; border: none; "
autoplay="true"
preload="auto"
loop
controls="controls"/>
</div>
</div>
</div>
</div>
</div>
<div class="bi-right">
<div class="bi-step4">
<div class="step-title-right">
<div class="step-name">
秦皇岛港股份有限公司
</div>
<!-- <div class="step-name">
邢台市应急管理宣传教育培训中心
</div>-->
<ul>
<li id="corp" @click="changeNotice('corp')" class="actived">排查信息</li>
<li id="platform" @click="changeNotice('platform')">平台公告</li>
</ul>
</div>
<div v-show="showNotice == 'corp'">
<ul :class="corpNotice.length > 3?'slide-list1 js-slide-list1':''">
<!-- <li class="odd" v-for="(data,index) in corpNotice">-->
<!-- <div class="notice-content" style="height: 100px" >-->
<!-- <span>{{data.SYNOPSIS.length>80?data.SYNOPSIS.substring(0,80)+"...":data.SYNOPSIS}}</span>-->
<!-- </div>-->
<!-- </li>-->
<li class="odd" v-for="(data,index) in ideCheckRecordList">
<div class="notice-content" style="height: 100px" >
<span>{{data.CHECK_TIME}}</span><span class="t2span">{{data.NAME}}</span>
<span class="t3span">{{data.PARTSNAME}}</span>
</div>
</li>
</ul>
</div>
<div class="notice-content" id="platformNotice" v-show="showNotice == 'platform'"></div>
</div>
<div class="bi-step5">
<div class="bi-step5-loop">
<span class="light"></span>
<span class="light"></span>
<span class="light"></span>
<span class="light"></span>
</div>
<div class="step-title step-interval">
<h1>隐患整改趋势统计</h1>
</div>
<div class="chart-song" id="hiddenNum">
</div>
</div>
<div class="bi-step6">
<div class="step-title step-interval">
<h1>风险分布情况</h1>
</div>
<div class="chart-zhu" id="riskcard">
</div>
</div>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">
var vm = new Vue({
el: '#app',
data: {
days15: [],
day_nhd: [],
day_zhd: [],
wzgcount: 0,
dyscount: 0,
yyscount: 0,
ygqcount: 0,
hdclass: [],
allcount: 0,
// acount: 0,
// bcount: 0,
// ccount: 0,
// dcount: 0,
totalRisk: 0,
// idcount: 0,
unfinishcount: 0,
hidCount: [],
fileList: [],
listCount: 0,
ptVideo: '',
cpVideo: '',
hdCount: {},
listCountDay: [],
listCountWeek: [],
listCountXun: [],
listCountMonth: [],
listCountQuarter: [],
listCountYear: [],
ideCheckRecordList: [],
corpinfo: [],
decoder: [],
isshow: false,
url: '',
eurl: '',
qurl: '',
qqurl: '',
token: '',
corpNotice: [], // 企业公告
platformNotice: [], // 平台公告
showNotice: 'corp', // 显示的公告
acount: 0, // 风险点、辨识部位、存在风险
bcount: 0,
ccount: 0,
dcount: 0,
idcount: 0,
unitcount: 0, // 风险点、辨识部位、存在风险
allUser: 0,
workUser: 0,
allDep: 0,
workDep: 0,
allList: 0,
workList: 0,
showVideoType: 3,
showTask: 1,
weburl: config.weburl
},
mounted() {
this.init()
},
methods: {
// 初始执行
init() {
var _this = this
this.getData()
var intervalId = setInterval(function() {
_this.getData()
}, 3600000)
var intervalId = setInterval(function() {
_this.listLogByIde()
}, 300000)
},
getData: function() {
this.getStatistics()
// this.getFolderList();
// this.getWorkNumber();
// this.getList();
this.getVideoList()
this.getHdCount()
this.getListCount()
this.getCorpInfo()
this.getIsshow()
this.countListByType()
this.listLogByIde()
this.countNumBi()
// this.getRiskCount();
this.getCorpNotice()
this.getPlatformNotice()
this.getHiddenNum()
},
// BI页
getHiddenNum: function() {
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/hiddenSta',
data: {},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
// 任务清理状况线性图开始
var hiddenNum = document.getElementById('hiddenNum')
var hiddenNumChart = echarts.init(hiddenNum)
var hiddenNumOption = null
var hiddenNumOption = {
tooltip: {
trigger: 'axis'
},
legend: {
top: 10,
data: [
{ name: '隐患数', textStyle: { color: '#70c5ff' }},
{ name: '未整改隐患数', textStyle: { color: '#70c5ff' }},
{ name: '已整改隐患数', textStyle: { color: '#70c5ff' }}
]
},
grid: {
left: '3%',
right: '4%',
bottom: '4%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: data.names,
axisLine: {
lineStyle: {
color: '#70c5ff'
}
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
color: '#70c5ff'
}
}
},
series: [
{
name: '隐患数',
type: 'line',
stack: '总量',
data: data.all,
itemStyle: {
normal: {
color: '#fa1f5a',
lineStyle: {
color: '#fa1f5a'
}
}
}
},
{
name: '未整改隐患数',
type: 'line',
stack: '总量',
data: data.wzg,
itemStyle: {
normal: {
color: '#ff985a',
lineStyle: {
color: '#ff985a'
}
}
}
},
{
name: '已整改隐患数',
type: 'line',
stack: '总量',
data: data.yzg,
itemStyle: {
normal: {
color: '#3ca272',
lineStyle: {
color: '#3ca272'
}
}
}
}
]
}
if (hiddenNumOption && typeof hiddenNumOption === 'object') {
hiddenNumChart.setOption(hiddenNumOption, true)
}
// /任务清理状况线性图开始
} else if (data.result == 'exception') {
showException('通知公告', data.exception)// 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
qhtab: function(value) {
if (value == 'rcli') {
$('#rcli').attr('class', 'actived')
$('#yhli').removeClass('actived')
this.showTask = 1
} else if (value == 'yhli') {
$('#yhli').attr('class', 'actived')
$('#rcli').removeClass('actived')
this.showTask = 2
}
},
qiehuan: function(value) {
var ptVideo = document.getElementById('ptVideo')
var cpVideo = document.getElementById('cpVideo')
if (value == 'ptli') {
$('#ptli').attr('class', 'actived')
$('#qyli').removeClass('actived')
$('#qysxt').removeClass('actived')
this.showVideoType = 1
/* $("#ptDiv").attr("class", "show");
$("#qyDiv").attr("class", "tab-item");
$("#qyVidoDiv").attr("class", "tab-item");*/
ptVideo.play()
cpVideo.pause()
} else if (value == 'qysxt') {
$('#qysxt').attr('class', 'actived')
$('#ptli').removeClass('actived')
$('#qyli').removeClass('actived')
this.showVideoType = 2
/* $("#ptDiv").attr("class", "tab-item");
$("#qyVidoDiv").attr("class", "show");
$("#qyDiv").attr("class", "tab-item");*/
ptVideo.pause()
this.bofang()
cpVideo.pause()
} else {
$('#qyli').attr('class', 'actived')
$('#ptli').removeClass('actived')
$('#qysxt').removeClass('actived')
this.showVideoType = 3
/* $("#ptDiv").attr("class", "tab-item");
$("#qyVidoDiv").attr("class", "tab-item");
$("#qyDiv").attr("class", "show");*/
ptVideo.pause()
cpVideo.play()
}
},
// 根据分类统计清单
countListByType: function() {
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'listmanager/countListByType',
data: {},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
// 清单类型饼状图开始
var listPercent = document.getElementById('listPercent')
var lpmyChart = echarts.init(listPercent)
var lpOption = null
var lpOption = {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
series: [
{
name: '清单类型',
type: 'pie',
radius: ['40%', '70%'],
center: ['50%', '58%'],
color: ['#77c8ff', '#d59b52', '#006fd1', '#df1f20', '#4be48c'],
data: data.datas,
labelLine: {
normal: {
length: 5, // 改变标示线的长度
lineStyle: {
color: '#70c5ff' // 改变标示线的颜色
}
}
},
itemStyle: {
normal: {
label: {
color: '#70c5ff'
}
}
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
}
if (lpOption && typeof lpOption === 'object') {
lpmyChart.setOption(lpOption, true)
}
// 清单类型饼状图结束
} else if (data.result == 'exception') {
showException('通知公告', data.exception)// 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// BI页隐患排查人员/部门/清单数据
countNumBi: function() {
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'checkrecord/countNumBi',
data: {},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
vm.allUser = data.allUser
vm.workUser = data.workUser
vm.allDep = data.allDep
vm.workDep = data.workDep
vm.allList = data.allList
vm.workList = data.workList
} else if (data.result == 'exception') {
showException('通知公告', data.exception)// 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 获取企业公告(第一条)
getCorpNotice: function() {
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'noticecorp/getAllPlaNewNotice',
data: { STATUS: '1', tm: new Date().getTime() },
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
vm.corpNotice = data.varList
// if (vm.corpNotice != null && vm.corpNotice != '') {
// $("#corpNotice").html(vm.corpNotice.SYNOPSIS)
// }
} else if (data.result == 'exception') {
showException('通知公告', data.exception)// 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 获取平台公告(第一条)
getPlatformNotice: function() {
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'service/notice/getNewNotice',
data: { STATUS: 1, tm: new Date().getTime() },
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
vm.platformNotice = data.pd
if (vm.platformNotice != null && vm.platformNotice != '') {
$('#platformNotice').html(vm.platformNotice.SYNOPSIS)
}
} else if (data.result == 'exception') {
showException('企业通知公告', data.exception)// 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 切换显示公告
changeNotice: function(type) {
if (type == 'corp') {
$('#corp').attr('class', 'actived')
$('#platform').removeClass('actived')
this.showNotice = 'corp'
} else {
$('#platform').attr('class', 'actived')
$('#corp').removeClass('actived')
this.showNotice = 'platform'
}
},
// 查询风险点、辨识部位、存在风险
/* getRiskCount: function(){
$.ajax({
xhrFields: {
withCredentials: true
},
type: "POST",
url: config.httpurl+'riskpoint/statistic',
data: {tm:new Date().getTime()},
dataType:"json",
success: function(data) {
if ("success" == data.result) {
if(data.idAll && data.idAll.length>0){
vm.idcount=data.idAll.length;
}
if(data.unitAll && data.unitAll.length>0){
vm.unitcount=data.unitAll.length;
}
for(var i=0;data.riskAll.length>i;i++){
if(data.riskAll[i].LEVELID && data.riskAll[i].LEVELID=='levelA') {
vm.acount=data.riskAll[i].COUNT;
}
if(data.riskAll[i].LEVELID && data.riskAll[i].LEVELID=='levelB') {
vm.bcount=data.riskAll[i].COUNT;
}
if(data.riskAll[i].LEVELID && data.riskAll[i].LEVELID=='levelC') {
vm.ccount=data.riskAll[i].COUNT;
}
if(data.riskAll[i].LEVELID && data.riskAll[i].LEVELID=='levelD') {
vm.dcount=data.riskAll[i].COUNT;
}
}
var total=vm.acount+vm.bcount+vm.ccount+vm.dcount
}
}
}).done().fail(function(){
swal("登录失效!", "请求服务器无响应,稍后再试", "warning");
setTimeout(function () {
window.location.href = config.weburl+"#/login";
}, 2000);
});
},*/
getStatistics: function() {
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/statistic',
data: {
isBI: 1,
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
for (var i = 0; data.hdAll.length > i; i++) {
if (data.hdAll[i].STATE && data.hdAll[i].STATE == 1) {
vm.wzgcount += data.hdAll[i].count
}
if (data.hdAll[i].STATE && data.hdAll[i].STATE == 3) {
vm.dyscount += data.hdAll[i].count
}
if (data.hdAll[i].STATE && data.hdAll[i].STATE == 4) {
vm.yyscount += data.hdAll[i].count
}
if (data.hdAll[i].STATE && data.hdAll[i].STATE == -1) {
vm.ygqcount += data.hdAll[i].count
}
}
vm.allcount = vm.wzgcount + vm.dyscount + vm.yyscount + vm.ygqcount
// 隐患饼图开始
var hdclasscard = document.getElementById('hdclasscard')
var hdclassmyChart = echarts.init(hdclasscard)
var hdclassoption = null
var hdclassoption = {
color: ['#2085ca', '#df1f20', '#77c8ff', '#9e8a6a'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
series: [
{
name: '隐患状态',
type: 'pie',
radius: [40, 86],
center: ['50%', '50%'],
// roseType: 'radius',
itemStyle: {
borderRadius: 5
},
data: [
{ value: vm.dyscount, name: '待验收' },
{ value: vm.wzgcount, name: '未整改' },
{ value: vm.yyscount, name: '已验收' },
{ value: vm.ygqcount, name: '已过期' }
],
labelLine: {
normal: {
length: 5, // 改变标示线的长度
lineStyle: {
color: '#70c5ff' // 改变标示线的颜色
}
}
},
itemStyle: {
normal: {
label: {
color: '#70c5ff'
}
}
}
}
]
}
if (hdclassoption && typeof hdclassoption === 'object') {
hdclassmyChart.setOption(hdclassoption, true)
}
// 隐患饼图结束
} else {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'riskpoint/statistic',
data: {
isBI: 1,
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
if (data.idAll && data.idAll.length > 0) {
vm.idcount = data.idAll.length
}
if (data.unitAll && data.unitAll.length > 0) {
vm.unitcount = data.unitAll.length
}
for (var i = 0; data.riskAll.length > i; i++) {
if (data.riskAll[i].LEVELID && data.riskAll[i].LEVELID ==
'levelA') {
vm.acount = data.riskAll[i].COUNT
}
if (data.riskAll[i].LEVELID && data.riskAll[i].LEVELID ==
'levelB') {
vm.bcount = data.riskAll[i].COUNT
}
if (data.riskAll[i].LEVELID && data.riskAll[i].LEVELID ==
'levelC') {
vm.ccount = data.riskAll[i].COUNT
}
if (data.riskAll[i].LEVELID && data.riskAll[i].LEVELID ==
'levelD') {
vm.dcount = data.riskAll[i].COUNT
}
}
var total = vm.acount + vm.bcount + vm.ccount + vm.dcount
vm.totalRisk = total
// 风险雷达图开始
var riskcard = document.getElementById('riskcard')
var riskmyChart = echarts.init(riskcard)
var riskoption = null
var riskoption = {
title: {},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: '{a1} <br/>{b1}: {c1} ({c0}%)'
},
legend: {
'show': false,
data: ['风险率', '风险数']
},
grid: {
left: '8%',
right: '4%',
bottom: '3%',
top: '0%',
containLabel: true
},
xAxis: {
'show': false,
type: 'value',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: ['低风险', '一般风险', '较大风险', '重大风险'],
axisLabel: {
show: true,
textStyle: {
color: '#8DB6DB'
}
}
},
series: [
{
name: '...',
type: 'line',
symbolSize: 0, // symbol的大小设置为0
showSymbol: false, // 不显示symbol
lineStyle: {
width: 0, // 线宽是0
color: 'rgba(0, 0, 0, 0)' // 线的颜色是透明的
},
data: [total == 0 ? 0 : ((vm.acount / total * 100).toFixed(2)), total == 0 ? 0 : ((vm.bcount / total * 100).toFixed(2)), total == 0 ? 0 : ((vm.ccount / total * 100).toFixed(2)), total == 0 ? 0 : ((vm.acount / total * 100).toFixed(2))]
},
{
name: '风险数',
type: 'bar',
data: [
vm.dcount,
vm.ccount,
vm.bcount,
vm.acount
],
label: {
show: true,
position: 'right',
color: '#0ee6fb'
},
barWidth: 20,
itemStyle: {
normal: {
color: function(params) {
var colorlist = ['#1b89df', '#d9cd13', '#d16924', '#d12424']
return colorlist[params.dataIndex]
}
}
}
}
]
}
if (riskoption && typeof riskoption === 'object') {
riskmyChart.setOption(riskoption, true)
}
// 风险雷达图结束
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
getCorpInfo: function() {
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'corpinfo/goEdit',
data: {
KEYWORDS: this.KEYWORDS,
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
vm.corpinfo = data.pd
} else if (data.result == 'exception') {
showException('驾驶舱', data.exception) // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 获取列表
getList: function() {
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'listmanager/list?showCount=15&currentPage=1',
data: {
KEYWORDS: this.KEYWORDS,
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
vm.listCount = data.page.totalResult
} else if (data.result == 'exception') {
showException('驾驶舱', data.exception) // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 获取列表
getFolderList: function() {
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'mfolder/list?showCount=15&currentPage=1',
data: {
isBI: 1,
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
vm.fileList = data.varList
} else if (data.result == 'exception') {
showException('文件管理', data.exception) // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 获取列表
getVideoList: function() {
var _this = this
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'video/getObjectForBiLogin',
data: {
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
if (data.ptVarList.length > 0) { // 平台的视频
_this.ptVideo = config.fileUrl + data.ptVarList[0].FILEPATH
var videoSrc = _this.ptVideo // 新的视频播放地址
document.getElementById('ptVideo').src = videoSrc
document.getElementById('ptVideo').play()
}
if (data.cpvarList.length > 0) { // 管理视频
_this.cpVideo = config.fileUrl + data.cpvarList[0].FILEPATH
var cpVideo = _this.cpVideo // 新的视频播放地址
document.getElementById('cpVideo').src = cpVideo
}
} else if (data.result == 'exception') {
showException('文件管理', data.exception) // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
// 下载
downloadFile: function(MFOLDER_ID) {
swal({
title: '',
text: '确定要下载此文件吗?',
icon: 'warning',
buttons: true,
dangerMode: true
}).then((willDelete) => {
if (willDelete) {
window.location.href = config.httpurl + 'mfolder/download?MFOLDER_ID=' + MFOLDER_ID
}
})
},
getWorkNumber: function() {
var _this = this
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getCountByCorpId',
data: {
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hidCount = data.hidCount
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
getIsshow: function() {
var _this = this
this.loading = true
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'vidomanager/getISshow',
data: {
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
if (data.varList.length > 0) {
_this.isshow = true
_this.url = data.varList[0].VIDOURL + '&aspect=600x300'
_this.qurl = data.varList[1].VIDOURL + '&aspect=600x300'
_this.qqurl = data.varList[2].VIDOURL + '&aspect=600x300'
_this.token = data.token
}
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
getHdCount: function() {
var _this = this
// 日隐患数
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getBICount',
data: {
IS_DAY: 1,
RECTIFNow: "1",
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hdCount.dayTotal = data.total
_this.hdCount.dayChecked = data.checked
_this.hdCount.dayUncheck = data.uncheck
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
// 周隐患数
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getBICount',
data: {
IS_WEEK: 1,
RECTIFNow: "1",
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hdCount.weekTotal = data.total
_this.hdCount.weekChecked = data.checked
_this.hdCount.weekUncheck = data.uncheck
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
// 旬隐患数
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getBICount',
data: {
IS_XUN: 1,
RECTIFNow: "1",
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hdCount.xunTotal = data.total
_this.hdCount.xunChecked = data.checked
_this.hdCount.xunUncheck = data.uncheck
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
// 月隐患数
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getBICount',
data: {
IS_MONTH: 1,
RECTIFNow: "1",
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hdCount.monthTotal = data.total
_this.hdCount.monthChecked = data.checked
_this.hdCount.monthUncheck = data.uncheck
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
// 季度隐患数
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getBICount',
data: {
IS_QUARTER: 1,
RECTIFNow: "1",
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hdCount.quarterTotal = data.total
_this.hdCount.quarterChecked = data.checked
_this.hdCount.quarterUncheck = data.uncheck
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
// 年隐患数
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'hidden/getBICount',
data: {
IS_YEAR: 1,
RECTIFNow: "1",
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.hdCount.yearTotal = data.total
_this.hdCount.yearChecked = data.checked
_this.hdCount.yearUncheck = data.uncheck
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
goNext: function() {
window.location.href = '../views/sys/index/index.html'
},
listLogByIde: function() {
var _this = this
// 日检查
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'checkrecord/listLogByIde',
data: {
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.ideCheckRecordList = data.varList
if (_this.ideCheckRecordList != null && _this.ideCheckRecordList
.length > 0) {
for (var i = 0; i < _this.ideCheckRecordList.length; i++) {
if (_this.ideCheckRecordList[i].PARTSNAME.length > 6) {
_this.ideCheckRecordList[i].PARTSNAME = _this
.ideCheckRecordList[i].PARTSNAME.substring(0, 6) +
'...'
}
}
}
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
},
getListCount: function() {
var _this = this
// 日检查
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'checkrecord/goBiListCount',
data: {
COUNTTYPE: 'day',
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
if (data.result == 'success') {
_this.listCountDay = data.all
vm.$forceUpdate() // 强制刷新
} else if (data.result == 'exception') {
showException('系统首页', '数据异常') // 显示异常
}
}
}).done().fail(function() {
swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
setTimeout(function() {
window.location.href = config.weburl + '#/login'
}, 2000)
})
// 周检查
// $.ajax({
// xhrFields: {
// withCredentials: true
// },
// type: 'POST',
// url: config.httpurl + 'checkrecord/goBiListCount',
// data: {
// COUNTTYPE: 'week',
// tm: new Date().getTime()
// },
// dataType: 'json',
// success: function(data) {
// if (data.result == 'success') {
// _this.listCountWeek = data.all
// vm.$forceUpdate() // 强制刷新
// } else if (data.result == 'exception') {
// showException('系统首页', '数据异常') // 显示异常
// }
// }
// }).done().fail(function() {
// swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
// setTimeout(function() {
// window.location.href = config.weburl + '#/login'
// }, 2000)
// })
// 旬检查
// $.ajax({
// xhrFields: {
// withCredentials: true
// },
// type: 'POST',
// url: config.httpurl + 'checkrecord/goBiListCount',
// data: {
// COUNTTYPE: 'xun',
// tm: new Date().getTime()
// },
// dataType: 'json',
// success: function(data) {
// if (data.result == 'success') {
// _this.listCountXun = data.all
// vm.$forceUpdate() // 强制刷新
// } else if (data.result == 'exception') {
// showException('系统首页', '数据异常') // 显示异常
// }
// }
// }).done().fail(function() {
// swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
// setTimeout(function() {
// window.location.href = config.weburl + '#/login'
// }, 2000)
// })
// 月检查
// $.ajax({
// xhrFields: {
// withCredentials: true
// },
// type: 'POST',
// url: config.httpurl + 'checkrecord/goBiListCount',
// data: {
// COUNTTYPE: 'month',
// tm: new Date().getTime()
// },
// dataType: 'json',
// success: function(data) {
// if (data.result == 'success') {
// _this.listCountMonth = data.all
// vm.$forceUpdate() // 强制刷新
// } else if (data.result == 'exception') {
// showException('系统首页', '数据异常') // 显示异常
// }
// }
// }).done().fail(function() {
// swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
// setTimeout(function() {
// window.location.href = config.weburl + '#/login'
// }, 2000)
// })
// 季检查
// $.ajax({
// xhrFields: {
// withCredentials: true
// },
// type: 'POST',
// url: config.httpurl + 'checkrecord/goBiListCount',
// data: {
// COUNTTYPE: 'quarter',
// tm: new Date().getTime()
// },
// dataType: 'json',
// success: function(data) {
// if (data.result == 'success') {
// _this.listCountQuarter = data.all
// vm.$forceUpdate() // 强制刷新
// } else if (data.result == 'exception') {
// showException('系统首页', '数据异常') // 显示异常
// }
// }
// }).done().fail(function() {
// swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
// setTimeout(function() {
// window.location.href = config.weburl + '#/login'
// }, 2000)
// })
// 年检查
// $.ajax({
// xhrFields: {
// withCredentials: true
// },
// type: 'POST',
// url: config.httpurl + 'checkrecord/goBiListCount',
// data: {
// COUNTTYPE: 'year',
// tm: new Date().getTime()
// },
// dataType: 'json',
// success: function(data) {
// if (data.result == 'success') {
// _this.listCountYear = data.all
// vm.$forceUpdate() // 强制刷新
// } else if (data.result == 'exception') {
// showException('系统首页', '数据异常') // 显示异常
// }
// }
// }).done().fail(function() {
// swal('登录失效!', '请求服务器无响应,稍后再试', 'warning')
// setTimeout(function() {
// window.location.href = config.weburl + '#/login'
// }, 2000)
// })
},
// 退出系统
logout: function() {
swal({
title: '',
text: '确定要退出系统吗?',
icon: 'warning',
buttons: true,
dangerMode: true
}).then((willDelete) => {
if (willDelete) {
this.goOut('0')
}
})
},
// 下线
goOut: function(msg) {
$.ajax({
xhrFields: {
withCredentials: true
},
type: 'POST',
url: config.httpurl + 'main/logout',
data: {
tm: new Date().getTime()
},
dataType: 'json',
success: function(data) {
window.location.href = config.weburl + '#/login'
}
}).done().fail(function() {
window.location.href = config.weburl + '#/login'
})
},
// 打开标签
siMenu: function(forward) {
window.location.href = '../views/sys/index/index.html'
sessionStorage.setItem('forward', forward)
}, handleError: function(e) {
console.log('捕获到错误', e)
// alert(e)
},
bofang: function() {
var url = this.url
var accessToken = this.token
var decoder = new EZUIKit.EZUIPlayer({
id: 'qyDivplay',
autoplay: true,
url: url,
accessToken: accessToken,
decoderPath: './js/ezuikit_v3.4/',
width: 600,
height: 240,
handleError: this.handleError
})
this.decoder = decoder
},
fullScreen: function() {
this.decoder.fullScreen()
},
capturePicture: function() {
// decoder.capturePicture(0,'default');
/* 截图方法2*/
var capturePicturePromise = this.decoder.capturePicture(0, 'default')
capturePicturePromise.then(function(data) {
console.log('截图成功,用户执行关闭成功后的操作', data)
})
},
enableZoom() {
this.decoder.enableZoom()
},
closeZoom() {
this.decoder.closeZoom()
}
}
})
var doscroll = function() {
var $parent = $('.js-slide-list')
var $first = $parent.find('li:first')
var height = $first.height()
$first.animate({
height: 0 // 或者改成: marginTop: -height + 'px'
}, 500, function() { // 动画结束后,把它插到最后,形成无缝
$first.css('height', height).appendTo($parent)
// $first.css('marginTop', 0).appendTo($parent);
})
}
setInterval(function() {
doscroll()
}, 2000)
var doscroll1 = function() {
var $parent = $('.js-slide-list1')
var $first = $parent.find('li:first')
var height = $first.height()
$first.animate({
height: 0 // 或者改成: marginTop: -height + 'px'
}, 500, function() { // 动画结束后,把它插到最后,形成无缝
$first.css('height', height).appendTo($parent)
// $first.css('marginTop', 0).appendTo($parent);
})
}
setInterval(function() {
doscroll1()
}, 2000)
function fullScreen() {
var element = document.documentElement // 返回 html dom 中的root 节点 <html>
if (!$('body').hasClass('full-screen')) {
$('#fullText').text('退出全屏')
$('body').addClass('full-screen')
$('#alarm-fullscreen-toggler').addClass('active')
// 判断浏览器设备类型
if (element.requestFullscreen) {
element.requestFullscreen()
} else if (element.mozRequestFullScreen) { // 兼容火狐
element.mozRequestFullScreen()
} else if (element.webkitRequestFullscreen) { // 兼容谷歌
element.webkitRequestFullscreen()
} else if (element.msRequestFullscreen) { // 兼容IE
element.msRequestFullscreen()
}
} else { // 退出全屏
$('#fullText').text('全屏展示')
$('body').removeClass('full-screen')
$('#alarm-fullscreen-toggler').removeClass('active')
// 退出全屏
if (document.exitFullscreen) {
document.exitFullscreen()
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen()
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen()
} else if (document.msExitFullscreen) {
document.msExitFullscreen()
}
}
}
var mySwiper = new Swiper('.swiper-container', {
pagination: {
el: '.swiper-pagination'
}
})
</script>