This commit is contained in:
骆乐 2022-07-22 15:53:09 +08:00
parent 2bab395e89
commit 24ad27a570
17 changed files with 118 additions and 363 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -44,6 +44,7 @@ if (process.env.NODE_ENV == 'development') {
// tag: 本地
// axios.defaults.baseURL = 'http://192.168.34.174:6023/' // 老大本地
axios.defaults.baseURL = 'http://192.168.34.125:6023/'; //杨意本地 http/1.1
// axios.defaults.baseURL = 'http://47.97.202.104:6023/';
// axios.defaults.baseURL = 'http://124.71.178.44:9500/'; // 星璇
// axios.defaults.baseURL = 'http://120.196.217.6:7000/';
// axios.defaults.baseURL = 'http://139.9.66.234:8/';
@ -79,7 +80,7 @@ else if (process.env.NODE_ENV == 'debug') {
} else if (process.env.NODE_ENV == 'production') {
let host = window.location.host;
axios.defaults.baseURL = window.location.protocol + "//" + host + "/"
// axios.defaults.baseURL ='http://192.168.34.125:6033/'
// axios.defaults.baseURL ='http://192.168.34.125:6023/'
// axios.defaults.baseURL = window.location.protocol + "//" + host.split(":")[0] + ":6023" + "/"
// axios.defaults.baseURL = 'http://zhgd.loganwy.com/'
}

View File

@ -2039,6 +2039,77 @@ const routes2 = [
name: '升降机管理_设备维保',
component: resolve => require(['@/views/projectFront/lifter/devMaintain.vue'], resolve)
},
{
path: '/projectQu/quality/criterion', //质量管理 -- 标准中心
name: '质量管理_标准中心',
component: resolve => require(['@/views/projectFront/quality/criterion.vue'], resolve)
},
{
path: '/projectQu/quality/business', //质量管理 -- 业务中心
name: '质量管理_业务中心',
component: resolve => require(['@/views/projectFront/quality/business.vue'], resolve)
},
{
path: '/projectQu/quality/recordsCenter', //质量管理 -- 数据中心
name: '质量管理_数据中心',
component: resolve => require(['@/views/projectFront/quality/recordsCenter.vue'], resolve)
},
// 材料管理
{
path: '/projectQu/materialManage/constructionTeamManage',
name: '材料管理_资源中心_施工队伍管理',
component: () => import('@/views/projectFront/materialManage/constructionTeamManage.vue'),
},
{
path: '/projectQu/materialManage/materialManage',
name: '材料管理_资源中心_材料字典',
component: () => import('@/views/projectFront/materialManage/materialManage.vue'),
},
{
path: '/projectQu/materialManage/cooperationUnit',
name: '材料管理_资源中心_合作单位',
component: () => import('@/views/projectFront/materialManage/cooperationUnit.vue'),
},
{
path: '/projectQu/materialManage/projectSiteManage',
name: '材料管理_资源中心_工程部位管理',
component: () => import('@/views/projectFront/materialManage/projectSiteManage.vue'),
},
{
path: '/projectQu/materialManage/materialContract',
name: '材料管理_资源中心_材料合同',
component: () => import('@/views/companyAdmin/material/materialContract.vue')
},
{
path: '/projectQu/materialManage/warehouseManage',
name: '材料管理_资源中心_库房字典',
component: () => import('@/views/projectFront/materialManage/warehouseManage.vue')
},
{
path: '/projectQu/materialManage/materialPriceBack',
name: '材料管理_资源中心_材料价格库',
component: () => import('@/views/projectFront/materialManage/materialPriceBack.vue')
},
{
path: '/projectQu/materialManage/thisProjectOrder',
name: '材料管理_资源中心_本项目订单',
component: () => import('@/views/projectFront/materialManage/thisProjectOrder.vue')
},
{
path: '/projectQu/materialManage/thisProjectWaybill',
name: '材料管理_资源中心_本项目运单',
component: () => import('@/views/projectFront/materialManage/thisProjectWaybill.vue')
}, {
path: '/projectQu/materialManage/materialWeightList',
name: '材料管理_作业中心_榜单台账',
component: () => import('@/views/projectFront/materialManage/materialWeightList.vue')
},
// 项目概况
{
path: '/projectQu/summary/baseInfo',
name: '项目概况_项目基础信息',
component: () => import('@/views/projectFront/projectSummary/baseInfo.vue'),
},
//档案管理
{
path: '/projectQu/fileManage/fileManage',

View File

@ -54,8 +54,8 @@ export default new Vuex.Store({
/* 2022-06-06 */ // tag: 本地测试接口
// BASEURL:'http://192.168.34.174:6023/',
// UPLOADURL: 'http://192.168.34.125:6043/upload/image',
// FILEURL: 'http://192.168.34.125:6043/image/',
// UPLOADURL: 'http://192.168.34.125:6023/upload/image',
// FILEURL: 'http://192.168.34.125:6023/image/',
// UPLOADURL:'http://'+"61.190.32.219:9050"+'/upload/image',//正式
// FILEURL:'http://'+"61.190.32.219:9050"+'/image/',//正式
ACCOUNTTYPE: ['系统管理员', '企业一级管理员', '企业二级管理员', '企业三级管理员', '项目管理员'], //1系统管理员2企业管理员账号3企业区账号4企业市账号5项目账号

View File

@ -1,61 +0,0 @@
# lives
> A Vue.js project
## 使用
1. 安装依赖
```
// 安装
npm install --save flv.js
npm install --save js-md5
npm install --save js-base64
npm install --save axios
// 依赖包
"dependencies": {
"axios": "^0.27.2",
"flv.js": "^1.6.2",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
}
```
2. 引入插件
```
// Test.vue
import Live from '@/utils'
```
3. 调用 api
```
<template>
<!-- 为需要注入分屏插件的容器元素设置 id并设定宽高 -->
<div id="wrapper" style="width: 1200px;height: 800px"> </div>
</template>
// 调用 init 方法,传入绑定的 dom 元素注入分屏插件
mounted () {
// 1. 登录
Live.login('http://122.112.239.62', '9000', 'jxj', 'admin123')
// 2. 绑定插件
this.screens = Live.init(document.getElementById('wrapper'))
// 3. 配置参数加载视频
this.screens.setOptions(/* 这里传入配置对象 */ {
deviceId: '1202291000447',
channelNum: 1,
streamType: 0,
mediaType: 'FLV',
recordTimeStart: '2022-07-16 04:00:00',
recordTimeEnd: '2022-07-16 06:00:00',
source: 'device',
isDownload: 0,
tokenType: 'Dynamic',
expireTime: '0',
https: false
})
},
```

View File

@ -1,25 +0,0 @@
import http from './request'
export const apiLogin = (baseURL, Authorization, data = {}) => {
return http({
baseURL,
url: '/login',
method: 'post',
data,
headers: {
Authorization
}
})
}
export const apiQueryPlaybackUri = (baseURL, token, data) => {
return http({
baseURL,
url: '/queryPlaybackUri',
method: 'post',
data,
headers: {
token
}
})
}

View File

@ -1,39 +0,0 @@
.live-screens-screen-wrap {
position: relative;
background-color: #000;
}
.live-screens-screen-item {
box-sizing: border-box;
border: 1px solid #fff;
}
.live-screens-screen-close {
position: absolute;
width: 60px;
height: 30px;
line-height: 30px;
text-align: center;
color: red;
cursor: pointer;
}
.live-setting-btn-wrap {
margin-top:8px;
display: flex;
justify-content: flex-end;
}
.live-setting-btn-item {
margin-right: 10px;
width: 60px;
height: 30px;
line-height: 30px;
text-align:center;
border: 1px solid #666;
cursor: pointer;
}
.actived {
border: 1px solid orangered !important;
}

View File

@ -1,204 +0,0 @@
import flvjs from 'flv.js'
import md5 from 'js-md5'
import { encode } from 'js-base64'
import { apiLogin, apiQueryPlaybackUri } from './api'
import './index.css'
let baseURL = ''
let token = ''
let Authorization = ''
const screenTypes = [
{text: '一屏', value: 1},
{text: '二屏', value: 2},
{text: '四屏', value: 4},
{text: '六屏', value: 6}
]
const createVideoEl = (vm, index = 0, width = '100%', height = '100%') => {
const videoEl = document.createElement('video')
videoEl.setAttribute('muted', 'muted')
// videoEl.setAttribute('controls', 'controls')
videoEl.setAttribute('width', width)
videoEl.setAttribute('height', height)
videoEl.className = 'live-screens-screen-item'
videoEl.addEventListener('click', e => {
vm.currentScreen = e.target
vm.screenIndex = index
vm.screens.map(screen => screen.classList.remove('actived'))
e.target.classList.add('actived')
})
return videoEl
}
const createScreenWrap = (el) => {
const width = el.offsetWidth
const height = el.offsetHeight - 40
const screenWrap = document.createElement('div')
screenWrap.style.cssText = `width: ${width}px;height: ${height}px;`
screenWrap.className = 'live-screens-screen-wrap'
return screenWrap
}
const createScreens = (vm, screenWrapEl, screens, screenCount) => {
const w = screenWrapEl.offsetWidth
const h = screenWrapEl.offsetHeight
let width = ''
let height = ''
switch (screenCount) {
case 2:
width = w / 2 + 'px'
height = h + 'px'
break
case 4:
width = w / 2 + 'px'
height = h / 2 + 'px'
break
case 6:
width = w / 3 + 'px'
height = h / 2 + 'px'
break
default:
width = '100%'
height = '100%'
break
}
const list = new Array(screenCount).fill(0)
screens.map(child => screenWrapEl.removeChild(child))
screens.splice(0)
list.map((item, index) => {
const videoEl = createVideoEl(vm, index, width, height)
screenWrapEl.appendChild(videoEl)
screens.push(videoEl)
})
}
const createScreenBtns = (ins) => {
const screenBtnGroupEl = document.createElement('div')
screenBtnGroupEl.className = 'live-setting-btn-wrap'
screenTypes.map(type => {
const btnEl = document.createElement('div')
btnEl.className = 'live-setting-btn-item'
btnEl.innerText = type.text
btnEl.addEventListener('click', () => {
ins.setScreenCount(type.value)
})
screenBtnGroupEl.appendChild(btnEl)
})
return screenBtnGroupEl
}
const createCloseEl = (vm) => {
const w = vm.currentScreen.offsetWidth
// const h = vm.currentScreen.offsetHeight
const left = vm.currentScreen.offsetLeft
const top = vm.currentScreen.offsetTop
const el = document.createElement('div')
el.className = 'live-screens-screen-close'
el.innerText = '关闭'
el.style.top = top + 10 + 'px'
el.style.left = left + w - 60 + 'px'
el.setAttribute('data-index', vm.screenIndex)
el.addEventListener('click', e => {
const index = e.target.getAttribute('data-index')
const videoEl = vm.screens[index]
videoEl.removeAttribute('controls')
videoEl.removeAttribute('src')
vm.screenWrapEl.removeChild(e.target)
})
vm.screenWrapEl.appendChild(el)
vm.currentScreen = null
}
const Initial = class {
constructor (el) {
const screen1 = createVideoEl(this)
const screenWrapEl = createScreenWrap(el)
screenWrapEl.appendChild(screen1)
el.appendChild(screenWrapEl)
el.appendChild(createScreenBtns(this))
this.currentScreen = screen1
this.screenCount = 1
this.screenIndex = 0
this.wrapEl = el
this.screenWrapEl = screenWrapEl
this.screens = [screen1]
this.players = []
}
setOptions (options = {
deviceId: '1202291000447',
channelNum: 1,
streamType: 0,
mediaType: 'FLV',
recordTimeStart: '2022-07-16 04:00:00',
recordTimeEnd: '2022-07-16 06:00:00',
source: 'device',
isDownload: 0,
tokenType: 'Dynamic',
expireTime: '0',
https: false
}) {
if (!this.currentScreen || this.currentScreen.src) {
return false
}
(async () => {
const res = await apiQueryPlaybackUri(baseURL, token, options).catch(console.log)
if (res.status === 200) {
const url = res.data.uri
this.player = this.getVideoPlayer(url)
this.currentScreen.setAttribute('controls', 'controls')
createCloseEl(this)
}
})()
// return this
}
getVideoPlayer (url) {
if (flvjs.isSupported()) {
const videoEl = this.currentScreen
const flvPlayer = flvjs.createPlayer({
type: 'flv',
url: url.replace('http://:9050', 'http://122.112.239.62:9050')
})
flvPlayer.attachMediaElement(videoEl)
flvPlayer.load()
// flvPlayer.play()
return flvPlayer
}
}
setScreenCount (screenCount) {
this.screenCount = screenCount
const closeEls = document.getElementsByClassName('live-screens-screen-close')
;[].slice.call(closeEls).map(el => this.screenWrapEl.removeChild(el))
createScreens(this, this.screenWrapEl, this.screens, screenCount)
}
}
const init = (el) => {
const screen = new Initial(el)
return {
setOptions: screen.setOptions.bind(screen)
}
}
const encryption = (host, port, username, pwd) => {
baseURL = `${host}:${port}`
const md5Pwd = md5(pwd)
Authorization = 'Basic ' + encode(username + ':' + md5Pwd)
}
const login = async (host, port, username, pwd) => {
encryption(host, port, username, pwd)
const res = await apiLogin(baseURL, Authorization).catch(console.log)
if (res.status === 200) {
token = res.headers.token
}
}
export default {
login,
init
}

View File

@ -1,8 +0,0 @@
import axios from 'axios'
const http = axios.create({
baseURL: 'http://122.112.239.62:9000'
// baseURL:'/china'
})
export default http

View File

@ -1374,6 +1374,7 @@ export default {
},
//
handleSuccess(file, type) {
console.log('上传成功了吗',file)
if (file.code == 200 || file.status == "SUCCESS") {
console.log(file);
var url = file.data[0].imageUrl;

View File

@ -122,6 +122,7 @@ export default {
components: { vhead },
data() {
return {
baseURL:"",
projectNumber:'',
projectName: "",
list: [],
@ -131,7 +132,7 @@ export default {
};
},
created(){
this.baseURL = this.$http.defaults.baseURL
},
mounted() {
if(localStorage.getItem('systemInfo')){
@ -186,7 +187,9 @@ export default {
getPanoramicRanging(){
axios({
method:"GET",
url:'http://182.90.224.237:8070/docking/url',
// url:'http://182.90.224.237:8070/xmgl/docking/url',
// url:'http://182.90.224.237:7000/xmgl/docking/url',
url:`${this.$http.defaults.baseURL}${'xmgl/docking/url'}`,
params:{
projectNumber:this.projectNumber,
}

View File

@ -541,6 +541,7 @@ export default {
}).then((res) => {
console.log(res);
if (res.result) {
console.log('外出的信息有吗',res.result)
this.statisticalData = res.result;
this.statisticalData.abnormalNum =
res.result.notCodeNum +

View File

@ -977,6 +977,9 @@ export default {
}
}
}
::v-deep .el-tabs__item{
margin-right :0px;
}
.fixedDataBox {
display: flex;
align-items: center;

View File

@ -116,6 +116,12 @@
</span>
<span class="width_65">{{ projectDetail.supervisorUnit }}</span>
</div>
<!-- <div class="flex3">
<span class="width_35 border_l">
{{'代建单位'}}
</span>
<span class="width_65">{{ projectDetail.supervisorUnit }}</span>
</div> -->
<div class="flex3">
<span
class=" "

View File

@ -26,7 +26,7 @@
</el-date-picker>
<el-button
size="medium"
style="width: 109px;height: 32px;margin-left: 10px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 10px;color: #409EFF;border-color: #409EFF;"
@click="query1"
>
<!-- 查询 -->
@ -34,7 +34,7 @@
</el-button>
<el-button
size="medium"
style="width: 109px;height: 32px;margin-left: 10px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 10px;color: #409EFF;border-color: #409EFF;"
@click="refresh1"
>
<!-- 刷新 -->
@ -63,7 +63,7 @@
</el-date-picker>
<el-button
size="medium"
style="width: 110px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
@click="query2"
>
@ -72,7 +72,7 @@
</el-button>
<el-button
size="medium"
style="width: 109px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
@click="refresh2"
>
<!-- 刷新 -->
@ -80,7 +80,7 @@
</el-button>
</div>
</div>
<div class="icon">
<div class="icon" :class="styleType == 3 ? 'icon2' : ''">
<div class="icon_item" v-for="(item,index) in colorList" :key="index">
<div v-if="index == 0 || index == 2" class="titleColor"></div>
<div v-if="index == 1 || index == 2" class="titleColor2"></div>
@ -109,7 +109,7 @@
</el-date-picker>
<el-button
size="medium"
style="width: 110px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
@click="query3"
>
<!-- 查询 -->
@ -117,7 +117,7 @@
</el-button>
<el-button
size="medium"
style="width: 109px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
@click="refresh3"
>
<!-- 刷新 -->
@ -147,7 +147,7 @@
</el-date-picker>
<el-button
size="medium"
style="width: 110px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
@click="query4"
>
<!-- 查询 -->
@ -155,7 +155,7 @@
</el-button>
<el-button
size="medium"
style="width: 109px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
style="width: 60px;height: 32px;margin-left: 20px;color: #409EFF;border-color: #409EFF;"
@click="refresh4"
>
<!-- 刷新 -->
@ -184,6 +184,7 @@
props:['sn'],
data() {
return{
styleType:'',
chart1:Object,
option1:{},
value1:'',
@ -242,6 +243,7 @@
},
},
created(){
this.styleType = this.$store.state.userInfo.styleType;
this.projectSn = this.sn ? this.sn:this.$store.state.projectSn;
// this.bgUrl = this.$store.state.currentProDetail.constructionMapUrl;
this.selectDriverTowerAbnormalCount()
@ -749,6 +751,10 @@
}
}
}
.icon2{
transform: translate(-537px, 20px);
}
.echart2{
width: 100%;
height: 300px;

View File

@ -290,7 +290,7 @@ export default {
background-color: #396df7;
border-radius: 14px;
color: #fff;
width: 200px;
width: 210px;
height: 45px;
line-height: 45px;
margin-top:15px;

View File

@ -14,17 +14,17 @@ function addStyleResource (rule) {
}
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
// devServer:{
// proxy:{
// '/china' : {
// target: "http://122.112.239.62",
// changeOrigin:true,
// pathRewrite:{
// '^/china':"" //重写路径
// }
// }
// }
// },
devServer:{
proxy:{
'/china' : {
target: "http://122.112.239.62:9000",
changeOrigin:true,
pathRewrite:{
'^/china':"" //重写路径
}
}
}
},
pages:{
index: {
entry: "./src/pages/index/index.js",