| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-27 23:31:53 |
| | | * @LastEditTime: 2024-05-20 21:05:43 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Shift.vue |
| | | --> |
| | | <template> |
| | |
| | | colname: { |
| | | default: '', |
| | | type: String, |
| | | }, |
| | | options: { |
| | | default() { |
| | | return {} |
| | | }, |
| | | } |
| | | }, |
| | | components: { |
| | |
| | | return this.$HTTP.post(this.url, dataSend, { params }).then(res => { |
| | | this.chartsData = res.data.items.records |
| | | let option2 = { |
| | | legend: { |
| | | type: 'plain', |
| | | }, |
| | | title: { |
| | | text: '统计图表', |
| | | subtext: '', |
| | | }, |
| | | grid: { |
| | | top: '80px' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: (value) => { |
| | | return value + '%' |
| | | } |
| | | }, |
| | | }, |
| | | dataZoom: [ |
| | | { type: 'slider' } |
| | | ], |
| | | dataset: { |
| | | source: [ |
| | | ['product', '班次1', '班次2'], |
| | | |
| | | ] |
| | | }, |
| | | series: [{ |
| | | type: 'bar', |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | }] |
| | | ...this.options |
| | | } |
| | | option2.dataset.source = [['product', '班次1', '班次2']] |
| | | res.data.items.records.forEach(v => { |
| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:11:21 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-20 21:04:13 |
| | | * @LastEditTime: 2024-05-20 21:04:56 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/efficiency-analysis.vue |
| | | * 效率分析 |
| | | --> |
| | |
| | | <el-main> |
| | | <el-tabs tab-position="top" v-model="activeName" type="card"> |
| | | <el-tab-pane label="按班次统计" name="shift"> |
| | | <Shift colname="效率" ref="shift" v-if="activeName == 'shift'" /> |
| | | <Shift :options="chartOption" colname="效率" ref="shift" v-if="activeName == 'shift'" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="按时间周期统计" name="time"> |
| | | <Time ref="time" v-if="activeName == 'time'" /> |
| | |
| | | productivityType: 'OEE', |
| | | time: [], |
| | | treeChecked: [], |
| | | chartOption: { |
| | | legend: { |
| | | type: 'plain', |
| | | }, |
| | | title: { |
| | | text: '统计图表', |
| | | subtext: '', |
| | | }, |
| | | grid: { |
| | | top: '80px' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: (value) => { |
| | | return value + '%' |
| | | } |
| | | }, |
| | | }, |
| | | dataZoom: [ |
| | | { type: 'slider' } |
| | | ], |
| | | dataset: { |
| | | source: [ |
| | | ['product', '班次1', '班次2'], |
| | | ] |
| | | }, |
| | | series: [{ |
| | | type: 'bar', |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | }] |
| | | }, |
| | | options: [ |
| | | { |
| | | label: '稼动率', |
| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:11:21 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-20 21:04:01 |
| | | * @LastEditTime: 2024-05-20 21:04:40 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/output-statistics.vue |
| | | * 效率分析 |
| | | --> |
| | |
| | | <el-main> |
| | | <el-tabs tab-position="top" v-model="activeName" type="card"> |
| | | <el-tab-pane label="按班次统计" name="shift"> |
| | | <Shift colname="产量" url="/api/blade-mdc/output" ref="shift" |
| | | <Shift :options="chartOption" colname="产量" url="/api/blade-mdc/output" ref="shift" |
| | | v-if="activeName == 'shift'"> |
| | | </Shift> |
| | | </el-tab-pane> |
| | |
| | | activeName: 'shift', |
| | | time: [], |
| | | treeChecked: [], |
| | | chartOption: { |
| | | legend: { |
| | | type: 'plain', |
| | | }, |
| | | title: { |
| | | text: '统计图表', |
| | | subtext: '', |
| | | }, |
| | | grid: { |
| | | top: '80px' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | formatter: (value) => { |
| | | return value |
| | | } |
| | | }, |
| | | }, |
| | | dataZoom: [ |
| | | { type: 'slider' } |
| | | ], |
| | | dataset: { |
| | | source: [ |
| | | ['product', '班次1', '班次2'], |
| | | ] |
| | | }, |
| | | series: [{ |
| | | type: 'bar', |
| | | }, |
| | | { |
| | | type: 'bar', |
| | | }] |
| | | }, |
| | | options: [ |
| | | { |
| | | label: '稼动率', |
| | |
| | | <!-- <el-switch v-model="isShowTable" class="mb-2" active-text="数据表" inactive-text="统计图" /> --> |
| | | </el-col> |
| | | <el-col :span="20" style='text-align: right;'> |
| | | <el-date-picker :max-range="3" :clearable="false" value-format="YYYY-MM-DD" |
| | | <el-date-picker :max-range="3" :clearable="true" value-format="YYYY-MM-DD" |
| | | style="width: 250px" v-model="time" type="daterange" range-separator="-" |
| | | start-placeholder="" end-placeholder="" :disabled-date="disabledDate" |
| | | @calendar-change="change" /> |
| | |
| | | treeChecked() { |
| | | this.query() |
| | | }, |
| | | time() { |
| | | time(val) { |
| | | if (!val?.[0]) return |
| | | this.query() |
| | | }, |
| | | timeRange(val) { |
| | |
| | | activeList: [0, 1, 2, 3, 4, 5, 6, 7, 8], |
| | | timeRange: '', |
| | | treeChecked: [], |
| | | timeStart: moment().format('YYYY-MM-DD'), |
| | | timeStart: '', |
| | | time: [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')], |
| | | disabledDate: Date => { |
| | | if (!this.timeStart) return false |
| | | console.log(this.timeStart, '????????') |
| | | let max = moment(this.timeStart, 'YYYY-MM-DD').add(3, 'd').format('YYYY-MM-DD') |
| | | let min = moment(this.timeStart, 'YYYY-MM-DD').subtract(3, 'd').format('YYYY-MM-DD') |
| | | return !moment(Date).isBetween(min, max); |