Browse Source

报工界面优化

Lexie 1 year ago
parent
commit
9271a2b9d8

+ 1 - 0
src/pinia/modules/user.js

@@ -144,6 +144,7 @@ export const useUserStore = defineStore('user', () => {
         // const response = await getMachineMac({ addr:'68-ED-A4-26-5F-37'});
 		console.log(MAC)
 		const response = await getMachineMac({ addr:MAC});
+		// const response = await getMachineMac({ addr:'68-E8-A8-28-58-38'});
         console.log(response)
         if(response.data===null){
         	// ElMessage.error('请输入账号密码')

+ 4 - 4
src/utils/request.js

@@ -121,10 +121,10 @@ service.interceptors.response.use(
         //     localStorage.clear()
         //     router.push({ name: 'Login', replace: true })
         //   })
-		ElMessage({
-		  type: 'error',
-		  message: '请稍后重试'
-		})
+		// ElMessage({
+		//   type: 'error',
+		//   message: '请稍后重试'
+		// })
         break
       case 404:
         ElMessageBox.confirm(`

+ 5 - 3
src/view/layout/aside/historyComponent/history.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="router-history">
+  <div class="router-history" v-if="showLayout=== true" >
     <el-tabs
       v-model="activeValue"
       :closable="!(historys.length === 1 && $route.name === defaultRouter)"
@@ -62,7 +62,7 @@ defineOptions({
 
 const route = useRoute()
 const router = useRouter()
-
+const showLayout = ref(true)
 const getFmtString = (item) => {
   return item.name + JSON.stringify(item.query) + JSON.stringify(item.params)
 }
@@ -72,7 +72,9 @@ const activeValue = ref('')
 const contextMenuVisible = ref(false)
 
 const userStore = useUserStore()
-
+// if(userStore.userInfo.authorityId==1){
+// 	showLayout.value=false	
+// }
 const name = (item) => {
   return (
     item.name + JSON.stringify(item.query) + JSON.stringify(item.params)

+ 15 - 7
src/view/layout/index.vue

@@ -1,6 +1,6 @@
 <template>
   <el-container class="layout-cont">
-    <el-container :class="[isSider?'openside':'hideside',isMobile ? 'mobile': '']">
+    <el-container :class="[isSider?'openside':'hideside',isMobile ? 'mobile': '']" >
       <el-row
         :class="[isShadowBg && isMobile?'bg-black opacity-30 w-full h-full absolute top-0 left-0 z-[1001]':'']"
         @click="changeShadow()"
@@ -8,6 +8,7 @@
       <el-aside
         class="main-cont gva-aside"
         :style="{width:asideWidth()}"
+		v-if="showLayout=== true"
       >
         <div
           class="min-h-[60px] text-center transition-all duration-300 flex items-center justify-center gap-2"
@@ -27,7 +28,7 @@
         <Aside class="aside" />
       </el-aside>
       <!-- 分块滑动功能 -->
-      <el-main class="main-cont main-right">
+      <el-main :class="{ 'main-cont main-right': yourCondition }">
         <transition
           :duration="{ enter: 800, leave: 100 }"
           mode="out-in"
@@ -39,7 +40,7 @@
           >
             <el-row>
               <el-col>
-                <el-header class="header-cont">
+                <el-header class="header-cont" v-if="showLayout=== true">
                   <el-row class="p-0 h-full">
                     <el-col
                       :xs="2"
@@ -164,7 +165,7 @@
         <router-view
           v-if="reloadFlag"
           v-slot="{ Component }"
-          class="admin-box"
+		 :class="{ 'admin-box': yourCondition }"
         >
           <div
             v-loading="loadingFlag"
@@ -185,7 +186,6 @@
         <CommandMenu ref="command" />
       </el-main>
     </el-container>
-
   </el-container>
 </template>
 
@@ -204,7 +204,6 @@ import { useRouter, useRoute } from 'vue-router'
 import { useRouterStore } from '@/pinia/modules/router'
 import { fmtTitle } from '@/utils/fmtRouterTitle'
 import { useUserStore } from '@/pinia/modules/user'
-
 defineOptions({
   name: 'Layout',
 })
@@ -282,9 +281,18 @@ onMounted(() => {
     userStore.loadingInstance.close()
   }
 })
+const showLayout = ref(true)
+const yourCondition = ref(true)
 
 const userStore = useUserStore()
-// console.log(userStore.userInfo.authority.authorityName )
+console.log(userStore.userInfo.authorityId)
+// if(userStore.userInfo.authorityId==1){
+// 	showLayout.value=false
+// 	yourCondition.value=false
+// }else{
+// 	yourCondition.value=true
+// }
+	
 // console.log(userStore.userInfo.nickName )
 const asideWidth = () => {
   if (isMobile.value) {

+ 53 - 63
src/view/performance/chejianbaogong.vue

@@ -102,8 +102,8 @@
 	   border
 	
       :row-style="{ height: '20px'}"
-      :cell-style="{ padding: '0px' }"
-	  :header-row-style="{ height: '20px',color:'red' }"
+      :cell-style="{ padding: '0px'}"
+	  :header-row-style="{ height: '20px'}"
 	   style="width:100%;height: 30vh; "
 	   @row-dblclick="handleSelectClick"
 	 >
@@ -123,62 +123,62 @@
 </div>
           <div class="gva-table-box">
             <el-tabs v-model="activName" type="card" @tab-click="duohandleClick"   >
-                        <el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first" style="font-size: 14px;">
-                            <el-table ref="multipleTable"
-                                      :show-overflow-tooltip="true"
-                                      :row-style="{ height: '20px' }"
-                                      :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-                                      :header-cell-style="{ padding: '0px' }"
-                                      @row-click="yjupdateCompanyFunc"
-                                      :cell-class-name="sbzyqdplanUsageCellClass"
-                                      style="width: 100%; height: 330px; font-size: 14px;" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
-                                <el-table-column align="left" label="选择" prop="yj_yjno" width="80"/>
-                                <el-table-column align="left" label="工单编号|质量信息" prop="工单编号|质量信息" width="180" />
-                                <el-table-column align="left" label="印件资料" prop="印件资料" width="240" />
-                                <el-table-column align="left" label="工序名称" prop="工序名称" width="100" />
-                                <el-table-column align="left" label="计划产量/已完成" prop="计划产量/已完成" width="180"/>
-                                <el-table-column align="left" label="装版时数" prop="装版时数" width="100"/>
-                                <el-table-column align="left" label="工序产能" prop="工序产能" width="100"/>
-                                <el-table-column align="left" label="计划工时" prop="计划工时" width="100"/>
-                                <el-table-column align="left" label="计划生产时段" prop="计划生产时段" width="240" />
-                                <el-table-column align="left" label="排产备注" prop="排产备注" width="100" />
-                                <el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
-                            </el-table>
-                        </el-tab-pane>
+			<el-tab-pane label="设备作业清单" @click="showTable('印件资料')" name="first" style="font-size: 14px;">
+				<el-table ref="multipleTable"
+						  :show-overflow-tooltip="true"
+						  :row-style="{ height: '20px' }"
+						  :cell-style="{ padding: '0px'}" :header-row-style="{ height: '20px' }"
+						  :header-cell-style="{ padding: '0px' }"
+						  @row-click="yjupdateCompanyFunc"
+						  :cell-class-name="sbzyqdplanUsageCellClass"
+						  style="width: 100%; height: 330px; font-size: 14px;" border tooltip-effect="dark" :data="sbzyData" row-key="ID" @selection-change="handleSelectionChange">
+					<el-table-column align="left" label="选择" prop="yj_yjno" width="80"/>
+					<el-table-column align="left" label="工单编号|质量信息" prop="工单编号|质量信息" width="180" />
+					<el-table-column align="left" label="印件资料" prop="印件资料" width="240" />
+					<el-table-column align="left" label="工序名称" prop="工序名称" width="100" />
+					<el-table-column align="left" label="计划产量/已完成" prop="计划产量/已完成" width="180"/>
+					<el-table-column align="left" label="装版时数" prop="装版时数" width="100"/>
+					<el-table-column align="left" label="工序产能" prop="工序产能" width="100"/>
+					<el-table-column align="left" label="计划工时" prop="计划工时" width="100"/>
+					<el-table-column align="left" label="计划生产时段" prop="计划生产时段" width="240" />
+					<el-table-column align="left" label="排产备注" prop="排产备注" width="100" />
+					<el-table-column align="left" label="产品名称" prop="产品名称" width="240" />
+				</el-table>
+			</el-tab-pane>
 
 
                         <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
-                          <el-table ref="multipleTable"
-                                    :show-overflow-tooltip="true"
-                                    :row-style="{ height: '20px' }"
-                                    :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-                                    :header-cell-style="{ padding: '0px' }"
-                                    @row-dblclick="gyupdateCompanyFunc"
-                                    :row-class-name="rowClassStyle"
-                                    :cell-class-name="bzryplanUsageCellClass"
-                                    style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
-                                    @row-click="clickybupdate">
-                           <el-table-column type="selection" label="选择" width="55" />
-                            <el-table-column align="left" label="班组号" prop="班组号" width="80" />
-                            <el-table-column align="left" label="组员1" prop="0" width="240" />
-                            <el-table-column align="left" label="组员2" prop="1" width="240" />
-                            <el-table-column align="left" label="组员3" prop="2" width="240" />
-                            <el-table-column align="left" label="组员4" prop="3" width="240" />
-                            <el-table-column align="left" label="组员5" prop="4" width="100" />
-                            <el-table-column align="left" label="组员6" prop="5" width="100" />
-                            <el-table-column align="left" label="组员7" prop="6" width="100" />
-                            <el-table-column align="left" label="组员8" prop="7" width="100" />
-                            <el-table-column align="left" label="组员9" prop="8" width="100" />
-                            <el-table-column align="left" label="组员10" prop="9_正品版" width="120" />
-                          </el-table>
-                        </el-tab-pane>
+						  <el-table ref="multipleTable"
+									:show-overflow-tooltip="true"
+									:row-style="{ height: '20px' }"
+									:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+									:header-cell-style="{ padding: '0px' }"
+									@row-dblclick="gyupdateCompanyFunc"
+									:row-class-name="rowClassStyle"
+									:cell-class-name="bzryplanUsageCellClass"
+									style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
+									@row-click="clickybupdate">
+						   <el-table-column type="selection" label="选择" width="55" />
+							<el-table-column align="left" label="班组号" prop="班组号" width="80" />
+							<el-table-column align="left" label="组员1" prop="0" width="240" />
+							<el-table-column align="left" label="组员2" prop="1" width="240" />
+							<el-table-column align="left" label="组员3" prop="2" width="240" />
+							<el-table-column align="left" label="组员4" prop="3" width="240" />
+							<el-table-column align="left" label="组员5" prop="4" width="100" />
+							<el-table-column align="left" label="组员6" prop="5" width="100" />
+							<el-table-column align="left" label="组员7" prop="6" width="100" />
+							<el-table-column align="left" label="组员8" prop="7" width="100" />
+							<el-table-column align="left" label="组员9" prop="8" width="100" />
+							<el-table-column align="left" label="组员10" prop="9_正品版" width="120" />
+						  </el-table>
+						</el-tab-pane>
 
                         <el-tab-pane label="当班产量明细" @click="showsTable('印版资料')" name="third">
                         <el-table ref="multipleTable"
                                   highlight-current-row="true"
                                   :show-overflow-tooltip="true"
                                   :row-style="{ height: '20px' }"
-                                  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                                  :cell-style="{ padding: '0px'}" :header-row-style="{ height: '20px' }"
                                   :header-cell-style="{ padding: '0px' }"
                                   @row-dblclick="ybupdateCompanyFunc"
                                   style="width: 100%;height: 400px" border tooltip-effect="dark" :data="CLMXData" row-key="ID" @selection-change="handleSelectionChange"
@@ -211,7 +211,7 @@
                         <el-tab-pane label="检验记录" @click="showTable('技术资料附件')" name="fourth">
                         <el-table ref="multipleTable"
                                   :row-style="{ height: '20px' }"
-                                  :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+                                  :cell-style="{ padding: '0px'}" :header-row-style="{ height: '20px' }"
                                   :header-cell-style="{ padding: '0px' }"
                                   :show-overflow-tooltip="true"
                                   highlight-current-row="true"
@@ -328,7 +328,7 @@
             <div>
 			<el-table ref="multipleTable"
 			            :row-style="{ height: '20px' }"
-			            :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
+			            :cell-style="{ padding: '0px' ,color:'blue'}" :header-row-style="{ height: '20px' }"
 			            :header-cell-style="{ padding: '0px' }"
 			            :show-overflow-tooltip="true"
 			            highlight-current-row="true" @row-click="BZhandle"
@@ -3542,6 +3542,7 @@ const GetMachineMac = async (addr) => {
       treeData.value.push(newNode);
       CJMC=newNode.label
       JTMC = newNode.children[0].label;
+	  formData.value.机台号=JTMC
       FacilityProduction(addr);
     }
   }
@@ -4292,7 +4293,6 @@ const addBz = async() => {
   // selectedOption.value='YS-JY06-002||印品质量检测机(JP1020-18)'
   console.log(selectedOption.value)
   console.log(BZMC.value)
-  console.log(currentBz.value.ID)
   console.log(selectedOption.value.split('|')[0])
   const response = await MachineTeamAdd({
     sczl_jtbh:  selectedOption.value.split('|')[0],
@@ -4773,20 +4773,10 @@ const bzryplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
 /* 选中某行时的背景色*/
 :deep(.el-table__body tr.current-row)>td {
   background: #ff80ff !important;
-  
 }
 /*设备作业清单背景颜色*/
 :deep(.el-table__body .back-color-row) {
-  background: #ff80ff !important; 
-}
-:deep(.el-table__cell) {
-  color: red;
-}
-
-
-
-.el-input{
-	color:red,
+  background: #ff80ff !important;
 }
 
 </style>