Browse Source

物联网设备对接

asd26269546 1 year ago
parent
commit
eb6cb51c18

+ 35 - 5
src/lang/cn.js

@@ -43,6 +43,41 @@ export const lang = {
 		model:"型号",
 
 	},
+	email:{
+		//收件箱,写邮件,搜索,邮箱,所有收件箱,账户,请选择邮箱,联系人,客户,收件箱,未读邮件,草稿箱,已发送,已删除,垃圾邮箱,发件人,收件人,时间,附件,下载,
+		//写邮件,发送,收件人,请输入邮箱,抄送/密送,抄送,请输入邮箱,密送,请输入邮箱,发件人,请选择邮箱,主题,请输入主题,请输入正文,发送成功
+		inbox:'收件箱',
+		search:'搜索',
+		email:'邮箱',
+		allInbox:'所有收件箱',
+		account:'账户',
+		contact:'联系人',
+		customer:'客户',
+		inbox:'收件箱',
+		unreadEmail:'未读邮件',
+		drafts:'草稿箱',
+		sent:'已发送',
+		deleted:'已删除',
+		trashMailbox:'垃圾邮箱',
+		sender:'发件人',
+		recipient:'收件人',
+		time:'时 间',
+		attachment:'附 件',
+		download:'下载',
+		writeEmail:'写邮件',
+		send:'发送',
+		recipient:'收件人',
+		cc:'抄送',
+		bcc:'密送',
+		pleaseEnterTheMailbox:'请输入邮箱',
+		pleaseSelectTheMailbox:'请选择邮箱',
+		subject:'主题',
+		pleaseEnterTheSubject:'请输入主题',
+		pleaseEnterTheText:'请输入正文',
+		sendSuccessfully:'发送成功',
+
+
+	},
 	feedback:{
 		//我的反馈,反馈,全部,待回复,已回复,姓名,公司名称,联系方式,问题反馈,关注企业公众号,企业微信客服,请填写姓名,请填写公司名称,请填写联系方式,请填写备注
 		//姓名,公司名称,联系方式,模块类型,备注,图片补充
@@ -61,8 +96,6 @@ export const lang = {
 		pleaseFillInTheCompanyName:'请填写公司名称',
 		pleaseFillInTheContactInformation:'请填写联系方式',
 		pleaseFillInTheRemarks:'请填写备注',
-		nameText:'姓名',
-		companyName:'公司名称',
 		contactInformation:'联系方式',
 		moduleType:'模块类型',
 		remarks:'备注',
@@ -106,7 +139,6 @@ export const lang = {
 	receive:{
 		//任务接收,产品名称,产品SN,前道工序,仓库名称不能为空,物品名称不能为空,入库数量不能为空,确认接收,退回,产品名称,产品SN,前道工序,流转入
 		name:'任务接收',
-		previousProcess:'前道工序',
 		warehouseNameCanNotBeEmpty:'仓库名称不能为空',
 		itemNameCanNotBeEmpty:'物品名称不能为空',
 		warehousingQuantityCanNotBeEmpty:'入库数量不能为空',
@@ -143,7 +175,6 @@ export const lang = {
 		warehouseName:'仓库名称',
 		warehouseKeeper:'仓管员',
 		itemClassification:'物品分类',
-		itemName:'物品名称',
 
 	},
 	afterSales:{
@@ -189,7 +220,6 @@ export const lang = {
 		productName:'产品名称',
 		selectProductName:'选择产品名称',
 		productNameCanNotBeEmpty:'产品名称不能为空',
-		workOrderQuantity:'工单数量',
 		pleaseEnterTheWorkOrderQuantity:'请输入工单数量',
 		workOrderQuantityCanNotBeEmpty:'工单数量不能为空',
 		remarks:'备注',

+ 2 - 2
src/router/routerLXF.js

@@ -51,12 +51,12 @@ export function routesLXF() {
       component: () => import("../views/product-material/product-library/add.vue"),
     },
     {
-      path: "threadHead",
+      path: "threadHead/:id",
       name: "螺纹头",
       component: () => import("../views/equipment/threadHead.vue"),
     },
     {
-      path: "printingMachine",
+      path: "printingMachine/:id",
       name: "滚印机",
       component: () => import("../views/equipment/printingMachine.vue"),
     },

+ 18 - 8
src/views/equipment/assemble.vue

@@ -134,6 +134,22 @@ const getDtl = () => {
     })
     
 }
+const getData = () => {
+	// 获取数据
+	let listData = JSON.parse(localStorage.getItem('listData'))
+	for (let i = 0; i < listData.length; i++) {
+		const element = listData[i];
+		if(route.query.equipmentNo == element.equipmentNo && element.data != '{}'){
+			showData.value = JSON.parse(element.data)
+		}
+	}
+    console.log(showData)
+	setTimeout(() => {
+		if(route.name == '组装机') {
+			getData()
+		}
+	}, 5000);
+}
 const showData = ref({
     coils:[],
     discreteInputs:[],
@@ -141,15 +157,9 @@ const showData = ref({
     inputRegisters:[],
     switchType:[],
 })
-setTimeout(() => {
-    getDtl()
-}, 3000);
+
 onMounted(() => {
-    showData.value = JSON.parse(route.query.data)
-    if(showData.value.coils.length > 0) {
-        showData.value.switchType = true
-    }
-    console.log(showData.value)
+    getData()
 })
 </script>
 <style lang="scss" scoped>

+ 39 - 13
src/views/equipment/packer.vue

@@ -16,7 +16,9 @@
                 </div>
                 <div class="text">
                     <div class="label">{{$t('common.equipmentStatus')}}</div>
-                    <div class="value" style="color: #3fbf31">{{$t('common.normal')}}</div>
+                    <div class="value" :style="equData.data[48] && equData.data[48].v != 'false' ? 'color: #3fbf31' : 'color:#F54A45'">
+						{{equData.data[48] && equData.data[48].v != 'false' ?  $t('common.normal') : $t('common.offline')}}
+					</div>
                 </div>
             </div>
             <div class="mode">
@@ -25,18 +27,18 @@
                 </div>
                 <div class="text">
                     <div class="label">{{$t('common.operatingMode')}}</div>
-                    <div class="value">{{$t('common.auto')}}</div>
+                    <div class="value">{{equData.data[48] && equData.data[48].v != 'false' ?  $t('common.auto') : $t('common.manual')}}</div>
                 </div>
             </div>
         </div>
-        <commonCharts></commonCharts>
+        <!-- <commonCharts></commonCharts> -->
 		<ul>
 			<li>
 				<div class="li-icon">
 					<img src="@/assets/images/icon_jhcl.png" alt="" />
 				</div>
 				<div class="li-text">
-					5000
+					{{equData.data[69] && equData.data[69].v ?  equData.data[69].v : '0'}}
 					<p>{{$t('packer.plannedOutput')}}</p>
 				</div>
 			</li>
@@ -45,7 +47,7 @@
 					<img src="@/assets/images/icon_yyj.png" alt="" />
 				</div>
 				<div class="li-text">
-					230
+					{{equData.data[68] && equData.data[68].v ?  equData.data[68].v : '0'}}
 					<p>{{$t('packer.versionsPerMinute')}}</p>
 				</div>
 				<div class="li-stat li-stat-bg"></div>
@@ -53,42 +55,42 @@
 		</ul>
 		<div class="list-warp">
 			<div class="list-box">
-				<div class="num">12</div>
+				<div class="num">{{equData.data[52] && equData.data[52].v ?  equData.data[52].v : '0'}}</div>
 				<div class="text">{{$t('packer.numberOfModules')}}</div>
 				<div class="li-stat li-stat-img">
 					<img src="@/assets/images/icon_yyj.png" alt="" />
 				</div>
 			</div>
 			<div class="list-box">
-				<div class="num">12</div>
+				<div class="num">{{equData.data[53] && equData.data[53].v ?  equData.data[53].v : '0'}}</div>
 				<div class="text">{{$t('packer.singleModeDistance')}}</div>
 				<div class="li-stat li-stat-img">
 					<img src="@/assets/images/icon_yyj.png" alt="" />
 				</div>
 			</div>
 			<div class="list-box">
-				<div class="num">12</div>
+				<div class="num">{{equData.data[54] && equData.data[54].v ?  equData.data[54].v : '0'}}</div>
 				<div class="text">{{$t('packer.alignmentDistance')}}</div>
 				<div class="li-stat li-stat-img">
 					<img src="@/assets/images/icon_yyj.png" alt="" />
 				</div>
 			</div>
 			<div class="list-box">
-				<div class="num">12</div>
+				<div class="num">{{equData.data[55] && equData.data[55].v ?  equData.data[55].v : '0'}}</div>
 				<div class="text">{{$t('packer.jogSpeed')}}</div>
 				<div class="li-stat li-stat-img">
 					<img src="@/assets/images/icon_yyj.png" alt="" />
 				</div>
 			</div>
 			<div class="list-box">
-				<div class="num">12</div>
+				<div class="num">{{equData.data[62] && equData.data[62].v ?  equData.data[62].v : '0'}}</div>
 				<div class="text">{{$t('packer.chainSpeed')}}</div>
 				<div class="li-stat li-stat-img">
 					<img src="@/assets/images/icon_yyj.png" alt="" />
 				</div>
 			</div>
 			<div class="list-box">
-				<div class="num">12</div>
+				<div class="num">{{equData.data[63] && equData.data[63].v ?  equData.data[63].v : '0'}}</div>
 				<div class="text">{{$t('packer.alignmentSpeed')}}</div>
 				<div class="li-stat li-stat-img">
 					<img src="@/assets/images/icon_yyj.png" alt="" />
@@ -102,8 +104,32 @@
 import equipmentTop from '@/components/equipment-top.vue'
 import commonCharts from './components/commonCharts.vue'
 import * as echarts from 'echarts'
-import { ref, reactive, onMounted } from 'vue'
-const onClickLeft = () => proxy.$router.push('/main/working')
+import { useRoute } from "vue-router";
+import { ref, reactive, onMounted,getCurrentInstance } from 'vue'
+const proxy = getCurrentInstance().proxy
+const route = useRoute();
+const onClickLeft = () => history.go(-1)
+let equData = ref({
+	data:[],
+})
+const getData = () => {
+	// 获取数据
+	let listData = JSON.parse(localStorage.getItem('listData'))
+	for (let i = 0; i < listData.length; i++) {
+		const element = listData[i];
+		if(route.query.equipmentNo == element.equipmentNo){
+			equData.value = element
+		}
+	}
+	setTimeout(() => {
+		if(route.name == '包装机') {
+			getData()
+		}
+	}, 5000);
+}
+onMounted(() => {
+	getData()
+})
 
 </script>
 <style lang="scss">

+ 542 - 211
src/views/equipment/printingMachine.vue

@@ -1,223 +1,554 @@
 <template>
-  <div>
-    <van-nav-bar :title="$t('rollPrinting.name')" left-text="" left-arrow @click-left="onClickLeft"> </van-nav-bar>
-    <equipmentTop></equipmentTop>
-    <div style="padding: 12px 12px 0 12px">
-      <van-row :gutter="12">
-        <van-col span="8">
-          <div class="modules">
-            <div style="display: flex">
-              <img class="img" src="../../assets/images/icon_sbzt1.png" alt="" />
-              <div class="label">{{ $t("rollPrinting.state") }}</div>
-            </div>
-            <div class="value" style="color: #3fbf31">{{ $t("common.normal") }}</div>
-          </div>
-        </van-col>
-        <van-col span="8">
-          <div class="modules">
-            <div style="display: flex">
-              <img class="img" src="../../assets/images/icon_gzms1.png" alt="" />
-              <div class="label">{{ $t("rollPrinting.mode") }}</div>
-            </div>
-            <div class="value" style="color: #ff8800">{{ $t("common.auto") }}</div>
-          </div>
-        </van-col>
-        <van-col span="8">
-          <div class="modules">
-            <div style="display: flex">
-              <img class="img" src="../../assets/images/icon_zdjpl1.png" alt="" />
-              <div class="label">{{ $t("rollPrinting.frequencyOfMainMotor") }}</div>
-            </div>
-            <div class="value" style="color: black; font-weight: 700">300HZ</div>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-    <commonCharts></commonCharts>
-    <div style="margin: 12px">
-      <van-row :gutter="12">
-        <van-col span="8">
-          <div class="submodule">
-            <div class="top">
-              <img class="imgOne" src="../../assets/images/icon_pyf.png" alt="" />
-              <div class="point" style="background-color: #3fbf31"></div>
-            </div>
-            <div style="text-align: center; margin-top: 10px; font-size: 14px">1#{{ $t("rollPrinting.injectionValve") }}</div>
-          </div>
-        </van-col>
-        <van-col span="8">
-          <div class="submodule">
-            <div class="top">
-              <img class="imgOne" src="../../assets/images/icon_pyf.png" alt="" />
-              <div class="point" style="background-color: #3fbf31"></div>
-            </div>
-            <div style="text-align: center; margin-top: 10px; font-size: 14px">2#{{ $t("rollPrinting.injectionValve") }}</div>
-          </div>
-        </van-col>
-        <van-col span="8">
-          <div class="submodule">
-            <div class="top">
-              <img class="imgOne" src="../../assets/images/icon_pyf.png" alt="" />
-              <div class="point" style="background-color: #bbbbbb"></div>
-            </div>
-            <div style="text-align: center; margin-top: 10px; font-size: 14px">3#{{ $t("rollPrinting.injectionValve") }}</div>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-    <div style="margin: 12px">
-      <van-row :gutter="12">
-        <van-col span="12">
-          <div class="submodule" style="position: relative; display: flex">
-            <img class="imgTwo" src="../../assets/images/icon_bpdj.png" alt="" />
-            <div style="height: 50px; line-height: 50px; padding-left: 12px">{{ $t("rollPrinting.variableFrequencyMotor") }}</div>
-            <div class="pointTwo" style="background-color: #3fbf31"></div>
-          </div>
-        </van-col>
-        <van-col span="12">
-          <div class="submodule" style="display: flex">
-            <img class="imgTwo" src="../../assets/images/icon_pl.png" alt="" />
-            <div>
-              <div style="height: 25px; line-height: 25px; padding-left: 12px; color: black; font-weight: 700">300HZ</div>
-              <div style="height: 25px; line-height: 25px; padding-left: 12px">{{ $t("rollPrinting.frequency") }}</div>
-            </div>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-    <div style="margin: 12px">
-      <van-row :gutter="12">
-        <van-col span="8">
-          <div class="submodule">
-            <div class="top">
-              <img class="imgOne" src="../../assets/images/icon_jrdj.png" alt="" />
-              <div class="point" style="background-color: #3fbf31"></div>
-            </div>
-            <div style="text-align: center; margin-top: 10px; font-size: 14px">{{ $t("rollPrinting.heatingMotor") }}</div>
-          </div>
-        </van-col>
-        <van-col span="8">
-          <div class="submodule">
-            <div class="top">
-              <div style="font-size: 26px; height: 41px">80℃</div>
-              <img style="position: absolute; width: 16px; height: 16px; right: 0px; top: 0px" src="../../assets/images/icon_wdj.png" alt="" />
-            </div>
-            <div style="text-align: center; margin-top: 10px; font-size: 14px">{{ $t("rollPrinting.firstCurrentTemperature") }}</div>
-          </div>
-        </van-col>
-        <van-col span="8">
-          <div class="submodule">
-            <div class="top">
-              <div style="font-size: 26px; height: 41px">80℃</div>
-              <img style="position: absolute; width: 16px; height: 16px; right: 0px; top: 0px" src="../../assets/images/icon_wdj.png" alt="" />
-            </div>
-            <div style="text-align: center; margin-top: 10px; font-size: 14px">{{ $t("rollPrinting.secondCurrentTemperature") }}</div>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-    <div style="margin: 12px">
-      <van-row :gutter="12">
-        <van-col span="12">
-          <div class="submodule" style="position: relative; display: flex">
-            <img class="imgTwo" src="../../assets/images/icon_pydj.png" alt="" />
-            <div style="height: 50px; line-height: 50px; padding-left: 12px">{{ $t("rollPrinting.fuelInjectionMotor") }}</div>
-            <div class="pointTwo" style="background-color: #3fbf31"></div>
-          </div>
-        </van-col>
-        <van-col span="12">
-          <div class="submodule" style="position: relative; display: flex">
-            <img class="imgTwo" src="../../assets/images/icon_ybdj.png" alt="" />
-            <div style="height: 50px; line-height: 50px; padding-left: 12px">{{ $t("rollPrinting.oilPumpMotor") }}</div>
-            <div class="pointTwo" style="background-color: #3fbf31"></div>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-    <div style="margin: 12px">
-      <van-row :gutter="12">
-        <van-col span="12">
-          <div class="submodule" style="position: relative; display: flex">
-            <img class="imgTwo" src="../../assets/images/icon_xldj.png" alt="" />
-            <div style="height: 50px; line-height: 50px; padding-left: 12px">{{ $t("rollPrinting.storageMotor") }}</div>
-            <div class="pointTwo" style="background-color: #3fbf31"></div>
-          </div>
-        </van-col>
-        <van-col span="12">
-          <div class="submodule" style="position: relative; display: flex">
-            <img class="imgTwo" src="../../assets/images/icon_lxdj.png" alt="" />
-            <div style="height: 50px; line-height: 50px; padding-left: 12px">{{ $t("rollPrinting.centrifugalMotor") }}</div>
-            <div class="pointTwo" style="background-color: #3fbf31"></div>
-          </div>
-        </van-col>
-      </van-row>
-    </div>
-  </div>
+	<div>
+		<van-nav-bar
+			:title="$t('rollPrinting.name')"
+			left-text=""
+			left-arrow
+			@click-left="onClickLeft"
+		>
+		</van-nav-bar>
+		<equipmentTop></equipmentTop>
+		<div style="">
+			<div class="fermentator-header">
+				<div class="status">
+					<div class="img">
+						<img src="../../assets/images/icon_sbzt@2x.png" alt="" />
+					</div>
+					<div class="text">
+						<div class="label">{{$t('common.equipmentStatus')}}</div>
+						<div class="value" :style="equData.coils[0] ? 'color: #3fbf31' : 'color:#F54A45'">
+							{{equData.coils[0] ?  $t('common.normal') : $t('common.offline')}}
+						</div>
+					</div>
+				</div>
+				<div class="mode">
+					<div class="img">
+						<img src="../../assets/images/icon_gzms@2x.png" alt="" />
+					</div>
+					<div class="text">
+						<div class="label">{{$t('common.operatingMode')}}</div>
+						<div class="value">{{equData.discreteInputs[3] ?  $t('common.auto') : $t('common.manual')}}</div>
+					</div>
+				</div>
+			</div>
+			
+		</div>
+		<!-- <commonCharts></commonCharts> -->
+		<!-- <div style="margin: 12px">
+			<van-row :gutter="12">
+				<van-col span="8">
+					<div class="submodule">
+						<div class="top">
+							<img
+								class="imgOne"
+								src="../../assets/images/icon_pyf.png"
+								alt=""
+							/>
+							<div
+								class="point"
+								style="background-color: #3fbf31"
+							></div>
+						</div>
+						<div
+							style="
+								text-align: center;
+								margin-top: 10px;
+								font-size: 14px;
+							"
+						>
+							1#{{ $t('rollPrinting.injectionValve') }}
+						</div>
+					</div>
+				</van-col>
+				<van-col span="8">
+					<div class="submodule">
+						<div class="top">
+							<img
+								class="imgOne"
+								src="../../assets/images/icon_pyf.png"
+								alt=""
+							/>
+							<div
+								class="point"
+								style="background-color: #3fbf31"
+							></div>
+						</div>
+						<div
+							style="
+								text-align: center;
+								margin-top: 10px;
+								font-size: 14px;
+							"
+						>
+							2#{{ $t('rollPrinting.injectionValve') }}
+						</div>
+					</div>
+				</van-col>
+				<van-col span="8">
+					<div class="submodule">
+						<div class="top">
+							<img
+								class="imgOne"
+								src="../../assets/images/icon_pyf.png"
+								alt=""
+							/>
+							<div
+								class="point"
+								style="background-color: #bbbbbb"
+							></div>
+						</div>
+						<div
+							style="
+								text-align: center;
+								margin-top: 10px;
+								font-size: 14px;
+							"
+						>
+							3#{{ $t('rollPrinting.injectionValve') }}
+						</div>
+					</div>
+				</van-col>
+			</van-row>
+		</div> -->
+		<div style="margin: 12px">
+			<van-row :gutter="12">
+				<van-col span="12">
+					<div
+						class="submodule"
+						style="position: relative; display: flex"
+					>
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_bpdj.png"
+							alt=""
+						/>
+						<div
+							style="
+								height: 50px;
+								line-height: 50px;
+								padding-left: 12px;
+							"
+						>
+							{{ $t('rollPrinting.variableFrequencyMotor') }}
+						</div>
+						<div
+							class="pointTwo"
+							:style="equData.coils[14] ? 'background-color: #3fbf31' : 'background-color: #bbb'"
+						></div>
+					</div>
+				</van-col>
+				<van-col span="12">
+					<div class="submodule" style="display: flex">
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_pl.png"
+							alt=""
+						/>
+						<div>
+							<div
+								style="
+									height: 25px;
+									line-height: 25px;
+									padding-left: 12px;
+									color: black;
+									font-weight: 700;
+								"
+							>
+								{{equData.holdingRegisters[0]}}HZ
+							</div>
+							<div
+								style="
+									height: 25px;
+									line-height: 25px;
+									padding-left: 12px;
+								"
+							>
+								{{ $t('rollPrinting.frequency') }}
+							</div>
+						</div>
+					</div>
+				</van-col>
+			</van-row>
+		</div>
+		<div style="margin: 12px">
+			<van-row :gutter="12">
+				<van-col span="12">
+					<div
+						class="submodule"
+						style="position: relative; display: flex"
+					>
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_lxdj.png"
+							alt=""
+						/>
+						<div
+							style="
+								height: 50px;
+								line-height: 50px;
+								padding-left: 12px;
+							"
+						>
+							{{ $t('rollPrinting.heatingMotor') }}
+						</div>
+						<div
+							class="pointTwo"
+							:style="equData.coils[15] ? 'background-color: #3fbf31' : 'background-color: #bbb'"
+						></div>
+					</div>
+				</van-col>
+				<van-col span="12">
+					<div class="submodule" style="display: flex">
+						<img
+							class="imgTwo"
+							src="@/assets/images/icon_clsj@2x.png"
+							alt=""
+						/>
+						<div>
+							<div
+								style="
+									height: 25px;
+									line-height: 25px;
+									padding-left: 12px;
+									color: black;
+									font-weight: 700;
+								"
+							>
+								{{equData.holdingRegisters[3]}}
+							</div>
+							<div
+								style="
+									height: 25px;
+									line-height: 25px;
+									padding-left: 12px;
+								"
+							>
+								{{ $t('assemblingMachine.yield') }}
+							</div>
+						</div>
+					</div>
+				</van-col>
+			</van-row>
+		</div>
+		<!-- <div style="margin: 12px">
+			<van-row :gutter="12">
+				<van-col span="8">
+					<div class="submodule">
+						<div class="top">
+							<img
+								class="imgOne"
+								src="../../assets/images/icon_jrdj.png"
+								alt=""
+							/>
+							<div
+								class="point"
+								style="background-color: #3fbf31"
+							></div>
+						</div>
+						<div
+							style="
+								text-align: center;
+								margin-top: 10px;
+								font-size: 14px;
+							"
+						>
+							{{ $t('rollPrinting.heatingMotor') }}
+						</div>
+					</div>
+				</van-col>
+				<van-col span="8">
+					<div class="submodule">
+						<div class="top">
+							<div style="font-size: 26px; height: 41px">80℃</div>
+							<img
+								style="
+									position: absolute;
+									width: 16px;
+									height: 16px;
+									right: 0px;
+									top: 0px;
+								"
+								src="../../assets/images/icon_wdj.png"
+								alt=""
+							/>
+						</div>
+						<div
+							style="
+								text-align: center;
+								margin-top: 10px;
+								font-size: 14px;
+							"
+						>
+							{{ $t('rollPrinting.firstCurrentTemperature') }}
+						</div>
+					</div>
+				</van-col>
+				<van-col span="8">
+					<div class="submodule">
+						<div class="top">
+							<div style="font-size: 26px; height: 41px">80℃</div>
+							<img
+								style="
+									position: absolute;
+									width: 16px;
+									height: 16px;
+									right: 0px;
+									top: 0px;
+								"
+								src="../../assets/images/icon_wdj.png"
+								alt=""
+							/>
+						</div>
+						<div
+							style="
+								text-align: center;
+								margin-top: 10px;
+								font-size: 14px;
+							"
+						>
+							{{ $t('rollPrinting.secondCurrentTemperature') }}
+						</div>
+					</div>
+				</van-col>
+			</van-row>
+		</div>
+		<div style="margin: 12px">
+			<van-row :gutter="12">
+				<van-col span="12">
+					<div
+						class="submodule"
+						style="position: relative; display: flex"
+					>
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_pydj.png"
+							alt=""
+						/>
+						<div
+							style="
+								height: 50px;
+								line-height: 50px;
+								padding-left: 12px;
+							"
+						>
+							{{ $t('rollPrinting.fuelInjectionMotor') }}
+						</div>
+						<div
+							class="pointTwo"
+							style="background-color: #3fbf31"
+						></div>
+					</div>
+				</van-col>
+				<van-col span="12">
+					<div
+						class="submodule"
+						style="position: relative; display: flex"
+					>
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_ybdj.png"
+							alt=""
+						/>
+						<div
+							style="
+								height: 50px;
+								line-height: 50px;
+								padding-left: 12px;
+							"
+						>
+							{{ $t('rollPrinting.oilPumpMotor') }}
+						</div>
+						<div
+							class="pointTwo"
+							style="background-color: #3fbf31"
+						></div>
+					</div>
+				</van-col>
+			</van-row>
+		</div>
+		<div style="margin: 12px">
+			<van-row :gutter="12">
+				<van-col span="12">
+					<div
+						class="submodule"
+						style="position: relative; display: flex"
+					>
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_xldj.png"
+							alt=""
+						/>
+						<div
+							style="
+								height: 50px;
+								line-height: 50px;
+								padding-left: 12px;
+							"
+						>
+							{{ $t('rollPrinting.storageMotor') }}
+						</div>
+						<div
+							class="pointTwo"
+							style="background-color: #3fbf31"
+						></div>
+					</div>
+				</van-col>
+				<van-col span="12">
+					<div
+						class="submodule"
+						style="position: relative; display: flex"
+					>
+						<img
+							class="imgTwo"
+							src="../../assets/images/icon_lxdj.png"
+							alt=""
+						/>
+						<div
+							style="
+								height: 50px;
+								line-height: 50px;
+								padding-left: 12px;
+							"
+						>
+							{{ $t('rollPrinting.centrifugalMotor') }}
+						</div>
+						<div
+							class="pointTwo"
+							style="background-color: #3fbf31"
+						></div>
+					</div>
+				</van-col>
+			</van-row>
+		</div> -->
+	</div>
 </template>
 <script setup>
-import equipmentTop from "@/components/equipment-top.vue";
-import commonCharts from "./components/commonCharts.vue";
+import equipmentTop from '@/components/equipment-top.vue'
+import commonCharts from './components/commonCharts.vue'
+import * as echarts from 'echarts'
+import { useRoute } from "vue-router";
+import { ref, reactive, onMounted,getCurrentInstance } from 'vue'
+const proxy = getCurrentInstance().proxy
+const route = useRoute();
+const onClickLeft = () => history.go(-1)
+let equData = ref({
+	coils:[],
+	discreteInputs:[],
+	holdingRegisters:[],
+	inputRegisters:[],
+})
+const getData = () => {
+	// 获取数据
+	let listData = JSON.parse(localStorage.getItem('listData'))
+	for (let i = 0; i < listData.length; i++) {
+		const element = listData[i];
+		if(route.query.equipmentNo == element.equipmentNo){
+			equData.value = JSON.parse(element.data)
+		}
+	}
+	console.log(equData.value)
+	setTimeout(() => {
+		if(route.name == '滚印机') {
+			getData()
+		}
+	}, 5000);
+}
+onMounted(() => {
+	getData()
+})
 
-const onClickLeft = () => proxy.$router.push("/main/working");
 </script>
 
 <style lang="scss" scoped>
+.fermentator-header {
+	display: flex;
+	justify-content: space-between;
+	margin-top: 12px;
+    padding: 0 12px;
+	.status,
+	.mode {
+		width: 49%;
+		background: #fff;
+		padding: 12px;
+		box-sizing: border-box;
+		display: flex;
+		.label {
+			font-size: 14px;
+			color: #666;
+		}
+		.value {
+			font-weight: bold;
+			font-size: 16px;
+			color: #ff8800;
+			margin-top: 6px;
+		}
+		.img {
+			width: 50px;
+			height: 50px;
+			margin-right: 12px;
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+}
 .modules {
-  background-color: white;
-  padding: 12px;
-  border-radius: 5px;
-  .img {
-    width: 20px;
-    height: 20px;
-    margin-right: 8px;
-  }
-  .label {
-    font-size: 12px;
-    color: #666;
-  }
-  .value {
-    font-weight: bold;
-    font-size: 16px;
-    color: #ff8800;
-    margin-top: 6px;
-    text-align: center;
-    height: 21px;
-    line-height: 21px;
-  }
+	background-color: white;
+	padding: 12px;
+	border-radius: 5px;
+	.img {
+		width: 20px;
+		height: 20px;
+		margin-right: 8px;
+	}
+	.label {
+		font-size: 12px;
+		color: #666;
+	}
+	.value {
+		font-weight: bold;
+		font-size: 16px;
+		color: #ff8800;
+		margin-top: 6px;
+		text-align: center;
+		height: 21px;
+		line-height: 21px;
+	}
 }
 .submodule {
-  background-color: white;
-  padding: 12px;
-  border-radius: 5px;
-  .top {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    position: relative;
-    .imgOne {
-      width: 41px;
-      height: 41px;
-    }
-    .point {
-      position: absolute;
-      width: 12px;
-      height: 12px;
-      border-radius: 50px;
-      right: 0px;
-      top: 0px;
-    }
-  }
-  .imgTwo {
-    width: 50px;
-    height: 50px;
-  }
-  .pointTwo {
-    position: absolute;
-    width: 12px;
-    height: 12px;
-    border-radius: 50px;
-    right: 8px;
-    top: 8px;
-  }
+	background-color: white;
+	padding: 12px;
+	border-radius: 5px;
+	.top {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		position: relative;
+		.imgOne {
+			width: 41px;
+			height: 41px;
+		}
+		.point {
+			position: absolute;
+			width: 12px;
+			height: 12px;
+			border-radius: 50px;
+			right: 0px;
+			top: 0px;
+		}
+	}
+	.imgTwo {
+		width: 50px;
+		height: 50px;
+	}
+	.pointTwo {
+		position: absolute;
+		width: 12px;
+		height: 12px;
+		border-radius: 50px;
+		right: 8px;
+		top: 8px;
+	}
 }
 </style>

+ 31 - 4
src/views/equipment/threadHead.vue

@@ -28,7 +28,7 @@
         </van-col>
       </van-row>
     </div>
-    <commonCharts></commonCharts>
+    <!-- <commonCharts></commonCharts> -->
     <div style="margin: 12px">
       <van-row :gutter="12">
         <van-col span="8">
@@ -117,10 +117,37 @@
   </div>
 </template>
 <script setup>
-import equipmentTop from "@/components/equipment-top.vue";
-import commonCharts from "./components/commonCharts.vue";
+import equipmentTop from '@/components/equipment-top.vue'
+import commonCharts from './components/commonCharts.vue'
+import * as echarts from 'echarts'
+import { useRoute } from "vue-router";
+import { ref, reactive, onMounted,getCurrentInstance } from 'vue'
+const proxy = getCurrentInstance().proxy
+const route = useRoute();
+const onClickLeft = () => history.go(-1)
+let equData = ref({
+	data:[],
+})
+const getData = () => {
+	// 获取数据
+	let listData = JSON.parse(localStorage.getItem('listData'))
+	for (let i = 0; i < listData.length; i++) {
+		const element = listData[i];
+		if(route.query.equipmentNo == element.equipmentNo){
+			equData.value = JSON.parse(element.data)
+		}
+	}
+  console.log(equData.value)
+	setTimeout(() => {
+		if(route.name == '包装机') {
+			getData()
+		}
+	}, 5000);
+}
+onMounted(() => {
+	getData()
+})
 
-const onClickLeft = () => proxy.$router.push("/main/working");
 </script>
 
 <style lang="scss" scoped>

+ 22 - 11
src/views/equipment/xiamenList.vue

@@ -70,33 +70,44 @@ const onLoad = () => {
 const toDtl = (i) => {
 	console.log(i)
 	proxy.$router.push({
-		path: equipmentUrlList.value[i.type] + i.iot_deviceId,
+		path: equipmentUrlList.value[i.type] + i.equipmentNo,
 		query: {
-			data: i.data
+			equipmentNo: i.equipmentNo
 		}
 	})
 	
 }
-//1 注塑机 2 滚印机 3 注射器组装机 4 螺纹头组装机
+//1 注塑机 2 滚印机 3 组装机 4 螺纹头,99包装机
 const equipmentTypeList = ref({
 	1: '注塑机',
 	2: '滚印机',
-	3: '注射器组装机',
-	4: '螺纹头组装机'
+	3: '组装机',
+	4: '螺纹头',
+	99:"包装机",
 })
 const equipmentUrlList = ref({
 	1: '/main/injectionMoldingMachine',
-	2: '/main/rollerPrinter',
+	2: '/main/printingMachine/',
 	3: '/main/assemble/',
-	4: '/main/threadedHeadAssemblyMachine'
+	4: '/main/threadHead/',
+	99:"/main/packer/",
 })
-const getList = () => {
-	proxy.post('/tdaDevice/computerList').then(res => {
+window.getList = () => {
+	proxy.post('/tdaDevice/computerList',{closeLoading:true}).then(res => {
 		listData.value = res.data
-		console.log(res)
+		localStorage.setItem('listData', JSON.stringify(res.data))
+		setTimeout(() => {
+			getList()
+		}, 50000);
 	})
 }
-getList()
+
+if(!window.getList || localStorage.getItem('listData')){
+	window.getList()
+}
+if(localStorage.getItem('listData')){
+	listData.value = JSON.parse(localStorage.getItem('listData'))
+}
 </script>
 
 <style lang="scss" scoped>