|
|
@ -278,7 +278,7 @@ import cunfangdidianbiangengAdd from '@/views/supplychain/cunfangdidianbiangeng/ |
|
|
|
import cunfangdidianbiangengInfo from '@/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengInfo' |
|
|
|
import upload from '../../../components/uploadFile/upload_cunfang' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
import { selectHaveMessage } from '@/api/cheliang/dictcommons' |
|
|
|
import { getButtonPermissions, selectHaveMessage } from '@/api/cheliang/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'cunfangdidianbiangeng', |
|
|
@ -367,7 +367,18 @@ export default { |
|
|
|
mounted() { |
|
|
|
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
|
|
|
window.addEventListener('message', this.handleMessage) |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
for (var i = 0; i < res.data.length; i++) { |
|
|
|
for (var k = 0; k < this.btnList.length; k++) { |
|
|
|
if (res.data[i].buttonId === this.btnList[k].btnKey) { |
|
|
|
this.btnList.splice(k, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async handleMessage(event) { |
|
|
|