From 47cf5518f0f61dbf8066c2273b9f77c2cd7b1751 Mon Sep 17 00:00:00 2001
From: YLouie <929705085@qq.com>
Date: 星期五, 19 九月 2025 17:56:03 +0800
Subject: [PATCH] 销售订单plm同步
---
src/views/technology/routing/routing-form.vue | 619 ++++++++++++++++++++++---------------------------------
1 files changed, 252 insertions(+), 367 deletions(-)
diff --git a/src/views/technology/routing/routing-form.vue b/src/views/technology/routing/routing-form.vue
index 2ebb8ad..b2f7ee1 100644
--- a/src/views/technology/routing/routing-form.vue
+++ b/src/views/technology/routing/routing-form.vue
@@ -1,5 +1,5 @@
<template>
- <div style="height: 100%">
+ <div style="height: 100%" :key="itemKey">
<div class="page-header">
<div class="header-left">
<a @click="$router.go(-1)"><i class="icon-btn-back"></i></a>
@@ -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%" :disabled="dataForm.id != null" 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,79 +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)"
- 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
- :style="{
- width: 265 * dataForm.operations.length - 15 + 'px'
- }"
- >
- <div
- class="dragHead"
- v-for="x in dataForm.operations.length"
- :key="x"
- >
+ <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="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>
@@ -196,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>
@@ -253,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">
@@ -268,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>
@@ -320,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>
@@ -383,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>
@@ -453,59 +297,32 @@
effect="dark"
>
{{ item.label }}
- </el-tag>
+ </el-tag>
</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>
@@ -515,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>
@@ -582,33 +370,18 @@
</div>
</div>
- <operationDialog
- :currshowlist.sync="showOperation"
- @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>
@@ -655,6 +428,7 @@
export default {
data() {
return {
+ multiSelect: true,
itemKey: '',
typeOptions: [],
paramTemplateSelArr: [],
@@ -703,7 +477,7 @@
dataRule: {
partNo: [
{ required: true, message: '闆朵欢涓嶈兘涓虹┖', trigger: 'blur' }
- ],
+ ],
bomTypeDb: [
{ required: true, message: '宸ヨ壓绫诲瀷涓嶈兘涓虹┖', trigger: 'change' }
],
@@ -754,13 +528,11 @@
},
false
)
-
- // this.rowDrop()
},
computed: {
- editable: function() {
- if (!this.dataForm.id) {
+ editable() {
+ if (!this.dataForm.id && this.itemKey) {
return true
}
if (this.dataForm.id && this.dataForm.state == '01draft') {
@@ -771,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({
@@ -808,10 +580,69 @@
} else {
this.bomList = []
}
- }
+ },
+ '$route.query.id': {
+ immediate: true,
+ handler(newVal, oldVal) {
+ if (this.$route.name == '宸ヨ壓璺嚎璇︽儏') {
+ 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()
@@ -820,8 +651,8 @@
this.getWorkCenterOptions()
this.getRunTimeCodeDbOptions()
this.getLaborClassNo()
+ console.log(4444)
},
-
methods: {
// 鏌ヨ缁撴瀯绫诲瀷瀛楀吀
getBomTypeDbOptions() {
@@ -896,11 +727,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) => {
@@ -1174,6 +1005,7 @@
this.operationPart.remark = val
},
insertTechnologyOperation(row) {
+ this.multiSelect = false
this.showOperation = true
this.last = false
this.operationIndex = row.index
@@ -1186,30 +1018,59 @@
type: 'warning'
})
}
- 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)
+ 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.index = this.operationIndex
- this.dataForm.operations = [
- ...this.dataForm.operations.slice(0, operation.index - 1),
- operation,
- ...this.dataForm.operations.slice(operation.index - 1)
- ]
+ 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)
+ })
}
- 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)
- })
},
handleDelete(row) {
@@ -1310,7 +1171,7 @@
type: 'warning'
}
)
- .then(function() {
+ .then(function () {
return deleteRoutingTemplate(row.id)
})
.then((response) => {
@@ -1375,7 +1236,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
})
- .then(function() {
+ .then(function () {
return deleteRoutingTemplateParam(row.id)
})
.then((response) => {
@@ -1404,6 +1265,14 @@
},
// 淇濆瓨鎵�鏈夊弬鏁扮殑淇敼
saveAllParamChange() {
+ this.paramData.forEach(e => {
+ if (e.paramValue != null) {
+ e.paramValue = e.paramValue.replace(',', '锛�').replace('(', '锛�').replace(')', '锛�')
+ if (!isNaN(e.paramValue)) {
+ e.paramValue = '=' + e.paramValue
+ }
+ }
+ })
const paramJson = { routingOperationParam: this.paramData }
putRoutingTemplateParam(paramJson).then((response) => {
const data = response.data
@@ -1448,18 +1317,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;
@@ -1470,6 +1344,7 @@
background: #288fe8;
}
}
+
.idx {
border-radius: 100%;
width: 25px;
@@ -1481,6 +1356,7 @@
position: relative;
}
}
+
.dragItem {
display: inline-block;
width: var(--dragitemwidth);
@@ -1489,28 +1365,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;
@@ -1525,6 +1408,7 @@
.avue-main {
height: calc(100% - 60px);
}
+
.routing-detail {
width: 100%;
padding-top: 10px;
@@ -1637,6 +1521,7 @@
background-size: cover;
font-size: 14px;
}
+
.h-icon-all-drag:before {
content: '\E63E';
font-size: 14px;
--
Gitblit v1.9.3