|
@@ -0,0 +1,193 @@
|
|
|
|
+<template>
|
|
|
|
+ <a-card :bordered="false">
|
|
|
|
+ <div v-show="visible">
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline">
|
|
|
|
+ <a-row :gutter="48">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="设备名称">
|
|
|
|
+ <a-input v-model="queryParam.sbName" placeholder="请输入设备名称"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="设备编号">
|
|
|
|
+ <a-input v-model="queryParam.sbNo" placeholder="请输入设备编号"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="起始日期">
|
|
|
|
+ <a-date-picker
|
|
|
|
+ v-model="queryParam.searchStartTime"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
+ />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="结束日期">
|
|
|
|
+ <a-date-picker
|
|
|
|
+ v-model="queryParam.searchEndTime"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
+ />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="24" :sm="24">
|
|
|
|
+ <span class="table-page-search-submitButtons">
|
|
|
|
+ <a-button type="primary" @click="handleOk">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
|
|
|
|
+ </span>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <s-table
|
|
|
|
+ ref="table"
|
|
|
|
+ size="default"
|
|
|
|
+ rowKey="id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :scroll="{x: 1, y: BaseTool.Constant.scrollY }"
|
|
|
|
+ :data="loadData"
|
|
|
|
+ showPagination="auto"
|
|
|
|
+ >
|
|
|
|
+ <span slot="action" slot-scope="record">
|
|
|
|
+ <template>
|
|
|
|
+ <a @click="handleView(record)">查看</a>
|
|
|
|
+ <template v-if="record.status == DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE">
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+ <a @click="handleExecute(record)">接收</a>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="record.status === DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING">
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+ <a @click="handleFinish(record)">完成</a>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="record.status == DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE || record.status === DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING">
|
|
|
|
+ <a-divider type="vertical" />
|
|
|
|
+ <a @click="handleEdit(record)">修改</a>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- <a-divider type="vertical" />-->
|
|
|
|
+ <!-- <a-popconfirm v-if="$auth('check-jobs-del')" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">-->
|
|
|
|
+ <!-- <a>删除</a>-->
|
|
|
|
+ <!-- </a-popconfirm>-->
|
|
|
|
+ </template>
|
|
|
|
+ </span>
|
|
|
|
+ </s-table>
|
|
|
|
+ </div>
|
|
|
|
+ </a-card>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { STable } from '@/components'
|
|
|
|
+import { getCheckNum } from '@/api/check/checkstatistics'
|
|
|
|
+import DictCache from '@/utils/dict'
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: 'CheckJobList',
|
|
|
|
+ components: {
|
|
|
|
+ STable
|
|
|
|
+ },
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ visible: true,
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParam: {
|
|
|
|
+ searchStartTime: null,
|
|
|
|
+ searchEndTime: null
|
|
|
|
+ },
|
|
|
|
+ treeData: [],
|
|
|
|
+ // 表头
|
|
|
|
+ columns: [
|
|
|
|
+ {
|
|
|
|
+ title: '序号',
|
|
|
|
+ dataIndex: 'index',
|
|
|
|
+ customRender: (text, record, index) => {
|
|
|
|
+ return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
|
|
|
|
+ },
|
|
|
|
+ checked: true,
|
|
|
|
+ width: '100px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '设备名称',
|
|
|
|
+ dataIndex: 'sbName',
|
|
|
|
+ checked: true,
|
|
|
|
+ width: '200px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '设备编号',
|
|
|
|
+ dataIndex: 'sbNo',
|
|
|
|
+ checked: true,
|
|
|
|
+ width: '150px'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '次数',
|
|
|
|
+ dataIndex: 'count',
|
|
|
|
+ checked: true,
|
|
|
|
+ width: '200px'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ // 下拉框map
|
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
|
+ loadData: parameter => {
|
|
|
|
+ const searchStartTime = this.queryParam.searchStartTime ? (this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)) : this.BaseTool.Date.formatter(new Date(), this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 00:00:00'
|
|
|
|
+ const searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATETIME_PATTERN) : this.BaseTool.Date.formatter(new Date(new Date(new Date().getFullYear(), new Date().getMonth() + 1, 1).getTime() - 1000), this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 23:59:59'
|
|
|
|
+ parameter = {
|
|
|
|
+ ...parameter,
|
|
|
|
+ ...this.queryParam,
|
|
|
|
+ searchStartTime,
|
|
|
|
+ searchEndTime
|
|
|
|
+ }
|
|
|
|
+ return getCheckNum(parameter)
|
|
|
|
+ .then(res => {
|
|
|
|
+ return res.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created () {
|
|
|
|
+ // 下拉框map
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+
|
|
|
|
+ handleEdit (record) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ handleFinish (record) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ handleExecute (record) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ handleView (record) {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ handleOk () {
|
|
|
|
+ this.visible = true
|
|
|
|
+ console.log(11)
|
|
|
|
+ console.log(this.queryParam.searchEndTime)
|
|
|
|
+ this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.BaseTool.Date.formatter(this.queryParam.searchStartTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 00:00:01' : null
|
|
|
|
+ this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.BaseTool.Date.formatter(this.queryParam.searchEndTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) + ' 23:59:59' : null
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ },
|
|
|
|
+ resetSearchForm () {
|
|
|
|
+ this.queryParam = {
|
|
|
|
+ type: this.checkType,
|
|
|
|
+ searchStartTime: null,
|
|
|
|
+ searchEndTime: null,
|
|
|
|
+ filter: this.filter,
|
|
|
|
+ status: this.status,
|
|
|
|
+ statusList: this.statusList
|
|
|
|
+ }
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ doExport () {
|
|
|
|
+ this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
|
+ },
|
|
|
|
+ doImportForUpdate () {
|
|
|
|
+ this.$refs.importModalUpdate.base(null, null)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|