|
@@ -8,7 +8,6 @@
|
|
|
}}</el-option>
|
|
|
</el-select>
|
|
|
<el-cascader
|
|
|
-
|
|
|
v-model="productIds"
|
|
|
:options="productOptions"
|
|
|
:props="defaultProps"
|
|
@@ -18,9 +17,25 @@
|
|
|
>
|
|
|
</el-cascader>
|
|
|
<el-button type="primary" placeholder="状态" class="search-btn" @click="mixins_search" icon="el-icon-search">查询 </el-button>
|
|
|
+
|
|
|
<div class="search-icon">
|
|
|
- <i class="iconfont" @click="deluserbyidFn()" v-txt-tip data-txt="删除"></i>
|
|
|
- <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增"></i>
|
|
|
+ <el-tooltip class="item" effect="light" placement="bottom" content="删除">
|
|
|
+ <i class="iconfont" @click="deluserbyidFn()"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-dropdown type="primary" @command="addCommand">
|
|
|
+ <span class="iconfont"></span>
|
|
|
+ <el-dropdown-menu slot="dropdown" hide-on-click="false" class="device-search-dropdown">
|
|
|
+ <el-dropdown-item command="add">单个添加</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="batchAdd">
|
|
|
+ <div class="upload_div">
|
|
|
+ <xk-upload class="upload_class" @callback="mixins_search" :params="{ importType: 'DEVICE' }">
|
|
|
+ <span class="upload_text" slot="content">批量添加</span>
|
|
|
+ </xk-upload>
|
|
|
+ </div>
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item command="template">下载模板</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="roles-wrap">
|
|
@@ -34,7 +49,7 @@
|
|
|
@selection-change="selectionChange"
|
|
|
>
|
|
|
<template slot="deviceQrcode">
|
|
|
- <i class="zoniot_font zoniot-icon-erweimachakan" style="cursor: inherit;"></i>
|
|
|
+ <i class="zoniot_font zoniot-icon-erweimachakan" style="cursor: inherit"></i>
|
|
|
</template>
|
|
|
<template slot-scope="scope" slot="opt">
|
|
|
<div class="opt">
|
|
@@ -100,7 +115,7 @@ export default {
|
|
|
],
|
|
|
cols: [
|
|
|
{
|
|
|
- label: '所属小区',
|
|
|
+ label: '所属社区',
|
|
|
prop: 'communityId',
|
|
|
format(val) {
|
|
|
let va = '';
|
|
@@ -229,15 +244,17 @@ export default {
|
|
|
Scrap(id) {
|
|
|
this.$msgBox(`确认提示`, '设备报废后将无法正常接收数据,请问是否继续?')
|
|
|
.then(() => {
|
|
|
- this.$http.post('/sc-community/device/deviceScrapInterface', { id: id, deviceStatus: 5 }).then(({ status, data, msg }) => {
|
|
|
- if (0 === status) {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '报废成功!'
|
|
|
- });
|
|
|
- this.mixins_search();
|
|
|
- }
|
|
|
- });
|
|
|
+ this.$http
|
|
|
+ .post('/sc-community/device/deviceScrapInterface', { id: id, deviceStatus: 5 })
|
|
|
+ .then(({ status, data, msg }) => {
|
|
|
+ if (0 === status) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '报废成功!'
|
|
|
+ });
|
|
|
+ this.mixins_search();
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
@@ -262,9 +279,7 @@ export default {
|
|
|
addOrEdit(todo, data = {}) {
|
|
|
new Promise((resolve) => {
|
|
|
let title = '添加设备';
|
|
|
- if (todo == 'add') {
|
|
|
- // title = this.mixins_query.alarmCategory == '2' ? '添加离线规则' : '添加告警';
|
|
|
- } else {
|
|
|
+ if (todo !== 'add') {
|
|
|
title = '修改设备';
|
|
|
}
|
|
|
this.$store.dispatch('addPopup', {
|
|
@@ -283,6 +298,15 @@ export default {
|
|
|
this.mixins_search();
|
|
|
});
|
|
|
},
|
|
|
+ addCommand(command) {
|
|
|
+ if (command === 'add') {
|
|
|
+ this.addOrEdit('add');
|
|
|
+ }
|
|
|
+ if (command === 'template') {
|
|
|
+ this.__exportExcel('/sc-community/excel/download/template', { importType: 'DEVICE' });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ },
|
|
|
selectionChange(val) {
|
|
|
this.selectRow = val;
|
|
|
},
|