This commit is contained in:
Iruka 2025-02-13 15:00:07 +08:00
parent 9674d3aa40
commit 53b6036452
4 changed files with 63 additions and 25 deletions

View File

@ -59,14 +59,10 @@
* @param data
*/
async show(row) {
console.error("row", row);
this.open = true;
if (row?.deviceTypeId == 1) {
this.type = "station";
this.title = `设备曲线【${row.deviceCode}`;
} else {
this.type = "valve";
this.title = `设备曲线【${row.showName}`;
}
this.type = row._type;
this.title = `设备曲线【${row._showName}`;
this.item = row;
this.getList(0);
},
@ -96,14 +92,17 @@
type: this.type,
data: res.rows || []
};
}).catch(error => {
uni.hideLoading()
plugin.modal.showToast(error)
})
} else if (this.type == "valve") {
let queryParams = {
pageNum: 1,
pageSize: 9999,
landId: this.item.landId,
wogId: this.item.landGroupId,
woId: this.item.id,
wogId: this.item.wogId,
woId: this.item.woId,
reportType: "device_thing",
params: {
beginTime: this.getNowFormatDate(day),
@ -116,6 +115,9 @@
type: this.type,
data: res.rows || []
};
}).catch(error => {
uni.hideLoading()
plugin.modal.showToast(error)
})
}

View File

@ -131,8 +131,9 @@
</u-row>
</view>
<view class="control" v-if="dc.dataObj[pop.item.dataKey]">
<view class="icon iconfont icon-tubiao" @click="openDialog('chart',pop.item)" />
<u-row v-if="pop.item.device.deviceTypeKey == 'station'">
<image :src="valveImg.jz" mode="widthFix" />
<image :src="valveImg.jz_select" mode="widthFix" />
</u-row>
<u-row v-else-if="pop.item.device.deviceTypeKey == 'valve'">
<u-col span="3">
@ -454,6 +455,8 @@
<custom-angle-slider ref="refAngleSlider" mode="bottom" @close="openPopup" @confirm="swiperConfirm" />
<!-- ADC -->
<custom-index-adc ref="adcRef" @close="openPopup" />
<!--曲线 -->
<custom-index-chart ref="adcChartRef" />
<!-- 墒情 -->
<custom-index-mp ref="mpRef" />
</template>
@ -841,18 +844,33 @@
//
async openDialog(key, row = null) {
switch (key) {
// case "chart": //线
// this.$refs.adcChartRef.show(row);
// break;
// case "wo":
// this.$refs.woRemarkRef.show(row);
// break;
// case "wh": //
// this.$refs.wateringHistoryRef.show(this.land, row);
// break;
// case "log": //
// this.$refs.deviceLogRef.show(this.land, row);
// break;
case "chart": //线
if (row.type == "jz") {
this.$refs.adcChartRef.show({
_type: "station",
_showName: row.showName,
deviceId: row.device.deviceId,
deviceCode: row.device.deviceCode,
});
} else {
this.$refs.adcChartRef.show({
_type: "valve",
_showName: row.showName,
landId: row.logParams.landId,
wogId: row.logParams.wogId,
woId: row.logParams.woId,
});
}
break;
// case "wo":
// this.$refs.woRemarkRef.show(row);
// break;
// case "wh": //
// this.$refs.wateringHistoryRef.show(this.land, row);
// break;
// case "log": //
// this.$refs.deviceLogRef.show(this.land, row);
// break;
case "mp": //
this.$refs.mpRef.show(this.land);
break;

View File

@ -113,7 +113,7 @@
:disabled="refreshAllDisabled" />
</view>
<view @click.stop="batchControl" style="margin-left: 5px;"
v-hasPermi="['device:control']">
v-hasPermi="['irrigate:irrigateScenario:batchControl']">
<u-button type="success" size="small" text="批量控制" />
</view>
</view>
@ -544,7 +544,7 @@
<custom-angle-slider ref="refAngleSlider" mode="bottom" @close="" @confirm="swiperConfirm" />
<!-- ADC -->
<custom-index-adc ref="adcRef" />
<!-- ADC -->
<!--曲线 -->
<custom-index-chart ref="adcChartRef" />
<!-- 墒情 -->
<custom-index-mp ref="mpRef" />
@ -687,7 +687,22 @@
async openDialog(key, row = null) {
switch (key) {
case "chart": //线
this.$refs.adcChartRef.show(row);
if (row?.deviceTypeId == 1) {
this.$refs.adcChartRef.show({
_type: "station",
_showName: row.deviceCode,
deviceId: row.deviceId,
deviceCode: row.deviceCode,
});
} else {
this.$refs.adcChartRef.show({
_type: "valve",
_showName: row.showName,
landId: row.landId,
wogId: row.landGroupId,
woId: row.id,
});
}
break;
// case "wo":
// this.$refs.woRemarkRef.show(row);

View File

@ -10,6 +10,8 @@ import scd from '@/static/images/map/scd.png' //杀虫灯
import sq from '@/static/images/map/sq.png' //墒情
import csk from '@/static/images/map/csk.png' //出水口
import jz_select from '@/static/images/valves/jz.png' //基站
import df from '@/static/images/map/map-df.png'
import df_select from '@/static/images/map/map-df-select.png'
import valve_df_close from '@/static/images/valves/df/valve_df_close.png'
@ -55,6 +57,7 @@ export {
scd,
sq,
csk,
jz_select,
df,
df_select,
valve_df_close,