From a2441175073f8b09a7eff29effd7e3e617de2f7d Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期四, 06 六月 2024 18:23:01 +0800
Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/smart-web

---
 src/views/console/product-process/process-route.vue |  135 +++++++++++++++++---------------------------
 1 files changed, 52 insertions(+), 83 deletions(-)

diff --git a/src/views/console/product-process/process-route.vue b/src/views/console/product-process/process-route.vue
index e030f47..01b41b9 100644
--- a/src/views/console/product-process/process-route.vue
+++ b/src/views/console/product-process/process-route.vue
@@ -23,7 +23,7 @@
 		<div class="process-main-tabs">
 			<div class="process-main-header">
 				<div class="main-header-label">宸ヨ壓璺嚎<span>{{productName}}</span></div>
-				<div style="padding: 20px;border-bottom: 1px solid #dee;">
+				<div style="padding: 20px 20px 8px;border-bottom: 1px solid #dee;">
 					<div class="main-info">
 						<div class="info-top-title">宸ヨ壓璺嚎鐗堟湰</div>
 						<div class="main-info-tooltip">
@@ -32,50 +32,23 @@
 						</div>
 					</div>
 					<div>
-						<div class="btn-box vistion-button" v-for="item in detail.dtos">
+						<div :class="{'btn-box':true, 'vistion-button': true, 'isBorder': item.isBorder}" v-for="(item,index) in detail.dtos" @click="changeDots(item,index)">
 							<span class="vistion-button-round"></span>
 							<el-tooltip trigger="click" class="detail-item" effect="dark" :content="vHtml" placement="bottom" raw-content>
 						      <span class="vistion-button-name" @click="showDetail(item)">{{item.name}}</span>
 						    </el-tooltip>
 							<el-icon class="vistion-button-icon"><DocumentCopy /></el-icon>
-							<el-icon class="vistion-button-icon"><Delete /></el-icon>
+							<el-icon class="vistion-button-icon" @click="delIcon(item)"><Delete /></el-icon>
 						</div>
-						<div class="btn-box most-vision" @click="changeV">{{changVTitle}}</div>
+						<div class="btn-box most-vision" @click="changeV" v-if="detail.dtos.length!=0">{{changVTitle}}</div>
 						<el-button @click="addVision">+ 娣诲姞鏂扮増鏈�</el-button>
 					</div>
 				</div>
 			</div>
 			<div class="correlation-product-line">鍏宠仈浜х嚎<span>鍗冩枃绉戞妧</span></div>
 			<div class="process-main-content">
-				<div class="main-content-left">
-					<div class="info-top-title">宸ヨ壓璺嚎</div>
-					<div style="margin-bottom: 12px;">
-	            		<el-button type="primary">鏂板</el-button>
-	            		<el-button type="primary">瀹氱増</el-button>
-	            		<el-button disabled>骞跺簭</el-button>
-					</div>
-					<el-table ref="multipleTableRef0" :data="tableData" border style="width: 100%" class="multipleTableRef" @selection-change="HandleSelectionChange">
-						<el-table-column type="selection" width="55" />
-						<el-table-column prop="name" label="宸ュ簭椤哄簭"></el-table-column>
-						<el-table-column prop="code" label="宸ュ簭缂栧彿"></el-table-column>
-						<el-table-column prop="typeName" label="宸ュ簭鍚嶇О"></el-table-column>
-						<el-table-column fixed="right" label="鎿嶄綔" width="200px">
-							<template #default="scope">
-								<!-- <el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">缂栬緫</el-button>
-								<el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">鍒锋柊</el-button>
-								<el-button text type="primary" size="small" @click="table_edit(scope.row, scope.$index)">鍒犻櫎</el-button> -->
-							</template>
-						</el-table-column>
-					</el-table>
-				</div>
-				<div class="main-content-right">
-					<div class="main-info-title">宸ュ簭淇℃伅</div>
-					<ul>
-						<li>宸ュ簭缂栧彿<span>-</span></li>
-						<li>宸ュ簭鍚嶇О<span>-</span></li>
-						<li>宸ュ簭椤哄簭<span>-</span></li>
-					</ul>
-				</div>
+				<!-- isCustomization 鏂板缓/姝ラ -->
+				<workmanship :isCustomization="true" :craftId="craftId"></workmanship>
 			</div>
 		</div>
 	</div>
@@ -84,6 +57,7 @@
 
 <script>
 	import saveDialog from './addRoute'
+	import workmanship from './process-route/workmanship'  //宸ヨ壓璺嚎
 	import * as ElementPlusIconsVue from '@element-plus/icons-vue'
 	let icons = []
 	for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
@@ -91,15 +65,16 @@
 	}
 	export default {
 		name: 'route',
-		components: {...ElementPlusIconsVue,saveDialog},
+		components: {...ElementPlusIconsVue,saveDialog,workmanship},
 		data() {
 			return {
+				craftId: "",
 				id: "",
 				changVTitle: "鏇村鐗堟湰...",
 				isMore: true,
 				productName: "",
 				vHtml: '',
-				detail: {dtos: [{name: ""}]},
+				detail: {dtos: [{name: "",isBorder: false}]},
 				testList: [],
 				routeForm: {
 					test: ""
@@ -115,16 +90,38 @@
 					save: false
 				},
 				info: {},
-				tableData: [],
-				selection: []
+				delIconId: ""
 			}
 		},
 		mounted(){
 			this.getLeftTree();
 		},
 		methods: {
+			delIcon(item) {
+				this.delIconId = item.id;
+				var that = this;
+				this.$confirm(`纭瑕佸垹闄ゆ宸ヨ壓鐗堟湰鍚�?`, '', {
+					type: 'warning'
+				}).then(() => {
+					this.$HTTP.delete("/api/blade-cps/production-craft-version/remove/"+that.delIconId).then(res=> {
+						if(res.code == 200) {
+							that.$message.success("鎿嶄綔鎴愬姛");
+							that.getDetail();
+						}
+					})
+				}).catch(() => {
+
+				})
+			},
+			changeDots(item,index) {
+				this.detail.dtos.forEach(item=> {
+					item.isBorder = false;
+				})
+				this.detail.dtos[index].isBorder = true;
+				this.craftId = item.id;
+			},
 			addVision() {
-				this.$router.push({path: `/console/product-process/process-route/add-craft-version`,query: {id:this.id}})
+				this.$router.push({path: `/console/product-process/process-route/add-craft-version`,query: {id:this.id,craftId:this.craftId}})
 			},
 			addRoute() {
 				this.$router.push({path: `/console/product-process/process-route/add-craft`,query: {id:this.id}})
@@ -153,7 +150,6 @@
 				})
 			},
 			table_edit(row){
-				this.dialog.save = true
 				this.$HTTP.get(`/api/blade-cps/craft-routing/not-band-craft?craftId=${row.id}`).then(res=> {
 					if(res.code == 200) {
 						this.dialog.save = true;
@@ -165,9 +161,6 @@
 			},
 			addRouteSuccess() {
 				this.getLeftTree();
-			},
-			HandleSelectionChange(selection) {
-				this.selection = selection;
 			},
 			routeSubmit() {
 				this.$refs.dialogForm.validate(async (valid) => {
@@ -195,9 +188,16 @@
 				this.leftData[index].active = true;
 				this.info = this.leftData[index];
 			},
-			getDetail(id) {
-				this.$HTTP.get(`/api/blade-cps/craft-routing/detail?id=${id}`).then(res=> {
+			getDetail() {
+				this.$HTTP.get(`/api/blade-cps/craft-routing/detail?id=${this.id}`).then(res=> {
 					if(res.code == 200) {
+						if(res.data.dtos.length != 0) {
+							res.data.dtos.forEach(item=> {
+								item.isBorder = false;
+							})
+							res.data.dtos[0].isBorder = true;
+							this.craftId = res.data.dtos[0].id;
+						}
 						this.detail = res.data;
 					}
 				})
@@ -215,7 +215,7 @@
 							this.productName = res.data[0].name;
 							this.id = res.data[0].id;
 						}
-						this.getDetail(res.data[0].id);
+						this.getDetail();
 					}
 				})
 			}
@@ -307,11 +307,6 @@
 .main-header-label span {
 	margin-left: 12px;
 }
-.main-info-title {
-	font-size: 14px;
-    padding-left: 8px;
-    border-left: 2px solid #7ab3ee;
-}
 .info-top-title {
 	padding-left: 8px;
     border-left: 4px solid #86bffa;
@@ -335,38 +330,6 @@
     margin-right: 4px;
     display: inline-block;
 }
-.main-info-conent {
-	display: flex;
-    margin: 8px 0px 12px;
-}
-.main-info-conent > span {
-	margin-right: 12px;
-	font-size: 14px;
-}
-.main-info-conent > span span {
-	margin-left:12px;
-}
-.process-main-content {
-	display: flex;
-}
-.main-content-left {
-	width: 70%;
-}
-.main-content-right {
-	flex: 1;
-}
-.main-content-right ul {
-	padding: 12px 30px;
-}
-.main-content-right ul li {
-	width: 50%;
-	float: left;
-	list-style: none;
-	margin-bottom:12px;
-}
-.main-content-right ul li span {
-	margin-left:12px;
-}
 .addRoute {
 	color: #409eff;
 	padding: 12px 6px;
@@ -375,17 +338,20 @@
 }
 .btn-box {
 	display: inline-block;
-	margin-right: 20px;
 }
 .most-vision {
 	border-bottom: 1px solid #86bffa;
 	font-size: 14px;
 	font-weight: 700;
 	cursor: pointer;
+	margin-right: 12px;
+	margin-left: 6px;
 }
 .vistion-button {
 	border: 1px solid #86bffa;
     padding: 8px 12px;
+	margin-right: 6px;
+	margin-bottom: 12px;
 }
 .vistion-button-name {
 	vertical-align: middle;
@@ -415,6 +381,9 @@
 .correlation-product-line span {
 	margin-left: 20px;
 }
+.isBorder {
+	border: 1px solid #0176f0;
+}
 </style>
 <style>
 	.detailUl {

--
Gitblit v1.9.3