Преглед на файлове

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt

liujt преди 3 месеца
родител
ревизия
fd40a0dbd3
променени са 4 файла, в които са добавени 342 реда и са изтрити 19 реда
  1. 8 0
      src/utils/dict/tickets.js
  2. 8 7
      src/views/bpm/doneTickets/repair/index.vue
  3. 276 0
      src/views/bpm/tickets/components/notice.vue
  4. 50 12
      src/views/bpm/tickets/repair/index.vue

+ 8 - 0
src/utils/dict/tickets.js

@@ -6,6 +6,14 @@ export const ticketStatus = [
   { id: 3, label: '已完成' },
   { id: 4, label: '已验收' }
 ];
+// 工单状态
+export const workorderStatus = [
+  { value: 0, label: '待接收' },
+  { value: 1, label: '已接收' },
+  { value: 2, label: '执行中' },
+  { value: 3, label: '待验收' },
+  { value: 4, label: '已验收' }
+];
 
 // 报修状态
 export const repairStatus = [

+ 8 - 7
src/views/bpm/doneTickets/repair/index.vue

@@ -47,7 +47,7 @@
                   size="small"
                 >
                   <el-option
-                    v-for="item in ticketStatus"
+                    v-for="item in workorderStatus"
                     :key="item.id"
                     :value="item.id"
                     :label="item.label"
@@ -105,6 +105,7 @@
       >
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
+          
           <el-link
             v-if="row.orderStatus == 3 && row.createUserId == userId"
             type="primary"
@@ -173,7 +174,7 @@
   import RepairDetailsDialog from '@/views/bpm/tickets/components/RepairDetailsDialog.vue';
   import redeployOther from '@/views/bpm/tickets/components/redeployOther.vue';
   import signingUpWork from '@/views/bpm/tickets/components/signingUpWork.vue';
-  import { ticketStatus, resultStatus } from '@/utils/dict/tickets';
+  import { workorderStatus, resultStatus } from '@/utils/dict/tickets';
   import { getWorkOrderList, getRule } from '@/api/tickets';
   import pagenation from '@/components/Pagination';
 
@@ -194,7 +195,7 @@
       return {
         ruleNameList: [],
         userId: '',
-        ticketStatus: [],
+        workorderStatus: [],
         resultStatus,
         //
         addOrEditDialogFlag: false,
@@ -306,7 +307,7 @@
             align: 'center',
             showOverflowTooltip: true,
             formatter: (_row, _column, cellValue) => {
-              return ticketStatus.filter(
+              return workorderStatus.filter(
                 (item) => item.id == _row.orderStatus
               )[0]?.label;
             }
@@ -484,12 +485,12 @@
       this.userId = localStorage.getItem('userId');
       this.searchForm.executeUserId = this.userId;
       this.getRuleNameList();
-      console.log(ticketStatus);
+      console.log(workorderStatus);
 
-      this.ticketStatus = ticketStatus.filter((item) => {
+      this.workorderStatus = workorderStatus.filter((item) => {
         return [0, 2, 3].includes(item.id);
       });
-      console.log(this.ticketStatus);
+      console.log(this.workorderStatus);
     }
   };
 </script>

+ 276 - 0
src/views/bpm/tickets/components/notice.vue

@@ -0,0 +1,276 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    :before-close="close"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    width="60%"
+    title="注意事项"
+  >
+    <div>
+      <div class="table_box">
+        <div class="title">维护修理作业职业健康安全、环保注意事项</div>
+
+        <div class="one_content"
+          >1、进人维修作业区的维修人员按规定穿戴劳动防护用品,有规定要戴安全帽、口罩的场所要戴好;</div
+        >
+        <div class="one_content"
+          >2、维修前应进行现场安全检查,检查内容包括设备、电气装置、机重机械、吊具、安全用具等;施工维修现场应有明显的提示标志,并保持现场道路畅通;</div
+        >
+        <div class="one_content">
+          3、办理好动力停供单、工作票、操作票、危险作业票证等维修许可证,需停水、停电、停气时要做好相应的准备工作,所拉开(或关闭)的各种开关、阀门必须挂标示牌,在易燃、易爆区域动火作业时,在动火前要办理好动火证;
+        </div>
+        <div class="one_content"
+          >4、检修人员应熟悉并认真执行本工种的安全技术操作规程,进人维修现场必须集中精力,随时注意自身和他人的安全;</div
+        >
+        <div class="one_content"
+          >5、凡有两人以上共同作业的维修,必须指定其中一人负责安全;</div
+        >
+        <div class="one_content"
+          >6、检修时需要搭接临时电源,需得到对方同意,并按要求搭接:</div
+        >
+        <div class="one_content">
+          7、脚手架和起重设备上空及邻近空间如有管网、电线,应控制好安全距离,上、下层垂直线同时作业时,各层之间应设遮挡板,具堆放要稳固,禁止从高处向下推掷料具,传递工具和材料禁止抛掷,传递绳索强度要满足要求;
+        </div>
+        <div class="one_content"
+          >8、高处作业用梯子要有人扶,梯子斜度一般以 60
+          度为宜,禁止两人在一个梯子上作业,超过
+          2米要系安全带,地面应有安全护人指挥;</div
+        >
+        <div class="one_content"
+          >9、维修现场的电焊机、氧气瓶、乙炔瓶摆放要符合安全规定,严禁在带压的压力容器和压力管道上作业,焊接时保持通风良好潮湿地点要有防触电保护措施;</div
+        >
+        <div class="one_content"
+          >10、起重设备时起吊人员不得站在吊物下,搬抬设备时要防止滚动和滑动,要统一指挥;</div
+        >
+        <div class="one_content">
+          11、在粉尘、有毒有害的环境下检修,要符合安全规定,做好个人防护措施;废石棉、含油抹布、含油草纸的处置根据对方要求定点投放,设备漏油必须及时告知对方,维修完毕后,必须清理现场,搞好现场卫生;
+        </div>
+        <div class="one_content"
+          >12、严格执行操作规程,不得违章指挥和违章作业,对违章作业的指令有权拒绝并有责任制止他人违章作业;</div
+        >
+        <div class="one_content">13、</div>
+        <div class="one_content">14、</div>
+        <div class="one_content">15、</div>
+
+        <div class="title">安 全 交 底 单</div>
+
+        <div class="item_box">
+          <div class="left">委托单位:</div>
+          <div class="rigth">
+            <div class="need">需实施</div>
+            <div class="stop">已实施</div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >1、进人施工现场时应得到委托方的安全交底和检修许可,所拉开(或关闭)的各种开关、阀门经双方确实无误,由维修人员挂好标示牌后,方可作业;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >2、维修人员动用委托方设备,需征得对方同意,委托方须保证维修设备与运行设备之间有足够的安全距离并做好安全防护措施;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >3、作业人员维修过程中办理完工作票、操作票及危险作业票证,确认安全措施落实后,方可进行作业。</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >4、起重、搬拾设备时,所有人员不得在吊物下通过,吊钩下不准站人,不得靠近搬拾设备,维修人员捆绑设备须经生产厂检查认可,严禁私自动用生产厂叉车;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >5、因维修作业需设置的警戒线或防护隔栏,非维修人员进入维修区必须得到维修单位安全同意,并在安全员陪同下方可进人;</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >6、在委托单位动火作业,动火证由生产厂负责签发,且签发给动火场地生产厂所属班组安全责任人,维修人员负责核实动火证的内容。</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left">7、维修前对设备维修告知书的内容进行核实;</div>
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left"
+            >8、维修作业将产生废石棉、含油抹布、含油草纸等危险固体废弃物,处置根据生产厂要求定点投放。补充交底内容:</div
+          >
+          <div class="rigth">
+            <div class="need">√</div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="one_content">补充交底内容:</div>
+
+        <div class="item_box">
+          <div class="left">1、</div>
+          <div class="rigth">
+            <div class="need"></div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left">2、</div>
+          <div class="rigth">
+            <div class="need"></div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left">3、</div>
+          <div class="rigth">
+            <div class="need"></div>
+            <div class="stop"></div>
+          </div>
+        </div>
+
+        <div class="item_box">
+          <div class="left" style="width: 50%">交底时间:</div>
+          <div class="rigth" style="width: 50%; text-align: left; padding: 6px"
+            >委托单位交底负责人:{{ repairInfo.repairUserName }}</div
+          >
+        </div>
+
+        <div class="one_content no_border">接受交底负责人:</div>
+      </div>
+      <div style="display: flex; justify-content: end; margin-top: 12px">
+        <el-button @click="close">取消</el-button>
+        <el-button type="primary" @click="handleAgree()">接受交底</el-button>
+      </div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    props: {
+      repairInfo: {
+        type: Object,
+        default: () => {}
+      }
+    },
+    data() {
+      return {
+        visible: false
+      };
+    },
+
+    methods: {
+      close() {
+        this.visible = false;
+      },
+      open(row) {
+        this.visible = true;
+      },
+      handleAgree() {
+        this.$emit('agree');
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .table_box {
+    border: 1px solid #000;
+
+    .title {
+      text-align: center;
+      font-size: 14px;
+      font-weight: 600;
+      border-bottom: 1px solid #000;
+      padding: 6px;
+    }
+
+    .one_content {
+      text-align: left;
+      font-size: 14px;
+      font-weight: 500;
+      border-bottom: 1px solid #000;
+      padding: 6px;
+    }
+    .no_border {
+      border-right: none;
+      border-bottom: none;
+    }
+    .item_box {
+      width: 100%;
+      font-size: 14px;
+      font-weight: 500;
+      border-bottom: 1px solid #000;
+
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+
+      .left {
+        width: 80%;
+        text-align: left;
+        border-right: 1px solid #000;
+        padding: 6px;
+      }
+
+      .rigth {
+        width: 20%;
+        display: flex;
+
+        .need {
+          width: 40%;
+          border-right: 1px solid #000;
+          // padding: 6px;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+        }
+
+        .stop {
+          width: 60%;
+          // padding: 6px;
+          text-align: center;
+        }
+      }
+    }
+  }
+</style>

+ 50 - 12
src/views/bpm/tickets/repair/index.vue

@@ -18,7 +18,16 @@
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
-            v-if="row.orderStatus == 3 && row.requestUserId == userId"
+            v-if="row.orderStatus == 0"
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="handleNotice(row)"
+          >
+            接收
+          </el-link>
+          <el-link
+            v-if="row.orderStatus == 3 && row.requestUserId ==  $store.state.user.info.userId"
             type="primary"
             :underline="false"
             icon="el-icon-edit"
@@ -29,8 +38,9 @@
           <el-link
             v-if="
               row.orderStatus !== 3 &&
+              row.orderStatus !== 0 &&
               row.orderStatus !== 4 &&
-              userId === row.executeUserId
+              $store.state.user.info.userId == row.executeUserId
             "
             type="primary"
             :underline="false"
@@ -43,7 +53,7 @@
             v-if="
               row.orderStatus !== 3 &&
               row.orderStatus !== 4 &&
-              userId === row.executeUserId
+             $store.state.user.info.userId== row.executeUserId
             "
             type="primary"
             :underline="false"
@@ -65,6 +75,8 @@
     </el-card>
     <!-- 验收 -->
     <RepairDetailsDialog ref="detailsDialogRef" @refesh="getData" />
+    <!-- 非完成报工接收  注意事项-->
+    <Notice ref="noticeShow" :repairInfo="repairInfo" @agree="agree" />
     <!-- 转派弹窗 -->
     <redeployOther ref="redeployOtherRef" @refresh="getData" />
     <!-- 报工弹框 -->
@@ -75,9 +87,15 @@
   import RepairDetailsDialog from '../components/RepairDetailsDialog.vue';
   import redeployOther from '../components/redeployOther.vue';
   import signingUpWork from '../components/signingUpWork.vue';
-  import { ticketStatus, resultStatus } from '@/utils/dict/tickets';
-  import { getWorkOrderList, getRule } from '@/api/tickets';
+  import { workorderStatus, resultStatus } from '@/utils/dict/tickets';
+  import {
+    getWorkOrderList,
+    getRule,
+    startExecuting,
+    getWorkOrderDetail
+  } from '@/api/tickets';
   import pagenation from '@/components/Pagination';
+  import Notice from '../components/notice.vue';
 
   // 修改
   import {
@@ -90,14 +108,17 @@
       pagenation,
       redeployOther,
       signingUpWork,
+      Notice,
       RepairDetailsDialog
     },
     data() {
       return {
         ruleNameList: [],
         userId: '',
-        ticketStatus: [],
+        workorderStatus: [],
         resultStatus,
+        repairInfo: {},
+
         //
         addOrEditDialogFlag: false,
         columns: [
@@ -207,7 +228,7 @@
             align: 'center',
             showOverflowTooltip: true,
             formatter: (_row, _column, cellValue) => {
-              return ticketStatus.filter(
+              return workorderStatus.filter(
                 (item) => item.id == _row.orderStatus
               )[0]?.label;
             }
@@ -227,7 +248,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            minWidth: 200,
+            minWidth: 250,
             align: 'center',
             slot: 'action',
             fixed: 'right'
@@ -279,7 +300,7 @@
             label: '状态',
             value: 'status',
             type: 'select',
-            planList: ticketStatus.map((item) => {
+            planList: workorderStatus.map((item) => {
               return { label: item.label, value: item.id };
             }),
             placeholder: ' '
@@ -339,7 +360,25 @@
           this.ruleNameList = res.list || [];
         }
       },
-
+      async handleNotice(row) {
+        this.id = row.id;
+        const res = await getWorkOrderDetail(row.code);
+        console.log(res, 'resresresresres');
+        this.repairInfo = res.repairRequestResponse;
+        this.$refs.noticeShow.open(row);
+      },
+      agree() {
+        this.$refs.noticeShow.close();
+        this.handleExecute();
+      },
+      // 执行工单
+      handleExecute() {
+        startExecuting({
+          id: this.id
+        }).then(() => {
+          this.reload();
+        });
+      },
       // 验收
       goDetail(row) {
         row.title = '工单详情';
@@ -361,7 +400,6 @@
       },
       getData() {
         this.search(this.searchForm);
-      
       },
       // 计算实际工时
       time_interval(dt1, dt2) {
@@ -401,7 +439,7 @@
       this.userId = localStorage.getItem('userId');
       this.searchForm.executeUserId = this.userId;
       this.getRuleNameList();
-      this.ticketStatus = ticketStatus.filter((item) => {
+      this.workorderStatus = workorderStatus.filter((item) => {
         return [0, 2, 3].includes(item.id);
       });
     }