|
@@ -51,8 +51,8 @@
|
|
|
<view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''"
|
|
|
v-for="(item,index) in newDeviceManage" :key="index" :data-target="'move-box-' + index">
|
|
|
<view class="cu-form-group margin-top">
|
|
|
- <checkbox :value="String(item.id)" :checked="checkedArr.includes(String(item.id))"
|
|
|
- :class="{'checked':checkedArr.includes(String(item.id))}"></checkbox>
|
|
|
+ <checkbox :value="String(item.owner_code)" :checked="checkedArr.includes(String(item.owner_code))"
|
|
|
+ :class="{'checked':checkedArr.includes(String(item.owner_code))}"></checkbox>
|
|
|
</view>
|
|
|
<view class="cu-avatar round lg">
|
|
|
<image class="image-bg" src="/static/device-icon.png" />
|
|
@@ -102,9 +102,15 @@
|
|
|
</view>
|
|
|
<view class="share-item text-center">
|
|
|
<view><text class="icon iconfont margin-xs" style="color:#FF642E"></text></view>
|
|
|
- <view @tap="showModal" data-target="DialogModal">
|
|
|
+ <!-- <view @tap="showModal" data-target="DialogModal">
|
|
|
+ 导出
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view @tap="exportButton()" data-target="DialogModal">
|
|
|
导出
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
<view class="checkAll" style="display:inline-block">
|
|
|
<checkbox-group @change="allChoose" v-if="deviceManage.length">
|
|
@@ -183,6 +189,8 @@
|
|
|
return {
|
|
|
dwtype: 0,
|
|
|
transmission_mode: 0,
|
|
|
+ dwtype1: 0,
|
|
|
+ transmission_mode1: 0,
|
|
|
|
|
|
deviceManage: [],
|
|
|
deviceManageRes: 0,
|
|
@@ -236,10 +244,52 @@
|
|
|
this.getDataList({
|
|
|
'company_code': uni.getStorageSync('selectedCode')
|
|
|
})
|
|
|
-
|
|
|
- // document.querySelector('.uni-page-head-bd .uni-page-head__title').style.userSelect='none';
|
|
|
- },
|
|
|
+ },
|
|
|
methods: {
|
|
|
+
|
|
|
+ exportButton() {
|
|
|
+ if (this.checkedArr.length == 0) {
|
|
|
+ uni.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '请选择至少一条需要导出的数据'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let aa;
|
|
|
+ let bb;
|
|
|
+ if(this.allChecked==true){
|
|
|
+ alert('全选');
|
|
|
+ aa='status';
|
|
|
+ bb=1
|
|
|
+ }else{
|
|
|
+ alert('非全选')
|
|
|
+ aa='device_code_list';
|
|
|
+ bb=this.checkedArr.join(",")
|
|
|
+ alert(bb)
|
|
|
+ }
|
|
|
+
|
|
|
+ let exportUrl = this.$BASE_URL+
|
|
|
+ `ExportModule/getDeviceConfigListExpor/transmission_mode/${this.transmission_mode1}/${aa}/${bb}/dwtype/${this.dwtype1}/company_code/${uni.getStorageSync('selectedCode')}/`
|
|
|
+ alert(exportUrl)
|
|
|
+
|
|
|
+ var ua = window.navigator.userAgent.toLowerCase();
|
|
|
+ if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
|
|
+ uni.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content: '如需下载,请在默认浏览器中操作',
|
|
|
+ success: function(res) {
|
|
|
+ window.location.href = exportUrl;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ window.location.href = exportUrl;
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
//筛选请求
|
|
|
searchList() {
|
|
@@ -248,6 +298,8 @@
|
|
|
"dwtype": this.dwtype,
|
|
|
'company_code': uni.getStorageSync('selectedCode')
|
|
|
})
|
|
|
+ this.transmission_mode1=this.transmission_mode;
|
|
|
+ this.dwtype1=this.dwtype;
|
|
|
},
|
|
|
|
|
|
// 列表数据请求
|
|
@@ -295,22 +347,6 @@
|
|
|
//导出弹框
|
|
|
showModal(e) {
|
|
|
var ua = window.navigator.userAgent.toLowerCase();
|
|
|
- // if(ua.match(/MicroMessenger/i) == 'micromessenger'){
|
|
|
- // uni.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content: '点击右上角 ┇,选择默认浏览器进行导出操作'
|
|
|
- // });
|
|
|
- // }else{
|
|
|
- // if (this.checkedArr.length == 0) {
|
|
|
- // uni.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content: '请选择至少一条需要导出的数据'
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.modalName = e.currentTarget.dataset.target;
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
if (this.checkedArr.length == 0) {
|
|
|
uni.showModal({
|
|
|
showCancel: false,
|
|
@@ -417,7 +453,9 @@
|
|
|
|
|
|
// 多选复选框改变事件
|
|
|
changeCheckbox(e) {
|
|
|
+ console.log(e.detail.value)
|
|
|
this.checkedArr = e.detail.value;
|
|
|
+
|
|
|
// 如果选择的数组中有值,并且长度等于列表的长度,就是全选
|
|
|
if (this.checkedArr.length > 0 && this.checkedArr.length == this.newDeviceManage.length) {
|
|
|
this.allChecked = true;
|
|
@@ -450,42 +488,6 @@
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
-
|
|
|
-
|
|
|
- page {
|
|
|
- -moz-user-select: none;
|
|
|
- /*火狐*/
|
|
|
- -webkit-user-select: none;
|
|
|
- /*webkit浏览器*/
|
|
|
- -ms-user-select: none;
|
|
|
- /*IE10*/
|
|
|
- -khtml-user-select: none;
|
|
|
- /*早期浏览器*/
|
|
|
- user-select: none;
|
|
|
- }
|
|
|
-
|
|
|
- /* user-select有2个值(none表示不能选中文本,text表示可以选择文本) */
|
|
|
-
|
|
|
-
|
|
|
- * {
|
|
|
- -webkit-touch-callout: none;
|
|
|
- -webkit-user-select: none;
|
|
|
- -khtml-user-select: none;
|
|
|
- -moz-user-select: none;
|
|
|
- -ms-user-select: none;
|
|
|
- user-select: none;
|
|
|
- }
|
|
|
-
|
|
|
- input {
|
|
|
- -webkit-touch-callout: initial !important;
|
|
|
- -webkit-user-select: initial !important;
|
|
|
- -khtml-user-select: initial !important;
|
|
|
- -moz-user-select: initial !important;
|
|
|
- -ms-user-select: initial !important;
|
|
|
- user-select: initial !important;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
|
|
|
.showDetailEdit {
|
|
|
position: absolute;
|