From b403195a75a452b54fe2112158b454f6d80c0e11 Mon Sep 17 00:00:00 2001
From: gaoluyang <gaoluyang@rengu.cc>
Date: 星期四, 11 七月 2024 15:03:55 +0800
Subject: [PATCH] 科学计数法逻辑修改
---
src/components/view/a6-device-management.vue | 129 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 123 insertions(+), 6 deletions(-)
diff --git a/src/components/view/a6-device-management.vue b/src/components/view/a6-device-management.vue
index 7fc51d6..4d7f99e 100644
--- a/src/components/view/a6-device-management.vue
+++ b/src/components/view/a6-device-management.vue
@@ -53,7 +53,7 @@
<div class="role_manage">
<div>
<el-row class="title">
- <el-col :span="12" style="padding-left: 20px;">璁惧宸ュ叿鏄庣粏</el-col>
+ <el-col :span="12" style="padding-left: 20px;text-align: left;">璁惧宸ュ叿鏄庣粏</el-col>
<el-col :span="12" style="text-align: right;">
<el-button size="medium" type="primary" @click="dialogVisible2 = true">鏂板</el-button>
</el-col>
@@ -378,6 +378,49 @@
</el-row>
</span>
</el-dialog>
+ <el-dialog title="鏁伴噰閰嶇疆" :visible.sync="dialogVisible3" width="400px">
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>IP锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.ip"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>閲囬泦鍦板潃锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.collectUrl"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鍌ㄥ瓨鍦板潃锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.storageUrl"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鍙傜収锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.refer"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>X锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.x"></el-input>
+ </div>
+ <div class="search_thing" style="margin-bottom: 14px;">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>Y锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.y"></el-input>
+ </div>
+ <div class="search_thing">
+ <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鍏紡锛�</div>
+ <el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="configForm.formula"></el-input>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-row>
+ <el-button @click="dialogVisible3=false">鍙� 娑�</el-button>
+ <el-button type="primary" @click="submitForm3" :loading="upLoad3">纭� 瀹�</el-button>
+ </el-row>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -412,7 +455,7 @@
largeCategory: null,
orderBy: {
field: 'id',
- order: 'desc'
+ order: 'asc'
}
},
isIndex: true,
@@ -428,7 +471,13 @@
font: '妗f淇',
type: 'text',
method: 'isUpdate'
+ }, {
+ id: 'handleConfig',
+ font: '鏁伴噰閰嶇疆',
+ type: 'text',
+ method: 'handleConfig'
}],
+ headNoShow:['enDeviceName'],
tagField: {
deviceStatus: {
select: []
@@ -480,6 +529,9 @@
subordinateDepartmentsList: [],
upLoad: false,
upLoad2: false,
+ dialogVisible3:false,
+ upLoad3:false,
+ configForm:{}
}
},
computed: {
@@ -527,6 +579,7 @@
let up = false
let del = false
let add = false
+ let config = false
for (var i = 0; i < power.length; i++) {
if (power[i].menuMethod == 'upDeviceParameter') {
up = true
@@ -537,6 +590,12 @@
if (power[i].menuMethod == 'addDeviceParameter') {
add = true
}
+ if (power[i].menuMethod == 'numberCollect') {
+ config = true
+ }
+ }
+ if (!config) {
+ this.componentData.do.splice(2, 1)
}
if (!up) {
this.componentData.do.splice(1, 1)
@@ -658,9 +717,11 @@
this.formData.imageName = response.data.name;
}
},
- handleSuccessUpImg2(response, ) {
+ handleSuccessUpImg2(response) {
if (response.code == 200) {
this.$nextTick(() => {
+ this.formData.imageUpload = response.data.url;
+ this.formData.imageName = response.data.name;
this.formData2.imageUpload = response.data.url;
this.formData2.imageName = response.data.name;
})
@@ -687,7 +748,7 @@
this.$message.error('鏈緭鍏ュ惎鐢ㄦ棩鏈�')
return
}
- if(!this.formData.deviceStatus){
+ if(this.formData.deviceStatus==='' || this.formData.deviceStatus===null){
this.$message.error('鏈�夋嫨褰撳墠鐘舵��')
return
}
@@ -699,7 +760,7 @@
delete this.formData.updateTime
delete this.formData.createUser
delete this.formData.updateUser
- this.formData.insProductIds = this.formData.insProductIds.join()
+ this.formData.insProductIds = this.formData.insProductIds?this.formData.insProductIds.join():''
this.upLoad = true;
this.$axios.post(this.$api.deviceScope.upDeviceParameter, this.formData, {
headers: {
@@ -773,7 +834,63 @@
this.dialogVisible2 = false
this.upLoad2 = false
})
- }
+ },
+ handleConfig(row){
+ this.configForm = {}
+ this.dialogVisible3 = true
+ this.$axios.post(this.$api.deviceScope.getNumberCollect+'?id='+row.id).then(res => {
+ this.configForm = res.data
+ })
+ },
+ submitForm3(){
+ if(!this.configForm.ip){
+ this.$message.error('璇峰~鍐橧P');
+ return
+ }
+ if(!this.configForm.collectUrl){
+ this.$message.error('璇峰~鍐欓噰闆嗗湴鍧�');
+ return
+ }
+ if(!this.configForm.storageUrl){
+ this.$message.error('璇峰~鍐欏偍瀛樺湴鍧�');
+ return
+ }
+ if(!this.configForm.refer){
+ this.$message.error('璇峰~鍐欏弬鐓�');
+ return
+ }
+ if(!this.configForm.x){
+ this.$message.error('璇峰~鍐橷');
+ return
+ }
+ if(!this.configForm.y){
+ this.$message.error('璇峰~鍐橸');
+ return
+ }
+ if(!this.configForm.formula){
+ this.$message.error('璇峰~鍐欏叕寮�');
+ return
+ }
+
+ this.upLoad3 = true
+ this.$axios.post(this.$api.deviceScope.numberCollect, this.configForm, {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+ }).then(res => {
+ this.upLoad3 = false
+ if (res.code === 201) {
+ return
+ }
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.refreshTable()
+ this.dialogVisible3 = false
+ }).catch(e => {
+ this.$message.error('鎿嶄綔澶辫触')
+ this.dialogVisible3 = false
+ this.upLoad3 = false
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3