Browse Source

定时获取消息,分别添加到消息表,报警表,日志表。

添加设备的时候不再对海康接口进行操作。直接存库。
测试摄像头抓拍接口。
master
yangzongjia 2 years ago
parent
commit
6fbace53ee
  1. 8
      src/api/callPolice/callPolice.js
  2. 10
      src/api/device/device.js
  3. 8
      src/api/deviceImage/deviceImage.js
  4. 8
      src/api/deviceLog/deviceLog.js
  5. 634
      src/views/baojingchaxun/baojingchaxunList.vue
  6. 594
      src/views/shebeirizhi/shebeirizhiList.vue
  7. 18
      src/views/shebeitaizhang/shebeitaizhangAdd.vue
  8. 4
      src/views/shebeitaizhang/shebeitaizhangList.vue
  9. 1073
      src/views/zhiwujiance/zhiwujianceList.vue

8
src/api/callPolice/callPolice.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 获取报警列表
export function getCallPolicePage(data) {
return request({ url: '/callPolice/getCallPolicePage', method: 'GET', params: data })
}

10
src/api/device/device.js

@ -2,11 +2,21 @@ import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import qs from 'qs' import qs from 'qs'
// 添加设备
export function createDeviceGroup(data) {
return request({ url: '/device/createDeviceGroup', method: 'post', params: data })
}
// 添加设备 // 添加设备
export function createDevice(data) { export function createDevice(data) {
return request({ url: '/device/createDevice', method: 'post', params: data }) return request({ url: '/device/createDevice', method: 'post', params: data })
} }
// 删除设备
export function removeDevice(data) {
return request({ url: '/device/removeDevice', method: 'post', params: data })
}
// 获取设备列表 // 获取设备列表
export function getDevicePage(data) { export function getDevicePage(data) {
return request({ url: '/device/getDevicePage', method: 'GET', params: data }) return request({ url: '/device/getDevicePage', method: 'GET', params: data })

8
src/api/deviceImage/deviceImage.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 获取设备日志列表
export function getDeviceImagePage(data) {
return request({ url: '/deviceImage/getDeviceImagePage', method: 'GET', params: data })
}

8
src/api/deviceLog/deviceLog.js

@ -0,0 +1,8 @@
import request from '@/utils/request'
// eslint-disable-next-line no-unused-vars
import qs from 'qs'
// 获取设备日志列表
export function getDeviceLogPage(data) {
return request({ url: '/deviceLog/getDeviceLogPage', method: 'GET', params: data })
}

634
src/views/baojingchaxun/baojingchaxunList.vue

@ -8,36 +8,21 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="设备名称"> <el-form-item label="设备名称">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" <el-input v-model="listQuery.name" clearable placeholder="" class="addinputw"></el-input>
class="addinputw"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备类型"> <el-form-item label="设备类型">
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择设备类型"> <el-select v-model="listQuery.type" filterable clearable placeholder="请选择设备类型">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" /> <el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="开始时间"> <el-form-item label="开始时间">
<el-date-picker v-model="listQuery.params.time1" type="date" placeholder="选择日期" <el-date-picker v-model="listQuery.startTIme" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker> maxlength="20"></el-date-picker>
<!-- <el-select v-model="listQuery.params.time1" filterable clearable placeholder="请选择设备类型">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> -->
</el-form-item> </el-form-item>
<el-form-item label="结束时间"> <el-form-item label="结束时间">
<el-date-picker v-model="listQuery.params.time2" type="date" placeholder="选择日期" <el-date-picker v-model="listQuery.endTime" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker> maxlength="20"></el-date-picker>
<!-- <el-select v-model="listQuery.params.time2" filterable clearable placeholder="请选择设备类型">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> -->
</el-form-item>
<!-- <el-form-item label="厂商办公电话">
<el-input v-model="listQuery.params.manufacturerTelePhone" maxlength="130" placeholder="" class="addinputw" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="联系人">
<el-input v-model="listQuery.params.contactName" maxlength="125" placeholder="" class="addinputw" clearable/>
</el-form-item> -->
</el-form> </el-form>
<div class="btn"> <div class="btn">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
@ -56,30 +41,9 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50" /> <el-table-column type="selection" align="center" width="50" />
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center" /> <el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center" />
<!-- <el-table-column label="操作" fixed align="center" width="160px" class-name="small-padding fixed-width">
<template slot-scope="{row}">
<el-button size="mini" type="primary" :disabled="!row.isShow && (row.supplierTypeValue === '主机厂' || row.supplierTypeValue === '分公司')" @click="handleEdit(row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleCheck(row)">详情</el-button>
</template>
</el-table-column> -->
<!-- <el-table-column prop="jc" label="设备" width="220" header-align="center" align="center">
<template slot-scope="scope">
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.bianma }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column prop="jc" label="设备编码" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.bianma }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="设备类型" width="110" align="center">
<template slot-scope="scope">
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
</template>
</el-table-column> -->
<el-table-column label="报警时间" align="center"> <el-table-column label="报警时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.policeTime }}</span> <span>{{ scope.row.createTime }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备名称" width="" header-align="center" align="center"> <el-table-column label="设备名称" width="" header-align="center" align="center">
@ -89,29 +53,9 @@
</el-table-column> </el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center"> <el-table-column label="设备位置" width="" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.weizhi }}</span> <span>{{ scope.row.position }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="出厂时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.time }}</span>
</template>
</el-table-column>
<el-table-column label="安装时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.anzhuangtime }}</span>
</template>
</el-table-column>
<el-table-column label="供货商" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
</template>
</el-table-column>
<el-table-column label="生产厂家" align="center">
<template slot-scope="scope">
<span>{{ scope.row.owner }}</span>
</template>
</el-table-column> -->
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span> <span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
@ -126,331 +70,281 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <baojingchaxunAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/>
<baojingchaxunInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/> -->
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' import { getCallPolicePage } from '@/api/callPolice/callPolice'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
export default {
name: 'baojingchaxunList',
components: {
Pagination,
pageye,
ButtonBar,
// baojingchaxunAdd,
// baojingchaxunInfo,
},
data() {
return {
btndisabled: false,
btnList: [
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd',
// btnLabel: ''
// },
// {
// type: 'danger',
// size: 'small',
// icon: 'del',
// btnKey: 'doDel',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: '',
// btnKey: 'toChangShang',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: '',
// btnKey: 'toGain',
// btnLabel: ''
// },
// { export default {
// type: 'success', name: 'baojingchaxunList',
// size: 'small', components: {
// icon: 'export', Pagination,
// btnKey: 'build', pageye,
// btnLabel: '' ButtonBar,
// }, },
{ data() {
type: 'info', return {
size: 'small', btndisabled: false,
icon: 'cross', btnList: [
btnKey: 'doClose', {
btnLabel: '关闭' type: 'info',
} size: 'small',
], icon: 'cross',
viewState: 1, btnKey: 'doClose',
isSearchShow: false, btnLabel: '关闭'
searchxianshitit: '显示查询条件', }
sids: [], ],
// ----------- viewState: 1,
tableKey: 0, isSearchShow: false,
list: [ searchxianshitit: '显示查询条件',
{ bianma: 'ZYR2060801', supplierTypeValue: '1', name: '电梯系统', weizhi: '库房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-18 06:00:00', isElse: '待处理' }, sids: [],
{ bianma: 'ZYR2060802', supplierTypeValue: '1', name: '电梯系统', weizhi: '观察', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19 06:00:00', isElse: '已处理' }, // -----------
{ bianma: 'ZYR2060803', supplierTypeValue: '2', name: '电梯系统', weizhi: '后院', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19 06:00:00', isElse: '待处理' }, tableKey: 0,
{ bianma: 'ZYR2060804', supplierTypeValue: '2', name: '电梯系统', weizhi: '铁皮', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20 06:00:00', isElse: '已处理' }, list: [
{ bianma: 'ZYR2060805', supplierTypeValue: '2', name: '电梯系统', weizhi: '盲点', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20 06:00:00', isElse: '待处理' }, { bianma: 'ZYR2060801', supplierTypeValue: '1', name: '电梯系统', weizhi: '库房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-18 06:00:00', isElse: '待处理' },
{ bianma: 'ZYR2060806', supplierTypeValue: '3', name: '电梯系统', weizhi: '凉亭', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-21 06:00:00', isElse: '待处理' }, { bianma: 'ZYR2060802', supplierTypeValue: '1', name: '电梯系统', weizhi: '观察', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19 06:00:00', isElse: '已处理' },
{ bianma: 'ZYR2060807', supplierTypeValue: '3', name: '电梯系统', weizhi: '书房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '已处理' }, { bianma: 'ZYR2060803', supplierTypeValue: '2', name: '电梯系统', weizhi: '后院', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19 06:00:00', isElse: '待处理' },
{ bianma: 'ZYR2060808', supplierTypeValue: '4', name: '电梯系统', weizhi: '藏经阁', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '待处理' }, { bianma: 'ZYR2060804', supplierTypeValue: '2', name: '电梯系统', weizhi: '铁皮', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20 06:00:00', isElse: '已处理' },
{ bianma: 'ZYR2060809', supplierTypeValue: '4', name: '电梯系统', weizhi: '车库', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '已处理' }, { bianma: 'ZYR2060805', supplierTypeValue: '2', name: '电梯系统', weizhi: '盲点', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20 06:00:00', isElse: '待处理' },
{ bianma: 'ZYR2060810', supplierTypeValue: '5', name: '电梯系统', weizhi: '斜坡', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '待处理' }, { bianma: 'ZYR2060806', supplierTypeValue: '3', name: '电梯系统', weizhi: '凉亭', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-21 06:00:00', isElse: '待处理' },
], { bianma: 'ZYR2060807', supplierTypeValue: '3', name: '电梯系统', weizhi: '书房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '已处理' },
listLoading: false, { bianma: 'ZYR2060808', supplierTypeValue: '4', name: '电梯系统', weizhi: '藏经阁', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '待处理' },
listQuery: { { bianma: 'ZYR2060809', supplierTypeValue: '4', name: '电梯系统', weizhi: '车库', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '已处理' },
params: { { bianma: 'ZYR2060810', supplierTypeValue: '5', name: '电梯系统', weizhi: '斜坡', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23 06:00:00', isElse: '待处理' },
manufacturerName: '', ],
supplierType: '', listLoading: false,
useOrgSid: '', listQuery: {
createOrgSid: '', current: 1,
manufacturerTelePhone: '', size: 5,
contactName: '' total: 10
}, },
current: 1, supplierType_list: [
size: 5, { title: '入侵报警', id: '1' },
total: 10 { title: '电子围栏', id: '2' },
}, { title: '门禁报警', id: '3' },
supplierType_list: [ { title: '监控报警', id: '4' },
{ title: '入侵报警', id: '1' }, { title: '设备离线', id: '5' },
{ title: '电子围栏', id: '2' }, ],
{ title: '门禁报警', id: '3' }, rules: {}
{ title: '监控报警', id: '4' }, }
{ title: '设备离线', id: '5' }, },
], mounted() {
rules: {} this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
},
methods: {
getSupplierType(item) {
for (var i = 0; i < this.supplierType_list.length; i++) {
if (this.supplierType_list[i].id == item) {
return this.supplierType_list[i].title
}
} }
}, },
mounted() { resetState() {
this.$refs['btnbar'].setButtonList(this.btnList) this.viewState = 1
}, },
created() { btnHandle(btnKey) {
// console.log('XXXXXXXXXXXXXXX ' + btnKey)
// this.init() switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'toChangShang':
this.toChangShang()
break
case 'toGain':
this.toGain()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
}, },
methods: { //
getSupplierType(item) { clicksearchShow() {
for (var i = 0; i < this.supplierType_list.length; i++) { this.isSearchShow = !this.isSearchShow
if (this.supplierType_list[i].id == item) { if (this.isSearchShow) {
return this.supplierType_list[i].title this.searchxianshitit = '隐藏查询条件'
} } else {
} this.searchxianshitit = '显示查询条件'
}, }
resetState() { },
this.viewState = 1 init() {
}, getCallPolicePage(this.listQuery).then((res) => {
btnHandle(btnKey) { if (res.code == 200) {
console.log('XXXXXXXXXXXXXXX ' + btnKey) // this.list = res.data.records
switch (btnKey) { this.total = res.total
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'toChangShang':
this.toChangShang()
break
case 'toGain':
this.toGain()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' // this.list = []
} }
}, })
// init() { },
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { // getType() {
// if (res.success) { // typeValues({
// this.listQuery.params.createOrgSid = res.data // type: 'supplierType'
// this.getType() // }).then((res) => {
// this.getList() // if (res.code === '200') {
// } // this.supplierType_list = res.data
// }) // console.log('', this.supplierType_list)
// }, // }
// getType() { // })
// typeValues({ // },
// type: 'supplierType' //
// }).then((res) => { indexMethod(index) {
// if (res.code === '200') { var pagestart = (this.listQuery.current - 1) * this.listQuery.size
// this.supplierType_list = res.data var pageindex = index + 1 + pagestart
// console.log('', this.supplierType_list) return pageindex
// } },
// }) //
// }, getList() {
// // this.listLoading = true
indexMethod(index) { // req.gysPagerList(this.listQuery).then((response) => {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size // this.listLoading = false
var pageindex = index + 1 + pagestart // if (response.code === '200' && response.data && response.data.total > 0) {
return pageindex // this.list = response.data.records
}, // this.listQuery.total = response.data.total
// // } else {
getList() { // this.list = []
// this.listLoading = true // this.listQuery.total = 0
// req.gysPagerList(this.listQuery).then((response) => { // }
// this.listLoading = false // })
// if (response.code === '200' && response.data && response.data.total > 0) { },
// this.list = response.data.records //
// this.listQuery.total = response.data.total handleFilter() {
// } else { this.listQuery.current = 1
// this.list = [] this.getList()
// this.listQuery.total = 0 },
// } handleReset() {
// }) // this.listQuery = {
}, // params: {
// // manufacturerName: '',
handleFilter() { // supplierType: '',
this.listQuery.current = 1 // useOrgSid: '',
this.getList() // createOrgSid: '',
}, // manufacturerTelePhone: '',
handleReset() { // contactName: ''
// this.listQuery = { // },
// params: { // current: 1,
// manufacturerName: '', // size: 5
// supplierType: '', // }
// useOrgSid: '', // this.init()
// createOrgSid: '', },
// manufacturerTelePhone: '', //
// contactName: '' toAdd() {
// }, this.viewState = 2
// current: 1, this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
// size: 5 },
// }
// this.init()
},
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
},
handleSelectionChange(row) { handleSelectionChange(row) {
const aa = [] const aa = []
row.forEach((element) => { row.forEach((element) => {
aa.push(element.sid) aa.push(element.sid)
}) })
this.sids = aa this.sids = aa
}, },
// ID // ID
doDel() { doDel() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.delBySids(this.sids.toString()).then(resp => { req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) { if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
loading.close()
}
}).catch(e => {
loading.close() loading.close()
}) this.$message({ type: 'success', message: resp.msg, showClose: true })
}).catch(() => { this.getList()
} else {
loading.close()
}
}).catch(e => {
loading.close()
}) })
} else { }).catch(() => {
this.$message({ type: 'error', message: '没有选择!!', showClose: true }) })
return } else {
} this.$message({ type: 'error', message: '没有选择!!', showClose: true })
}, return
// toChangShang() {
// req.saveGysByOrgSid(this.listQuery.params.createOrgSid).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
// toGain() {
// req.saveAllByOrgSid({ orgSid: this.listQuery.params.createOrgSid }).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
handleEdit(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
// if (row.supplierTypeValue !== '' && row.supplierTypeValue !== '') {
// this.viewState = 3
// this.$refs['divadd'].showEdit(row)
// } else {
// this.viewState = 5
// this.$refs['divHosts'].showInfo(row)
// }
},
//
handleCheck(row) {
this.viewState = 4
this.$refs['divinfo'].showInfo(row)
},
//
// doExport() {
// basefinbankExportExcel(this.sids).then((res) => {
// const blob = new Blob([res], {
// type: 'application/vnd.ms-excel'
// })
// const objectUrl = URL.createObjectURL(blob)
// window.location.href = objectUrl
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000
// })
// })
// },
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
} }
},
// toChangShang() {
// req.saveGysByOrgSid(this.listQuery.params.createOrgSid).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
// toGain() {
// req.saveAllByOrgSid({ orgSid: this.listQuery.params.createOrgSid }).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
handleEdit(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
// if (row.supplierTypeValue !== '' && row.supplierTypeValue !== '') {
// this.viewState = 3
// this.$refs['divadd'].showEdit(row)
// } else {
// this.viewState = 5
// this.$refs['divHosts'].showInfo(row)
// }
},
//
handleCheck(row) {
this.viewState = 4
this.$refs['divinfo'].showInfo(row)
},
//
// doExport() {
// basefinbankExportExcel(this.sids).then((res) => {
// const blob = new Blob([res], {
// type: 'application/vnd.ms-excel'
// })
// const objectUrl = URL.createObjectURL(blob)
// window.location.href = objectUrl
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000
// })
// })
// },
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
} }
} }
}
</script> </script>
<style scoped> <style scoped></style>
</style>

594
src/views/shebeirizhi/shebeirizhiList.vue

@ -8,29 +8,26 @@
<div v-show="isSearchShow" class="search"> <div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header"> <el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="时间"> <el-form-item label="时间">
<el-date-picker v-model="listQuery.params.supplierType" type="date" placeholder="选择日期" <el-date-picker v-model="listQuery.startTime" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker> maxlength="20"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="设备名称"> <el-form-item label="设备名称">
<el-select v-model="listQuery.params.supplierType1" filterable clearable placeholder="请选择设备名称"> <el-select v-model="listQuery.name" filterable clearable placeholder="请选择设备名称">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" /> <el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="地点名称"> <el-form-item label="地点名称">
<el-input v-model="listQuery.params.ress" clearable placeholder="" class="addinputw" placeholder="请填写地点名称"></el-input> <el-input v-model="listQuery.position" clearable placeholder="" class="addinputw"
</el-form-item> placeholder="请填写地点名称"></el-input>
<el-form-item label="名称">
<el-input v-model="listQuery.params.name" clearable placeholder="" class="addinputw" placeholder="请填写名称"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="名称">
<el-input v-model="listQuery.params.name" clearable placeholder="" class="addinputw"
placeholder="请填写名称"></el-input>
</el-form-item> -->
<el-form-item label="卡号"> <el-form-item label="卡号">
<el-input v-model="listQuery.params.code" clearable placeholder="" class="addinputw" placeholder="请填写卡号"></el-input> <el-input v-model="listQuery.code" clearable placeholder="" class="addinputw"
placeholder="请填写卡号"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="厂商办公电话">
<el-input v-model="listQuery.params.manufacturerTelePhone" maxlength="130" placeholder="" class="addinputw" clearable/>
</el-form-item>
<el-form-item label="联系人">
<el-input v-model="listQuery.params.contactName" maxlength="125" placeholder="" class="addinputw" clearable/>
</el-form-item> -->
</el-form> </el-form>
<div class="btn"> <div class="btn">
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> <el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button>
@ -49,17 +46,6 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50" /> <el-table-column type="selection" align="center" width="50" />
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center" /> <el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center" />
<!-- <el-table-column label="操作" fixed align="center" width="160px" class-name="small-padding fixed-width">
<template slot-scope="{row}">
<el-button size="mini" type="primary" :disabled="!row.isShow && (row.supplierTypeValue === '主机厂' || row.supplierTypeValue === '分公司')" @click="handleEdit(row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleCheck(row)">详情</el-button>
</template>
</el-table-column> -->
<!-- <el-table-column prop="jc" label="设备" width="220" header-align="center" align="center">
<template slot-scope="scope">
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.bianma }}</span>
</template>
</el-table-column> -->
<el-table-column prop="jc" label="时间" header-align="center" align="center"> <el-table-column prop="jc" label="时间" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.time }}</span> <span>{{ scope.row.time }}</span>
@ -67,7 +53,7 @@
</el-table-column> </el-table-column>
<el-table-column label="设备名称" width="" header-align="center" align="center"> <el-table-column label="设备名称" width="" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.deviceName }}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="地点名称" align="center"> <el-table-column label="地点名称" align="center">
@ -75,11 +61,11 @@
<span>{{ scope.row.position }}</span> <span>{{ scope.row.position }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="名称" align="center"> <!-- <el-table-column label="名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.name }}</span> <span>{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="卡号" align="center"> <el-table-column label="卡号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.code }}</span> <span>{{ scope.row.code }}</span>
@ -94,331 +80,271 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <baojingchaxunAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/>
<baojingchaxunInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/> -->
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' import { getDeviceLogPage } from '@/api/deviceLog/deviceLog'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
export default {
name: 'baojingchaxunList',
components: {
Pagination,
pageye,
ButtonBar,
// baojingchaxunAdd,
// baojingchaxunInfo,
},
data() {
return {
btndisabled: false,
btnList: [
// {
// type: 'primary',
// size: 'small',
// icon: 'plus',
// btnKey: 'toAdd',
// btnLabel: ''
// },
// {
// type: 'danger',
// size: 'small',
// icon: 'del',
// btnKey: 'doDel',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: '',
// btnKey: 'toChangShang',
// btnLabel: ''
// },
// {
// type: 'primary',
// size: 'small',
// icon: '',
// btnKey: 'toGain',
// btnLabel: ''
// },
// { export default {
// type: 'success', name: 'baojingchaxunList',
// size: 'small', components: {
// icon: 'export', Pagination,
// btnKey: 'build', pageye,
// btnLabel: '' ButtonBar,
// }, },
{ data() {
type: 'info', return {
size: 'small', btndisabled: false,
icon: 'cross', btnList: [
btnKey: 'doClose', {
btnLabel: '关闭' type: 'info',
} size: 'small',
], icon: 'cross',
viewState: 1, btnKey: 'doClose',
isSearchShow: false, btnLabel: '关闭'
searchxianshitit: '显示查询条件', }
sids: [], ],
// ----------- viewState: 1,
tableKey: 0, isSearchShow: false,
list: [ searchxianshitit: '显示查询条件',
{ time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '东岸广场西侧东门', name: '闫永军', code: 'KTIO00065' }, sids: [],
{ time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '东岸广场西侧东门', name: '闫永军', code: 'KTIO00065' }, // -----------
{ time: '2023-05-23 16:10:20', deviceName: '巡更点2', position: '东岸广场西侧走廊', name: '冷柠', code: 'KTIO00065' }, tableKey: 0,
{ time: '2023-05-23 16:10:20', deviceName: '巡更点4', position: '东岸广场东侧东门', name: '冷柠', code: 'KTIO00065' }, list: [
{ time: '2023-05-23 16:10:20', deviceName: '巡更点3', position: '2F走廊西侧', name: '冷柠', code: 'KTIO00065' }, { time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '东岸广场西侧东门', name: '闫永军', code: 'KTIO00065' },
{ time: '2023-05-23 16:10:20', deviceName: '巡更点5', position: '2F大厅', name: '冷柠', code: 'KTIO00065' }, { time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '东岸广场西侧东门', name: '闫永军', code: 'KTIO00065' },
{ time: '2023-05-23 16:10:20', deviceName: '巡更点2', position: '2F206控制系统门口', name: '冷柠', code: 'KTIO00065' }, { time: '2023-05-23 16:10:20', deviceName: '巡更点2', position: '东岸广场西侧走廊', name: '冷柠', code: 'KTIO00065' },
{ time: '2023-05-23 16:10:20', deviceName: '巡更点4', position: '2F206控制系统门口', name: '冷柠', code: 'KTIO00065' }, { time: '2023-05-23 16:10:20', deviceName: '巡更点4', position: '东岸广场东侧东门', name: '冷柠', code: 'KTIO00065' },
{ time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '2F走廊西侧', name: '闫阵', code: 'KTIO00065' }, { time: '2023-05-23 16:10:20', deviceName: '巡更点3', position: '2F走廊西侧', name: '冷柠', code: 'KTIO00065' },
], { time: '2023-05-23 16:10:20', deviceName: '巡更点5', position: '2F大厅', name: '冷柠', code: 'KTIO00065' },
listLoading: false, { time: '2023-05-23 16:10:20', deviceName: '巡更点2', position: '2F206控制系统门口', name: '冷柠', code: 'KTIO00065' },
listQuery: { { time: '2023-05-23 16:10:20', deviceName: '巡更点4', position: '2F206控制系统门口', name: '冷柠', code: 'KTIO00065' },
params: { { time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '2F走廊西侧', name: '闫阵', code: 'KTIO00065' },
manufacturerName: '', ],
supplierType: '', listLoading: false,
useOrgSid: '', listQuery: {
createOrgSid: '', current: 1,
manufacturerTelePhone: '', size: 5,
contactName: '' total: 0
}, },
current: 1, supplierType_list: [
size: 5, { title: '巡更点1', id: '1' },
total: 0 { title: '巡更点2', id: '2' },
}, { title: '巡更点3', id: '3' },
supplierType_list: [ { title: '巡更点4', id: '4' },
{ title: '巡更点1', id: '1' }, { title: '巡更点5', id: '5' },
{ title: '巡更点2', id: '2' },
{ title: '巡更点3', id: '3' },
{ title: '巡更点4', id: '4' },
{ title: '巡更点5', id: '5' },
], ],
rules: {} rules: {}
}
},
mounted() {
// this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
this.init()
},
methods: {
getPosition(item) {
for (var i = 0; i < this.supplierType_list.length; i++) {
if (this.supplierType_list[i].id == item) {
return this.supplierType_list[i].title
}
} }
}, },
mounted() { resetState() {
this.$refs['btnbar'].setButtonList(this.btnList) this.viewState = 1
}, },
created() { btnHandle(btnKey) {
// console.log('XXXXXXXXXXXXXXX ' + btnKey)
// this.init() switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'toChangShang':
this.toChangShang()
break
case 'toGain':
this.toGain()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
}, },
methods: { //
getPosition(item) { clicksearchShow() {
for (var i = 0; i < this.supplierType_list.length; i++) { this.isSearchShow = !this.isSearchShow
if (this.supplierType_list[i].id == item) { if (this.isSearchShow) {
return this.supplierType_list[i].title this.searchxianshitit = '隐藏查询条件'
} } else {
} this.searchxianshitit = '显示查询条件'
}, }
resetState() { },
this.viewState = 1 init() {
}, getDeviceLogPage(this.listQuery).then((res) => {
btnHandle(btnKey) { if (res.code == 200) {
console.log('XXXXXXXXXXXXXXX ' + btnKey) this.list = res.data.records
switch (btnKey) { this.total = res.total
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'toChangShang':
this.toChangShang()
break
case 'toGain':
this.toGain()
break
case 'doExport':
this.doExport()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else { } else {
this.searchxianshitit = '显示查询条件' this.list = []
} }
}, })
// init() { },
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { //
// if (res.success) { indexMethod(index) {
// this.listQuery.params.createOrgSid = res.data var pagestart = (this.listQuery.current - 1) * this.listQuery.size
// this.getType() var pageindex = index + 1 + pagestart
// this.getList() return pageindex
// } },
// }) //
// }, getList() {
// getType() { // this.listLoading = true
// typeValues({ // req.gysPagerList(this.listQuery).then((response) => {
// type: 'supplierType' // this.listLoading = false
// }).then((res) => { // if (response.code === '200' && response.data && response.data.total > 0) {
// if (res.code === '200') { // this.list = response.data.records
// this.supplierType_list = res.data // this.listQuery.total = response.data.total
// console.log('', this.supplierType_list) // } else {
// } // this.list = []
// }) // this.listQuery.total = 0
// }, // }
// // })
indexMethod(index) { },
var pagestart = (this.listQuery.current - 1) * this.listQuery.size //
var pageindex = index + 1 + pagestart handleFilter() {
return pageindex this.listQuery.current = 1
}, this.getList()
// },
getList() { handleReset() {
// this.listLoading = true // this.listQuery = {
// req.gysPagerList(this.listQuery).then((response) => { // params: {
// this.listLoading = false // manufacturerName: '',
// if (response.code === '200' && response.data && response.data.total > 0) { // supplierType: '',
// this.list = response.data.records // useOrgSid: '',
// this.listQuery.total = response.data.total // createOrgSid: '',
// } else { // manufacturerTelePhone: '',
// this.list = [] // contactName: ''
// this.listQuery.total = 0 // },
// } // current: 1,
// }) // size: 5
}, // }
// // this.init()
handleFilter() { },
this.listQuery.current = 1 //
this.getList() toAdd() {
}, this.viewState = 2
handleReset() { this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
// this.listQuery = { },
// params: {
// manufacturerName: '',
// supplierType: '',
// useOrgSid: '',
// createOrgSid: '',
// manufacturerTelePhone: '',
// contactName: ''
// },
// current: 1,
// size: 5
// }
// this.init()
},
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
},
handleSelectionChange(row) { handleSelectionChange(row) {
const aa = [] const aa = []
row.forEach((element) => { row.forEach((element) => {
aa.push(element.sid) aa.push(element.sid)
}) })
this.sids = aa this.sids = aa
}, },
// ID // ID
doDel() { doDel() {
if (this.sids.length > 0) { if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.delBySids(this.sids.toString()).then(resp => { req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) { if (resp.success) {
loading.close() loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true }) this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList() this.getList()
} else { } else {
loading.close()
}
}).catch(e => {
loading.close() loading.close()
}) }
}).catch(() => { }).catch(e => {
loading.close()
}) })
} else { }).catch(() => {
this.$message({ type: 'error', message: '没有选择!!', showClose: true }) })
return } else {
} this.$message({ type: 'error', message: '没有选择!!', showClose: true })
}, return
// toChangShang() {
// req.saveGysByOrgSid(this.listQuery.params.createOrgSid).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
// toGain() {
// req.saveAllByOrgSid({ orgSid: this.listQuery.params.createOrgSid }).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
handleEdit(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
// if (row.supplierTypeValue !== '' && row.supplierTypeValue !== '') {
// this.viewState = 3
// this.$refs['divadd'].showEdit(row)
// } else {
// this.viewState = 5
// this.$refs['divHosts'].showInfo(row)
// }
},
//
handleCheck(row) {
this.viewState = 4
this.$refs['divinfo'].showInfo(row)
},
//
// doExport() {
// basefinbankExportExcel(this.sids).then((res) => {
// const blob = new Blob([res], {
// type: 'application/vnd.ms-excel'
// })
// const objectUrl = URL.createObjectURL(blob)
// window.location.href = objectUrl
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000
// })
// })
// },
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
} }
},
// toChangShang() {
// req.saveGysByOrgSid(this.listQuery.params.createOrgSid).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
// toGain() {
// req.saveAllByOrgSid({ orgSid: this.listQuery.params.createOrgSid }).then((resp) => {
// if (resp.success) {
// this.$message({ showClose: true, type: 'success', message: '' })
// this.getList()
// }
// })
// },
handleEdit(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
// if (row.supplierTypeValue !== '' && row.supplierTypeValue !== '') {
// this.viewState = 3
// this.$refs['divadd'].showEdit(row)
// } else {
// this.viewState = 5
// this.$refs['divHosts'].showInfo(row)
// }
},
//
handleCheck(row) {
this.viewState = 4
this.$refs['divinfo'].showInfo(row)
},
//
// doExport() {
// basefinbankExportExcel(this.sids).then((res) => {
// const blob = new Blob([res], {
// type: 'application/vnd.ms-excel'
// })
// const objectUrl = URL.createObjectURL(blob)
// window.location.href = objectUrl
// this.$notify({
// title: '',
// message: '',
// type: 'success',
// duration: 2000
// })
// })
// },
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
} }
} }
}
</script> </script>
<style scoped> <style scoped></style>
</style>

18
src/views/shebeitaizhang/shebeitaizhangAdd.vue

@ -64,6 +64,15 @@
<el-input v-model="addForm.name" maxlength="20" placeholder="请填写设备名称" class="addinputw" clearable /> <el-input v-model="addForm.name" maxlength="20" placeholder="请填写设备名称" class="addinputw" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>设备序列号</span>
</el-col>
<el-col :span="8">
<el-form-item prop="deviceSerial">
<el-input v-model="addForm.deviceSerial" maxlength="20" placeholder="请填写设备序列号" class="addinputw"
clearable />
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -72,7 +81,7 @@
</template> </template>
<script> <script>
import { createDevice, updateDevice } from '@/api/device/device' import { createDevice, updateDevice, createDeviceGroup } from '@/api/device/device'
export default { export default {
name: 'shebeitaizhangAdd', name: 'shebeitaizhangAdd',
@ -127,7 +136,12 @@ export default {
required: true, required: true,
message: '请选择设备类型', message: '请选择设备类型',
trigger: 'change' trigger: 'change'
}] }],
deviceSerial: [{
required: true,
message: '请选择序列号',
trigger: 'blur'
}],
}, },
submitdisabled: false submitdisabled: false
} }

4
src/views/shebeitaizhang/shebeitaizhangList.vue

@ -133,7 +133,7 @@ import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons' // import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
import shebeitaizhangAdd from './shebeitaizhangAdd' import shebeitaizhangAdd from './shebeitaizhangAdd'
import shebeitaizhangInfo from './shebeitaizhangInfo' import shebeitaizhangInfo from './shebeitaizhangInfo'
import { getDevicePage, getInfoById } from '@/api/device/device' import { getDevicePage, getInfoById,removeDevice } from '@/api/device/device'
// import req from '@/api/shebeitaizhang/shebeitaizhang' // import req from '@/api/shebeitaizhang/shebeitaizhang'
import * as echarts from "echarts"; import * as echarts from "echarts";
import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb' import PieChartrenyuan from '@/views/echarts/components/PieChartrenyuanb'
@ -426,7 +426,7 @@ export default {
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
req.delBySids(this.sids.toString()).then(resp => { removeDevice(this.sids.toString()).then(resp => {
if (resp.success) { if (resp.success) {
loading.close() loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true }) this.$message({ type: 'success', message: resp.msg, showClose: true })

1073
src/views/zhiwujiance/zhiwujianceList.vue

File diff suppressed because it is too large
Loading…
Cancel
Save