Browse Source

修改列表

master
1181364@qq.com 2 years ago
parent
commit
4e4a3173a5
  1. 659
      src/views/baojingchaxun/baojingchaxunList.vue
  2. 661
      src/views/shebeirizhi/shebeirizhiList.vue
  3. 415
      src/views/shebeitaizhang/shebeitaizhangAdd.vue
  4. 172
      src/views/shebeitaizhang/shebeitaizhangInfo.vue
  5. 658
      src/views/shebeitaizhang/shebeitaizhangList.vue
  6. 665
      src/views/shebeizhuangtai/shebeizhuangtaiList.vue

659
src/views/baojingchaxun/baojingchaxunList.vue

@ -1,20 +1,37 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar view-title="报警查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<button-bar view-title="报警查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="设备类型">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" class="addinputw"></el-input>
<el-form-item label="设备名称">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder=""
class="addinputw"></el-input>
</el-form-item>
<el-form-item label="选择楼层">
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择楼层">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
<el-form-item label="设备类型">
<el-select v-model="listQuery.params.supplierType" 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-date-picker v-model="listQuery.params.time1" type="date" placeholder="选择日期"
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 label="结束时间">
<el-date-picker v-model="listQuery.params.time2" type="date" placeholder="选择日期"
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>
@ -31,12 +48,14 @@
<div class="listtop">
<div class="tit">报警查询信息列表</div>
<!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
<div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center"/>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"
@selection-change="handleSelectionChange">
<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 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>
@ -48,14 +67,24 @@
<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">
<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">
<template slot-scope="scope">
<span>{{ scope.row.policeTime }}</span>
</template>
</el-table-column>
<el-table-column label="设备类型" width="110" align="center">
<el-table-column label="设备名称" width="" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.supplierTypeValue }}</span>
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center">
@ -63,7 +92,7 @@
<span>{{ scope.row.weizhi }}</span>
</template>
</el-table-column>
<el-table-column label="出厂时间" align="center">
<!-- <el-table-column label="出厂时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.time }}</span>
</template>
@ -80,24 +109,20 @@
</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.gonghuashang }}</span>
<span>{{ scope.row.owner }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
@ -107,303 +132,325 @@
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
// 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 {
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: ''
// },
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [{bianma:'212233433',supplierTypeValue:'222',weizhi:'212233433',time:'2023-02-26',anzhuangtime:'2023-02-26',gonghuashang:'222'
,supplierTypeValue:'222',zhuangtai:'222'}
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [
{ 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: '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: '待处理' },
{ 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: '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: '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: '已处理' },
{ 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: '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: '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: '待处理' },
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1,
size: 5,
total: 10
},
current: 1,
size: 5,
total: 0
},
supplierType_list: [],
rules: {}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
// this.init()
},
methods: {
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
supplierType_list: [
{ title: '入侵报警', id: '1' },
{ title: '电子围栏', id: '2' },
{ title: '门禁报警', id: '3' },
{ title: '监控报警', id: '4' },
{ title: '设备离线', id: '5' },
],
rules: {}
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// this.listQuery = {
// params: {
// manufacturerName: '',
// supplierType: '',
// useOrgSid: '',
// createOrgSid: '',
// manufacturerTelePhone: '',
// contactName: ''
// },
// current: 1,
// size: 5
// }
created() {
//
// this.init()
},
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
},
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
}
}
},
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// 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) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
loading.close()
}
}).catch(e => {
loading.close()
}
}).catch(e => {
loading.close()
})
}).catch(() => {
})
}).catch(() => {
})
} else {
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>
<style scoped>
</style>
</style>

661
src/views/shebeirizhi/shebeirizhiList.vue

@ -1,20 +1,30 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar view-title="设备日志" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<button-bar view-title="设备日志" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="设备类型">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" class="addinputw"></el-input>
<el-form-item label="时间">
<el-date-picker v-model="listQuery.params.supplierType" type="date" placeholder="选择日期"
maxlength="20"></el-date-picker>
</el-form-item>
<el-form-item label="选择楼层">
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择楼层">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
<el-form-item label="设备名称">
<el-select v-model="listQuery.params.supplierType" 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.ress" clearable placeholder="" class="addinputw" placeholder="请填写地点名称"></el-input>
</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-input v-model="listQuery.params.code" clearable placeholder="" class="addinputw" placeholder="请填写卡号"></el-input>
</el-form-item>
<!-- <el-form-item label="厂商办公电话">
<el-input v-model="listQuery.params.manufacturerTelePhone" maxlength="130" placeholder="" class="addinputw" clearable/>
</el-form-item>
@ -31,12 +41,14 @@
<div class="listtop">
<div class="tit">设备日志信息列表</div>
<!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
<div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center"/>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"
@selection-change="handleSelectionChange">
<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 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>
@ -48,56 +60,37 @@
<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>{{ scope.row.supplierTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weizhi }}</span>
</template>
</el-table-column>
<el-table-column label="出厂时间" align="center">
<el-table-column prop="jc" label="时间" header-align="center" 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">
<el-table-column label="设备名称" width="" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.deviceName }}</span>
</template>
</el-table-column>
<el-table-column label="生产厂家" align="center">
<el-table-column label="地点名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.position }}</span>
</template>
</el-table-column>
<el-table-column label="保修截止日期" align="center">
<el-table-column label="名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<el-table-column label="卡号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.code }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
@ -107,303 +100,325 @@
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
// 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 {
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: ''
// },
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [{bianma:'212233433',supplierTypeValue:'222',weizhi:'212233433',time:'2023-02-26',anzhuangtime:'2023-02-26',gonghuashang:'222'
,supplierTypeValue:'222',zhuangtai:'222'}
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [
{ time: '2023-05-23 16:10:20', deviceName: '巡更点1', position: '东岸广场西侧东门', 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: '东岸广场西侧走廊', name: '冷柠', code: 'KTIO00065' },
{ time: '2023-05-23 16:10:20', deviceName: '巡更点4', position: '东岸广场东侧东门', 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' },
{ time: '2023-05-23 16:10:20', deviceName: '巡更点2', position: '2F206控制系统门口', 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: '巡更点1', position: '2F走廊西侧', name: '闫阵', code: 'KTIO00065' },
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1,
size: 5,
total: 0
},
current: 1,
size: 5,
total: 0
},
supplierType_list: [],
rules: {}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
// this.init()
},
methods: {
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
supplierType_list: [
{ title: '巡更点1', id: '1' },
{ title: '巡更点2', id: '2' },
{ title: '巡更点3', id: '3' },
{ title: '巡更点4', id: '4' },
{ title: '巡更点5', id: '5' },
],
rules: {}
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// this.listQuery = {
// params: {
// manufacturerName: '',
// supplierType: '',
// useOrgSid: '',
// createOrgSid: '',
// manufacturerTelePhone: '',
// contactName: ''
// },
// current: 1,
// size: 5
// }
created() {
//
// this.init()
},
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
},
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
}
}
},
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// 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) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
loading.close()
}
}).catch(e => {
loading.close()
}
}).catch(e => {
loading.close()
})
}).catch(() => {
})
}).catch(() => {
})
} else {
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>
<style scoped>
</style>
</style>

415
src/views/shebeitaizhang/shebeitaizhangAdd.vue

@ -16,77 +16,103 @@
</div>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>供应商名称</span>
<span><span class="icon">*</span>设备编码</span>
</el-col>
<el-col :span="8">
<el-form-item prop="manufacturerName">
<el-input v-model="addForm.manufacturerName" maxlength="20" placeholder="" class="addinputw" clearable/>
<el-form-item prop="">
<el-input v-model="addForm.manufacturerName" maxlength="20" placeholder="请填写设备编码" class="addinputw"
clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>简称</span>
<span>设备位置</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.manufacturerAs" maxlength="20" placeholder="" class="addinputw" clearable/>
<el-input v-model="addForm.manufacturerAs" maxlength="20" placeholder="请填写设备位置 " class="addinputw"
clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>编码</span>
<span><span class="icon">*</span>设备类型</span>
</el-col>
<el-col :span="8">
<el-form-item prop="manufacturerCode">
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable/>
<!-- <el-form-item prop="">
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20"
placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable />
</el-form-item> -->
<el-form-item>
<el-select v-model="addForm.manufacturerCode" filterable clearable placeholder="请选择设备类型"
style="width: 410px;">
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id"
class="addinputw" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>分类</span>
<span>安装时间</span>
</el-col>
<el-col :span="8">
<el-form-item prop="supplierTypeValue">
<el-select v-model="addForm.supplierTypeValue" class="addinputw" placeholder="" @change="changeSupplierType">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" :disabled="item.dictValue === '主机厂' || item.dictValue === '分公司'"/>
</el-select>
<el-form-item prop="">
<!-- <el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20"
placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable /> -->
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;"
maxlength="20"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>通讯地址</span>
<span><span class="icon">*</span>出厂时间</span>
</el-col>
<el-col :span="8">
<el-form-item prop="">
<!-- <el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20"
placeholder="请填写金蝶供应商编码,如无请自己创建编码" class="addinputw" clearable /> -->
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerCode" style="width: 410px;"
maxlength="20"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>供货商</span>
</el-col>
<el-col :span="20">
<el-form-item prop="manufacturerAddress">
<el-input v-model="addForm.manufacturerAddress" maxlength="80" placeholder="" class="addinputw addinputw01" clearable/>
<el-col :span="8">
<el-form-item prop="">
<el-input v-model="addForm.manufacturerCode" :disabled="!isShow" maxlength="20" placeholder="请填写供应商编码"
class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>供应商办公电话</span>
<span>生产厂家</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.manufacturerTelePhone" maxlength="20" placeholder="例:010-88888888" class="addinputw" clearable/>
<el-input v-model="addForm.manufacturerTelePhone" maxlength="20" placeholder="请填写生产厂家编码"
class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>传真</span>
<span>保修截止日期</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.manufacturerFax" maxlength="20" placeholder="例:010-88888888" class="addinputw" clearable/>
<!-- <el-input v-model="addForm.manufacturerFax" maxlength="20" placeholder="" class="addinputw" clearable /> -->
<el-date-picker type="date" placeholder="选择日期" v-model="addForm.manufacturerFax" style="width: 410px;"
maxlength="20"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>联系人姓名</span>
</el-col>
<el-col :span="8">
<el-form-item prop="contactName">
<el-input v-model="addForm.contactName" maxlength="5" placeholder="" class="addinputw" clearable/>
<el-input v-model="addForm.contactName" maxlength="5" placeholder="" class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
@ -94,7 +120,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="contactMobile">
<el-input v-model="addForm.contactMobile" maxlength="11" placeholder="" class="addinputw" clearable/>
<el-input v-model="addForm.contactMobile" maxlength="11" placeholder="" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
@ -104,7 +130,8 @@
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.contactTelePhone" maxlength="14" placeholder="例:010-88888888" class="addinputw" clearable/>
<el-input v-model="addForm.contactTelePhone" maxlength="14" placeholder="例:010-88888888"
class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
@ -112,7 +139,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="weChatID">
<el-input v-model="addForm.weChatID" maxlength="100" placeholder="" class="addinputw" clearable/>
<el-input v-model="addForm.weChatID" maxlength="100" placeholder="" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
@ -122,7 +149,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="">
<el-input v-model="addForm.zipCode" maxlength="20" placeholder="" class="addinputw" clearable/>
<el-input v-model="addForm.zipCode" maxlength="20" placeholder="" class="addinputw" clearable />
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
@ -130,10 +157,10 @@
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="addForm.email" maxlength="20" placeholder="" class="addinputw" clearable/>
<el-input v-model="addForm.email" maxlength="20" placeholder="" class="addinputw" clearable />
</el-form-item>
</el-col>
</el-row>
</el-row> -->
</el-form>
</div>
@ -142,177 +169,183 @@
</template>
<script>
// import req from '@/api/shebeitaizhang/shebeitaizhang'
// import { typeValues } from '@/api/cheliang/dictcommons'
// import req from '@/api/shebeitaizhang/shebeitaizhang'
// import { typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'shebeitaizhangAdd',
data() {
var checkSubmit = (rule, value, callback) => {
const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (Submit.test(value)) {
return callback()
}
callback(new Error('请输入手机号'))
}
var checkChuanzhen = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (value) {
//
if (!BanGongDianHua.test(value)) {
callback(new Error('请输入正确的传真格式'))
export default {
name: 'shebeitaizhangAdd',
data() {
var checkSubmit = (rule, value, callback) => {
const Submit = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
if (Submit.test(value)) {
return callback()
}
callback()
} else {
callback()
callback(new Error('请输入手机号'))
}
}
return {
tableKey: 0,
index: 0,
viewState: 1,
viewTitle: '',
dialogStatus: '',
sid: '',
isShow: true,
supplierType_list: [],
addForm: {
manufacturerName: '',
manufacturerAs: '',
manufacturerCode: '',
supplierType: '',
supplierTypeValue: '',
manufacturerAddress: '',
manufacturerTelePhone: '',
manufacturerFax: '',
contactName: '',
contactMobile: '',
contactTelePhone: '',
weChatID: '',
zipCode: '',
email: '',
createOrg: '',
useOrg: ''
},
baseManufacturerBankDto: [],
rules: {
manufacturerName: [{
required: true,
message: '请填写供应商名称',
trigger: 'blur'
}],
supplierTypeValue: [{
required: true,
message: '请选择分类',
trigger: 'change'
}],
manufacturerAddress: [{
required: true,
message: '请填写供应商通讯地址',
trigger: 'blur'
}],
manufacturerFax: [{
required: true,
validator: checkChuanzhen,
trigger: 'blur'
}],
contactName: [{
required: true,
message: '请填写联系人名字',
trigger: 'blur'
}],
contactMobile: [{
required: true,
validator: checkSubmit,
trigger: 'blur'
}],
manufacturerCode: [{
required: true,
message: '编码不能为空',
trigger: 'blur'
}]
},
submitdisabled: false
}
},
methods: {
init() {
typeValues({ type: 'supplierType' }).then((res) => {
if (res.success) {
this.supplierType_list = res.data
}
})
},
changeSupplierType(value) {
let bb = null
this.supplierType_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
key: e.dictKey,
value: e.dictValue
var checkChuanzhen = (rule, value, callback) => {
const BanGongDianHua = /\d{3}-\d{8}|\d{4}-\d{7}/
if (value) {
//
if (!BanGongDianHua.test(value)) {
callback(new Error('请输入正确的传真格式'))
}
callback()
} else {
callback()
}
})
this.addForm.supplierType = bb.key
}
return {
tableKey: 0,
index: 0,
viewState: 1,
viewTitle: '',
dialogStatus: '',
sid: '',
isShow: true,
supplierType_list: [
{ title: '入侵报警', id: '1' },
{ title: '电子围栏', id: '2' },
{ title: '门禁报警', id: '3' },
{ title: '监控报警', id: '4' },
{ title: '设备离线', id: '5' },
],
addForm: {
manufacturerName: '',
manufacturerAs: '',
manufacturerCode: '',
supplierType: '',
supplierTypeValue: '',
manufacturerAddress: '',
manufacturerTelePhone: '',
manufacturerFax: '',
contactName: '',
contactMobile: '',
contactTelePhone: '',
weChatID: '',
zipCode: '',
email: '',
createOrg: '',
useOrg: ''
},
baseManufacturerBankDto: [],
rules: {
manufacturerName: [{
required: true,
message: '请填写供应商名称',
trigger: 'blur'
}],
supplierTypeValue: [{
required: true,
message: '请选择分类',
trigger: 'change'
}],
manufacturerAddress: [{
required: true,
message: '请填写供应商通讯地址',
trigger: 'blur'
}],
manufacturerFax: [{
required: true,
validator: checkChuanzhen,
trigger: 'blur'
}],
contactName: [{
required: true,
message: '请填写联系人名字',
trigger: 'blur'
}],
contactMobile: [{
required: true,
validator: checkSubmit,
trigger: 'blur'
}],
manufacturerCode: [{
required: true,
message: '编码不能为空',
trigger: 'blur'
}]
},
submitdisabled: false
}
},
handleSave() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
const formobj = {
baseManufacturerBankDto: this.baseManufacturerBankDto,
addForm: this.addForm
methods: {
init() {
typeValues({ type: 'supplierType' }).then((res) => {
if (res.success) {
this.supplierType_list = res.data
}
if (this.dialogStatus === 'add') {
req.save(formobj).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else if (this.dialogStatus === 'edit') {
req.update(formobj, this.sid).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
})
},
changeSupplierType(value) {
let bb = null
this.supplierType_list.forEach((e) => {
if (e.dictValue === value) {
bb = {
key: e.dictKey,
value: e.dictValue
}
}
} else {
return false
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.dialogStatus = ''
this.sid = ''
this.addForm = {}
this.baseManufacturerBankDto = []
this.isShow = true
this.$refs['form_obj'].resetFields()
this.$emit('doback')
})
this.addForm.supplierType = bb.key
},
handleSave() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
const formobj = {
baseManufacturerBankDto: this.baseManufacturerBankDto,
addForm: this.addForm
}
if (this.dialogStatus === 'add') {
req.save(formobj).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else if (this.dialogStatus === 'edit') {
req.update(formobj, this.sid).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
}
} else {
return false
}
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.dialogStatus = ''
this.sid = ''
this.addForm = {}
this.baseManufacturerBankDto = []
this.isShow = true
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
}
</script>
<style scoped>
.divStyle {
padding: 7px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
text-align: left;
color: #ffffff;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>
.divStyle {
padding: 7px;
font-weight: bold;
font-size: 16px;
background-color: #0294d7;
text-align: left;
color: #ffffff;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

172
src/views/shebeitaizhang/shebeitaizhangInfo.vue

@ -14,7 +14,7 @@
</div>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>供应商名称</span>
<span>设备编码</span>
</el-col>
<el-col :span="8">
<el-form-item>
@ -22,7 +22,7 @@
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>简称</span>
<span>设备位置</span>
</el-col>
<el-col :span="8">
<el-form-item>
@ -32,15 +32,15 @@
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>编码</span>
<span>设备类型</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.manufacturerCode }}</span>
<span>{{ getSupplierType(infoForm.manufacturerCode) }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>分类</span>
<span>安装时间</span>
</el-col>
<el-col :span="8">
<el-form-item>
@ -50,83 +50,55 @@
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>通讯地址</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ infoForm.manufacturerAddress }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>供应商办公电话</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.manufacturerTelePhone }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>传真</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.manufacturerFax }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>联系人姓名</span>
<span>出厂时间</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.contactName }}</span>
<span>{{ infoForm.manufacturer }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>联系人手机号</span>
<span>供货商</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.contactMobile }}</span>
<span>{{ infoForm.manufacturerAddress }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>联系人办公电话</span>
<span>生产厂家</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.contactTelePhone }}</span>
<span>{{ infoForm.manufacturerTelePhone }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>微信号</span>
<span>保修截止日期</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.weChatID }}</span>
<span>{{ infoForm.manufacturerFax }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>邮编</span>
<span>状态</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.zipCode }}</span>
<span>{{ getStatus(infoForm.status) }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>邮箱</span>
<span></span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ infoForm.email }}</span>
<span></span>
</el-form-item>
</el-col>
</el-row>
@ -155,58 +127,72 @@
</template>
<script>
// import req from '@/api/shebeitaizhang/shebeitaizhang'
// import req from '@/api/shebeitaizhang/shebeitaizhang'
export default {
name: 'shebeitaizhangInfo',
data() {
return {
// tableKey: 0,
// index: 0,
viewTitle: '',
// supplierType_list: [],
infoForm: {
manufacturerName: '111',
manufacturerAs: '222',
manufacturerCode: '333',
supplierType: '444',
supplierTypeValue: '455',
manufacturerAddress: '666',
manufacturerTelePhone: '777',
manufacturerFax: '888',
contactName: '999',
contactMobile: '12',
contactTelePhone: '133',
weChatID: '1112222',
zipCode: '1555',
email: '166',
createOrg: '1777',
useOrg: '1888'
},
// baseManufacturerBankDto: [],
rules: {},
// submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '设备台账详情'
// req.fetchBySid(row.sid).then(resp => {
// this.infoForm = resp.data.infoForm
// this.baseManufacturerBankDto = resp.data.baseManufacturerBankDto
// }).catch(e => {
// this.formobj = row
// })
export default {
name: 'shebeitaizhangInfo',
data() {
return {
// tableKey: 0,
// index: 0,
viewTitle: '',
supplierType_list: [
{ title: '摄像机', id: '1' },
],
status_list: [
{ title: '已损坏', id: '1' },
{ title: '已维修', id: '2' },
{ title: '完好', id: '3' },
],
infoForm: {
manufacturerName: 'KD-22',
manufacturerAs: '2F金陵文脉',
manufacturerCode: '1',
supplierTypeValue: '2023-02-26 16:00:00',
manufacturerAddress: '大华',
manufacturer: '2023-02-26 12:00:00',
manufacturerTelePhone: '大华科技',
manufacturerFax: '2023-05-23',
status:'1'
},
// baseManufacturerBankDto: [],
rules: {},
// submitdisabled: false
}
},
handleReturn() {
this.$emit('doback')
methods: {
getStatus(item) {
for (var i = 0; i < this.status_list.length; i++) {
if (this.status_list[i].id == item) {
return this.status_list[i].title
}
}
},
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
}
}
},
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '设备台账详情'
// req.fetchBySid(row.sid).then(resp => {
// this.infoForm = resp.data.infoForm
// this.baseManufacturerBankDto = resp.data.baseManufacturerBankDto
// }).catch(e => {
// this.formobj = row
// })
},
handleReturn() {
this.$emit('doback')
}
}
}
}
</script>
<style scoped>
</style>
</style>

658
src/views/shebeitaizhang/shebeitaizhangList.vue

@ -1,18 +1,20 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar view-title="设备台账" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<button-bar view-title="设备台账" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<el-form-item label="设备类型">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" class="addinputw"></el-input>
<el-select v-model="listQuery.params.supplierType" 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-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择楼层">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
<el-option v-for="item in floor_list" :key="item.id" :label="item.title" :value="item.id" />
</el-select>
</el-form-item>
<!-- <el-form-item label="厂商办公电话">
@ -31,16 +33,21 @@
<div class="listtop">
<div class="tit">设备台账信息列表</div>
<!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
<div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center"/>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"
@selection-change="handleSelectionChange">
<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 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"
:disabled="!row.isShow && (row.supplierTypeValue === '主机厂' || row.supplierTypeValue === '分公司')"
@click="handleEdit(row)">编辑</el-button>
<el-button size="mini" type="primary" @click="handleCheck(row)">详情</el-button>
<!-- <el-button size="mini" type="primary">处理</el-button> -->
</template>
</el-table-column>
<!-- <el-table-column prop="jc" label="设备" width="220" header-align="center" align="center">
@ -55,7 +62,7 @@
</el-table-column>
<el-table-column label="设备类型" width="110" align="center">
<template slot-scope="scope">
<span>{{ scope.row.supplierTypeValue }}</span>
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
</template>
</el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center">
@ -80,336 +87,377 @@
</el-table-column>
<el-table-column label="生产厂家" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.owner }}</span>
</template>
</el-table-column>
<el-table-column label="保修截止日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.policeTime }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span v-if="scope.row.status == 1" style="color:red">{{ getStatus(scope.row.status) }}</span>
<span v-if="scope.row.status == 2" style="color:orange">{{ getStatus(scope.row.status) }}</span>
<span v-if="scope.row.status == 3" style="color:green">{{ getStatus(scope.row.status) }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
<shebeitaizhangAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/>
<shebeitaizhangInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/>
<shebeitaizhangAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter" />
<shebeitaizhangInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" />
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
import shebeitaizhangAdd from './shebeitaizhangAdd'
import shebeitaizhangInfo from './shebeitaizhangInfo'
// import req from '@/api/shebeitaizhang/shebeitaizhang'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
import shebeitaizhangAdd from './shebeitaizhangAdd'
import shebeitaizhangInfo from './shebeitaizhangInfo'
// import req from '@/api/shebeitaizhang/shebeitaizhang'
export default {
name: 'shebeitaizhangList',
components: {
Pagination,
pageye,
ButtonBar,
shebeitaizhangAdd,
shebeitaizhangInfo,
},
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: ''
// },
{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'import',
btnLabel: '导入'
},
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [{bianma:'212233433',supplierTypeValue:'222',weizhi:'212233433',time:'2023-02-26',anzhuangtime:'2023-02-26',gonghuashang:'222'
,supplierTypeValue:'222',zhuangtai:'222'}
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1,
size: 5,
total: 0
},
supplierType_list: [],
rules: {}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
// this.init()
},
methods: {
resetState() {
this.viewState = 1
export default {
name: 'shebeitaizhangList',
components: {
Pagination,
pageye,
ButtonBar,
shebeitaizhangAdd,
shebeitaizhangInfo,
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
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: ''
// },
{
type: 'success',
size: 'small',
icon: 'export',
btnKey: 'import',
btnLabel: '导入'
},
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-18', status: '1' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-19', status: '1' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-19', status: '2' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-20', status: '2' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-20', status: '2' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-21', status: '1' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-23', status: '1' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-23', status: '3' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-23', status: '3' },
{ bianma: 'KD-22', supplierTypeValue: '1', weizhi: '2F金陵文脉', time: '2023-02-26 12:00:00', anzhuangtime: '2023-02-26 16:00:00', gonghuashang: '大华', owner: '大华科技', policeTime: '2023-05-23', status: '3' },
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1,
size: 5,
total: 0
},
supplierType_list: [
{ title: '摄像机', id: '1' },
],
floor_list: [
{ title: '一层', id: '1' },
{ title: '二层', id: '2' },
{ title: '三层', id: '3' },
{ title: '四层', id: '4' },
],
status_list: [
{ title: '已损坏', id: '1' },
{ title: '已维修', id: '2' },
{ title: '完好', id: '3' },
],
rules: {}
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// this.listQuery = {
// params: {
// manufacturerName: '',
// supplierType: '',
// useOrgSid: '',
// createOrgSid: '',
// manufacturerTelePhone: '',
// contactName: ''
// },
// current: 1,
// size: 5
// }
created() {
//
// this.init()
},
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
},
methods: {
getStatus(item) {
for (var i = 0; i < this.status_list.length; i++) {
if (this.status_list[i].id == item) {
return this.status_list[i].title
}
}
},
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
}
}
},
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// 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) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
loading.close()
}
}).catch(e => {
loading.close()
}
}).catch(e => {
loading.close()
})
}).catch(() => {
})
}).catch(() => {
})
} else {
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)
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
// 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>
<style scoped>
</style>
</style>

665
src/views/shebeizhuangtai/shebeizhuangtaiList.vue

@ -1,18 +1,19 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar view-title="设备状态" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<button-bar view-title="报警查询" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="110px" class="tab-header">
<!-- <el-form-item label="设备类型">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder=""
class="addinputw"></el-input>
</el-form-item> -->
<el-form-item label="设备类型">
<el-input v-model="listQuery.params.manufacturerName" clearable placeholder="" class="addinputw"></el-input>
</el-form-item>
<el-form-item label="选择楼层">
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择楼层">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
<el-select v-model="listQuery.params.supplierType" 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="厂商办公电话">
@ -29,14 +30,16 @@
</div>
</div>
<div class="listtop">
<div class="tit">设备状态信息列表</div>
<div class="tit">报警查询信息列表</div>
<!-- 翻页分页 -->
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
<div>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center"/>
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;"
@selection-change="handleSelectionChange">
<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 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>
@ -48,22 +51,39 @@
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.bianma }}</span>
</template>
</el-table-column> -->
<!--
<el-table-column label="报警时间" align="center">
<template slot-scope="scope">
<span>{{ scope.row.policeTime }}</span>
</template>
</el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weizhi }}</span>
</template>
</el-table-column> -->
<el-table-column label="设备类型" align="center">
<template slot-scope="scope">
<span>{{ getDeviceType(scope.row.deviceType) }}</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">
<el-table-column label="IP地址" align="center">
<template slot-scope="scope">
<span>{{ scope.row.supplierTypeValue }}</span>
<span>{{ scope.row.ipAddress }}</span>
</template>
</el-table-column>
<el-table-column label="设备位置" width="" header-align="center" align="center">
<el-table-column label="当前状态" width="110" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weizhi }}</span>
<span v-if="scope.row.supplierTypeValue == 1" style="color:green">{{ getSupplierType(scope.row.supplierTypeValue) }}</span>
<span v-if="scope.row.supplierTypeValue == 2" style="color:red">{{ 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">
<span>{{ scope.row.time }}</span>
</template>
@ -80,24 +100,15 @@
</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.gonghuashang }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span>{{ scope.row.gonghuashang }}</span>
<span>{{ scope.row.owner }}</span>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
@ -107,303 +118,333 @@
</template>
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
// import baojingchaxunAdd from './baojingchaxunAdd'
// import baojingchaxunInfo from './baojingchaxunInfo'
// import req from '@/api/baojingchaxun/baojingchaxun'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
// import { typeValues, getOrgSidByPath } from '@/api/cheliang/dictcommons'
// 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 {
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: ''
// },
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [{bianma:'212233433',supplierTypeValue:'222',weizhi:'212233433',time:'2023-02-26',anzhuangtime:'2023-02-26',gonghuashang:'222'
,supplierTypeValue:'222',zhuangtai:'222'}
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
// {
// type: 'success',
// size: 'small',
// icon: 'export',
// btnKey: 'build',
// btnLabel: ''
// },
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
viewState: 1,
isSearchShow: false,
searchxianshitit: '显示查询条件',
sids: [],
// -----------
tableKey: 0,
list: [
{ bianma: 'Pro2160901', supplierTypeValue: '1', weizhi: '库房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-18', deviceType: '1', ipAddress: '192.168.5.12' },
{ bianma: 'Pro2160902', supplierTypeValue: '1', weizhi: '观察', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19', deviceType: '1', ipAddress: '192.168.5.13' },
{ bianma: 'Pro2160903', supplierTypeValue: '2', weizhi: '后院', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-19', deviceType: '2', ipAddress: '192.168.5.14' },
{ bianma: 'Pro2160904', supplierTypeValue: '2', weizhi: '铁皮', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20', deviceType: '2', ipAddress: '192.168.5.15' },
{ bianma: 'Pro2160905', supplierTypeValue: '2', weizhi: '盲点', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-20', deviceType: '2', ipAddress: '192.168.5.16' },
{ bianma: 'Pro2160906', supplierTypeValue: '1', weizhi: '凉亭', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-21', deviceType: '1', ipAddress: '192.168.5.17' },
{ bianma: 'Pro2160907', supplierTypeValue: '1', weizhi: '书房', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '1', ipAddress: '192.168.5.18' },
{ bianma: 'Pro2160908', supplierTypeValue: '2', weizhi: '藏经阁', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '2', ipAddress: '192.168.5.19' },
{ bianma: 'Pro2160909', supplierTypeValue: '1', weizhi: '车库', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '1', ipAddress: '192.168.5.20' },
{ bianma: 'ZYR2060810', supplierTypeValue: '2', weizhi: '斜坡', time: '2023-02-26', anzhuangtime: '2023-02-26', gonghuashang: 'Pepsi Cola', owner: 'Owner Peer', policeTime: '2023-05-23', deviceType: '1', ipAddress: '192.168.5.21' },
],
listLoading: false,
listQuery: {
params: {
manufacturerName: '',
supplierType: '',
useOrgSid: '',
createOrgSid: '',
manufacturerTelePhone: '',
contactName: ''
},
current: 1,
size: 5,
total: 10
},
current: 1,
size: 5,
total: 0
},
supplierType_list: [],
rules: {}
}
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
created() {
//
// this.init()
},
methods: {
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
supplierType_list: [
{ title: '在线', id: '1' },
{ title: '离线', id: '2' },
],
deviceType_list: [
{ title: '普通设备', id: '1' },
{ title: '人脸设备', id: '2' },
],
rules: {}
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// this.listQuery = {
// params: {
// manufacturerName: '',
// supplierType: '',
// useOrgSid: '',
// createOrgSid: '',
// manufacturerTelePhone: '',
// contactName: ''
// },
// current: 1,
// size: 5
// }
created() {
//
// this.init()
},
//
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd(this.listQuery.params.createOrgSid)
},
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
}
}
},
getDeviceType(item) {
for (var i = 0; i < this.deviceType_list.length; i++) {
if (this.deviceType_list[i].id == item) {
return this.deviceType_list[i].title
}
}
},
resetState() {
this.viewState = 1
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
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
}
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
// init() {
// getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
// if (res.success) {
// this.listQuery.params.createOrgSid = res.data
// this.getType()
// this.getList()
// }
// })
// },
// getType() {
// typeValues({
// type: 'supplierType'
// }).then((res) => {
// if (res.code === '200') {
// this.supplierType_list = res.data
// console.log('', this.supplierType_list)
// }
// })
// },
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
// this.listLoading = true
// 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
// } else {
// this.list = []
// this.listQuery.total = 0
// }
// })
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
// 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) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
// ID
doDel() {
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids.toString()).then(resp => {
if (resp.success) {
loading.close()
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
} else {
loading.close()
}
}).catch(e => {
loading.close()
}
}).catch(e => {
loading.close()
})
}).catch(() => {
})
}).catch(() => {
})
} else {
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>
<style scoped>
</style>
</style>
Loading…
Cancel
Save