| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="filter-container"> |
| | | <el-input v-model="listQuery.keyword" size="small" placeholder="请输入编号/名称/卡号" clearable class="filter-item w-200" /> |
| | | <el-input v-model="listQuery.keyword" size="small" placeholder="请输入编号/名称/卡号" clearable |
| | | class="filter-item w-200" /> |
| | | <el-button-group class="filter-item"> |
| | | <el-button size="small" type="primary" icon="el-icon-search" @click="search"> |
| | | 搜索 |
| | |
| | | 新增 |
| | | </el-button> |
| | | </el-button-group> |
| | | |
| | | <span style="margin-left: 100px;"> |
| | | <!-- <el-date-picker v-model="timeExport" type="daterange" unlink-panels :picker-options="pickerOptions" |
| | | range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd" /> --> |
| | | |
| | | <!-- <el-button style="margin-left: 10px;" type="primary" @click="exportExcel">导出EXCEL</el-button> --> |
| | | |
| | | <el-button style="margin-left: 10px;" type="primary" @click="resetzuobiao">重置基站坐标</el-button> |
| | | |
| | | </span> |
| | | </div> |
| | | |
| | | <el-table v-loading="listLoading" :data="list" element-loading-text="Loading" border fit height="100%" |
| | | class="table-container" highlight-current-row> |
| | | class="table-container" highlight-current-row @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"> |
| | | </el-table-column> |
| | | <el-table-column fixed label="ID" width="70" > |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.id }} |
| | |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- <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> --> |
| | | <!-- <span v-if="scope.row.onlie == 1">在线</span> |
| | | <span v-if="scope.row.onlie == 0">离线</span> --> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { getList, delEquipment, addorupEquipment, searchEquipment,search,addSystemOperationLog } from '@/api/equipment' |
| | | import { getList, delEquipment, addorupEquipment, searchEquipment, search, addSystemOperationLog, resetzuobiao,searchfive } from '@/api/equipment' |
| | | import { deepClone } from '@/utils' |
| | | |
| | | const _temp = { |
| | |
| | | keyword: undefined, |
| | | type: 0 |
| | | }, |
| | | multipleSelection: [], |
| | | uploadUrl: '', |
| | | temp: Object.assign({}, _temp), |
| | | dialogVisible: false, |
| | |
| | | this.fetchData() |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | resetzuobiao() { |
| | | console.log(this.multipleSelection); |
| | | if (this.multipleSelection.length == 0) { |
| | | this.$message({ |
| | | message: '请先选择一条数据', |
| | | type: 'error' |
| | | }) |
| | | } else if (this.multipleSelection.length > 1) { |
| | | this.$message({ |
| | | message: '请选择一条数据', |
| | | type: 'error' |
| | | }) |
| | | |
| | | |
| | | } else { |
| | | this.$prompt('该操作需要由专业技术人员完成,请输入操作密码', '设备编号' + this.multipleSelection[0].tagid + '确认操作', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/, |
| | | |
| | | inputErrorMessage: '密码错误', |
| | | inputValidator: (value) => {//input校验 |
| | | if (value != 20151102) { |
| | | return '密码错误'; |
| | | } |
| | | }, |
| | | }).then(({ value }) => { |
| | | |
| | | const params = { tagid: this.multipleSelection[0].tagid }; |
| | | resetzuobiao(params).then(response => { |
| | | console.log(response); |
| | | |
| | | |
| | | }) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '重置成功!' |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '取消重置' |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | // 远程搜索 |
| | | searchMethod(query) { |
| | | if (query !== '') { |
| | | this.loading = true; |
| | | var params = { query: query } |
| | | search(params).then(response => { |
| | | this.options = response.data; |
| | | this.loading = false; |
| | | }) |
| | | } else { |
| | | this.options = []; |
| | | } |
| | | }, |
| | | |
| | | // 远程搜索 |
| | | searchMethodfive(query) { |
| | | if (query !== '') { |
| | | this.loading = true; |
| | | // var params = { query: query } |
| | | searchfive().then(response => { |
| | | this.options = response.data; |
| | | this.loading = false; |
| | | }) |
| | |
| | | this.total = response.data.total |
| | | this.listLoading = false |
| | | }) |
| | | this.searchMethodfive() |
| | | }, |
| | | resetTemp() { |
| | | this.temp = Object.assign({}, _temp) |
| | |
| | | if (this.loading) { |
| | | return |
| | | } |
| | | this.temp.companyid=this.temp.companyid |
| | | if ( this.dialogType != 'modify') { |
| | | this.temp.companyid=this.temp.company |
| | | } |
| | | // this.temp.companyid = this.temp.companyid |
| | | this.loading = true |
| | | this.$refs[this.temp].validate((valid) => { |
| | | if (valid) { |