| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-20 23:20:15 |
| | | * @LastEditTime: 2024-06-20 23:37:09 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/TimeAlarm.vue |
| | | --> |
| | | <template> |
| | |
| | | </el-collapse-item> |
| | | <el-collapse-item title="周 按周查看" name="2"> |
| | | <el-button-group style="margin-bottom: 14px"> |
| | | <el-button size="small" @click="queryWeek(item)" |
| | | <el-button :title="`${item.startDate} -${item.endDate} `" size="small" @click="queryWeek(item)" |
| | | :type="valueWeek == item.value ? 'primary' : ''" v-for="item in btnListWeek" |
| | | :key="item.value">{{ item.label |
| | | }}</el-button> |
| | |
| | | </el-collapse-item> |
| | | <el-collapse-item title="月 按月查看" name="3"> |
| | | <el-button-group style="margin-bottom: 14px"> |
| | | <el-button size="small" @click="queryMonth(item)" |
| | | <el-button :title="`${item.startDate} -${item.endDate} `" size="small" @click="queryMonth(item)" |
| | | :type="valueMonth == item.value ? 'primary' : ''" v-for="item in btnListMonth" |
| | | :key="item.value">{{ item.label |
| | | }}</el-button> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | sheetUrl: '/api/blade-mdc/alarm/data-sheet', |
| | | sheetUrl: '/api/mdc/alarm/data-sheet', |
| | | apiObj0: '', |
| | | apiObj1: '', |
| | | apiObj2: '', |
| | |
| | | }, |
| | | methods: { |
| | | init(params) { |
| | | this.params.workstationId = params.workstationId.toString() |
| | | if (params) { |
| | | this.params.workstationId = params?.workstationId?.toString() |
| | | this.params.startDate = params.startDate |
| | | this.params.endDate = params.endDate |
| | | } |
| | | this.getTime({ |
| | | endDate: params.endDate, |
| | | startDate: params.startDate, |
| | |
| | | }, |
| | | getTime(data) { |
| | | return Promise.all([ |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', { |
| | | this.$HTTP.post('/api/mdc/efficiency-analysis/interval', { |
| | | ...data, |
| | | statisticalMethod: "DAY" |
| | | }).then(res => { |
| | |
| | | } |
| | | this.queryDay(this.btnListDay[0]) |
| | | }), |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', { |
| | | this.$HTTP.post('/api/mdc/efficiency-analysis/interval', { |
| | | ...data, |
| | | statisticalMethod: "WEEK" |
| | | }).then(res => { |
| | |
| | | |
| | | } |
| | | }), |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', { |
| | | this.$HTTP.post('/api/mdc/efficiency-analysis/interval', { |
| | | ...data, |
| | | statisticalMethod: "MONTH" |
| | | }).then(res => { |
| | |
| | | }) |
| | | }, |
| | | query(data, flag) { |
| | | if (this.isShowTable) { |
| | | return this.queryTableData(data, flag) |
| | | } |
| | | |
| | | this.queryTableData(data, flag) |
| | | return this.$HTTP.post(this.url, data, {}).then(res => { |
| | | return this.setOptions(res.data.res) |
| | | }) |