| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | </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"> |
| | |
| | | |
| | | <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 = { |
| | |
| | | dialogType: 'create', |
| | | loading: false, |
| | | value: '', |
| | | jzoptions:[], |
| | | options: [], |
| | | searchloading: false, |
| | | rules: { |
| | |
| | | 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 |
| | |
| | | this.total = response.data.total |
| | | this.listLoading = false |
| | | }) |
| | | this.searchMethodfive(); |
| | | this.jzsearchMethodfive(); |
| | | }, |
| | | resetTemp() { |
| | | this.temp = Object.assign({}, _temp) |
| | |
| | | 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 |
| | |
| | | }) |
| | | }, |
| | | 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') || ''; |