|
@@ -5,7 +5,7 @@
|
|
|
<image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="dataArray.typeImg ? dataArray.typeImg : '/static/images/404.png'" mode="aspectFill"></image>
|
|
|
|
|
|
<view style="margin: auto auto auto 0">
|
|
|
- <view style="font-size: 15px"> {{ dataArray.deviceName }} </view>
|
|
|
+ <view style="font-size: 15px"> {{ dataArray.timestamp ? dataArray.timestamp.replace("T", " ") : "" }} </view>
|
|
|
</view>
|
|
|
|
|
|
<view style="margin: auto 0 auto 0">
|
|
@@ -47,7 +47,7 @@
|
|
|
></u-radio>
|
|
|
</u-radio-group>
|
|
|
|
|
|
- <u--textarea v-model="handleContent" placeholder="备注信息,最多可输入50个字" :count="true" maxlength="50" style="margin: 0 0 15px 0" :disabled="dataArray.handleStatus == 1"></u--textarea>
|
|
|
+ <u--textarea v-model="dataArray.handleContent" placeholder="备注信息,最多可输入50个字" :count="true" maxlength="50" style="margin: 0 0 15px 0" :disabled="dataArray.handleStatus == 1"></u--textarea>
|
|
|
</view>
|
|
|
|
|
|
<view class="flex" v-if="dataArray.handleStatus != 1">
|
|
@@ -85,35 +85,27 @@ import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue
|
|
|
import { useStores, commonStores } from "@/store/modules/index";
|
|
|
|
|
|
import { baseAlarmList, baseAlarm } from "@/api/business/fireIot/alarmManage.js";
|
|
|
+import { eleInspectList,dealPut } from "@/api/business/zhxf/fireInspect/index.js";
|
|
|
+
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
|
|
const dataArray = ref({});
|
|
|
const dataList = ref([
|
|
|
{
|
|
|
- title: "设备名称",
|
|
|
- value: "",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "设备地址",
|
|
|
- value: "",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "告警等级",
|
|
|
- value: "",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "告警信息",
|
|
|
+ title: "督察单编号",
|
|
|
value: "",
|
|
|
},
|
|
|
{
|
|
|
- title: "告警时间",
|
|
|
+ title: "督察单内容",
|
|
|
value: "",
|
|
|
},
|
|
|
]);
|
|
|
|
|
|
const deviceName = ref("");
|
|
|
const alarmTime = ref("");
|
|
|
+const id = ref("");
|
|
|
+const productName=ref('');
|
|
|
const pageSize = ref(20);
|
|
|
const current = ref(1);
|
|
|
const total = ref(0);
|
|
@@ -143,7 +135,29 @@ function init() {
|
|
|
* @api接口查询
|
|
|
*/
|
|
|
function selectListApi() {
|
|
|
- baseAlarmList({
|
|
|
+ if(productName.value='电子督察单'){
|
|
|
+ eleInspectList({
|
|
|
+ id: id.value,
|
|
|
+ startTime: alarmTime.value,
|
|
|
+ endTime: alarmTime.value,
|
|
|
+ pageNum: current.value,
|
|
|
+ pageSize: pageSize.value,
|
|
|
+ }).then((requset) => {
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
+ console.log( requset.data)
|
|
|
+ dataArray.value = requset.data.records[0];
|
|
|
+ dataList.value[0].value = requset.data.records[0].superviseCode;
|
|
|
+ dataList.value[1].value = requset.data.records[0].content;
|
|
|
+ // dataList.value[2].value = requset.data.records[0].alarmGrade + "级";
|
|
|
+ // dataList.value[3].value = requset.data.records[0].alarmContent;
|
|
|
+ // dataList.value[4].value = requset.data.records[0].alarmTime;
|
|
|
+ total.value = requset.data.total;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+
|
|
|
+ baseAlarmList({
|
|
|
deviceName: deviceName.value,
|
|
|
startTime: alarmTime.value,
|
|
|
endTime: alarmTime.value,
|
|
@@ -160,19 +174,27 @@ function selectListApi() {
|
|
|
total.value = requset.data.total;
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @提交
|
|
|
*/
|
|
|
function handleSubmit(alarmFalse) {
|
|
|
- baseAlarm({
|
|
|
+ dealPut({
|
|
|
id: dataArray.value.id,
|
|
|
- deviceId: dataArray.value.deviceId,
|
|
|
- alarmType: dataArray.value.alarmType,
|
|
|
- handleContent: handleContent.value,
|
|
|
- alarmFalse: alarmFalse,
|
|
|
- handleRange: handleRange.value,
|
|
|
+ // deviceId: dataArray.value.deviceId,
|
|
|
+ // alarmType: dataArray.value.alarmType,
|
|
|
+ handleContent: dataArray.value.handleContent,
|
|
|
+ // alarmFalse: alarmFalse,
|
|
|
+ // handleRange: handleRange.value,
|
|
|
}).then((requset) => {
|
|
|
if (requset.status === "SUCCESS") {
|
|
|
proxy.$tab.navigateTo(`/pages/common/success/index?codeName=提交成功`);
|
|
@@ -195,6 +217,12 @@ onLoad((options) => {
|
|
|
if ("alarmTime" in options) {
|
|
|
alarmTime.value = options.alarmTime;
|
|
|
}
|
|
|
+ if ("id" in options) {
|
|
|
+ id.value = options.id;
|
|
|
+ }
|
|
|
+ if ("productName" in options) {
|
|
|
+ productName.value = options.productName;
|
|
|
+ }
|
|
|
|
|
|
init();
|
|
|
});
|