Merge branch 'dev-dictionary' of github.com:jetlinks/jetlinks-ui-vue into dev-dictionary
This commit is contained in:
commit
bdb150609b
|
@ -25,7 +25,7 @@
|
|||
"event-source-polyfill": "^1.0.31",
|
||||
"global": "^4.4.0",
|
||||
"jetlinks-store": "^0.0.3",
|
||||
"jetlinks-ui-components": "^1.0.34-4",
|
||||
"jetlinks-ui-components": "^1.0.34-7",
|
||||
"js-cookie": "^3.0.1",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"less": "^4.1.3",
|
||||
|
|
|
@ -320,6 +320,9 @@ export const handleSiderMenu = (menuData: any[]) => {
|
|||
if (menuData && menuData.length) {
|
||||
return menuData.map(item => {
|
||||
const { isApp, appUrl } = hasAppID(item) // 是否为第三方程序
|
||||
if ( item.options?.isShow !== undefined && item.isShow === undefined) {
|
||||
item.isShow = item.options.isShow
|
||||
}
|
||||
const meta = handleMeta(item, isApp)
|
||||
const route: any = {
|
||||
path: isApp ? appUrl : `${item.url}`,
|
||||
|
@ -333,7 +336,7 @@ export const handleSiderMenu = (menuData: any[]) => {
|
|||
route.children = handleSiderMenu(route.children)
|
||||
}
|
||||
|
||||
route.meta.hideInMenu = hideInMenu(item.code)
|
||||
// route.meta.hideInMenu = hideInMenu(item.code)
|
||||
|
||||
return route
|
||||
})
|
||||
|
|
|
@ -106,7 +106,11 @@ const handleSearch = () => {
|
|||
};
|
||||
|
||||
onMounted(() => {
|
||||
activeKey.value = menuStore.hasMenu('code') ? ['alarm', 'system-monitor', 'system-business','workflow-notification'] : ['alarm', 'system-monitor', 'system-business']
|
||||
const keys = ['alarm', 'system-monitor', 'system-business']
|
||||
if (menuStore.hasMenu('workflow')) {
|
||||
keys.push('workflow-notification')
|
||||
}
|
||||
activeKey.value = keys
|
||||
initData = getInitData()
|
||||
handleSearch();
|
||||
});
|
||||
|
|
|
@ -72,6 +72,5 @@ const workflowNotice = [
|
|||
},
|
||||
]
|
||||
export const getInitData = () =>{
|
||||
let initData:any[]
|
||||
return initData = menuStore.hasMenu('code') ? [...systemNotice,...workflowNotice] : [...systemNotice]
|
||||
return menuStore.hasMenu('workflow') ? [...systemNotice,...workflowNotice] : [...systemNotice]
|
||||
}
|
|
@ -158,14 +158,14 @@ watch(
|
|||
if (props.type === 'device') {
|
||||
detail(id as string).then((resp) => {
|
||||
loading.value = false
|
||||
instanceStore.setCurrent(resp.result)
|
||||
// instanceStore.setCurrent(resp.result)
|
||||
value.value = resp.result.metadata
|
||||
hideVirtualRule(resp.result.metadata)
|
||||
});
|
||||
} else {
|
||||
productDetail(id as string).then((resp) => {
|
||||
loading.value = false
|
||||
productStore.setCurrent(resp.result)
|
||||
// productStore.setCurrent(resp.result)
|
||||
value.value = resp.result.metadata
|
||||
hideVirtualRule(resp.result.metadata)
|
||||
});
|
||||
|
|
|
@ -101,9 +101,9 @@ const menuCount = (menus: any[]) => {
|
|||
*/
|
||||
const dealMenu = (data:any) =>{
|
||||
data.forEach((item:any)=>{
|
||||
item.options = {
|
||||
show: true
|
||||
}
|
||||
item.options = Object.assign({
|
||||
show: true
|
||||
}, item?.options || {})
|
||||
if(item.children){
|
||||
dealMenu(item.children)
|
||||
}
|
||||
|
|
|
@ -13,6 +13,9 @@ export const USER_CENTER_MENU_DATA = {
|
|||
sortIndex: 9999,
|
||||
granted: true,
|
||||
owner: 'iot',
|
||||
options: {
|
||||
isShow: false,
|
||||
},
|
||||
permissions: [
|
||||
{
|
||||
permission: 'system_config',
|
||||
|
@ -4588,5 +4591,265 @@ export default [
|
|||
supportDataAccess: false
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"path": "3n23",
|
||||
"sortIndex": 5,
|
||||
"level": 1,
|
||||
"owner": "iot",
|
||||
"name": "WEB IDE",
|
||||
"code": "web_ide",
|
||||
"url": "/web_ide",
|
||||
"icon": "MenuUnfoldOutlined",
|
||||
showPage: ["low-code-info", "low-code-editor"],
|
||||
"options": {
|
||||
isShow: false,
|
||||
},
|
||||
"accessSupport": {
|
||||
"text": "不支持",
|
||||
"value": "unsupported"
|
||||
},
|
||||
"indirectMenus": [],
|
||||
permissions: [
|
||||
{
|
||||
"permission": "low-code-info",
|
||||
"actions": [
|
||||
"add", "query", "save", "delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"permission": "low-code-editor",
|
||||
"actions": [
|
||||
"query", "deploy"
|
||||
]
|
||||
}
|
||||
],
|
||||
"creatorId": "1199596756811550720",
|
||||
"createTime": 1698735482730,
|
||||
"supportDataAccess": false
|
||||
},
|
||||
{
|
||||
"path": "4FgE",
|
||||
"sortIndex": 6,
|
||||
"level": 1,
|
||||
"owner": "iot",
|
||||
"name": "工作流",
|
||||
"code": "workflow",
|
||||
"url": "/workflow",
|
||||
"icon": "MenuUnfoldOutlined",
|
||||
showPage: ["process-form","process-deployment"],
|
||||
"options": {
|
||||
isShow: false,
|
||||
},
|
||||
"accessSupport": {
|
||||
"text": "不支持",
|
||||
"value": "unsupported"
|
||||
},
|
||||
"indirectMenus": [],
|
||||
permissions: [
|
||||
{
|
||||
"permission": "low-code-info",
|
||||
"actions": [
|
||||
"query",
|
||||
]
|
||||
},
|
||||
],
|
||||
"buttons": [
|
||||
{
|
||||
"id": "form_query",
|
||||
"name": "流程表单-查询",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-form",
|
||||
"actions": [
|
||||
"query"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "form_save",
|
||||
"name": "流程表单-保存",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-form",
|
||||
"actions": [
|
||||
"save"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "form_delete",
|
||||
"name": "流程表单-删除",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-form",
|
||||
"actions": [
|
||||
"delete"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "definition_query",
|
||||
"name": "流程定义-查询",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-definition",
|
||||
"actions": [
|
||||
"query"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "definition_save",
|
||||
"name": "流程定义-保存",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-definition",
|
||||
"actions": [
|
||||
"save"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "definition_delete",
|
||||
"name": "流程定义-删除",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-definition",
|
||||
"actions": [
|
||||
"delete"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "release_query",
|
||||
"name": "流程部署-查询",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-deployment",
|
||||
"actions": [
|
||||
"query"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "release_save",
|
||||
"name": "流程部署-保存",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-deployment",
|
||||
"actions": [
|
||||
"save"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "release_delete",
|
||||
"name": "流程部署-删除",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-deployment",
|
||||
"actions": [
|
||||
"delete"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-dismiss",
|
||||
"name": "流程运行时-驳回任务",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"reject"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-initiate",
|
||||
"name": "流程运行时-发起流程",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"start"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-mine",
|
||||
"name": "流程运行时-我的流程",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"self"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-sign",
|
||||
"name": "流程运行时-签收任务",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"claim"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-complete",
|
||||
"name": "流程运行时-完成任务",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"complete"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-create",
|
||||
"name": "流程运行时-创建/启动流程",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"createAndStart"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "runtime-revoke",
|
||||
"name": "流程运行时-撤销流程",
|
||||
"permissions": [
|
||||
{
|
||||
"permission": "process-runtime",
|
||||
"actions": [
|
||||
"repeal"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"creatorId": "1199596756811550720",
|
||||
"createTime": 1698735482730,
|
||||
"supportDataAccess": false
|
||||
}
|
||||
];
|
||||
|
|
|
@ -386,7 +386,7 @@ const form = reactive({
|
|||
const params = {
|
||||
...form.data,
|
||||
owner: form.data?.owner ?? null,
|
||||
options: { show: true },
|
||||
options: form.data?.options || { show: true },
|
||||
accessSupport: {
|
||||
value: accessSupportValue,
|
||||
label:
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
max-height="350px"
|
||||
v-model:value="form.data.permissions"
|
||||
:disabled="props.mode === '查看'"
|
||||
:key="form.data.id || ''"
|
||||
:btnId="form.data.id "
|
||||
/>
|
||||
</j-form-item>
|
||||
<j-form-item label="说明" name="describe">
|
||||
|
|
|
@ -50,7 +50,7 @@ import { Form } from 'jetlinks-ui-components';
|
|||
Form.useInjectFormItemContext();
|
||||
|
||||
const props = defineProps<{
|
||||
key: string;
|
||||
btnId: string;
|
||||
value: any[];
|
||||
firstWidth: number;
|
||||
maxHeight: string;
|
||||
|
@ -77,17 +77,17 @@ const permission = reactive({
|
|||
|
||||
init: () => {
|
||||
permission.getList();
|
||||
watch(
|
||||
() => props.key,
|
||||
() => {
|
||||
nextTick(() => {
|
||||
permission.list = permission.makeList(
|
||||
props.value,
|
||||
permission.sourceList,
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
// watch(
|
||||
// () => props.btnId,
|
||||
// () => {
|
||||
// nextTick(() => {
|
||||
// permission.list = permission.makeList(
|
||||
// props.value,
|
||||
// permission.sourceList,
|
||||
// );
|
||||
// });
|
||||
// },
|
||||
// );
|
||||
},
|
||||
// 获取权限列表
|
||||
getList: () => {
|
||||
|
|
|
@ -3738,10 +3738,10 @@ jetlinks-store@^0.0.3:
|
|||
resolved "https://registry.npmjs.org/jetlinks-store/-/jetlinks-store-0.0.3.tgz"
|
||||
integrity sha512-AZf/soh1hmmwjBZ00fr1emuMEydeReaI6IBTGByQYhTmK1Zd5pQAxC7WLek2snRAn/HHDgJfVz2hjditKThl6Q==
|
||||
|
||||
jetlinks-ui-components@^1.0.34-4:
|
||||
version "1.0.34-4"
|
||||
resolved "https://registry.npmjs.org/jetlinks-ui-components/-/jetlinks-ui-components-1.0.34-4.tgz#92cfc6be685988385a489f3e924383c4831f3ed5"
|
||||
integrity sha512-td+RgaBC5lQxRuDsHkCg9UEzCcSy4XikufnabVGz5IxU+UmXu+PJUjz2wo9vDe8sPSctyk/5jQU+N6GBPlp8JA==
|
||||
jetlinks-ui-components@^1.0.34-7:
|
||||
version "1.0.34-7"
|
||||
resolved "https://registry.npmjs.org/jetlinks-ui-components/-/jetlinks-ui-components-1.0.34-7.tgz#3a14e85edb4c5d11427d30f3925dc5f498478940"
|
||||
integrity sha512-Rgbjig3QYP8CDVHLbco20Cf7sArYralO8yWtH5E5zylYAN2lINLUsgOlIVf9aweszZR/Ps+z/NLP0CoRQf1Xtw==
|
||||
dependencies:
|
||||
"@vueuse/core" "^9.12.0"
|
||||
"@vueuse/router" "^9.13.0"
|
||||
|
|
Loading…
Reference in New Issue