Forráskód Böngészése

修复物资信息里可用寿命问题与作业执行的展开按钮

pm 11 hónapja
szülő
commit
d4800aba7b

+ 83 - 16
src/views/mes/job/jobplay/jobPlayDetail.vue

@@ -160,17 +160,30 @@
     </div>
     <div class="message-list">
       <div class="message_title">
-        <el-popover
-          placement="bottom"
-          width="100"
-          trigger="hover">
-          <div class="popover-content">
-            <el-button type="primary" class="changeIcon" icon="el-icon-s-operation" circle></el-button>
-            <el-button type="primary" class="changeIcon" icon="el-icon-s-operation" circle></el-button>
-            <el-button type="primary" class="changeIcon" icon="el-icon-s-operation" circle></el-button>
+        <div class="dropdown">
+          <el-tooltip class="item" effect="dark" content="展开" placement="left">
+            <button class="dropdown-button" @click="changeShowDropdown">
+              <i class="el-icon-s-operation"></i>
+            </button>
+          </el-tooltip>
+          <div class="dropdown-content" v-if="showDropdown">
+            <el-tooltip class="item" effect="dark" content="作业状态" placement="left">
+              <button class="dropdown-item">
+                <i class="el-icon-plus"></i>
+              </button>
+            </el-tooltip>
+            <el-tooltip class="item" effect="dark" content="上锁状态" placement="left">
+              <button class="dropdown-item">
+                <i class="el-icon-circle-plus"></i>
+              </button>
+            </el-tooltip>
+            <el-tooltip class="item" effect="dark" content="共锁状态" placement="left">
+              <button class="dropdown-item">
+                <i class="el-icon-circle-plus-outline"></i>
+              </button>
+            </el-tooltip>
           </div>
-          <el-button slot="reference" type="primary" class="changeIcon" icon="el-icon-s-operation" circle></el-button>
-        </el-popover>
+        </div>
         作业执行-操作日志
       </div>
       <el-timeline style="padding-top: 15px">
@@ -195,6 +208,7 @@ export default {
 
   data() {
     return {
+      showDropdown: false,//作业执行切换按钮
       jobTicket: [],
       lockUserList: [],
       colockUserList: [],
@@ -249,6 +263,10 @@ export default {
   },
 
   methods: {
+    changeShowDropdown() {
+      console.log('我点击率')
+      this.showDropdown = !this.showDropdown
+    },
     getJobPlayInfo() {
       let ticketId
       if (this.$route.query.ticketId) {
@@ -350,16 +368,65 @@ export default {
   font-weight: bolder;
 
 }
-.popover-content {
+
+.dropdown {
+  position: absolute;
+  left: 2px;
+  top: 7px;
+
+  display: inline-block;
+}
+
+.dropdown-button {
+  background-color: #409EFF;
+  color: white;
+  border: none;
+  border-radius: 50%;
+  width: 40px;
+  height: 40px;
+
+  cursor: pointer;
   display: flex;
-  flex-direction: column;
   align-items: center;
-  gap: 10px;
+  justify-content: center;
 }
-.changeIcon{
+
+.dropdown-button:hover {
+  background-color: #66b1ff;
+}
+
+.dropdown-content {
+  display: flex;
+  flex-direction: column;
   position: absolute;
-  left: 7px;
-  top: 7px;
+  background-color: transparent;
+  min-width: 160px;
+  //box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+  z-index: 1;
+  top: 53px;
+  left: -5px;
+}
+
+.dropdown-item {
+  background-color: #409EFF;
+  color: white;
+  border: none;
+  border-radius: 50%;
+  width: 40px;
+  height: 40px;
+  cursor: pointer;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+}
+
+.dropdown-item:hover {
+  background-color: #66b1ff;
+}
+
+.dropdown-item i {
+  font-size: 18px;
 }
 
 .text {

+ 3 - 1
src/views/mes/material/materialinformation/index.vue

@@ -151,7 +151,9 @@
       <el-table-column label="所属柜" align="center" prop="cabinetName" />
       <el-table-column label="可用寿命" align="center" prop="serviceLife">
         <template slot-scope="scope">
-          {{ formatDateserviceLife(scope.row.serviceLife) }}
+<!--          {{ formatDateserviceLife(scope.row.serviceLife) }}-->
+          {{ scope.row.serviceLife }}
+
         </template>
       </el-table-column>
       <el-table-column label="物资状态" align="center" prop="loanState">