拍照时间表

master
fanluyan 2 years ago
parent 895dca724f
commit 427531be2c

@ -369,7 +369,6 @@ export function getResolutionRatio(data) {
});
}
//视频采集参数
//参数查询--触发
export function getVideoParamApi(data) {
@ -399,7 +398,6 @@ export function setVideoParamApi(data) {
});
}
//设置图像参数 setImageParams
//查询图像分辨率 getImageParams
@ -583,3 +581,30 @@ export function getCmaSchelduleDetials(data) {
data,
});
}
//查询apk列表
export function listApk(data) {
return request({
url: "/api/listApk",
method: "post",
data,
});
}
//上传apk
export function uploadApk(data) {
return request({
url: "/api/uploadApk",
method: "post",
data,
});
}
//下发apk
export function issueApk(data) {
return request({
url: "/api/issueApk",
method: "post",
data,
});
}

@ -1,6 +1,6 @@
import axios from "axios";
import { MessageBox, Message } from 'element-ui'
import router from '../router/index'
import { MessageBox, Message } from "element-ui";
import router from "../router/index";
const service = axios.create({
// process.env.NODE_ENV === 'development' 来判断是否开发环境
@ -30,23 +30,26 @@ service.interceptors.response.use(
// return Promise.reject();
// }
response => {
const res = response.data
(response) => {
const res = response.data;
if (res.code !== 200) {
Message({ message: res.msg || 'Error', type: 'error', duration: 5 * 1000 })
Message({
message: res.msg || "Error",
type: "error",
duration: 5 * 1000,
});
if (res.code === 401) {
// Message({ message: '重新登录', type: 'error', duration: 5 * 1000 })
router.push('/login')
router.push("/login");
}
return Promise.reject(new Error(res.msg || 'Error'))
return Promise.reject(new Error(res.msg || "Error"));
} else {
return res
return res;
}
},
error => {
Message({ message: error.message, type: 'error', duration: 5 * 1000 })
return Promise.reject(error)
(error) => {
Message({ message: error.message, type: "error", duration: 5 * 1000 });
return Promise.reject(error);
}
);

@ -8,22 +8,25 @@
@close="handleclose"
>
<div class="setTimeTd">
<h3>时间表规则</h3>
<div class="flexTimeGz">
<p class="timeGz" v-for="(val, index) in ruleSchedule" :key="index">
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
<div class="ruleBox">
<h3>时间表规则</h3>
<div class="flexTimeGz">
<p class="timeGz" v-for="(val, index) in ruleSchedule" :key="index">
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
</div>
</div>
<h3>设置通道</h3>
<!-- <h3>设置通道</h3> -->
<div class="chooseTDBox">
<label>选择通道:</label>
<div class="checkBox">
@ -48,29 +51,35 @@
:default-expand-all="true"
@check-change="getCheckedNodes"
>
<span
<div
v-if="!data.list"
class="custom-tree-node"
class="custom-tree-node nodelist"
slot-scope="{ data }"
>
<span class="mr10">{{ data.name }}</span>
<!-- <el-tag size="mini" type="success" v-if="zzsuccess"
>装置下发成功</el-tag
>
<el-tag size="mini" v-if="zzpending"
><i class="el-icon-loading"></i>装置下发中</el-tag
>
<el-tag size="mini" type="danger" v-if="zzerror"
>装置下发失败</el-tag
> -->
</span>
<div class="math">
偏移时间()
<el-input-number
v-model="data.offsetNum"
:min="0"
:max="9"
></el-input-number>
</div>
<!-- <div class="deStatus" v-if="isactive == data.id">
<el-tag type="success" v-if="isCheck"></el-tag>
<el-tag type="" v-if="isCheck"
><i class="el-icon-loading"></i>下发中{{ data.id }}</el-tag
>
<el-tag type="danger" v-if="data.errortag"></el-tag>
</div> -->
</div>
<span v-else class="custom-tree-node" slot-scope="{ data }">
<span>{{ data.name }}</span>
</span>
</el-tree>
</div>
<div class="flexnr" v-else>
<p class="nochannel">暂无通道</p>
<p class="nochannel">暂无图像监测装置</p>
</div>
</div>
<div slot="footer" class="dialog-footer">
@ -95,6 +104,7 @@ export default {
},
data() {
return {
isactive: "",
contentStyle: { width: "90px" },
isShow: false,
selid: 0, //id
@ -124,6 +134,8 @@ export default {
timer: null,
i: 0,
isCheck: false,
checkNode: null,
zzsuccess: false,
zzpending: false,
zzerror: false,
@ -165,21 +177,41 @@ export default {
.then((res) => {
console.log(res);
this.newzzList = res.data.list;
console.log(this.listnr);
console.log(this.newzzList);
console.log(this.zzListCheck);
//console.log(a);
this.newzzList = this.getChildren(this.newzzList);
console.log(this.newzzList);
this.loading = false;
})
.catch((err) => {});
},
//// isEdit
getChildren(data) {
console.log(data);
return data.map((item) => {
console.log(item);
item = Object.assign({}, item);
item.offsetNum = Math.floor(Math.random() * 10);
if (!!item.list && item.list.length > 0) {
item.list = this.getChildren(item.list);
}
return item;
});
},
handleCheckBox() {
console.log(this.zzListCheck);
},
// //
getCheckedNodes() {
getCheckedNodes(nodeObj) {
this.allCheckNode = this.$refs.tree.getCheckedNodes();
console.log(this.allCheckNode);
// console.log(this.allCheckNode);
console.log(nodeObj);
this.isactive = nodeObj.id;
this.isCheck = this.$refs.tree.getCheckedNodes().indexOf(nodeObj) > -1;
console.log(this.isCheck);
},
//
@ -196,6 +228,7 @@ export default {
var parmsobj = {
termid: this.allCheckNode[i].id,
channelidlist: [this.checkedAisle],
offset: this.allCheckNode[i].offsetNum,
};
console.log(parmsobj);
ruleBox.push(parmsobj);
@ -237,6 +270,7 @@ export default {
arr
) {
console.log(value, index, arr);
return value.status !== 1;
});
if (this.requestList.length == 0) {
@ -268,11 +302,12 @@ export default {
console.log(this.allCheckNode, "1111111111");
clearTimeout(this.timer);
this.timer = null;
this.sureloading = false;
},
},
};
</script>
<style lang="less" scoped>
<style lang="less">
.photoSetDialog {
.el-dialog__body {
// height: 360px;
@ -287,9 +322,31 @@ export default {
border: 1px solid #eee;
padding: 16px;
border-radius: 4px;
.mr10 {
margin-right: 10px;
.el-tree {
flex: 1;
border: 1px solid #eee;
.el-tree-node {
.el-tree-node__content {
height: 40px;
border-bottom: 1px solid #eee;
.mr10 {
margin-right: 10px;
width: 180px;
}
.nodelist {
display: flex;
align-items: center;
.math {
margin-left: 32px;
}
.deStatus {
margin-left: 24px;
}
}
}
}
}
.dybox {
h4 {
font-size: 14px;
@ -339,6 +396,10 @@ export default {
width: 50px;
}
.setTimeTd {
.ruleBox {
display: flex;
align-items: center;
}
h3 {
margin: 8px 0px;
font-size: 16px;
@ -374,6 +435,7 @@ export default {
display: flex;
align-items: center;
margin-bottom: 8px;
margin-top: 12px;
label {
margin-right: 8px;
}

@ -0,0 +1,386 @@
<template>
<el-dialog
class="photoSetDialog"
title="设置"
:visible.sync="isShow"
:close-on-click-modal="false"
width="1020px"
@close="handleclose"
>
<div class="setTimeTd">
<h3>时间表规则</h3>
<div class="flexTimeGz">
<p class="timeGz" v-for="(val, index) in ruleSchedule" :key="index">
<span>
{{
val.startTime.substring(0, val.startTime.lastIndexOf(":"))
}}</span
>
~
<span>{{
val.endTime.substring(0, val.endTime.lastIndexOf(":"))
}}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
</div>
<h3>设置通道</h3>
<div class="chooseTDBox">
<label>选择通道:</label>
<div class="checkBox">
<el-radio-group v-model="checkedAisle" @change="handleChange">
<el-radio
:label="val.id"
border
v-for="val in aisleList"
:key="val.id"
>{{ val.name }}</el-radio
>
</el-radio-group>
</div>
</div>
<div class="flexnr" v-loading="loading" v-if="newzzList.length !== 0">
<el-tree
:data="newzzList"
show-checkbox
:props="defaultProps"
ref="tree"
node-key="id"
:default-expand-all="true"
@check-change="getCheckedNodes"
>
<span
v-if="!data.list"
class="custom-tree-node"
slot-scope="{ data }"
>
<span class="mr10">{{ data.name }}</span>
<!-- <el-tag size="mini" type="success" v-if="zzsuccess"
>装置下发成功</el-tag
>
<el-tag size="mini" v-if="zzpending"
><i class="el-icon-loading"></i>装置下发中</el-tag
>
<el-tag size="mini" type="danger" v-if="zzerror"
>装置下发失败</el-tag
> -->
</span>
<span v-else class="custom-tree-node" slot-scope="{ data }">
<span>{{ data.name }}</span>
</span>
</el-tree>
</div>
<div class="flexnr" v-else>
<p class="nochannel">图像监测装置</p>
</div>
</div>
<div slot="footer" class="dialog-footer">
<!-- <el-button @click="getCheckedNodes"></el-button> -->
<el-button @click="handleclose"> </el-button>
<el-button type="primary" @click="submitForm()" :loading="sureloading"
> </el-button
>
</div>
</el-dialog>
</template>
<script>
import {
setScheduleRulel,
getScheduleRulelAccessList,
getTermListByChannelJoggle,
getCmaSchelduleUpload,
} from "@/utils/api/index";
export default {
props: {
title: String,
},
data() {
return {
contentStyle: { width: "90px" },
isShow: false,
selid: 0, //id
ruleSchedule: [], //
checkedAisle: "", //
aisleList: [], //
listnr: [], //
defaultProps: {
children: "list",
label: "name",
},
termidArr: [],
ruleid: "",
parmsList: [], //
multipleSelection: [],
//
newzzList: [],
zzListCheck: [],
loading: false,
//
checkAll: true,
isIndeterminate: true, //
timer: null,
termidArrNum: -1,
requestList: [],
timer: null,
i: 0,
zzsuccess: false,
zzpending: false,
zzerror: false,
allCheckNode: [], //
requestArr: [], //requestid
termzzid: [],
flag: false,
sureloading: false,
};
},
mounted() {},
methods: {
//
getdataform(val) {
this.selid = val.id;
this.ruleSchedule = val.list;
console.log(this.ruleSchedule, "时间规则");
this.getlistnr();
},
//
getlistnr() {
getScheduleRulelAccessList({})
.then((res) => {
this.listnr = res.data.list;
this.aisleList = res.data.channellist;
})
.catch((err) => {});
},
//
handleChange() {
console.log(this.checkedAisle);
this.loading = true;
getTermListByChannelJoggle({
id: this.checkedAisle,
})
.then((res) => {
console.log(res);
this.newzzList = res.data.list;
console.log(this.listnr);
console.log(this.newzzList);
console.log(this.zzListCheck);
this.loading = false;
})
.catch((err) => {});
},
handleCheckBox() {
console.log(this.zzListCheck);
},
// //
getCheckedNodes() {
this.allCheckNode = this.$refs.tree.getCheckedNodes();
console.log(this.allCheckNode);
},
//
submitForm() {
//console.log(this.termidArr);
this.sureSum();
},
//
sureSum() {
//console.log(this.termidArr);
console.log(this.checkedAisle);
var ruleBox = [];
for (var i = 0; i < this.allCheckNode.length; i++) {
var parmsobj = {
termid: this.allCheckNode[i].id,
channelidlist: [this.checkedAisle],
offset: Math.floor(Math.random() * 10),
};
console.log(parmsobj);
ruleBox.push(parmsobj);
}
console.log(ruleBox);
setScheduleRulel({
list: ruleBox,
scheduleid: this.selid,
})
.then((res) => {
console.log(res);
this.requestList = res.data.list;
this.requestTime();
this.timer = window.setInterval(() => {
//console.log(this.requestList);
this.requestTime();
this.i++;
}, 3000);
})
.catch((err) => {
this.$message({
showClose: true,
message: "添加失败",
type: "error",
});
});
},
//requestid
requestTime() {
this.sureloading = true;
getCmaSchelduleUpload({
list: this.requestList,
})
.then((res) => {
this.requestArr = res.data.list;
this.requestList = this.requestArr.filter(function (
value,
index,
arr
) {
console.log(value, index, arr);
return value.status !== 1;
});
if (this.requestList.length == 0) {
this.zzsuccess = true;
this.$message.success("下发成功");
clearInterval(this.timer);
this.timer = null;
this.isShow = false;
this.sureloading = false;
} else if (this.i > 9) {
this.zzerror = true;
this.i = 0;
this.$message.warning("下发失败,请稍后再试!");
clearInterval(this.timer);
this.timer = null;
this.isShow = false;
this.sureloading = false;
}
})
.catch((err) => {});
},
display() {
this.isShow = true;
},
handleclose() {
this.isShow = false;
this.newzzList = [];
this.checkedAisle = "";
console.log(this.allCheckNode, "1111111111");
clearTimeout(this.timer);
this.timer = null;
},
},
};
</script>
<style lang="less" scoped>
.photoSetDialog {
.el-dialog__body {
// height: 360px;
// overflow: auto;
}
.flexnr {
height: 360px;
overflow: auto;
display: flex;
align-items: flex-start;
border: 1px solid #eee;
padding: 16px;
border-radius: 4px;
.mr10 {
margin-right: 10px;
}
.dybox {
h4 {
font-size: 14px;
color: #333;
line-height: 24px;
font-weight: normal;
}
.xlbox {
h4 {
font-size: 14px;
color: #333;
line-height: 24px;
font-weight: normal;
}
margin-left: 16px;
.zzbox {
h4 {
}
.el-checkbox-group {
// display: flex;
// flex-direction: column;
margin-left: 22px;
.el-checkbox {
line-height: 28px;
//width: 196px;
.el-checkbox__label {
b {
margin-left: 18px;
font-weight: normal;
font-size: 12px;
}
}
}
}
}
}
}
.nochannel {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
}
.w50 {
width: 50px;
}
.setTimeTd {
h3 {
margin: 8px 0px;
font-size: 16px;
line-height: 24px;
}
.flexTimeGz {
display: flex;
flex-wrap: wrap;
.timeGz {
line-height: 32px;
margin-right: 16px;
b {
font-weight: normal;
color: @color-primary;
}
span {
margin: 0px 8px;
}
}
}
.setCheckbox {
.el-table__header .el-table-column--selection .cell .el-checkbox:after {
color: #333;
content: "全选";
font-size: 16px;
margin-left: 12px;
font-weight: bold;
}
}
}
.chooseTDBox {
display: flex;
align-items: center;
margin-bottom: 8px;
label {
margin-right: 8px;
}
}
.treeTable {
margin-top: 16px;
}
}
</style>

@ -0,0 +1,94 @@
<template>
<el-dialog
class="upgradeDialog"
title="上传Apk"
:visible.sync="isShow"
:close-on-click-modal="false"
width="670px"
@close="handleclose"
>
<div class="upBox">
<el-form
:rules="rules"
:model="formData"
ref="dataForm"
label-width="90px"
>
<el-form-item label="版本号:" prop="version">
<el-input v-model="formData.version" placeholder="审批人"></el-input>
</el-form-item>
<el-form-item label="上传Apk" prop="file">
<el-input v-model="apkname" disabled></el-input>
<el-upload
class="upload-demo"
action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
:file-list="fileList"
>
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png文件且不超过500kb
</div>
</el-upload>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {} from "@/utils/api/index";
export default {
props: {},
data() {
return {
isShow: false,
formData: {
version: "",
file: null,
},
rules: {
version: [{ required: true, message: "请输入版本号", trigger: "blur" }],
file: [{ required: true, message: "请选择上传文件", trigger: "blur" }],
},
apkname: "",
fileList: [],
};
},
methods: {
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
//
submitForm() {
this.isShow = false;
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
handleclose() {
this.$parent.updateList();
},
},
mounted() {},
};
</script>
<style lang="less">
.upgradeDialog {
}
</style>

@ -1,3 +1,130 @@
<template>
<div class="deviceUpgrade">装置升级</div>
<div class="deviceUpgrade">
<div class="upgradeBox">
<div class="upBtnGroup">
<h4>装置升级</h4>
<el-button type="primary" icon="el-icon-plus" @click="handleApk"
>上传</el-button
>
</div>
<div class="upgradeTable">
<el-table
ref="multipleTable"
:data="updateTableData"
stripe
tooltip-effect="dark"
style="width: 100%"
height="calc(100% - 40px)"
v-loading="loading"
>
<el-table-column label="版本名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="路径" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.path }}</template>
</el-table-column>
<el-table-column label="版本号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.version }}</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope">
<el-button type="text">修改</el-button>
<el-button type="text" class="deleteText">删除</el-button>
<el-button type="text">设置</el-button>
</template>
</el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page"
:page-size="pageSize"
layout="sizes, prev, pager, next, jumper,total"
:total="total"
background
>
</el-pagination>
</div>
</div>
</div>
<upgradeDialog ref="upgradeDialogref"></upgradeDialog>
</div>
</template>
<script>
import { listApk, uploadApk, issueApk } from "@/utils/api/index";
import upgradeDialog from "./components/upgradeDialog";
export default {
components: { upgradeDialog },
data() {
return {
updateTableData: [],
page: 1, //
pageSize: 20, //
total: 0, //
loading: true,
};
},
created() {
this.updateList();
},
methods: {
//
updateList() {
this.loading = true;
listApk({
pageindex: this.page,
pagesize: this.pageSize,
})
.then((res) => {
this.updateTableData = res.data.list;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
console.log(err);
this.loading = false;
});
},
// apk
handleApk() {
this.$refs.upgradeDialogref.display();
},
//
handleCurrentChange(val) {
this.page = val;
//this.deviceList();
},
//
handleSizeChange(val) {
this.pageSize = val;
//this.deviceList();
},
},
};
</script>
<style lang="less">
.deviceUpgrade {
width: calc(100% - 32px);
height: calc(100% - 32px);
padding: 16px 16px;
background: #ffffff;
.upgradeBox {
border: 1px solid #dddddd;
height: calc(100% - 32px);
padding: 16px;
border-radius: 4px;
.upBtnGroup {
display: flex;
justify-content: space-between;
align-items: center;
}
.upgradeTable {
margin-top: 16px;
height: calc(100% - 48px);
//background: #fcc;
}
}
}
</style>

@ -175,7 +175,7 @@
<el-button
type="text"
@click.native.stop="handlepicture(scope.row)"
>线缆绘制</el-button
>图片标记</el-button
>
<el-button
type="text"

@ -105,7 +105,6 @@ export default {
this.deviceList();
},
activated() {
console.log("aaaaaaaaaassss");
this.deviceList();
},
methods: {

@ -44,19 +44,22 @@
size="mini"
v-for="(val, index) in this.shedulenr"
:key="index"
>{{ val }}</el-tag
>{{ val.substring(0, val.lastIndexOf(":")) }}</el-tag
>
</div>
</div>
<div class="rightTime" v-if="newshedulenr.length !== 0">
<div class="w8">装置时间表:</div>
<span class="offtime" v-if="offsetnum !== ''"
>(偏移时间{{ offsetnum }}分钟)</span
>
<div class="w80 flexonly" v-loading="timeloading">
<el-tag
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.newshedulenr"
:key="index"
>{{ val }}</el-tag
>{{ val.substring(0, val.lastIndexOf(":")) }}</el-tag
>
</div>
</div>
@ -270,6 +273,7 @@ export default {
requestList: [],
requestArr: [], //requestid
sureloading: false,
offsetnum: "",
};
},
mounted() {
@ -299,6 +303,7 @@ export default {
// this.$message.success("");
// this.shedulenr = res.data.list.join("; ")
this.shedulenr = res.data.list;
this.offsetnum = res.data.offset;
this.loading = false;
})
.catch((err) => {
@ -613,6 +618,12 @@ export default {
}
.rightTime {
width: 50%;
position: relative;
.offtime {
position: absolute;
top: 0px;
left: 78px;
}
}
}
}

@ -28,11 +28,8 @@ module.exports = defineConfig({
proxy: {
"/api": {
//表示拦截以/api开头的请求路径
//表示拦截以/api开头的请求路径
//target: 'http://localhost:1234', //本地nodejs服务器
target: "http://47.96.238.157:8093", //公司项目服务器环境
//target: "http://180.166.218.222:40080", //dell
//target: 'http://180.166.218.222:7200',
target: "http://47.96.238.157:8093", //阿里云服务器环境
// target: "http://180.166.218.222:40080", //dell
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "", //重写api把api变成空字符因为我们真正请求的路径是没有api的

Loading…
Cancel
Save