loulijun2021
2022-12-31 b012ab3a1e5495be068c543eb8f0482124db13b5
src/views/sbgl/byjl.vue
@@ -11,12 +11,12 @@
        <el-form
          ref="form"
          :model="form"
          label-width="80px"
          label-width="100px"
          inline
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm">
            <el-form-item label="生产车间" style=" display: flex;">
          <div class="elForm" style="justify-content: flex-start">
            <el-form-item label="生产车间" label-width="70px" style=" display: flex;">
              <el-select v-model="form.wkshopcode" style="width: 200px" placeholder="请选择">
                <el-option
                  v-for="item in wkshopSelectArr"
@@ -35,7 +35,7 @@
            <el-form-item label="标准名称" style=" display: flex;">
              <el-input v-model="form.stanedname" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="保养人员" style=" display: flex;">
            <el-form-item v-show="isExpandForm"label="保养人员" label-width="70px" style=" display: flex;">
              <el-input v-model="form.repairuser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item v-show="isExpandForm" label="保养时间" style=" display: flex;font-size:14px;align-items: center">
@@ -62,21 +62,31 @@
              </el-select>
            </el-form-item>
          </div>
          <div class="bodySearchReset">
          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
        <div
          class="bodyTopFormExpand"
        >
          <svg-icon
            v-show="mouseHoverType==='mouseout'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
            @mouseenter="mouseHoverType=$event.type"
          />
          <svg-icon
            v-show="mouseHoverType==='mouseenter'"
            style="cursor: pointer"
            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
            @click="isExpandForm=!isExpandForm"
            @mouseout="mouseHoverType=$event.type"
          />
        </div>
      </div>
      <div
        class="bodyTopFormExpand"
        @click="isExpandForm=!isExpandForm"
      >
        <i
          :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
          :style="{color:'#42B983'}"
        /></div>
      <div class="elTableDiv" style="margin-top: 0">
      <div class="elTableDiv">
        <el-table
          ref="tableDataRef"
          class="tableFixed"
@@ -98,40 +108,48 @@
          />
          <el-table-column
            prop="bywo"
            width="160"
            show-tooltip-when-overflow
            label="保养单号"
            sortable="custom"
          />
          <el-table-column
            prop="org_name"
            label="生产车间"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="eqp_code"
            label="设备编号"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="eqp_name"
            label="设备名称"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="stanedcode"
            label="保养标准编码"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="stanedname"
            label="保养标准名称"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="maint_cyc"
            label="保养周期"
            width="110"
            show-tooltip-when-overflow
            sortable="custom"
          >
            <template slot-scope="{row}">
@@ -142,6 +160,7 @@
            prop="maint_user"
            label="保养人员"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          >
            <template slot-scope="{row}">
@@ -153,29 +172,39 @@
            prop="maint_result"
            label="保养结果"
            width="160"
            show-tooltip-when-overflow
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.maint_result==='OK'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: #42b983" />正常</div>
              <div v-if="row.maint_result==='NG'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: red" />异常</div>
              <div v-if="row.maint_result==='OK'" style="display: flex;align-items: center">
                <!--                <div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: #42b983" />-->
                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
                正常
              </div>
              <div v-if="row.maint_result==='NG'" style="display: flex;align-items: center">
                <!--                <div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: red" />-->
                <i class="el-icon-info" style="margin-right: 2px" />
                异常
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="maint_date"
            label="保养时间"
            show-tooltip-when-overflow
            width="160"
            fixed="right"
            sortable="custom"
          />
          <el-table-column
            label="查看记录"
            width="120"
            width="80"
            fixed="right"
          >
            <template slot-scope="{row}">
              <i
                class="el-icon-tickets"
                style="cursor: pointer;color: #42b983;margin-right: 15px"
                :style="{color:$store.state.settings.theme}"
                style="cursor: pointer;margin-right: 15px"
                @click="edit('edit',row)"
              />
            </template>
@@ -235,8 +264,12 @@
            label="点检结果"
          >
            <template slot-scope="{row}">
              <div v-if="row.result==='OK'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: #42b983" />正常</div>
              <div v-if="row.result==='NG'" style="display: flex;align-items: center"><div style="margin-right: 5px;width:10px;height: 10px;border-radius: 50%;background-color: red" />异常</div>
              <div v-if="row.result==='OK'" style="display: flex;align-items: center">
                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
                正常</div>
              <div v-if="row.result==='NG'" style="display: flex;align-items: center">
                <i class="el-icon-info" style="margin-right: 2px" />
                异常</div>
            </template>
          </el-table-column>
          <el-table-column
@@ -290,6 +323,7 @@
  },
  data() {
    return {
      mouseHoverType: 'mouseout',
      isExpandForm: false,
      mainHeight: 0,
      tableHeight: 0,
@@ -522,7 +556,7 @@
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 245
        this.tableHeight = this.mainHeight - 255
        this.$refs.tableDataRef.doLayout()
      })
    },