Commit bd950fbb by liimin

fixed

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