Browse Source

首页样式 车间总机台状态

Lexie 1 year ago
parent
commit
ff022a4cc8

+ 9 - 9
src/api/yunyin/yunying.js

@@ -92,21 +92,21 @@ export const setProductStatus = (data) => {
     })
 }
 //8.1获取产品工艺数量
-export const getGyTotal = (data) => {
+export const getGyTotal = (params) => {
     return service({
         url: '/mes_server/product/getGyTotal',
         method: 'get',
+        params
+    })
+}
+// 8.2产品工艺复制(数据库不支持插入数据)
+export const copyProductGy = (data) => {
+    return service({
+        url: '/mes_server/product/copyProductGy',
+        method: 'post',
         data
     })
 }
-//8.2产品工艺复制(数据库不支持插入数据)
-// export const copyProductGy = (data) => {
-//     return service({
-//         url: '/mes_server/product/copyProductGy',
-//         method: 'post',
-//         data
-//     })
-// }
 //9.工艺方案更名
 export const editGyName = (data) => {
     return service({

BIN
src/assets/保养.png


BIN
src/assets/待单.png


BIN
src/assets/待料.png


BIN
src/assets/打样.png


BIN
src/assets/测试.png


BIN
src/assets/生产.png


BIN
src/assets/维修.png


BIN
src/assets/装版.png


+ 1 - 1
src/view/dashboard/dashboardCharts/echartsLine.vue

@@ -128,7 +128,7 @@ onUnmounted(() => {
   .dashboard-line {
     background-color: #fff;
     height: 360px;
-    width: 90%;
+    width: 80%;
   }
   .dashboard-line-title {
     font-weight: 600;

+ 1 - 0
src/view/dashboard/dashboardTable/dashboardTable.vue

@@ -66,6 +66,7 @@ getindex()
         display: flex;
         justify-content: space-between;
         margin-top: 10px;
+		width: 80%;
         .key-box{
           justify-content: center;
         }

+ 100 - 133
src/view/dashboard/index.vue

@@ -1,68 +1,36 @@
 <template>
   <div class="page">
     <div class="gva-card-box">
-      <div class="gva-card gva-top-card">
-        <div class="gva-top-card-left">
-          <el-row class="my-8 w-[500px] flex">
-            <el-col
-              :span="8"
-              :xs="24"
-              :sm="6"
-            >
-              <div class="flex items-center">
-				  <el-icon class="dashboard-icon">
-					<comment />
-				  </el-icon>
-                <label :for="id">计划中工单数:{{labelValue1}}</label>
-              </div>
-            </el-col>
-            <el-col
-              :span="8"
-              :xs="24"
-              :sm="6"
-            >
-              <div class="flex items-center">
-				  <el-icon class="dashboard-icon">
-				   <comment />
-				  </el-icon>
-                <label  :for="id">排程中工单数: {{labelValue2 }}</label>
-              </div>
-            </el-col>
-            <el-col
-              :span="8"
-              :xs="24"
-              :sm="6"
-            >
-              <div class="flex items-center">
-				  <el-icon class="dashboard-icon">
-				   <comment />
-				  </el-icon>
-                <label :for="id">制程中工单数:{{ labelValue3 }}</label>
-              </div>
-            </el-col>
-            <el-col
-              :span="8"
-              :xs="24"
-              :sm="6"
-            >
-              <div class="flex items-center">
-				  <el-icon class="dashboard-icon">
-				   <comment />
-				  </el-icon>
-                <label :for="id">已完工工单数:{{labelValue4 }}</label>
-              </div>
-            </el-col>
-          </el-row>
+        <div class="gva-card gva-top-card">
+          <div class="gva-top-card-content flex items-center">
+            <div class="dashboard-item">
+              <el-icon class="dashboard-icon">
+                <comment />
+              </el-icon>
+              <label :for="id" class="label-text">计划中工单数: {{ labelValue1 }}</label>
+            </div>
+            <div class="dashboard-item">
+              <el-icon class="dashboard-icon">
+                <comment />
+              </el-icon>
+              <label :for="id" class="label-text">排程中工单数: {{ labelValue2 }}</label>
+            </div>
+            <div class="dashboard-item">
+              <el-icon class="dashboard-icon">
+                <comment />
+              </el-icon>
+              <label :for="id" class="label-text">制程中工单数: {{ labelValue3 }}</label>
+            </div>
+            <div class="dashboard-item">
+              <el-icon class="dashboard-icon">
+                <comment />
+              </el-icon>
+              <label :for="id" class="label-text">已完工工单数: {{ labelValue4 }}</label>
+            </div>
+          </div>
+          <img src="@/assets/dashboard.png" class="gva-top-card-right" alt>
         </div>
-
-		
-        <img
-          src="@/assets/dashboard.png"
-          class="gva-top-card-right"
-          alt
-        >
       </div>
-    </div>
     <div class="gva-card-box">
       <div class="gva-card quick-entrance">
         <div class="gva-card-title">快捷入口</div>
@@ -94,26 +62,26 @@
       </div>
     </div>
     <div class="gva-card-box">
-      <div class="gva-card">
-        <div class="gva-card-title">数据统计</div>
-        <div class="p-4">
-          <el-row :gutter="20">
-            <el-col
-              :xs="24"
-              :sm="18"
-            >
-              <echarts-line />
-            </el-col>
-            <el-col
-              :xs="24"
-              :sm="6"
-            >
-              <dashboard-table />
-            </el-col>
-          </el-row>
+        <div class="gva-card">
+          <div class="gva-card-title">数据统计</div>
+          <div class="p-4">
+            <el-row :gutter="20">
+              <el-col
+                :xs="24"
+                :sm="16" <!-- 更改sm属性值为16,占据更少的空间 -->
+              >
+                <echarts-line />
+              </el-col>
+              <el-col
+                :xs="24"
+                :sm="8" <!-- 更改sm属性值为8,占据更少的空间 -->
+              >
+                <dashboard-table />
+              </el-col>
+            </el-row>
+          </div>
         </div>
       </div>
-    </div>
   </div>
 </template>
 
@@ -203,64 +171,63 @@ const toTarget = (name) => {
 
 <style lang="scss" scoped>
 .page {
-    @apply p-0;
-    .gva-card-box{
-      @apply p-4;
-      &+.gva-card-box{
-        @apply pt-0;
-      }
-    }
-    .gva-card {
-      @apply box-border bg-white rounded h-auto px-6 py-8 overflow-hidden shadow-sm;
-      .gva-card-title{
-        @apply pb-5 border-t-0 border-l-0 border-r-0 border-b border-solid border-gray-100;
-      }
+  @apply p-0;
+}
+.gva-card-box {
+  @apply p-4;
+  & + .gva-card-box {
+    @apply pt-0;
+  }
+}
+.gva-card {
+  @apply box-border bg-white rounded h-auto px-6 py-8 overflow-hidden shadow-sm;
+  .gva-card-title {
+    @apply pb-5 border-t-0 border-l-0 border-r-0 border-b border-solid border-gray-100;
+  }
+}
+.gva-top-card {
+  @apply h-72 flex items-center justify-between text-gray-500;
+}
+.gva-top-card-content {
+  display: flex; /* 使用Flex布局 */
+}
+.dashboard-item {
+  display: flex; /* 每个dashboard-item内部也使用Flex布局 */
+  align-items: center; /* 垂直居中对齐 */
+  margin-right: 20px; /* 调整元素之间的间距 */
+  font-size: 18px; /* 设置字体大小为18px */
+}
+.dashboard-icon {
+  @apply text-xl mr-2 text-blue-400;
+}
+.label-text {
+  @apply ml-2;
+}
+.gva-top-card-right {
+  height: 600px;
+  width: 600px;
+  margin-top: 28px;
+}
+::v-deep(.el-card__header) {
+  @apply p-0 border-gray-200;
+}
+.card-header {
+  @apply pb-5 border-b border-solid border-gray-200 border-t-0 border-l-0 border-r-0;
+}
+.quick-entrance-items {
+  @apply flex items-center justify-center text-center text-gray-800;
+  .quick-entrance-item {
+    @apply px-8 py-6 flex items-center flex-col transition-all duration-100 ease-in-out rounded-lg cursor-pointer;
+    &:hover {
+      @apply shadow-lg;
     }
-    .gva-top-card {
-        @apply h-72 flex items-center justify-between text-gray-500;
-        &-left {
-          @apply h-full flex flex-col w-auto;
-            &-title {
-              @apply text-3xl text-gray-600;
-            }
-            &-dot {
-              @apply mt-4 text-gray-600 text-lg;
-            }
-            &-item{
-              +.gva-top-card-left-item{
-				 
-                margin-top: 24px;
-              }
-              margin-top: 14px;
-            }
-        }
-        &-right {
-            height: 600px;
-            width: 600px;
-            margin-top: 28px;
-        }
+    &-icon {
+      @apply flex items-center h-16 w-16 rounded-lg justify-center mx-0 my-auto text-2xl;
     }
-     ::v-deep(.el-card__header){
-          @apply p-0  border-gray-200;
-        }
-        .card-header{
-          @apply pb-5 border-b border-solid border-gray-200 border-t-0 border-l-0 border-r-0;
-        }
-    .quick-entrance-items {
-      @apply flex items-center justify-center text-center text-gray-800;
-        .quick-entrance-item {
-          @apply px-8 py-6 flex items-center flex-col transition-all duration-100 ease-in-out rounded-lg cursor-pointer;
-          &:hover{
-            @apply shadow-lg;
-          }
-            &-icon {
-              @apply flex items-center h-16 w-16 rounded-lg justify-center mx-0 my-auto text-2xl;
-            }
-            p {
-                @apply mt-2.5;
-            }
-        }
+    p {
+      @apply mt-2.5;
     }
+  }
 }
 // .dashboard-icon {
 //   @apply flex items-center text-xl mr-2 text-blue-400;

+ 1 - 1
src/view/performance/chejianbaogong.vue

@@ -2487,7 +2487,7 @@ function onstatus() {
 }
 function onClear() {
 	huanxingVisible.value=true
-	 RemodelGetTab()
+	RemodelGetTab()
 }
 const RemodelGetTab = async() => {
   const response = await remodelGetTab()

File diff suppressed because it is too large
+ 529 - 316
src/view/yunyin/chanpinziliao/chanpinziliao.vue


+ 365 - 39
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -11,13 +11,14 @@
 			<el-button type="primary" @click="onstatus" >设置机台状态</el-button>
 			<el-button type="primary" @click="oncomplaints" >客诉记录</el-button>
 			<el-button type="primary" @click="onClear" >换型清场</el-button>
+			<el-button type="primary" @click="onClear2" >换型清场</el-button>
 		</header>
     <el-container>
       <el-aside width="200px">
         <div class="JKWTree-tree">
 
           <h3  >设备运行跟踪</h3>
-          <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+          <el-tree :data="treeData"  :props="defaultProps" @node-click="handleNodeClick"></el-tree>
         </div>
 
       </el-aside>
@@ -1156,13 +1157,13 @@
 		  v-model="huanxingVisible"
 		  title="换型清场"
 		  destroy-on-close
-		  width="1100px"
-		  style="height: 78%;"
+		  width="145vh"
+		  style="height: 78vh;"
 		>
 		  <div style="display: flex;">
 		    <div style="flex: 0.1;">
-		      <el-aside width="180px" style="margin: 0;">
-		        <div class="JKWTree-tree" style="height: 55vh; border-right: 1px solid #ebeef5;">		          
+		      <el-aside width="26vh" style="margin: 0;">
+		        <div class="JKWTree-tree" style="height: 60vh; border-right: 1px solid #ebeef5;">
 		          <el-tree :data="huanxingtreeData" :props="defaultProps" highlight-current="true"
 		            @node-click="huanxingNodeClick"></el-tree>
 		        </div>
@@ -1170,19 +1171,164 @@
 		    </div>
 		    <div v-if="huanxingstatus" style="flex: 0; margin: 0;">
 		      <el-tabs v-model="activNames" type="card" @tab-click="handleClick">
-		        <el-tab-pane label="换型清场明细信息"  @click="showTable('换型清场明细信息')"  name="first">
-		          
+		        <el-tab-pane label="换型清场明细信息" @click="showTable('换型清场明细信息')"  name="first">
+					<div style="width:110vh">
+						<el-descriptions :column="9" border>
+						  <el-descriptions-item :span="9">
+							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="日期:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
+									<el-input v-model="huanxingData.日期"  placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
+							      </el-form-item>
+							    </el-col>
+								<el-col :span="2" style="margin-bottom: 0px;margin-top: 0px;">
+		
+								</el-col>
+							    <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+									<el-form-item label="机台编号:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
+									 <el-input v-model="huanxingData.机台编号"  placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
+									</el-form-item>
+							    </el-col>
+								<el-col :span="1" style="margin-bottom: 0px;margin-top: 0px;">
+		
+								</el-col>
+							    <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="班组:" prop="id" style="margin-top=0px; margin-bottom: 0px;">
+									<el-input v-model="huanxingData.班组"  placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
+							      </el-form-item>
+							    </el-col>
+							  </el-row>
+						  </el-descriptions-item>
+						  <el-descriptions-item label="清场原因 从" :span="9">
+						    <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+						      <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
+						        <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+						          <el-input v-model="huanxingData.工单编号A"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+						        </el-form-item>
+						      </el-col>
+						      <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
+						        <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+						          <el-input v-model="huanxingData.印件名称A"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+						        </el-form-item>
+						      </el-col>
+						    </el-row>
+							<el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							  <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-input v-model="huanxingData.印件工序A"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+							    </el-form-item>
+							  </el-col>
+							  <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+							  </el-col>
+							  <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-input v-model="huanxingData.码包号A"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+							    </el-form-item>
+							  </el-col>
+							</el-row>
+						  </el-descriptions-item>
+						  <el-descriptions-item label="清场原因 到" :span="9">
+						    <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+						      <el-col :span="8" style="margin-bottom: 0px;margin-top: 0px;">
+						        <el-form-item label="工单编号:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+						          <el-input v-model="huanxingData.工单编号B"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+						        </el-form-item>
+						      </el-col>
+						      <el-col :span="16" style="margin-bottom: 0px;margin-top: 0px;">
+						        <el-form-item label="印件名称:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+						          <el-input v-model="huanxingData.印件名称B"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+						        </el-form-item>
+						      </el-col>
+						    </el-row>
+						    <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+						      <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+						        <el-form-item label="印件工序:" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+						          <el-input v-model="huanxingData.印件工序B"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+						        </el-form-item>
+						      </el-col>
+						      <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+						      </el-col>
+						      <el-col :span="6" style="margin-bottom: 0px;margin-top: 0px;">
+						        <el-form-item label="码包号" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+						          <el-input v-model="huanxingData.码包B"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+						        </el-form-item>
+						      </el-col>
+						    </el-row>
+						  </el-descriptions-item>
+						  <el-descriptions-item label="清场确认项目" :span="9">
+		
+							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="菲林_标样_签样品_留样品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-checkbox v-model="huanxingData.项目1"></el-checkbox>
+							      </el-form-item>
+							    </el-col>
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="版材_纸张_电化铝_油墨" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-checkbox v-model="huanxingData.项目2"></el-checkbox>
+							      </el-form-item>
+							    </el-col>
+							  </el-row>
+		
+							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="过版纸_废品_次品" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-checkbox v-model="huanxingData.项目3"></el-checkbox>
+							      </el-form-item>
+							    </el-col>
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="半成品_成品_零头" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-checkbox v-model="huanxingData.项目4"></el-checkbox>
+							      </el-form-item>
+							    </el-col>
+							  </el-row>
+		
+		
+							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="操作台桌面_抽屉_地面" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-checkbox v-model="huanxingData.项目5"></el-checkbox>
+							      </el-form-item>
+							    </el-col>
+							  </el-row>
+		
+		
+						  </el-descriptions-item>
+						  <el-descriptions-item label="清场确认人" :span="9">
+							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="机长签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-input v-model="huanxingData.机长"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+							      </el-form-item>
+							    </el-col>
+							  </el-row>
+							  <el-row :gutter="24" style="margin-bottom: 0px;margin-top: 0px;">
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="带班主管签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-input v-model="huanxingData.班长"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+							      </el-form-item>
+							    </el-col>
+							    <el-col :span="12" style="margin-bottom: 0px;margin-top: 0px;">
+							      <el-form-item label="质量巡查员签字" prop="id" style="margin-bottom: 0px;margin-top: 0px;">
+							        <el-input v-model="huanxingData.质量巡查员"  placeholder="" style="margin-bottom: 0px;margin-top: 0px;"/>
+							      </el-form-item>
+							    </el-col>
+							  </el-row>
+						  </el-descriptions-item>
+						</el-descriptions>
+					</div>
+		
 		        </el-tab-pane>
-		      
-		        <el-tab-pane label="当前设备换型记录" style="width: 110%;"  @click="showTable('当前设备换型记录')"  name="second">
+		
+		        <el-tab-pane label="当前设备换型记录"  @click="showTable('当前设备换型记录')"  name="second">
 		          <el-table
 		            tooltip-effect="dark"
 		            :data="huanxingselectData"
-		            row-key="ID" 
+		            row-key="ID"
 		            highlight-current-row="true"
 		          	:show-overflow-tooltip="true"
 		            border  @row-click="dianjianhandle"
-		            style="width:30%; height:50vh;"
+		            style="width:115vh; height:50vh;"
 		            @row-dblclick="handleSelectClick"
 		            :row-class-name="rowClassName"
 		          >
@@ -1298,10 +1444,20 @@
 		  </div>
 		</el-dialog>
 		
+		<el-dialog v-model="MachineVisible" :before-close="closeMachineVisible" :title="type === '0' ? '新增' : '机台状态显示'"
+		  destroy-on-close width="80%" style="height: 100%;">
+		  <div class="button-container">
+		    <button v-for="(item, index) in machineData" :key="index" class="custom-button" @click="handleButtonClick(item.设备编号)">
+		      <img :src="`/src/assets/${item.状态}.png`" :alt="altText" style="max-width: 100%; height: auto;"/>
+		      <span style="margin-top: 8px;">{{ item.设备编号 + ' - ' + item.设备名称 }}</span>
+		    </button>
+		  </div>
+		</el-dialog>
+		
 		<Shebeizhuangtai
 		  v-if="dialogSbyxgl"
 		  v-model="dialogSbyxgl"
-		  title="【01.30 08:30】【JY01#--海德堡对开八色平版胶印机(JY08-01)】【2311116-->钻石(荷花)盒包装纸】【01--胶印】"
+		  :title="titinfo"
 		  :formData="formData"
 		/>
 		
@@ -1313,7 +1469,6 @@
 
 
 
-
   </div>
 </template>
 
@@ -1365,6 +1520,7 @@ import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDow
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { ref, reactive } from 'vue'
 
+
 defineOptions({
     name: 'Company'
 })
@@ -1376,6 +1532,7 @@ const yinbantreeData=ref([])
 let  dianjiantreeData;
 let JTMC=ref()
 let date=ref()
+let titinfo=ref()
 let JTMCOn=ref()
 let dateOn=ref()
 const  activName  = ref('first')
@@ -1389,15 +1546,16 @@ const handleNodeClick = (nodeData,node) => {
   //存放当前节点的nodeId
    if (nodeData.level === 1) {
         console.log(node.label); // 第一级节点
+		CJMC.value=node.label
+		MachinelList()
+		// MachineVisible.value=true
       } else if (nodeData.level === 2) {
         console.log(node.label); // 第二级节点
 		JTMC=node.label.split("-")[0]
 		JTMCOn.value=true
 		dateOn.value=false
 		FacilityProduction()
-		FacilityWorklist()
-		
-		
+		FacilityWorklist()		
 		// FacilityTeam(JTMC)
 		// console.log('123')
 		// console.log(JTMC)
@@ -1419,27 +1577,124 @@ const handleNodeClick = (nodeData,node) => {
           console.log(node.label); // 第三级节点
 	   }      
 }
+const MachineVisible = ref(false)
+const machineData = reactive([])
+
+const MachinelList = async () => {
+  const response = await MachineDetailList({workshop:CJMC.value});
+  if (response.code === 0) {
+	machineData.splice(0, machineData.length, ...response.data);
+	console.log(machineData)
+	// return require(`@/assets/${machineData.状态}.png`);
+	
+	MachineVisible.value=true
+  }
+}
+
+//设置机台状态
+function handleButtonClick(deviceId) {
+	 console.log(deviceId);
+	 MachineVisible.value=false
+	 // dialogSbyxgl.value=true
+	 JTMC=deviceId.split("-")[0]
+	 JTMCOn.value=true
+	 dateOn.value=false
+	 console.log(JTMC)
+	 GetdialogSbyxgl()
+	 
+	 // GetdialogSbyxgl(deviceId)
+	 
+}
+const GetdialogSbyxgl = async () => {
+    const response = await facilityProduction({machine:JTMC});
+    if (response.code === 0) {
+    	console.log(response)
+    	// 填充formData对象的基本字段
+    	 //    formData.value.工单编号 = response.data.工单编号;
+    	 //    formData.value.印件编号 = response.data.印件号;
+    	 //    formData.value.工序名称 = response.data.工序名称;
+    	 //    formData.value.产品名称 = response.data.产品名称;
+    		// formData.value.班组 = response.data.班组编号;
+    		formData.value.工单编号 = response.data.工单编号;
+    		formData.value.印件号 = response.data.印件号;
+    		formData.value.工序号 = response.data.工序名称.substring(0,2);
+    		formData.value.工序名称 = response.data.工序名称;
+    		formData.value.产品名称 = response.data.产品名称;
+    		formData.value.班组Id=response.data.班组Id
+    		formData.value.machine=JTMC
+    		formData.value.状态=response.data.状态
+			let time = new Date();
+			time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
+			titinfo = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
+			titinfo+='【'+response.data.工单编号+response.data.产品名称+'】'+response.data.工序名称
+    		let sczl_bhkey=''
+    		let sczl_namekey=''
+    		if (response.data.班组成员) {
+    		  for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
+    						 sczl_bhkey=`sczl_bh${i+1}`
+    						 sczl_namekey=`sczl_name${i+1}`
+    		    formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
+    		    formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
+    			console.log(response.data.班组成员[i]['编号'])
+    			classbz.value[i]=response.data.班组成员[i]['编号']
+    		  }
+    		}
+    		formData.value.class=classbz.value.join(',')
+    		console.log(formData.value.class)
+    		formData.value.JTMC=JTMC
+    		const responses = await MachineDetailList({workshop:'胶印车间'});
+    		if(responses.code===0){
+    				   responses.data.map(item=>{
+    					   if(item.设备编号==JTMC){
+    						   formData.value.status=item.状态
+    					   }
+    				   })
+    		}
+    		// console.log(formData.value.工单编号)
+    		
+    }
+    FacilityWorklist()
+	onstatus()
+}
+
+// const getImagePath = async (machineData.状态) => {
+//   return require(`@/assets/${status}.png`);
+// }
+const classbz=ref([])
 //当前生产订单
 const FacilityProduction = async () => {
   const response = await facilityProduction({machine:JTMC});
   if (response.code === 0) {
 	console.log(response)
 	// 填充formData对象的基本字段
-	    formData.value.工单编号 = response.data.工单编号;
-	    formData.value.印件编号 = response.data.印件号;
-	    formData.value.工序名称 = response.data.工序名称;
-	    formData.value.产品名称 = response.data.产品名称;
-		formData.value.班组 = response.data.班组编号;
+	 //    formData.value.工单编号 = response.data.工单编号;
+	 //    formData.value.印件编号 = response.data.印件号;
+	 //    formData.value.工序名称 = response.data.工序名称;
+	 //    formData.value.产品名称 = response.data.产品名称;
+		// formData.value.班组 = response.data.班组编号;
+		formData.value.工单编号 = response.data.工单编号;
+		formData.value.印件号 = response.data.印件号;
+		formData.value.工序号 = response.data.工序名称.substring(0,2);
+		formData.value.工序名称 = response.data.工序名称;
+		formData.value.产品名称 = response.data.产品名称;
+		formData.value.班组Id=response.data.班组Id
+		formData.value.machine=JTMC
+		formData.value.状态=response.data.状态
+		
 		let sczl_bhkey=''
 		let sczl_namekey=''
 		if (response.data.班组成员) {
-		  for (let i = 1; i <= Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
-						 sczl_bhkey=`sczl_bh${i}`
-						 sczl_namekey=`sczl_name${i}`
+		  for (let i = 0; i < Math.min(Object.keys(response.data.班组成员).length, 6); i++) {
+						 sczl_bhkey=`sczl_bh${i+1}`
+						 sczl_namekey=`sczl_name${i+1}`
 		    formData.value[sczl_bhkey] = response.data.班组成员[i]['编号'];
 		    formData.value[sczl_namekey] = response.data.班组成员[i]['姓名'];
+			console.log(response.data.班组成员[i]['编号'])
+			classbz.value[i]=response.data.班组成员[i]['编号']
 		  }
 		}
+		formData.value.class=classbz.value.join(',')
+		console.log(formData.value.class)
 		formData.value.JTMC=JTMC
 		const responses = await MachineDetailList({workshop:'胶印车间'});
 		if(responses.code===0){
@@ -1522,6 +1777,8 @@ const FacilityDetail = async () => {
 	console.log(formData.value.工单编号)
 	console.log('123123')
 	console.log(formData.value.班组)
+	formData.value.production_now=0
+	formData.value.production_all=0
   // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: formData.value.班组 });
    const response = await facilityDetail({ machine: 'JY01#', Gd_gdbh: '2312191', team: 'A班' });
   // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
@@ -1529,6 +1786,8 @@ const FacilityDetail = async () => {
 	console.log('123123')
     console.log(response);
     CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
+	formData.value.production_now=response.data[0].产量
+	formData.value.production_all=response.data.total.产量
   }
 };
 //员工编号回车事件
@@ -1585,6 +1844,8 @@ const pageSize = ref(10)
 const tableData = ref([])
 const searchInfo = ref({})
 const xunchaVisible = ref(false)
+
+
 const xunchatreeData=ref([{label: '现场巡查记录',} ])
 
 // 重置
@@ -1753,20 +2014,21 @@ function onstatus() {
 	 // ReportProduceInfo()
 }
 
+
 //设置机台状态
 const SetMachineStatus = async () => {
-  const response = await setMachineStatus({
-	  machine:'JY03',
-	  gy_name:'02-胶印〖白、黑、哑油【预干】、NT光油',
-	  order:'2311114',
-	  yjno:'1',
-	  class:'ZM00545,ZM01351,ZM01170',
-	  status:'维修',
-	  production_now:'',
-	  production_all:'',
-  });
-  if (response.code === 0) {
-  }
+  // const response = await setMachineStatus({
+	 //  machine:'JY03',
+	 //  gy_name:'02-胶印〖白、黑、哑油【预干】、NT光油',
+	 //  order:'2311114',
+	 //  yjno:'1',
+	 //  class:'ZM00545,ZM01351,ZM01170',
+	 //  status:'维修',
+	 //  production_now:'',
+	 //  production_all:'',
+  // });
+  // if (response.code === 0) {
+  // }
 }
 
 //客诉记录
@@ -1815,6 +2077,9 @@ function onClear() {
 	huanxingVisible.value=true
 	 RemodelGetTab()
 }
+function onClear2() {
+	console.log(formData.value.class)
+}
 const RemodelGetTab = async() => {
   const response = await remodelGetTab()
   let arr=[]
@@ -1839,12 +2104,46 @@ const RemodelGetTab = async() => {
 }
 
 const huanxingNodeClick = (node) => {
+  //存放当前节点的nodeId
   //存放当前节点的nodeId
   if(node.machine){
-	  huanxingstatus.value=true
-	  modelChangeRecord(node.machine)
+  	  // console.log(node.label.split('/')[1])
+  	  huanxingstatus.value=true
+  	  remodelDetail(node.label.split('/')[1])
+  	  modelChangeRecord(node.machine)
   }else{
-	  console.log('2')
+  	  console.log('2')
+  }
+}
+const remodelDetail = async (val) => {
+  const response = await RemodelDetail({UniqId:val});
+  if (response.code === 0) {
+	huanxingData.value=response.data
+	if(response.data.项目1==1){
+		huanxingData.value.项目1=true
+	}else{
+		huanxingData.value.项目1=false
+	}
+	if(response.data.项目2==1){
+		huanxingData.value.项目2=true
+	}else{
+		huanxingData.value.项目2=false
+	}
+	if(response.data.项目3==1){
+		huanxingData.value.项目3=true
+	}else{
+		huanxingData.value.项目3=false
+	}
+	if(response.data.项目4==1){
+		huanxingData.value.项目4=true
+	}else{
+		huanxingData.value.项目4=false
+	}
+	if(response.data.项目5==1){
+		huanxingData.value.项目5=true
+	}else{
+		huanxingData.value.项目5=false
+	}
   }
 }
 const modelChangeRecord = async (val) => {
@@ -2542,6 +2841,33 @@ const enterDialog = async () => {
 </script>
 
 <style>
+	/* .button-container {
+	  display: flex;
+	  flex-wrap: wrap;
+	} */
+	
+	.button-container {
+	  display: flex;
+	  flex-wrap: wrap;
+	  justify-content: flex-start; /* Align buttons from left to right */
+	}
+	
+	.custom-button {
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  text-align: center; /* Center the text horizontally */
+	  flex: 0 0 150px; /* Set the width of each button */
+	  height: 170px; /* Allow the height to adjust based on content */
+	  margin: 7px; /* Set spacing between buttons */
+	}
+	
+	.custom-button img {
+	  max-width: 100%; /* Ensure the image doesn't exceed the button width */
+	}
+
+
+
 .JKWTree-container {
   display: flex;
 }

Some files were not shown because too many files changed in this diff