diff --git a/src/views/iot/tplink/camera/components/CameraUploadForm.vue b/src/views/iot/tplink/camera/components/CameraUploadForm.vue
index 108ac7a..a0d7c60 100644
--- a/src/views/iot/tplink/camera/components/CameraUploadForm.vue
+++ b/src/views/iot/tplink/camera/components/CameraUploadForm.vue
@@ -173,8 +173,11 @@ import {
if (percentRate.value >= 100) {
clearInterval(timerRef.value);
canUpload.value = true;
+ // uploadStop();
}
}).catch(res=>{
+ clearInterval(timerRef.value);
+ canUpload.value = true;
console.log(res);
});
}
diff --git a/src/views/iot/tq/electricity/electricity.api.ts b/src/views/iot/tq/electricity/electricity.api.ts
new file mode 100644
index 0000000..8ab7c1d
--- /dev/null
+++ b/src/views/iot/tq/electricity/electricity.api.ts
@@ -0,0 +1,46 @@
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+ list = '/iot/tq/electricityMeter/list',
+ eleReset = '/iot/tq/electricityMeter/eleReset',
+ eleControl = '/iot/tq/electricityMeter/eleControl',
+ eleRead = '/iot/tq/electricityMeter/eleRead',
+ getAllMeter = '/iot/tq/common/device/getAllMeter',
+ getAllCollector = '/iot/tq/common/device/getAllCollector',
+}
+
+/**
+ * 电表列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 电表清零
+ * @param params
+ */
+export const eleReset = (params?) => defHttp.get({ url: Api.eleReset, params });
+
+/**
+ * 拉合闸
+ * @param params
+ */
+export const eleControl = (params?) => defHttp.get({ url: Api.eleControl, params });
+
+/**
+ * 抄电表
+ * @param params
+ */
+export const eleRead = (params?) => defHttp.get({ url: Api.eleRead, params });
+
+/**
+ * 获取设备信息
+ * @param params
+ */
+export const getAllMeter = (params?) => defHttp.get({ url: Api.getAllMeter, params });
+
+/**
+ * 采集器设备信息
+ * @param params
+ */
+export const getAllCollector = (params?) => defHttp.get({ url: Api.getAllCollector, params });
diff --git a/src/views/iot/tq/electricity/electricity.data.ts b/src/views/iot/tq/electricity/electricity.data.ts
new file mode 100644
index 0000000..82bda7a
--- /dev/null
+++ b/src/views/iot/tq/electricity/electricity.data.ts
@@ -0,0 +1,154 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+
+//列表数据
+export const columns: BasicColumn[] = [
+ {
+ title: '机构',
+ align: "center",
+ dataIndex: 'departName'
+ },
+ {
+ title: '护理单元',
+ align: "center",
+ dataIndex: 'nuName'
+ },
+ {
+ title: '表号',
+ align: "center",
+ dataIndex: 'address'
+ },
+ {
+ title: '采集器号',
+ align: "center",
+ dataIndex: 'cid'
+ },
+ {
+ title: '设备状态',
+ align: "center",
+ dataIndex: 'relayState',
+ customRender:({record})=>{
+ return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):'';
+ },
+ },
+ {
+ title: '在线状态',
+ align: "center",
+ dataIndex: 'online',
+ customRender:({record})=>{
+ return record.online?(record.online=='true'?'在线':'离线'):'';
+ },
+ },
+ {
+ title: '信号强度',
+ align: "center",
+ dataIndex: 'csq',
+ customRender:({record})=>{
+ if(record.csq){
+ if(record.csq < 10){
+ return '低';
+ }else if(record.csq > 20){
+ return '高';
+ }else{
+ return '中';
+ }
+ }else{
+ return '';
+ }
+ }
+ },
+ {
+ title: '用电量KWH',
+ align: "center",
+ dataIndex: 'eleValue'
+ },
+ {
+ title: '上次抄表时间',
+ align: "center",
+ dataIndex: 'readTime'
+ },
+ {
+ title: '上次上线时间',
+ align: "center",
+ dataIndex: 'connectTime'
+ },
+ {
+ title: '上次掉线时间',
+ align: "center",
+ dataIndex: 'disconnectTime'
+ },
+ {
+ title: '描述',
+ align: "center",
+ dataIndex: 'remark'
+ },
+];
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '机构',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择机构',
+ dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '护理单元',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择护理单元',
+ dictCode: 'nu_base_info,nu_name,id,del_flag = 0 order by nu_name asc',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '表号',
+ field: 'address',
+ component: 'Input',
+ colProps: { span: 6 },
+ },
+ {
+ label: '设备状态',
+ field: 'relayState',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ { label: '合闸', value: '1' },
+ { label: '拉闸', value: '0' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '在线状态',
+ field: 'online',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ { label: '在线', value: 'true' },
+ { label: '离线', value: 'false' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '信号强度',
+ field: 'csq',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择强度',
+ options: [
+ { label: '高', value: '1' },
+ { label: '中', value: '2' },
+ { label: '低', value: '3' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+];
diff --git a/src/views/iot/tq/electricity/index.vue b/src/views/iot/tq/electricity/index.vue
new file mode 100644
index 0000000..e145190
--- /dev/null
+++ b/src/views/iot/tq/electricity/index.vue
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+ 同步设备
+ 同步采集器
+
+
+
+ {{record.address}}
+
+
+
+ 合闸
+
+
+ 拉闸
+
+
+
+
+ 在线
+
+
+ 离线
+
+
+
+
+ 高
+
+
+ 低
+
+
+ 中
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/water/index.vue b/src/views/iot/tq/water/index.vue
new file mode 100644
index 0000000..fbcce82
--- /dev/null
+++ b/src/views/iot/tq/water/index.vue
@@ -0,0 +1,215 @@
+
+
+
+
+
+
+ 同步设备
+ 同步采集器
+
+
+
+ {{record.address}}
+
+
+
+ 开阀
+
+
+ 关阀
+
+
+
+
+
+ 在线
+
+
+ 离线
+
+
+
+
+ 高
+
+
+ 低
+
+
+ 中
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/tq/water/water.api.ts b/src/views/iot/tq/water/water.api.ts
new file mode 100644
index 0000000..fcb3020
--- /dev/null
+++ b/src/views/iot/tq/water/water.api.ts
@@ -0,0 +1,46 @@
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+ list = '/iot/tq/waterMeter/list',
+ waterReset = '/iot/tq/waterMeter/waterReset',
+ waterControl = '/iot/tq/waterMeter/waterControl',
+ waterRead = '/iot/tq/waterMeter/waterRead',
+ getAllMeter = '/iot/tq/common/device/getAllMeter',
+ getAllCollector = '/iot/tq/common/device/getAllCollector',
+}
+
+/**
+ * 电表列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 水表清零
+ * @param params
+ */
+export const waterReset = (params?) => defHttp.get({ url: Api.waterReset, params });
+
+/**
+ * 开关闸
+ * @param params
+ */
+export const waterControl = (params?) => defHttp.get({ url: Api.waterControl, params });
+
+/**
+ * 抄电表
+ * @param params
+ */
+export const waterRead = (params?) => defHttp.get({ url: Api.waterRead, params });
+
+/**
+ * 获取设备信息
+ * @param params
+ */
+export const getAllMeter = (params?) => defHttp.get({ url: Api.getAllMeter, params });
+
+/**
+ * 采集器设备信息
+ * @param params
+ */
+export const getAllCollector = (params?) => defHttp.get({ url: Api.getAllCollector, params });
diff --git a/src/views/iot/tq/water/water.data.ts b/src/views/iot/tq/water/water.data.ts
new file mode 100644
index 0000000..a87d91c
--- /dev/null
+++ b/src/views/iot/tq/water/water.data.ts
@@ -0,0 +1,162 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+
+//列表数据
+export const columns: BasicColumn[] = [
+ {
+ title: '机构',
+ align: "center",
+ dataIndex: 'departName'
+ },
+ {
+ title: '护理单元',
+ align: "center",
+ dataIndex: 'nuName'
+ },
+ {
+ title: '表号',
+ align: "center",
+ dataIndex: 'address'
+ },
+ {
+ title: '采集器号',
+ align: "center",
+ dataIndex: 'cid'
+ },
+ {
+ title: '设备状态',
+ align: "center",
+ dataIndex: 'relayState',
+ customRender:({record})=>{
+ return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):'';
+ },
+ },
+ // {
+ // title: '电池状态',
+ // align: "center",
+ // dataIndex: 'batteryState',
+ // customRender:({record})=>{
+ // return record.batteryState?(record.batteryState=='0'?'正常':'低电'):'';
+ // },
+ // },
+ {
+ title: '在线状态',
+ align: "center",
+ dataIndex: 'online',
+ customRender:({record})=>{
+ return record.online?(record.online=='true'?'在线':'离线'):'';
+ },
+ },
+ {
+ title: '信号强度',
+ align: "center",
+ dataIndex: 'csq',
+ customRender:({record})=>{
+ if(record.csq){
+ if(record.csq < 10){
+ return '低';
+ }else if(record.csq > 20){
+ return '高';
+ }else{
+ return '中';
+ }
+ }else{
+ return '';
+ }
+ }
+ },
+ {
+ title: '用水量m³',
+ align: "center",
+ dataIndex: 'waterValue'
+ },
+ {
+ title: '上次抄表时间',
+ align: "center",
+ dataIndex: 'readTime'
+ },
+ {
+ title: '上次上线时间',
+ align: "center",
+ dataIndex: 'connectTime'
+ },
+ {
+ title: '上次掉线时间',
+ align: "center",
+ dataIndex: 'disconnectTime'
+ },
+ {
+ title: '描述',
+ align: "center",
+ dataIndex: 'remark'
+ },
+];
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '机构',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择机构',
+ dictCode: 'sys_depart,depart_name,id,org_category = 1 order by depart_name asc',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '护理单元',
+ field: 'deviceStatus',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择护理单元',
+ dictCode: 'nu_base_info,nu_name,id,del_flag = 0 order by nu_name asc',
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '表号',
+ field: 'address',
+ component: 'Input',
+ colProps: { span: 6 },
+ },
+ {
+ label: '设备状态',
+ field: 'relayState',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ { label: '合闸', value: '1' },
+ { label: '拉闸', value: '0' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '在线状态',
+ field: 'online',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ { label: '在线', value: 'true' },
+ { label: '离线', value: 'false' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+ {
+ label: '信号强度',
+ field: 'csq',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择强度',
+ options: [
+ { label: '高', value: '1' },
+ { label: '中', value: '2' },
+ { label: '低', value: '3' },
+ ],
+ },
+ colProps: { span: 6 },
+ },
+];