From 8aa3edd56c279100c9053576f3e90fa55459fe77 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Mon, 16 Jan 2023 16:15:55 +0800
Subject: [PATCH] 修改
---
src/views/clientManagement/clientManagement.vue | 56 +++++++++++++++++++-------------------------------------
1 files changed, 19 insertions(+), 37 deletions(-)
diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index 49bab6c..b80cc8f 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -365,6 +365,16 @@
]
},
{
+ label: "设备类型",
+ prop: "deviceType",
+ width: 150,
+ rules: [{
+ required: true,
+ message: "请输入设备类型",
+ trigger: "blur"
+ }]
+ },
+ {
label: "使用方",
prop: "deptName",
display: false
@@ -738,35 +748,18 @@
handler(val) {
if (val) {
var that = this;
- //重新加载一次页面详情数据,解决新的省市区无法写入问题
- //判断是新增还是修改
- if(that.isEdit){
- getclient(this.form.id).then(res => {
- // that.province = res.data.data.province;
- // that.city = res.data.data.city;
- // that.district = res.data.data.district;
- });
- }
-
//经纬度替换
this.form.wd = val.latitude;
this.form.jd = val.longitude;
//地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
var address = val.formattedAddress.toString();
- if(address.search("县") != -1){
- this.form.street = address.substring(address.indexOf("县")+1,address.length);
- }
- if(address.search("区") != -1){
- this.form.street = address.substring(address.indexOf("区")+1,address.length);
- }
- //写入新的省市区
- that.form.province = val.addressComponent.province;
- if(val.addressComponent.city==""){
- that.form.city = val.addressComponent.province;
- }else{
- that.form.city = val.addressComponent.city;
- }
- that.form.district = val.addressComponent.district;
+ this.form.street = address;
+ // if(address.search("县") != -1){
+ // this.form.street = address.substring(address.indexOf("县")+1,address.length);
+ // }
+ // if(address.search("区") != -1){
+ // this.form.street = address.substring(address.indexOf("区")+1,address.length);
+ // }
}
},
immediate: true,
@@ -1039,13 +1032,8 @@
for (var i = 0; i < data.records.length; i++) {
var date = new Date(data.records[i].heartbeat).getTime();
- if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
- data.records[i].dxzt = 0;
- } else if (data.records[i].heartbeat == "") {
- data.records[i].dxzt = 0;
- } else {
if(data.records[i].dtype==1){
- data.records[i].dxzt = data.records[i].dtype;
+ data.records[i].dxzt = 1;
}
if(data.records[i].dtype==2){
data.records[i].dxzt = 2;
@@ -1054,15 +1042,9 @@
data.records[i].dxzt = 3;
}
if(data.records[i].dtype=="" || data.records[i].dtype==0){
- data.records[i].dxzt = 1;
+ data.records[i].dxzt = 0;
}
-
- }
}
-
- // data.records.sort((a, b) => {
- // return a.dxzt - b.dxzt;
- // });
this.data = data.records;
this.loading = false;
--
Gitblit v1.9.3