|
@@ -1,7 +1,7 @@
|
|
<!--
|
|
<!--
|
|
* @Author: your name
|
|
* @Author: your name
|
|
* @Date: 2021-10-21 17:51:22
|
|
* @Date: 2021-10-21 17:51:22
|
|
- * @LastEditTime: 2021-11-11 08:39:16
|
|
|
|
|
|
+ * @LastEditTime: 2021-11-22 17:24:48
|
|
* @LastEditors: Please set LastEditors
|
|
* @LastEditors: Please set LastEditors
|
|
* @Description: 生产经营页面
|
|
* @Description: 生产经营页面
|
|
* @FilePath: \hyyfScreen\src\views\Production\Production.vue
|
|
* @FilePath: \hyyfScreen\src\views\Production\Production.vue
|
|
@@ -30,15 +30,51 @@
|
|
<!-- 第二列 -->
|
|
<!-- 第二列 -->
|
|
<div class="production-column production-mid-column">
|
|
<div class="production-column production-mid-column">
|
|
<div class="production-column-item">
|
|
<div class="production-column-item">
|
|
- <pro-board :title="'重要指标'">
|
|
|
|
|
|
+ <pro-board :title="'重要指标'" :click="true" @getClick="clickIndicators">
|
|
<important-items :data="importantData"></important-items>
|
|
<important-items :data="importantData"></important-items>
|
|
|
|
+ <!-- 重要指标的图 -->
|
|
|
|
+ <transition name="fade">
|
|
|
|
+ <div v-if="indicatorsVisible" class="indicators">
|
|
|
|
+ <div class="indicators-title">
|
|
|
|
+ <div class="target">指标数量:78</div>
|
|
|
|
+ <div class="target">上升指标:58</div>
|
|
|
|
+ <div class="target">下降指标:15</div>
|
|
|
|
+ <div class="target">持平指标:5</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="indicators-search">
|
|
|
|
+ <div class="indicators-search-icon"></div>
|
|
|
|
+ <input class="indicators-search-input" type="text" placeholder="搜索">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="indicators-charts">
|
|
|
|
+ <indicator-item
|
|
|
|
+ v-for="(item, index) in indicatorsData"
|
|
|
|
+ :key="item.title"
|
|
|
|
+ v-bind="item"
|
|
|
|
+ :id="index"
|
|
|
|
+ @clickItem="clickItem(index)">
|
|
|
|
+ </indicator-item>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </transition>
|
|
|
|
+ <transition name="fade">
|
|
|
|
+ <div v-if="indicatorsItemVisible" class="indicators indicator-one-item">
|
|
|
|
+ <div class="back-triangle" @click="clickBack"></div>
|
|
|
|
+ <div class="indicator-item-title">
|
|
|
|
+ {{ indicatorsData[indicatorIndex].title }}
|
|
|
|
+ <span :class="indicatorsData[indicatorIndex].ifPositive? 'positive': 'negative'" class="num-common">{{ indicatorsData[indicatorIndex].titleNum }}</span>
|
|
|
|
+ <span :class="indicatorsData[indicatorIndex].ifPositive? 'positive': 'negative'" class="num-common">{{ indicatorsData[indicatorIndex].subtitleNum }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="indicator-item-subtitle">{{ indicatorsData[indicatorIndex].littleTitle }}</div>
|
|
|
|
+ <indicator-one-chart v-bind="indicatorsData[indicatorIndex]"></indicator-one-chart>
|
|
|
|
+ </div>
|
|
|
|
+ </transition>
|
|
</pro-board>
|
|
</pro-board>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="production-column-item">
|
|
<div class="production-column-item">
|
|
<pro-board :title="'销售分析'">
|
|
<pro-board :title="'销售分析'">
|
|
<div class="sales">
|
|
<div class="sales">
|
|
- <div class="sales-condition">
|
|
|
|
|
|
+ <!-- <div class="sales-condition">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="getSalesDates"
|
|
v-model="getSalesDates"
|
|
type="datetimerange"
|
|
type="datetimerange"
|
|
@@ -49,7 +85,7 @@
|
|
align="right"
|
|
align="right"
|
|
size="mini">
|
|
size="mini">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<div class="sales-content">
|
|
<div class="sales-content">
|
|
<div class="sales-left">
|
|
<div class="sales-left">
|
|
<div class="up">
|
|
<div class="up">
|
|
@@ -172,6 +208,8 @@ import WorkItems from './board/WorkItems.vue'
|
|
import ImportantItems from './board/ImportantItems.vue'
|
|
import ImportantItems from './board/ImportantItems.vue'
|
|
import ChartCostPie from './board/ChartCostPie.vue'
|
|
import ChartCostPie from './board/ChartCostPie.vue'
|
|
import ChartCostLine from './board/ChartCostLine.vue'
|
|
import ChartCostLine from './board/ChartCostLine.vue'
|
|
|
|
+import IndicatorItem from './board/IndicatorItem.vue'
|
|
|
|
+import IndicatorOneChart from './board/IndicatorOneChart.vue'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "Production",
|
|
name: "Production",
|
|
@@ -418,7 +456,75 @@ export default {
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
|
|
- costLineData: [32541, 82467, 54363, 64642, 34651, 95422,]
|
|
|
|
|
|
+ costLineData: [32541, 82467, 54363, 64642, 34651, 95422,],
|
|
|
|
+ indicatorsVisible: false, // 是否显示股票图
|
|
|
|
+ indicatorsData: [
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ title: '窝均产仔数',
|
|
|
|
+ subtitle: '母猪每一胎生产的仔猪数量',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '23',
|
|
|
|
+ subtitleNum: '+1',
|
|
|
|
+ ifPositive: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 2,
|
|
|
|
+ title: '产房存活率',
|
|
|
|
+ subtitle: '每一窝仔猪断奶前平均存活率',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '92.5%',
|
|
|
|
+ subtitleNum: '+0.75%',
|
|
|
|
+ ifPositive: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 3,
|
|
|
|
+ title: '保育存活率',
|
|
|
|
+ subtitle: '保育阶段的猪只存活率',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '97.3%',
|
|
|
|
+ subtitleNum: '-0.43%',
|
|
|
|
+ ifPositive: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 4,
|
|
|
|
+ title: '年提供出栏猪数',
|
|
|
|
+ subtitle: '每年可以提供出栏猪',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '214525',
|
|
|
|
+ subtitleNum: '+13.2%',
|
|
|
|
+ ifPositive: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 5,
|
|
|
|
+ title: '保育存活率',
|
|
|
|
+ subtitle: '保育阶段的猪只存活率',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '97.3%',
|
|
|
|
+ subtitleNum: '-0.43%',
|
|
|
|
+ ifPositive: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 6,
|
|
|
|
+ title: '窝均产仔数',
|
|
|
|
+ subtitle: '母猪每一胎生产的仔猪数量',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '23',
|
|
|
|
+ subtitleNum: '+1',
|
|
|
|
+ ifPositive: true
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 7,
|
|
|
|
+ title: '保育存活率',
|
|
|
|
+ subtitle: '保育阶段的猪只存活率',
|
|
|
|
+ littleTitle: '年利用窝数 * 平均窝产正常仔数 * 仔猪成活率 * 查询期间的基础母猪平均存栏',
|
|
|
|
+ titleNum: '97.3%',
|
|
|
|
+ subtitleNum: '-0.43%',
|
|
|
|
+ ifPositive: false
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ indicatorsItemVisible: false, // 只要指标的一张图
|
|
|
|
+ indicatorIndex: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
@@ -431,30 +537,42 @@ export default {
|
|
WorkItems,
|
|
WorkItems,
|
|
ImportantItems,
|
|
ImportantItems,
|
|
ChartCostPie,
|
|
ChartCostPie,
|
|
- ChartCostLine
|
|
|
|
|
|
+ ChartCostLine,
|
|
|
|
+ IndicatorItem,
|
|
|
|
+ IndicatorOneChart
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
getWorkInfo(value) { // 工作看板的点击事件
|
|
getWorkInfo(value) { // 工作看板的点击事件
|
|
console.log(value)
|
|
console.log(value)
|
|
this.ifWorkInfos = !this.ifWorkInfos
|
|
this.ifWorkInfos = !this.ifWorkInfos
|
|
|
|
+ },
|
|
|
|
+ clickIndicators() {
|
|
|
|
+ this.indicatorsVisible = !this.indicatorsVisible
|
|
|
|
+ console.log(this.indicatorsVisible)
|
|
|
|
+ },
|
|
|
|
+ clickItem(index) {
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // this.indicatorsVisible = true
|
|
|
|
+ // })
|
|
|
|
+ this.indicatorIndex = index
|
|
|
|
+ this.indicatorsItemVisible = true
|
|
|
|
+ console.log(111111111)
|
|
|
|
+ },
|
|
|
|
+ clickBack() {
|
|
|
|
+ this.indicatorsItemVisible = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
-/* 要删除的东西 */
|
|
|
|
-.board-bgc {
|
|
|
|
- background-color: rgb(226, 144, 144);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
.production {
|
|
.production {
|
|
height: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+ padding-top: 20px;
|
|
}
|
|
}
|
|
/* 每一列 */
|
|
/* 每一列 */
|
|
.production-column {
|
|
.production-column {
|
|
@@ -476,6 +594,102 @@ export default {
|
|
height: 66%;
|
|
height: 66%;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/** 重要指标的图 */
|
|
|
|
+.indicators {
|
|
|
|
+ position: absolute;
|
|
|
|
+ background-color: rgb(0, 0, 0);
|
|
|
|
+ color: #fff;
|
|
|
|
+ top: 26px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 290%;
|
|
|
|
+ z-index: 10;
|
|
|
|
+ overflow: auto;
|
|
|
|
+}
|
|
|
|
+/* 标题栏 */
|
|
|
|
+.indicators-title {
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+ margin-top: 30px;
|
|
|
|
+}
|
|
|
|
+/* 搜索框 */
|
|
|
|
+.indicators-search {
|
|
|
|
+ height: 34px;
|
|
|
|
+ margin: 30px 8px 0px;
|
|
|
|
+ /* padding-top: 4px; */
|
|
|
|
+ background-color: rgb(56, 55, 55);
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+}
|
|
|
|
+.indicators-search-icon {
|
|
|
|
+ margin-top: 2px;
|
|
|
|
+ width: 30px;
|
|
|
|
+ height: 30px;
|
|
|
|
+ background: url("../../assets/Production/u4772.svg") no-repeat;
|
|
|
|
+ background-size: 100% 100%;
|
|
|
|
+}
|
|
|
|
+.indicators-search-input {
|
|
|
|
+ width: calc(96% - 30px);
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ background-color: transparent;
|
|
|
|
+ color: #fff;
|
|
|
|
+ outline: unset;
|
|
|
|
+ border: 0;
|
|
|
|
+}
|
|
|
|
+/** 重要指标图的过渡动画 */
|
|
|
|
+.fade-enter-active, .fade-leave-active {
|
|
|
|
+ transition: opacity 1s;
|
|
|
|
+}
|
|
|
|
+.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
|
|
|
+ opacity: 0;
|
|
|
|
+}
|
|
|
|
+/** 重要指标图 - 一张图 */
|
|
|
|
+.indicator-one-item {
|
|
|
|
+ text-align: left;
|
|
|
|
+ z-index: 11;
|
|
|
|
+}
|
|
|
|
+/* 返回的三角形 */
|
|
|
|
+.back-triangle {
|
|
|
|
+ width: 0px;
|
|
|
|
+ height: 0px;
|
|
|
|
+ border: 30px solid;
|
|
|
|
+ border-color: transparent rgba(124, 121, 121, 0.5) transparent;
|
|
|
|
+ border-left: 120px;
|
|
|
|
+ float: right;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ margin-right: 20px;
|
|
|
|
+}
|
|
|
|
+.indicator-item-title {
|
|
|
|
+ font-size: 25px;
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ margin-top: 30px;
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+ text-align: left;
|
|
|
|
+ display: inline-block;
|
|
|
|
+}
|
|
|
|
+.num-common {
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+ position: relative;
|
|
|
|
+ bottom: 4px;
|
|
|
|
+}
|
|
|
|
+/* 红色 */
|
|
|
|
+.positive {
|
|
|
|
+ color: red;
|
|
|
|
+}
|
|
|
|
+/* 绿色 */
|
|
|
|
+.negative {
|
|
|
|
+ color: green;
|
|
|
|
+}
|
|
|
|
+.indicator-item-subtitle {
|
|
|
|
+ margin: 20px 30px 20px 20px;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+}
|
|
|
|
|
|
/* 销售分析 */
|
|
/* 销售分析 */
|
|
.sales {
|
|
.sales {
|