Commit fee03a0b by 杨北旺

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

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