| | |
| | | * @Author: lzhe lzhe@example.com |
| | | * @Date: 2024-04-26 09:36:18 |
| | | * @LastEditors: lzhe lzhe@example.com |
| | | * @LastEditTime: 2024-05-14 18:30:07 |
| | | * @LastEditTime: 2024-06-05 14:06: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> |
| | | <div class="aposcope-main"> |
| | | <div class="aposcope-left"> |
| | | <div class="left-title">查询条件</div> |
| | | <div class="left-title-col">日期</div> |
| | | <el-date-picker v-model="time" type="daterange" :shortcuts="shortcuts" range-separator="-" size="small" style="width: 100%;" value-format="YYYY-MM-DD"/> |
| | | <div class="left-title-col">工位</div> |
| | | <el-button-group > |
| | | <el-button @click="changeLeftTab(item)" :type="btnLeftctive == item.id ? 'primary' : ''" v-for="item in btnLeftList" :key="item.id" size="small">{{item.title }}</el-button> |
| | | </el-button-group> |
| | | <div class="MYTree"> |
| | | <MYTree v-if="btnLeftctive == '1'" getAll v-model="treeChecked" show-checkbox class="MYTree-content"></MYTree> |
| | | <el-tree v-if="btnLeftctive == '2'" :data="tree2" :expand-on-click-node="false" default-expand-all show-checkbox :props="{label: 'name', children: 'children'}" class="treeActive" @check="treeListNode" /> |
| | | </div> |
| | | <div class="footer"> |
| | | <el-button @click="query" type="primary">查询</el-button> |
| | | <el-button @click="exportData">导出</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="aposcope-right"> |
| | | <el-tabs tab-position="top" v-model="activeName" type="card" @tab-change="tabChange"> |
| | | <el-tab-pane label="按班次统计" name="shift"> |
| | | <!-- 日期 --> |
| | | <el-button-group> |
| | | <el-button @click="changeTab(item)" :type="btnListActive == item.id ? 'primary' : ''" v-for="item in btnList" :key="item.id" size="small">{{item.title }}</el-button> |
| | | </el-button-group> |
| | | <div class="fact-analysis-realtim" v-if="setTitle.length == 0"> |
| | | <div class="wimi-empty" v-if="isshowempty" style="background-color: rgb(255, 255, 255);"> |
| | | <div class="wimi-empty-img" style="width: 150px; height: 150px;"> |
| | | <img src="./quesheng.bd026700.png" style="height: auto; width: 100%;"> |
| | | </div> |
| | | <div class="empty-description"> |
| | | <div>暂无数据</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 按班次统计charts --> |
| | | <div id="analysisA" v-if="setTitle.length != 0"> |
| | | <div class="demo-collapse"> |
| | | <el-collapse v-model="activeNames" accordion> |
| | | <el-collapse-item v-for="(item,index) in setTitle" :name="index + 1"> |
| | | <template #title> |
| | | <el-icon size="16" color="#3b8e8e"><Memo /></el-icon> |
| | | <span class="collr-title">班次{{index + 1}}</span> |
| | | <el-button size="small">{{item.indexName}}</el-button> |
| | | </template> |
| | | <div> |
| | | <!-- charts --> |
| | | <div :id="'recordwork' + item.shiftIndex" style="height:300px;"></div> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | | <!-- <div class="paginationwork"> |
| | | <el-pagination layout="prev, pager, next" @current-change="recordChange" :total="total" :default-page-size="6"/> |
| | | </div> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="按时间周期统计" name="time"> |
| | | <div class="fact-analysis-realtim" v-if="setTitle.length == 0"> |
| | | <div class="wimi-empty" v-if="isshowempty" style="background-color: rgb(255, 255, 255);"> |
| | | <div class="wimi-empty-img" style="width: 150px; height: 150px;"> |
| | | <img src="./quesheng.bd026700.png" style="height: auto; width: 100%;"> |
| | | </div> |
| | | <div class="empty-description"> |
| | | <div>暂无数据</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 按时间周期统计charts --> |
| | | <div id="analysisA" v-if="setTitle.length != 0"> |
| | | <div class="demo-collapse"> |
| | | <el-collapse v-model="activeNames1" accordion> |
| | | <el-collapse-item v-for="(item,index) in setTitle1" :name="index + 1"> |
| | | <template #title> |
| | | <el-icon size="16" color="#3b8e8e"><Memo /></el-icon> |
| | | <span class="collr-title">{{item.name}}</span> |
| | | <el-button size="small" v-if="index != 0">{{item.indexName}}</el-button> |
| | | </template> |
| | | <div> |
| | | <el-button-group> |
| | | <el-button @click="changeTabB(item1,index,index1)" :type="item.btnListActive == item1.id ? 'primary' : ''" v-for="(item1,index1) in item.btnList" :key="item1.id" size="small">{{item1.title }}</el-button> |
| | | </el-button-group> |
| | | <!-- charts --> |
| | | <div :id="'chartsB' + index" style="height:300px;"></div> |
| | | <el-main style="height: 100%;"> |
| | | <el-card shadow="never" style="height: 100%;" body-style="height: 100%;padding: 0;"> |
| | | <el-container style="height: 100%;"> |
| | | <el-aside width="300px" style="height: 100%;"> |
| | | <el-container> |
| | | <div class="left-title">查询条件</div> |
| | | <el-main style="padding: 20px;"> |
| | | <el-row> |
| | | <el-col style="margin-bottom: 12px;">日期</el-col> |
| | | <el-col> |
| | | <el-date-picker v-model="time" type="daterange" :shortcuts="shortcuts" range-separator="-" size="small" style="width: 100%;" value-format="YYYY-MM-DD"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 14px;"> |
| | | 工位 |
| | | </el-row> |
| | | <el-row style="margin-top: 14px;"> |
| | | <el-button-group > |
| | | <el-button @click="changeLeftTab(item)" :type="btnLeftctive == item.id ? 'primary' : ''" v-for="item in btnLeftList" :key="item.id" size="small">{{item.title }}</el-button> |
| | | </el-button-group> |
| | | </el-row> |
| | | <el-row style="margin-top: 14px;"> |
| | | <MYTree v-if="btnLeftctive == '1'" getAll v-model="treeChecked" show-checkbox class="MYTree-content"></MYTree> |
| | | <el-tree v-if="btnLeftctive == '2'" :data="tree2" :expand-on-click-node="false" default-expand-all show-checkbox :props="{label: 'name', children: 'children'}" class="treeActive" @check="treeListNode" /> |
| | | </el-row> |
| | | </el-main> |
| | | <el-footer> |
| | | <el-button @click="query" type="primary">查询</el-button> |
| | | <el-button @click="exportData">导出</el-button> |
| | | </el-footer> |
| | | </el-container> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-main> |
| | | <el-tabs tab-position="top" v-model="activeName" type="card" @tab-change="tabChange"> |
| | | <el-tab-pane label="按班次统计" name="shift"> |
| | | <!-- 日期 --> |
| | | <el-button-group> |
| | | <el-button @click="changeTab(item)" :type="btnListActive == item.id ? 'primary' : ''" v-for="item in btnList" :key="item.id" size="small">{{item.title }}</el-button> |
| | | </el-button-group> |
| | | <div class="fact-analysis-realtim" v-if="setTitle.length == 0"> |
| | | <div class="wimi-empty" v-if="isshowempty" style="background-color: rgb(255, 255, 255);"> |
| | | <!-- <div class="wimi-empty-img" style="width: 150px; height: 150px;"> |
| | | <img src="./quesheng.bd026700.png" style="height: auto; width: 100%;"> |
| | | </div> --> |
| | | <div class="empty-description"> |
| | | <div>暂无数据</div> |
| | | </div> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | | <!-- <div class="paginationwork"> |
| | | <el-pagination layout="prev, pager, next" @current-change="recordChange" :total="total" :default-page-size="6"/> |
| | | </div> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 按班次统计charts --> |
| | | <div id="analysisA" v-if="setTitle.length != 0"> |
| | | <div class="demo-collapse"> |
| | | <el-collapse v-model="activeNames" accordion> |
| | | <el-collapse-item v-for="(item,index) in setTitle" :name="index + 1"> |
| | | <template #title> |
| | | <el-icon size="16" color="#3b8e8e"><Memo /></el-icon> |
| | | <span class="collr-title">班次{{index + 1}}</span> |
| | | <el-button size="small">{{item.indexName}}</el-button> |
| | | </template> |
| | | <div> |
| | | <!-- charts --> |
| | | <div :id="'recordwork' + item.shiftIndex" style="height:300px;"></div> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | | <!-- <div class="paginationwork"> |
| | | <el-pagination layout="prev, pager, next" @current-change="recordChange" :total="total" :default-page-size="6"/> |
| | | </div> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="按时间周期统计" name="time"> |
| | | <div class="fact-analysis-realtim" v-if="setTitle.length == 0"> |
| | | <div class="wimi-empty" v-if="isshowempty" style="background-color: rgb(255, 255, 255);"> |
| | | <!-- <div class="wimi-empty-img" style="width: 150px; height: 150px;"> |
| | | <img src="./quesheng.bd026700.png" style="height: auto; width: 100%;"> |
| | | </div> --> |
| | | <div class="empty-description"> |
| | | <div>暂无数据</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 按时间周期统计charts --> |
| | | <div id="analysisA" v-if="setTitle.length != 0"> |
| | | <div class="demo-collapse"> |
| | | <el-collapse v-model="activeNames1" accordion> |
| | | <el-collapse-item v-for="(item,index) in setTitle1" :name="index + 1"> |
| | | <template #title> |
| | | <el-icon size="16" color="#3b8e8e"><Memo /></el-icon> |
| | | <span class="collr-title">{{item.name}}</span> |
| | | <el-button size="small" v-if="index != 0">{{item.indexName}}</el-button> |
| | | </template> |
| | | <div> |
| | | <el-button-group> |
| | | <el-button @click="changeTabB(item1,index,index1)" :type="item.btnListActive == item1.id ? 'primary' : ''" v-for="(item1,index1) in item.btnList" :key="item1.id" size="small">{{item1.title }}</el-button> |
| | | </el-button-group> |
| | | <!-- charts --> |
| | | <div :id="'chartsB' + index" style="height:300px;"></div> |
| | | </div> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </div> |
| | | <!-- <div class="paginationwork"> |
| | | <el-pagination layout="prev, pager, next" @current-change="recordChange" :total="total" :default-page-size="6"/> |
| | | </div> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </el-card> |
| | | </el-main> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | indexName : firstDayOfJuly + "至" + lastDayOfJuly |
| | | }); |
| | | this.setTitle1 = arr; |
| | | this.getDataChartsB("DAY"); |
| | | this.getDataChartsB("MONTH"); |
| | | this.getDataChartsB("WEEK"); |
| | | this.$nextTick(()=> { |
| | | this.getDataChartsB("DAY"); |
| | | this.getDataChartsB("MONTH"); |
| | | this.getDataChartsB("WEEK"); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | .MYTree { |
| | | margin-top:12px; |
| | | height: 600px; |
| | | margin-bottom: 48px; |
| | | } |
| | | .MYTree-content { |
| | | height: 100%; |