| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-12-06 17:54:28 |
| | | * @LastEditTime: 2024-12-20 14:56:14 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/TimeAlarm.vue |
| | | --> |
| | | <template> |
| | |
| | | if (res.code === 200) { |
| | | if(res.data.length == 0) return; |
| | | var timeRange = {}; |
| | | console.log(res.data,1111111) |
| | | timeRange.startTime = res.data[0].startTime; |
| | | timeRange.endTime = res.data[res.data.length - 1].endTime; |
| | | var total = Math.abs(moment(timeRange.startTime).diff(moment(timeRange.endTime))); |
| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-12-06 17:27:03 |
| | | * @LastEditTime: 2024-12-20 15:06:05 |
| | | * @FilePath: /smart-web/src/views/mdc/status-record.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | <process-charts :index="index" :tableData="tableData"></process-charts> |
| | | <div class="modelBtn"> |
| | | <el-button type="primary" @click="goFirstWorkProcess(item,index)">过程分析</el-button> |
| | | <el-button type="primary" @click="exportBtn(item,index)">输出</el-button> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-footer> |
| | | <el-button type="primary">输出</el-button> |
| | | </el-footer> |
| | | </el-card> |
| | | </el-main> |
| | | </template> |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | exportBtn(item,index) { |
| | | var id = this.tableData[index - 1].id; |
| | | this.$HTTP.get(`/api/workinghour/export?id=${id}`).then(res => { |
| | | if (res.code == 200) { |
| | | this.$TOOL.downFile(res.data.link,res.data.originalName); |
| | | } |
| | | }) |
| | | }, |
| | | convertSeconds(seconds) { //转换时间 |
| | | // 定义时间单位转换关系 |
| | | const daysInSeconds = 24 * 60 * 60; |
| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-11-22 18:45:06 |
| | | * @LastEditTime: 2024-12-20 14:52:10 |
| | | * @FilePath: /smart-web/src/views/mdc/status-record.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | <el-table-column prop="deviceStatus" label="状态"></el-table-column> |
| | | </el-table> |
| | | <el-footer> |
| | | <el-button type="primary">输出</el-button> |
| | | <el-button type="primary" @click="exportBtn">输出</el-button> |
| | | </el-footer> |
| | | </el-card> |
| | | </el-main> |
| | |
| | | this.getTableData(); |
| | | }, |
| | | methods: { |
| | | exportBtn() { |
| | | this.$HTTP.get(`/api/workinghour/working-process-export?id=${this.$route.query.id}`).then(res => { |
| | | if (res.code == 200) { |
| | | this.$TOOL.downFile(res.data.link,res.data.originalName); |
| | | } |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$HTTP.get(`/api/workinghour/working-process`, {id: this.$route.query.id}).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-12-09 13:39:49 |
| | | * @LastEditTime: 2024-12-20 15:10:08 |
| | | * @FilePath: /smart-web/src/views/mdc/status-record.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" label="数量" width="60"></el-table-column> |
| | | <el-table-column label="操作" width="100"> |
| | | <template #default="scope"> |
| | | <el-button type="primary" @click="exportBtn(scope)">输出</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination background layout="total, prev, pager, next" :total="total" style="margin-top: 12px;" @current-change="handleCurrentChange"></el-pagination> |
| | | </el-main> |
| | | <el-footer> |
| | | <el-button type="primary" @click="goFirstWorkDetail">详情</el-button> |
| | | <el-button type="primary">输出</el-button> |
| | | </el-footer> |
| | | </el-container> |
| | | </el-container> |
| | |
| | | this.getTableData(); |
| | | }, |
| | | methods: { |
| | | exportBtn(scope) { |
| | | this.$HTTP.get(`/api/workinghour/export?id=${scope.row.id}`).then(res => { |
| | | if (res.code == 200) { |
| | | this.$TOOL.downFile(res.data.link,res.data.originalName); |
| | | } |
| | | }) |
| | | }, |
| | | setDate() { |
| | | var date = new Date(); |
| | | var threeDaysInMilliseconds = 3 * 24 * 60 * 60 * 1000; |