Commit fee03a0b by 杨北旺

修改关联企微接口参数传值

1 parent 08a6e81e
......@@ -2760,7 +2760,7 @@
},
"charenc": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"resolved": "https://registry.npm.taobao.org/charenc/download/charenc-0.0.2.tgz",
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
},
"check-types": {
......@@ -3431,7 +3431,7 @@
},
"crypt": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"resolved": "https://registry.nlark.com/crypt/download/crypt-0.0.2.tgz",
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
},
"crypto-browserify": {
......@@ -5857,9 +5857,9 @@
}
},
"glsx-common": {
"version": "1.4.4",
"resolved": "https://registry.npmmirror.com/glsx-common/download/glsx-common-1.4.4.tgz",
"integrity": "sha1-WCA0gtJw5Lu60Ag9Zz/gxY65n8w=",
"version": "1.4.6",
"resolved": "https://registry.npmmirror.com/glsx-common/download/glsx-common-1.4.6.tgz",
"integrity": "sha1-9d2r/+KTOf0h4ZE6zX2luRXtgx0=",
"requires": {
"axios": "^0.21.3",
"md5": "^2.3.0",
......@@ -5869,7 +5869,7 @@
"dependencies": {
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmmirror.com/axios/download/axios-0.21.4.tgz?cache=0&sync_timestamp=1633067660010&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Faxios%2Fdownload%2Faxios-0.21.4.tgz",
"resolved": "https://registry.npmmirror.com/axios/download/axios-0.21.4.tgz?cache=0&sync_timestamp=1634053173003&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Faxios%2Fdownload%2Faxios-0.21.4.tgz",
"integrity": "sha1-xnuQ3AVo5cHPKwuFjEO6KOLtpXU=",
"requires": {
"follow-redirects": "^1.14.0"
......
......@@ -28,7 +28,7 @@
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"glsx-common": "^1.4.4",
"glsx-common": "^1.4.6",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
......
......@@ -74,14 +74,14 @@ export default {
value: 'id',
label: 'label',
children: 'children',
disabled:'entmicroName'
disabled: 'entmicroName'
},
mypropsParam: {
label: 'departmentName',
value: 'id',
children: 'children',
checkStrictly: true,
disabled:'relevanceMerchant'
disabled: 'relevanceMerchant'
},
dataList: [],
customWidth: 113,
......@@ -111,7 +111,6 @@ export default {
merchantId: id,
merchantName: curLabel
}
},
// 获取当前选择的部门
getCurDepartment(val) {
......@@ -120,7 +119,7 @@ export default {
let curLabel = labels[labels.length - 1]
this.tempDepart = {
departmentId: ids,
departmentName: curLabel,
departmentName: curLabel
}
this.$refs.cascaderRef.dropDownVisible = false
},
......@@ -136,23 +135,23 @@ export default {
},
// 关联当前选择的
handlerGL() {
if(!this.curTempMerchant){
if (!this.curTempMerchant) {
this.$message({
message: '请选择门店/商户',
type: 'warning'
})
return;
return
}
if(!this.tempDepart){
if (!this.tempDepart) {
this.$message({
message: '请选择企微门店',
type: 'warning'
})
return;
return
}
this.curGLData = {
...this.curTempMerchant,
...this.tempDepart,
...this.tempDepart
}
let flag = false
this.dataList.forEach(item => {
......@@ -170,31 +169,52 @@ export default {
this.dataList.push(this.curGLData)
this.setBtnWidth()
},
closeCurRouter(){
closeCurRouter() {
history.go(-1)
},
// 批量关联
handleMutiGL() {
if(!this.dataList.length){
this.$message({
message: '请选择',
type: 'warning'
// if (!this.dataList.length) {
// this.$message({
// message: '请选择',
// type: 'warning'
// })
// return
// }
let merchantIds = [1, 2, 3, 5, 6]
let departmentIds = [7, 8, 9, 10, 11]
let departNames = ['name', '222', '555', '666']
let arrpara1 = []
let arrpara2 = []
let arrpara3 = []
// this.dataList.forEach(item => {
// merchantIds.push(item.merchantId)
// departmentIds.push(item.departmentId)
// departNames.push(item.departmentName)
// })
merchantIds.forEach((item, index) => {
let keyval = `list[${index}].merchantId`
let val = item
arrpara1.push({
[keyval]: val
})
return;
}
let merchantIds = []
let departmentIds = []
let departNames = []
this.dataList.forEach(item => {
merchantIds.push(item.merchantId)
departmentIds.push(item.departmentId)
departNames.push(item.departmentName)
})
let para = {
'list.merchantId': merchantIds,
'list.departmentId': departmentIds,
'list.departName': departNames,
}
departmentIds.forEach((item, index) => {
let keyval = `list[${index}].departmentId`
let val = item
arrpara2.push({
[keyval]: val
})
})
departNames.forEach((item, index) => {
let keyval = `list[${index}].departName`
let val = item
arrpara3.push({
[keyval]: val
})
})
let all = [...arrpara1,...arrpara2,...arrpara3]
let para = Object.assign({},...all)
toGL(para).then(res => {
if (res) {
this.$message({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!