From 11f6acee504c77a8919a4e0ddfe3e70a746e3522 Mon Sep 17 00:00:00 2001 From: fei.wang <wf18701153496@163.com> Date: 星期五, 18 四月 2025 17:39:33 +0800 Subject: [PATCH] 4.18更新v2.1.5 --- src/views/equipment/monitoring.vue | 84 ++++++++++++++++++++++++++++++++--------- 1 files changed, 65 insertions(+), 19 deletions(-) diff --git a/src/views/equipment/monitoring.vue b/src/views/equipment/monitoring.vue index 341590c..948ed1d 100644 --- a/src/views/equipment/monitoring.vue +++ b/src/views/equipment/monitoring.vue @@ -40,8 +40,13 @@ <el-table-column label="鐘舵��" width="80"> <template slot-scope="scope"> - <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online6.png"></span> - <span v-else-if="scope.row.onlie == '0'"><img src="../../assets/images/offline4.png"></span> + <!-- <span v-if="scope.row.onlie == '1'"><img src="../../assets/images/online6.png"></span> + <span v-else-if="scope.row.onlie == '0'"><img src="../../assets/images/offline4.png"></span> --> + <span v-if="scope.row.onlie == '1'">鍦ㄧ嚎</span> + <span v-else-if="scope.row.onlie == '0'">绂荤嚎</span> + <span v-else-if="scope.row.onlie == '4'">楂樼簿搴�</span> + <span v-else-if="scope.row.onlie == '6'">瓒呴槇鍊煎憡璀�</span> + <span v-else-if="scope.row.onlie == '7'">闈為珮绮惧害鍛婅</span> </template> </el-table-column> @@ -139,7 +144,7 @@ <el-input v-model="temp.anchorname " placeholder="璇疯緭鍏ュ悕绉�" /> </el-form-item> - <el-form-item label="鍏徃" prop="companyid"> + <el-form-item label="鍏徃" prop="company"> <el-select style="width: 100%;" v-model="temp.company" filterable remote placeholder="璇烽�夋嫨鍏徃" :remote-method="searchMethod" :loading="searchloading"> <el-option v-for="item in options" :key="item.id" :label="item.companyname" :value="item.id"> @@ -147,8 +152,13 @@ </el-select> </el-form-item> <el-form-item label="鍩哄噯" prop="needbaseid"> - <el-input v-model="temp.needbaseid - " placeholder="璇疯緭鍏ュ熀鍑�" /> + <!-- <el-input v-model="temp.needbaseid + " placeholder="璇疯緭鍏ュ熀鍑�" /> --> + <el-select style="width: 100%;" v-model="temp.needbaseid" filterable remote placeholder="璇烽�夋嫨鍏徃" + :remote-method="jzsearchMethod" :loading="searchloading"> + <el-option v-for="item in jzoptions" :key="item.tagid" :label="item.tagid" :value="item.tagid"> + </el-option> + </el-select> </el-form-item> </el-form> <div class="text-right"> @@ -165,7 +175,7 @@ <script> import Pagination from '@/components/Pagination' -import { getList, delEquipment, addorupEquipment, searchEquipment, search,addSystemOperationLog } from '@/api/equipment' +import { getList, delEquipment, addorupEquipment, searchEquipment, search,addSystemOperationLog,searchfive,jzsearchfive,jzsearch } from '@/api/equipment' import { deepClone } from '@/utils' const _temp = { @@ -204,6 +214,7 @@ dialogType: 'create', loading: false, value: '', + jzoptions:[], options: [], searchloading: false, rules: { @@ -239,6 +250,47 @@ this.options = []; } }, + // 杩滅▼鎼滅储 + searchMethodfive(query) { + if (query !== '') { + this.loading = true; + // var params = { query: query } + searchfive().then(response => { + this.options = response.data; + this.loading = false; + }) + } else { + this.options = []; + } + }, + + // 杩滅▼鎼滅储 + jzsearchMethod(query) { + if (query !== '') { + this.loading = true; + var params = { type: '0' } + jzsearch(params).then(response => { + this.jzoptions = response.data; + this.loading = false; + }) + } else { + this.jzoptions = []; + } + }, + // 杩滅▼鎼滅储 + jzsearchMethodfive() { + + this.loading = true; + var params = { type: '0' } + jzsearchfive(params).then(response => { + this.jzoptions = response.data; + this.loading = false; + }) + + }, + + + // 鎼滅储 search() { this.listLoading = true @@ -277,6 +329,8 @@ this.total = response.data.total this.listLoading = false }) + this.searchMethodfive(); + this.jzsearchMethodfive(); }, resetTemp() { this.temp = Object.assign({}, _temp) @@ -294,16 +348,6 @@ this.resetTemp() this.dialogVisible = true this.dialogType = 'modify' - console.log(scope.row); - // this.temp = Object.assign({}, _temp) - console.log(this.temp); - console.log(deepClone(scope.row)); - // this.temp.anchorname = scope.row.anchorname - - // this.temp.id = scope.row.id - // this.temp.needbaseid = scope.row.needbaseid - // this.temp.tagid = scope.row.tagid - // this.temp.type = scope.row.type this.temp = deepClone(scope.row) // this.temp.companyid = scope.row.companyid this.disabled=true @@ -346,15 +390,17 @@ }) }, submit(formName) { + if ( this.dialogType != 'modify') { + this.temp.companyid=this.temp.company + } + if (this.loading) { return } - this.temp.companyid=this.temp.companyid + this.$refs[this.temp].validate((valid) => { if (valid) { this.loading = true - console.log(this.temp); - addorupEquipment(this.temp).then(() => { if (this.temp.id=="") { this.temp.adminname = localStorage.getItem('username') || ''; -- Gitblit v1.9.3