|
@@ -30,7 +30,7 @@
|
|
|
<SelectorCard @onCancel="changeDialogState(false)" @onConfirm="confirmSaveFn" confirmText="确定">
|
|
|
<div slot="header">常用功能设置</div>
|
|
|
<div class="transfer-content">
|
|
|
- <Transfer :maxCount="maxCount" submitKey="id" :left="allFunctions" :right="commonList" @onSave="onTransferSave"></Transfer>
|
|
|
+ <Transfer :maxCount="maxCount" submitKey="id" :left="allFunctions" :right="transferCommonList" @onSave="onTransferSave"></Transfer>
|
|
|
</div>
|
|
|
<p class="more-tips">最多可选择 <em style="color:#2CB7CA;">{{ maxCount }}</em> 个常用功能</p>
|
|
|
</SelectorCard>
|
|
@@ -45,10 +45,12 @@ import { Dialog, Image } from 'element-ui'
|
|
|
import WorkspaceCard from '../ui/WorkspaceCard'
|
|
|
import SelectorCard from '@/components/selector/SelectorCard'
|
|
|
import Transfer from '@/components/work-desktop/Transfer'
|
|
|
+import { mixinNoPowerMessageTip } from '@/utils/mixins/no-power-message-box'
|
|
|
import { tryCallHooks } from '@jianyu/easy-inject-qiankun'
|
|
|
|
|
|
export default {
|
|
|
name: 'CommonUse',
|
|
|
+ mixins: [mixinNoPowerMessageTip],
|
|
|
components: {
|
|
|
[Dialog.name]: Dialog,
|
|
|
[Image.name]: Image,
|
|
@@ -62,6 +64,7 @@ export default {
|
|
|
maxCount: state => state.workspace.commonUse.maxCount,
|
|
|
dialogShow: state => state.workspace.commonUse.dialogShow,
|
|
|
allFunctions: state => state.workspace.commonUse.allFunctions, // 所有功能
|
|
|
+ transferCommonList: state => state.workspace.commonUse.transferCommonList,
|
|
|
commonList: state => state.workspace.commonUse.commonList // 常用功能
|
|
|
})
|
|
|
},
|
|
@@ -85,19 +88,23 @@ export default {
|
|
|
},
|
|
|
openLink (item) {
|
|
|
const { url } = item
|
|
|
- tryCallHooks({
|
|
|
- fn: () => {
|
|
|
- this.$BRACE.methods.open({
|
|
|
- route: {
|
|
|
- ...item,
|
|
|
- link: url
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- spareFn: (url) => {
|
|
|
- window.open(url)
|
|
|
- }
|
|
|
- })
|
|
|
+ if (item.usable) {
|
|
|
+ tryCallHooks({
|
|
|
+ fn: () => {
|
|
|
+ this.$BRACE.methods.open({
|
|
|
+ route: {
|
|
|
+ ...item,
|
|
|
+ link: url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ spareFn: () => {
|
|
|
+ window.open(url)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.showNoPowerMessageTip()
|
|
|
+ }
|
|
|
},
|
|
|
confirmSaveFn () {
|
|
|
try {
|