Commit bd950fbb by liimin

fixed

1 parent 5c53810d
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-08-27 19:16:26
* @Last Modified by: limin
* @Last Modified time: 2019-09-11 19:08:21
* @Last Modified time: 2019-09-15 19:42:01
*/
const permision = {}
/**
......@@ -104,10 +104,6 @@ permision.packMenusBtns = function(resources) {
}
if (__oMenu.parentId === '0') { // 取出1级菜单
__aParent.push(__oMenu)
// __aAll.push(__oMenu)
// if (__oMenu.auth) {
// __aAll = [...__aAll, ...__oMenu.auth]
// }
} else { // 取出子菜单
__aSub.push(__oMenu)
}
......@@ -117,10 +113,6 @@ permision.packMenusBtns = function(resources) {
*/
let __parent = null
__aSub.forEach(obj => {
// __aAll.push(obj)
// if (obj.auth) {
// __aAll = [...__aAll, ...obj.auth]
// }
__parent = __aParent.find(menu => menu.authId === obj.parentId)
if (__parent.children) {
__parent.children.push(obj)
......
......@@ -331,21 +331,15 @@ export default {
* @description 关闭所有 tag
* @param {Object} context
*/
closeAll({ state, commit, dispatch }) {
closeAll({ state, dispatch }) {
return new Promise(async resolve => {
// 删除打开的页面 并在缓存设置中删除
await dispatch('_splice', { index: 1 })
// state.opened
// .splice(1)
// .forEach(({ name }) => commit('keepAliveRemove', name))
// 持久化
await dispatch('opend2db')
// 关闭所有的标签页后需要判断一次现在是不是在首页
if (router.app.$route.name !== 'index') {
router.push({
name: 'index'
})
}
const _index = '/index'
state.current = _index
router.replace(_index)
// end
resolve()
})
......@@ -355,7 +349,7 @@ export default {
* @description 私有公共方法
* @param {Object} context
*/
async _do({ state, commit, dispatch }, { pageSelect, call }) {
async _do({ state, dispatch }, { pageSelect, call }) {
return new Promise(async resolve => {
const pageAim = pageSelect || state.current
let currentIndex = 0
......@@ -383,12 +377,14 @@ export default {
*/
_splice({ state, commit }, { index, howmany }) {
return new Promise(resolve => {
let _clone = _.cloneDeep(state.opened)
if (howmany !== undefined) {
state.opened.splice(index, howmany)
_clone.splice(index, howmany)
} else {
state.opened.splice(index)
_clone.splice(index)
}
state.opened.forEach(({ name }) => commit('keepAliveRemove', name))
_clone.forEach(({ name }) => commit('keepAliveRemove', name))
state.opened = _clone
resolve()
})
}
......
......@@ -6,9 +6,9 @@
:title="title"
:before-close="handleClose"
:close-on-click-modal="false"
width="580px"
width="860px"
>
<iframe width="100%" height="800px" scrolling="yes" frameborder="0" :src="pdfUrl"></iframe>
<iframe width="100%" height="700px" scrolling="yes" frameborder="0" :src="pdfUrl"></iframe>
</el-dialog>
</div>
</template>
......
......@@ -255,7 +255,8 @@ export default {
},
handleDetailClose() {
this.detailVisible = !this.detailVisible
this.pdfUrl = ''
this.detailVisible = false
},
// 表格-查看详情
......@@ -265,7 +266,7 @@ export default {
}).then(res => {
this.dialogTitle = row.orderType === 1 ? '物料申请' : '物料报废'
this.pdfUrl = res.url
this.detailVisible = !this.detailVisible
this.detailVisible = true
}).catch(() => {
notice.errorTips()
})
......
......@@ -55,7 +55,7 @@ export default {
v.authId += ''
const node = this.find(v.authId)
if (!node) return true
const check = node.hasOwnProperty('handle') ? chk : treeChk
const check = node.hasOwnProperty('label') ? chk : treeChk
check.push(v.authId)
})
this.$refs.tree.setCheckedKeys(treeChk)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!