Przeglądaj źródła

chore(shuifeizs): 清理本地静态资源并改用CDN链接

1. 删除所有本地assets图片资源文件
2. 将页面和组件内的本地图片引用替换为外部CDN链接
3. 修复设备详情页跳转传参缺失的问题
4. 调整图片查看页面的布局偏移量
5. 优化开关组件的绑定逻辑修复双向同步问题
allen 2 dni temu
rodzic
commit
7745c1b1e8
43 zmienionych plików z 59 dodań i 65 usunięć
  1. BIN
      pages/cb/shuifeizs/assets/autoBtn.png
  2. BIN
      pages/cb/shuifeizs/assets/backwashControl.png
  3. BIN
      pages/cb/shuifeizs/assets/basicSetting.png
  4. BIN
      pages/cb/shuifeizs/assets/beijing.png
  5. BIN
      pages/cb/shuifeizs/assets/borderBottomGray.png
  6. BIN
      pages/cb/shuifeizs/assets/borderRadius.png
  7. BIN
      pages/cb/shuifeizs/assets/bucket.png
  8. BIN
      pages/cb/shuifeizs/assets/bucketClose.png
  9. BIN
      pages/cb/shuifeizs/assets/bucketClose1.png
  10. BIN
      pages/cb/shuifeizs/assets/bucketCloseTop.png
  11. BIN
      pages/cb/shuifeizs/assets/bucketOpen.png
  12. BIN
      pages/cb/shuifeizs/assets/bucketOpen1.png
  13. BIN
      pages/cb/shuifeizs/assets/bucketOpenTop.png
  14. BIN
      pages/cb/shuifeizs/assets/controlbg.png
  15. BIN
      pages/cb/shuifeizs/assets/fan.png
  16. BIN
      pages/cb/shuifeizs/assets/fanRun.png
  17. BIN
      pages/cb/shuifeizs/assets/fertTopBottom.png
  18. BIN
      pages/cb/shuifeizs/assets/fertTopBottomRadius.png
  19. BIN
      pages/cb/shuifeizs/assets/fertilizationFormula.png
  20. BIN
      pages/cb/shuifeizs/assets/fertilizationValve.png
  21. BIN
      pages/cb/shuifeizs/assets/lastBorder.png
  22. BIN
      pages/cb/shuifeizs/assets/line.png
  23. BIN
      pages/cb/shuifeizs/assets/lineTopAndBottom.png
  24. BIN
      pages/cb/shuifeizs/assets/lineTopBottom.png
  25. BIN
      pages/cb/shuifeizs/assets/manualControl.png
  26. BIN
      pages/cb/shuifeizs/assets/masterStop.png
  27. BIN
      pages/cb/shuifeizs/assets/operatingRecord.png
  28. BIN
      pages/cb/shuifeizs/assets/rotate.png
  29. BIN
      pages/cb/shuifeizs/assets/solenoidValve.png
  30. BIN
      pages/cb/shuifeizs/assets/stir.png
  31. BIN
      pages/cb/shuifeizs/assets/timing.png
  32. BIN
      pages/cb/shuifeizs/assets/water.png
  33. BIN
      pages/cb/shuifeizs/assets/wheelIrrigation.png
  34. 12 24
      pages/cb/shuifeizs/components/facilitystate.vue
  35. 2 4
      pages/cb/shuifeizs/components/irrigatedArea.vue
  36. 1 2
      pages/cb/shuifeizs/components/rotationBottom.vue
  37. 3 6
      pages/cb/shuifeizs/control.vue
  38. 0 1
      pages/cb/shuifeizs/history.vue
  39. 3 7
      pages/cb/shuifeizs/rotationflow.vue
  40. 9 17
      pages/cb/shuifeizs/shuifeizs.vue
  41. 2 2
      pages/cb/sy/imgList.vue
  42. 1 1
      pages/cbd/detail.vue
  43. 26 1
      pages/cbd/deviceControl.vue

BIN
pages/cb/shuifeizs/assets/autoBtn.png


BIN
pages/cb/shuifeizs/assets/backwashControl.png


BIN
pages/cb/shuifeizs/assets/basicSetting.png


BIN
pages/cb/shuifeizs/assets/beijing.png


BIN
pages/cb/shuifeizs/assets/borderBottomGray.png


BIN
pages/cb/shuifeizs/assets/borderRadius.png


BIN
pages/cb/shuifeizs/assets/bucket.png


BIN
pages/cb/shuifeizs/assets/bucketClose.png


BIN
pages/cb/shuifeizs/assets/bucketClose1.png


BIN
pages/cb/shuifeizs/assets/bucketCloseTop.png


BIN
pages/cb/shuifeizs/assets/bucketOpen.png


BIN
pages/cb/shuifeizs/assets/bucketOpen1.png


BIN
pages/cb/shuifeizs/assets/bucketOpenTop.png


BIN
pages/cb/shuifeizs/assets/controlbg.png


BIN
pages/cb/shuifeizs/assets/fan.png


BIN
pages/cb/shuifeizs/assets/fanRun.png


BIN
pages/cb/shuifeizs/assets/fertTopBottom.png


BIN
pages/cb/shuifeizs/assets/fertTopBottomRadius.png


BIN
pages/cb/shuifeizs/assets/fertilizationFormula.png


BIN
pages/cb/shuifeizs/assets/fertilizationValve.png


BIN
pages/cb/shuifeizs/assets/lastBorder.png


BIN
pages/cb/shuifeizs/assets/line.png


BIN
pages/cb/shuifeizs/assets/lineTopAndBottom.png


BIN
pages/cb/shuifeizs/assets/lineTopBottom.png


BIN
pages/cb/shuifeizs/assets/manualControl.png


BIN
pages/cb/shuifeizs/assets/masterStop.png


BIN
pages/cb/shuifeizs/assets/operatingRecord.png


BIN
pages/cb/shuifeizs/assets/rotate.png


BIN
pages/cb/shuifeizs/assets/solenoidValve.png


BIN
pages/cb/shuifeizs/assets/stir.png


BIN
pages/cb/shuifeizs/assets/timing.png


BIN
pages/cb/shuifeizs/assets/water.png


BIN
pages/cb/shuifeizs/assets/wheelIrrigation.png


+ 12 - 24
pages/cb/shuifeizs/components/facilitystate.vue

@@ -47,24 +47,12 @@
           </view>
         </view>
       </view>
-      </view>
-      <irrigatedArea :irrigatedAreaList="irrigatedAreaList"/>
     </view>
+    <irrigatedArea :irrigatedAreaList="irrigatedAreaList"/>
   </view>
 </template>
 <script>
-import fertTopBottom from '../assets/fertTopBottom.png';
-import lineTopAndBottom from '../assets/lineTopAndBottom.png';
-import lineTopBottom from '../assets/lineTopBottom.png';
-import fertTopBottomRadius from '../assets/fertTopBottomRadius.png';
-import lastBorder from '../assets/lastBorder.png';
 import irrigatedArea from './irrigatedArea.vue';
-import fan from '../assets/fan.png';
-import fanRun from '../assets/fanRun.png';
-import bucketOpenTop from '../assets/bucketOpenTop.png';
-import bucketCloseTop from '../assets/bucketCloseTop.png';
-import bucketClose from '../assets/bucketClose.png';
-import bucketOpen from '../assets/bucketOpen.png';
 
 export default {
   props:{
@@ -90,19 +78,19 @@ export default {
   },
   data() {
     return {
-      fan,
-      fanRun,
-      lastBorder,
-      lineTopBottom,
-      fertTopBottom,
-      lineTopAndBottom,
-      bucketOpenTop,
+      fan:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/fan.png',
+      fanRun:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/fanRun.png',
+      lastBorder:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/lastBorder.png',
+      lineTopBottom:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/lineTopBottom.png',
+      fertTopBottom:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/fertTopBottom.png',
+      lineTopAndBottom:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/lineTopAndBottom.png',
+      bucketOpenTop:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketOpenTop.png',
       bucketOpenTopStatus:false,
       bucketOpenTopStatus2:false,
-      bucketCloseTop,
-      bucketClose,
-      bucketOpen,
-      fertTopBottomRadius,
+      bucketCloseTop:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketCloseTop.png',
+      bucketClose:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketClose.png',
+      bucketOpen:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketOpen.png',
+      fertTopBottomRadius:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/fertTopBottomRadius.png',
     };
   },
   methods:{

+ 2 - 4
pages/cb/shuifeizs/components/irrigatedArea.vue

@@ -34,8 +34,6 @@
   </view>
 </template>
 <script>
-import bucketOpen1 from '../assets/bucketOpen1.png';
-import bucketClose1 from '../assets/bucketClose1.png';
 export default {
   props: {
     irrigatedAreaList: {
@@ -45,8 +43,8 @@ export default {
   },
   data() {
     return {
-      bucketOpen1,
-      bucketClose1,
+      bucketOpen1:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketOpen1.png',
+      bucketClose1:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/bucketClose1.png',
     };
   },
   methods: {

+ 1 - 2
pages/cb/shuifeizs/components/rotationBottom.vue

@@ -46,7 +46,6 @@
 </template>
 <script>
 import rotationCard from './rotationCard.vue';
-import borderBottomGray from '../assets/borderBottomGray.png';
 export default {
   name: 'rotationBottom',
   props: {
@@ -66,7 +65,7 @@ export default {
   data() {
     return {
       listData: [],
-      borderBottomGray,
+      borderBottomGray:'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/borderBottomGray.png',
       currentIndex: 0,
       currentItem: {},
       activeMenuId: '',

+ 3 - 6
pages/cb/shuifeizs/control.vue

@@ -57,9 +57,6 @@
   </view>
 </template>
 <script>
-import solenoidValve from './assets/solenoidValve.png';
-import stir from './assets/stir.png';
-import borderRadius from './assets/borderRadius.png';
 
 export default {
   name: 'control',
@@ -67,9 +64,9 @@ export default {
     return {
       activeIndex: 0,
       value: false,
-      solenoidValve,
-      stir,
-      borderRadius,
+      solenoidValve: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/solenoidValve.png',
+      stir: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/stir.png',
+      borderRadius: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/borderRadius.png',
       title: '控制面板',
       leftList: [],
       deviceList: [],

+ 0 - 1
pages/cb/shuifeizs/history.vue

@@ -79,7 +79,6 @@
   </view>
 </template>
 <script>
-import solenoidValve from './assets/solenoidValve.png';
 export default {
   name: 'actionHistory',
   data() {

+ 3 - 7
pages/cb/shuifeizs/rotationflow.vue

@@ -106,18 +106,14 @@
   </view>
 </template>
 <script>
-import rotate from './assets/rotate.png';
-import water from './assets/water.png';
-import autoBtn from './assets/autoBtn.png';
-import json from './test.js';
 
 export default {
   name: 'rotationflow',
   data() {
     return {
-      rotate,
-      water,
-      autoBtn,
+      rotate: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/rotate.png',
+      water: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/water.png',
+      autoBtn: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/autoBtn.png',
       time: '-',
       list: [],
       timer: null,

+ 9 - 17
pages/cb/shuifeizs/shuifeizs.vue

@@ -32,21 +32,13 @@
 </template>
 
 <script>
-import manualControl from './assets/manualControl.png';
-import wheelIrrigation from './assets/wheelIrrigation.png';
-import timing from './assets/timing.png';
-import masterStop from './assets/masterStop.png';
-import fertilizationFormula from './assets/fertilizationFormula.png';
-import backwashControl from './assets/backwashControl.png';
-import basicSetting from './assets/basicSetting.png';
-import operatingRecord from './assets/operatingRecord.png';
 import Base from './components/base.vue';
 import facilitystate from './components/facilitystate.vue';
 export default {
   data() {
     return {
       title: '水肥一体机',
-      manualControl,
+      manualControl: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/manualControl.png',
       devBid: '',
       devName: '',
       devStatus: '1',
@@ -55,42 +47,42 @@ export default {
       alreadyfertilizerBucketList: [],
       deviceList: [
         {
-          icon: manualControl,
+          icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/manualControl.png',
           title: '手动控制',
           url: '/pages/cb/shuifeizs/control',
         },
         {
-          icon: wheelIrrigation,
+          icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/wheelIrrigation.png',
           title: '自动控制',
           url: '',
         },
         {
-          icon: operatingRecord,
+          icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/operatingRecord.png',
           title: '操作记录',
           url: '/pages/cb/shuifeizs/history',
         },
         // {
-        //   icon: timing,
+        //   icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/timing.png',
         //   title: '定时计划',
         //   url: '',
         // },
         // {
-        //   icon: masterStop,
+        //   icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/masterStop.png',
         //   title: '总停',
         //   url: '',
         // },
         // {
-        //   icon: fertilizationFormula,
+        //   icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/fertilizationFormula.png',
         //   title: '施肥配方',
         //   url: '',
         // },
         // {
-        //   icon: backwashControl,
+        //   icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/backwashControl.png',
         //   title: '反冲洗控制',
         //   url: '',
         // },
         // {
-        //   icon: basicSetting,
+        //   icon: 'https://s3.hnyfwlw.com/webstaticimg/bigdata_app/deviceIcons/shuifei/basicSetting.png',
         //   title: '基础设置',
         //   url: '',
         // },

+ 2 - 2
pages/cb/sy/imgList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="status_bar"></view>
-		<view class="" style="position: relative;top: 44px;">
+		<view class="" style="position: relative;top: 74px;">
 			<view style="position: fixed;z-index: 100;">
 				<uni-nav-bar @clickLeft="clickLeft" left-icon="back" title="查看图片" rightIcon="camera"
 					@clickRight="clickRight"></uni-nav-bar>
@@ -188,7 +188,7 @@
 	.selecttimes {
 		width: 100%;
 		position: fixed;
-		top: 85px;
+		top: 110px;
 		left: 0;
 		z-index: 100;
 		background-color: #fff;

+ 1 - 1
pages/cbd/detail.vue

@@ -288,7 +288,7 @@ export default {
     },
     handleSettingClick(){
       uni.navigateTo({
-        url: '/pages/cbd/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id,
+        url: '/pages/cbd/deviceControl?deviceId=' + this.deviceInfo.id + '&d_id=' + this.deviceInfo.d_id + '&device_model=' + this.deviceInfo.device_model,
       });
     },
     closeOperationHandler(){

+ 26 - 1
pages/cbd/deviceControl.vue

@@ -50,8 +50,25 @@
       <view class="device-detail-content" style="padding-bottom: 50rpx" v-if="activeTab === 'viewImage'">
         <view class="device-detail-viewImage">
           <text class="device-detail-label">设备开关:</text>
-          <u-switch v-model="equipContrlForm.ds" size="40" active-color="#0BBC58" active-value="1" inactive-value="0"></u-switch>
+          <u-switch :value="equipContrlForm.ds == '1'" @input="setDs" size="40" active-color="#0BBC58"></u-switch>
         </view>
+        <!-- <view class="device-detail-viewImage">
+          <text class="device-detail-label">拍照像素设置:</text>
+        </view>
+        <u-radio-group v-model="equipContrlForm.xssz" @change="radioGroupChange" active-color="#0BBC58">
+          <u-radio 
+            :name="1"
+          >高
+          </u-radio>
+          <u-radio 
+            :name="2"
+          >中
+          </u-radio>
+          <u-radio 
+            :name="3"
+          >低
+          </u-radio>
+        </u-radio-group> -->
         <view class="device-detail-viewImage">
           <text class="device-detail-label">定时模式</text>
         </view>
@@ -259,6 +276,7 @@ export default {
       value: 10,
       imageList: [],
       equipContrlForm: {},
+      device_model: '',
       time: '',
       activeTab: 'pestAnalysis',
       title: '设置控制',
@@ -272,6 +290,7 @@ export default {
   },
   onLoad(options){
     this.d_id = options.d_id
+    this.device_model = options.device_model || ''
     this.getControlDeviceConfigInfo()
     uni.getStorage({
       key:"myuser_type",
@@ -321,6 +340,11 @@ export default {
       const value = Math.round(min + ratio * (max - min))
       this.$set(this.equipContrlForm, field, value)
     },
+    // u-switch 的 v-model 只会写入布尔值(active-value/inactive-value 仅作用于 change 事件),
+    // 这里手动映射回后端约定的 '1'/'0' 字符串
+    setDs(val) {
+      this.$set(this.equipContrlForm, 'ds', val ? '1' : '0')
+    },
     handleBack() {
       uni.navigateBack({
         delta: 1
@@ -388,6 +412,7 @@ export default {
         method: 'POST',
         data: {
           device_type_id: 3,
+          device_model: this.device_model,
           d_id: this.d_id,
           config: JSON.stringify(newForm)
         }