Commit b3c078af authored by 张伯涛's avatar 张伯涛

banner管理新增编辑添加unitId判断

parent 0fd2e333
...@@ -569,6 +569,7 @@ export default { ...@@ -569,6 +569,7 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function() {
console.log('111', this.$store.getters.roles.roleKey)
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
const unitId = this.queryParams.unitId const unitId = this.queryParams.unitId
...@@ -579,6 +580,7 @@ export default { ...@@ -579,6 +580,7 @@ export default {
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
const typeName = this.addressType === '1' ? 'http://' : 'https://' const typeName = this.addressType === '1' ? 'http://' : 'https://'
const temp = { const temp = {
unitId: this.$store.getters.roles.roleKey === 'admin' ? undefined : this.queryParams.unitId,
businessId: this.form.businessId, businessId: this.form.businessId,
// ...this.form // ...this.form
bannerName: this.form.bannerName, bannerName: this.form.bannerName,
...@@ -596,6 +598,7 @@ export default { ...@@ -596,6 +598,7 @@ export default {
} else { } else {
const typeName = this.addressType === '1' ? 'http://' : 'https://' const typeName = this.addressType === '1' ? 'http://' : 'https://'
const params = { const params = {
unitId: this.$store.getters.roles.roleKey === 'admin' ? undefined : this.queryParams.unitId,
bannerName: this.form.bannerName, bannerName: this.form.bannerName,
bannerPicture: this.form.bannerPicture, bannerPicture: this.form.bannerPicture,
linkUrl: this.form.linkUrl ? typeName + this.form.linkUrl : '', linkUrl: this.form.linkUrl ? typeName + this.form.linkUrl : '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment