diff --git a/src/views/systemManagement/correlationEquipment2/components/equipmentTable.vue b/src/views/systemManagement/correlationEquipment2/components/equipmentTable.vue index 898f634..00eff83 100644 --- a/src/views/systemManagement/correlationEquipment2/components/equipmentTable.vue +++ b/src/views/systemManagement/correlationEquipment2/components/equipmentTable.vue @@ -1,24 +1,24 @@ \ No newline at end of file diff --git a/src/views/systemManagement/correlationEquipment2/components/searchBox.vue b/src/views/systemManagement/correlationEquipment2/components/searchBox.vue index 71a2697..7adc432 100644 --- a/src/views/systemManagement/correlationEquipment2/components/searchBox.vue +++ b/src/views/systemManagement/correlationEquipment2/components/searchBox.vue @@ -86,6 +86,7 @@ export default { perception_btn_img_src: require("@/assets/companyFile/intelligence02.png"), perception_text: "智能感知设备", check_push_table_data: {}, // 复选框查询的表格数据传递给表格 + flag: true, }; }, methods: { @@ -101,55 +102,83 @@ export default { video_all_check() { this.perception_checkgroup = []; //智能设备复选框清空 this.video_checkgroup = []; // 视频设备复选框清空 - delete this.only_params.devicePerceptionSubType; // 删除智能查询携带的入参 - this.only_params.deviceVideoSubType = ""; // 按钮查视频设备的全部 + this.deviceVideoSubTypes = [] + this.devicePerceptionSubTypes = []; + delete this.only_params.devicePerceptionSubTypes; // 删除智能查询携带的入参 + this.only_params.deviceVideoSubTypes = ""; // 按钮查视频设备的全部 + this.flag = true; getVideoList(this.only_params).then((res) => { console.log("res_video", res); this.check_push_table_data = res; - this.$emit("push_data_to_table", this.check_push_table_data,this.only_params); // 传给父亲,再转给兄弟Table + this.$emit( + "push_data_to_table", + this.check_push_table_data, + this.only_params, + this.flag + ); // 传给父亲,再转给兄弟Table }); }, // 智能设备按钮查全部 perception_all_check() { this.perception_checkgroup = []; //智能设备复选框清空 this.video_checkgroup = []; // 视频设备复选框清空 - delete this.only_params.deviceVideoSubType; // 删除视频查询携带的入参 - this.only_params.devicePerceptionSubType = ""; // 按钮查智能设备的全部 - getVideoList(this.only_params).then((res) => { + this.deviceVideoSubTypes = [] + this.devicePerceptionSubTypes = []; + delete this.only_params.deviceVideoSubTypes; // 删除视频查询携带的入参 + this.only_params.devicePerceptionSubTypes = ""; // 按钮查智能设备的全部 + this.flag = false; + getPerceptionList(this.only_params).then((res) => { console.log("res_video", res); this.check_push_table_data = res; - this.$emit("push_data_to_table", this.check_push_table_data,this.only_params); // 传给父亲,再转给兄弟Table + this.$emit( + "push_data_to_table", + this.check_push_table_data, + this.only_params, + this.flag + ); // 传给父亲,再转给兄弟Table }); }, // 视频设备复选查询 video_check_search(e, value) { if (e) { // 点击 - delete this.only_params.devicePerceptionSubType; // 删除智能查询携带的入参 + delete this.only_params.devicePerceptionSubTypes; // 删除智能查询携带的入参 this.perception_checkgroup = []; //智能设备复选框清空 this.devicePerceptionSubTypes = []; // 智能查询参数清空 this.deviceVideoSubTypes.push(value); // 收集视频类型查询入参 - this.only_params.deviceVideoSubType = - this.deviceVideoSubTypes.toString(); // 这个入参可能会有变化 + this.only_params.deviceVideoSubTypes = + this.deviceVideoSubTypes.sort((a,b)=>{return a-b}).toString(); // 这个入参可能会有变化 + this.flag = true; getVideoList(this.only_params).then((res) => { console.log("res_video", res); this.check_push_table_data = res; - this.$emit("push_data_to_table", this.check_push_table_data,this.only_params); // 传给父亲,再转给兄弟Table + this.$emit( + "push_data_to_table", + this.check_push_table_data, + this.only_params, + this.flag + ); // 传给父亲,再转给兄弟Table }); } else { // 取消 - delete this.only_params.devicePerceptionSubType; // 删除智能查询携带的入参 + delete this.only_params.devicePerceptionSubTypes; // 删除智能查询携带的入参 this.perception_checkgroup = []; //智能设备复选框清空 this.devicePerceptionSubTypes = []; // 智能查询参数清空 this.deviceVideoSubTypes = this.deviceVideoSubTypes.filter( (item) => item != value ); // 收集视频类型查询入参 - this.only_params.deviceVideoSubType = - this.deviceVideoSubTypes.toString(); // 这个入参可能会有变化 + this.only_params.deviceVideoSubTypes = + this.deviceVideoSubTypes.sort((a,b)=>{return a-b}).toString(); // 这个入参可能会有变化 + this.flag = true; getVideoList(this.only_params).then((res) => { console.log("res_video", res); this.check_push_table_data = res; - this.$emit("push_data_to_table", this.check_push_table_data,this.only_params); // 传给父亲,再转给兄弟Table + this.$emit( + "push_data_to_table", + this.check_push_table_data, + this.only_params, + this.flag + ); // 传给父亲,再转给兄弟Table }); } }, @@ -157,29 +186,41 @@ export default { perception_check_search(e, value) { if (e) { // 点击 - delete this.only_params.deviceVideoSubType; // 删除视频查询携带的入参 + delete this.only_params.deviceVideoSubTypes; // 删除视频查询携带的入参 this.video_checkgroup = []; // 视频设备复选框清空 this.deviceVideoSubTypes = []; // 视频设备复选框清空 this.devicePerceptionSubTypes.push(value); // 收集智能类型查询入参 - this.only_params.devicePerceptionSubType = - this.devicePerceptionSubTypes.toString(); // 这个入参可能会有变化 + this.only_params.devicePerceptionSubTypes = + this.devicePerceptionSubTypes.sort((a,b)=>{return a-b}).toString(); // 这个入参可能会有变化 + this.flag = false; getPerceptionList(this.only_params).then((res) => { this.check_push_table_data = res; - this.$emit("push_data_to_table", this.check_push_table_data,this.only_params); // 传给父亲,再转给兄弟Table + this.$emit( + "push_data_to_table", + this.check_push_table_data, + this.only_params, + this.flag + ); // 传给父亲,再转给兄弟Table }); } else { // 取消 - delete this.only_params.deviceVideoSubType; // 删除视频查询携带的入参 + delete this.only_params.deviceVideoSubTypes; // 删除视频查询携带的入参 this.video_checkgroup = []; // 视频设备复选框清空 this.deviceVideoSubTypes = []; // 视频设备复选框清空 this.devicePerceptionSubTypes = this.devicePerceptionSubTypes.filter( (item) => item != value ); // 收集智能类型查询入参 - this.only_params.devicePerceptionSubType = - this.devicePerceptionSubTypes.toString(); // 这个入参可能会有变化 + this.only_params.devicePerceptionSubTypes = + this.devicePerceptionSubTypes.sort((a,b)=>{return a-b}).toString(); // 这个入参可能会有变化 + this.flag = false; getPerceptionList(this.only_params).then((res) => { this.check_push_table_data = res; - this.$emit("push_data_to_table", this.check_push_table_data,this.only_params); // 传给父亲,再转给兄弟Table + this.$emit( + "push_data_to_table", + this.check_push_table_data, + this.only_params, + this.flag + ); // 传给父亲,再转给兄弟Table }); } }, diff --git a/src/views/systemManagement/correlationEquipment2/index.vue b/src/views/systemManagement/correlationEquipment2/index.vue index b2edeb2..dce060f 100644 --- a/src/views/systemManagement/correlationEquipment2/index.vue +++ b/src/views/systemManagement/correlationEquipment2/index.vue @@ -96,7 +96,7 @@ export default { console.log("resVideoList", res.rows); //res.rows res.total // 传给右下方表格数据 this.push_table_data = res; - this.push_data_to_table(this.push_table_data,this.only_params); + this.push_data_to_table(this.push_table_data,this.only_params,true); }); }); }, @@ -135,11 +135,11 @@ export default { getVideoList(this.only_params).then((res) => { console.log("resVideoList", res.rows); this.push_table_data = res; - this.push_data_to_table(this.push_table_data,this.only_params); + this.push_data_to_table(this.push_table_data,this.only_params,true); }); }, - push_data_to_table(data,params) { - this.$refs.equipmentTable.obtain_table_data(data,params); + push_data_to_table(data,params,flag) { + this.$refs.equipmentTable.obtain_table_data(data,params,flag); }, }, }; @@ -305,12 +305,12 @@ export default { .right { width: 64vw; height: 78vh; - border: 0.1px solid #485f6c; + // border: 0.1px solid #485f6c; .right_table { margin-top: 1vh; width: 64vw; height: 52vh; - border: 0.1px solid #485f6c; + // border: 0.1px solid #485f6c; } } }