ソースを参照

1.1 同步小檀新增功能

64060764@qq.com 1 年間 前
コミット
75c0f881bc

+ 4 - 0
src/api/box.js

@@ -275,3 +275,7 @@ export function getCustomMaxId(data) {
 export function faultAlertList(data) {
   return post(base + 'faultAlert/list', data)
 }
+
+export function editApparatusWeight(data) {
+  return post(base + 'apparatus/weight/edit', data);
+}

+ 1 - 1
src/views/eng-management/eng-pro-list/add.vue

@@ -831,7 +831,7 @@ export default {
       if (!value) {
         return callback(new Error("手机号不能为空"));
       } else {
-        const reg = /^1[3|4|5|6|7|8][0-9]\d{8}$/;
+        const reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
         if (reg.test(value)) {
           callback();
         } else {

+ 56 - 11
src/views/equip-lib/type-lib/operate.vue

@@ -34,6 +34,21 @@
         </el-table-column>
         <el-table-column prop="apparatus_brand_name" label="品牌" width="width"></el-table-column>
         <el-table-column prop="created_at" label="创建日期" width="width"></el-table-column>
+        <el-table-column
+                prop="weight"
+                label="排序"
+                align="center"
+                width="width"
+        ><template slot-scope="scope">
+          <el-input
+                  placeholder="数值越小,越靠前"
+                  v-model.number="scope.row.weight"
+                  :min=1
+                  oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
+                  @change="editApparatusWeightFunc(scope.row)"
+          ></el-input>
+        </template>
+        </el-table-column>
         <el-table-column label="操作" width="width" v-if="operateType==='edit'">
           <template slot-scope="scope">
             <span class="btn-succ" @click="editBrandButton(scope.row)">编辑</span>
@@ -74,16 +89,16 @@
 </template>
 
 <script>
-import {
-  createApparatusType,
-  updateAppratusType,
-  createApparatusBrand,
-  editApparatusBrand,
-  deleteApparatusBrand,
-  createApparatusClassic,
-  editApparatusClassic,
-  deleteApparatusClassic
-} from "@/api/box";
+  import {
+    createApparatusType,
+    updateAppratusType,
+    createApparatusBrand,
+    editApparatusBrand,
+    deleteApparatusBrand,
+    createApparatusClassic,
+    editApparatusClassic,
+    deleteApparatusClassic, editApparatusWeight
+  } from "@/api/box";
 import { currentUserName } from "@/utils/trace";
 export default {
   props: {
@@ -154,6 +169,36 @@ export default {
     }
   },
   methods: {
+    async editApparatusWeightFunc(row) {
+      if (row.weight == ''){
+        this.$notify({
+          message: "排序字段不能为空",
+          type: "error"
+        });
+        return false
+      }
+      console.log(row.apparatus_brand_auto_id);
+      console.log(row.weight);
+      const res = await editApparatusWeight({
+        apparatus_brand_id: row.apparatus_brand_auto_id,
+        weight: row.weight
+      });
+
+      if (res.code === 200) {
+        this.$notify({
+          message: "编辑排序成功",
+          type: "success"
+        });
+      } else {
+        this.$notify({
+          message: res.message,
+          type: "error"
+        });
+      }
+      this._props.detailAppratusTypeFunc({
+        apparatus_type_auto_id: this.operateForm.apparatus_type_auto_id
+      });
+    },
     //计算是否显示
     calcRowShow() {
       if (
@@ -426,4 +471,4 @@ export default {
     padding: 20px;
   }
 }
-</style>
+</style>

+ 1 - 0
src/views/equip-management/add-box-plugin/index.vue

@@ -1476,6 +1476,7 @@ export default {
       ],
       /*波特率*/
       mainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"

+ 1 - 0
src/views/equip-management/add-box/index.vue

@@ -5407,6 +5407,7 @@
                 ],
                 //波特率
                 hpMainModBaudOption: [
+                    { baud: 1200, label: "1200" },
                     {
                         baud: 4800,
                         label: "4800"

+ 187 - 5
src/views/equip-management/box-debug-rebuild/bussiness-component/standalone/index.vue

@@ -10,16 +10,128 @@
           :class="activeStandaloneIndex === index ? 'active' : ''"
           @click="changeActiveStandalone(item, index, $event)"
         >
+<!--          <div class="standalone-sequence">-->
+<!--            <el-tooltip placement="top" v-if="item.code && item.code !== 0">-->
+<!--              <div slot="content">code:{{ item.code }} msg:{{ item.msg }}</div>-->
+<!--              <div class="warning-icon" />-->
+<!--            </el-tooltip>-->
+<!--            <div class="sequence">NO.{{ index + 1 }}</div>-->
+<!--            <div class="type" v-if="standaloneType === 'host'">{{ item.hpName }}</div>-->
+<!--            <div class="type" v-if="standaloneType === 'heatexchange'">{{ item.hexName }}</div>-->
+<!--            <div class="type" v-if="standaloneType === 'newtrend'">{{ item.dhName }}</div>-->
+<!--            <div class="type" v-if="standaloneType === 'end'">{{ item.cbName }}</div>-->
+<!--          </div>-->
           <div class="standalone-sequence">
             <el-tooltip placement="top" v-if="item.code && item.code !== 0">
               <div slot="content">code:{{ item.code }} msg:{{ item.msg }}</div>
               <div class="warning-icon" />
             </el-tooltip>
             <div class="sequence">NO.{{ index + 1 }}</div>
-            <div class="type" v-if="standaloneType === 'host'">{{ item.hpName }}</div>
-            <div class="type" v-if="standaloneType === 'heatexchange'">{{ item.hexName }}</div>
-            <div class="type" v-if="standaloneType === 'newtrend'">{{ item.dhName }}</div>
-            <div class="type" v-if="standaloneType === 'end'">{{ item.cbName }}</div>
+            <div class="type" v-if="standaloneType === 'host'" @mouseenter="checkHostAsActive(standaloneType, hostDebugParam[index].hpBrand, hostDebugParam[index].hpDeviceSeries)">
+              {{ item.hpName }}
+              <el-tooltip placement="top" destroy-on-close>
+                <div slot="content">
+                  <template v-for="(items,k) in hostBrandOption">
+                    <div v-if="hostDebugParam[index].hpBrand === items.apparatus_brand_auto_id" :key="k + 'hpBrand'">
+                      主机品牌:<span>{{items.apparatus_brand_name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in hostSeriesOption">
+                    <div v-if="hostDebugParam[index].hpDeviceSeries === items.id" :key="k + 'hpDeviceSeries'">
+                      设备系列:<span>{{items.name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in hostModelOption">
+                    <div v-if="hostDebugParam[index].hpDeviceModel === items.apparatus_model_auto_id" :key="k + 'hpDeviceModel'">
+                      设备型号:<span>{{items.apparatus_model_name}}</span>
+                    </div>
+                  </template>
+                  <div v-if="!!hostDebugParam[index]">
+                    通信通道:{{hostDebugParam[index].hpMainComChan}}<br>
+                    通信地址:{{hostDebugParam[index].hpMainComAdd}}
+                  </div>
+                </div>
+                <i class="el-icon-question"/>
+              </el-tooltip></div>
+            <div class="type" v-if="standaloneType === 'heatexchange'" @mouseenter="checkHostAsActive(standaloneType, hexDebugParam[index].hexBrand, hexDebugParam[index].hexDeviceSeries)">
+              {{ item.hexName }}
+              <el-tooltip placement="top" destroy-on-close>
+                <div slot="content">
+                  <template v-for="(items,k) in hexBrandOption">
+                    <div v-if="hexDebugParam[index].hexBrand === items.apparatus_brand_auto_id" :key="k + 'hexBrand'">
+                      换热站品牌:<span>{{items.apparatus_brand_name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in hexSeriesOption">
+                    <div v-if="hexDebugParam[index].hexDeviceSeries === items.id" :key="k + 'hexDeviceSeries'">
+                      设备系列:<span>{{items.name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in hexModelOption">
+                    <div v-if="hexDebugParam[index].hexDeviceModel === items.apparatus_model_auto_id" :key="k + 'hexDeviceModel'">
+                      设备型号:<span>{{items.apparatus_model_name}}</span>
+                    </div>
+                  </template>
+                  <div v-if="!!hexDebugParam[index]">
+                    通信通道:{{hexDebugParam[index].hexMainComChan}}<br>
+                    通信地址:{{hexDebugParam[index].hexMainComAdd}}
+                  </div>
+                </div>
+                <i class="el-icon-question"/>
+              </el-tooltip></div>
+            <div class="type" v-if="standaloneType === 'newtrend'" @mouseenter="checkHostAsActive(standaloneType, newtrendDebugParam[index].dhBrand, newtrendDebugParam[index].dhDeviceSeries)">
+              {{ item.dhName }}
+              <el-tooltip placement="top" destroy-on-close>
+                <div slot="content">
+                  <template v-for="(items,k) in newtrendBrandOption">
+                    <div v-if="newtrendDebugParam[index].dhBrand === items.apparatus_brand_auto_id" :key="k + 'dhBrand'">
+                      新风机品牌:<span>{{items.apparatus_brand_name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in newtrendSeriesOption">
+                    <div v-if="newtrendDebugParam[index].dhDeviceSeries === items.id" :key="k + 'dhDeviceSeries'">
+                      设备系列:<span>{{items.name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in newtrendModelOption">
+                    <div v-if="newtrendDebugParam[index].dhDeviceModel === items.apparatus_model_auto_id" :key="k + 'dhDeviceModel'">
+                      设备型号:<span>{{items.apparatus_model_name}}</span>
+                    </div>
+                  </template>
+                  <div v-if="!!newtrendDebugParam[index]">
+                    通信通道:{{newtrendDebugParam[index].dhMainComChan}}<br>
+                    通信地址:{{newtrendDebugParam[index].dhMainComAdd}}
+                  </div>
+                </div>
+                <i class="el-icon-question"/>
+              </el-tooltip></div>
+            <div class="type" v-if="standaloneType === 'end'" @mouseenter="checkHostAsActive(standaloneType, endDebugParam[index].cbBrand, endDebugParam[index].cbDeviceSeries)">
+              {{ item.cbName }}({{item.area}})
+              <el-tooltip placement="top" destroy-on-close>
+                <div slot="content">
+                  <template v-for="(items,k) in endBrandOption">
+                    <div v-if="endDebugParam[index].cbBrand === items.apparatus_brand_auto_id" :key="k + 'cbBrand'">
+                      末端品牌:<span>{{items.apparatus_brand_name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in endSeriesOption">
+                    <div v-if="endDebugParam[index].cbDeviceSeries === items.id" :key="k + 'cbDeviceSeries'">
+                      设备系列:<span>{{items.name}}</span>
+                    </div>
+                  </template>
+                  <template v-for="(items,k) in endModelOption">
+                    <div v-if="endDebugParam[index].cbDeviceModel === items.apparatus_model_auto_id" :key="k + 'cbDeviceModel'">
+                      设备型号:<span>{{items.apparatus_model_name}}</span>
+                    </div>
+                  </template>
+                  <div v-if="!!endDebugParam[index]">
+                    通信通道:{{endDebugParam[index].cbMainComChan}}<br>
+                    通信地址:{{endDebugParam[index].cbMainComAdd}}
+                  </div>
+                </div>
+                <i class="el-icon-question"/>
+              </el-tooltip>
+            </div>
           </div>
           <div class="switch-and-base" :style="{'color': statusColor(item)}">{{ switchAndBase(item) }}</div>
           <div class="standalone-name">
@@ -78,9 +190,79 @@ export default {
     }
   },
   data() {
-    return {};
+    return {
+      hostBrandOption: [],
+      newtrendBrandOption: [],
+      hexBrandOption: [],
+      endBrandOption: [],
+      hostSeriesOption: [],
+      newtrendSeriesOption: [],
+      hexSeriesOption: [],
+      endSeriesOption: [],
+      hostModelOption: [],
+      newtrendModelOption: [],
+      hexModelOption: [],
+      endModelOption: [],
+      hostDebugParam: [
+        {
+          hpBrand: 0,
+          hpDeviceSeries: 0,
+          hpDeviceModel: 0,
+          hpMainComChan: 0,
+          hpMainComAdd: 0
+        }],
+      newtrendDebugParam: [
+        {
+          hpBrand: 0,
+          hpDeviceSeries: 0,
+          hpDeviceModel: 0,
+          hpMainComChan: 0,
+          hpMainComAdd: 0
+        }],
+      hexDebugParam: [
+        {
+          hexBrand: 0,
+          hexDeviceSeries: 0,
+          hexDeviceModel: 0,
+          hexMainComChan: 0,
+          hexMainComAdd: 0
+        }],
+      endDebugParam: [
+        {
+          cbBrand: 0,
+          cbDeviceSeries: 0,
+          cbDeviceModel: 0,
+          cbMainComChan: 0,
+          cbMainComAdd: 0
+        }],
+      //电表列表
+      airProductList: [],
+    };
   },
   methods: {
+    async checkHostAsActive(standaloneType, brandId, deviceId) {
+      if (this.standaloneList.length > 0) {
+        switch (standaloneType) {
+          case "host":
+            // 数据库中获取盒子的配置参数
+            this.debugAppratusParamsFunc('hostCtrl', brandId, deviceId);
+
+            break;
+          case "newtrend":
+            this.debugAppratusParamsFunc('newTrendCtrl', brandId, deviceId);
+
+            break;
+          case "heatexchange":
+            this.debugAppratusParamsFunc('heatExchangeCtrl', brandId, deviceId);
+
+            break;
+          case "end":
+            this.debugAppratusParamsFunc('endCtrl', brandId, deviceId);
+
+            break;
+        }
+      }
+    },
     switchAndBase(item) {
       // console.log("standalone = " + JSON.stringify(item));
       if (item && item.write_io && item.write_io.universal && item.write_io.universal.length > 0) {

+ 1 - 0
src/views/equip-management/box-debug-rebuild/bussiness-component/writable-area/index.vue

@@ -777,6 +777,7 @@ export default {
 			});
 		},
 		async universalChange(key, value) {
+			console.log('////////////////////////////universalChange')
 			let sendValue;
 			if (typeof value === "object" || typeof value === "number") {
 				// sendValue = parseInt(value);

+ 1 - 0
src/views/equip-management/box-debug/index_end.vue

@@ -1163,6 +1163,7 @@
         ],
         //波特率
         hpMainModBaudOption: [
+          { baud: 1200, label: "1200" },
           {
             baud: 4800,
             label: "4800"

+ 1 - 0
src/views/equip-management/box-debug/index_heatExchange.vue

@@ -1039,6 +1039,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"

+ 1 - 0
src/views/equip-management/box-debug/index_host.vue

@@ -946,6 +946,7 @@
         ],
         //波特率
         hpMainModBaudOption: [
+          { baud: 1200, label: "1200" },
           {
             baud: 4800,
             label: "4800"

+ 9 - 2
src/views/equip-management/box-manage/index.vue

@@ -60,6 +60,12 @@
 				<el-table-column label="盒子名称" prop="box_name" align="center"></el-table-column>
 				<el-table-column label="所属项目" prop="project_name" align="center"></el-table-column>
 				<el-table-column label="所属运营商" prop="operator_name" align="center"></el-table-column>
+				<el-table-column
+						v-if="currentUserRole === '超级管理员'||currentUserRole === '运营商角色'"
+						label="所属经销商"
+						prop="distributor_name"
+						align="center"
+				></el-table-column>
 				<el-table-column label="网关版本" prop="box_sversion" align="center" width="120"></el-table-column>
 				<el-table-column label="是否允许访问" align="center" sortable prop="box_access" width="140">
 					<template slot-scope="scope">{{
@@ -69,7 +75,7 @@
 				<el-table-column label="创建日期" align="center" width="160" sortable prop="box_create_time">
 					<template slot-scope="scope">{{ scope.row.box_create_time | timeFilter }}</template>
 				</el-table-column>
-				<el-table-column label="运行状态" align="center" width="90">
+				<el-table-column label="运行状态" align="center" width="90" sortable prop="box_state">
 					<template slot-scope="scope">
 						<span :style="boxStateFilterColor(scope.row.box_state)">{{
 							scope.row.box_state | boxStateFilter
@@ -226,7 +232,7 @@
 <script>
 import { getBoxList, delBox, syncConf, getBoxDetail, createBox } from "@/api/box";
 import {batchCommitUpdate, getProjectList} from "@/api/project";
-import { currentUserName } from "@/utils/trace";
+import {currentUserName, currentUserRole} from "@/utils/trace";
 import { dateFtt } from "@/utils/format";
 import { operatorList } from "@/api/project";
 import { parse } from "path-to-regexp";
@@ -256,6 +262,7 @@ export default {
 	},
 	data() {
 		return {
+			currentUserRole: currentUserRole(),
 			showChange:false,
 			gateWayTableData: [],
 			checkedList:[],

+ 6 - 5
src/views/equip-management/copy-box-plugin/index.vue

@@ -1777,6 +1777,7 @@ export default {
 			],
 			/*波特率*/
 			mainModBaudOption: [
+				{ baud: 1200, label: "1200" },
 				{
 					baud: 4800,
 					label: "4800"
@@ -2111,10 +2112,10 @@ export default {
 					return (this.customCheckedListIsFold = !this.customCheckedListIsFold);
 			}
 		},
-		/* 
-		  选择当前装置为 当前操作装置 
-		  判断当前装置是否被操作过 
-		  如果被操作过就使用最新数据 
+		/*
+		  选择当前装置为 当前操作装置
+		  判断当前装置是否被操作过
+		  如果被操作过就使用最新数据
 		  否则从主机中把参数先带到左侧UI列表里
 		  注意使用深拷贝,防止主机信息和item绑定
 		  再使用将当前操作装置和左侧item绑定
@@ -2594,4 +2595,4 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import "./index.scss";
-</style>
+</style>

+ 6 - 5
src/views/equip-management/edit-box-plugin/index.vue

@@ -1781,6 +1781,7 @@ export default {
 			],
 			/*波特率*/
 			mainModBaudOption: [
+				{ baud: 1200, label: "1200" },
 				{
 					baud: 4800,
 					label: "4800"
@@ -2117,10 +2118,10 @@ export default {
 					return (this.customCheckedListIsFold = !this.customCheckedListIsFold);
 			}
 		},
-		/* 
-		  选择当前装置为 当前操作装置 
-		  判断当前装置是否被操作过 
-		  如果被操作过就使用最新数据 
+		/*
+		  选择当前装置为 当前操作装置
+		  判断当前装置是否被操作过
+		  如果被操作过就使用最新数据
 		  否则从主机中把参数先带到左侧UI列表里
 		  注意使用深拷贝,防止主机信息和item绑定
 		  再使用将当前操作装置和左侧item绑定
@@ -2597,4 +2598,4 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import "./index.scss";
-</style>
+</style>

+ 2 - 1
src/views/equip-management/edit-box/copy.vue

@@ -5013,6 +5013,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"
@@ -10609,4 +10610,4 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import "../add-box/index.scss";
-</style>
+</style>

+ 1 - 0
src/views/equip-management/edit-box/index.vue

@@ -5077,6 +5077,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"

+ 2 - 1
src/views/equip-management/temp-manage/add-template/copy.vue

@@ -5032,6 +5032,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"
@@ -10615,4 +10616,4 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import "../../add-box/index.scss";
-</style>
+</style>

+ 1 - 0
src/views/equip-management/temp-manage/add-template/index.vue

@@ -4848,6 +4848,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"

+ 2 - 1
src/views/equip-management/temp-manage/edit-template/copy.vue

@@ -5133,6 +5133,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"
@@ -10486,4 +10487,4 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import "../../add-box/index.scss";
-</style>
+</style>

+ 1 - 0
src/views/equip-management/temp-manage/edit-template/index.vue

@@ -4949,6 +4949,7 @@ export default {
       ],
       //波特率
       hpMainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"

+ 2 - 1
src/views/gateway-service-management/operation-panel/index.vue

@@ -609,6 +609,7 @@ export default {
       apparatusBrandOption: [],
       //波特率options
       mainModBaudOption: [
+        { baud: 1200, label: "1200" },
         {
           baud: 4800,
           label: "4800"
@@ -944,4 +945,4 @@ export default {
 </script>
 <style lang="scss">
 @import "./index.scss";
-</style>
+</style>