|
@@ -45,7 +45,7 @@
|
|
|
<view class="processList deviceRegistList" style="height: calc(100vh - 470rpx);">
|
|
|
<checkbox-group @change="changeCheckbox">
|
|
|
<view class="cu-list menu-avatar ">
|
|
|
- <view class=" site-item text-center margin-top" v-if="!this.deviceManage.length&&this.deviceManage==1">暂无数据</view>
|
|
|
+ <view class=" site-item text-center margin-top" v-if="!this.deviceManage.length&&this.deviceManageRes==1">暂无数据</view>
|
|
|
<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
|
|
|
v-for="(item,index) in deviceManage" :key="index" :data-target="'move-box-' + index">
|
|
|
<view class="cu-form-group margin-top">
|
|
@@ -126,7 +126,7 @@
|
|
|
<!-- 分享区域 end-->
|
|
|
|
|
|
<!-- 导出弹框 -->
|
|
|
- <!-- <export-modal :modalName='modalName' @fatherHideModal="hideModal()"></export-modal> -->
|
|
|
+ <export-modal :modalName='modalName' @fSaveAsData="saveAsData()" @fatherHideModal="hideModal()"></export-modal>
|
|
|
<!-- 导出弹框 end -->
|
|
|
|
|
|
<!-- 删除弹框 -->
|
|
@@ -191,7 +191,6 @@
|
|
|
data() {
|
|
|
return {
|
|
|
deviceManage: 0,
|
|
|
-
|
|
|
json_fields: {
|
|
|
"单位编号": "company", //常规字段
|
|
|
"状态": "device_state",
|
|
@@ -209,8 +208,7 @@
|
|
|
checked: false
|
|
|
}],
|
|
|
|
|
|
- // deviceManage: json.deviceManage,
|
|
|
- siteListRes: 0,
|
|
|
+ deviceManageRes: 0,
|
|
|
|
|
|
type: '0',
|
|
|
siteListData: [],
|
|
@@ -251,13 +249,13 @@
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
- // document.addEventListener('click', (event) => {
|
|
|
- // if (event.target.className != 'showDetailEdit') {
|
|
|
- // this.deviceManage.forEach(item => {
|
|
|
- // item.isShow = false;
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
+ document.addEventListener('click', (event) => {
|
|
|
+ if (event.target.className != 'showDetailEdit') {
|
|
|
+ this.deviceManage.forEach(item => {
|
|
|
+ item.isShow = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
this.getDataList({
|
|
@@ -299,6 +297,9 @@
|
|
|
},
|
|
|
//导出弹框
|
|
|
showModal(e) {
|
|
|
+ console.log('e')
|
|
|
+ console.log(e)
|
|
|
+
|
|
|
var ua = window.navigator.userAgent.toLowerCase();
|
|
|
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
|
|
|
alert('点击右上角 ┇,选择默认浏览器进行导出操作')
|
|
@@ -306,10 +307,8 @@
|
|
|
if (this.checkedArr.length == 0) {
|
|
|
alert('请选择至少一条需要导出的数据')
|
|
|
} else {
|
|
|
-
|
|
|
this.modalName = e.currentTarget.dataset.target;
|
|
|
-
|
|
|
- this.getDataExport()
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -364,8 +363,16 @@
|
|
|
link.download = "设备注册管理数据表.xls";
|
|
|
link.click();
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+ //导出按钮另存为
|
|
|
+ saveAsData(e){
|
|
|
+ this.modalName = null
|
|
|
+ this.getDataExport();
|
|
|
+ },
|
|
|
|
|
|
//关闭弹框
|
|
|
+
|
|
|
hideModal(e) {
|
|
|
this.modalName = null
|
|
|
},
|