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 | 91 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 79 insertions(+), 12 deletions(-) diff --git a/src/views/equipment/monitoring.vue b/src/views/equipment/monitoring.vue index 2a00a7f..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,12 +250,61 @@ 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 searchEquipment(this.listQuery).then(response => { - this.list = response.data.records - this.total = response.data.total + if (response.data!=null) { + this.list = response.data.records + this.total = response.data.total + }else{ + this.$message({ + message: '鏈悳绱㈠埌鏁版嵁', + type: 'error' + }) + } + this.listLoading = false }) }, @@ -269,6 +329,8 @@ this.total = response.data.total this.listLoading = false }) + this.searchMethodfive(); + this.jzsearchMethodfive(); }, resetTemp() { this.temp = Object.assign({}, _temp) @@ -287,6 +349,7 @@ this.dialogVisible = true this.dialogType = 'modify' this.temp = deepClone(scope.row) + // this.temp.companyid = scope.row.companyid this.disabled=true // this.$nextTick(() => { // this.$refs['dataForm'].clearValidate() @@ -313,7 +376,7 @@ this.list.splice(scope.$index, 1) delEquipment(params).then(response => { this.temp.adminname = localStorage.getItem('username') || ''; - const params = { name: this.temp.adminname, content: '鍒犻櫎浜嗕竴涓熀鍑嗙珯锛岃缂栧彿涓猴細'+scope.row.tagid }; + const params = { name: this.temp.adminname, content: '鍒犻櫎浜嗕竴涓洃娴嬬珯锛岃缂栧彿涓猴細'+scope.row.tagid }; addSystemOperationLog(params).then(response => { }) @@ -327,23 +390,27 @@ }) }, submit(formName) { + if ( this.dialogType != 'modify') { + this.temp.companyid=this.temp.company + } + if (this.loading) { return } - this.temp.companyid=this.temp.company + this.$refs[this.temp].validate((valid) => { if (valid) { this.loading = true addorupEquipment(this.temp).then(() => { if (this.temp.id=="") { this.temp.adminname = localStorage.getItem('username') || ''; - const params = { name: this.temp.adminname, content: '鏂板浜嗕竴涓熀鍑嗙珯锛岃缂栧彿涓猴細'+this.temp.tagid }; + const params = { name: this.temp.adminname, content: '鏂板浜嗕竴涓洃娴嬬珯锛岃缂栧彿涓猴細'+this.temp.tagid }; addSystemOperationLog(params).then(response => { }) } else { this.temp.adminname = localStorage.getItem('username') || ''; - const params = { name: this.temp.adminname, content: '淇敼浜嗕竴涓熀鍑嗙珯锛岃缂栧彿涓猴細'+this.temp.tagid }; + const params = { name: this.temp.adminname, content: '淇敼浜嗕竴涓洃娴嬬珯锛岃缂栧彿涓猴細'+this.temp.tagid }; addSystemOperationLog(params).then(response => { }) -- Gitblit v1.9.3