src/views/dashboard/BranchFactorySignage.vue
@@ -18,31 +18,11 @@
            <div id="warranty_malfunction_chart" style="width:50%;height: 420px;"></div>
          </div>
          <div class="support-plan-container">
            <div class="support-plan-item" style="background:#5FE0AF">
              <div>本月三保计划</div>
            <div v-for="(item,index) in supportPlanList" :key="index" class="support-plan-item"
                 :style="{background:item.backgroundColor}" @click="openMaintenanceModal(item)">
              <div>{{item.planTime}}</div>
              <div class="plan-value-container">
                <div class="plan-value">{{thisMonthMaintenancePlanNum}}</div>
                <div>台</div>
              </div>
            </div>
            <div class="support-plan-item" style="background:#409EFF">
              <div>本月完成</div>
              <div class="plan-value-container">
                <div class="plan-value">{{thisMonthMaintenanceRealNum}}</div>
                <div>台</div>
              </div>
            </div>
            <div class="support-plan-item" style="background:#D6BC52">
              <div>下月三保计划</div>
              <div class="plan-value-container">
                <div class="plan-value">{{nextMonthMaintenancePlanNum}}</div>
                <div>台</div>
              </div>
            </div>
            <div class="support-plan-item" style="background:#58D9F9">
              <div>下下月三保计划</div>
              <div class="plan-value-container">
                <div class="plan-value">{{nextNextMonthMaintenancePlanNum}}</div>
                <div class="plan-value">{{$data[item.planValueLabel]}}</div>
                <div>台</div>
              </div>
            </div>
@@ -62,6 +42,10 @@
          </div>
        </dv-border-box-9>
      </div>
      <SignageModal :modalVisible="modalVisible" :modalTitle=modalTitle :modalDataApiUrl="modalDataApiUrl"
                    :modalDataApiParams="modalDataApiParams"
                    @closeModal="modalVisible=false"/>
    </div>
  </div>
</template>
@@ -69,9 +53,11 @@
<script>
  import signageApi from '@/api/signage'
  import moment from 'moment'
  import SignageModal from './modules/SignageModal'
  export default {
    name: 'BranchFactorySignage',
    components: { SignageModal },
    props: {
      productionCode: {
        type: String,
@@ -104,6 +90,32 @@
          { value: '0', name: '停机' },
          { value: '0', name: '运行' }
        ],
        supportPlanList: [
          {
            planTime: '本月三保计划',
            planValueLabel: 'thisMonthMaintenancePlanNum',
            backgroundColor: '#5FE0AF',
            apiUrl: '/eam/calibrationOrder/showThisMonthMaintenanceList'
          },
          {
            planTime: '本月完成',
            planValueLabel: 'thisMonthMaintenanceRealNum',
            backgroundColor: '#409EFF',
            apiUrl: '/eam/calibrationOrder/showThisMonthMaintenanceFinishList'
          },
          {
            planTime: '下月三保计划',
            planValueLabel: 'nextMonthMaintenancePlanNum',
            backgroundColor: '#D6BC52',
            apiUrl: '/eam/calibrationOrder/showNextMonthMaintenanceList'
          },
          {
            planTime: '下下月三保计划',
            planValueLabel: 'nextNextMonthMaintenancePlanNum',
            backgroundColor: '#58D9F9',
            apiUrl: '/eam/calibrationOrder/showNextNextMonthMaintenanceList'
          }
        ],
        thisMonthMaintenancePlanNum: 0,
        thisMonthMaintenanceRealNum: 0,
        nextMonthMaintenancePlanNum: 0,
@@ -115,7 +127,12 @@
        doubleBarChartData: {},
        workshopProblemChartData: [],
        maintenanceConfig: {},
        problemConfig: {}
        problemConfig: {},
        modalVisible: false,
        modalTitle: '',
        modalDataApiUrl: '',
        modalTableColumns: [],
        modalDataApiParams: {}
      }
    },
    mounted() {
@@ -184,9 +201,9 @@
          .then(res => {
            if (res.success && res.result) {
              this.techConditionData = [
                { value: res.result[0].qualifiedCount, name: '合格' },
                { value: res.result[0].disabledCount, name: '禁用' },
                { value: res.result[0].limitedUseCount, name: '限用' }
                { value: res.result[0].qualifiedCount, name: '合格', technologyStatus: 'qualified' },
                { value: res.result[0].disabledCount, name: '禁用', technologyStatus: 'disabled' },
                { value: res.result[0].limitedUseCount, name: '限用', technologyStatus: 'limitedUse' }
              ]
            }
            this.drawTechConditionChart()
@@ -206,9 +223,9 @@
          .then(res => {
            if (res.success && res.result) {
              this.warrantyMalfunctionData = [
                { value: res.result[0].failurTotalCount, name: '报修' },
                { value: res.result[0].stopCount, name: '停机' },
                { value: res.result[0].noStopCount, name: '运行' }
                { value: res.result[0].failurTotalCount, name: '报修', isStop: '' },
                { value: res.result[0].stopCount, name: '停机', isStop: '2' },
                { value: res.result[0].noStopCount, name: '运行', isStop: '1' }
              ]
            }
            this.drawWarrantyMalfunctionChart()
@@ -678,6 +695,16 @@
        }
        this.techConditionChart.setOption(option, true)
        this.techConditionChart.hideLoading()
        this.techConditionChart.on('click', params => {
          this.modalTitle = `技术状态(${params.name})`
          this.modalDataApiParams = {
            technologyStatus: this.techConditionData.find(item => item.name === params.name).technologyStatus,
            productionCode: this.productionCode
          }
          this.modalDataApiUrl = '/eam/calibrationOrder/showEquipmentByTechnologyStatus'
          this.modalVisible = true
        })
      },
      /* 绘制设备报修故障饼图 */
@@ -757,6 +784,16 @@
        }
        this.warrantyMalfunctionChart.setOption(option, true)
        this.warrantyMalfunctionChart.hideLoading()
        this.warrantyMalfunctionChart.on('click', params => {
          this.modalTitle = `报修故障(${params.name})`
          this.modalDataApiParams = {
            isStop: this.warrantyMalfunctionData.find(item => item.name === params.name).isStop,
            productionCode: this.productionCode
          }
          this.modalDataApiUrl = '/eam/calibrationOrder/showEquipmentByReportRepair'
          this.modalVisible = true
        })
      },
      /* 绘制车间保养滚动表 */
@@ -1081,6 +1118,19 @@
      },
      /**
       * 点击三保展示栏后打开弹窗
       * @param record 点击当前三保信息
       */
      openMaintenanceModal(record) {
        this.modalTitle = record.planTime
        this.modalDataApiParams = {
          productionCode: this.productionCode
        }
        this.modalDataApiUrl = record.apiUrl
        this.modalVisible = true
      },
      /**
       * 窗口尺寸变化时触发
       * 调整图表尺寸以适应分辨率
       */
@@ -1142,6 +1192,7 @@
            padding: 5px 20px;
            font-size: 20px;
            margin-bottom: 10px;
            cursor: pointer;
            .plan-value-container {
              display: flex;