This commit is contained in:
faiz 2024-07-04 10:02:22 +08:00
parent 4eae526816
commit 1106fe7452
2 changed files with 30 additions and 5 deletions

View File

@ -3,11 +3,11 @@ ENV = 'development'
# http://192.168.1.43:8324/admin
# http://mer.crmeb.net/admin
# base api
VUE_APP_BASE_API = 'http://192.168.1.24:8080'
VUE_APP_BASE_API = 'http://192.168.1.18:8080'
# VUE_APP_BASE_API = 'https://api.tropjoin.com/'
# socket 连接地址
VUE_APP_WS_URL = 'ws://http://192.168.1.24:8080'
VUE_APP_WS_URL = 'ws://http://192.168.1.18:8080'
# VUE_APP_WS_URL = 'ws://https://api.tropjoin.com/'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,

View File

@ -197,7 +197,7 @@
</template>
</el-table>
</el-form-item>
<!-- <el-table
<el-table
:data="attrList"
style="width: 100%">
<el-table-column
@ -210,10 +210,10 @@
label="规格值"
width="180">
<template slot-scope="scope">
<el-input @input="handleModet(scope.row)" v-for="item in scope.row.detail" v-model="item.value"></el-input>
<el-input @input="handleModet(item)" v-for="item in scope.row.detail" v-model="item.value"></el-input>
</template>
</el-table-column>
</el-table> -->
</el-table>
<el-form-item>
<el-button :loading="loading1" type="primary" class="submission" @click="handleSubmit('formValidate')">提交</el-button>
</el-form-item>
@ -450,6 +450,7 @@ export default {
attrInfo: {},
detailStatus:true,
attrList:[],
attrInfos:{},
oneFormBatch: [
{
image: '',
@ -490,6 +491,29 @@ export default {
},
methods: {
handleModet(row){
//
let arr = this.attrFormat(this.attrList.map(res=>{
return{
value:res.title,
detail:res.detail.map(res=>res.value)
}
}))
// this.attrInfos = {}
// //
// this.ManyAttrValue.forEach((val) => {
// if (val.detail !== 'undefined' && val.detail !== null) {
// this.attrInfos[val.unique] = val
// }
// })
// //
// arr.forEach((val, index) => {
// const key = val.unique
// if (this.attrInfos[key]) arr[index] = this.attrInfos[key]
// val.image = this.formValidate.image
// })
// console.log(arr)
},
handleMany(row,i,val){
if(row[i]){
this.detailStatus = false
@ -800,6 +824,7 @@ export default {
this.ManyAttrValue = info.attrValue
this.ManyAttrValue.forEach(val => {
if (val.detail !== 'undefined' && val.detail !== null) {
console.log(val)
this.attrInfo[
Object.values(val.detail)
.sort()