Commit ee39768c by 胡悦

提交

1 parent 899b2036
...@@ -3,21 +3,21 @@ ...@@ -3,21 +3,21 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: limin * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-09-07 14:38:52 * @LastEditTime: 2022-02-18 19:05:02
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function (isEnv = true) {
// console.log(1111111) // console.log(1111111)
if (isEnv) { // if (isEnv) {
let { request } = cfg // let { request } = cfg
Object.assign(request, { timeout }) // Object.assign(request, { timeout })
return Promise.resolve(cfg) // return Promise.resolve(cfg)
} // }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
......
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
return { return {
addLoading: false, addLoading: false,
eventBus: new Vue(), eventBus: new Vue(),
taggingList: '', taggingList: [],
btnList: [ btnList: [
{ {
id: 1, id: 1,
...@@ -342,31 +342,31 @@ export default { ...@@ -342,31 +342,31 @@ export default {
this.$refs.membersForm.remove(val) this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags) this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.key = new Date() this.key = new Date()
this.isUpdate = true
} else { } else {
this.basicForm.userList.splice(idx, 1) this.basicForm.userList.splice(idx, 1)
this.selectData = this.basicForm.userList this.selectData = this.basicForm.userList
this.key = new Date() this.key = new Date()
} }
this.isUpdate = true
}, },
openLabel() { openLabel() {
this.dialogVisible = !this.dialogVisible this.dialogVisible = !this.dialogVisible
this.$refs.selectLabel.init() this.$refs.selectLabel.init()
}, },
handleSubmit() { handleSubmit() {
let arr = [] // let arr = []
this.tagging.forEach(item => { // this.tagging.forEach(item => {
item.labelList.forEach(tag => { // item.labelList.forEach(tag => {
arr.push({ // arr.push({
groupId: parseInt(item.labelGroup.id), // groupId: parseInt(item.labelGroup.id),
groupName: item.labelGroup.name, // groupName: item.labelGroup.name,
labelId: parseInt(tag.id), // labelId: parseInt(tag.id),
labelName: tag.name, // labelName: tag.name,
groupType: item.labelType // groupType: item.labelType
}) // })
}) // })
}) // })
this.taggingList = arr // this.taggingList = arr
// console.log(this.taggingList) // console.log(this.taggingList)
this.$refs.basicForm.validate(valid => { this.$refs.basicForm.validate(valid => {
if (valid) { if (valid) {
...@@ -456,6 +456,20 @@ export default { ...@@ -456,6 +456,20 @@ export default {
// }) // })
// } // }
this.tagging = val this.tagging = val
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
arr.push({
groupId: parseInt(item.labelGroup.id),
groupName: item.labelGroup.name,
labelId: parseInt(tag.id),
labelName: tag.name,
groupType: item.labelType
})
})
})
this.taggingList = arr
console.log(this.taggingList)
// this.taggingList = val // this.taggingList = val
console.log(val, '1') console.log(val, '1')
console.log(this.tagging, '2') console.log(this.tagging, '2')
...@@ -467,7 +481,21 @@ export default { ...@@ -467,7 +481,21 @@ export default {
tag.labelList.splice(idx1, 1) tag.labelList.splice(idx1, 1)
if (tag.labelList.length == 0) { if (tag.labelList.length == 0) {
this.tagging.splice(idx, 1) this.tagging.splice(idx, 1)
// this.taggingList.splice(idx, 1)
} }
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
arr.push({
groupId: parseInt(item.labelGroup.id),
groupName: item.labelGroup.name,
labelId: parseInt(tag.id),
labelName: tag.name,
groupType: item.labelType
})
})
})
this.taggingList = arr
this.isUpdate = true this.isUpdate = true
// this.$refs.selectLabel.init(this.tagging) // this.$refs.selectLabel.init(this.tagging)
}, },
......
...@@ -119,12 +119,12 @@ export default { ...@@ -119,12 +119,12 @@ export default {
labelTreeReq: { labelTreeReq: {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
// shopId: this.$globalState.session.merchantId, shopId: this.$globalState.session.merchantId,
shopId: '44210934', // shopId: '44210934',
labelGroupName: this.labelGroupName, labelGroupName: this.labelGroupName,
// labelTypesStr: '自店标签,企业标签', labelTypesStr: '自店标签,企业标签',
// edition: this.$globalState.session.merchantModel edition: this.$globalState.session.merchantModel
edition: 4 // edition: 4
} }
}) })
.then(res => { .then(res => {
...@@ -375,7 +375,7 @@ export default { ...@@ -375,7 +375,7 @@ export default {
.el-tag { .el-tag {
font-size: 12px; font-size: 12px;
border: none; border: none;
background: rgba($color: #5850FF, $alpha: 0.3) background: rgba($color: #5850ff, $alpha: 0.3);
} }
} }
.tag-selected-box { .tag-selected-box {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!