|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2021-09-13 17:52:31
|
|
|
- * @LastEditTime: 2021-12-27 09:06:13
|
|
|
+ * @LastEditTime: 2021-12-27 18:18:52
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
* @Description: 生物安全 - 车辆管理
|
|
|
* @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
|
|
@@ -17,10 +17,9 @@
|
|
|
|
|
|
<!-- 筛选条件 -->
|
|
|
<query-conditions
|
|
|
- v-if="btnSelected === 2 || btnSelected === 3"
|
|
|
+ v-if="btnSelected === 2 || btnSelected === 3 || btnSelected === 4"
|
|
|
:formItems="formItems"
|
|
|
:propFormData="propFormData"
|
|
|
- :defaultEmit="true"
|
|
|
@getQueryParams="handleQuery"
|
|
|
>
|
|
|
</query-conditions>
|
|
@@ -364,32 +363,46 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- btnSelected(newVal) {
|
|
|
- this.pageNum = 1;
|
|
|
- this.listData = [];
|
|
|
- this.formItems = formItems[this.btnSelected - 1];
|
|
|
- this.propFormData = propFormData[this.btnSelected - 1];
|
|
|
- this.title = titles[this.btnSelected - 1];
|
|
|
- this.tableItems = tableItems[this.btnSelected - 1];
|
|
|
- if (newVal === 1) {
|
|
|
- // 档案
|
|
|
- this.getCarList();
|
|
|
- } else if (newVal === 2) {
|
|
|
- // 车辆通行
|
|
|
- this.carPassage();
|
|
|
- } else if (newVal === 3) {
|
|
|
- // 车辆洗消
|
|
|
- this.carWash();
|
|
|
- } else if (newVal === 4) {
|
|
|
- // 车辆烘干
|
|
|
- this.carDrying();
|
|
|
- } else if (newVal === 5) {
|
|
|
- // 白名单
|
|
|
- this.ShowCarWhite();
|
|
|
- } else {
|
|
|
- // 黑名单
|
|
|
- this.ShowCarBlack();
|
|
|
- }
|
|
|
+ btnSelected: {
|
|
|
+ async handler(newVal) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中...",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ this.pageNum = 1;
|
|
|
+ this.listData = [];
|
|
|
+ if (newVal > 1) {
|
|
|
+ this.formItems = formItems[this.btnSelected - 2];
|
|
|
+ this.propFormData = propFormData[this.btnSelected - 2];
|
|
|
+ } else {
|
|
|
+ this.formItems = {};
|
|
|
+ this.propFormData = {};
|
|
|
+ }
|
|
|
+ this.title = titles[this.btnSelected - 1];
|
|
|
+ this.tableItems = tableItems[this.btnSelected - 1];
|
|
|
+ if (newVal === 1) {
|
|
|
+ // 档案
|
|
|
+ await this.getCarList();
|
|
|
+ } else if (newVal === 2) {
|
|
|
+ // 车辆通行
|
|
|
+ await this.carPassage();
|
|
|
+ } else if (newVal === 3) {
|
|
|
+ // 车辆洗消
|
|
|
+ await this.carWash();
|
|
|
+ } else if (newVal === 4) {
|
|
|
+ // 车辆烘干
|
|
|
+ await this.carDrying();
|
|
|
+ } else if (newVal === 5) {
|
|
|
+ // 白名单
|
|
|
+ await this.ShowCarWhite();
|
|
|
+ } else {
|
|
|
+ // 黑名单
|
|
|
+ await this.ShowCarBlack();
|
|
|
+ }
|
|
|
+ loading.close();
|
|
|
+ },
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -638,7 +651,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
- console.log("error submit!!");
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
@@ -743,7 +755,6 @@ export default {
|
|
|
const result = JSON.parse(res.result);
|
|
|
this.listData = result.data.pageData;
|
|
|
this.listData.forEach((item) => {
|
|
|
- console.log(item);
|
|
|
item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
|
|
|
});
|
|
|
});
|
|
@@ -795,7 +806,7 @@ export default {
|
|
|
current: this.pageNum,
|
|
|
size: this.size,
|
|
|
}).then((res) => {
|
|
|
- if (res.code === 10000) {
|
|
|
+ if (res && res.code === 10000) {
|
|
|
this.listData = res.data.records;
|
|
|
this.total = res.data.total;
|
|
|
}
|