wuyouming666
2023-12-12 c7682df2f5ef53c79847ff8cc625f5ad69a7a999
CanadaMes-ui/src/views/Electrical/AutomaticParameterSetting.vue
@@ -30,37 +30,43 @@
<router-link to="/Electrical/Servomanualone" tag="el-button" type="text" active-class="blue-button">{{
        $t('Servomanualone')
      }}</router-link>
      <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1')
      }}</router-link>
      <!-- <router-link to="/Electrical/Parameter1" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter1')
      }}</router-link> -->
     
      <router-link to="/Electrical/Positioning1" tag="el-button" type="text" active-class="blue-button">{{
        $t('Address parameter settings')
      }}</router-link>
      <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{
      <!-- <router-link to="/Electrical/Positioning2" tag="el-button" type="text" active-class="blue-button">{{
        $t('Positioning2')
      }}</router-link>
      }}</router-link> -->
     
      <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{
      <!-- <router-link to="/Electrical/ManualonePosition2" tag="el-button" type="text" active-class="blue-button">{{
        $t('ManualonePosition2')
      }}</router-link>
      }}</router-link> -->
      <router-link to="/Electrical/AutomaticParameterSetting" tag="el-button" type="text" active-class="blue-button">{{
        $t('Speed parameter settings')
      }}</router-link>
      
    </el-breadcrumb>
    <el-row :gutter="20">
      <el-col :span="12" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex">
        <el-card class="json-block" style="width:585px;">
          <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
            <div class="item-row" v-if="item.type === '0'">
              <span class="name" v-if="item.type === '0'" style="width:300px;">{{ item.name }}</span>
              <el-input style="width:250px;" v-if="item.type === '0'" v-model="item.value" class="input-box"
                @keyup.enter.native="submitDataToBackend"></el-input>
                <span v-if="item.unit" :name="item.unit" >{{ item.unit }}</span>
    <el-row :gutter="18" class="card">
      <el-col :span="7" v-for="(dataGroup, groupIndex) in jsonData" :key="groupIndex">
        <el-card class="json-block">
          <div class="button-row" style="display: flex; justify-content: space-between;">
            <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex">
              <span v-if="item.title" :name="item.title.name" class="action-button">{{ item.title.name }}</span>
            </div>
          </div>
          <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
            <div class="item-row">
              <span class="name" style="width:250px;">{{ item.name }}</span>
              <el-input v-if="item.type === '0'" v-model="item.value" class="input-box"
                @keyup.enter.native="submitDataToBackend"></el-input>
                <span v-if="item.unit" :name="item.unit" >{{ item.unit }}</span>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
@@ -174,6 +180,10 @@
              const xiaoche = obj.xiaoche;
              const dache = obj.dache1;
              const parms2 = obj.params2;
              const fanzhuan2 = obj.fanzhuan2;
              const xiaoche2 = obj.xiaoche2;
              // console.log('parms:', parms);
              // console.log('fanzhuan:', fanzhuan);
              // console.log('xiaoche:', xiaoche);
@@ -202,8 +212,40 @@
              if (Array.isArray(dache) && Array.isArray(dache[0]) && dache[0][0] !== undefined) {
                jsonData2[2][0]['value'] = dache[0][0];
              }
            let index2 = 0;
              for (let i =5; i < jsonData2.length; i++) {
                let arr = jsonData2[i];
                for (let j = 0; j < arr.length; j++) {
                  let obj2 = arr[j];
                  if (obj2.type === '0' && Object.prototype.hasOwnProperty.call(obj2, 'value')) {
                    if (Array.isArray(parms2) && Array.isArray(parms2[0]) && parms2[0][index2] !== undefined) {
                      obj2.value = parms2[0][index2];
                      index2++;
                    }
                  }
                }
              }
              if (Array.isArray(fanzhuan2) && Array.isArray(fanzhuan2[0]) && fanzhuan2[0][0] !== undefined) {
                jsonData2[8][0]['value'] = fanzhuan2[0][0];
              }
              if (Array.isArray(xiaoche2) && Array.isArray(xiaoche2[0]) && xiaoche2[0][0] !== undefined) {
                jsonData2[9][0]['value'] = xiaoche2[0][0];
              }
            }
          }, 200);
          }, 50);
          document.addEventListener('mouseover', handleMouseMove);
        };