Commit dd51de5d by 潘建波

6月16提交带任务状态版本

1 parent 07463a28
Showing 44 changed files with 1152 additions and 904 deletions
......@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title>fanxing</title>
<script src="<%= BASE_URL %>js/kinetic-v5.1.0.min.js"></script>
<script src="<%= BASE_URL %>js/ObjTree.js"></script>
......
......@@ -4,7 +4,7 @@ console.log(process.env.NODE_ENV);
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl = "http://192.168.9.233:20080"; // 测试环境url
baseUrl = "http://192.168.9.62:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
......
......@@ -39,7 +39,7 @@ export default {
editTrafficCode(params, cate_unid, code_unid) {
return api.post(urls.editTrafficCode(cate_unid, code_unid), params);
},
deleteTrafficCode(params, code_unid) {
deleteTrafficCode(cate_unid,code_unid,params) {
return api.delete(urls.editTrafficCode(cate_unid, code_unid), params);
}
};
......@@ -279,6 +279,11 @@ body{
color: #fff;
font-size: 14px;
}
.taskstatus .statusbox{
height: 25px;
line-height: 25px;
font-size: 12px;
}
.runningbox {
background: #36BEA6;
}
......@@ -296,4 +301,7 @@ body{
}
.el-table--small td, .el-table--small th {
height: 55px;
}
.el-radio__label{
color: #333;
}
\ No newline at end of file
......@@ -117,7 +117,15 @@ Vue.prototype.timeForm = function(obj) {
nowY + "-" + nowM + "-" + nowD + " " + nowH + ":" + nowMi + ":" + nowS;
return timeNow;
};
Vue.prototype.yesterDay = function() {
var data = new Date().getTime() - 24 * 60 * 60 * 1000;
var curdate = this.timeForm(new Date(data));
return curdate.split(" ")[0] + " " + "00:00:00";
};
Vue.prototype.nowDay = function(){
var data = new Date();
return this.timeForm(data);
};
/**
* @param {obj}
* UTC时间处理
......
......@@ -36,4 +36,3 @@ new Vue({
// window.onunload = function() {
// localStorage.clear();
// };
......@@ -174,15 +174,15 @@ export const asyncRouterMap = [
component: resolve =>
require(["../views/resource/store_confs.vue"], resolve)
},
{
path: "/resource/author",
name: "授权管理",
meta: {
icon: "el-icon-location"
},
component: resolve =>
require(["../views/resource/Author/author.vue"], resolve)
},
// {
// path: "/resource/author",
// name: "授权管理",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve =>
// require(["../views/resource/Author/author.vue"], resolve)
// },
{
path: "/resource/nationalStandard",
name: "国标配置",
......@@ -244,14 +244,14 @@ export const asyncRouterMap = [
},
component: resolve => require(["../views/ops/role_manage.vue"], resolve)
},
{
path: "/ops/batch_upgrade",
name: "批量升级",
meta: {
icon: "el-icon-location"
},
component: resolve => require(["../views/ops/log_manage.vue"], resolve)
},
// {
// path: "/ops/batch_upgrade",
// name: "批量升级",
// meta: {
// icon: "el-icon-location"
// },
// component: resolve => require(["../views/ops/log_manage.vue"], resolve)
// },
{
path: "/ops/log_manage",
name: "日志管理",
......
......@@ -25,5 +25,8 @@ export default {
},
setDevList(state, data) {
state.devList = data;
},
setCodeState(state, data) {
state.codestate = data;
}
};
......@@ -2,5 +2,6 @@ export default {
ocxstate: 0,
mapopen: false,
addRouter: [],
devList: []
devList: [],
codestate: ""
}
......@@ -74,7 +74,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -7,7 +7,7 @@
<el-col :span="2" class="ml10">
<el-button type="primary">查询</el-button>
</el-col>
<el-col :span="8" style="float:right">
<el-col :span="8" style="float:right" hidden>
<span class="resource-box">
<span class="title">可用分析资源:</span>
<span class="num">{{ workers.video_free }}</span>
......
......@@ -71,7 +71,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -54,7 +54,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
<template>
<div style="padding-left: 28px;">
<el-form ref="form" label-width="100px">
<!-- 手动校时 -->
<div class="lineBox big">
<el-radio v-model="typeRadio" label="1">手动校时</el-radio>
</div>
<div class="radioContent">
<div class="lineBox">
<el-form-item label="当前时间:">
<span>{{computerTime}}</span>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="设备时间:">
<el-date-picker
:disabled="typeRadio=='2'"
v-model="systemTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间">
</el-date-picker>
<span style="margin-left: 30px;"> <el-checkbox v-model="syncTime" @change="syncTimeFun" :disabled="typeRadio=='2'">与计算机时间同步</el-checkbox></span>
<el-button type="primary" size="small" class="primaryButton rightButton" :disabled="typeRadio=='2'" @click="manualClick">校时</el-button>
</el-form-item>
</div>
</div>
<div class="line"></div>
<!-- NTP校时 -->
<div class="lineBox big">
<el-radio v-model="typeRadio" label="2">NTP校时</el-radio>
</div>
<div class="radioContent">
<div class="lineBox">
<el-form-item label="服务器地址:">
<span class="inputBox">
<el-input placeholder="请输入服务器地址" v-model="serverAdr" :disabled="typeRadio=='1'"></el-input>
</span>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="NTP端口:">
<span class="inputBox">
<el-input placeholder="请输入NTP端口" v-model="ntpPort" :disabled="typeRadio=='1'"></el-input>
</span>
</el-form-item>
</div>
<div class="lineBox">
<el-radio v-model="ntpRadio" label="1" :disabled="typeRadio=='1'">定时校时</el-radio>
</div>
<el-form ref="inlineform" label-width="100px" inline>
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[0]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio=='1'||ntpRadio=='2'"
value-format="HH:mm"
v-model="timeArr[1]"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[2]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[3]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio=='1'||ntpRadio=='2'"
v-model="timeArr[4]"
value-format="HH:mm"
placeholder="选择时间">
</el-time-select>
</el-form-item>
<el-form-item label=" ">
<span>自动进行校时(可设置多个时间点,不得超过5个)</span>
</el-form-item>
</div>
</el-form>
<div class="lineBox">
<el-radio v-model="ntpRadio" label="2" :disabled="typeRadio=='1'">周期校时</el-radio>
</div>
<div class="lineBox">
<el-form-item label="每隔:">
<span class="inputBox" style="width: 60px;">
<el-input placeholder="" v-model.number="weekMinutes" :disabled="typeRadio=='1'||ntpRadio=='1'"></el-input>
</span>
<span style="margin-left: 14px;">秒,自动进行校时</span>
<el-button type="primary" size="small" class="primaryButton rightButton" :disabled="typeRadio=='1'" @click="saveClick">保存设置</el-button>
</el-form-item>
</div>
</div>
</el-form>
</div>
<div style="padding-left: 28px;">
<el-form ref="form" label-width="100px">
<!-- 手动校时 -->
<div class="lineBox big" hidden>
<el-radio v-model="typeRadio" label="1">手动校时</el-radio>
</div>
<div class="radioContent" hidden>
<div class="lineBox">
<el-form-item label="当前时间:">
<span>{{ computerTime }}</span>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="设备时间:">
<el-date-picker
:disabled="typeRadio == '2'"
v-model="systemTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间"
>
</el-date-picker>
<span style="margin-left: 30px;">
<el-checkbox
v-model="syncTime"
@change="syncTimeFun"
:disabled="typeRadio == '2'"
>与计算机时间同步</el-checkbox
></span
>
<el-button
type="primary"
size="small"
class="primaryButton rightButton"
:disabled="typeRadio == '2'"
@click="manualClick"
>校时</el-button
>
</el-form-item>
</div>
</div>
<div class="line" hidden></div>
<!-- NTP校时 -->
<div class="lineBox big">
<el-radio v-model="typeRadio" label="2">NTP校时</el-radio>
</div>
<div class="radioContent">
<div class="lineBox">
<el-form-item label="服务器地址:">
<span class="inputBox">
<el-input
placeholder="请输入服务器地址"
v-model="serverAdr"
:disabled="typeRadio == '1'"
></el-input>
</span>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="NTP端口:">
<span class="inputBox">
<el-input
placeholder="请输入NTP端口"
v-model="ntpPort"
:disabled="typeRadio == '1'"
></el-input>
</span>
</el-form-item>
</div>
<div class="lineBox">
<el-radio v-model="ntpRadio" label="1" :disabled="typeRadio == '1'"
>定时校时</el-radio
>
</div>
<el-form ref="inlineform" label-width="100px" inline>
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio == '1' || ntpRadio == '2'"
v-model="timeArr[0]"
value-format="HH:mm"
placeholder="选择时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio == '1' || ntpRadio == '2'"
value-format="HH:mm"
v-model="timeArr[1]"
placeholder="选择时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio == '1' || ntpRadio == '2'"
v-model="timeArr[2]"
value-format="HH:mm"
placeholder="选择时间"
>
</el-time-select>
</el-form-item>
</div>
<div class="lineBox">
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio == '1' || ntpRadio == '2'"
v-model="timeArr[3]"
value-format="HH:mm"
placeholder="选择时间"
>
</el-time-select>
</el-form-item>
<el-form-item label="每天:">
<el-time-select
:disabled="typeRadio == '1' || ntpRadio == '2'"
v-model="timeArr[4]"
value-format="HH:mm"
placeholder="选择时间"
>
</el-time-select>
</el-form-item>
<el-form-item label=" ">
<span>自动进行校时(可设置多个时间点,不得超过5个)</span>
</el-form-item>
</div>
</el-form>
<div class="lineBox">
<el-radio v-model="ntpRadio" label="2" :disabled="typeRadio == '1'"
>周期校时</el-radio
>
</div>
<div class="lineBox">
<el-form-item label="每隔:">
<span class="inputBox" style="width: 60px;">
<el-input
placeholder=""
v-model.number="weekMinutes"
:disabled="typeRadio == '1' || ntpRadio == '1'"
></el-input>
</span>
<span style="margin-left: 14px;">秒,自动进行校时</span>
<el-button
type="primary"
size="small"
class="primaryButton rightButton"
:disabled="typeRadio == '1'"
@click="saveClick"
>保存设置</el-button
>
</el-form-item>
</div>
</div>
</el-form>
</div>
</template>
<script>
export default {
data(){
return{
typeRadio:'1',
ntpRadio:'1',
timeArr:['','','','',''],
ntpPort:'',
weekMinutes:'',
activeName: 'first',
systemTime:'',
syncTime:false,
computerTime:this.$moment().format("YYYY-MM-DD HH:mm:ss"),
dev_unid:localStorage.getItem('dev_unid'),
device_id:sessionStorage.getItem('device_id'),
serverAdr:''
}
},
components:{},
mounted(){
this.timer();
this.getDevTimes();
this.getNtpTimes();
},
methods:{
handleClick(tab, event) {
},
timer(){
setInterval(()=>{
this.computerTime=this.$moment().format("YYYY-MM-DD HH:mm:ss")
},1000)
},
getDevTimes () {
this.$api.ops.getDevsTime({
},this.dev_unid,this.device_id).then(res=>{
if (res.ecode != undefined && res.ecode != 200) {
//console.log('获取设备时间失败!' + utcTimes.enote);
this.$message({
type: 'error',
message: '获取设备时间失败!' + res.enote
});
} else {
if(res && typeof res === 'string') {
//先转utc格式
let date = this.$moment.utc(res).format();
//再utc时间转本地时间
this.systemTime = this.$moment(date)
.local()
.format("YYYY-MM-DD HH:mm:ss");
}
}
})
},
syncTimeFun(){
if(this.syncTime){
this.systemTime=this.computerTime;
}
},
manualClick() {
let time=this.$moment(this.systemTime).utc().format("YYYY-MM-DD HH:mm:ss");
this.$api.ops.manualTime({
time:time
},this.dev_unid,this.device_id).then(res=>{
if(res.ecode != 200) {
this.$message({
type: 'error',
message: '手动校时失败!' + res.enote
})
} else {
this.$message({
type: 'success',
message: '手动校时成功!'
})
}
})
},
getNtpTimes () {
//获取ntp校时配置
this.$api.ops.getNtp({
},this.dev_unid,this.device_id).then(res=>{
if(res.ecode != undefined && res.ecode != 200) {
this.$message({
type: 'error',
message: '获取NTP校时失败!' + res.enote
});
} else {
if(res.enable_ntp == 1) {
this.typeRadio = '2';
this.serverAdr = res.ntp_server_ip;
this.ntpPort = res.ntp_server_port;
console.log('获取NTP时间:', res.timing_times)
this.timeArr=res.timing_times;
this.weekMinutes = res.timing_interval;
if(res.timing_policy == "fix"){
this.ntpRadio = '1';
}
if(res.timing_policy == "interval"){
this.ntpRadio = '2';
}
} else {
this.typeRadio = '1';
}
}
}).catch(err => {
console.log('获取ntp校时设置异常:', err.message);
});
},
saveClick() {
if(this.serverAdr != "" &&this.ntpPort != ""){
let timing_policy=''
if(this.ntpRadio=='1'){
//如果定时校时
timing_policy='fix'
//数组去空值
let arr=[];
this.timeArr.forEach(item=>{
if(item!=""&&typeof(item)!="undefined"){
arr.push(item)
}
})
if(new Set(arr).size !== arr.length){
  this.$message({
type: 'error',
message: '定时时间重复,请重新选择'
});
return false;
}
}else if(this.ntpRadio=='2'){
//周期校时
timing_policy='interval'
if(this.weekMinutes === '') {
this.$message({
type: 'warning',
message: '未设置周期时间!'
})
return;
}
}
let ntpTimingData = {
device_id: this.device_id,
enable_ntp: 1,
ntp_server_ip: this.serverAdr,
ntp_server_port: this.ntpPort,
timing_policy: timing_policy,
timing_times: this.timeArr,
timing_interval: this.weekMinutes
}
this.ntpTimeSet(ntpTimingData);
}else {
this.$message({
type: 'warning',
message: '服务器地址以及ntp端口不能为空!'
})
}
},
ntpTimeSet(data){
this.$api.ops.ntpTime(data,this.dev_unid,this.device_id).then(res=>{
if(res.ecode == 200){
this.$message({
type: 'success',
message: 'NTP校时成功!'
})
} else {
this.$message({
type: 'error',
message: 'NTP校时失败!' + res.enote
})
}
}).catch(err => {
console.log('ntp校时异常:', error.message)
});
}
},
}
export default {
data() {
return {
typeRadio: "2",
ntpRadio: "1",
timeArr: ["", "", "", "", ""],
ntpPort: "",
weekMinutes: "",
activeName: "first",
systemTime: "",
syncTime: false,
computerTime: this.$moment().format("YYYY-MM-DD HH:mm:ss"),
dev_unid: localStorage.getItem("dev_unid"),
device_id: sessionStorage.getItem("device_id"),
serverAdr: ""
};
},
components: {},
mounted() {
this.timer();
this.getDevTimes();
this.getNtpTimes();
},
methods: {
handleClick(tab, event) {},
timer() {
setInterval(() => {
this.computerTime = this.$moment().format("YYYY-MM-DD HH:mm:ss");
}, 1000);
},
getDevTimes() {
this.$api.ops.getDevsTime({}, this.dev_unid, this.device_id).then(res => {
if (res.ecode != undefined && res.ecode != 200) {
//console.log('获取设备时间失败!' + utcTimes.enote);
this.$message({
type: "error",
message: "获取设备时间失败!" + res.enote
});
} else {
if (res && typeof res === "string") {
//先转utc格式
let date = this.$moment.utc(res).format();
//再utc时间转本地时间
this.systemTime = this.$moment(date)
.local()
.format("YYYY-MM-DD HH:mm:ss");
}
}
});
},
syncTimeFun() {
if (this.syncTime) {
this.systemTime = this.computerTime;
}
},
manualClick() {
let time = this.$moment(this.systemTime)
.utc()
.format("YYYY-MM-DD HH:mm:ss");
this.$api.ops
.manualTime(
{
time: time
},
this.dev_unid,
this.device_id
)
.then(res => {
if (res.ecode != 200) {
this.$message({
type: "error",
message: "手动校时失败!" + res.enote
});
} else {
this.$message({
type: "success",
message: "手动校时成功!"
});
}
});
},
getNtpTimes() {
//获取ntp校时配置
this.$api.ops
.getNtp({}, this.dev_unid, this.device_id)
.then(res => {
if (res.ecode != undefined && res.ecode != 200) {
this.$message({
type: "error",
message: "获取NTP校时失败!" + res.enote
});
} else {
if (res.enable_ntp == 1) {
this.typeRadio = "2";
this.serverAdr = res.ntp_server_ip;
this.ntpPort = res.ntp_server_port;
console.log("获取NTP时间:", res.timing_times);
this.timeArr = res.timing_times;
this.weekMinutes = res.timing_interval;
if (res.timing_policy == "fix") {
this.ntpRadio = "1";
}
if (res.timing_policy == "interval") {
this.ntpRadio = "2";
}
} else {
this.typeRadio = "1";
}
}
})
.catch(err => {
console.log("获取ntp校时设置异常:", err.message);
});
},
saveClick() {
if (this.serverAdr != "" && this.ntpPort != "") {
let timing_policy = "";
if (this.ntpRadio == "1") {
//如果定时校时
timing_policy = "fix";
//数组去空值
let arr = [];
this.timeArr.forEach(item => {
if (item != "" && typeof item != "undefined") {
arr.push(item);
}
});
if (new Set(arr).size !== arr.length) {
this.$message({
type: "error",
message: "定时时间重复,请重新选择"
});
return false;
}
} else if (this.ntpRadio == "2") {
//周期校时
timing_policy = "interval";
if (this.weekMinutes === "") {
this.$message({
type: "warning",
message: "未设置周期时间!"
});
return;
}
}
let ntpTimingData = {
device_id: this.device_id,
enable_ntp: 1,
ntp_server_ip: this.serverAdr,
ntp_server_port: this.ntpPort,
timing_policy: timing_policy,
timing_times: this.timeArr,
timing_interval: this.weekMinutes
};
this.ntpTimeSet(ntpTimingData);
} else {
this.$message({
type: "warning",
message: "服务器地址以及ntp端口不能为空!"
});
}
},
ntpTimeSet(data) {
this.$api.ops
.ntpTime(data, this.dev_unid, this.device_id)
.then(res => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: "NTP校时成功!"
});
} else {
this.$message({
type: "error",
message: "NTP校时失败!" + res.enote
});
}
})
.catch(err => {
console.log("ntp校时异常:", error.message);
});
}
}
};
</script>
<style lang="scss" scoped>
.line{
height:1px;
background:rgba(232,232,232,1);
margin-top: 18px;
margin-bottom: 15px;
}
.lineBox{
padding: 12px 0 12px 50px;
}
.radioContent{
margin-left: 24px;
}
.rightButton{
float: right;
margin-right: 20%;
}
.inputBox{
width: 220px;
}
</style>
\ No newline at end of file
.line {
height: 1px;
background: rgba(232, 232, 232, 1);
margin-top: 18px;
margin-bottom: 15px;
}
.lineBox {
padding: 12px 0 12px 50px;
}
.radioContent {
margin-left: 24px;
}
.rightButton {
float: right;
margin-right: 20%;
}
.inputBox {
width: 220px;
}
</style>
......@@ -63,7 +63,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -51,7 +51,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -86,14 +86,14 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px;" hidden>
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
:page-sizes="[30, 50, 100, 200]"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -170,7 +170,7 @@ export default {
return {
total: 0,
page: 1,
pageSize: 20,
pageSize: 50,
tableData: [],
detailVisible: false,
eventCateData: [],
......@@ -188,7 +188,7 @@ export default {
},
components: {},
created() {
// this.getEventList();
this.getEventList();
this.getEventCate();
},
methods: {
......@@ -197,8 +197,14 @@ export default {
this.tableData = res.list_data;
});
},
cateChange() {
this.$api.codes.eventType({}, this.curcate).then(res => {
cateChange(unid) {
let offset = (this.page - 1) * this.pageSize;
let obj = {
limit: this.pageSize,
offset: offset
};
this.tableData = [];
this.$api.codes.eventType(obj, unid).then(res => {
this.tableData = res.list_data;
});
},
......
......@@ -33,7 +33,7 @@
type="index"
align="center"
label="#"
width="40"
width="60"
></el-table-column>
<el-table-column align="center" prop="code_unid" label="code_unid">
</el-table-column>
......@@ -77,14 +77,14 @@
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<div style="margin-top: 28px;" hidden>
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[20, 30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -242,34 +242,54 @@ export default {
});
},
saveAddCode() {
this.$api.codes
.addTrafficCode(this.codeData, this.curCateUnid)
.then(res => {
console.log(res);
});
let data = {
code_unid: this.codeData.code_unid,
code: this.codeData.code,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes.addTrafficCode(data, this.curCateUnid).then(res => {
console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
});
},
saveEditCode() {
saveEditCode() {
let data = {
"code_unid": this.codeData.code_unid,
"code":this.codeData.code,
"name":this.codeData.name,
"note":this.codeData.note,
"active":this.codeData.active }
code_unid: this.codeData.code_unid,
code: this.codeData.code,
name: this.codeData.name,
note: this.codeData.note,
active: this.codeData.active
};
this.$api.codes
.editTrafficCode(
data,
this.curCateUnid,
this.codeData.code_unid
)
.editTrafficCode(data, this.curCateUnid, this.codeData.code_unid)
.then(res => {
console.log(res);
this.detailVisible = false;
this.cateChange(this.curCateUnid);
});
},
deleteCode(index, row) {
this.$api.codes
.editTrafficCode(row, this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$api.codes
.deleteTrafficCode(this.curCateUnid, row.code_unid)
.then(res => {
console.log(res);
this.cateChange(this.curCateUnid);
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
},
handleSizeChange(val) {
......
......@@ -85,7 +85,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
<template>
<div class="contentBox">
<div class="content">
<div style="padding:8px 20px;">
<span class="inputBox">
<el-input v-model="storename" placeholder="请输入存储配置名称"></el-input>
</span>
<el-button type="primary" style="position: relative;top: -2px;" @click="query">查询</el-button>
<span style="float: right;">
<el-button type="info" icon="el-icon-search" @click="add">添加</el-button>
</span>
</div>
<div style="padding: 0 15px 20px 23px;">
<el-table
:height="tableHeight"
:data="tableData"
stripe
border
style="width: 100%">
<el-table-column
align="center"
prop="name"
label="名称">
</el-table-column>
<el-table-column
prop="create_dt"
align="center"
label="上传时间">
</el-table-column>
<el-table-column
align="center"
prop="task_list"
label="应用任务">
<template slot-scope="scope">
<el-tooltip :content="scope.row.ellipsis" placement="bottom" effect="light" :visible-arrow=false>
<span class="ellipsis">{{scope.row.ellipsis}}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
align="center"
width="300"
prop="operation"
label="操作">
<template slot-scope="scope">
<el-tooltip content="详情" placement="bottom" effect="light" :visible-arrow=false>
<span class="el-icon-info editIcon" @click="detail(scope.$index, scope.row)"></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip content="删除" placement="bottom" effect="light" :visible-arrow=false>
<span class="el-icon-delete delIcon" @click="delFun(scope.$index, scope.row)"></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:total="total">
</el-pagination>
<div style="clear: both;"></div>
</div>
</div>
</div>
<el-dialog
title="添加"
:visible.sync="addVisible"
width="450px">
<div>
<el-form label-position="left" label-width="120px">
<el-form-item label="配置名称">
<el-input v-model="names"></el-input>
</el-form-item>
<el-form-item label="添加文件">
<el-upload
ref="upload"
action="uploadUrl"
:http-request="httpRequest"
multiple
name="file"
:auto-upload="false">
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> -->
</el-upload>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="addVisible=false">取 消</el-button>
<el-button type="primary" @click="save">上 传</el-button>
</span>
</el-dialog>
<el-dialog title="详情" :visible.sync="detailVisible" width="30%">
<div class="title">任务列表</div>
<div class="maxHeight">
<el-tree
:props="props"
:load="loadNode"
lazy>
</el-tree>
</div>
</el-dialog>
<div class="content">
<div style="padding:8px 20px;">
<span class="inputBox">
<el-input
v-model="storename"
placeholder="请输入存储配置名称"
></el-input>
</span>
<el-button
type="primary"
style="position: relative;top: -2px;"
@click="query"
>查询</el-button
>
<span style="float: right;">
<el-button type="info" icon="el-icon-search" @click="add"
>添加</el-button
>
</span>
</div>
<div style="padding: 0 15px 20px 23px;">
<el-table
:height="tableHeight"
:data="tableData"
stripe
border
style="width: 100%"
>
<el-table-column align="center" prop="name" label="名称">
</el-table-column>
<el-table-column prop="create_dt" align="center" label="上传时间">
</el-table-column>
<el-table-column align="center" prop="task_list" label="应用任务">
<template slot-scope="scope">
<el-tooltip
:content="scope.row.ellipsis"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span class="ellipsis">{{ scope.row.ellipsis }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
align="center"
width="300"
prop="operation"
label="操作"
>
<template slot-scope="scope">
<el-tooltip
content="详情"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-info editIcon"
@click="detail(scope.$index, scope.row)"
></span>
</el-tooltip>
<span class="tableSpanBorder"></span>
<el-tooltip
content="删除"
placement="bottom"
effect="light"
:visible-arrow="false"
>
<span
class="el-icon-delete delIcon"
@click="delFun(scope.$index, scope.row)"
></span>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 28px;">
<el-pagination
style="float: right;"
background
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:total="total"
>
</el-pagination>
<div style="clear: both;"></div>
</div>
</div>
</div>
<el-dialog title="添加" :visible.sync="addVisible" width="450px">
<div>
<el-form label-position="left" label-width="120px">
<el-form-item label="配置名称">
<el-input v-model="names"></el-input>
</el-form-item>
<el-form-item label="添加文件">
<el-upload
ref="upload"
action="uploadUrl"
:http-request="httpRequest"
:on-success="uploadsuccess"
multiple
name="file"
:auto-upload="false"
>
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<!-- <div slot="tip" class="el-upload__tip">只能上传视频文件</div> -->
</el-upload>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="addVisible = false">取 消</el-button>
<el-button type="primary" @click="save">上 传</el-button>
</span>
</el-dialog>
<el-dialog title="详情" :visible.sync="detailVisible" width="30%">
<div class="title">任务列表</div>
<div class="maxHeight">
<el-tree :props="props" :load="loadNode" lazy> </el-tree>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data(){
return{
addVisible:false,
uploadUrl: '',
names:'',
file:[],
props: {
label: 'name',
children: 'child',
isLeaf: 'leaf'
},
detailData:[],
dev_unid: localStorage.getItem('dev_unid'),
resource:{
picture_busy: 0,
picture_free: 0,
video_busy: 0,
video_free: 0,
},
total:0,
page:1,
pageSize:30,
tableData: [],
devsList:[],
selectDevs:'',
detailVisible:false,
storename:'',
curentSubList:[],
tableHeight:window.opsTableHeight
}
},
components:{
},
mounted(){
this.query();
},
methods:{
// 自定义的上传函数
httpRequest(param) {
this.file=[];
// 一般情况下是在这里创建FormData对象,但我们需要上传多个文件,为避免发送多次请求,因此在这里只进行文件的获取,param可以拿到文件上传的所有信息
this.file.push(param.file)
},
save(){
this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
// 最重要的就是这段代码
var upData = new FormData() // 首先创建FormData对象
this.file.forEach((file)=>{
upData.append('file', file); // 因为要上传多个文件,所以需要遍历一下才行
upData.append('name', this.names);
upData.append("is_temp", 0);
})
this.$api.resource.uploadStore(upData).then(res=>{
this.query();
})
},
loadNode(node, resolve) {
if (node.level === 0) {
return resolve(this.curentSubList);
}
if (node.level > 1) return resolve([]);
this.$api.resource.getSubTask({},node.data.unid).then(res=>{
if(res.list_data==null){
res.list_data=[];
}
res.list_data.forEach(item=>{
item.name=item.subtask_name;
item['leaf']=true;
})
resolve(res.list_data)
})
},
query(){
this.tableData=[];
let offset = (this.page - 1) * this.pageSize;
this.$api.resource.getStoreConList({
limit: this.pageSize,
offset: offset,
name__like: this.storename,
},this.dev_unid).then((res)=>{
this.total=res.total_num;
if(res.list_data==null){
this.tableData=[]
}else{
this.tableData=res.list_data;
}
this.tableData.forEach(list=>{
let ellipsisText='';
list.task_list.forEach(item=>{
ellipsisText+=item.name+','
})
ellipsisText=ellipsisText.substring(0,ellipsisText.length-1);
list['ellipsis']=ellipsisText;
//树状图有子节点
list['leaf']=false;
})
console.log(this.tableData)
}).catch((error)=>{
})
},
add(){
this.addVisible=true;
},
taskFormatter(row, column, cellValue, index){
let columnText='';
row.task_list.forEach(item=>{
columnText+=item.name+','
})
columnText=columnText.substring(0,columnText.length-1);
return columnText
},
handleSizeChange(val) {
this.pageSize=val;
this.query();
},
handleCurrentChange(val) {
this.page=val;
this.query();
},
detail(index,row){
this.detailVisible=true;
this.curentSubList=[];
this.curentSubList=row.task_list;
},
delFun(index,row){
this.$confirm('此操作将永久删除该选项, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$api.resource.delStore({},row.unid).then(res=>{
if(res.ecode==200){
this.$message({
type: 'success',
message: '删除成功!'
});
this.query();
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
}
export default {
data() {
return {
addVisible: false,
uploadUrl: "",
names: "",
file: [],
props: {
label: "name",
children: "child",
isLeaf: "leaf"
},
detailData: [],
dev_unid: localStorage.getItem("dev_unid"),
resource: {
picture_busy: 0,
picture_free: 0,
video_busy: 0,
video_free: 0
},
total: 0,
page: 1,
pageSize: 30,
tableData: [],
devsList: [],
selectDevs: "",
detailVisible: false,
storename: "",
curentSubList: [],
tableHeight: window.opsTableHeight
};
},
components: {},
mounted() {
this.query();
},
methods: {
// 自定义的上传函数
httpRequest(param) {
this.file = [];
// 一般情况下是在这里创建FormData对象,但我们需要上传多个文件,为避免发送多次请求,因此在这里只进行文件的获取,param可以拿到文件上传的所有信息
this.file.push(param.file);
},
save() {
this.$refs.upload.submit(); // 这里是执行文件上传的函数,其实也就是获取我们要上传的文件
// 最重要的就是这段代码
var upData = new FormData(); // 首先创建FormData对象
this.file.forEach(file => {
upData.append("file", file); // 因为要上传多个文件,所以需要遍历一下才行
upData.append("name", this.names);
upData.append("is_temp", 0);
});
this.$api.resource.uploadStore(upData).then(res => {
this.query();
});
},
uploadsuccess() {
this.addVisible = false;
},
loadNode(node, resolve) {
if (node.level === 0) {
return resolve(this.curentSubList);
}
if (node.level > 1) return resolve([]);
this.$api.resource.getSubTask({}, node.data.unid).then(res => {
if (res.list_data == null) {
res.list_data = [];
}
res.list_data.forEach(item => {
item.name = item.subtask_name;
item["leaf"] = true;
});
resolve(res.list_data);
});
},
query() {
this.tableData = [];
let offset = (this.page - 1) * this.pageSize;
this.$api.resource
.getStoreConList(
{
limit: this.pageSize,
offset: offset,
name__like: this.storename
},
this.dev_unid
)
.then(res => {
this.total = res.total_num;
if (res.list_data == null) {
this.tableData = [];
} else {
this.tableData = res.list_data;
}
this.tableData.forEach(list => {
let ellipsisText = "";
list.task_list.forEach(item => {
ellipsisText += item.name + ",";
});
ellipsisText = ellipsisText.substring(0, ellipsisText.length - 1);
list["ellipsis"] = ellipsisText;
//树状图有子节点
list["leaf"] = false;
});
console.log(this.tableData);
})
.catch(error => {});
},
add() {
this.addVisible = true;
},
taskFormatter(row, column, cellValue, index) {
let columnText = "";
row.task_list.forEach(item => {
columnText += item.name + ",";
});
columnText = columnText.substring(0, columnText.length - 1);
return columnText;
},
handleSizeChange(val) {
this.pageSize = val;
this.query();
},
handleCurrentChange(val) {
this.page = val;
this.query();
},
detail(index, row) {
this.detailVisible = true;
this.curentSubList = [];
this.curentSubList = row.task_list;
},
delFun(index, row) {
this.$confirm("此操作将永久删除该选项, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$api.resource.delStore({}, row.unid).then(res => {
if (res.ecode == 200) {
this.$message({
type: "success",
message: "删除成功!"
});
this.query();
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除"
});
});
}
}
};
</script>
<style lang="scss" scoped>
.topCon{
background: $white-back-color;
margin-bottom: 12px;
height: 100px;
.left{
display: inline-block;
margin: {
top: 22px;
left: 30px;
};
img{
width:65px ;
height: 55px;
margin-right: 11px;
}
.topText{
font-size:24px;
font-family:MicrosoftYaHeiUI-Bold,MicrosoftYaHeiUI;
font-weight:bold;
margin-bottom: 4px;
}
.bottomText{
font-size:14px;
font-family:MicrosoftYaHeiUI;
}
}
.right{
float: right;
.topText{
font-size:28px;
font-family:MicrosoftYaHeiUI-Bold,MicrosoftYaHeiUI;
font-weight:bold;
}
.bottomText{
position: relative;
top: -1px;
font-size:14px;
font-family:MicrosoftYaHeiUI;
}
}
.textCon{
display: inline-block;
vertical-align: top;
}
.border{
display: inline-block;
height: 40px;
border: {
left: 2px solid $border-color;
};
}
.rightBox{
margin-top: 14px;
display: inline-block;
img{
margin:{
top:15px;
right: 22px;
}
}
}
.rightBox:nth-of-type(1){
img{
width: 34px;
height: 34px;
}
.textCon{
margin-right:114px ;
}
}
.rightBox:nth-of-type(2){
position: relative;
top: 4px;
img{
width: 40px;
height: 40px;
margin-left: 102px;
}
.textCon{
margin-right:101px ;
}
}
.rightBox:nth-of-type(3){
img{
width: 34px;
height: 35px;
margin-left: 104px;
}
.textCon{
margin-right:184px ;
}
}
}
.title{
font-size: 18px;
margin-bottom: 6px;
}
.maxHeight{
max-height: 400px;
overflow-y: auto;
}
.ellipsis{
display: inline-block;
width: 200px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.resourceDiv{
display: inline-block;
margin-left: 10%;
span{
margin-right: 5%;
}
}
.content{
background: #FFFFFF;
}
.inputBox{
margin-right: 20px;
}
.selectBox{
margin-right: 20px;
}
.editIcon{
cursor: pointer;
color:#0069ff;
font-size:16px;
}
.editIcon2{
cursor: pointer;
color:#87d14b;
font-size:16px;
}
.playIcon{
cursor: pointer;
color:#34b3a2;
font-size:16px;
}
.pauseIcon{
cursor: pointer;
color:#ffc62e;
font-size:14px;
}
.delIcon{
cursor: pointer;
color:#f2365a;
font-size:16px;
}
</style>
\ No newline at end of file
.topCon {
background: $white-back-color;
margin-bottom: 12px;
height: 100px;
.left {
display: inline-block;
margin: {
top: 22px;
left: 30px;
}
img {
width: 65px;
height: 55px;
margin-right: 11px;
}
.topText {
font-size: 24px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
margin-bottom: 4px;
}
.bottomText {
font-size: 14px;
font-family: MicrosoftYaHeiUI;
}
}
.right {
float: right;
.topText {
font-size: 28px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
}
.bottomText {
position: relative;
top: -1px;
font-size: 14px;
font-family: MicrosoftYaHeiUI;
}
}
.textCon {
display: inline-block;
vertical-align: top;
}
.border {
display: inline-block;
height: 40px;
border: {
left: 2px solid $border-color;
}
}
.rightBox {
margin-top: 14px;
display: inline-block;
img {
margin: {
top: 15px;
right: 22px;
}
}
}
.rightBox:nth-of-type(1) {
img {
width: 34px;
height: 34px;
}
.textCon {
margin-right: 114px;
}
}
.rightBox:nth-of-type(2) {
position: relative;
top: 4px;
img {
width: 40px;
height: 40px;
margin-left: 102px;
}
.textCon {
margin-right: 101px;
}
}
.rightBox:nth-of-type(3) {
img {
width: 34px;
height: 35px;
margin-left: 104px;
}
.textCon {
margin-right: 184px;
}
}
}
.title {
font-size: 18px;
margin-bottom: 6px;
}
.maxHeight {
max-height: 400px;
overflow-y: auto;
}
.ellipsis {
display: inline-block;
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.resourceDiv {
display: inline-block;
margin-left: 10%;
span {
margin-right: 5%;
}
}
.content {
background: #ffffff;
}
.inputBox {
margin-right: 20px;
}
.selectBox {
margin-right: 20px;
}
.editIcon {
cursor: pointer;
color: #0069ff;
font-size: 16px;
}
.editIcon2 {
cursor: pointer;
color: #87d14b;
font-size: 16px;
}
.playIcon {
cursor: pointer;
color: #34b3a2;
font-size: 16px;
}
.pauseIcon {
cursor: pointer;
color: #ffc62e;
font-size: 14px;
}
.delIcon {
cursor: pointer;
color: #f2365a;
font-size: 16px;
}
</style>
......@@ -207,7 +207,7 @@ export default {
unid: this.addVideoParam.addr_unid
};
this.$emit("getAllData", data);
// this.$parent.$parent.$parent.submitLaterGet(data)
// this.$parent.$parent.$parent.$parent.submitLaterGet(data);
this.cameraAddVisible = false;
} else {
this.$message.error(res.enote);
......@@ -251,6 +251,11 @@ export default {
});
}
}
},
created(){
this.dirCodeList = localStorage.getItem("卡口方向")
? JSON.parse(localStorage.getItem("卡口方向"))
: [];
}
};
</script>
......
......@@ -21,14 +21,14 @@
data.vchan_name == "" ? "未命名" : data.vchan_name
}}</span>
</span>
<span class="tree-btn" v-if="data.label || data.label == ''">
<span class="tree-btn" v-if="(data.label || data.label == '') && data.vtype ? false:true" >
<i class="el-icon-plus" @click.stop="nodeAddClick(node, data)"></i>
<i
class="el-icon-edit"
@click.stop="nodeEditClick(node, data)"
v-if="data.org_type != 'root'"
></i>
<i
<i
class="el-icon-delete"
@click.stop="nodeDelClick(node, data)"
v-if="data.org_type != 'root'"
......
......@@ -135,7 +135,6 @@ export default {
console.log("error", req);
},
handleNodeClick(data) {
debugger
this.$emit("clickHandle", data, "video");
// this.$parent.$parent.getVideoTable(data,'video')
},
......
......@@ -314,8 +314,8 @@ export default {
.then(res => {
this.cameraTree = res.vchan_struct;
this.cameraArr = [];
this.cameraBuildTree(res.vchan_struct);
this.getTable(data, "camera");
this.cameraTreeData = this.cameraBuildTree(res.vchan_struct);
// this.getTable(data, "camera");
});
},
syncBuildTree(data) {
......@@ -394,6 +394,7 @@ export default {
obj["label"] =
data[i].vchan_name === "" ? "未命名" : data[i].vchan_name;
obj["type"] = data[i].vchan_type;
obj["vtype"] = "camera";
obj["root"] = "手动添加相机资源";
obj["orgNode"] = orgObject;
obj["addrNode"] = addrObject;
......@@ -459,6 +460,10 @@ export default {
vchan_type: "camera",
org_unid: data.unid
};
if (data.vtype) {
this.formattterData.push(data);
return;
}
this.$api.resource
.getCameraTable(search_params, this.dev_unid)
.then(res => {
......
......@@ -47,7 +47,7 @@
:key="subTask.subtask_id"
:class="[
{ subtaskActive: subTask.subtask_id == currentSubtaskId },
{ disabledColor: subTask.running_status != 'Running' }
{ disabledColor: subTask.enableStatus == 5 }
]"
:data-subtask="subTask.subtask_id"
:id="subTask.vchan.vdev_unid + ',' + subTask.vchan.vchan_refid"
......@@ -128,6 +128,10 @@ export default {
});
},
subTasksClick(vdata) {
//删除中的任务不能点击
if (vdata.enableStatus == 5) {
return;
}
this.$store.commit("setocxstate", 1);
this.currentSubtaskId = vdata.subtask_id;
this.subtaskdata = vdata;
......@@ -331,6 +335,11 @@ export default {
color #01ce82
}
}
.disabledColor{
color #c0c0c0!important;
text-decoration: line-through;
cursor text
}
.subtaskActive {
// background #0c3b87
}
......
......@@ -75,6 +75,7 @@
<el-select
v-if="drawState == 2 && selectedShape"
v-model="markLineDirect"
placeholder="方向选择"
>
<el-option value="0" label="去向"></el-option>
<el-option value="1" label="来向"></el-option>
......@@ -83,6 +84,7 @@
<span v-if="drawState == 2 && selectedShape">车道号</span>
<el-input
type="number"
placeholder="车道号"
v-model="lineNum"
min="1"
v-if="
......@@ -134,6 +136,7 @@
disabled="disabled"
type="text"
class="w120"
style="margin-top:10px"
placeholder="区域ID"
></el-input>
<el-input
......@@ -147,13 +150,14 @@
<div v-if="canvasState" sytle="textAlign:center">
<!-- <button>撤销</button> -->
<el-radio-group v-model="polyline" @change="polyChang">
<el-radio
class="radio"
:label="0"
:style="lineRadioStyle"
v-if="drawState == 1"
>直线</el-radio
>
<div>
<el-radio
class="radio"
:label="0"
:style="lineRadioStyle"
v-if="drawState == 1"
>直线</el-radio>
</div>
<el-radio
class="radio"
:label="1"
......@@ -2051,13 +2055,7 @@ export default {
} catch (error) {
console.log(error);
}
console.log("#######################");
console.log(lanaAry);
console.log("#######################");
this.roiBody.lanes = {
lane_count: lanaAry.length ? lanaAry.length : 0,
lane: lanaAry ? lanaAry : []
};
//对向车道
try {
this.subtendLayer.get(".rect").forEach((el, index) => {
......@@ -2094,7 +2092,13 @@ export default {
} catch (error) {
console.log(error);
}
console.log("#######################");
console.log(lanaAry);
console.log("#######################");
this.roiBody.lanes = {
lane_count: lanaAry.length ? lanaAry.length : 0,
lane: lanaAry ? lanaAry : []
};
// 红绿灯区域
let lightAry = [];
try {
......@@ -2382,6 +2386,7 @@ button {
.modal-editbox .modal-lb {
position: absolute;
bottom: 0;
width: 150px;
}
.modal-right {
position: relative;
......
......@@ -112,7 +112,6 @@ export default {
return {
dialogVisible: false,
curType: 0,
canvasState: 0,
data: {},
type: "0",
btnIsactive: false,
......@@ -287,7 +286,7 @@ export default {
this.signLayer.add(line);
}
});
changeModelData("car")
changeModelData("car");
this.initModel();
},
initModel(){
......@@ -308,9 +307,8 @@ export default {
);
this.signLayer.add(line);
this.stage.draw();
let P1 = {},
let P1 = {},
P2 = {};
P1.x = Number((po[0] / 800).toFixed(6));
P1.y = Number((po[1] / 500).toFixed(6));
P2.x = Number((po[2] / 800).toFixed(6));
......@@ -331,6 +329,7 @@ export default {
return;
}
this.changeIdnex = index;
this.modelnum = 0;
//清除之前的模型和模型线
let allLine = this.signLayer.get(".line");
let allModel = this.signLayer.get(".model");
......@@ -352,9 +351,9 @@ export default {
this.signLayer.draw();
//变换线模型
let mtype = index == 0 ? "car" : "person";
changeModelData(mtype);
this.initModel();
this.cancleSelectedGroup();
},
changeCanvasState: function() {
......@@ -386,6 +385,7 @@ export default {
makeSelectedGroup: function(shape) {
let points = shape.attrs.points;
let color = this.drawState ? "blue" : "red";
this.modelnum = 0;
for (let i = 0; i < points.length; i += 2) {
const pos = {
x: points[i],
......@@ -523,7 +523,6 @@ export default {
modelnum: this.modelnum,
// a Kinetic.Canvas renderer is passed into the drawFunc function
drawFunc: function(ctx) {
debugger;
ctx.beginPath();
ctx.lineTo(data[0].x, data[0].y);
ctx.lineTo(data[1].x, data[1].y);
......@@ -563,6 +562,7 @@ export default {
});
this.signLayer.add(customShape);
this.signLayer.draw();
this.canvasState = 0;
},
//绘制箭头
drawArrows(c1, c2) {
......@@ -657,7 +657,6 @@ export default {
points.push(ele.attrs.x);
points.push(ele.attrs.y);
});
this.selectedShape.attrs.points = points;
let curmodelnun = this.selectedShape.attrs.linenum;
//标定线变化变换模型
......@@ -675,7 +674,6 @@ export default {
},
//根据模型线改变模型改变箭头
changeModel(modelnum) {
console.log(modelnum);
let mlinepoints = this.selectedShape.attrs.points;
let curmodel = this.signLayer.get(".model");
let arrows = this.signLayer.get(".arrows");
......@@ -709,7 +707,6 @@ export default {
});
},
drawLine: function(start, end, col, types, linenum) {
debugger;
linenum = linenum ? linenum : 0;
let points = [start.x, start.y, end.x, end.y];
let line = new Kinetic.Line({
......
......@@ -23,7 +23,10 @@
<el-table-column align="center" label="预设位置配置" width="120">
<template slot-scope="scope">
<div class="yzw-setbox">
<span class="icon el-icon-delete" @click="resetRoi(scope.row)"></span>
<span
class="icon el-icon-delete"
@click="resetRoi(scope.row)"
></span>
</div>
</template>
</el-table-column>
......@@ -42,11 +45,32 @@
<el-table-column prop="address" align="center" label="参数设置">
<template slot-scope="scope">
<div class="table-set">
<span @click="setParam(scope.row, scope.$index)">参数设置</span>
<span @click="setArea(scope.row, scope.$index)">区域设置</span>
<span @click="setDemarcate(scope.row, scope.$index)"
>标定设置</span
<el-tooltip
class="item"
effect="dark"
:content="taskInfo.param_status == 0 ? '运行中' : '下发中'"
placement="top"
>
<span @click="setParam(scope.row, scope.$index)">参数设置</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
:content="taskInfo.roi_status == 0 ? '运行中' : '下发中'"
placement="top"
>
<span @click="setArea(scope.row, scope.$index)">区域设置</span>
</el-tooltip>
<el-tooltip
class="item"
effect="dark"
:content="taskInfo.calibration_status == 0 ? '运行中' : '下发中'"
placement="top"
>
<span @click="setDemarcate(scope.row, scope.$index)"
>标定设置</span
>
</el-tooltip>
<!-- <span @click="setTimer(scope.row, scope.$index)">时间设置</span> -->
</div>
</template>
......@@ -125,7 +149,7 @@ export default {
switchstate: false
};
},
props: ["taskid", "subtaskid", "playurl", "vchan"],
props: ["taskid", "subtaskid", "playurl", "vchan", "subtaskdata"],
components: {
areas,
demarcate,
......@@ -138,7 +162,7 @@ export default {
setParam(scenesdata, index) {
if (this.checkpollstate()) {
this.curindex = index;
this.$refs.parameter.init(scenesdata);
this.$refs.parameter.init(scenesdata, this.taskInfo);
}
},
setArea(roidata, index) {
......@@ -216,11 +240,12 @@ export default {
type: "warning"
})
.then(() => {
debugger
debugger;
that.taskInfo.mtasks[0].scenes.map(ele => {
if (ele.scene_unid == row.scene_unid) {
ele.config = {};
ele.rois[0].roi = '<?xml version="1.0" encoding="UTF-8" ?><roi><flow_roi><flow_type></flow_type><flow_region><polygon_point_count>0</polygon_point_count></flow_region></flow_roi><plate_detect_region><detect_polygon><polygon_point_count>0</polygon_point_count></detect_polygon></plate_detect_region><lane_line><line_count>0</line_count></lane_line><lanes><lane_count>0</lane_count></lanes><lights><light_count>0</light_count></lights><no_stop_region><region_count>0</region_count></no_stop_region><pedestrian_detection_region><region_count>0</region_count></pedestrian_detection_region><median_lines><lane_count>0</lane_count></median_lines><pedestrian_density_region><region_count>0</region_count></pedestrian_density_region><foreign_detection_region><region_count>0</region_count></foreign_detection_region><test_result_region><region_count>0</region_count></test_result_region></roi>';
ele.rois[0].roi =
'<?xml version="1.0" encoding="UTF-8" ?><roi><flow_roi><flow_type></flow_type><flow_region><polygon_point_count>0</polygon_point_count></flow_region></flow_roi><plate_detect_region><detect_polygon><polygon_point_count>0</polygon_point_count></detect_polygon></plate_detect_region><lane_line><line_count>0</line_count></lane_line><lanes><lane_count>0</lane_count></lanes><lights><light_count>0</light_count></lights><no_stop_region><region_count>0</region_count></no_stop_region><pedestrian_detection_region><region_count>0</region_count></pedestrian_detection_region><median_lines><lane_count>0</lane_count></median_lines><pedestrian_density_region><region_count>0</region_count></pedestrian_density_region><foreign_detection_region><region_count>0</region_count></foreign_detection_region><test_result_region><region_count>0</region_count></test_result_region></roi>';
ele.runtime = 0;
}
});
......@@ -344,15 +369,18 @@ export default {
roi: xml
}
];
postObj.conf_type = "rois";
} else if (type == "config") {
postObj.mtasks[0].scenes[this.curindex].config = {
xml: xml
};
postObj.conf_type = "paramsconfig";
} else if (type == "calibration") {
console.log(xml);
postObj.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml
};
postObj.conf_type = "calibration";
}
this.$api.task
.editRoi(this.taskid, this.subtaskid, postObj, {
......@@ -368,6 +396,7 @@ export default {
});
switch (type) {
case "roi":
this.taskInfo.roi_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].rois = [
{
roi: xml
......@@ -375,6 +404,13 @@ export default {
];
break;
case "calibration":
this.taskInfo.calibration_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml
};
break;
case "config":
this.taskInfo.param_status = 1;
this.taskInfo.mtasks[0].scenes[this.curindex].calibration = {
calibration: xml
};
......@@ -382,11 +418,16 @@ export default {
default:
break;
}
} else {
this.$message({
message: m.enote,
type: "error"
});
}
});
}
},
created(){
created() {
this.user_unid = window.sessionStorage.getItem("user_unid");
},
watch: {
......
......@@ -121,7 +121,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -199,7 +199,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -259,9 +259,8 @@
import videoDialog from "@/components/video";
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -164,7 +164,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -260,7 +260,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -348,9 +348,8 @@
import videoDialog from "@/components/video";
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
loading: false,
playurl: "",
......
......@@ -179,7 +179,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -181,7 +181,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......
......@@ -114,7 +114,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -187,7 +187,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -202,9 +202,8 @@
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
loading: false,
dates: [start_dt, end_dt],
......
......@@ -189,7 +189,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -271,7 +271,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -360,9 +360,8 @@
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -267,7 +267,7 @@
prop="index"
align="center"
label="#"
:formatter="indexFormatter"
type="index"
width="50"
>
</el-table-column>
......@@ -363,7 +363,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -452,9 +452,8 @@
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -130,7 +130,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -229,11 +229,11 @@
</div>
</template>
<script>
export default {
data() {
let start_dt =
this.$moment("2019-12-20").format("YYYY-MM-DD") + " 00:00:00";
let end_dt = this.$moment().format("YYYY-MM-DD") + " 23:59:59";
let start_dt = this.yesterDay();
let end_dt = this.nowDay();
return {
detailObj: {},
carImg: require("@/assets/img/home/defaultImg.png"),
......
......@@ -46,7 +46,7 @@
</el-select>
</el-form-item>
<el-form-item label="场景占用" class="form-item" prop="resource_use">
<el-select
<el-select
v-model="formData.resource_use"
placeholder="请选择"
:popper-append-to-body="false"
......@@ -64,7 +64,7 @@
</el-form-item>
<el-form-item
label="时间"
v-show="formData.plate_time != 'day'"
v-show="!formData.period"
prop="timer"
class="form-item"
>
......@@ -86,11 +86,14 @@
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
:disabled="pedittype != 'add'"
>
</el-time-picker>
</el-form-item>
<el-form-item label="存储配置" class="form-item">
<el-form-item
label="存储配置"
class="form-item"
prop="store_conf_unid"
>
<el-select
v-model="formData.store_conf.unid"
placeholder="请选择"
......@@ -105,7 +108,10 @@
</el-select>
</el-form-item>
<el-form-item label="设备类型" class="form-item">
<el-select v-model="formData.plate_type" :disabled="pedittype != 'add'">
<el-select
v-model="formData.plate_type"
:disabled="pedittype != 'add'"
>
<el-option
v-for="(item, index) in platT"
:key="index"
......@@ -139,9 +145,16 @@
<script>
export default {
data() {
var checkStore = (rule, value, callback) => {
if (!this.formData.store_conf.unid) {
return callback(new Error("存储配置不能为空"));
} else {
callback()
}
};
return {
setvisible: false,
timer:["00:00:00", "23:59:59"],
timer: ["00:00:00", "23:59:59"],
formData: {
task_name: "",
task_algo_type: "",
......@@ -162,9 +175,10 @@ export default {
stores: [
{ required: true, message: "存储配置不能为空!", trigger: "change" }
],
resource_use:[
{ required: true, message: "场景占用不能为空!", trigger: "change" }
]
resource_use: [
{ required: true, message: "场景占用不能为空!", trigger: "change" }
],
store_conf_unid: [{ required: true, validator: checkStore, trigger: "change" }]
}
};
},
......@@ -187,10 +201,9 @@ export default {
var freeArr = [];
this.freeList.forEach(ele => {
if (ele.license_info && ele.license_info.platType) {
this.platT.push(ele.license_info.platType);
this.platT.push(ele.license_info.platType);
}
});
this.platT = new Set(this.platT);
}
},
initData(type, pdata) {
......
......@@ -158,6 +158,8 @@ export default {
data[i].vchan.name = data[i].vchan.vchan_name;
data[i].vchan.running_status = data[i].running_status;
data[i].vchan.play_url = data[i].rtsp_url;
data[i].vchan.play_url = data[i].rtsp_url;
data[i].vchan.enableStatus = data[i].enableStatus;
} else {
data.vchan = {
subtask_id: data[i].subtask_id,
......@@ -165,7 +167,8 @@ export default {
vchan_name: data[i].subtask_name,
name: data[i].subtask_name,
running_status: data[i].running_status,
play_url: data[i].rtsp_url
play_url: data[i].rtsp_url,
enableStatus: data[i].enableStatus
};
}
ary.push(data[i].vchan);
......@@ -175,18 +178,26 @@ export default {
});
},
statusFormatter(row) {
if (row.running_status == "Running") {
let data = row.enableStatus;
if (data == 2) {
return "<span class='runningbox statusbox'>工作中</span>";
} else if (row.running_status == "Finished") {
return "<span class='finishedbox statusbox'>已完成</span>";
} else if (row.running_status == "Pause") {
return "<span class='pausebox statusbox'>暂停</span>";
} else if (row.running_status == "Error") {
return "<span class='errorbox statusbox'>异常</span>";
} else if (row.running_status == "Deleted") {
} else if (data == 1) {
return "<span class='nomoralbox statusbox'>部署中</span>";
} else if (data == 3) {
return "<span class='pausebox statusbox'>暂停中</span>";
} else if (data == 4) {
return "<span class='pausebox statusbox'>已暂停</span>";
} else if (data == 5) {
return "<span class='deletebox statusbox'>删除中</span>";
} else if (data == 6) {
return "<span class='deletebox statusbox'>已删除</span>";
} else {
} else if (data == 7) {
return "<span class='pausebox statusbox'>启动中</span>";
} else if (data == 0) {
return "<span class='nomoralbox statusbox'>未部署</span>";
} else {
// return "<span class='errorbox statusbox'>异常</span>";
return "<span class='nomoralbox statusbox'>部署中</span>";
}
},
handleCheckChange(data, node) {
......@@ -244,7 +255,6 @@ export default {
console.log("b", data);
},
delFun(index, data, action = "tree") {
console.log("da",data);
this.$store.commit("setocxstate", 0);
this.$confirm("删除视频源, 是否继续?", "提示", {
confirmButtonText: "确定",
......@@ -255,13 +265,20 @@ export default {
this.$api.task
.deleteSubTask(this.editData.task_id, data.subtask_id)
.then(res => {
this.$message({
type: "success",
message: "删除成功!"
});
this.tableData.splice(index, 1);
this.checkvckan();
this.$store.commit("setocxstate", 1);
if (res.ecode == "200") {
this.$message({
type: "success",
message: "删除成功!"
});
this.tableData.splice(index, 1);
this.checkvckan();
this.$store.commit("setocxstate", 1);
} else {
this.$message({
type: "error",
message: res.enote
});
}
});
if (action != "tree") {
setTimeout(() => {
......@@ -291,7 +308,7 @@ export default {
this.tableData.forEach(ele => {
arr.push(ele.vchan_refid);
});
console.log(arr)
console.log(arr);
this.$refs.tree.setCheckedKeys(arr);
},
rowclick(row) {
......@@ -357,8 +374,7 @@ export default {
if (vchan.leaf) {
vchan.childs = "";
}
vchan.vchan_refid = vchan.refid || vchan.vchan_refid
vchan.vchan_refid = vchan.refid || vchan.vchan_refid;
}
resolve(vchans);
setTimeout(() => {
......@@ -388,7 +404,7 @@ export default {
}
return resolve(node.data.childs);
},
renderContent(h, { node, data, store }){
renderContent(h, { node, data, store }) {
return (
<span class="custom-tree-node">
<el-tooltip
......@@ -399,7 +415,8 @@ export default {
>
<span>{node.label}</span>
</el-tooltip>
</span>);
</span>
);
},
vchanClick(node) {
if (!node.refid && !node.vchan_refid) {
......@@ -575,4 +592,4 @@ export default {
border: 1px solid #444444;
margin-bottom: 14px;
}
</style>
\ No newline at end of file
</style>
......@@ -99,7 +99,7 @@
<el-table-column
align="center"
prop="num"
:formatter="numFormatter"
type="index"
label="序号"
width="60"
>
......@@ -227,7 +227,7 @@
prev-text="上一页"
next-text="下一页"
:page-sizes="[30, 50, 100, 200]"
layout="prev, pager, next,sizes"
layout="total, prev, pager, next,sizes, jumper"
:current-page="page"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -310,6 +310,10 @@ export default {
? data[i].video_total
: "";
data[i].vchan.plate_type = row.plate_type ? row.plate_type : "";
data[i].vchan.running_status = data[i].running_status
? data[i].running_status
: "";
data[i].vchan.enableStatus = data[i].enableStatus ? data[i].enableStatus : "";
}
ary.push(data[i].vchan);
}
......@@ -473,7 +477,7 @@ export default {
}
});
});
},
}
},
mounted() {
this.getTaskList();
......@@ -551,7 +555,8 @@ export default {
height: 34px;
}
.textCon {
margin-right: 114px;
margin-right: 64px;
// margin-right: 114px;
}
}
.rightBox:nth-of-type(2) {
......@@ -561,6 +566,7 @@ export default {
width: 40px;
height: 40px;
margin-left: 1vw;
// margin-left: 3vw;
}
.textCon {
margin-right: 101px;
......
<template>
<div class="expande-table-row">
<span class="label">{{ subindex + 1 }}</span>
<span class="label labelindex">{{ subindex + 1 }}</span>
<el-tooltip class="item" effect="dark" :content="subTaskData.info" placement="top-start"><span class="subtask-info taskstatus" v-html="formater(subTaskData)"></span></el-tooltip>
<span class="label">视频源文件</span>
<span class="subtask-info">{{ subTaskData.vchan_name }}</span>
<span class="label">任务ID</span>
......@@ -19,7 +20,10 @@
:key="index"
:value="item.device_id"
:label="item.in_ip"
v-if="subTaskData.plate_type && item.license_info.platType === subTaskData.plate_type"
v-if="
subTaskData.plate_type &&
item.license_info.platType === subTaskData.plate_type
"
>
{{ item.in_ip }} {{ item.license_info.platType }}
</el-option>
......@@ -75,6 +79,27 @@ export default {
});
}
});
},
formater(data) {
if (data.enableStatus == 2) {
return "<span class='runningbox statusbox'>工作中</span>";
} else if (data.enableStatus == 1) {
return "<span class='nomoralbox statusbox'>部署中</span>";
} else if (data.enableStatus == 3) {
return "<span class='pausebox statusbox'>暂停中</span>";
} else if (data.enableStatus == 4) {
return "<span class='pausebox statusbox'>已暂停</span>";
} else if (data.enableStatus == 5) {
return "<span class='deletebox statusbox'>删除中</span>";
} else if (data.enableStatus == 6) {
return "<span class='deletebox statusbox'>已删除</span>";
} else if (data.enableStatus == 7) {
return "<span class='pausebox statusbox'>启动中</span>";
} else if (data.enableStatus == 0) {
return "<span class='nomoralbox statusbox'>未部署</span>";
} else {
return "<span class='errorbox statusbox'>异常</span>";
}
}
},
created() {
......@@ -98,6 +123,7 @@ export default {
border-bottom: 1px solid #ccc;
overflow: hidden;
}
.label {
width: 5vw;
text-align: center;
......@@ -106,6 +132,12 @@ export default {
height: 40px;
line-height: 40px;
}
.labelindex {
width: 3vw;
}
.taskstatus {
width: 5vw;
}
.subtask-info {
border-left: 1px solid #f0f0f0;
text-align: center;
......@@ -113,24 +145,24 @@ export default {
height: 40px;
line-height: 40px;
}
.subtask-info:nth-child(3) {
.subtask-info:nth-child(4) {
width: 7vw;
overflow: hidden;
}
.subtask-info:nth-child(5) {
.subtask-info:nth-child(6) {
width: 8vw;
}
.subtask-info:nth-child(7) {
.subtask-info:nth-child(8) {
width: 6vw;
}
.subtask-info:nth-child(9) {
width: 4vw;
.subtask-info:nth-child(10) {
width: 3vw;
}
.subtask-info:nth-child(11) {
width: 4vw;
.subtask-info:nth-child(12) {
width: 3vw;
}
.subtask-info:nth-child(13) {
width: 9vw;
.subtask-info:nth-child(14) {
width: 7vw;
}
.sub-btn {
cursor: pointer;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!