spring
2025-04-27 2a2d753357f4d3c26b3622513ffb6e647f64704a
src/views/technology/routing/routing-form.vue
@@ -12,62 +12,32 @@
    </div>
    <div class="page-main">
      <div class="routing-basic">
        <el-form
          :model="dataForm"
          :rules="dataRule"
          ref="dataForm"
          label-width="100px"
          style="width: 100%"
          class="l-mes"
          :disabled="!editable"
        >
        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px" style="width: 100%"
          class="l-mes" :disabled="!editable">
          <el-row>
            <el-col :span="6">
              <el-form-item style="width:100%" prop="routingNo" label="工艺编号">
                <el-input
                  style="width:100%"
                  v-model="dataForm.routingNo"
                  placeholder="工艺编号"
                  disabled
                ></el-input>
                <el-input style="width:100%" v-model="dataForm.routingNo" placeholder="工艺编号" disabled></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item prop="partNo" label="零件号">
                <el-input
                  style="width:100%"
                  v-model="dataForm.partNo"
                  placeholder="零件号"
                  disabled
                >
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openSelectPart"
                  ></el-button>
                <el-input style="width:100%" v-model="dataForm.partNo" placeholder="零件号" disabled>
                  <el-button slot="append" icon="el-icon-search" @click="openSelectPart"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item prop="partName" label="零件名称">
                <el-tooltip class="item" effect="dark" :content="dataForm.partName" >
                <el-input
                  v-model="dataForm.partName"
                  placeholder="零件名称"
                  readonly
                  style="width: 100%"
                ></el-input>
                <el-tooltip class="item" effect="dark" :content="dataForm.partName">
                  <el-input v-model="dataForm.partName" placeholder="零件名称" readonly style="width: 100%"></el-input>
                </el-tooltip>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="BOM" prop="bomId">
                <el-select style="width:100%"  v-model="dataForm.bomId" placeholder="" filterable>
                  <el-option
                    v-for="item in bomList"
                    :key="item.id"
                    :label="item.number"
                    :value="item.id" />
                <el-select style="width:100%" v-model="dataForm.bomId" placeholder="" filterable>
                  <el-option v-for="item in bomList" :key="item.id" :label="item.number" :value="item.id" />
                </el-select>
              </el-form-item>
            </el-col>
@@ -75,33 +45,21 @@
          <el-row>
            <el-col :span="6">
              <el-form-item label="逐步采用日期" prop="phaseInDate">
                <el-date-picker
                  v-model="dataForm.phaseInDate"
                  style="width: 100%"
                  type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss"
                >
                <el-date-picker v-model="dataForm.phaseInDate" style="width: 100%" type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="逐步淘汰日期" prop="phaseOutDate">
                <el-date-picker
                  v-model="dataForm.phaseOutDate"
                  style="width: 100%"
                  type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss"
                >
                <el-date-picker v-model="dataForm.phaseOutDate" style="width: 100%" type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss">
                </el-date-picker>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item prop="description" label="描述">
                <el-input
                  v-model="dataForm.description"
                  placeholder="描述"
                  style="width: 100%"
                ></el-input>
                <el-input v-model="dataForm.description" placeholder="描述" style="width: 100%"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
@@ -115,71 +73,36 @@
          <div slot="header">
            <span>
              工序
              <i
                class="el-icon-sort"
                @click="showTable = !showTable"
                style="cursor: pointer;"
              ></i>
              <i class="el-icon-sort" @click="showTable = !showTable" style="cursor: pointer;"></i>
            </span>
            <el-button
              style="float: right; padding: 3px 0"
              type="text"
              @click=";(showOperation = true), (last = true),(multiSelect=true)"
              v-if="editable"
              >添加</el-button
            >
            <el-button style="float: right; padding: 3px 0" type="text"
              @click="; (showOperation = true), (last = true), (multiSelect = true)" v-if="editable">添加</el-button>
          </div>
          <div
            v-show="!showTable"
            class="dragWrap"
            :style="{
              '--dragitemwidth': '250px'
            }"
          >
          <div v-show="!showTable" class="dragWrap" :style="{
            '--dragitemwidth': '250px'
          }">
            <div :style="{ width: 265 * dataForm.operations.length - 15 + 'px' }">
              <div class="dragHead" v-for="x in dataForm.operations.length"  :key="x" >
              <div class="dragHead" v-for="x in dataForm.operations.length" :key="x">
                <div class="idx">{{ x }}</div>
              </div>
              <zttdraggable
                :forceFallback="true"
                :list="dataForm.operations"
                :animation="200"
                fallbackClass="fallbackStyle"
                ghostClass="item_ghost"
                @end="dragEnd"
              >
                <div
                  :class="{ dragItem: true, active: x.active }"
                  v-for="(x, i) in dataForm.operations"
                  :key="i"
              <zttdraggable :forceFallback="true" :list="dataForm.operations" :animation="200"
                fallbackClass="fallbackStyle" ghostClass="item_ghost" @end="dragEnd">
                <div :class="{ dragItem: true, active: x.active }" v-for="(x, i) in dataForm.operations" :key="i"
                  @click="
                    rowClick(x)
                    rowSelected(x)
                  "
                >
                  rowSelected(x)
                    ">
                  <div class="dragBody">
                    <div class="info">{{ x.operationNo }}</div>
                    <div class="info">{{ x.operationName }}</div>
                    <div class="info">{{ x.partName }}</div>
                  </div>
                  <div class="dragFoot">
                    <el-button
                      type="text"
                      size="mini"
                      @click.stop="openTechnologyOperation(x)"
                      >编辑
                    <el-button type="text" size="mini" @click.stop="openTechnologyOperation(x)">编辑
                    </el-button>
                    <el-button
                      type="text"
                      size="mini"
                      @click.stop="insertTechnologyOperation(x)"
                      >插入
                    <el-button type="text" size="mini" @click.stop="insertTechnologyOperation(x)">插入
                    </el-button>
                    <el-button
                      type="text"
                      size="mini"
                      @click.stop="handleDelete(x)"
                    >
                    <el-button type="text" size="mini" @click.stop="handleDelete(x)">
                      删除
                    </el-button>
                  </div>
@@ -188,53 +111,23 @@
            </div>
          </div>
          <el-table
            v-show="showTable"
            id="routingOpTable"
            ref="operationTable"
            :default-sort="{ prop: 'index' }"
            row-key="id"
            highlight-current-row
            :data="dataForm.operations"
            @current-change="rowSelected"
            @row-click="rowClick"
            height="350"
            style="width: 100%"
            class="routing-operate-table"
            :row-class-name="tableRowClassName"
          >
          <el-table v-show="showTable" id="routingOpTable" ref="operationTable" :default-sort="{ prop: 'index' }"
            row-key="id" highlight-current-row :data="dataForm.operations" @current-change="rowSelected"
            @row-click="rowClick" height="350" style="width: 100%" class="routing-operate-table"
            :row-class-name="tableRowClassName">
            <!-- <el-table-column width="15" align="center">
              <template slot-scope="scope">
                <i class="icon aufontAll  h-icon-all-drag"></i>
              </template>
            </el-table-column> -->
            <el-table-column
              prop="index"
              label="序号"
              width="45"
              align="center"
            >
</el-table-column> -->
            <el-table-column prop="index" label="序号" width="45" align="center">
            </el-table-column>
            <el-table-column
              prop="operationNo"
              label="工序编号"
              width="80"
              align="center"
            >
            <el-table-column prop="operationNo" label="工序编号" width="80" align="center">
            </el-table-column>
            <el-table-column
              prop="operationName"
              label="工序名"
              width="120"
              align="center"
            >
            <el-table-column prop="operationName" label="工序名" width="120" align="center">
              <template slot-scope="scope">
                <el-link
                  v-if="editable"
                  type="primary"
                  @click.stop="openTechnologyOperation(scope.row)"
                  >{{ scope.row.operationName }}</el-link
                >
                <el-link v-if="editable" type="primary" @click.stop="openTechnologyOperation(scope.row)">{{
                  scope.row.operationName }}</el-link>
                <span v-if="!editable">{{ scope.row.operationName }}</span>
              </template>
            </el-table-column>
@@ -245,13 +138,7 @@
              show-overflow-tooltip
            >
            </el-table-column> -->
            <el-table-column
              prop="partName"
              label="零件"
              align="center"
              width="120"
              show-overflow-tooltip
            >
            <el-table-column prop="partName" label="零件" align="center" width="120" show-overflow-tooltip>
            </el-table-column>
            <el-table-column prop="workCenter" label="工作中心" align="center">
              <template slot-scope="scope">
@@ -260,13 +147,13 @@
                    return scope.row.workCenter === item.value
                  })
                    ? '[' +
                      workCenterOptions.find((item) => {
                        return scope.row.workCenter === item.value
                      }).value +
                      '] ' +
                      workCenterOptions.find((item) => {
                        return scope.row.workCenter === item.value
                      }).label
                    workCenterOptions.find((item) => {
                      return scope.row.workCenter === item.value
                    }).value +
                    '] ' +
                    workCenterOptions.find((item) => {
                      return scope.row.workCenter === item.value
                    }).label
                    : ''
                }}</span>
              </template>
@@ -312,59 +199,33 @@
              align="center"
            >
            </el-table-column> -->
            <el-table-column
              prop="laborClassNo"
              label="人工类别"
              align="center"
            >
            <el-table-column prop="laborClassNo" label="人工类别" align="center">
              <template slot-scope="scope">
                <span>{{
                  laborClassNoOptions.find((item) => {
                    return scope.row.laborClassNo === item.value
                  })
                    ? '[' +
                      laborClassNoOptions.find((item) => {
                        return scope.row.laborClassNo === item.value
                      }).value +
                      '] ' +
                      laborClassNoOptions.find((item) => {
                        return scope.row.laborClassNo === item.value
                      }).label
                    laborClassNoOptions.find((item) => {
                      return scope.row.laborClassNo === item.value
                    }).value +
                    '] ' +
                    laborClassNoOptions.find((item) => {
                      return scope.row.laborClassNo === item.value
                    }).label
                    : ''
                }}</span>
              </template>
            </el-table-column>
            <el-table-column
              prop="crewSize"
              label="班组人员"
              align="center"
              width="70"
            >
            <el-table-column prop="crewSize" label="班组人员" align="center" width="70">
            </el-table-column>
            <el-table-column
              v-if="editable"
              label="操作"
              align="center"
              width="135"
            >
            <el-table-column v-if="editable" label="操作" align="center" width="135">
              <template slot-scope="scope">
                <el-button
                  type="text"
                  size="mini"
                  @click.stop="openTechnologyOperation(scope.row)"
                  >编辑
                <el-button type="text" size="mini" @click.stop="openTechnologyOperation(scope.row)">编辑
                </el-button>
                <el-button
                  type="text"
                  size="mini"
                  @click.stop="insertTechnologyOperation(scope.row)"
                  >插入
                <el-button type="text" size="mini" @click.stop="insertTechnologyOperation(scope.row)">插入
                </el-button>
                <el-button
                  type="text"
                  size="mini"
                  @click.stop="handleDelete(scope.row)"
                  >删除
                <el-button type="text" size="mini" @click.stop="handleDelete(scope.row)">删除
                </el-button>
              </template>
            </el-table-column>
@@ -375,17 +236,8 @@
            <el-tab-pane label="工序配置" style="height: 100%">
              <el-divider content-position="left">零件</el-divider>
              <div class="node-content-part">
                <el-input
                  v-model="operationPart.partName"
                  placeholder="零件"
                  readonly
                  style="width:30%;"
                >
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="openSelectOperationPart"
                  ></el-button>
                <el-input v-model="operationPart.partName" placeholder="零件" readonly style="width:30%;">
                  <el-button slot="append" icon="el-icon-search" @click="openSelectOperationPart"></el-button>
                </el-input>
              </div>
@@ -449,55 +301,28 @@
              </div> -->
              <el-divider content-position="left">备注</el-divider>
              <div class="node-content-remark">
                <rich-text
                  :richContent="operationPart.remark"
                  @contentChange="setOperateRemark"
                ></rich-text>
                <rich-text :richContent="operationPart.remark" @contentChange="setOperateRemark"></rich-text>
              </div>
            </el-tab-pane>
            <el-tab-pane label="工序参数" style="height: 100%" v-if="dataForm.routingNo!=null">
            <el-tab-pane label="工序参数" style="height: 100%" v-if="dataForm.routingNo != null">
              <el-card class="params-template">
                <div slot="header">
                  <span>参数集</span>
                  <el-button
                    style="float: right; padding: 3px 0"
                    type="text"
                    size="medium"
                    v-if="editable && dataForm.operations.length > 0"
                    @click="openTempalteDialog"
                    >添加
                  <el-button style="float: right; padding: 3px 0" type="text" size="medium"
                    v-if="editable && dataForm.operations.length > 0" @click="openTempalteDialog">添加
                  </el-button>
                </div>
                <el-table
                  ref="templateTable"
                  :data="operationTemplateList"
                  class="l-mes"
                  height="600"
                  highlight-current-row
                  @row-click="templateRowClick"
                >
                  <el-table-column
                    label="名称"
                    prop="operationTemplateName"
                    align="center"
                  >
                <el-table ref="templateTable" :data="operationTemplateList" class="l-mes" height="600"
                  highlight-current-row @row-click="templateRowClick">
                  <el-table-column label="名称" prop="operationTemplateName" align="center">
                  </el-table-column>
                  <el-table-column
                    label="类型"
                    prop="operationTemplateType"
                    align="center"
                  >
                  <el-table-column label="类型" prop="operationTemplateType" align="center">
                  </el-table-column>
                  <el-table-column label="操作" align="center">
                    <template slot-scope="scope">
                      <el-button
                        type="text"
                        size="mini"
                        v-if="editable && dataForm.operations.length > 0"
                        @click.stop="
                          handleTemplateDelete(scope.row, scope.$index)
                        "
                        >删除
                      <el-button type="text" size="mini" v-if="editable && dataForm.operations.length > 0" @click.stop="
                        handleTemplateDelete(scope.row, scope.$index)
                        ">删除
                      </el-button>
                    </template>
                  </el-table-column>
@@ -507,62 +332,33 @@
                <div slot="header">
                  <span>参数</span>
                  <div style="float: right;">
                    <el-button
                      style="padding: 3px 0"
                      type="text"
                      size="medium"
                      v-if="editable && routingTemplateId != null"
                      @click="saveAllParamChange"
                      >保存
                    <el-button style="padding: 3px 0" type="text" size="medium"
                      v-if="editable && routingTemplateId != null" @click="saveAllParamChange">保存
                    </el-button>
                    <el-button
                      style="padding: 3px 0"
                      type="text"
                      size="medium"
                      v-if="editable && routingTemplateId != null"
                      @click="openTempalteParamDialog"
                      >添加
                    <el-button style="padding: 3px 0" type="text" size="medium"
                      v-if="editable && routingTemplateId != null" @click="openTempalteParamDialog">添加
                    </el-button>
                  </div>
                </div>
                <el-table :data="paramData" class="l-mes" height="600">
                  <el-table-column
                    label="参数项"
                    prop="parameterItem"
                    align="center"
                  >
                  <el-table-column label="参数项" prop="parameterItem" align="center">
                    <template slot-scope="scope">
                      <span
                        >{{ scope.row.parameterItem }}({{
                          scope.row.unit
                        }})</span
                      >
                      <span>{{ scope.row.parameterItem }}({{
                        scope.row.unit
                      }})</span>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="参数类型"
                    prop="type"
                    align="center"
                    :formatter="getParam"
                  >
                  <el-table-column label="参数类型" prop="type" align="center" :formatter="getParam">
                  </el-table-column>
                  <el-table-column label="值" prop="paramValue" align="center">
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.paramValue"
                        placeholder="值"
                        :disabled="!editable"
                      ></el-input>
                      <el-input v-model="scope.row.paramValue" placeholder="值" :disabled="!editable"></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" align="center">
                    <template slot-scope="scope">
                      <el-button
                        type="text"
                        size="mini"
                        v-if="editable && routingTemplateId != null"
                        @click.stop="handleParamDelete(scope.row, scope.$index)"
                        >删除
                      <el-button type="text" size="mini" v-if="editable && routingTemplateId != null"
                        @click.stop="handleParamDelete(scope.row, scope.$index)">删除
                      </el-button>
                    </template>
                  </el-table-column>
@@ -574,35 +370,18 @@
      </div>
    </div>
    <operationDialog
      :currshowlist.sync="showOperation"
      :multiSelect="multiSelect"
      @handleSelectionChange="insertOperation"
      @listenToOperationEvent="insertOperation"
    />
    <operationDialog :currshowlist.sync="showOperation" :multiSelect="multiSelect"
      @handleSelectionChange="insertOperation" @listenToOperationEvent="insertOperation" />
    <partDialog :currshowlist.sync="showPart" @listenToPartEvent="selectPart" />
    <operationPartDialog
      :currshowlist.sync="showOperationPart"
      :paramObj="paramObj"
      @listenToPartEvent="selectOperationPart"
    />
    <ParamTemplateDialog
      :currshowlist.sync="showOperationTemplate"
      @handleSelectionParamTemplateChange="selectOperationTemplate"
      :paramTemplateObj="templateDefaultObj"
      :paramTemplateSelArr="paramTemplateSelArr"
      :paramTemplateSelCol="paramTemplateSelCol"
    />
    <ParamDialog
      :currshowlist.sync="showTemplateParam"
      @handleSelectionChange="selectTemplateParam"
      :paramSelArr="paramSelArr"
      :paramSelCol="paramSelCol"
    />
    <editRoutingOperation
      :currshowlist.sync="showTechnologyOperation"
      :currRoutingOperation="currTechnologyOperation"
    />
    <operationPartDialog :currshowlist.sync="showOperationPart" :paramObj="paramObj"
      @listenToPartEvent="selectOperationPart" />
    <ParamTemplateDialog :currshowlist.sync="showOperationTemplate"
      @handleSelectionParamTemplateChange="selectOperationTemplate" :paramTemplateObj="templateDefaultObj"
      :paramTemplateSelArr="paramTemplateSelArr" :paramTemplateSelCol="paramTemplateSelCol" />
    <ParamDialog :currshowlist.sync="showTemplateParam" @handleSelectionChange="selectTemplateParam"
      :paramSelArr="paramSelArr" :paramSelCol="paramSelCol" />
    <editRoutingOperation :currshowlist.sync="showTechnologyOperation"
      :currRoutingOperation="currTechnologyOperation" />
  </div>
</template>
@@ -738,8 +517,6 @@
    editRoutingOperation,
    zttdraggable
  },
  created(){
  },
  mounted() {
    window.addEventListener(
      'hashchange',
@@ -754,8 +531,8 @@
  },
  computed: {
    editable: function() {
      if (!this.dataForm.id) {
    editable() {
      if (!this.dataForm.id && this.itemKey) {
        return true
      }
      if (this.dataForm.id && this.dataForm.state == '01draft') {
@@ -766,9 +543,9 @@
  },
  watch: {
    'dataForm.partId'(newValue, oldValue) {
      if (oldValue) {
        this.dataForm.bomId = null
      }
      // if (oldValue) {
      //   this.dataForm.bomId = null
      // }
      if (newValue) {
        getBomList(
          Object.assign({
@@ -803,10 +580,67 @@
      } else {
        this.bomList = []
      }
    }
    },
    '$route.query.id': {
      immediate: true,
      handler(newVal, oldVal) {
        if (newVal) {
          this.dataForm.id = this.$route.query.id
          this.getParamType()
          this.init()
          this.itemKey = Math.random()
          this.getBomTypeDbOptions()
          this.getWorkCenterOptions()
          this.getRunTimeCodeDbOptions()
          this.getLaborClassNo()
        } else {
          this.dataForm.id = null
          this.getParamType()
          this.init()
          this.dataForm = {
            id: null,
            routingNo: null,
            name: null,
            partId: null,
            partNo: null,
            partName: null,
            description: null,
            state: null,
            master: false,
            bomId: null,
            operations: [],
            refs: [],
            bomTypeDb: 'M',
            alternativeNo: '*',
            alternativeDesc: null,
            ifsSync: false,
            phaseInDate: null,
            phaseOutDate: null,
            version: null,
            wireCore: null
          }
          this.operationPart = {}
          this.itemKey = Math.random()
          this.getBomTypeDbOptions()
          this.getWorkCenterOptions()
          this.getRunTimeCodeDbOptions()
          this.getLaborClassNo()
        }
      },
    },
  },
  created() {
    // this.dataForm.id = this.$route.query.id
    // this.getParamType()
    // this.init()
    // this.itemKey = Math.random()
    // this.getBomTypeDbOptions()
    // this.getWorkCenterOptions()
    // this.getRunTimeCodeDbOptions()
    // this.getLaborClassNo()
  },
  activated() {
    this.dataForm.id = this.$route.query.id
    this.getParamType()
    this.init()
@@ -816,7 +650,6 @@
    this.getRunTimeCodeDbOptions()
    this.getLaborClassNo()
  },
  methods: {
    // 查询结构类型字典
    getBomTypeDbOptions() {
@@ -891,11 +724,11 @@
                operationsFlag = false
              }
            })
           /*  if (!operationsFlag) {
              this.$message.error('每个工序都需添加对应零件')
              this.isSubmit = false
              return
            } */
            /*  if (!operationsFlag) {
               this.$message.error('每个工序都需添加对应零件')
               this.isSubmit = false
               return
             } */
            if (this.dataForm.id) {
              putObj(this.dataForm)
                .then((response) => {
@@ -1182,57 +1015,57 @@
          type: 'warning'
        })
      }
      if(this.multiSelect){
      if (this.multiSelect) {
        operation.forEach(item => {
            let obj = {};
            obj.operationName = item.name;
            obj.operationId = item.id;
            if (this.last){
                // 行最后添加
                obj.index = this.dataForm.operations.length + 1
                this.dataForm.operations.push(obj)
            }else{
                // 插入前一行
                obj.index = this.operationIndex
                this.dataForm.operations = [
                ...this.dataForm.operations.slice(0, obj.index - 1),
                obj,
                ...this.dataForm.operations.slice(obj.index - 1)
                ]
            }
            this.dataForm.operations.forEach((e, idx) => {
                e.index = idx + 1
                })
                this.$forceUpdate()
                this.$refs.operationTable.sort('index')
                Promise.all([this.save()]).then((res) => {
                    this.selectByIndex(obj.index)
                })
            })
      }else{
        operation.operationName = operation.name
        operation.operationId = operation.id
        operation.id = null
        if (this.last) {
          let obj = {};
          obj.operationName = item.name;
          obj.operationId = item.id;
          if (this.last) {
            // 行最后添加
            operation.index = this.dataForm.operations.length + 1
            this.dataForm.operations.push(operation)
        } else {
            obj.index = this.dataForm.operations.length + 1
            this.dataForm.operations.push(obj)
          } else {
            // 插入前一行
            operation.index = this.operationIndex
            obj.index = this.operationIndex
            this.dataForm.operations = [
            ...this.dataForm.operations.slice(0, operation.index - 1),
            operation,
            ...this.dataForm.operations.slice(operation.index - 1)
              ...this.dataForm.operations.slice(0, obj.index - 1),
              obj,
              ...this.dataForm.operations.slice(obj.index - 1)
            ]
        }
          }
        })
        this.dataForm.operations.forEach((e, idx) => {
            e.index = idx + 1
          e.index = idx + 1
        })
        this.$forceUpdate()
        this.$refs.operationTable.sort('index')
        Promise.all([this.save()]).then((res) => {
            this.selectByIndex(operation.index)
          this.selectByIndex(obj.index)
        })
      } else {
        operation.operationName = operation.name
        operation.operationId = operation.id
        operation.id = null
        if (this.last) {
          // 行最后添加
          operation.index = this.dataForm.operations.length + 1
          this.dataForm.operations.push(operation)
        } else {
          // 插入前一行
          operation.index = this.operationIndex
          this.dataForm.operations = [
            ...this.dataForm.operations.slice(0, operation.index - 1),
            operation,
            ...this.dataForm.operations.slice(operation.index - 1)
          ]
        }
        this.dataForm.operations.forEach((e, idx) => {
          e.index = idx + 1
        })
        this.$forceUpdate()
        this.$refs.operationTable.sort('index')
        Promise.all([this.save()]).then((res) => {
          this.selectByIndex(operation.index)
        })
      }
    },
@@ -1335,7 +1168,7 @@
          type: 'warning'
        }
      )
        .then(function() {
        .then(function () {
          return deleteRoutingTemplate(row.id)
        })
        .then((response) => {
@@ -1400,7 +1233,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(function() {
        .then(function () {
          return deleteRoutingTemplateParam(row.id)
        })
        .then((response) => {
@@ -1429,18 +1262,15 @@
    },
    // 保存所有参数的修改
    saveAllParamChange() {
      const paramJson = { routingOperationParam: this.paramData }
      let num = 0
      this.paramData.forEach(e=>{
        var regex=/^[^\(\)|^,]+$/;
        if(!regex.test(e.paramValue)){
            num+=1
      this.paramData.forEach(e => {
        if (e.paramValue != null) {
          e.paramValue = e.paramValue.replace(',', ',').replace('(', '(').replace(')', ')')
          if (!isNaN(e.paramValue)) {
            e.paramValue = '=' + e.paramValue
          }
        }
      })
      if(num>0){
        this.$message.error("参数值不能包含英文括号或逗号,请检查")
        return
      }
      const paramJson = { routingOperationParam: this.paramData }
      putRoutingTemplateParam(paramJson).then((response) => {
        const data = response.data
        if (data.code == 0) {
@@ -1484,18 +1314,23 @@
.fallbackStyle {
  opacity: 1 !important;
}
.item_ghost {
  opacity: 0 !important;
}
.dragWrap {
  overflow-x: auto;
  padding: 10px;
  margin: 0 -10px;
  .dragHead {
    display: inline-block;
    width: var(--dragitemwidth);
    + .dragHead {
    .dragHead {
      margin-left: 15px;
      .idx::after {
        content: '';
        position: absolute;
@@ -1506,6 +1341,7 @@
        background: #288fe8;
      }
    }
    .idx {
      border-radius: 100%;
      width: 25px;
@@ -1517,6 +1353,7 @@
      position: relative;
    }
  }
  .dragItem {
    display: inline-block;
    width: var(--dragitemwidth);
@@ -1525,28 +1362,35 @@
    border: 1px solid #ebeef5;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    + .dragItem {
    +.dragItem {
      margin-left: 15px;
    }
    &.active {
      box-shadow: 0 2px 10px 0 rgba(40, 143, 232, 0.3);
    }
    .dragBody {
      cursor: grab;
      &:active {
        cursor: grabbing;
      }
      height: 100px;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 10px 5px;
      justify-content: space-around;
      .info {
        font-size: 14px;
        word-break: break-all;
      }
    }
    .dragFoot {
      height: 30px;
      display: flex;
@@ -1561,6 +1405,7 @@
.avue-main {
  height: calc(100% - 60px);
}
.routing-detail {
  width: 100%;
  padding-top: 10px;
@@ -1673,6 +1518,7 @@
  background-size: cover;
  font-size: 14px;
}
.h-icon-all-drag:before {
  content: '\E63E';
  font-size: 14px;