From 9edefe563de10226e322004e21e1db82f7ea227d Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 24 四月 2025 14:10:14 +0800
Subject: [PATCH] 工艺路线详情页面缓存
---
src/views/technology/routing/routing-form.vue | 517 ++++++++++++------------------------------
src/router/views/index.js | 6
src/views/technology/routing/index.vue | 167 +++++--------
3 files changed, 220 insertions(+), 470 deletions(-)
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 20e8be7..9e11678 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -48,12 +48,12 @@
children: [
{
path: 'routing-form',
- name: 'routingForm',
+ name: '宸ヨ壓璇︽儏',
component: () =>
import(/* webpackChunkName: "views" */ '@/views/technology/routing/routing-form'),
meta: {
- keepAlive: false,
- isTab: false,
+ keepAlive: true,
+ isTab: true,
isAuth: true
}
}
diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index d281799..7c5b002 100644
--- a/src/views/technology/routing/index.vue
+++ b/src/views/technology/routing/index.vue
@@ -1,91 +1,48 @@
<template>
<div class="mod-config">
<basic-container>
- <ttable
- :table="table"
- @handleSelectionChange="handleSelectionChange"
- @customUploadPage="routingImport"
- :uploadInfo="uploadInfo"
- :customUpload="customUpload"
- :prelang="prelang"
- :options="options"
- :ajaxFun="ajaxFun"
- ref="routingTable"
- >
+ <ttable :table="table" @handleSelectionChange="handleSelectionChange" @customUploadPage="routingImport"
+ :uploadInfo="uploadInfo" :customUpload="customUpload" :prelang="prelang" :options="options" :ajaxFun="ajaxFun"
+ ref="routingTable">
<template #toolbar></template>
</ttable>
<el-dialog title="瀵煎叆" :visible.sync="importRoutingVisible" width="50%">
<span>
<div style="display:flex;justify-content:space-around;">
<div>
- <el-upload
- style="margin-left:8px;display: inline;"
- class="upload-demo"
- drag
- :headers="headers"
- :action="zhuangbeiUploadInfo.url"
- :beforeUpload="beforeAvatarUpload"
- :limit="1"
- :show-file-list="false"
- :file-list="zhuangbeifileList"
- :data="zhuangbeiUploadInfo.uploadData"
- :on-success="zhuangbeiFileSuccessUploadScan"
- :on-error="handleError"
+ <el-upload style="margin-left:8px;display: inline;" class="upload-demo" drag :headers="headers"
+ :action="zhuangbeiUploadInfo.url" :beforeUpload="beforeAvatarUpload" :limit="1" :show-file-list="false"
+ :file-list="zhuangbeifileList" :data="zhuangbeiUploadInfo.uploadData"
+ :on-success="zhuangbeiFileSuccessUploadScan" :on-error="handleError"
accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
- :auto-upload="true"
- ref="zhuangbeiUploadScan"
- multiple
- >
+ :auto-upload="true" ref="zhuangbeiUploadScan" multiple>
<i class="el-icon-upload"></i>
<div class="el-upload__text"><em>瀵煎叆瑁呭鏁版嵁</em></div>
<div class="el-upload__tip" slot="tip">
- 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button
- type="text"
- style="font-size:12px;"
- @click="downZhuangbeiDataTemplate"
- >涓嬭浇妯℃澘</el-button
- >
+ 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button type="text" style="font-size:12px;"
+ @click="downZhuangbeiDataTemplate">涓嬭浇妯℃澘</el-button>
</div>
</el-upload>
</div>
<div>
- <el-upload
- style="margin-left:8px;display: inline;"
- class="upload-demo"
- drag
- :headers="headers"
- :action="shepinUploadInfo.url"
- :beforeUpload="beforeAvatarUpload"
- :limit="1"
- :show-file-list="false"
- :file-list="shepinfileList"
- :data="shepinUploadInfo.uploadData"
- :on-success="shepinFileSuccessUploadScan"
- :on-error="handleError"
+ <el-upload style="margin-left:8px;display: inline;" class="upload-demo" drag :headers="headers"
+ :action="shepinUploadInfo.url" :beforeUpload="beforeAvatarUpload" :limit="1" :show-file-list="false"
+ :file-list="shepinfileList" :data="shepinUploadInfo.uploadData"
+ :on-success="shepinFileSuccessUploadScan" :on-error="handleError"
accept=".xlsx,.xls,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
- :auto-upload="true"
- ref="shepinUploadScan"
- multiple
- >
+ :auto-upload="true" ref="shepinUploadScan" multiple>
<i class="el-icon-upload"></i>
<div class="el-upload__text"><em>瀵煎叆灏勯鏁版嵁</em></div>
<div class="el-upload__tip" slot="tip">
- 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button
- type="text"
- style="font-size:12px;"
- @click="downShepinDataTemplate"
- >涓嬭浇妯℃澘</el-button
- >
+ 鍙兘涓婁紶xlsx/xls鏂囦欢锛屼笖涓嶈秴杩�10M<el-button type="text" style="font-size:12px;"
+ @click="downShepinDataTemplate">涓嬭浇妯℃澘</el-button>
</div>
</el-upload>
</div>
</div>
</span>
</el-dialog>
- <partDialog
- :currshowlist.sync="showPart"
- @listenToPartEvent="selectPart"
- />
+ <partDialog :currshowlist.sync="showPart" @listenToPartEvent="selectPart" />
</basic-container>
</div>
</template>
@@ -294,15 +251,15 @@
searchInfoType: 'text'
}, */
// 鏇夸唬鎻忚堪
- /* {
- minWidth: '120',
- prop: 'alternativeDesc',
- label: '鏇夸唬鎻忚堪',
- sort: true,
- isTrue: true,
- isSearch: true,
- searchInfoType: 'text'
- }, */
+ /* {
+ minWidth: '120',
+ prop: 'alternativeDesc',
+ label: '鏇夸唬鎻忚堪',
+ sort: true,
+ isTrue: true,
+ isSearch: true,
+ searchInfoType: 'text'
+ }, */
// 鏄惁宸插悓姝ヨ嚦IFS
// {
// minWidth: '120',
@@ -418,77 +375,77 @@
this.getData()
},
created() {
- if(this.permissions.technology_routing_add){
+ if (this.permissions.technology_routing_add) {
this.table.toolbar.push({
text: '鏂板',
disabled: false,
type: 'primary',
- fun: ()=>{this.addOrUpdateHandle()},
+ fun: () => { this.addOrUpdateHandle() },
permitArr: []
})
}
- if(this.permissions.technology_routing_accept){
+ if (this.permissions.technology_routing_accept) {
this.table.toolbar.push({
text: '鎵瑰噯',
disabled: true,
- fun: ()=>{this.approveHandle('ACCEPT')},
+ fun: () => { this.approveHandle('ACCEPT') },
permitArr: ['01draft'],
})
}
- if(this.permissions.technology_routing_revoke){
+ if (this.permissions.technology_routing_revoke) {
this.table.toolbar.push({
text: '鎾ゅ洖',
disabled: true,
- fun: () => {this.approveHandle('REVOKE')},
+ fun: () => { this.approveHandle('REVOKE') },
permitArr: ['02accepted'],
})
}
- if(this.permissions.technology_routing_cancel){
+ if (this.permissions.technology_routing_cancel) {
this.table.toolbar.push({
text: '鎷掔粷',
disabled: true,
- fun: ()=>{this.approveHandle('CANCEL')},
+ fun: () => { this.approveHandle('CANCEL') },
permitArr: ['02accepted'],
})
}
- if(this.permissions.technology_routing_copy){
+ if (this.permissions.technology_routing_copy) {
this.table.toolbar.push({
text: '澶嶅埗',
disabled: false,
- fun: ()=>{this.copyRouting()},
+ fun: () => { this.copyRouting() },
permitArr: []
})
}
- if(this.permissions.technology_routing_batch_del){
+ if (this.permissions.technology_routing_batch_del) {
this.table.toolbar.push({
text: '鎵归噺鍒犻櫎',
- type:'primary',
+ type: 'primary',
disabled: false,
permitArr: [],
- fun: ()=>{this.deleteAll()},
+ fun: () => { this.deleteAll() },
})
}
- if(this.permissions.technology_routing_del){
+ if (this.permissions.technology_routing_del) {
this.table.operator = [
- {
- text: '鍒犻櫎',
- type: 'text',
- size: 'small',
- fun: this.deleteHandle
- // show: {
- // val: ['01draft'],
- // key: 'state'
- // }
- }
- ]
+ {
+ text: '鍒犻櫎',
+ type: 'text',
+ size: 'small',
+ fun: this.deleteHandle
+ // show: {
+ // val: ['01draft'],
+ // key: 'state'
+ // }
+ }
+ ]
}
this.getBomTypeDbOptions()
},
- watch:{
- multipleSelection(newVal){
- if(newVal.length==0){
- this.table.toolbar.forEach(ele=>{
- if(ele.text=='鎷掔粷' || ele.text=='鎵瑰噯' || ele.text=='鎾ゅ洖'){
+ watch: {
+ multipleSelection(newVal) {
+ if (newVal.length == 0) {
+ this.table.toolbar.forEach(ele => {
+ if (ele.text == '鎷掔粷' || ele.text == '鎵瑰噯' || ele.text == '鎾ゅ洖') {
ele.disabled = true
}
})
@@ -510,12 +467,12 @@
},
// 鏂板 / 淇敼
addOrUpdateHandle(row) {
- if(!this.permissions.technology_routing_edit && row.id!=null){
+ if (!this.permissions.technology_routing_edit && row.id != null) {
this.$message.error("璇ヨ鑹叉病鏈夋搷浣滄潈闄�")
return
}
this.$router.push({
- name: 'routingForm',
+ path: '/technology/routing/routing-form',
query: { id: row == null ? null : row.id }
})
},
@@ -527,7 +484,7 @@
closeOnClickModal: false,
type: 'warning'
})
- .then(function() {
+ .then(function () {
const ids = []
ids.push(row.id)
return delObj(ids)
@@ -552,7 +509,7 @@
type: 'warning',
closeOnClickModal: false
})
- .then(function() {
+ .then(function () {
const ids = that.multipleSelection.map((item) => {
return item.id
})
@@ -609,7 +566,7 @@
handleSelectionChange(val) {
// 鏍规嵁鐘舵�侊紝绂佺敤琛ㄥご鎸夐挳
// 绛涢�夊嚭閫変腑璁板綍鐨勭姸鎬�
- var stateArr = val.map(function(value, index) {
+ var stateArr = val.map(function (value, index) {
return value.state
})
// 閫変腑鐘舵�佹暟缁勫厓绱犲幓閲�
diff --git a/src/views/technology/routing/routing-form.vue b/src/views/technology/routing/routing-form.vue
index e7da9de..1458ba5 100644
--- a/src/views/technology/routing/routing-form.vue
+++ b/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,7 +531,7 @@
},
computed: {
- editable: function() {
+ editable: function () {
if (!this.dataForm.id) {
return true
}
@@ -891,11 +668,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 +959,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)
- ]
- }
+ 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
+ e.index = idx + 1
})
this.$forceUpdate()
this.$refs.operationTable.sort('index')
Promise.all([this.save()]).then((res) => {
- this.selectByIndex(obj.index)
+ this.selectByIndex(obj.index)
})
- }else{
+ } 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)
+ // 琛屾渶鍚庢坊鍔�
+ operation.index = this.dataForm.operations.length + 1
+ this.dataForm.operations.push(operation)
} else {
- // 鎻掑叆鍓嶄竴琛�
- operation.index = this.operationIndex
- this.dataForm.operations = [
+ // 鎻掑叆鍓嶄竴琛�
+ 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
+ e.index = idx + 1
})
this.$forceUpdate()
this.$refs.operationTable.sort('index')
Promise.all([this.save()]).then((res) => {
- this.selectByIndex(operation.index)
+ this.selectByIndex(operation.index)
})
}
},
@@ -1335,7 +1112,7 @@
type: 'warning'
}
)
- .then(function() {
+ .then(function () {
return deleteRoutingTemplate(row.id)
})
.then((response) => {
@@ -1400,7 +1177,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
})
- .then(function() {
+ .then(function () {
return deleteRoutingTemplateParam(row.id)
})
.then((response) => {
@@ -1429,11 +1206,11 @@
},
// 淇濆瓨鎵�鏈夊弬鏁扮殑淇敼
saveAllParamChange() {
- this.paramData.forEach(e=>{
- if(e.paramValue!=null){
- e.paramValue=e.paramValue.replace(',','锛�').replace('(','锛�').replace(')','锛�')
+ this.paramData.forEach(e => {
+ if (e.paramValue != null) {
+ e.paramValue = e.paramValue.replace(',', '锛�').replace('(', '锛�').replace(')', '锛�')
if (!isNaN(e.paramValue)) {
- e.paramValue='='+e.paramValue
+ e.paramValue = '=' + e.paramValue
}
}
})
@@ -1481,18 +1258,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;
@@ -1503,6 +1285,7 @@
background: #288fe8;
}
}
+
.idx {
border-radius: 100%;
width: 25px;
@@ -1514,6 +1297,7 @@
position: relative;
}
}
+
.dragItem {
display: inline-block;
width: var(--dragitemwidth);
@@ -1522,28 +1306,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;
@@ -1558,6 +1349,7 @@
.avue-main {
height: calc(100% - 60px);
}
+
.routing-detail {
width: 100%;
padding-top: 10px;
@@ -1670,6 +1462,7 @@
background-size: cover;
font-size: 14px;
}
+
.h-icon-all-drag:before {
content: '\E63E';
font-size: 14px;
--
Gitblit v1.9.3