| | |
| | | <header> |
| | | <div class="headerContent"> |
| | | <div class="search"> |
| | | <span>姓名:</span> |
| | | <el-input |
| | | placeholder="请输入姓名" |
| | | v-model="context" |
| | | ></el-input> |
| | | <span>姓名:</span> |
| | | <el-input placeholder="请输入姓名" v-model="context"></el-input> |
| | | <span style="margin-left: 10px;">报警时间:</span> |
| | | <el-date-picker v-model="alarmTime" type="daterange" align="right" unlink-panels range-separator="至" |
| | | start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"> |
| | | </el-date-picker> |
| | | |
| | | <!-- 按钮区域 --> |
| | | <div class="main-btns"> |
| | | <div class="main-btns-left"> |
| | | <!-- <el-button icon="el-icon-download">下载图片</el-button>--> |
| | | <el-button |
| | | icon="el-icon-folder" |
| | | @click="exportTableData" |
| | | >导出</el-button |
| | | > |
| | | </div> |
| | | <div class="main-btns-right"> |
| | | <el-button |
| | | icon="el-icon-search" |
| | | @click="setTableData" |
| | | >查询</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-delete-solid" |
| | | @click="handleReset" |
| | | >重置</el-button |
| | | > |
| | | <el-button icon="el-icon-folder" @click="exportTableData">导出</el-button> |
| | | <!-- </div> |
| | | <div class="main-btns-right"> --> |
| | | <el-button icon="el-icon-search" @click="setTableData">查询</el-button> |
| | | <el-button icon="el-icon-delete-solid" @click="handleReset">重置</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <main> |
| | | <div class="main-content"> |
| | | <!-- 数据展示 --> |
| | | <el-table |
| | | border |
| | | stripe |
| | | ref="multipleTable" |
| | | :header-cell-style="{ |
| | | background: '#F5F5F5', |
| | | 'font-weight': '650', |
| | | 'line-height': '45px' |
| | | }" |
| | | :row-class-name="tableRowClassName" |
| | | :data="list" |
| | | style="width: 100%" |
| | | > |
| | | <el-table border stripe ref="multipleTable" :header-cell-style="{ |
| | | background: '#F5F5F5', |
| | | 'font-weight': '650', |
| | | 'line-height': '45px' |
| | | }" :row-class-name="tableRowClassName" :data="list" style="width: 100%"> |
| | | <el-table-column label="序号" type="index" width="80px"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="姓名" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="taskCount" |
| | | label="任务总数" |
| | | min-width="10" |
| | | > |
| | | <el-table-column prop="taskCount" label="任务总数" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="finishCount" |
| | | label="已完成数量" |
| | | min-width="10" |
| | | > |
| | | <el-table-column prop="finishCount" label="已完成数量" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="notFinishCount" |
| | | label="未完成数量" |
| | | min-width="10" |
| | | > |
| | | <el-table-column prop="notFinishCount" label="未完成数量" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="finishRadio" |
| | | label="完成率" |
| | | min-width="10" |
| | | > |
| | | <template slot-scope="{ row }" |
| | | >{{ fun(row.finishRadio * 100) }}%</template |
| | | > |
| | | <el-table-column prop="finishRadio" label="完成率" min-width="10"> |
| | | <template slot-scope="{ row }">{{ fun(row.finishRadio * 100) }}%</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | <div class="tools"> |
| | | <div class="funs"></div> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | background |
| | | :current-page="currentPage" |
| | | layout="prev, pager, next" |
| | | :total="totalNum" |
| | | :page-size="pageSize" |
| | | @current-change="changeCurrentPage" |
| | | @prev-click="handlePrev" |
| | | @next-click="handleNext" |
| | | > |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum" |
| | | :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" |
| | | @next-click="handleNext"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | data() { |
| | | return { |
| | | context: "", |
| | | alarmTime: [], |
| | | list: [], |
| | | totalNum: 0, |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | pickerOptions: { |
| | | shortcuts: [{ |
| | | text: '最近一周', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: '最近一个月', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }, { |
| | | text: '最近三个月', |
| | | onClick(picker) { |
| | | const end = new Date(); |
| | | const start = new Date(); |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
| | | picker.$emit('pick', [start, end]); |
| | | } |
| | | }] |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | currentPage, |
| | | pageSize, |
| | | keyword: context, |
| | | startTime: this.alarmTime[0], |
| | | endTime: this.alarmTime[1], |
| | | }).then((res) => { |
| | | this.list = res.records; |
| | | this.totalNum = res.total; |
| | |
| | | const { context } = this; |
| | | basecase.exportWorkOrder({ |
| | | keyword: context, |
| | | startTime: this.alarmTime[0], |
| | | endTime: this.alarmTime[1], |
| | | }).then((res) => { |
| | | this.$message.success('操作成功'); |
| | | let time = new Date() |
| | |
| | | this.currentPage = 1; |
| | | this.pageSize = 10; |
| | | this.context = ""; |
| | | this.alarmTime = ["", ""]; |
| | | this.setTableData() |
| | | }, |
| | | // 设置表格斑马纹 |
| | |
| | | padding: 10px 20px; |
| | | // color: #4b9bb7; |
| | | border: 1px solid #ccc; |
| | | |
| | | .headerTitle { |
| | | line-height: 40px; |
| | | } |
| | |
| | | .headerContent { |
| | | padding: 0; |
| | | display: flex; |
| | | line-height: 100px; |
| | | line-height: 40px; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | |
| | |
| | | justify-content: flex-start; |
| | | |
| | | span { |
| | | flex: 1; |
| | | text-align: right; |
| | | } |
| | | |
| | | .el-input { |