| | |
| | | "deepmerge": "^1.5.2", |
| | | "echarts": "5.4.1", |
| | | "element-plus": "2.2.32", |
| | | "moment": "^2.30.1", |
| | | "nprogress": "0.2.0", |
| | | "qrcodejs2": "0.0.2", |
| | | "qs": "6.7.0", |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:18 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-18 23:43:13 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Shift.vue |
| | | --> |
| | | <template> |
| | | <el-row> |
| | | <el-col> |
| | | <el-button-group> |
| | | <el-button :type="btnListActive == item.id ? 'primary' : ''" v-for="item in btnList" :key="item.id">{{ |
| | | item.title }}</el-button> |
| | | </el-button-group> |
| | | </el-col> |
| | | <el-col> |
| | | <el-card shadow="never"> |
| | | <scEcharts height="300px" :option="option2"></scEcharts> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col> |
| | | ç»è®¡æ°æ® |
| | | </el-col> |
| | | <el-col> |
| | | <scTable ref="table" row-key="id" border :params="params" :apiObj="apiObj" stripe> |
| | | <el-table-column prop="workstationCode" label="å·¥ä½ç¼ç " /> |
| | | <el-table-column prop="workstationName" label="å·¥ä½åç§°" /> |
| | | <el-table-column prop="" label="çæ¬¡1"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.nameData['1'] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="æç"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.data['1'] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="çæ¬¡2"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.nameData['2'] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="æç"> |
| | | <template #default="scope"> |
| | | <span>{{ scope.row.data['2'] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </scTable> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import scEcharts from '@/components/scEcharts'; |
| | | export default { |
| | | components: { |
| | | scEcharts |
| | | }, |
| | | data() { |
| | | return { |
| | | apiObj: '', |
| | | params: {}, |
| | | statisticalMethod: 'SHIFT', |
| | | btnList: [], |
| | | btnListActive: '', |
| | | chartsData: [], |
| | | option2: { |
| | | title: { |
| | | text: 'ç»è®¡å¾è¡¨', |
| | | subtext: 'åºç¡æçº¿å¾', |
| | | }, |
| | | grid: { |
| | | top: '80px' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] |
| | | }, |
| | | yAxis: { |
| | | type: 'value' |
| | | }, |
| | | series: [{ |
| | | data: [120, 200, 150, 80, 70, 110, 130], |
| | | type: 'line', |
| | | }, |
| | | { |
| | | data: [110, 180, 120, 120, 60, 90, 110], |
| | | type: 'line', |
| | | }] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | init(params) { |
| | | this.getTime({ |
| | | endDate: params.endDate, |
| | | startDate: params.startDate, |
| | | statisticalMethod: this.statisticalMethod |
| | | }).then(res => { |
| | | this.query({ |
| | | ...params, |
| | | startDate: this.btnListActive, |
| | | endDate: this.btnListActive |
| | | }) |
| | | this.queryChart({ |
| | | ...params, |
| | | startDate: this.btnListActive, |
| | | endDate: this.btnListActive |
| | | }) |
| | | }) |
| | | |
| | | }, |
| | | getTime(data) { |
| | | return this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', { |
| | | ...data |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.btnList = res.data |
| | | this.btnListActive = res?.data?.[0]?.id |
| | | } |
| | | }) |
| | | }, |
| | | queryChart(data) { |
| | | let params = { |
| | | size: -1 |
| | | } |
| | | let dataSend = { |
| | | ...data, |
| | | queryType: 0, |
| | | statisticalMethod: this.statisticalMethod |
| | | } |
| | | return this.$HTTP.post('/api/blade-mdc/efficiency-analysis', dataSend, { params }).then(res => { |
| | | this.chartsData = res.data.items.records |
| | | }) |
| | | }, |
| | | query(params) { |
| | | this.params = params |
| | | this.apiObj = { |
| | | get: async (data) => { |
| | | let params = { |
| | | current: data.current, |
| | | size: data.size |
| | | } |
| | | let dataSend = { |
| | | ...data, |
| | | queryType: 1, |
| | | statisticalMethod: this.statisticalMethod |
| | | } |
| | | delete dataSend.current |
| | | delete dataSend.size |
| | | delete dataSend.order |
| | | delete dataSend.prop |
| | | return await this.$HTTP.post('/api/blade-mdc/efficiency-analysis', dataSend, { params }).then(res => { |
| | | return { |
| | | ...res, |
| | | data: res.data.items |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-04-18 21:52:28 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-18 21:54:53 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/Time.vue |
| | | --> |
| | | <template> |
| | | <div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:11:21 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-18 21:48:13 |
| | | * @LastEditTime: 2024-04-18 22:47:36 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/efficiency-analysis.vue |
| | | * æçåæ |
| | | --> |
| | |
| | | </el-col> |
| | | <el-col style="margin-top: 14px;">æ¥æ</el-col> |
| | | <el-col> |
| | | <el-date-picker style="width: 250px" v-model="time" type="daterange" |
| | | range-separator="-" start-placeholder="" end-placeholder="" /> |
| | | <el-date-picker value-format="YYYY-MM-DD" style="width: 250px" v-model="time" |
| | | type="daterange" range-separator="-" start-placeholder="" end-placeholder="" /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 14px;"> |
| | |
| | | <MYTree v-model="treeChecked" show-checkbox></MYTree> |
| | | </el-main> |
| | | <el-footer> |
| | | <el-button>æ¥è¯¢</el-button> |
| | | <el-button @click="query">æ¥è¯¢</el-button> |
| | | <el-button>导åº</el-button> |
| | | </el-footer> |
| | | </el-container> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-tabs tab-position="top" v-model="activeName"> |
| | | <el-tab-pane label="æç次ç»è®¡" name="ban"> |
| | | |
| | | <el-main> |
| | | <el-tabs tab-position="top" v-model="activeName" type="card"> |
| | | <el-tab-pane label="æç次ç»è®¡" name="shift"> |
| | | <Shift ref="shift" v-if="activeName == 'shift'" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ææ¶é´å¨æç»è®¡" name="time"> |
| | | |
| | | <Time ref="time" v-if="activeName == 'time'" /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </el-card> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment'; |
| | | import MYTree from './MYTree.vue' |
| | | import Shift from './components/Shift.vue' |
| | | import Time from './components/Time.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | MYTree, |
| | | Shift, |
| | | Time |
| | | }, |
| | | watch: { |
| | | treeChecked(value) { |
| | | this.query(value) |
| | | // this.query(value) |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName: '', |
| | | productivityType: '', |
| | | activeName: 'shift', |
| | | productivityType: 'OEE', |
| | | time: [], |
| | | treeChecked: [], |
| | | options: [ |
| | | { |
| | | label: '稼å¨ç', |
| | |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | | this.time = [moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')] |
| | | }, |
| | | mounted() { |
| | | this.query() |
| | | }, |
| | | methods: { |
| | | query(vals) { |
| | | console.log([...vals]) |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', { |
| | | endDate: this.time[0], |
| | | startDate: this.time[1], |
| | | statisticalMethod: 'SHIFT' |
| | | query() { |
| | | this.$refs[this.activeName].init({ |
| | | endDate: this.time[1], |
| | | startDate: this.time[0], |
| | | productivityType: this.productivityType, |
| | | shiftIndexList: [1, 2], |
| | | workStationIdList: [...this.treeChecked] |
| | | }) |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis?size=-1', { |
| | | // this.$HTTP.post('/api/blade-mdc/efficiency-analysis?size=-1', { |
| | | |
| | | }) |
| | | this.$HTTP.post('/api/blade-mdc/efficiency-analysis?current=1&size=15', { |
| | | // }) |
| | | // this.$HTTP.post('/api/blade-mdc/efficiency-analysis?current=1&size=15', { |
| | | |
| | | }) |
| | | this.$HTTP.post('/api/blade-cps/workstation-wcs-feedback/feedback-status', [...vals]) |
| | | // }) |
| | | // this.$HTTP.post('/api/blade-cps/workstation-wcs-feedback/feedback-status', [...vals]) |
| | | } |
| | | } |
| | | } |