yangys
2025-08-09 e02fc11eae8978cb4b33cf8541697efae5eadaed
src/views/wel/index.vue
@@ -72,14 +72,18 @@
            <el-button :size="size" type="primary" @click="comparison" :disabled="selectionList.length != 2">对比</el-button>
          </template>
        </avue-crud>
        <!-- 文件对比 -->
        <code-diff :old-string="this.content1" :new-string="this.content2" output-format="side-by-side"/>
    </template>
    <el-dialog title="升版" append-to-body v-model="upgradeModal" width="500">
      <avue-form :option="upgradeModalOption" v-model="upgradeModalForm" @submit="upgradeSubmit" @reset-change="upgradeCancel"></avue-form>
    </el-dialog>
  </basic-container>
  <!-- 文件对比 -->
  <el-drawer title="文件对比" append-to-body v-model="diffBox" size="100%" class="code-box">
      <div>
          <code-diff :old-string="this.content1" :new-string="this.content2" output-format="side-by-side" :hideStat="true" :filename="codeDiffFileName1" :newFilename="codeDiffFileName2"/>
      </div>
  </el-drawer>
</template>
<script>
@@ -87,8 +91,11 @@
export default {
  data() {
    return {
      diffBox: false,
      content1: "",
      content2: "",
      codeDiffFileName1: "",
      codeDiffFileName2: "",
      selectionList: [],
      targetRow: {},
      upgradeModal: false,
@@ -271,7 +278,7 @@
        column: [
          {label: '版本号',prop: 'versionNumber'},
          {label: '创建时间',prop: 'createTime'},
          {label: '创建人',prop: 'createUser'},
          {label: '创建人',prop: 'createUserName'},
        ]
      },
      tabsForm4: {},
@@ -300,11 +307,29 @@
          },
          {
            label: '版本',
            prop: 'abc'
            prop: 'versionNumber',
         formatter: (val, value, label) => {
               if(val.nodeType == '60'){
               if(value==-1){
                  return '';
               }else{
                  return value;
               }
            }else{
               return '';
            }
         }
          },
          {
            label: '版次',
            prop: 'abc'
            prop: 'processEdition',
         formatter: (val, value, label) => {
               if(val.nodeType == '60'){
               return value;
            }else{
               return '';
            }
         }
          },
          {
            label: '描述',
@@ -318,12 +343,7 @@
            label: '设备',
            prop: 'machineCode'
          },
        /*
          {
            label: '固化状态',
            prop: 'abc'
          },
        */
          {
            label: '锁定状态',
            prop: 'isLocked',
@@ -763,6 +783,9 @@
          this.loading = false;
          this.content1 = res.data.data.content1;
          this.content2 = res.data.data.content2;
          this.codeDiffFileName1 = this.selectionList[0].versionNumber;
          this.codeDiffFileName2 = this.selectionList[1].versionNumber;
          this.diffBox = true;
        }
      );
    },
@@ -968,4 +991,7 @@
    background-color: #f0f7ff;
    font-weight: bold;
  }
  .code-box .el-drawer__header {
    margin-bottom: 0;
  }
</style>