春风项目四线(合箱线、总装线)
wujian
2024-01-19 23213c63022ee4dd7f4d8f678838865f01e9b2df
jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -9,12 +9,12 @@
      </el-col>
      <el-col :span="3">
        <el-card shadow="always">
          <span class="centerText" style="margin-top: 26px">{{productCode}}</span>
          <span class="centerText" style="margin-top: 26px">{{locationCode}}</span>
        </el-card>
      </el-col>
      <el-col :span="15">
        <el-card shadow="always">
          <span class="centerText">装副轴,拨叉</span>
          <span class="centerText">{{locationName}}</span>
        </el-card>
      </el-col>
    </el-row>
@@ -24,7 +24,7 @@
          <div  class="container" style="height: 50px;background-color: #00afff;margin-bottom: 10px">
            <span class="centered">作业流程</span>
          </div>
          <div v-for="(item,index) in tableData" :key="item.sort" class="outerDiv" :id="'outerDiv'+index">
          <div v-for="(item,index) in tableData" :key="item.index" class="outerDiv" :id="'outerDiv'+index">
            <div class="innerDiv1">
              <div class="innerDiv2">
                <span class="content_left">{{ index+1 }}</span>
@@ -56,13 +56,13 @@
              <el-button type="primary" @click="processDocuments()" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-folder-opened">工艺文件</el-button>
            </el-row>
            <el-row style="height: 80px;margin-top: 5px">
              <el-button type="success" @click="changeProducts('2V91')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">2V91</el-button>
              <el-button type="info" @click="changeProducts('2V91')" :class="{ 'active': isClickd === '2V91' }" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">2V91</el-button>
            </el-row>
            <el-row style="height: 80px;">
              <el-button type="info" @click="changeProducts('191')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">191</el-button>
              <el-button type="info" @click="changeProducts('191')" :class="{ 'active': isClickd === '191' }" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">191</el-button>
            </el-row>
            <el-row style="height: 80px;">
              <el-button type="info" @click="changeProducts('0JWF')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">0JWF</el-button>
              <el-button type="info" @click="changeProducts('0JWF')" :class="{ 'active': isClickd === '0JWF' }" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">0JWF</el-button>
            </el-row>
          </el-card>
        </el-col>
@@ -73,12 +73,16 @@
</template>
<script>
import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild";
import {listFormulaChild, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild";
import {listStationConf,getIp} from "@/api/main/sc/stationConf";
export default {
  name: "index",
  data() {
    return {
      isClickd: '', // 初始化为未点击状态
      locationCode: "未配置",
      locationName: "未配置工位",
      queryParams: {
        pageNum: 1,
        pageSize: 10,
@@ -143,7 +147,9 @@
    this.tableData = []
  },
  mounted() {
    this.changeProducts(this.productCode)
    this.getStationConf()
    // this.changeProducts(this.productCode)
    this.changeProducts("2V91")
    this.getNowTime()
    // this.autoShow()
  },
@@ -151,6 +157,18 @@
  //   currentTime:
  // },
  methods: {
    /** 查询工位终端配置列表 */
    getStationConf() {
      getIp().then(response => {
        let queryParams = {
          ipAddress: response.msg,
        }
        listStationConf(queryParams).then(response => {
          this.locationName = response.rows[0].processesName
          this.locationCode = response.rows[0].processesCode
        });
      });
    },
    //获取当前时间
    getNowTime () {
      let speed = 1000
@@ -220,16 +238,20 @@
    },
    changeProducts(val){
      this.getStationConf()
      console.log("------更换图片",val)
      console.log("------目录==============",this.tableData)
      this.productCode = val
      const _this = this
      this.isClickd = val; // 切换isClicked的值
      /** 查询配方配置子信息列表 */
      this.queryParams.productCode = val;
      this.queryParams.processesCode = this.locationCode
      listFormulaChild(this.queryParams).then(response => {
        // this.tableData = [];
        this.tableData = [];
        this.tableData = response.rows;
        console.log(response.rows)
        this.$nextTick(() => {
          clearInterval(this.intervalId);
          document.getElementById('outerDiv0').style.background = 'yellow'
@@ -306,6 +328,9 @@
::v-deep .el-card__body{
  height: 100px;
}
.active {
  background-color: #31b431; /* 点击后的背景色 */
}
</style>