up
This commit is contained in:
@ -18,20 +18,38 @@
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
||||
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
<!-- 文件列表 -->
|
||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
||||
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
|
||||
<transition-group
|
||||
class="upload-file-list el-upload-list el-upload-list--text"
|
||||
name="el-fade-in-linear"
|
||||
tag="ul"
|
||||
>
|
||||
<li
|
||||
:key="file.uid"
|
||||
class="el-upload-list__item ele-upload-list__item-content"
|
||||
v-for="(file, index) in fileList"
|
||||
>
|
||||
<el-link
|
||||
:href="`${baseUrl}${file.url}`"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
>
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
</el-link>
|
||||
<div class="ele-upload-list__item-content-action">
|
||||
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
||||
<el-link :underline="false" @click="handleDelete(index)" type="danger"
|
||||
>删除</el-link
|
||||
>
|
||||
</div>
|
||||
</li>
|
||||
</transition-group>
|
||||
@ -54,7 +72,7 @@ export default {
|
||||
// 大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
default: 5000,
|
||||
},
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
@ -64,8 +82,8 @@ export default {
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -83,9 +101,9 @@ export default {
|
||||
if (val) {
|
||||
let temp = 1;
|
||||
// 首先将值转为数组
|
||||
const list = Array.isArray(val) ? val : this.value.split(',');
|
||||
const list = Array.isArray(val) ? val : this.value.split(",");
|
||||
// 然后将数组转为对象数组
|
||||
this.fileList = list.map(item => {
|
||||
this.fileList = list.map((item) => {
|
||||
if (typeof item === "string") {
|
||||
item = { name: item, url: item };
|
||||
}
|
||||
@ -98,8 +116,8 @@ export default {
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 是否显示提示
|
||||
@ -122,7 +140,9 @@ export default {
|
||||
return false;
|
||||
});
|
||||
if (!isTypeOk) {
|
||||
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
|
||||
this.$message.error(
|
||||
`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -160,7 +180,7 @@ export default {
|
||||
if (name.lastIndexOf("/") > -1) {
|
||||
return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
|
||||
} else {
|
||||
return "";
|
||||
return name;
|
||||
}
|
||||
},
|
||||
// 对象转成指定字符串分隔
|
||||
@ -170,9 +190,9 @@ export default {
|
||||
for (let i in list) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
}
|
||||
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -14,16 +14,20 @@
|
||||
:headers="headers"
|
||||
:file-list="fileList"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:class="{hide: this.fileList.length >= this.limit}"
|
||||
:class="{ hide: this.fileList.length >= this.limit }"
|
||||
>
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
|
||||
|
||||
<!-- 上传提示 -->
|
||||
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
||||
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</div>
|
||||
|
||||
@ -54,8 +58,8 @@ export default {
|
||||
},
|
||||
// 大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 5,
|
||||
type: Number,
|
||||
default: 50,
|
||||
},
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
@ -65,8 +69,8 @@ export default {
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -78,7 +82,7 @@ export default {
|
||||
headers: {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
},
|
||||
fileList: []
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -86,9 +90,9 @@ export default {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
// 首先将值转为数组
|
||||
const list = Array.isArray(val) ? val : this.value.split(',');
|
||||
const list = Array.isArray(val) ? val : this.value.split(",");
|
||||
// 然后将数组转为对象数组
|
||||
this.fileList = list.map(item => {
|
||||
this.fileList = list.map((item) => {
|
||||
if (typeof item === "string") {
|
||||
item = { name: item, url: item };
|
||||
// if (item.indexOf(this.baseUrl) === -1) {
|
||||
@ -105,8 +109,8 @@ export default {
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 是否显示提示
|
||||
@ -117,8 +121,8 @@ export default {
|
||||
methods: {
|
||||
// 删除图片
|
||||
handleRemove(file, fileList) {
|
||||
const findex = this.fileList.map(f => f.name).indexOf(file.name);
|
||||
if(findex > -1) {
|
||||
const findex = this.fileList.map((f) => f.name).indexOf(file.name);
|
||||
if (findex > -1) {
|
||||
this.fileList.splice(findex, 1);
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
}
|
||||
@ -138,7 +142,7 @@ export default {
|
||||
if (file.name.lastIndexOf(".") > -1) {
|
||||
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
|
||||
}
|
||||
isImg = this.fileType.some(type => {
|
||||
isImg = this.fileType.some((type) => {
|
||||
if (file.type.indexOf(type) > -1) return true;
|
||||
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
|
||||
return false;
|
||||
@ -190,25 +194,26 @@ export default {
|
||||
for (let i in list) {
|
||||
strs += list[i].url.replace(this.baseUrl, this.baseUrl) + separator;
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
}
|
||||
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
// .el-upload--picture-card 控制加号部分
|
||||
::v-deep.hide .el-upload--picture-card {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
// 去掉动画效果
|
||||
::v-deep .el-list-enter-active,
|
||||
::v-deep .el-list-leave-active {
|
||||
transition: all 0s;
|
||||
transition: all 0s;
|
||||
}
|
||||
|
||||
::v-deep .el-list-enter, .el-list-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateY(0);
|
||||
::v-deep .el-list-enter,
|
||||
.el-list-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateY(0);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -1,121 +1,128 @@
|
||||
<template>
|
||||
<div>
|
||||
<container3 title="利润概况">
|
||||
<el-date-picker slot="datePicker" v-model="dateRange" size="small" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
<div style="height:100%;width:100%;" ref="chart"></div>
|
||||
<el-date-picker
|
||||
slot="datePicker"
|
||||
v-model="dateRange"
|
||||
size="small"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
<div style="height: 100%; width: 100%" ref="chart"></div>
|
||||
</container3>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import scalseBox from '../components/scaleBox.vue'
|
||||
import scalseBox from "../components/scaleBox.vue";
|
||||
import bigScreenHead from "../components/bigScreenHead/index.vue";
|
||||
import rocketTit from "../components/rocketTit/index.vue";
|
||||
import container3 from "./components/container3/index.vue";
|
||||
|
||||
import echarts from "echarts";
|
||||
require("echarts/theme/macarons"); // echarts theme
|
||||
import resize from "../../dashboard/mixins/resize";
|
||||
|
||||
import echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from '../../dashboard/mixins/resize'
|
||||
|
||||
import request from '@/utils/request'
|
||||
import request from "@/utils/request";
|
||||
export default {
|
||||
mixins: [resize],
|
||||
name: 'left2',
|
||||
name: "left2",
|
||||
components: {
|
||||
scalseBox,
|
||||
bigScreenHead,
|
||||
rocketTit,
|
||||
container3,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
dateRange: [],
|
||||
chart: null,
|
||||
option: {
|
||||
legend: {
|
||||
data: ['利润', '利润预测', '利润目标完成率'],
|
||||
data: ["利润", "预测", "利润目标完成率"],
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '6%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
left: "3%",
|
||||
right: "6%",
|
||||
bottom: "3%",
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
type: "category",
|
||||
data: [
|
||||
'2021-01',
|
||||
'2021-02',
|
||||
'2021-03',
|
||||
'2021-04',
|
||||
'2021-05',
|
||||
'2021-06',
|
||||
'2021-07',
|
||||
'2021-08',
|
||||
'2021-09',
|
||||
'2021-10',
|
||||
'2021-11',
|
||||
'2021-12',
|
||||
"2021-01",
|
||||
"2021-02",
|
||||
"2021-03",
|
||||
"2021-04",
|
||||
"2021-05",
|
||||
"2021-06",
|
||||
"2021-07",
|
||||
"2021-08",
|
||||
"2021-09",
|
||||
"2021-10",
|
||||
"2021-11",
|
||||
"2021-12",
|
||||
],
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
type: "shadow",
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)'
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '万元',
|
||||
type: "value",
|
||||
name: "万元",
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
formatter: "{value}",
|
||||
},
|
||||
splitLine: {
|
||||
show: false//不显示网格线
|
||||
show: false, //不显示网格线
|
||||
},
|
||||
splitArea: {
|
||||
show: false//不显示网格区域
|
||||
show: false, //不显示网格区域
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)'
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
type: "value",
|
||||
min: 0,
|
||||
max: 50,
|
||||
interval: 5,
|
||||
axisLabel: {
|
||||
formatter: '{value} %'
|
||||
formatter: "{value} %",
|
||||
},
|
||||
splitLine: {
|
||||
show: false//不显示网格线
|
||||
show: false, //不显示网格线
|
||||
},
|
||||
splitArea: {
|
||||
show: false//不显示网格区域
|
||||
show: false, //不显示网格区域
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)'
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
grid: {
|
||||
containLabel: true,
|
||||
@ -127,77 +134,83 @@ export default {
|
||||
dataZoom: {},
|
||||
series: [
|
||||
{
|
||||
name: '利润',
|
||||
type: 'bar',
|
||||
name: "利润",
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
data: [
|
||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3
|
||||
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4,
|
||||
3.3,
|
||||
],
|
||||
itemStyle: {
|
||||
color: 'rgb(118,196,166)'
|
||||
color: "rgb(118,196,166)",
|
||||
},
|
||||
barGap: '0'
|
||||
barGap: "0",
|
||||
},
|
||||
{
|
||||
name: '利润预测',
|
||||
type: 'bar',
|
||||
name: "预测",
|
||||
type: "bar",
|
||||
barWidth: 20,
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
|
||||
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0,
|
||||
2.3,
|
||||
],
|
||||
itemStyle: {
|
||||
color: {
|
||||
type: 'linear', // 线性渐变
|
||||
type: "linear", // 线性渐变
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: '#B5D3FE' // 0%处的颜色为红色
|
||||
}, {
|
||||
offset: 1,
|
||||
color: '#7EA7FC' // 100%处的颜色为蓝
|
||||
}]
|
||||
}
|
||||
}
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#B5D3FE", // 0%处的颜色为红色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#7EA7FC", // 100%处的颜色为蓝
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '利润目标完成率',
|
||||
type: 'line',
|
||||
name: "利润目标完成率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
smooth: false,
|
||||
data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2],
|
||||
data: [
|
||||
2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2,
|
||||
],
|
||||
itemStyle: {
|
||||
color: 'rgba(85, 197, 162, 1)'
|
||||
color: "rgba(85, 197, 162, 1)",
|
||||
},
|
||||
yAxisIndex: 1,
|
||||
symbol: 'none'
|
||||
}
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
this.initChart();
|
||||
});
|
||||
},
|
||||
beforeDestroy () {
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
this.chart.dispose();
|
||||
this.chart = null;
|
||||
},
|
||||
methods: {
|
||||
initChart () {
|
||||
initChart() {
|
||||
request({
|
||||
url: '/hx/cockpitOverview/profitProfile',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
|
||||
this.chart = echarts.init(this.$refs.chart)
|
||||
url: "/hx/cockpitOverview/profitProfile",
|
||||
method: "get",
|
||||
}).then((res) => {
|
||||
this.chart = echarts.init(this.$refs.chart);
|
||||
let titData = [];
|
||||
let COMPLETEDPROFIT = [];
|
||||
let FORECASTPROFIT = [];
|
||||
@ -207,21 +220,21 @@ export default {
|
||||
titData.push(item.month);
|
||||
COMPLETEDPROFIT.push(item.COMPLETEDPROFIT);
|
||||
FORECASTPROFIT.push(item.FORECASTPROFIT);
|
||||
TARGETPROFIT.push(item.COMPLETEDPROFIT / item.TARGETPROFIT * 100);
|
||||
TARGETPROFIT.push((item.COMPLETEDPROFIT / item.TARGETPROFIT) * 100);
|
||||
}
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
},
|
||||
legend: {
|
||||
data: ['利润', '利润预测', '利润目标完成率'],
|
||||
data: ["利润", "预测", "利润目标完成率"],
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
type: "category",
|
||||
// data: [
|
||||
// '2021-01',
|
||||
// '2021-02',
|
||||
@ -238,54 +251,54 @@ export default {
|
||||
// ],
|
||||
data: titData,
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
type: "shadow",
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)'
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '万元',
|
||||
type: "value",
|
||||
name: "万元",
|
||||
min: 0,
|
||||
max: 250,
|
||||
interval: 50,
|
||||
axisLabel: {
|
||||
formatter: '{value}'
|
||||
formatter: "{value}",
|
||||
},
|
||||
splitLine: {
|
||||
show: false//不显示网格线
|
||||
show: false, //不显示网格线
|
||||
},
|
||||
splitArea: {
|
||||
show: false//不显示网格区域
|
||||
show: false, //不显示网格区域
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)'
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
type: "value",
|
||||
axisLabel: {
|
||||
formatter: '{value} %'
|
||||
formatter: "{value} %",
|
||||
},
|
||||
splitLine: {
|
||||
show: false//不显示网格线
|
||||
show: false, //不显示网格线
|
||||
},
|
||||
splitArea: {
|
||||
show: false//不显示网格区域
|
||||
show: false, //不显示网格区域
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)'
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
grid: {
|
||||
containLabel: true,
|
||||
@ -295,66 +308,69 @@ export default {
|
||||
bottom: 50,
|
||||
},
|
||||
dataZoom: {
|
||||
type: 'slider',
|
||||
type: "slider",
|
||||
start: 0,
|
||||
end: this.dataZoomEnd(titData.length, 7),
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '利润预测',
|
||||
type: 'bar',
|
||||
z: '-1',
|
||||
barGap: '-75%',
|
||||
name: "预测",
|
||||
type: "bar",
|
||||
z: "-1",
|
||||
barGap: "-75%",
|
||||
barWidth: 30,
|
||||
itemStyle: {
|
||||
color: 'rgba(145, 213, 254, .3)',
|
||||
color: "rgba(145, 213, 254, .3)",
|
||||
},
|
||||
data: FORECASTPROFIT,
|
||||
},
|
||||
{
|
||||
name: '利润',
|
||||
type: 'bar',
|
||||
name: "利润",
|
||||
type: "bar",
|
||||
barWidth: 15,
|
||||
position: [0, 0],
|
||||
itemStyle: {
|
||||
color: {
|
||||
type: 'linear', // 线性渐变
|
||||
type: "linear", // 线性渐变
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 0,
|
||||
y2: 1,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: '#B5D3FE' // 0%处的颜色为红色
|
||||
}, {
|
||||
offset: 1,
|
||||
color: '#7EA7FC' // 100%处的颜色为蓝
|
||||
}]
|
||||
}
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#B5D3FE", // 0%处的颜色为红色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#7EA7FC", // 100%处的颜色为蓝
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
data: COMPLETEDPROFIT,
|
||||
},
|
||||
{
|
||||
name: '利润目标完成率',
|
||||
type: 'line',
|
||||
name: "利润目标完成率",
|
||||
type: "line",
|
||||
yAxisIndex: 1,
|
||||
smooth: false,
|
||||
// data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2],
|
||||
data: TARGETPROFIT,
|
||||
itemStyle: {
|
||||
color: 'rgba(85, 197, 162, 1)'
|
||||
color: "rgba(85, 197, 162, 1)",
|
||||
},
|
||||
yAxisIndex: 1,
|
||||
symbol: 'none'
|
||||
}
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
})
|
||||
});
|
||||
});
|
||||
// this.chart = echarts.init(this.$refs.chart);
|
||||
// this.chart.setOption(this.option);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,107 +1,114 @@
|
||||
<template>
|
||||
<div>
|
||||
<container2 title="视频检验系统实况">
|
||||
<div class="box">
|
||||
<div class="_img">
|
||||
<!-- <img src="./1.jpg" alt="" /> -->
|
||||
<!-- muted controls autoplay -->
|
||||
<video id="videoElement" muted controls autoplay>Your browser is too old which doesn't support HTML5 video.</video>
|
||||
</div>
|
||||
<div class="text">
|
||||
<p style="opacity: 0.8">实况信息</p>
|
||||
<p style="opacity: 0.5; color: #91d5fe; font-size: 14px">{{ videoInfo.videoNowInfo }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</container2>
|
||||
</div>
|
||||
<div>
|
||||
<container2 title="视频检验系统实况">
|
||||
<div class="box">
|
||||
<div class="_img">
|
||||
<!-- <img src="./1.jpg" alt="" /> -->
|
||||
<!-- muted controls autoplay -->
|
||||
<video id="videoElement" muted controls autoplay>
|
||||
Your browser is too old which doesn't support HTML5 video.
|
||||
</video>
|
||||
</div>
|
||||
<div class="text">
|
||||
<p style="opacity: 0.8">实况信息</p>
|
||||
<p style="opacity: 0.5; color: #91d5fe; font-size: 14px">
|
||||
{{ videoInfo.videoNowInfo }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</container2>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import flvjs from 'flv.js'
|
||||
import flvjs from "flv.js";
|
||||
|
||||
import scalseBox from '../components/scaleBox.vue'
|
||||
import bigScreenHead from '../components/bigScreenHead/index.vue'
|
||||
import rocketTit from '../components/rocketTit/index.vue'
|
||||
import container2 from './components/container2/index.vue'
|
||||
import scalseBox from "../components/scaleBox.vue";
|
||||
import bigScreenHead from "../components/bigScreenHead/index.vue";
|
||||
import rocketTit from "../components/rocketTit/index.vue";
|
||||
import container2 from "./components/container2/index.vue";
|
||||
|
||||
import echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import resize from '../../dashboard/mixins/resize'
|
||||
import echarts from "echarts";
|
||||
require("echarts/theme/macarons"); // echarts theme
|
||||
import resize from "../../dashboard/mixins/resize";
|
||||
export default {
|
||||
mixins: [resize],
|
||||
name: 'left3',
|
||||
components: {
|
||||
scalseBox,
|
||||
bigScreenHead,
|
||||
rocketTit,
|
||||
container2,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
videoInfo: {},
|
||||
flvPlayer: null,
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.flvPlayer.player.pause()
|
||||
this.flvPlayer.player.unload()
|
||||
this.flvPlayer.player.detachMediaElement()
|
||||
this.flvPlayer.player.destroy()
|
||||
this.flvPlayer.player = null
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
this.request({
|
||||
url: '/hx/qualityAssurance/getHxVideoSystem',
|
||||
method: 'get',
|
||||
}).then(({ data }) => {
|
||||
this.videoInfo = data[0]
|
||||
if (flvjs.isSupported()) {
|
||||
this.flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
type: 'flv', // 媒体类型 flv 或 mp4
|
||||
isLive: true, // 是否为直播流
|
||||
fluid: true,
|
||||
// hasAudio: true, // 是否开启声音
|
||||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
url: this.videoInfo.videoAddress,
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false,
|
||||
fixAudioTimestampGap: false,
|
||||
isLive: true,
|
||||
}
|
||||
)
|
||||
let videoElement = document.getElementById('videoElement')
|
||||
this.flvPlayer.attachMediaElement(videoElement)
|
||||
this.flvPlayer.load()
|
||||
this.flvPlayer.play()
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
mixins: [resize],
|
||||
name: "left3",
|
||||
components: {
|
||||
scalseBox,
|
||||
bigScreenHead,
|
||||
rocketTit,
|
||||
container2,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
videoInfo: {},
|
||||
flvPlayer: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause();
|
||||
this.flvPlayer.unload();
|
||||
this.flvPlayer.detachMediaElement();
|
||||
this.flvPlayer.destroy();
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
this.request({
|
||||
url: "/hx/qualityAssurance/getHxVideoSystem",
|
||||
method: "get",
|
||||
}).then(({ data }) => {
|
||||
this.videoInfo = data[0];
|
||||
if (flvjs.isSupported()) {
|
||||
this.flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
type: "flv", // 媒体类型 flv 或 mp4
|
||||
isLive: true, // 是否为直播流
|
||||
fluid: true,
|
||||
// hasAudio: true, // 是否开启声音
|
||||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
url: this.videoInfo.videoAddress,
|
||||
// url: "http://192.168.0.151:81/stream/live/classic_cases_video.flv",
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false,
|
||||
fixAudioTimestampGap: false,
|
||||
isLive: true,
|
||||
}
|
||||
);
|
||||
let videoElement = document.getElementById("videoElement");
|
||||
this.flvPlayer.attachMediaElement(videoElement);
|
||||
this.flvPlayer.load();
|
||||
this.flvPlayer.play();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
display: flex;
|
||||
padding: 0 10px 0 0;
|
||||
._img {
|
||||
width: 310px;
|
||||
height: 229px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
flex: 1;
|
||||
padding: 15px;
|
||||
// background-color: rgba(145, 213, 254, 0.15);
|
||||
}
|
||||
display: flex;
|
||||
padding: 0 10px 0 0;
|
||||
._img {
|
||||
width: 310px;
|
||||
height: 229px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
flex: 1;
|
||||
padding: 15px;
|
||||
// background-color: rgba(145, 213, 254, 0.15);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,241 +1,280 @@
|
||||
<template>
|
||||
<container3 title="全厂工房作业信息" :width="768" :height="975">
|
||||
<div>
|
||||
<img v-if="pic.length" style="width: 100%; height: 100%" :src="pic" alt="" srcset="" />
|
||||
<img v-else style="width: 100%; height: 100%" src="./center-bg.png" alt="" srcset="" />
|
||||
</div>
|
||||
<el-popover
|
||||
class="icon_img"
|
||||
:style="{ top: item.ordinate + '%', left: item.abscissa + '%' }"
|
||||
v-for="(item, index) in listData"
|
||||
:key="item.id"
|
||||
placement="bottom"
|
||||
:visible-arrow="false"
|
||||
width="494"
|
||||
trigger="click"
|
||||
@show="handleShow(index)"
|
||||
@hide="hadleHide"
|
||||
>
|
||||
<div>
|
||||
<div class="box">
|
||||
<div class="tit">
|
||||
<img src="./icon2.png" alt="" />
|
||||
<span>总装车间</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="11">
|
||||
<!-- <el-image style="width: 100px; height: 100px" :src="item.avAddress" fit="contain"></el-image> -->
|
||||
<video id="videoElement" muted controls autoplay>
|
||||
Your browser is too old which doesn't support HTML5 video.
|
||||
</video>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<div class="user_box" style="">作业人员</div>
|
||||
<!-- singleWidth: 50 -->
|
||||
<vue-seamless-scroll
|
||||
ref="seamlessScroll"
|
||||
:data="listData2"
|
||||
:class-option="{
|
||||
step: 0.5,
|
||||
direction: 2,
|
||||
}"
|
||||
class="warp"
|
||||
>
|
||||
<ul class="ul-item">
|
||||
<li class="li-item" v-for="(row, index) in listData2" :key="index">
|
||||
<!-- <el-image style="width: 42px; height: 42px" :src="row.avatar" fit="cover"></el-image> -->
|
||||
<img style="width: 42px; height: 42px" :src="row.avatar" />
|
||||
<el-tooltip effect="dark" :content="row.nickname" placement="bottom">
|
||||
<div class="one_hidden">{{ row.nickname }}</div>
|
||||
</el-tooltip>
|
||||
</li>
|
||||
</ul>
|
||||
</vue-seamless-scroll>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div class="user_box">
|
||||
<span>作业内容</span>
|
||||
<span>{{ item.errorInfo }}</span>
|
||||
</div>
|
||||
<div style="background-color: #2a437d; padding: 10px 8px; color: #fff">{{ item.jobContent }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="text" style="padding: 0" slot="reference">
|
||||
<img style="width: 100%; height: 100%" src="./icon.png" alt="" />
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</container3>
|
||||
<container3 title="全厂工房作业信息" :width="768" :height="975">
|
||||
<div>
|
||||
<img
|
||||
v-if="pic.length"
|
||||
style="width: 100%; height: 100%"
|
||||
:src="pic"
|
||||
alt=""
|
||||
srcset=""
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
style="width: 100%; height: 100%"
|
||||
src="./center-bg.png"
|
||||
alt=""
|
||||
srcset=""
|
||||
/>
|
||||
</div>
|
||||
<el-popover
|
||||
class="icon_img"
|
||||
:style="{ top: item.ordinate + '%', left: item.abscissa + '%' }"
|
||||
v-for="(item, index) in listData"
|
||||
:key="item.id"
|
||||
placement="bottom"
|
||||
:visible-arrow="false"
|
||||
width="494"
|
||||
trigger="click"
|
||||
@show="handleShow(index)"
|
||||
@hide="hadleHide"
|
||||
>
|
||||
<div>
|
||||
<div class="box">
|
||||
<div class="tit">
|
||||
<img src="./icon2.png" alt="" />
|
||||
<span>总装车间</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cont">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="11">
|
||||
<!-- <el-image style="width: 100px; height: 100px" :src="item.avAddress" fit="contain"></el-image> -->
|
||||
<video id="videoElement" muted controls autoplay>
|
||||
Your browser is too old which doesn't support HTML5 video.
|
||||
</video>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<div class="user_box" style="">作业人员</div>
|
||||
<!-- singleWidth: 50 -->
|
||||
<vue-seamless-scroll
|
||||
ref="seamlessScroll"
|
||||
:data="listData2"
|
||||
:class-option="{
|
||||
step: 0.5,
|
||||
direction: 2,
|
||||
}"
|
||||
class="warp"
|
||||
>
|
||||
<ul class="ul-item">
|
||||
<li
|
||||
class="li-item"
|
||||
v-for="(row, index) in listData2"
|
||||
:key="index"
|
||||
>
|
||||
<!-- <el-image style="width: 42px; height: 42px" :src="row.avatar" fit="cover"></el-image> -->
|
||||
<img style="width: 42px; height: 42px" :src="row.avatar" />
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="row.nickname"
|
||||
placement="bottom"
|
||||
>
|
||||
<div class="one_hidden">{{ row.nickname }}</div>
|
||||
</el-tooltip>
|
||||
</li>
|
||||
</ul>
|
||||
</vue-seamless-scroll>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div class="user_box">
|
||||
<span>作业内容</span>
|
||||
<span>{{ item.errorInfo }}</span>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
background-color: #2a437d;
|
||||
padding: 10px 8px;
|
||||
color: #fff;
|
||||
"
|
||||
>
|
||||
{{ item.jobContent }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="text" style="padding: 0" slot="reference">
|
||||
<img style="width: 100%; height: 100%" src="./icon.png" alt="" />
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</container3>
|
||||
</template>
|
||||
<script>
|
||||
import flvjs from 'flv.js'
|
||||
import flvjs from "flv.js";
|
||||
|
||||
import container3 from './components/container3/index.vue'
|
||||
import vueSeamlessScroll from 'vue-seamless-scroll'
|
||||
import echarts from 'echarts'
|
||||
import container3 from "./components/container3/index.vue";
|
||||
import vueSeamlessScroll from "vue-seamless-scroll";
|
||||
import echarts from "echarts";
|
||||
export default {
|
||||
components: {
|
||||
container3, //#endregion,
|
||||
vueSeamlessScroll,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pic: '',
|
||||
listData: [],
|
||||
listData2: [],
|
||||
flvPlayer: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.request({
|
||||
url: '/hx/scientificProduction/getHxWorkHomePic',
|
||||
}).then(({ data }) => {
|
||||
this.listData = data
|
||||
})
|
||||
},
|
||||
handleShow(index) {
|
||||
this.listData2 = this.listData[index]['userList']
|
||||
if (flvjs.isSupported()) {
|
||||
this.flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
type: 'flv', // 媒体类型 flv 或 mp4
|
||||
isLive: true, // 是否为直播流
|
||||
fluid: true,
|
||||
// hasAudio: true, // 是否开启声音
|
||||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
url: this.listData[index]['avAddress'],
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false,
|
||||
fixAudioTimestampGap: false,
|
||||
isLive: true,
|
||||
}
|
||||
)
|
||||
let all = document.querySelectorAll('#videoElement')
|
||||
let videoElement = all[all.length - 1]
|
||||
this.flvPlayer.attachMediaElement(videoElement)
|
||||
this.flvPlayer.load()
|
||||
this.flvPlayer.play()
|
||||
}
|
||||
},
|
||||
hadleHide() {
|
||||
this.flvPlayer.player.pause()
|
||||
this.flvPlayer.player.unload()
|
||||
this.flvPlayer.player.detachMediaElement()
|
||||
this.flvPlayer.player.destroy()
|
||||
this.flvPlayer.player = null
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.flvPlayer.player.pause()
|
||||
this.flvPlayer.player.unload()
|
||||
this.flvPlayer.player.detachMediaElement()
|
||||
this.flvPlayer.player.destroy()
|
||||
this.flvPlayer.player = null
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.request({
|
||||
url: '/hx/bigPic/getByType',
|
||||
method: 'get',
|
||||
params: { type: 2 },
|
||||
}).then(res => {
|
||||
if (200 == res.code) {
|
||||
this.pic = res.data.pic
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
components: {
|
||||
container3, //#endregion,
|
||||
vueSeamlessScroll,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pic: "",
|
||||
listData: [],
|
||||
listData2: [],
|
||||
flvPlayer: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.request({
|
||||
url: "/hx/scientificProduction/getHxWorkHomePic",
|
||||
}).then(({ data }) => {
|
||||
// data.map((item) => {
|
||||
// item.avAddress =
|
||||
// "http://192.168.0.151:81/stream/live/classic_cases_video.flv";
|
||||
// });
|
||||
this.listData = data;
|
||||
});
|
||||
},
|
||||
handleShow(index) {
|
||||
this.hadleHide();
|
||||
this.listData2 = this.listData[index]["userList"];
|
||||
setTimeout(() => {
|
||||
if (flvjs.isSupported()) {
|
||||
this.flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
type: "flv", // 媒体类型 flv 或 mp4
|
||||
isLive: true, // 是否为直播流
|
||||
fluid: true,
|
||||
// hasAudio: true, // 是否开启声音
|
||||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
url: this.listData[index]["avAddress"],
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false,
|
||||
fixAudioTimestampGap: false,
|
||||
isLive: true,
|
||||
}
|
||||
);
|
||||
let all = document.querySelectorAll("#videoElement");
|
||||
let videoElement = all[all.length - 1];
|
||||
this.flvPlayer.attachMediaElement(videoElement);
|
||||
this.flvPlayer.load();
|
||||
this.flvPlayer.play();
|
||||
}
|
||||
}, 0);
|
||||
},
|
||||
hadleHide() {
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause();
|
||||
this.flvPlayer.unload();
|
||||
this.flvPlayer.detachMediaElement();
|
||||
this.flvPlayer.destroy();
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause();
|
||||
this.flvPlayer.unload();
|
||||
this.flvPlayer.detachMediaElement();
|
||||
this.flvPlayer.destroy();
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.request({
|
||||
url: "/hx/bigPic/getByType",
|
||||
method: "get",
|
||||
params: { type: 2 },
|
||||
}).then((res) => {
|
||||
if (200 == res.code) {
|
||||
this.pic = res.data.pic;
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-popover {
|
||||
background-color: unset;
|
||||
border: 0;
|
||||
background-color: unset;
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.icon_img {
|
||||
position: absolute;
|
||||
position: absolute;
|
||||
}
|
||||
.el-popover {
|
||||
.box {
|
||||
width: 177px;
|
||||
height: 0;
|
||||
border-width: 0px 20px 30px 0px;
|
||||
border-style: none solid solid;
|
||||
border-color: transparent transparent rgba(10, 90, 132, 1);
|
||||
.tit {
|
||||
height: 30px;
|
||||
padding-left: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span {
|
||||
margin-left: 8px;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cont {
|
||||
background-color: #0d1049;
|
||||
padding: 8px 13px 11px 16px;
|
||||
video {
|
||||
width: 100%;
|
||||
height: 143px;
|
||||
}
|
||||
.user_box {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 16px;
|
||||
background: linear-gradient(
|
||||
270deg,
|
||||
rgba(10, 16, 75, 0) 0%,
|
||||
rgba(8, 56, 105, 0.11) 0%,
|
||||
rgba(6, 116, 151, 0.91) 60%,
|
||||
#00ffff 146%
|
||||
);
|
||||
span:nth-child(1) {
|
||||
float: left;
|
||||
}
|
||||
span:nth-child(2) {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.warp {
|
||||
// height: 100px;
|
||||
margin: 0 auto;
|
||||
margin-top: 25px;
|
||||
overflow: hidden;
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
&.ul-item {
|
||||
display: flex;
|
||||
.li-item {
|
||||
width: 42px;
|
||||
// height: 120px;
|
||||
margin-right: 8px;
|
||||
// line-height: 120px;
|
||||
// background-color: #999;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
.one_hidden {
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.box {
|
||||
width: 177px;
|
||||
height: 0;
|
||||
border-width: 0px 20px 30px 0px;
|
||||
border-style: none solid solid;
|
||||
border-color: transparent transparent rgba(10, 90, 132, 1);
|
||||
.tit {
|
||||
height: 30px;
|
||||
padding-left: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span {
|
||||
margin-left: 8px;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cont {
|
||||
background-color: #0d1049;
|
||||
padding: 8px 13px 11px 16px;
|
||||
video {
|
||||
width: 100%;
|
||||
height: 143px;
|
||||
}
|
||||
.user_box {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0 16px;
|
||||
background: linear-gradient(
|
||||
270deg,
|
||||
rgba(10, 16, 75, 0) 0%,
|
||||
rgba(8, 56, 105, 0.11) 0%,
|
||||
rgba(6, 116, 151, 0.91) 60%,
|
||||
#00ffff 146%
|
||||
);
|
||||
span:nth-child(1) {
|
||||
float: left;
|
||||
}
|
||||
span:nth-child(2) {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.warp {
|
||||
// height: 100px;
|
||||
margin: 0 auto;
|
||||
margin-top: 25px;
|
||||
overflow: hidden;
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
&.ul-item {
|
||||
display: flex;
|
||||
.li-item {
|
||||
width: 42px;
|
||||
// height: 120px;
|
||||
margin-right: 8px;
|
||||
// line-height: 120px;
|
||||
// background-color: #999;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
.one_hidden {
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -7,48 +7,136 @@
|
||||
<!-- <div id="left1" ref="left1" class="chart1"></div> -->
|
||||
<div style="height: 270px; margin: 14px 0 8px">
|
||||
<!-- <img style="width: 100%; height: 100%" src="./img/left1/1.jpg" alt="" /> -->
|
||||
<video style="width: 100%; height: 100%" :src="videoUrl" id="videoElement" muted controls autoplay>
|
||||
<video
|
||||
style="width: 100%; height: 100%"
|
||||
:src="videoUrl"
|
||||
id="videoElement"
|
||||
muted
|
||||
controls
|
||||
autoplay
|
||||
>
|
||||
Your browser is too old which doesn't support HTML5 video.
|
||||
</video>
|
||||
</div>
|
||||
<div style="text-align: right; margin-bottom: 14px; font-size: 14px">
|
||||
<span :style="{opacity:videoIndex==0? 0.9:0.7,cursor:'pointer'}" @click="handleVideoType(0)">视频监控 / </span>
|
||||
<span :style="{opacity:videoIndex==1? 0.9:0.7,cursor:'pointer'}" @click="handleVideoType(1)">奖惩播放 / </span>
|
||||
<span :style="{opacity:videoIndex==2? 0.9:0.7,cursor:'pointer'}" @click="handleVideoType(2)">典型案例播放</span>
|
||||
<div
|
||||
style="text-align: right; margin-bottom: 14px; font-size: 14px"
|
||||
>
|
||||
<span
|
||||
:style="{
|
||||
opacity: videoIndex == 0 ? 0.9 : 0.7,
|
||||
cursor: 'pointer',
|
||||
}"
|
||||
@click="handleVideoType(0)"
|
||||
>视频监控 /
|
||||
</span>
|
||||
<span
|
||||
:style="{
|
||||
opacity: videoIndex == 1 ? 0.9 : 0.7,
|
||||
cursor: 'pointer',
|
||||
}"
|
||||
@click="handleVideoType(1)"
|
||||
>奖惩播放 /
|
||||
</span>
|
||||
<span
|
||||
:style="{
|
||||
opacity: videoIndex == 2 ? 0.9 : 0.7,
|
||||
cursor: 'pointer',
|
||||
}"
|
||||
@click="handleVideoType(2)"
|
||||
>典型案例播放</span
|
||||
>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; margin-bottom: 28px">
|
||||
<div
|
||||
style="display: flex; align-items: center; margin-bottom: 28px"
|
||||
>
|
||||
<span>危险点视频覆盖率</span>
|
||||
<progressBar :showText="true" :strokeWidth="10" :percentage="rate" style="flex: 1; margin-left: 10px" />
|
||||
<progressBar
|
||||
:showText="true"
|
||||
:strokeWidth="10"
|
||||
:percentage="rate"
|
||||
style="flex: 1; margin-left: 10px"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-bottom: 1px">
|
||||
<el-row style="height: 42px; line-height: 42px; background: rgba(0, 255, 255, 0.3)">
|
||||
<el-row
|
||||
style="
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
background: rgba(0, 255, 255, 0.3);
|
||||
"
|
||||
>
|
||||
<el-col style="text-align: center" :span="3">序号</el-col>
|
||||
<el-col style="text-align: center" :span="7">危险点</el-col>
|
||||
<el-col style="text-align: center" :span="7">危险级别</el-col>
|
||||
<el-col style="text-align: center" :span="7">运行状态</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<vue-seamless-scroll :data="listData" ref="seamlessScroll" class="warp-scroll" :class-option="{
|
||||
singleHeight: 43,
|
||||
}">
|
||||
<vue-seamless-scroll
|
||||
:data="listData"
|
||||
ref="seamlessScroll"
|
||||
class="warp-scroll"
|
||||
:class-option="{
|
||||
singleHeight: 43,
|
||||
}"
|
||||
>
|
||||
<ul class="item">
|
||||
<li v-for="(item,index) in points" :key="index">
|
||||
<li v-for="(item, index) in points" :key="index">
|
||||
<el-row>
|
||||
<el-col style="text-align: center" :span="3">{{ item.id }}</el-col>
|
||||
<el-col style="text-align: center" :span="7">{{ item.pointName }}</el-col>
|
||||
<el-col style="text-align: center" :span="3">{{
|
||||
item.id
|
||||
}}</el-col>
|
||||
<el-col style="text-align: center" :span="7">{{
|
||||
item.pointName
|
||||
}}</el-col>
|
||||
<el-col style="text-align: center" :span="7">
|
||||
<el-tag v-if="item.level == '一级'" style="background-color: unset" type="danger" effect="plain">
|
||||
{{ item.level }}</el-tag>
|
||||
<el-tag v-else-if="item.level == '二级'" style="background-color: unset" type="warning" effect="plain">
|
||||
{{ item.level }}</el-tag>
|
||||
<el-tag v-else style="background-color: unset" effect="plain"> {{ item.level }}</el-tag>
|
||||
<el-tag
|
||||
v-if="item.level == '一级'"
|
||||
style="background-color: unset"
|
||||
type="danger"
|
||||
effect="plain"
|
||||
>
|
||||
{{ item.level }}</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-else-if="item.level == '二级'"
|
||||
style="background-color: unset"
|
||||
type="warning"
|
||||
effect="plain"
|
||||
>
|
||||
{{ item.level }}</el-tag
|
||||
>
|
||||
<el-tag
|
||||
v-else
|
||||
style="background-color: unset"
|
||||
effect="plain"
|
||||
>
|
||||
{{ item.level }}</el-tag
|
||||
>
|
||||
</el-col>
|
||||
<el-col style="text-align: center" :span="7">
|
||||
<section class="box">
|
||||
<span v-if="item.status == '运行中'" style="color: #6fd1b4; font-size: 25px; margin-right: 3px">·</span>
|
||||
<span v-else-if="item.status == '已损坏'" style="color: #f64f58; font-size: 25px; margin-right: 3px">·</span>
|
||||
<span v-else style="font-size: 25px; margin-right: 3px">·</span>
|
||||
<span
|
||||
v-if="item.status == '运行中'"
|
||||
style="
|
||||
color: #6fd1b4;
|
||||
font-size: 25px;
|
||||
margin-right: 3px;
|
||||
"
|
||||
>·</span
|
||||
>
|
||||
<span
|
||||
v-else-if="item.status == '已损坏'"
|
||||
style="
|
||||
color: #f64f58;
|
||||
font-size: 25px;
|
||||
margin-right: 3px;
|
||||
"
|
||||
>·</span
|
||||
>
|
||||
<span v-else style="font-size: 25px; margin-right: 3px"
|
||||
>·</span
|
||||
>
|
||||
<span v-if="item.status == '运行中'">运行中</span>
|
||||
<span v-else-if="item.status == '已损坏'">已损坏</span>
|
||||
<span v-else>未开始</span>
|
||||
@ -65,21 +153,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import flvjs from 'flv.js'
|
||||
import flvjs from "flv.js";
|
||||
|
||||
import rocketTit from '../components/rocketTit/index.vue'
|
||||
import container from './components/container/index.vue'
|
||||
import bigScreenTabs from '../components/bigScreenTabs/index.vue'
|
||||
import progressBar from '@/views/bigScreen/components/progress/index.vue'
|
||||
import colorList from '@/utils/colorPalette'
|
||||
import vueSeamlessScroll from 'vue-seamless-scroll'
|
||||
import rocketTit from "../components/rocketTit/index.vue";
|
||||
import container from "./components/container/index.vue";
|
||||
import bigScreenTabs from "../components/bigScreenTabs/index.vue";
|
||||
import progressBar from "@/views/bigScreen/components/progress/index.vue";
|
||||
import colorList from "@/utils/colorPalette";
|
||||
import vueSeamlessScroll from "vue-seamless-scroll";
|
||||
// import {Liquid} from '@antv/g2plot';
|
||||
// import resize from '../../dashboard/mixins/resize'
|
||||
import echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import echarts from "echarts";
|
||||
require("echarts/theme/macarons"); // echarts theme
|
||||
export default {
|
||||
// mixins: [resize],
|
||||
name: 'left1',
|
||||
name: "left1",
|
||||
components: {
|
||||
rocketTit,
|
||||
container,
|
||||
@ -87,128 +175,159 @@ export default {
|
||||
progressBar,
|
||||
vueSeamlessScroll,
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
colorList,
|
||||
listData: [1, 2, 3, 4,5,6,7,8],
|
||||
listData: [1, 2, 3, 4, 5, 6, 7, 8],
|
||||
rate: 0,
|
||||
points: [],
|
||||
videoIndex: 0,
|
||||
flvPlayer: null,
|
||||
videoUrl: ''
|
||||
}
|
||||
videoUrl: "",
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.getData()
|
||||
this.getData();
|
||||
// this.initChart()
|
||||
// this.initLine()
|
||||
})
|
||||
});
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.flvPlayer.player.pause()
|
||||
this.flvPlayer.player.unload()
|
||||
this.flvPlayer.player.detachMediaElement()
|
||||
this.flvPlayer.player.destroy()
|
||||
this.flvPlayer.player = null
|
||||
beforeDestroy() {
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause();
|
||||
this.flvPlayer.unload();
|
||||
this.flvPlayer.detachMediaElement();
|
||||
this.flvPlayer.destroy();
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleVideoType(val){
|
||||
this.videoIndex = val
|
||||
if(val==0){
|
||||
this.videoUrl=''
|
||||
}else if(val==1){
|
||||
handleVideoType(val) {
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause();
|
||||
this.flvPlayer.unload();
|
||||
this.flvPlayer.detachMediaElement();
|
||||
this.flvPlayer.destroy();
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
this.videoIndex = val;
|
||||
if (val == 0) {
|
||||
this.videoUrl = "";
|
||||
this.getData();
|
||||
} else if (val == 1) {
|
||||
this.request({
|
||||
url: '/hx/securityManagement/getVideoByType',
|
||||
params:{
|
||||
type:'1'
|
||||
}
|
||||
}).then(res=>{
|
||||
this.videoUrl = res.msg
|
||||
})
|
||||
}else{
|
||||
this.request({
|
||||
url: '/hx/securityManagement/getVideoByType',
|
||||
params:{
|
||||
type:'2'
|
||||
}
|
||||
}).then(res=>{
|
||||
this.videoUrl = res.msg
|
||||
})
|
||||
url: "/hx/securityManagement/getVideoByType",
|
||||
params: {
|
||||
type: "1",
|
||||
},
|
||||
}).then((res) => {
|
||||
// this.videoUrl = res.msg;
|
||||
this.setVideoUrl(res.msg);
|
||||
// this.setVideoUrl(
|
||||
// "http://192.168.0.151:81/stream/live/classic_cases_video.flv"
|
||||
// );
|
||||
});
|
||||
} else {
|
||||
this.request({
|
||||
url: "/hx/securityManagement/getVideoByType",
|
||||
params: {
|
||||
type: "2",
|
||||
},
|
||||
}).then((res) => {
|
||||
// this.videoUrl = res.msg;
|
||||
this.setVideoUrl(res.msg);
|
||||
// this.setVideoUrl(
|
||||
// "http://192.168.0.151:81/stream/live/classic_cases_video.flv"
|
||||
// );
|
||||
});
|
||||
}
|
||||
},
|
||||
setVideoUrl(videoUrl){
|
||||
if (flvjs.isSupported()) {
|
||||
this.flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
type: 'flv', // 媒体类型 flv 或 mp4
|
||||
isLive: true, // 是否为直播流
|
||||
fluid: true,
|
||||
// hasAudio: true, // 是否开启声音
|
||||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
url: videoUrl,
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false,
|
||||
fixAudioTimestampGap: false,
|
||||
isLive: true,
|
||||
}
|
||||
)
|
||||
setVideoUrl(videoUrl) {
|
||||
if (flvjs.isSupported()) {
|
||||
this.flvPlayer = flvjs.createPlayer(
|
||||
{
|
||||
type: "flv", // 媒体类型 flv 或 mp4
|
||||
isLive: true, // 是否为直播流
|
||||
fluid: true,
|
||||
// hasAudio: true, // 是否开启声音
|
||||
stashInitialSize: 128, // 减少首桢显示等待时长
|
||||
url: videoUrl,
|
||||
},
|
||||
{
|
||||
enableStashBuffer: false,
|
||||
fixAudioTimestampGap: false,
|
||||
isLive: true,
|
||||
}
|
||||
let videoElement = document.getElementById('videoElement')
|
||||
this.flvPlayer.attachMediaElement(videoElement)
|
||||
this.flvPlayer.load()
|
||||
this.flvPlayer.play()
|
||||
);
|
||||
}
|
||||
let videoElement = document.getElementById("videoElement");
|
||||
this.flvPlayer.attachMediaElement(videoElement);
|
||||
this.flvPlayer.load();
|
||||
this.flvPlayer.play();
|
||||
},
|
||||
getData () {
|
||||
getData() {
|
||||
this.request({
|
||||
url: '/hx/securityManagement/dangerousMap',
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
url: "/hx/securityManagement/dangerousMap",
|
||||
method: "get",
|
||||
}).then((res) => {
|
||||
if (200 == res.code) {
|
||||
this.points = res.data.points;
|
||||
this.rate = res.data.rate;
|
||||
this.listData = Array(this.points.length*2).fill(0);
|
||||
this.listData = Array(this.points.length * 2).fill(0);
|
||||
this.$refs.seamlessScroll.reset();
|
||||
if(this.points.length){
|
||||
// this.setVideoUrl(this.rate[0].rtmpAddress)
|
||||
this.setVideoUrl('http://192.168.0.151:81/stream/live/classic_cases_video.flv')
|
||||
if (this.points.length) {
|
||||
if (this.points[0]["rtmpAddress"]) {
|
||||
this.setVideoUrl(this.points[0].rtmpAddress);
|
||||
// this.setVideoUrl(
|
||||
// "http://192.168.0.151:81/stream/live/classic_cases_video.flv"
|
||||
// );
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
initChart () {
|
||||
this.chart = echarts.init(this.$refs.left1, 'macarons')
|
||||
this.setOptions()
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$refs.left1, "macarons");
|
||||
this.setOptions();
|
||||
},
|
||||
setOptions () {
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b}: {c} ({d}%)',
|
||||
trigger: "item",
|
||||
formatter: "{a} <br/>{b}: {c} ({d}%)",
|
||||
},
|
||||
color: this.colorList,
|
||||
legend: {
|
||||
data: ['类别一', '类别二', '类别三', '类别四', '类别五', '类别六', '类别七', '类别八'],
|
||||
orient: 'vertical',
|
||||
data: [
|
||||
"类别一",
|
||||
"类别二",
|
||||
"类别三",
|
||||
"类别四",
|
||||
"类别五",
|
||||
"类别六",
|
||||
"类别七",
|
||||
"类别八",
|
||||
],
|
||||
orient: "vertical",
|
||||
// left: '60%',
|
||||
right: '2%',
|
||||
y: 'center',
|
||||
right: "2%",
|
||||
y: "center",
|
||||
textStyle: {
|
||||
//图例文字的样式
|
||||
color: '#fff',
|
||||
color: "#fff",
|
||||
fontSize: 16,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '概括',
|
||||
type: 'pie',
|
||||
radius: [0, '85%'],
|
||||
center: ['35%', '50%'],
|
||||
name: "概括",
|
||||
type: "pie",
|
||||
radius: [0, "85%"],
|
||||
center: ["35%", "50%"],
|
||||
label: {
|
||||
formatter: '',
|
||||
position: 'inner',
|
||||
formatter: "",
|
||||
position: "inner",
|
||||
fontSize: 14,
|
||||
},
|
||||
labelLine: {
|
||||
@ -217,22 +336,22 @@ export default {
|
||||
data: this.data,
|
||||
},
|
||||
],
|
||||
})
|
||||
});
|
||||
},
|
||||
initLine () {
|
||||
this.chart = echarts.init(this.$refs.left2)
|
||||
this.setOptions2()
|
||||
initLine() {
|
||||
this.chart = echarts.init(this.$refs.left2);
|
||||
this.setOptions2();
|
||||
},
|
||||
setOptions2 () {
|
||||
setOptions2() {
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: '{a1}<br/>{b1}:{c1}',
|
||||
trigger: "axis",
|
||||
formatter: "{a1}<br/>{b1}:{c1}",
|
||||
},
|
||||
legend: {
|
||||
data: ['收入', '实际', '目标'],
|
||||
data: ["收入", "实际", "目标"],
|
||||
textStyle: {
|
||||
color: '#fff', //legend字体颜色
|
||||
color: "#fff", //legend字体颜色
|
||||
},
|
||||
// selectedMode: false,
|
||||
},
|
||||
@ -245,58 +364,58 @@ export default {
|
||||
},
|
||||
xAxis: {
|
||||
data: [
|
||||
'2021-01',
|
||||
'2021-02',
|
||||
'2021-03',
|
||||
'2021-04',
|
||||
'2021-05',
|
||||
'2021-06',
|
||||
'2021-07',
|
||||
'2021-08',
|
||||
'2021-09',
|
||||
'2021-10',
|
||||
'2021-11',
|
||||
'2021-12',
|
||||
"2021-01",
|
||||
"2021-02",
|
||||
"2021-03",
|
||||
"2021-04",
|
||||
"2021-05",
|
||||
"2021-06",
|
||||
"2021-07",
|
||||
"2021-08",
|
||||
"2021-09",
|
||||
"2021-10",
|
||||
"2021-11",
|
||||
"2021-12",
|
||||
],
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)',
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
},
|
||||
},
|
||||
dataZoom: {
|
||||
type: 'slider',
|
||||
type: "slider",
|
||||
start: 0,
|
||||
end: 50,
|
||||
},
|
||||
color: ['#ccc', 'red'],
|
||||
color: ["#ccc", "red"],
|
||||
yAxis: [
|
||||
{
|
||||
name: '件',
|
||||
name: "件",
|
||||
splitLine: {
|
||||
show: true,
|
||||
// 改变轴线颜色
|
||||
lineStyle: {
|
||||
// 使用深浅的间隔色
|
||||
color: ['rgba(255, 255, 255,.5)'],
|
||||
color: ["rgba(255, 255, 255,.5)"],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: '{value}',
|
||||
formatter: "{value}",
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)',
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'value',
|
||||
type: "value",
|
||||
min: 0,
|
||||
max: 100,
|
||||
interval: 20,
|
||||
axisLabel: {
|
||||
formatter: '{value} %',
|
||||
formatter: "{value} %",
|
||||
},
|
||||
splitLine: {
|
||||
show: false, //不显示网格线
|
||||
@ -306,58 +425,66 @@ export default {
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: 'rgb(255, 255, 255)',
|
||||
color: "rgb(255, 255, 255)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '收入',
|
||||
type: 'bar',
|
||||
z: '-1',
|
||||
barGap: '-75%',
|
||||
name: "收入",
|
||||
type: "bar",
|
||||
z: "-1",
|
||||
barGap: "-75%",
|
||||
barWidth: 30,
|
||||
itemStyle: {
|
||||
color: 'rgba(85, 197, 162, .3)',
|
||||
color: "rgba(85, 197, 162, .3)",
|
||||
},
|
||||
data: [80, 80, 95, 95, 95, 95, 80, 80, 95, 95, 95, 95],
|
||||
},
|
||||
{
|
||||
name: '实际',
|
||||
type: 'bar',
|
||||
name: "实际",
|
||||
type: "bar",
|
||||
barWidth: 15,
|
||||
position: [0, 0],
|
||||
itemStyle: {
|
||||
color: 'rgba(90, 216, 166, 0.85)',
|
||||
color: "rgba(90, 216, 166, 0.85)",
|
||||
},
|
||||
data: [5, 20, 36, 10, 10, 20, 10, 20, 30, 10, 70, 75],
|
||||
},
|
||||
{
|
||||
name: '目标',
|
||||
type: 'scatter',
|
||||
symbol: 'rect',
|
||||
name: "目标",
|
||||
type: "scatter",
|
||||
symbol: "rect",
|
||||
symbolSize: [30, 4],
|
||||
symbolOffset: [3, 0],
|
||||
position: [0, 0],
|
||||
itemStyle: {
|
||||
color: '#F6D97E',
|
||||
color: "#F6D97E",
|
||||
},
|
||||
data: [20, 30, 45, 20, 20, 30, 20, 30, 40, 20, 90, 90],
|
||||
},
|
||||
],
|
||||
})
|
||||
});
|
||||
},
|
||||
},
|
||||
created () {
|
||||
this.$bus.on("getTarget", res => {
|
||||
console.log(this.videoIndex);
|
||||
this.videoIndex = 0
|
||||
this.setVideoUrl(res.rtmpAddress)
|
||||
console.log(this.videoIndex);
|
||||
created() {
|
||||
this.$bus.on("getTarget", (res) => {
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause();
|
||||
this.flvPlayer.unload();
|
||||
this.flvPlayer.detachMediaElement();
|
||||
this.flvPlayer.destroy();
|
||||
this.flvPlayer = null;
|
||||
}
|
||||
this.videoIndex = 0;
|
||||
this.setVideoUrl(res.rtmpAddress);
|
||||
// this.setVideoUrl(
|
||||
// "http://192.168.0.151:81/stream/live/classic_cases_video.flv"
|
||||
// );
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -1,181 +1,203 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<!--用户数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-row :gutter="10" class="mb8 fr">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<!--用户数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-row :gutter="10" class="mb8 fr">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="userList">
|
||||
<el-table-column label="序号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="大图类型" align="center" prop="type" >
|
||||
<el-table v-loading="loading" :data="userList">
|
||||
<el-table-column label="序号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="大图类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.type=='1'">
|
||||
危险点图
|
||||
</div>
|
||||
<div v-if="scope.row.type=='2'">
|
||||
工房图
|
||||
</div>
|
||||
<div v-if="scope.row.type == '1'">危险点图</div>
|
||||
<div v-if="scope.row.type == '2'">工房图</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="大图地址" align="center" prop="pic" >
|
||||
<el-table-column label="大图地址" align="center" prop="pic">
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 100px; height: 100px" fit="cover" :src="scope.row.pic"></el-image>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
fit="cover"
|
||||
:src="scope.row.pic"
|
||||
></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
:pageSizes="[2, 5, 10, 20]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
:pageSizes="[2, 5, 10, 20]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="大图类型">
|
||||
<el-radio v-model="form.type" label="1">危险点图</el-radio>
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="大图类型">
|
||||
<el-radio v-model="form.type" label="1">危险点图</el-radio>
|
||||
<el-radio v-model="form.type" label="2">工房图</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="大图" prop="pic">
|
||||
<ImageUpload v-model="form.pic" :isShowTip="false" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<ImageUpload v-model="form.pic" :isShowTip="false" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { centerTwoList, delVideo, addVideo, editVideo } from './indexApi'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { centerTwoList, delVideo, addVideo, editVideo } from "./indexApi";
|
||||
import { getToken } from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: this.page_size,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
pic: [{ required: true, message: '请上传大图', trigger: 'blur' }],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
centerTwoList(this.queryParams).then(response => {
|
||||
this.userList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
type: '1',
|
||||
videoName: undefined,
|
||||
remark: undefined,
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.form = Object.assign({}, row)
|
||||
this.form.videoFileName='http://192.168.0.115:1818/' + this.form.videoFileName
|
||||
this.open = true
|
||||
this.title = '修改装药量概况'
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
editVideo(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addVideo(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除序号为"' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return delVideo({hxBigPicId:row.id})
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: this.page_size,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
pic: [{ required: true, message: "请上传大图", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
centerTwoList(this.queryParams).then((response) => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
type: "1",
|
||||
videoName: undefined,
|
||||
remark: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.form = Object.assign({}, row);
|
||||
this.open = true;
|
||||
this.title = "修改装药量概况";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
editVideo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addVideo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除序号为"' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return delVideo({ hxBigPicId: row.id });
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -1,186 +1,226 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<!--用户数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-row :gutter="10" class="mb8 fr">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div>
|
||||
<el-row :gutter="20">
|
||||
<!--用户数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-row :gutter="10" class="mb8 fr">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="userList">
|
||||
<el-table-column label="序号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="视频类型" align="center" prop="category" >
|
||||
<el-table v-loading="loading" :data="userList">
|
||||
<el-table-column label="序号" align="center" prop="id" width="80" />
|
||||
<el-table-column label="视频类型" align="center" prop="category">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.category=='1'">
|
||||
奖惩播放
|
||||
</div>
|
||||
<div v-if="scope.row.category=='2'">
|
||||
典型案例播放
|
||||
</div>
|
||||
<div v-if="scope.row.category == '1'">奖惩播放</div>
|
||||
<div v-if="scope.row.category == '2'">典型案例播放</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="视频名称" align="center" prop="videoName" />
|
||||
<el-table-column label="视频地址" align="center" prop="videoFileName" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table-column label="视频名称" align="center" prop="videoName" />
|
||||
<el-table-column
|
||||
label="视频地址"
|
||||
align="center"
|
||||
prop="videoFileName"
|
||||
/>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
:pageSizes="[2, 5, 10, 20]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:autoScroll="false"
|
||||
:pageSizes="[2, 5, 10, 20]"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频类型" prop="category">
|
||||
<el-radio v-model="form.category" label="1">奖惩播放</el-radio>
|
||||
<el-radio v-model="form.category" label="2">典型案例播放</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频名称" prop="videoName">
|
||||
<el-input v-model="form.videoName" placeholder="请输入视频名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="40%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频类型" prop="category">
|
||||
<el-radio v-model="form.category" label="1">奖惩播放</el-radio>
|
||||
<el-radio v-model="form.category" label="2"
|
||||
>典型案例播放</el-radio
|
||||
>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频名称" prop="videoName">
|
||||
<el-input v-model="form.videoName" placeholder="请输入视频名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" type="textarea" :autosize="{ minRows: 2, maxRows: 6}" placeholder="备注" />
|
||||
</el-form-item>
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }"
|
||||
placeholder="备注"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频" prop="videoFileName">
|
||||
<FileUpload v-model="form.videoFileName" :isShowTip="false" :fileType="['mp4']" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<FileUpload
|
||||
v-model="form.videoFileName"
|
||||
:isShowTip="false"
|
||||
:fileType="['mp4']"
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { centerTwoList, delVideo, addVideo, editVideo } from './indexApi'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { centerTwoList, delVideo, addVideo, editVideo } from "./indexApi";
|
||||
import { getToken } from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: this.page_size,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
videoName: [{ required: true, message: '视频名称不能为空', trigger: 'blur' }],
|
||||
videoFileName: [{ required: true, message: '请上传视频', trigger: 'blur' }],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
centerTwoList(this.queryParams).then(response => {
|
||||
this.userList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
category: '1',
|
||||
videoName: undefined,
|
||||
remark: undefined,
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.form = Object.assign({}, row)
|
||||
this.form.videoFileName='http://192.168.0.115:1818/' + this.form.videoFileName
|
||||
this.open = true
|
||||
this.title = '修改装药量概况'
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
editVideo(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addVideo(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除序号为"' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return delVideo({hxVideoId:row.id})
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: this.page_size,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
videoName: [
|
||||
{ required: true, message: "视频名称不能为空", trigger: "blur" },
|
||||
],
|
||||
videoFileName: [
|
||||
{ required: true, message: "请上传视频", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
centerTwoList(this.queryParams).then((response) => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
category: "1",
|
||||
videoName: undefined,
|
||||
remark: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.form = Object.assign({}, row);
|
||||
// this.form.videoFileName =
|
||||
// "http://192.168.0.115:1818/" + this.form.videoFileName;
|
||||
this.open = true;
|
||||
this.title = "修改装药量概况";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
editVideo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addVideo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除序号为"' + row.id + '"的数据项?')
|
||||
.then(function () {
|
||||
return delVideo({ hxVideoId: row.id });
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<!-- @click="$router.push('/bigScreen/drivingCabin')" -->
|
||||
<!-- @click="$router.push('/bigScreen/drivingCabin')" -->
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<el-col :xs="8" :sm="8" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel" @click="$router.push('/bigScreen/drivingCabin')">
|
||||
@ -7,80 +7,71 @@
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
驾驶舱总览
|
||||
</div>
|
||||
<div class="card-panel-text">驾驶舱总览</div>
|
||||
<div class="card-panel-num">点击进入</div>
|
||||
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel" @click="$router.push('/bigScreen/scientific')">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
科研生产
|
||||
</div>
|
||||
<div class="card-panel-num">开发中</div>
|
||||
<div class="card-panel-text">科研生产</div>
|
||||
<div class="card-panel-num">点击进入</div>
|
||||
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel" @click="$router.push('/bigScreen/management')">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
经营管理
|
||||
</div>
|
||||
<div class="card-panel-num">开发中</div>
|
||||
<div class="card-panel-text">经营管理</div>
|
||||
<div class="card-panel-num">点击进入</div>
|
||||
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel" @click="$router.push('/bigScreen/qualityManage')">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
质量管理
|
||||
</div>
|
||||
<div class="card-panel-num">开发中</div>
|
||||
<div class="card-panel-text">质量管理</div>
|
||||
<div class="card-panel-num">点击进入</div>
|
||||
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div
|
||||
class="card-panel"
|
||||
@click="$router.push('/bigScreen/securityManage')"
|
||||
>
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
安全管理
|
||||
</div>
|
||||
<div class="card-panel-num">开发中</div>
|
||||
<div class="card-panel-text">安全管理</div>
|
||||
<div class="card-panel-num">点击进入</div>
|
||||
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :lg="8" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel" @click="$router.push('/bigScreen/information')">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
信息化管理
|
||||
</div>
|
||||
<div class="card-panel-num">开发中</div>
|
||||
<div class="card-panel-text">信息化管理</div>
|
||||
<div class="card-panel-num">点击进入</div>
|
||||
<!-- <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> -->
|
||||
</div>
|
||||
</div>
|
||||
@ -141,18 +132,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CountTo from 'vue-count-to'
|
||||
import CountTo from "vue-count-to";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CountTo
|
||||
CountTo,
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.$emit('handleSetLineChartData', type)
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$emit("handleSetLineChartData", type);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -171,8 +162,8 @@ export default {
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
||||
border-color: rgba(0, 0, 0, .05);
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
|
||||
border-color: rgba(0, 0, 0, 0.05);
|
||||
|
||||
&:hover {
|
||||
.card-panel-icon-wrapper {
|
||||
@ -192,7 +183,7 @@ export default {
|
||||
}
|
||||
|
||||
.icon-shopping {
|
||||
background: #34bfa3
|
||||
background: #34bfa3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +200,7 @@ export default {
|
||||
}
|
||||
|
||||
.icon-shopping {
|
||||
color: #34bfa3
|
||||
color: #34bfa3;
|
||||
}
|
||||
|
||||
.card-panel-icon-wrapper {
|
||||
@ -245,7 +236,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:550px) {
|
||||
@media (max-width: 550px) {
|
||||
.card-panel-description {
|
||||
display: none;
|
||||
}
|
||||
|
Reference in New Issue
Block a user