“linengliang”
2024-01-02 ae5576e899261ab2e1613b835dc0dcba2cc6e688
src/views/eam/MalfunctionRepair.vue
@@ -8,14 +8,17 @@
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      > <a-row :gutter="24" style="margin-bottom: 1%;">
      > <a-row
          :gutter="24"
          style="margin-bottom: 1%;"
        >
          <a-col
            :md="24"
            :sm="6"
          >
          <a-form-item label="统一编号群">
            <a-form-item label="统一编号群">
              <a-textarea
                placeholder="请输入所有统一编码,须用“,”隔开,否则可能查询出错误信息"
                placeholder="请输入所有统一编码,须用换行隔开,否则可能查询出错误信息"
                v-model="queryParam.nums"
                :auto-size="{ minRows: 2, maxRows:2 }"
              ></a-textarea>
@@ -174,26 +177,48 @@
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
          :md="6"
            :sm="6"
          >
            <a-form-item
              label="是否关键设备"
            >
              <j-dict-select-tag
                allow-clear
                placeholder="请选择是否关键设备"
                :triggerChange="true"
                dictCode="specific_equipment"
                v-model="queryParam.specificEquipment"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <div class="table-operator">
              <a-button
                type="primary"
                @click="searchQuery"
                icon="search"
              >查询</a-button>
              <a-button
                type="primary"
                @click="searchReset"
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        type="primary"
        @click="searchReset"
        icon="reload"
        style="margin-left: 8px"
      >重置</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        v-has="'report:add&edit'"
      >新增</a-button>
      <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('故障报修')"
      >导出</a-button>
    </div>
    <div>
@@ -211,11 +236,23 @@
        @change="handleTableChange"
        :customRow="clickThenSelect"
      >
      <span
          slot="specificEquipment"
          slot-scope="text"
        >
        <a-icon type="check" style="color: chartreuse;" v-if="text==='0'" />
        <a-icon type="close" v-else style="color:red;"/>
      </span>
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a-popconfirm
          <a
            :disabled=" record.status !== '4'"
            @click="handleAccept(record)"
            v-has="'report:accept'"
          >验收</a>
          <!-- <a-popconfirm
            v-if="record.status == '1' || record.status == '4'"
            title="确认提交吗?"
            @confirm="() =>handleCommit(record, 'commit')"
@@ -271,10 +308,16 @@
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
          </a-dropdown> -->
        </span>
        <span slot="faultDescription" slot-scope="text">
            <j-ellipsis :value="text" :length="10" />
        <span
          slot="jell"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="10"
          />
        </span>
      </a-table>
@@ -292,7 +335,10 @@
          class="table-operator"
          style="margin-top: 0px"
        >
          <FaultDescriptionList ref="FaultDescriptionList"   @ok="modalFormOk"/>
          <FaultDescriptionList
            ref="FaultDescriptionList"
            @ok="modalFormOk"
          />
        </div>
      </a-tab-pane>
@@ -307,6 +353,10 @@
      @ok='approvalModalFormOk'
      @cancel='approvalModalFormOk'
    ></approvel-modal>
    <accept-model
      ref="acceptModel"
      @ok="modalFormOk"
    ></accept-model>
  </a-card>
</template>
  
@@ -321,6 +371,7 @@
import ApprovelModal from './modules/malfunctionRepair/ApprovelModal'
import JEllipsis from '@/components/jeecg/JEllipsis'
import moment from 'moment'
import AcceptModel from './modules/malfunctionRepair/AcceptModel'
export default {
  name: 'MalfunctionRepairList',
@@ -329,12 +380,13 @@
    MalfunctionRepairModal,
    FaultDescriptionList,
    ApprovelModal,
    JEllipsis
    JEllipsis,
    AcceptModel,
  },
  data() {
    return {
      treeData:[],
      faultTime:[],
      treeData: [],
      faultTime: [],
      description: '故障报修',
      queryParam: { delflag: 0 },
      selectedRowKeys: [],
@@ -351,14 +403,44 @@
          }
        },
        {
          title: '单据号',
          align: "center",
          dataIndex: 'num'
        },
        {
          title: '状态',
          align: "center",
          dataIndex: 'statusName',
        },
        {
          title: '单据号',
          title: '类型',
          align: "center",
          dataIndex: 'num'
          dataIndex: 'type',
          customRender: (text) => {
            if (text == '1') {
              return "被动报修";
            } else if (text == '2') {
              return "主动报修";
            }
          },
        },
        {
          title: '来源',
          align: "center",
          dataIndex: 'source',
          customRender: (text) => {
            if (text == '1') {
              return "手动创建";
            } else if (text == '2') {
              return "点检报修";
            }
          },
        },
        {
          title: '关键设备',
          align: "center",
          dataIndex: 'specificEquipment',
          scopedSlots: { customRender: 'specificEquipment' }
        },
        {
          title: '统一编号',
@@ -394,8 +476,8 @@
          title: '故障描述',
          align: "center",
          dataIndex: 'faultDescription',
          scopedSlots: {
            customRender: 'faultDescription'
          scopedSlots: {
            customRender: 'faultDescription'
          }
        },
@@ -430,24 +512,27 @@
          align: "center",
          dataIndex: 'createBy'
        },
        // {
        //   title: '创建时间',
        //   align: "center",
        //   dataIndex: 'createTime',
        // },
        {
          title: '验收意见',
          align: "center",
          dataIndex: 'errUda5',
          scopedSlots: {
            customRender: 'jell'
          }
        },
        {
          title: '备注',
          align: "center",
          dataIndex: 'remark'
        },
        // {
        //   title: '操作',
        //   dataIndex: 'action',
        //   align: "center",
        //   fixed: "right",
        //   width: 200,
        //   scopedSlots: { customRender: 'action' }
        // }
        {
          title: '操作',
          dataIndex: 'action',
          align: "center",
          fixed: "right",
          width: 200,
          scopedSlots: { customRender: 'action' }
        }
      ],
      url: {
        list: "/eam/equipmentReportRepair/getReportRepairList",
@@ -473,7 +558,7 @@
    }
  },
  created() {
       this.initOptions();
    this.initOptions();
  },
  computed: {
    importExcelUrl: function () {
@@ -629,9 +714,13 @@
        }
      })
    },
    timeChange(){
    timeChange() {
      this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    handleAccept(record) {
      this.$refs.acceptModel.title = "验收"
      this.$refs.acceptModel.edit(record)
    }
  }
}