Browse Source

no message

yanjie 4 years ago
parent
commit
b01ee673f7

+ 17 - 0
mini/pages/data-center/index.js

xqd
@@ -144,6 +144,23 @@ Page({
         name: '雷达图',
         type: 'radar'
       }]
+    } else {
+      charts = [{
+        name: '柱状图',
+        type: 'bar'
+      }, {
+        name: '折线图',
+        type: 'line'
+      }, {
+        name: '雷达图',
+        type: 'radar'
+      }, {
+        name: '饼状图',
+        type: 'pie'
+      }, {
+        name: '明细图',
+        type: 'detail'
+      }]
     }
     project_names = project_names.join(',')
     this.setData({

+ 3 - 3
mini/pages/data/index.js

xqd xqd xqd
@@ -292,7 +292,7 @@ Page({
       }]
       option.grid = {
         left: 20,
-        right: 35,
+        right: 45,
         bottom: 60,
         top: 0,
         containLabel: true
@@ -347,7 +347,7 @@ Page({
       }]
       option.grid = {
         left: 20,
-        right: 35,
+        right: 45,
         bottom: 60,
         top: 0,
         containLabel: true
@@ -400,7 +400,7 @@ Page({
       }]
       option.grid = {
         left: 20,
-        right: 35,
+        right: 45,
         bottom: 60,
         top: 0,
         containLabel: true

+ 15 - 2
mini/pages/feedback/index.js

xqd xqd
@@ -31,8 +31,16 @@ Page({
       util.error('最多上传4张图片')
       return false
     }
-    file.path = ''
-    files.push(file)
+    if (Array.isArray(file)) {
+      if (file.length < 4) {
+        files = files.concat(file)
+      } else {
+        files = file
+      }
+    } else {
+      file.path = ''
+      files.push(file)
+    }
     this.setData({
       files
     })
@@ -108,6 +116,11 @@ Page({
       success: function (res) {
         if (res.code == 0) {
           util.success('操作成功')
+          setTimeout(()=>{
+            wx.navigateBack({
+              delta: 1,
+            })
+          },1000)
         } else {
           util.error('操作失败')
         }

+ 1 - 1
mini/pages/feedback/index.wxml

xqd
@@ -9,7 +9,7 @@
     <view class="sg-pad-tb sg-bottom-border">
       <view class="sg-pad-tb-sm">相关截图(选填)({{files.length ? files.length : 0}}/4)</view>
       <view class="sg-pad-tb-sm">
-        <van-uploader file-list="{{ files }}" max-count="4" bind:after-read="afterRead" bind:delete="delete"/>
+        <van-uploader file-list="{{ files }}" max-count="4" multiple="true" bind:after-read="afterRead" bind:delete="delete"/>
       </view>
     </view>
     <view class="sg-pad-tb sg-flex sg-align-center sg-space-between">

+ 0 - 1
mini/pages/filter-data/index.js

xqd
@@ -87,7 +87,6 @@ Page({
   onDropChange: function(e) {
     var index = e.currentTarget.dataset.index
     var name = e.currentTarget.dataset.name
-
     var val = e.detail
     var items = this.data[name]
     items[index] = val

+ 2 - 2
mini/pages/filter-data/index.wxml

xqd xqd
@@ -19,7 +19,7 @@
                   data-name="device_ids" data-index="{{index}}" />
               </van-dropdown-menu>
               <van-button icon="cross" type="danger" color="#1989fa" bindtap="delete" data-name="device_ids"
-                data-index="{{index}}" disabled="{{index == 0}}"></van-button>
+                data-index="{{index}}" ></van-button>
             </view>
           </view>
           <view class="sg-margin-tb">
@@ -36,7 +36,7 @@
               <van-dropdown-menu class="sg-flex-grow sg-margin-tb-sm sg-margin-right" active-color="#1989fa">
                 <van-dropdown-item value="{{ item }}" options="{{ names }}" bind:change="onDropChange"
                   data-name="device_name_ids" data-index="{{index}}"
-                  disabled="{{ device_ids.length > 1 ||device_ids[0]==''}}" />
+                  disabled="{{ device_ids.length > 1||device_ids[0]==''}}" />
               </van-dropdown-menu>
               <van-button icon="cross" color="#1989fa" type="danger" bindtap="delete" data-name="device_name_ids"
                 data-index="{{index}}" disabled="{{index == 0}}"></van-button>

+ 1 - 1
mini/pages/login/index.wxml

xqd
@@ -10,7 +10,7 @@
         </view>
         <view class="sg-form-item sg-bottom-border">
           <block wx:if="{{ type == 'mobile' }}">
-            <van-field left-icon="lock" value="{{ password }}" placeholder="请输入密码" bind:change="onChange" password="true"
+            <van-field left-icon="lock" value="{{ password }}" placeholder="请输入密码" type="number" bind:change="onChange" password="true"
             bind:change="updateValue" data-name="password" label-class="sg-label" />
           </block>
           <block wx:else>

+ 1 - 1
mini/utils/util.js

xqd
@@ -27,7 +27,7 @@ const formatNumber = n => {
 }
 
 const checkMobile = mobile => {
-  return /^1[234578]\d{9}$/.test(mobile)
+  return /^1[2345789]\d{9}$/.test(mobile)
 }
 
 const error = msg => {