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

View File

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

View File

@ -113,7 +113,7 @@
:disabled="refreshAllDisabled" /> :disabled="refreshAllDisabled" />
</view> </view>
<view @click.stop="batchControl" style="margin-left: 5px;" <view @click.stop="batchControl" style="margin-left: 5px;"
v-hasPermi="['device:control']"> v-hasPermi="['irrigate:irrigateScenario:batchControl']">
<u-button type="success" size="small" text="批量控制" /> <u-button type="success" size="small" text="批量控制" />
</view> </view>
</view> </view>
@ -544,7 +544,7 @@
<custom-angle-slider ref="refAngleSlider" mode="bottom" @close="" @confirm="swiperConfirm" /> <custom-angle-slider ref="refAngleSlider" mode="bottom" @close="" @confirm="swiperConfirm" />
<!-- ADC --> <!-- ADC -->
<custom-index-adc ref="adcRef" /> <custom-index-adc ref="adcRef" />
<!-- ADC --> <!--曲线 -->
<custom-index-chart ref="adcChartRef" /> <custom-index-chart ref="adcChartRef" />
<!-- 墒情 --> <!-- 墒情 -->
<custom-index-mp ref="mpRef" /> <custom-index-mp ref="mpRef" />
@ -687,7 +687,22 @@
async openDialog(key, row = null) { async openDialog(key, row = null) {
switch (key) { switch (key) {
case "chart": //线 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; break;
// case "wo": // case "wo":
// this.$refs.woRemarkRef.show(row); // 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 sq from '@/static/images/map/sq.png' //墒情
import csk from '@/static/images/map/csk.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 from '@/static/images/map/map-df.png'
import df_select from '@/static/images/map/map-df-select.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' import valve_df_close from '@/static/images/valves/df/valve_df_close.png'
@ -55,6 +57,7 @@ export {
scd, scd,
sq, sq,
csk, csk,
jz_select,
df, df,
df_select, df_select,
valve_df_close, valve_df_close,