huang_an 2 년 전
부모
커밋
72513fc83e
3개의 변경된 파일551개의 추가작업 그리고 530개의 파일을 삭제
  1. 10 10
      src/views/maintenance/components/redeployOther.vue
  2. 383 360
      src/views/maintenance/equipment/work/details.vue
  3. 158 160
      src/views/maintenance/equipment/work/index.vue

+ 10 - 10
src/views/maintenance/components/redeployOther.vue

@@ -75,7 +75,7 @@
       //   required: true
       // }
     },
-    data () {
+    data() {
       return {
         visible: false,
         treeList: [],
@@ -126,9 +126,9 @@
         ]
       };
     },
-    async created () {},
+    async created() {},
     methods: {
-      open (row) {
+      open(row) {
         this.row = row;
         this.name = '';
         this.groupId = '';
@@ -138,23 +138,23 @@
       },
 
       //重置
-      reset () {
+      reset() {
         this.name = '';
         this.search();
       },
       // 搜索
-      search () {
+      search() {
         this.$refs.tableRef.reload();
       },
 
-      deptClick (data) {
+      deptClick(data) {
         if (data) {
           this.$refs.tableRef.reload();
         }
       },
 
       // 获取审核人列表、巡点检人员
-      async datasource ({ page, limit, where, order }) {
+      async datasource({ page, limit, where, order }) {
         this.selectedRow = {};
         // 如果传了参数就是获取巡点检人员数据
         return getUserPage({
@@ -167,14 +167,14 @@
       },
 
       // 表格选中行
-      handleChange (row) {
+      handleChange(row) {
         console.log(row);
         if (row) {
           this.selectedRow = row;
         }
       },
 
-      async submit () {
+      async submit() {
         if (this.selectedRow.id) {
           let params = {
             acceptUserId: this.selectedRow.id,
@@ -188,7 +188,7 @@
           return this.$message.warning('请选择转派人员');
         }
       },
-      cancel () {
+      cancel() {
         this.visible = false;
       }
     }

+ 383 - 360
src/views/maintenance/equipment/work/details.vue

@@ -2,14 +2,14 @@
   <!-- 保养工单审批 -->
   <div class="page">
     <el-form label-width="100px">
-<!--      <div class="page-title">
+      <!--      <div class="page-title">
         <div class="page-title-div">
           <el-page-header @back="goBack" content="工单详情">
           </el-page-header>
         </div>
       </div> -->
       <!-- tab切换 -->
-<!--      <div class="switch">
+      <!--      <div class="switch">
         <div class="switch_left">
           <ul>
             <li :class="{ active: num == 1 }" @click="tab(1)">详情</li>
@@ -22,11 +22,11 @@
 
       <div class="content-detail" v-show="num == 1">
         <div class="basic-details">
-					<HeaderTitle title="基本信息" size="16px"></HeaderTitle>
+          <HeaderTitle title="基本信息" size="16px"></HeaderTitle>
           <el-row>
             <el-col :span="8">
               <el-form-item label="工单单号">
-                <span> {{ data.workOrderCode }} </span>
+                <span> {{ data.code }} </span>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -41,7 +41,7 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="保养部门">
-                <span> {{ data.executorDeptName }} </span>
+                <span> {{ data.executeGroupName }} </span>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -72,7 +72,7 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="创建人部门">
-                <span> {{ data.createOrgName }} </span>
+                <span> {{ data.createGroupName }} </span>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -94,34 +94,34 @@
         </div>
 
         <div class="basic-details">
-					<HeaderTitle title="保养明细" size="16px"></HeaderTitle>
+          <HeaderTitle title="保养明细" size="16px"></HeaderTitle>
           <div class="maintain_equipment_info_content">
             <div
               class="equipment_item"
-              v-for="item in data.planEquiList"
+              v-for="item in data.deviceList"
               :key="item.id"
             >
               <div class="equipment_info">
                 <div class="item_info">
                   <span class="item_label">设备编码</span>
-                  <span class="item_value">{{ item.equiCode }}</span>
+                  <span class="item_value">{{ item.code }}</span>
                 </div>
                 <div class="item_info">
                   <span class="item_label">设备名称</span>
-                  <span class="item_value">{{ item.equiName }}</span>
+                  <span class="item_value">{{ item.name }}</span>
                 </div>
                 <div class="item_info">
                   <span class="item_label">设备型号</span>
-                  <span class="item_value">{{ item.equiModel }}</span>
+                  <span class="item_value">{{ item.model }}</span>
                 </div>
                 <div class="item_info">
                   <span class="item_label">设备位置</span>
-                  <span class="item_value">{{ item.equiLocation }}</span>
+                  <span class="item_value">{{ item.location }}</span>
                 </div>
               </div>
               <p>操作事项</p>
               <div class="matter_info">
-                <el-table :data="item.itemList" border>
+                <el-table :data="item.workItems" border>
                   <el-table-column label="序号" align="center" width="80">
                     <template slot-scope="scope">
                       <span>{{ scope.$index + 1 }}</span>
@@ -138,22 +138,37 @@
                       <span v-if="row.isNormal == 1">正常</span>
                     </template>
                   </el-table-column>
-                  <el-table-column label="结果" prop="resultText" />
+                  <el-table-column label="结果" prop="result" />
                 </el-table>
               </div>
               <p>备品备件</p>
               <div class="matter_info">
-                <el-table :data="item.stockOutApplyPartList" border>
+                <el-table :data="item.sparePart" border>
                   <el-table-column label="序号" align="center" width="80">
                     <template slot-scope="scope">
                       <span>{{ scope.$index + 1 }}</span>
                     </template>
                   </el-table-column>
-                  <el-table-column label="备件名称" align="center" prop="name">
+                  <el-table-column
+                    label="备件名称"
+                    align="center"
+                    prop="categoryName"
+                  >
                   </el-table-column>
-                  <el-table-column label="规格型号" align="center" prop="model">
+                  <el-table-column
+                    label="规格型号"
+                    align="center"
+                    prop="specification"
+                  >
+                    <template slot-scope="{ row }">
+                      {{ row.specification }}-{{ row.model }}
+                    </template>
                   </el-table-column>
-                  <el-table-column label="所需数量" align="center" prop="num">
+                  <el-table-column
+                    label="所需数量"
+                    align="center"
+                    prop="needNum"
+                  >
                   </el-table-column>
                   <el-table-column label="单位" align="center" prop="unit">
                   </el-table-column>
@@ -174,7 +189,7 @@
               }}</span
             >
           </div> -->
-					<HeaderTitle title="执行信息" size="16px"></HeaderTitle>
+          <HeaderTitle title="执行信息" size="16px"></HeaderTitle>
           <el-row class="execute_row">
             <el-col :span="8" class="column">
               <span class="label">确认结果:</span>
@@ -226,395 +241,403 @@
 </template>
 
 <script>
-// import { workOrderDetails, sendAudit } from '@/api/stockManagement/stocking'
-export default {
-  data () {
-    return {
-      num: 1,
-      data: {},
-      statusList: {
-        0: '待接收',
-        1: '执行中',
-        2: '已完成'
-      },
-      allData: {},
-      cause: '',
-      showtext: false,
-	  from:null,
-    }
-  },
-  async created () {
-	// if(this.$router.history.current.query.from==1){
-	// 	this.form = this.$router.history.current.query.from
-	// }
- //    this.getInfo()
-  },
-  computed: {},
-  methods: {
-    goBack() {
-      window.sessionStorage.setItem('equipmentTabType', 'worksheet')
-	  if(this.form){
-		  this.$router.push({path: "/workspace/workOrder",query: {activeName:'maintain'}});
-	  }else{
-		  this.$router.go(-1)
-	  }
+  // import { workOrderDetails, sendAudit } from '@/api/stockManagement/stocking'
+  import { maintenanceDetail } from '@/api/equipment/work';
+  export default {
+    data() {
+      return {
+        num: 1,
+        data: {},
+        statusList: {
+          0: '待接收',
+          1: '执行中',
+          2: '已完成'
+        },
+        allData: {},
+        cause: '',
+        showtext: false,
+        from: null
+      };
     },
-    // 点击切换事件
-    tab (index) {
-      this.num = index
+    async created() {
+      // if(this.$router.history.current.query.from==1){
+      // 	this.form = this.$router.history.current.query.from
+      // }
+      this.getInfo();
     },
-    // 表格数据
-    async getInfo () {
-      let res = await workOrderDetails({
-        workOrderCcode: this.$route.query.code
-      })
-      if (res?.success) {
-        this.data = res.data
-        this.allData = res.data
-      }
-    },
-    //通过按钮事件
-    pass () {
-      let params = {
-        planId: this.allData.id,
-        checked: true,
-        myHandleId: this.$route.query.dbid,
-        handleType: 0,
-        type: 2,
-        cause: ''
-      }
-      sendAudit(params).then(res => {
-        if (res.success) {
-          this.$message.success('审批通过!')
-          this.$router.back()
+    computed: {},
+    methods: {
+      goBack() {
+        window.sessionStorage.setItem('equipmentTabType', 'worksheet');
+        if (this.form) {
+          this.$router.push({
+            path: '/workspace/workOrder',
+            query: { activeName: 'maintain' }
+          });
+        } else {
+          this.$router.go(-1);
         }
-      })
-    },
-    //驳回按钮事件
-    reject () {
-      this.showtext = true
-    },
-    cancelreject () {
-      this.showtext = false
-    },
-    surereject () {
-      if (!this.cause) {
-        this.$message.info('请填写驳回原因!')
-      } else {
+      },
+      // 点击切换事件
+      tab(index) {
+        this.num = index;
+      },
+      // 表格数据
+      async getInfo() {
+        let res = await maintenanceDetail(this.$route.query.id);
+        if (res) {
+          this.data = {
+            ...res,
+            deviceList: res.deviceList.map((item) => {
+              return { ...item, ...item.substance };
+            })
+          };
+          console.log(this.data);
+          this.allData = res;
+        }
+      },
+      //通过按钮事件
+      pass() {
         let params = {
-          planId: this.$route.query.id,
-          checked: false,
+          planId: this.allData.id,
+          checked: true,
           myHandleId: this.$route.query.dbid,
           handleType: 0,
           type: 2,
-          cause: this.cause
-        }
-        sendAudit(params).then(res => {
+          cause: ''
+        };
+        sendAudit(params).then((res) => {
           if (res.success) {
-            this.$message.error('审批驳回!')
-            this.$router.back()
+            this.$message.success('审批通过!');
+            this.$router.back();
           }
-        })
+        });
+      },
+      //驳回按钮事件
+      reject() {
+        this.showtext = true;
+      },
+      cancelreject() {
+        this.showtext = false;
+      },
+      surereject() {
+        if (!this.cause) {
+          this.$message.info('请填写驳回原因!');
+        } else {
+          let params = {
+            planId: this.$route.query.id,
+            checked: false,
+            myHandleId: this.$route.query.dbid,
+            handleType: 0,
+            type: 2,
+            cause: this.cause
+          };
+          sendAudit(params).then((res) => {
+            if (res.success) {
+              this.$message.error('审批驳回!');
+              this.$router.back();
+            }
+          });
+        }
       }
     }
-  }
-}
+  };
 </script>
 <style lang="scss" scoped>
-.page {
-  padding: 10px;
-}
-.page-title {
-  background: #fff;
-  font-size: 18px;
-  padding: 6px 20px;
-  font-weight: 500;
-  .page-title-div {
-    margin: 5px 0;
-    height: 30px;
-    line-height: 30px;
-    border-bottom: 1px solid #eaeefb;
-    .title-div-no {
-      margin-left: 10px;
-      font-weight: 400;
-      color: #909090;
-      font-size: 14px;
+  .page {
+    padding: 10px;
+  }
+  .page-title {
+    background: #fff;
+    font-size: 18px;
+    padding: 6px 20px;
+    font-weight: 500;
+    .page-title-div {
+      margin: 5px 0;
+      height: 30px;
+      line-height: 30px;
+      border-bottom: 1px solid #eaeefb;
+      .title-div-no {
+        margin-left: 10px;
+        font-weight: 400;
+        color: #909090;
+        font-size: 14px;
+      }
     }
   }
-}
-.page-data {
-  padding-top: 10px;
-}
-.content-detail {
-  background: #fff;
-  padding: 20px;
-}
-.flows {
-  .flow-left {
-    width: 156px;
-    height: 70px;
-    border: 1px dashed #ccc;
-    padding: 10px;
+  .page-data {
+    padding-top: 10px;
+  }
+  .content-detail {
+    background: #fff;
+    padding: 20px;
   }
-  .row {
-    margin-top: 13px;
+  .flows {
+    .flow-left {
+      width: 156px;
+      height: 70px;
+      border: 1px dashed #ccc;
+      padding: 10px;
+    }
+    .row {
+      margin-top: 13px;
+    }
   }
-}
-.basic-details-title {
-  margin-bottom: 12px;
-  margin-top: 20px;
-  border-bottom: 1px solid #157a2c;
-  padding-bottom: 8px;
-  display: flex;
-  justify-content: space-between;
-}
-.basic-details-title .border-span {
-  height: 18px;
-  font-size: 16px;
-  border-left: 4px solid #157a2c;
-  padding-left: 8px;
+  .basic-details-title {
+    margin-bottom: 12px;
+    margin-top: 20px;
+    border-bottom: 1px solid #157a2c;
+    padding-bottom: 8px;
+    display: flex;
+    justify-content: space-between;
+  }
+  .basic-details-title .border-span {
+    height: 18px;
+    font-size: 16px;
+    border-left: 4px solid #157a2c;
+    padding-left: 8px;
 
-  font-weight: 500;
-}
-.heade-right {
-  // float: right;
-  .heade-right-content {
-    margin-right: 12px;
-    font-size: 14px;
-    display: inline-block;
-    .content-key {
-      color: #3e3e3e;
+    font-weight: 500;
+  }
+  .heade-right {
+    // float: right;
+    .heade-right-content {
       margin-right: 12px;
-      font-weight: 500;
-    }
-    .content-value {
-      color: #000;
+      font-size: 14px;
+      display: inline-block;
+      .content-key {
+        color: #3e3e3e;
+        margin-right: 12px;
+        font-weight: 500;
+      }
+      .content-value {
+        color: #000;
+      }
     }
   }
-}
-.list-title {
-  font-size: 14px;
-  color: #3e3e3e;
-  margin: 10px 0px;
-}
-.goods {
-  background: #a30014;
-  border: 1px solid #a30014;
-}
-.details-title {
-  display: inline-block;
-  color: #6e6e6e;
-  font-size: 14px;
-  font-weight: bold;
-  margin-right: 13px;
-  width: 70px;
-  text-align: right;
-}
-.details-con {
-  color: #3e3e3e;
-  font-size: 14px;
-}
-.detailed-tab {
-  margin-left: 10px;
-  margin-top: 10px;
-}
-.maintain_equipment_info_content {
-  padding: 0 30px;
-  .equipment_item {
-    border: 1px solid #ccc;
+  .list-title {
     font-size: 14px;
-    padding: 15px;
-    margin-bottom: 30px;
-    .equipment_info {
-      display: flex;
-      flex-wrap: wrap;
-      border: 1px solid #ddd;
-      .item_info {
-        width: 33.33%;
-        height: 24px;
-        line-height: 24px;
+    color: #3e3e3e;
+    margin: 10px 0px;
+  }
+  .goods {
+    background: #a30014;
+    border: 1px solid #a30014;
+  }
+  .details-title {
+    display: inline-block;
+    color: #6e6e6e;
+    font-size: 14px;
+    font-weight: bold;
+    margin-right: 13px;
+    width: 70px;
+    text-align: right;
+  }
+  .details-con {
+    color: #3e3e3e;
+    font-size: 14px;
+  }
+  .detailed-tab {
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  .maintain_equipment_info_content {
+    padding: 0 30px;
+    .equipment_item {
+      border: 1px solid #ccc;
+      font-size: 14px;
+      padding: 15px;
+      margin-bottom: 30px;
+      .equipment_info {
         display: flex;
-        .item_label {
-          width: 90px;
-          text-align: center;
-          background-color: #f2f2f2;
-          font-weight: 700;
-        }
-        .item_value {
-          border-bottom: 1px solid #f2f2f2;
-          flex: 1;
-          padding-left: 5px;
-        }
-        &:last-child {
-          width: 100%;
+        flex-wrap: wrap;
+        border: 1px solid #ddd;
+        .item_info {
+          width: 33.33%;
+          height: 24px;
+          line-height: 24px;
+          display: flex;
+          .item_label {
+            width: 90px;
+            text-align: center;
+            background-color: #f2f2f2;
+            font-weight: 700;
+          }
           .item_value {
-            border: 0;
+            border-bottom: 1px solid #f2f2f2;
+            flex: 1;
+            padding-left: 5px;
+          }
+          &:last-child {
+            width: 100%;
+            .item_value {
+              border: 0;
+            }
           }
         }
       }
-    }
-    > p {
-      margin-top: 20px;
-      color: #797979;
-    }
-    .matter_info {
-      ::v-deep .el-table {
-        th.el-table__cell {
-          background-color: #f2f2f2;
-          padding: 0;
-        }
-        td.el-table__cell {
-          padding: 0;
+      > p {
+        margin-top: 20px;
+        color: #797979;
+      }
+      .matter_info {
+        ::v-deep .el-table {
+          th.el-table__cell {
+            background-color: #f2f2f2;
+            padding: 0;
+          }
+          td.el-table__cell {
+            padding: 0;
+          }
         }
       }
     }
   }
-}
-::v-deep .el-form-item--medium .el-form-item__label {
-  color: #6e6e6e;
-  font-size: 14px;
-  font-weight: bold;
-}
-.warehouse {
-  display: block;
-  border-bottom: 1px solid #eaeefb;
-  padding: 10px 0;
-}
-.box-card {
-  .store-box {
-    width: 80%;
-    .store-box-span {
-      display: inline-block;
-      font-size: 14px;
-      height: 50px;
-      width: 50px;
-      text-align: center;
-      line-height: 50px;
-      color: #fff;
-      margin: 2px;
+  ::v-deep .el-form-item--medium .el-form-item__label {
+    color: #6e6e6e;
+    font-size: 14px;
+    font-weight: bold;
+  }
+  .warehouse {
+    display: block;
+    border-bottom: 1px solid #eaeefb;
+    padding: 10px 0;
+  }
+  .box-card {
+    .store-box {
+      width: 80%;
+      .store-box-span {
+        display: inline-block;
+        font-size: 14px;
+        height: 50px;
+        width: 50px;
+        text-align: center;
+        line-height: 50px;
+        color: #fff;
+        margin: 2px;
+      }
     }
   }
-}
-.vacant {
-  background: #3196fb;
-}
-.inUse {
-  background: #157a2c;
-}
-.invalid {
-  background: #cccccc;
-}
-.full {
-  background: #cc3300;
-}
-
-.map {
-  display: inline-block;
-  position: absolute;
-  right: 4%;
-  top: 15%;
-  width: 380px;
-  height: 200px;
-  background-color: #b12492;
-}
-.mapTitle {
-  display: inline-block;
-  position: absolute;
-  transform: translate(-50%, -50%);
-  right: 11%;
-  top: 39%;
-}
-.equipment {
-  position: relative;
-  width: 100%;
-  min-height: 200px;
-  .equipment-icon {
-    text-align: center;
-    line-height: 30px;
-    width: 30px;
-    height: 30px;
-    border-radius: 15px;
-    border: 2px solid #000;
+  .vacant {
+    background: #3196fb;
   }
-  .equipment-step {
-    position: absolute;
-    left: 15px;
-    border-left: 2px solid #000;
-    width: 2px;
-    height: 85%;
+  .inUse {
+    background: #157a2c;
+  }
+  .invalid {
+    background: #cccccc;
+  }
+  .full {
+    background: #cc3300;
   }
 
-  .equipment-arrows {
+  .map {
+    display: inline-block;
     position: absolute;
-    bottom: -8px;
-    left: 8px;
-    border: 8px solid rgb(255, 255, 255);
-    border-top-color: #000;
-    width: 0;
-    height: 0;
+    right: 4%;
+    top: 15%;
+    width: 380px;
+    height: 200px;
+    background-color: #b12492;
   }
-  .equipment-title {
+  .mapTitle {
+    display: inline-block;
     position: absolute;
-    top: 3%;
-    left: 3%;
+    transform: translate(-50%, -50%);
+    right: 11%;
+    top: 39%;
   }
-  .equipment-details {
-    position: absolute;
-    top: 3%;
-    left: 25%;
-    span {
-      margin-right: 70px;
+  .equipment {
+    position: relative;
+    width: 100%;
+    min-height: 200px;
+    .equipment-icon {
+      text-align: center;
+      line-height: 30px;
+      width: 30px;
+      height: 30px;
+      border-radius: 15px;
+      border: 2px solid #000;
     }
-  }
-  .equipment-content {
-    display: flex;
-    .equipment-content-span1 {
-      width: 150px;
-      margin: 20px 70px 5px 47px;
+    .equipment-step {
+      position: absolute;
+      left: 15px;
+      border-left: 2px solid #000;
+      width: 2px;
+      height: 85%;
+    }
+
+    .equipment-arrows {
+      position: absolute;
+      bottom: -8px;
+      left: 8px;
+      border: 8px solid rgb(255, 255, 255);
+      border-top-color: #000;
+      width: 0;
+      height: 0;
     }
-    .equipment-content-span2 {
-      width: 350px;
-      margin: 20px 70px 5px 120px;
+    .equipment-title {
+      position: absolute;
+      top: 3%;
+      left: 3%;
+    }
+    .equipment-details {
+      position: absolute;
+      top: 3%;
+      left: 25%;
+      span {
+        margin-right: 70px;
+      }
+    }
+    .equipment-content {
+      display: flex;
+      .equipment-content-span1 {
+        width: 150px;
+        margin: 20px 70px 5px 47px;
+      }
+      .equipment-content-span2 {
+        width: 350px;
+        margin: 20px 70px 5px 120px;
+      }
     }
   }
-}
-.btnbox {
-  display: flex;
-  justify-content: center;
-}
-::v-deep .el-button {
-  padding: 10px 20px;
-  margin-right: 10px;
-}
-.textbox {
-  margin-top: 10px;
-}
-.execute_info {
-  margin: 30px 0;
-  .execute_info_title {
-    border-bottom: 1px solid #157a2c;
-    padding-bottom: 3px;
-    margin-bottom: 20px;
+  .btnbox {
     display: flex;
-    justify-content: space-between;
-    > span:first-child {
-      line-height: 16px;
-      border-left: 6px solid #157a2c;
-      padding-left: 6px;
-    }
+    justify-content: center;
   }
-  .execute_row {
-    padding: 0 30px;
-    .column {
-      display: flex;
-      font-size: 14px;
+  ::v-deep .el-button {
+    padding: 10px 20px;
+    margin-right: 10px;
+  }
+  .textbox {
+    margin-top: 10px;
+  }
+  .execute_info {
+    margin: 30px 0;
+    .execute_info_title {
+      border-bottom: 1px solid #157a2c;
+      padding-bottom: 3px;
       margin-bottom: 20px;
-      .label {
-        // width: 110px;
-        text-align: center;
-        font-weight: 700;
+      display: flex;
+      justify-content: space-between;
+      > span:first-child {
+        line-height: 16px;
+        border-left: 6px solid #157a2c;
+        padding-left: 6px;
+      }
+    }
+    .execute_row {
+      padding: 0 30px;
+      .column {
+        display: flex;
+        font-size: 14px;
+        margin-bottom: 20px;
+        .label {
+          // width: 110px;
+          text-align: center;
+          font-weight: 700;
+        }
       }
     }
   }
-}
 </style>

+ 158 - 160
src/views/maintenance/equipment/work/index.vue

@@ -1,168 +1,170 @@
 <template>
   <div class="ele-body">
-     <el-card shadow="never" v-loading="loading">
-	   <work-search @search="reload">
-	   </work-search>
-	   <!-- 数据表格 -->
-	   <ele-pro-table
-	     ref="table"
-	     :columns="columns"
-	     :datasource="datasource"
-	     cache-key="systemRoleTable"
-	   >
-	     <!-- 表头工具栏 -->
-	     <template v-slot:toolbar>
-		   <el-button
-		     size="small"
-		     type="primary"
-		     class="ele-btn-icon"
-		     @click="goDetail()"
-		   >
-		     详情
-		   </el-button>
-	     </template>
-			 <!-- 操作列 -->
-			 <template v-slot:action="{ row }">
-				 <el-link
-					 type="primary"
-					 :underline="false"
-					 icon="el-icon-edit"
-					 >
-					 报工
-				 </el-link>
-				 <el-link
-					 type="primary"
-					 :underline="false"
-					 icon="el-icon-edit"
-					@click="toRedeploy(row)"
-				 >
-					转派
-				 </el-link>
-			 </template>
-	   </ele-pro-table>
-     </el-card>
-	 <!-- 转派弹窗 -->
-	 <redeployOther ref="redeployOtherRef" @refresh="reload" />
+    <el-card shadow="never" v-loading="loading">
+      <work-search @search="reload"> </work-search>
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="systemRoleTable"
+      >
+        <!-- 表头工具栏 -->
+        <!-- <template v-slot:toolbar>
+          <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            @click="goDetail()"
+          >
+            详情
+          </el-button>
+        </template> -->
+        <template v-slot:code="{ row }">
+          <el-link type="primary" :underline="false" @click="goDetail(row)">
+            {{ row.code }}
+          </el-link>
+        </template>
+        <!-- 操作列 -->
+        <template v-slot:action="{ row }">
+          <el-link type="primary" :underline="false" icon="el-icon-edit">
+            报工
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="toRedeploy(row)"
+          >
+            转派
+          </el-link>
+        </template>
+      </ele-pro-table>
+    </el-card>
+    <!-- 转派弹窗 -->
+    <redeployOther ref="redeployOtherRef" @refresh="reload" />
   </div>
 </template>
 
 <script>
   import WorkSearch from './components/work-search.vue';
-  import { pageRoles } from '@/api/system/role'; 
+  // import { pageRoles } from '@/api/system/role';
+  import { workPage } from '@/api/equipment/work';
   import redeployOther from '@/views/maintenance/components/redeployOther.vue';
   export default {
     components: {
       WorkSearch,
-	  redeployOther
+      redeployOther
     },
-    data () {
+    data() {
       return {
-		// 表格列配置
-		columns: [
-		  {
-		    columnKey: 'index',
-		    label: '序号',
-		    type: 'index',
-		    width: 55,
-		    align: 'center',
-		    showOverflowTooltip: true,
-		    fixed: 'left'
-		  },
-		  {
-		    prop: 'code',
-		    label: '工单单号',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'planCode',
-		    label: '计划单号',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    slot: 'planCode',
-		    minWidth: 110
-		  },
-			{
-			  prop: 'planName',
-			  label: '保养名称',
-			  align: 'center',
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-		  {
-		    prop: 'executorDeptName',
-		    label: '保养部门',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-			{
-			  prop: 'executeUserName',
-			  label: '保养人员',
-			  align: 'center',	
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-			{
-			  prop: 'acceptTime',
-			  label: '开工时间',
-			  align: 'center',	
-			  showOverflowTooltip: true,
-			  minWidth: 110
-			},
-		  {
-		    prop: 'finishTime',
-		    label: '报工时间',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'sj',
-		    label: '时间工时',
-		    align: 'center',	
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'status',
-		    label: '状态',
-		    align: 'center',
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    prop: 'executeResult',
-		    label: '执行结果',
-		    align: 'center',
-		    showOverflowTooltip: true,
-		    minWidth: 110
-		  },
-		  {
-		    columnKey: 'action',
-		    label: '操作',
-		    width: 150,
-		    align: 'center',
-		    resizable: false,
-		    slot: 'action',
-		    showOverflowTooltip: true
-		  }
-		],
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            columnKey: 'code',
+            slot: 'code',
+            prop: 'code',
+            label: '工单单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'planCode',
+            label: '计划单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            slot: 'planCode',
+            minWidth: 110
+          },
+          {
+            prop: 'planName',
+            label: '保养名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'executorDeptName',
+            label: '保养部门',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'executeUserName',
+            label: '保养人员',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'acceptTime',
+            label: '开工时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'finishTime',
+            label: '报工时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'sj',
+            label: '时间工时',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'orderStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'executeResult',
+            label: '执行结果',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 150,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
         // 加载状态
         loading: false,
         pageType: 'add',
         dialogTitle: '',
-		isBindPlan:false,
+        isBindPlan: false
       };
     },
-    computed: {
-
-    },
+    computed: {},
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
-        return pageRoles({ pageNum: page, size: limit, ...where });
+        where.type = 2;
+        return workPage({ pageNum: page, size: limit, ...where });
       },
       async changeEnable(row) {
         const res = await putRoles(row);
@@ -179,24 +181,20 @@
       reload(where) {
         this.$refs.table.reload({ page: 1, where });
       },
-	  
-	  
-	  goDetail(){
-		  this.$router.push({
-		    path: '/maintenance/equipment/work/details',
-		    // query: {
-		    //   id
-		    // }
-		  })
-	  },
-	  toRedeploy(row) {
-	    this.$refs.redeployOtherRef.open(row);
-	  },
-	  
+
+      goDetail(row) {
+        this.$router.push({
+          path: '/maintenance/equipment/work/details',
+          query: {
+            id: row.id
+          }
+        });
+      },
+      toRedeploy(row) {
+        this.$refs.redeployOtherRef.open(row);
+      }
     }
   };
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>