From 262119fd58357f1d930d65a6e3252176d29b2ce5 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期四, 28 一月 2021 18:54:48 +0800
Subject: [PATCH] 朔黄人员管理页面调试
---
src/pages/datapush/index/RightEvent.vue | 248 ++++++++++++++++++++++++++++---
public/index.html | 4
src/pages/shuohuangMonitorAnalyze/components/taskManage.vue | 2
src/pages/shuohuangMonitorAnalyze/components/charts/line.vue | 2
src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue | 33 ++-
src/pages/shuohuangMonitorAnalyze/components/memberManage.vue | 84 ++++++----
src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue | 79 +++++----
src/api/shuohuang.ts | 9 +
8 files changed, 355 insertions(+), 106 deletions(-)
diff --git a/public/index.html b/public/index.html
index e9f8271..caded48 100644
--- a/public/index.html
+++ b/public/index.html
@@ -367,9 +367,9 @@
cursor: pointer;
}
- /* .flex-box{
+ .flex-box{
display: flex;
- } */
+ }
.el-button--primary {
color: #FFFFFF;
background-color: #3D68E1 !important;
diff --git a/src/api/shuohuang.ts b/src/api/shuohuang.ts
index a046a30..8c60ae4 100644
--- a/src/api/shuohuang.ts
+++ b/src/api/shuohuang.ts
@@ -119,10 +119,17 @@
method: 'post',
data
})
-export const uploadDirectory = (data:any) =>{
+export const uploadDirectory = (data:any) =>
request({
url:'/data/api-c/user/uploadMulti',
method:'post',
data
})
+
+export const uploadFile = (data:any) =>{
+ request({
+ url:'/data/api-c/user/uploadFile',
+ method:'post',
+ data
+ })
}
diff --git a/src/pages/datapush/index/RightEvent.vue b/src/pages/datapush/index/RightEvent.vue
index c0a6f68..5722008 100644
--- a/src/pages/datapush/index/RightEvent.vue
+++ b/src/pages/datapush/index/RightEvent.vue
@@ -184,11 +184,59 @@
<b>瑙勫垯</b>
<div class="div-border" v-html="taskEditData.eventTxt"></div>
</div>
+ <div class="config-item">
+ <b>鎺ㄩ�佸瓧娈�</b>
+ <el-button type="primary" size="mini" @click="pushFieldDialog=true">璁剧疆</el-button>
+ </div>
<div class="save-btn">
<el-button type="info" size="small" @click="onCancle" style="color:#222">鍙栨秷</el-button>
<el-button type="primary" @click="eventPushsSave" size="small">淇濆瓨</el-button>
</div>
</div>
+ <el-dialog
+ :visible="pushFieldDialog"
+ :append-to-body="false"
+ :close-on-click-modal="false"
+ class="dialog-push-field"
+ @close="pushFieldDialog=false"
+ >
+ <div slot="title" class="slot-title">
+ <p>璇烽�夋嫨鎯宠鎺ㄩ�佺殑瀛楁</p>
+ <div class="right">
+ <el-checkbox v-model="allFieldChecked"></el-checkbox>
+ </div>
+ </div>
+ <div class="check-area" v-for="configObj in pushFields" :key="configObj.id">
+ <div class="header">
+ <div class="title">{{configObj.name}}</div>
+ <div class="right">
+ <el-checkbox v-model="configObj.checked" @change="toggleConfigCheck(configObj)">鍏ㄩ��</el-checkbox>
+ </div>
+ </div>
+ <div class="flex-box flex-wrap">
+ <div class="param flex-box" v-for="param in configObj.children" :key="param.id">
+ <el-checkbox v-model="param.checked"></el-checkbox>
+ <span class="param-name">{{param.name}}</span>
+ <el-input
+ v-model="param.alias"
+ size="mini"
+ :ref="`input_${param.id}`"
+ @input="varifyField(param)"
+ :style="{color:param.error?'red':'',borderColor:param.error?'red':''}"
+ ></el-input>
+ </div>
+ </div>
+ </div>
+ <div slot="footer" class="text-center">
+ <el-button size="small">鍙栨秷</el-button>
+ <el-button
+ size="small"
+ type="primary"
+ :disabled="disabledPushFieldSet"
+ @click="submitPushFieldSet"
+ >淇濆瓨</el-button>
+ </div>
+ </el-dialog>
</div>
</template>
<script>
@@ -208,11 +256,11 @@
}
},
computed: {
- urls() {
+ urls () {
return this.taskEditData.urls
}
},
- data() {
+ data () {
return {
taskEditData: {},
dataList: [],
@@ -236,11 +284,15 @@
operatorTypeOpionts: {},
ruleValueOptions: []
},
+ pushFieldDialog: false,
+ pushFields: [],
+ allFieldChecked: false,
+ disabledPushFieldSet: true,
};
},
watch: {
eventObject: {
- handler(newVal, oldVal) {
+ handler (newVal, oldVal) {
this.taskEditData.enable = this.eventObject.enable;
if (newVal !== oldVal) {
if (this.taskEditData.id !== newVal.id) {
@@ -273,31 +325,107 @@
}
},
deep: true
+ },
+ pushFields: {
+ handler (n, o) {
+ let _this = this;
+ let flag = false;
+ n.forEach(configObj => {
+ let notChecked = configObj.children.find(param => !param.checked);
+ if (!notChecked) {
+ configObj.checked = true;
+ } else {
+ configObj.checked = false;
+ }
+ let someoneChecked = configObj.children.find(param => param.checked);
+ if (someoneChecked) {
+ flag = true
+ }
+
+ });
+ if (flag) {
+ this.disabledPushFieldSet = false;
+ } else {
+ this.disabledPushFieldSet = true;
+ }
+ },
+ deep: true
}
},
- created() {
+ created () {
this.reAdd();
},
- mounted() {
- // 鍔犺浇瀛楀吀瀛楀吀
+ mounted () {
+ // 鍔犺浇瀛楀吀
this.findByType();
this.getCameras();
this.getTasks();
+ this.getPushFields();
},
methods: {
- addUrl() {
+ varifyField (param) {
+ var reg = /^[A-Za-z]+[0-9-_]?$/;
+ if (!reg.test(param.alias)) {
+ this.$message('璇疯緭鍏ュ悎娉曞瓧娈靛悕');
+ debugger
+ param.error = true;
+ } else {
+ param.error = false;
+ }
+ // this.pushFields.forEach(configObj => {
+ // configObj.children.find(param => param.error)
+ // })
+
+ },
+ submitPushFieldSet () {
+ let flag = false;
+ this.pushFields.forEach(configObj => {
+ let errorOne = configObj.children.find(param => param.checked && param.error);
+ if (errorOne) {
+ this.$notify({
+ type: 'error',
+ message: '璇峰皢閫変腑瀛楁杈撳叆鍚堟硶瀛楁鍚�'
+ })
+ flag = true
+ }
+ });
+ if(flag){
+ return
+ }
+ alert('submit')
+ },
+ toggleConfigCheck (configObj) {
+ configObj.children.forEach(child => {
+ child.checked = configObj.checked
+ })
+ },
+ getPushFields () {
+ this.pushFields = [
+ { id: 'sxjxx', name: '鎽勫儚鏈轰俊鎭�', checked: false, alias: '',
+ children: [
+ { name: '鎽勫儚鏈篒D', checked: false, alias: 'cameraID', id: 'cameraID', children: null },
+ { name: '鎽勫儚鏈哄悕绉�', checked: false, alias: 'cameraName', id: 'cameraName', children: null },
+ { name: '鎽勫儚鏈哄湴鍧�', checked: false, alias: 'cameraAddr', id: 'cameraAddr', children: null },
+ { name: '鎽勫儚鏈哄潃', checked: false, alias: 'cameraAdr', id: 'cameraAdr', children: null }
+ ] },
+ { id: 'cjxx', name: '鍦烘櫙淇℃伅', checked: false, alias: '',
+ children: [{ name: '鍦烘櫙ID', checked: false, alias: 'taskId', id: 'tskId', children: null }] },
+ ];
+
+ },
+ addUrl () {
this.taskEditData.urls.push({
checked: true,
hash: Math.random().toString(36).substr(2),
url: "",
});
},
- delUrl(index) {
+ delUrl (index) {
this.$set(this.taskEditData.urls, index, this.baseRule)
this.taskEditData.urls.splice(index, 1)
},
// 淇濆瓨
- async eventPushsSave() {
+ async eventPushsSave () {
// 鍒ゆ柇淇濆瓨鐨刬p鏄惁绗﹀悎鏍煎紡瑕佹眰
if (this.taskEditData.urls.length < 1) {
this.$notify({
@@ -372,7 +500,7 @@
}
},
// 鏌ユ壘瀛楀吀
- async findByType() {
+ async findByType () {
let res = await findDictionaryByType();
if (res && res.success) {
this.dictionary = Object.assign(this.dictionary, res.data)
@@ -386,7 +514,7 @@
})
}
},
- async getCameras() {
+ async getCameras () {
let rsp = await findByEventTopic({ topic: 'camera', type: 'name' });
if (rsp && rsp.success) {
this.dictionary['camera'] = rsp.data
@@ -402,7 +530,7 @@
})
}
},
- async getTasks() {
+ async getTasks () {
this.dictionary['task'] = []
let rsp = await getTaskList();
if (rsp && rsp.success) {
@@ -419,22 +547,22 @@
}
},
// 鏂板缓閰嶇疆
- createSet() {
+ createSet () {
this.dataList.push(JSON.parse(JSON.stringify(this.baseRule)));
},
- cleanSet() {
+ cleanSet () {
this.dataList.splice(0, this.dataList.length);
},
// 娣诲姞瀛愯鍒�
- addRule() {
+ addRule () {
this.dataList.push(JSON.parse(JSON.stringify(this.baseRule)));
},
// 鍒犻櫎瀛愯鍒�
- delRule(index) {
+ delRule (index) {
this.dataList.splice(index, 1);
},
// 瑙勫垯涓笅鎷夋鐨勯�夋嫨鍥炶皟
- selectTopic(rule, resetNext = false) {
+ selectTopic (rule, resetNext = false) {
rule.topicTypeOptions.forEach(element => {
if (element.value === rule.topic_type) {
rule.topicArgOptions = element.children;
@@ -445,7 +573,7 @@
}
});
},
- selectArg(rule, resetNext = false) {
+ selectArg (rule, resetNext = false) {
let argInfo = rule.topicArgOptions.filter(arg => {
return arg.value === rule.topic_arg
})
@@ -464,7 +592,7 @@
this.selectOperator(rule, resetNext)
}
},
- selectOperator(rule, resetNext = false) {
+ selectOperator (rule, resetNext = false) {
if (rule.operator_type === "option") {
rule.ruleValueOptions = this.dictionary[rule.topic_type] ? this.dictionary[rule.topic_type] : []
rule.rule_values = rule.rule_value.split(",")
@@ -475,11 +603,11 @@
rule.rule_values = [];
}
},
- selectValue(rule, val) {
+ selectValue (rule, val) {
rule.rule_value = val.join(",")
},
// 鏍规嵁value杩斿洖瀵瑰簲鐨刵ame
- getNameByValue(arr, value) {
+ getNameByValue (arr, value) {
let s = arr.find(item => {
return item.value === value;
});
@@ -487,7 +615,7 @@
return s.name;
},
// 娓呯┖閲嶆柊鏂板
- reAdd() {
+ reAdd () {
this.taskEditData = {
id: "",
name: "",
@@ -516,7 +644,7 @@
};
this.dataList = [];
},
- onCancle() {
+ onCancle () {
this.$emit('onCancle')
}
}
@@ -574,7 +702,12 @@
margin-left: 895px;
}
}
-
+ .config-item {
+ margin: 20px 0;
+ b {
+ margin-right: 10px;
+ }
+ }
.el-button--text {
text-decoration: unset;
}
@@ -604,5 +737,72 @@
color: #3d68e1;
line-height: 39px;
}
+ .dialog-push-field {
+ .el-button--primary.is-disabled,
+ .el-button--primary.is-disabled:hover {
+ background-color: #9eb4f0 !important;
+ border-color: #9eb4f0 !important;
+ }
+ .el-dialog {
+ width: 910px;
+ height: 700px;
+ .el-dialog__body {
+ padding-top: 14px;
+ height: 540px;
+ overflow-y: auto;
+ }
+ }
+ .text-center {
+ text-align: center;
+ }
+ .slot-title {
+ position: relative;
+ .right {
+ position: absolute;
+ top: 0;
+ right: 30px;
+ }
+ }
+ .check-area {
+ padding-bottom: 10px;
+ .header {
+ position: relative;
+ background: #efefef;
+ line-height: 30px;
+ margin-bottom: 14px;
+ font-weight: bold;
+ .title {
+ border-left: 3px solid #2481fa;
+ padding-left: 10px;
+ }
+ .right {
+ position: absolute;
+ top: 0;
+ right: 30px;
+ }
+ }
+ .flex-box.flex-wrap {
+ flex-wrap: wrap;
+ }
+ .param.flex-box {
+ word-break: keep-all;
+ align-items: center;
+ margin: 0 10px;
+ min-width: 260px;
+ margin-bottom: 10px;
+ .param-name {
+ margin: 0 5px;
+ }
+ .el-input {
+ border-color: #dcdfe6;
+ color: #606266;
+ .el-input__inner {
+ color: inherit;
+ border-color: inherit;
+ }
+ }
+ }
+ }
+ }
}
</style>
diff --git a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
index ba22ac6..4e491b5 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
@@ -16,7 +16,7 @@
initLineChart () {
this.$nextTick(() => {
let dom = this.$echarts.init(this.$refs['lineChart']);
- dom.setOption(this.options);
+ dom && dom.setOption(this.options);
})
}
}
diff --git a/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue b/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue
index 6a03a59..fb52efc 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/memberManage.vue
@@ -98,6 +98,15 @@
</template>
</el-table-column>
</el-table>
+ <el-pagination
+ @size-change="handleTableSizeChange"
+ @current-change="renderMemberTable"
+ :current-page.sync="PageIndex"
+ :page-size="PageSize"
+ :page-sizes="pageSizes"
+ layout="total,sizes, prev, pager, next"
+ :total="tableTotal"
+ ></el-pagination>
</div>
</div>
<el-dialog
@@ -196,12 +205,16 @@
<p class="tip">
*璇锋彁鍓嶆牴鎹枃浠舵ā鏉夸腑鐨勮姹傛敹闆嗕汉鍛樹俊鎭紝鍦ㄤ竴涓枃浠跺す涓瓨鏀句汉鍛樼収鐗囧拰EXCEL鏂囦欢
(
- <a href="javascript:;" @mouseover="showDemo=true" @mouseout="showDemo=false">绀轰緥</a>),鐐瑰嚮
+ <a
+ href="javascript:;"
+ @mouseover="showDemo=true"
+ @mouseout="showDemo=false"
+ >绀轰緥</a>),鐐瑰嚮
<a href="javascript:;">涓嬭浇妯℃澘.excel</a>
<img class="tip-demo" v-if="showDemo" :src="`${publicPath}images/shuohuang/tip.jpg`" alt />
</p>
<div class="flex-box">
- <label>涓婁紶鏂囦欢:</label>
+ <label>涓婁紶鏂囦欢澶�:</label>
<el-button size="mini" type="primary" @click="uploadDirectoryTrigger">鐐瑰嚮涓婁紶</el-button>
<input ref="directoryInput" @change="importDirectory" hidden type="file" webkitdirectory />
</div>
@@ -211,15 +224,6 @@
<el-table-column prop="time" label="涓婁紶鏃堕棿"></el-table-column>
<el-table-column prop="state" label="鐘舵��"></el-table-column>
</el-table>
- <el-pagination
- @size-change="handleTableSizeChange"
- @current-change="renderMemberTable"
- :current-page.sync="PageIndex"
- :page-size="PageSize"
- :page-sizes="pageSizes"
- layout="total,sizes, prev, pager, next"
- :total="tableTotal"
- ></el-pagination>
</div>
</el-dialog>
</div>
@@ -227,7 +231,7 @@
<script>
-import { getShuohuangDepartTree, getOrganizeTree, getMemberList, updateMemberInfo, addMember, updateUnit, uploadMemberPic, uploadDirectory } from '@/api/shuohuang'
+import { getShuohuangDepartTree, getOrganizeTree, getMemberList, updateMemberInfo, addMember, updateUnit, uploadMemberPic, uploadDirectory, uploadFile } from '@/api/shuohuang'
export default {
data () {
@@ -276,7 +280,6 @@
},
methods: {
nodeContextMenu (e, data, node, comp) {
- debugger
this.showMenu = true;
this.menuTop = e.pageY;
this.menuLeft = e.pageX;
@@ -310,8 +313,9 @@
memberSave () {
this.$refs['memberForm'].validate((valid) => {
if (valid) {
+ let params = Object.assign({DeptID:this.curLeftTreeNode.id},this.memberEditForm);
if (this.memberEditForm.ID) {
- updateMemberInfo(this.memberEditForm).then(res => {
+ updateMemberInfo(params).then(res => {
if (res.success) {
this.$notify({
type: 'success',
@@ -319,16 +323,19 @@
});
this.memberEditDialogVisible = false;
this.renderMemberTable();
+ this.searchLeftTreeData();
}
})
} else {
- addMember(this.memberEditForm).then(res => {
+ addMember(params).then(res => {
if (res.success) {
this.$notify({
type: 'success',
message: res.msg
})
this.renderMemberTable();
+ this.memberEditDialogVisible = false;
+ this.searchLeftTreeData();
}
})
}
@@ -338,11 +345,10 @@
})
},
delMember (member) {
- member.IsDel = true;
+ member.IsDel = '1';
this.memberUpdate(member);
},
editMember (member) {
- debugger
this.memberEditDialogVisible = true;
this.memberEditForm = member;
},
@@ -354,11 +360,12 @@
message: res.msg
});
this.renderMemberTable();
+ this.searchLeftTreeData();
}
})
},
checkNode (a, b, c) {
- if (a.children) {
+ if (a.hasOwnProperty('children')) {
this.curLeftTreeNode = a;
this.deptId = a.id;
this.renderMemberTable();
@@ -379,6 +386,7 @@
}
getMemberList(params).then(res => {
_this.tableData = res.data;
+ _this.tableTotal = res.total;
})
},
uploadPic () {
@@ -387,19 +395,18 @@
uploadDirectoryTrigger () {
this.$refs['directoryInput'].click();
},
- // uploadExeclTrigger(){
- // this.$refs['excelInput'].click();
- // },
importDirectory () {
//this.$refs['directoryInput'].files //鏂囦欢澶筸ap
let formData = new FormData;
- formData.append('File', this.$refs['directoryInput'].files)
- debugger
- // uploadDirectory(formData).then(res=>{
- // debugger
+ for(var file in this.$refs['directoryInput'].files){
+ formData.append('files', this.$refs['directoryInput'].files[file])
+ }
+ //formData.append('files', this.$refs['directoryInput'].files)
- // })
-
+ uploadDirectory(formData).then(res=>{
+ debugger
+
+ })
},
handleRemove () {
@@ -423,8 +430,10 @@
},
deepNodeChildren (node) {
+ var arr1 = [];
+ var arr2 = [];
if (node.ChildDept && node.ChildDept.length > 0) {
- return node.ChildDept.map(child => {
+ arr1 = node.ChildDept.map(child => {
let childObj = {};
childObj.id = child.ID;
childObj.label = child.Name;
@@ -437,8 +446,9 @@
}
return childObj;
});
- } else if (node.UserLst && node.UserLst.length > 0) {
- return node.UserLst.map(child => {
+ }
+ if (node.UserLst && node.UserLst.length > 0) {
+ arr2 = node.UserLst.map(child => {
let childObj = {};
childObj.id = child.ID;
childObj.label = child.Name;
@@ -446,6 +456,7 @@
return childObj;
});
}
+ return arr1.concat(arr2)
},
getOrganizeTreeData () {
let _this = this;
@@ -472,9 +483,13 @@
return obj
});
this.$nextTick(() => {
- _this.$refs['leftTreeNodes'].setCurrentNode(_this.treeData[0]);
- _this.curLeftTreeNode = _this.treeData[0];
- _this.checkNode(_this.treeData[0]);
+ if(!Object.keys(_this.curLeftTreeNode).length){
+ _this.curLeftTreeNode = _this.treeData[0];
+ _this.$refs['leftTreeNodes'].setCurrentNode(_this.treeData[0]);
+ }else{
+ _this.$refs['leftTreeNodes'].setCurrentNode(_this.curLeftTreeNode);
+ }
+ _this.checkNode(_this.curLeftTreeNode);
})
})
@@ -542,6 +557,9 @@
.el-form-item__label {
width: 100px;
}
+ .el-form-item__error {
+ left: 120px;
+ }
}
}
.el-input {
diff --git a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
index f352024..e4b36d7 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
@@ -117,14 +117,14 @@
<div class="header-bar clearfix">
<div class="left">
<div>
- <el-select v-model="watch" size="mini">
- <el-option value label="鍏ㄩ儴"></el-option>
- <el-option value="1" label="鏈叧娉�"></el-option>
- <el-option value="2" label="宸插叧娉�"></el-option>
+ <el-select v-model="IsFollow" size="mini" @change="filterSearchData">
+ <el-option value='' label="鍏ㄩ儴"></el-option>
+ <el-option :value="false" label="鏈叧娉�"></el-option>
+ <el-option :value="true" label="宸插叧娉�"></el-option>
</el-select>
</div>
<div>
- <el-select v-model="settle" size="mini">
+ <el-select v-model="settle" size="mini" >
<el-option value label="鍏ㄩ儴"></el-option>
<el-option value="1" label="鏈鐞�"></el-option>
<el-option value="2" label="宸插鐞�"></el-option>
@@ -255,6 +255,7 @@
return {
CLIP: 'http://192.168.20.113/',
keyword: '',
+ IsFollow: '',
searchTime: [this.$moment(new Date().getTime() - 3600 * 1000 * 24 * 5).format("YYYY-MM-DD HH:mm:ss"), this.$moment(new Date()).format("YYYY-MM-DD HH:mm:ss")],
curTabPage: 1,
curTablePage: 1,
@@ -308,7 +309,6 @@
highLevelConfigs: [],
showAdvance: true,
fixedOneLineHeight: 40,
- watch: '',
settle: '',
showType: 'menu',
tableData: [
@@ -318,8 +318,7 @@
tabData: [
{ id: 'ss1', no: 'SS4B115', frequency: '8084', time: '2020-09-21 20:45:08', driver: '寮犱笁', marks: ['鏈懠鍞ゃ�佸懠鍞や笉鏍囧噯', '瀛︿範鍙告満鏈簲绛�'], markType: 1, tags: ['杩涘嚭绔�', '鍙告満绂诲矖'], follow: true },
{ id: 'ss2', no: 'SS4B115', frequency: '8084', time: '2020-09-21 20:45:08', driver: '寮犱笁', marks: [], markType: 0, tags: ['杩涘嚭绔�', '鍙告満绂诲矖'], follow: false }
- ],
-
+ ],
videoDialogVisible: false,
hiddenDanger: 1,
labelDialogVisible: false,
@@ -339,7 +338,6 @@
},
methods: {
handleTabSizeChange (size) {
- debugger
this.tabPageSize = size;
this.filterSearchData()
},
@@ -353,13 +351,22 @@
//浜岀骇鏌ヨ
filterSearchData () {
let _this = this;
+ let isFollow = '';
+ if(this.IsFollow === ''){
+ isFollow = ''
+ }else if(!!this.IsFollow){
+ isFollow = '1'
+ }else{
+ isFollow = '0'
+ }
let query = {
KeyWord: this.keyword,
StartDate: this.searchTime[0],
EndDate: this.searchTime[1],
PageIndex: this.showType == 'list' ? this.curTablePage : this.showType == 'list',
PageSize: this.showType == 'list' ? this.tablePageSize : this.tabPageSize,
- IsDetail: this.showType == 'list'
+ IsDetail: this.showType == 'list',
+ IsFollow: isFollow
};
let filterQuerys = [];
this.checkedConfigs.forEach(config => {
@@ -393,7 +400,8 @@
EndDate: this.searchTime[1],
PageIndex: this.showType == 'list' ? this.curTablePage : this.showType == 'list',
PageSize: this.showType == 'list' ? this.tablePageSize : this.tabPageSize,
- IsDetail: this.showType == 'list'
+ IsDetail: this.showType == 'list',
+ IsFollow: this.IsFollow
};
this.optionalConfigs = [];
this.highLevelConfigs = [];
@@ -543,6 +551,9 @@
<style lang="scss">
.search-for-video-analyze {
padding: 20px 30px;
+ .flex-box{
+ display: flex;
+ }
.filter-area {
.input-area {
display: flex;
diff --git a/src/pages/shuohuangMonitorAnalyze/components/taskManage.vue b/src/pages/shuohuangMonitorAnalyze/components/taskManage.vue
index 1ab1bf0..640cc00 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/taskManage.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/taskManage.vue
@@ -73,7 +73,7 @@
</div>
</div>
</div>
- <div class="top-right partment">
+ <div class="top-right partment" style="max-height: 500px; overflow-y:auto;">
<div class="header">
<div class="title">浜哄憳鍒楄〃</div>
</div>
diff --git a/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
index f4955fe..5cba441 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/videoAnalyze.vue
@@ -97,7 +97,7 @@
<el-radio :label="0">鏃犲紓甯�</el-radio>
<el-radio :label="1">鏈夊紓甯�</el-radio>
</el-radio-group>
-
+
<el-button
icon="el-icon-plus"
size="mini"
@@ -204,15 +204,15 @@
}
},
watch: {
- 'curVideo.LableLst':{
- handler(n,o){
- if(n.length>0){
+ 'curVideo.LableLst': {
+ handler (n, o) {
+ if (n.length > 0) {
this.isUnusual = 1
- }else{
+ } else {
this.isUnusual = 0
}
},
- deep:true
+ deep: true
},
videoDetails: {
handler (newVal, oldVal) {
@@ -228,16 +228,16 @@
this.getVideos(this.videoDetails);
},
methods: {
- checkCurVideo(index){
- if(this.relativeVideos[index]){
- this.curVideo = this.relativeVideos[index]
+ checkCurVideo (index) {
+ if (this.relativeVideos[index]) {
+ this.curVideo = this.relativeVideos[index];
+ this.refreshCurVideoLabel(this.curVideo);
}
},
getVideos (video) {
let _this = this;
getRelatedVideoInfo({ UniqeID: video.UniqeID }).then(res => {
console.log(res)
-
res.data.forEach(element => {
element.marks = _this.mergeMarks(element)
console.log(element.marks)
@@ -245,10 +245,10 @@
_this.curVideo = res.data[0];
_this.videoArrs = res.data;
_this.relativeVideos = res.data;
- this.$nextTick(()=>{
+ this.$nextTick(() => {
_this.$refs[`player_${_this.curVideo.ID}`][0].init();
})
-
+
})
},
renderLabelOpts () {
@@ -257,15 +257,24 @@
_this.labelOptions = res.data
})
},
+ refreshCurVideoLabel (video) {
+ getRelatedVideoInfo({ UniqeID: video.UniqeID }).then(res => {
+ res.data.forEach(d => {
+ if(d.ID === video.ID){
+ video.LableLst = d.LableLst
+ }
+ // let someVideo = _this.videoArrs.find(video => video.ID === d.ID);
+ // someVideo.LableLst = d.LableLst
+ })
+ })
+ },
checkVideo (video, index) {
+ this.refreshCurVideoLabel(video);
this.curVideo = video;
- this.$nextTick(()=>{
+ this.$nextTick(() => {
this.$refs[`player_${this.curVideo.ID}`][0].init();
})
-
- if (index > 0 && this.guid == 1) {
- //this.videoWrapArr =
- }
+
},
setGuid (guid) {
@@ -279,12 +288,10 @@
// }
// }
this.videoWrapArr = Math.pow(guid, 2);
-
this.$nextTick(() => {
for (var i = 0; i < Math.pow(guid, 2); i++) {
this.$refs[`gridVideoItem_${i}`][0].style.width = this.$refs['playerWrap'].offsetWidth / guid + 'px';
this.$refs[`gridVideoItem_${i}`][0].style.height = this.$refs['playerWrap'].offsetHeight / guid + 'px';
-
}
})
},
@@ -305,28 +312,32 @@
}
}
})
-
+
let query = {
ID: this.selectedLabelId,
ParentID: this.isCheckAllVideo ? tempArr.join(',') : this.curVideo.ID + '',
Time: Math.round(this.setLabelTime) + '',
Codes: this.labelCheckedList.join(','),
- Desc: desc.join(',')
+ Desc: desc.join('锛�')
};
editLabel(query).then(rsp => {
if (rsp && rsp.success) {
_this.labelDialogVisible = false;
-
- _this.videoArrs.forEach(video=>{
- video.LableLst = []
- });
+ this.$set(_this.curVideo,'LableLst',[]);
+ //_this.curVideo.LableLst = [];
rsp.data.forEach(label=>{
- let someVideo = _this.videoArrs.find(video=>video.ID === label.ParentID);
- someVideo.LableLst.push(label);
+ if(label.ParentID == _this.curVideo.ID){
+ _this.curVideo.LableLst.push(label)
+ }
})
- //_this.curVideo.LableLst = rsp.data;
- this.$message.success("娣诲姞鎴愬姛")
+ // getRelatedVideoInfo({ UniqeID: _this.videoDetails.UniqeID }).then(res => {
+ // res.data.forEach(d => {
+ // let someVideo = _this.videoArrs.find(video => video.ID === d.ID);
+ // someVideo.LableLst = d.LableLst
+ // })
+ // })
+ this.$message.success("娣诲姞鎴愬姛")
// 鏍囨敞
_this.setMarks(this.curVideo)
} else {
@@ -344,16 +355,18 @@
},
editCurLabel (mark) {
this.selectedLabelId = mark.ID;
- this.labelCheckedList = mark.Codes.split(",");
+ this.labelCheckedList = mark.Codes.split(" ,");
this.labelDialogVisible = true;
},
removeCurLabel (mark) {
+ let _this = this;
delLabel({ ID: mark.ID, ParentID: this.curVideo.ID }).then(rsp => {
if (rsp && rsp.success) {
- this.curVideo.LableLst = rsp.data;
+ _this.curVideo.LableLst = rsp.data;
this.$message.success("鍒犻櫎鎴愬姛")
// 鏍囨敞
- this.setMarks(this.curVideo)
+ debugger
+ _this.setMarks(_this.curVideo)
} else {
this.$message.warning(rsp.msg)
}
@@ -469,7 +482,7 @@
}
}
}
- .fixed-height-box{
+ .fixed-height-box {
height: 200px;
overflow-y: auto;
}
--
Gitblit v1.8.0