春风项目四线(合箱线、总装线)
wujian
2024-01-23 aa9d614107d8219d4eee485db1e329c39b3b3c59
jcdm-ui/src/views/main/cfkb/Instructions/index.vue
@@ -69,17 +69,36 @@
      </el-col>
    </el-row>
    <div>
      <el-dialog
        title="工艺文件"
        :visible.sync="dialogVisible"
        width="70%"
        lock-scroll="false"
        @close="closeMethod"
      >
        <div><el-image style="height: 1090px;width: 960px;margin-left: 33px" :src="mainProcessSrc"></el-image></div>
        <span slot="footer" class="dialog-footer">
    <el-button type="primary" @click="dialogVisible = false" style="margin-right: 80px">确 定</el-button>
  </span>
      </el-dialog>
    </div>
  </div>
</template>
<script>
import {listFormulaChild, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild";
import {getMainProductProcess, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild";
import {listStationConf,getIp} from "@/api/main/sc/stationConf";
export default {
  name: "index",
  data() {
    return {
      dialogVisible: false,
      mainProcessSrc: '',
      mainProcess: [],
      isClickd: '', // 初始化为未点击状态
      locationCode: "未配置",
      locationName: "未配置工位",
@@ -149,7 +168,7 @@
  mounted() {
    this.getStationConf()
    // this.changeProducts(this.productCode)
    this.changeProducts("2V91")
    // this.changeProducts("2V91")
    this.getNowTime()
    // this.autoShow()
  },
@@ -166,8 +185,15 @@
        listStationConf(queryParams).then(response => {
          this.locationName = response.rows[0].processesName
          this.locationCode = response.rows[0].processesCode
          console.log('llllll',this.locationCode)
          this.changeProducts("2V91")
        });
      });
    },
    closeMethod(){
      this.mainProcessSrc = ''
    },
    //获取当前时间
    getNowTime () {
@@ -198,6 +224,10 @@
    setImg(index) {
      this.address = this.tableData[index].address
      this.src = this.tableData[index].img
    },
    cleanImg(){
      this.address = ''
      this.src = ''
    },
    setBg() {
      if (document.getElementById('outerDiv' + (this.tableData.length - 1)).style.background === 'yellow') {
@@ -234,12 +264,20 @@
      this.getUpOrDown(1)
    },
    processDocuments(){
      getMainProductProcess(this.queryParams).then(res => {
        this.mainProcess = res.rows
        if (res.rows!=null && res.rows.length>0){
          this.mainProcessSrc = res.rows[0].img
        }
      })
      this.dialogVisible = true
    },
    changeProducts(val){
      console.log("------更换图片",val)
      console.log("------目录==============",this.tableData)
      console.log("locationCode",this.locationCode)
      this.productCode = val
      const _this = this
@@ -247,8 +285,9 @@
      /** 查询配方配置子信息列表 */
      this.queryParams.productCode = val;
      this.queryParams.processesCode = this.locationCode
      listFormulaChild(this.queryParams).then(response => {
      getProductProcess(this.queryParams).then(response => {
        this.tableData = [];
        this.cleanImg()
        this.tableData = response.rows;
        this.$nextTick(() => {
          clearInterval(this.intervalId);
@@ -329,6 +368,12 @@
.active {
  background-color: #31b431; /* 点击后的背景色 */
}
::v-deep .el-dialog {
  height: 90%;
  overflow-y: auto;
}
::v-deep .el-dialog__footer{
  margin-top: 10px;
}
</style>