loulijun2021
2022-07-15 6caecd26f75979777956dc96e14d6f3b39ce6688
src/views/zzmx/gylx.vue
@@ -32,7 +32,7 @@
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>-->
      </div>
      <el-divider />
      <div class="elTableDiv">
@@ -96,7 +96,7 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <!--                <el-button type="text" @click="edit('edit',row)">修改</el-button>-->
                <!--                <el-button type="text" @click="edit('edit',row)">编辑</el-button>-->
                <el-button type="text" @click="edit('edit',row)">预览</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
              </div>
@@ -120,9 +120,10 @@
    <el-dialog
      :title="operation==='add'?'新增':'预览'"
      :visible.sync="dialogVisible"
      width="70%"
      width="1200px"
      :close-on-click-modal="false"
      top="15vh"
      :fullscreen="isFullscreen"
      @closed="handleClose"
      @close="handleClose"
    >
@@ -139,6 +140,7 @@
          <el-form-item prop="enable" label="使用状态" style="margin-right: 20px">
            <el-select
              v-model="dialogForm.enable"
              filterable
              :disabled="operation==='edit'"
              :popper-append-to-body="false"
              style="width: 220px"
@@ -260,7 +262,7 @@
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
  name: 'Zzjg',
  name: 'GYLX',
  components: {
    Pagination
  },
@@ -277,6 +279,7 @@
      }
    }
    return {
      isFullscreen: false,
      mainHeight: 0,
      tableHeight: 0,
      form: {
@@ -387,6 +390,17 @@
      })
      if (!flag) {
        return this.$message.info('输入框内容与下拉选项内容不匹配!')
      }
      // 3.输入框内容与已选内容相同时不能保存
      let flag2 = false
      this.dynamicTags.forEach(item => {
        if (item.stepname === this.autocompleteValue.trim()) {
          flag2 = true
        }
      })
      if (flag2) {
        return this.$message.info('此工序已选,请选择其它工序!')
      }
      // 将值替换到原tag位置上
@@ -605,6 +619,13 @@
      this.dynamicTags.forEach(item => {
        Data.push({ seq: item.seq, stepcode: item.stepcode, stepname: item.stepname })
      })
      Data.forEach(item => {
        if (item.stepname === this.routeArr.find(it => it.stepname === item.stepname).stepname) {
          item.stepcode = this.routeArr.find(it => it.stepname === item.stepname).stepcode
        }
      })
      console.log(Data, 32)
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
@@ -632,6 +653,7 @@
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 100
        // this.isFullscreen = window.innerHeight < 800
      })
    }
  }