|
|
@ -8,36 +8,21 @@ |
|
|
|
<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-input v-model="listQuery.name" clearable placeholder="" class="addinputw"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="设备类型"> |
|
|
|
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择设备类型"> |
|
|
|
<el-select v-model="listQuery.type" filterable clearable placeholder="请选择设备类型"> |
|
|
|
<el-option v-for="item in supplierType_list" :key="item.id" :label="item.title" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="开始时间"> |
|
|
|
<el-date-picker v-model="listQuery.params.time1" type="date" placeholder="选择日期" |
|
|
|
<el-date-picker v-model="listQuery.startTIme" type="date" placeholder="选择日期" |
|
|
|
maxlength="20"></el-date-picker> |
|
|
|
|
|
|
|
<!-- <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="选择日期" |
|
|
|
<el-date-picker v-model="listQuery.endTime" 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> |
|
|
|
<el-form-item label="联系人"> |
|
|
|
<el-input v-model="listQuery.params.contactName" maxlength="125" placeholder="" class="addinputw" clearable/> |
|
|
|
</el-form-item> --> |
|
|
|
</el-form> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|
|
@ -56,30 +41,9 @@ |
|
|
|
@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" @click="handleCheck(row)">详情</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<!-- <el-table-column prop="jc" label="设备" width="220" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.bianma }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<!-- <el-table-column prop="jc" label="设备编码" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.bianma }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<!-- <el-table-column label="设备类型" width="110" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="报警时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.policeTime }}</span> |
|
|
|
<span>{{ scope.row.createTime }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备名称" width="" header-align="center" align="center"> |
|
|
@ -89,29 +53,9 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="设备位置" width="" header-align="center" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.weizhi }}</span> |
|
|
|
<span>{{ scope.row.position }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="出厂时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.time }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="安装时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.anzhuangtime }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="供货商" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.gonghuashang }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="生产厂家" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.owner }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column label="状态" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ getSupplierType(scope.row.supplierTypeValue) }}</span> |
|
|
@ -126,331 +70,281 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <baojingchaxunAdd v-show="viewState == 2" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/> |
|
|
|
<baojingchaxunInfo 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 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 { getCallPolicePage } from '@/api/callPolice/callPolice' |
|
|
|
|
|
|
|
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: '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 |
|
|
|
}, |
|
|
|
supplierType_list: [ |
|
|
|
{ title: '入侵报警', id: '1' }, |
|
|
|
{ title: '电子围栏', id: '2' }, |
|
|
|
{ title: '门禁报警', id: '3' }, |
|
|
|
{ title: '监控报警', id: '4' }, |
|
|
|
{ title: '设备离线', id: '5' }, |
|
|
|
], |
|
|
|
rules: {} |
|
|
|
export default { |
|
|
|
name: 'baojingchaxunList', |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
ButtonBar, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
btndisabled: false, |
|
|
|
btnList: [ |
|
|
|
{ |
|
|
|
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: { |
|
|
|
current: 1, |
|
|
|
size: 5, |
|
|
|
total: 10 |
|
|
|
}, |
|
|
|
supplierType_list: [ |
|
|
|
{ title: '入侵报警', id: '1' }, |
|
|
|
{ title: '电子围栏', id: '2' }, |
|
|
|
{ title: '门禁报警', id: '3' }, |
|
|
|
{ title: '监控报警', id: '4' }, |
|
|
|
{ title: '设备离线', id: '5' }, |
|
|
|
], |
|
|
|
rules: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 初始化变量 |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getSupplierType(item) { |
|
|
|
for (var i = 0; i < this.supplierType_list.length; i++) { |
|
|
|
if (this.supplierType_list[i].id == item) { |
|
|
|
return this.supplierType_list[i].title |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// 初始化变量 |
|
|
|
// this.init() |
|
|
|
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 |
|
|
|
} |
|
|
|
}, |
|
|
|
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 = '隐藏查询条件' |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
init() { |
|
|
|
getCallPolicePage(this.listQuery).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
// this.list = res.data.records |
|
|
|
this.total = res.total |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
// this.list = [] |
|
|
|
} |
|
|
|
}, |
|
|
|
// 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) |
|
|
|
}, |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 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 { |
|
|
|
loading.close() |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
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() |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
loading.close() |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
} 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) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} 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) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
</style> |
|
|
|
<style scoped></style> |