From f3ad14f8af7fb651426d1ee617e7ecb9d3fc9aab Mon Sep 17 00:00:00 2001
From: xyc <jc_xiong@hotmail.com>
Date: 星期四, 28 三月 2024 11:15:52 +0800
Subject: [PATCH] 新增产品节点上设置关系,可设置项为“无/旁联/表决”
---
web/src/views/modules/basicInfo/XhProductModel.vue | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/web/src/views/modules/basicInfo/XhProductModel.vue b/web/src/views/modules/basicInfo/XhProductModel.vue
index 38c680e..cada5bf 100644
--- a/web/src/views/modules/basicInfo/XhProductModel.vue
+++ b/web/src/views/modules/basicInfo/XhProductModel.vue
@@ -19,6 +19,7 @@
<el-form-item>
<zt-button type="query" @click="table.query()"/>
<zt-button type="add" @click="add()"/>
+ <zt-button v-if="productType==='3'" type="primary" @click="addCell()">鏂板铏氬崟鍏�</zt-button>
<zt-button type="delete" @click="table.deleteHandle()"/>
</el-form-item>
</el-form>
@@ -37,7 +38,7 @@
<zt-table-column-handle :table="table"/>
</el-table>
<!-- 寮圭獥, 鏂板 / 淇敼 -->
- <add-or-update @refreshDataList="table.query"/>
+ <add-or-update @refreshDataList="table.query" ref="AddOrUpdate"/>
<select-ty-model @refreshDataList="table.query" ref="SelectTyModel"/>
</zt-table-wraper>
</div>
@@ -51,14 +52,15 @@
import SelectTyModel from './SelectTyModel'
import ProductModelTree from "./ProductModelTree";
import Cookies from "js-cookie";
+ import TyProductModel from "./TyProductModel-AddOrUpdate";
export default {
data() {
return {
url: `${window.SITE_CONFIG['apiURL']}/sysPictureBase/getProductImg?token=${Cookies.get('token')}&id=`,
+ productType: '',
dataForm: {
name: '',
- productType: '',
type:'',
pid: '',
srcId:'',
@@ -66,17 +68,19 @@
}
},
components: {
+ TyProductModel,
ProductModelTree,
AddOrUpdate,
SelectTyModel
},
methods: {
add() {
- if (this.dataForm.type !== '4') {
+ this.dataForm.type=this.productType
+ if (this.dataForm.type !== '3') {
console.log(1111)
console.log(this.dataForm.type,'add() {')
this.dataForm.type = this.dataForm.type - 1
- } else if (this.dataForm.type === '4') {
+ } else if (this.dataForm.type === '3') {
console.log(2222)
console.log(this.dataForm.type,'add() {')
this.dataForm.type = this.dataForm.type - 2
@@ -87,19 +91,19 @@
}
this.$refs.SelectTyModel.$refs.dialog.init(null,{type:this.dataForm.type,id:this.dataForm.pid})
},
+ addCell(){
+ this.$refs.AddOrUpdate.$refs.dialog.init(null,{type:10,pid:this.dataForm.pid})
+ },
cellStyle({column}) {
if (column.label === '鍚嶇О') {
return 'text-align: left !important;'
}
},
- getPath(id) {
- console.log(id, 'path')
- return `${window.SITE_CONFIG['apiURL']}/sys/oss/content2?fileId=${id}`
- },
onProductSelected(data) {
console.log(data)
this.dataForm.pid = data.id
this.dataForm.type = data.productType
+ this.productType = data.productType
this.$refs.tableObj.query()
}
}
--
Gitblit v1.9.1