菜单管理:菜单和按钮增加是否启用字段,系统菜单、路由、页面按钮关联启用字段
parent
1b0b31a3e0
commit
73cfc8c7be
|
|
@ -6,7 +6,7 @@ VITE_PUBLIC_PATH = /
|
||||||
|
|
||||||
# Basic interface address SPA
|
# Basic interface address SPA
|
||||||
#VITE_GLOB_API_URL=/basic-api
|
#VITE_GLOB_API_URL=/basic-api
|
||||||
VITE_GLOB_API_URL=http://192.168.10.102:9020
|
VITE_GLOB_API_URL=http://192.168.10.102:9500
|
||||||
|
|
||||||
|
|
||||||
# File upload address, optional
|
# File upload address, optional
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ VITE_BUILD_COMPRESS = 'none'
|
||||||
|
|
||||||
|
|
||||||
# Basic interface address SPA
|
# Basic interface address SPA
|
||||||
VITE_GLOB_API_URL=http://192.168.10.102:9020
|
VITE_GLOB_API_URL=http://192.168.10.102:9500
|
||||||
|
|
||||||
# File upload address, optional
|
# File upload address, optional
|
||||||
# It can be forwarded by nginx or write the actual address directly
|
# It can be forwarded by nginx or write the actual address directly
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ interface UseFormValuesContext {
|
||||||
* @desription deconstruct array-link key. This method will mutate the target.
|
* @desription deconstruct array-link key. This method will mutate the target.
|
||||||
*/
|
*/
|
||||||
function tryDeconstructArray(key: string, value: any, target: Recordable) {
|
function tryDeconstructArray(key: string, value: any, target: Recordable) {
|
||||||
console.log('11111111111111');
|
|
||||||
const pattern = /^\[(.+)\]$/;
|
const pattern = /^\[(.+)\]$/;
|
||||||
if (pattern.test(key)) {
|
if (pattern.test(key)) {
|
||||||
const match = key.match(pattern);
|
const match = key.match(pattern);
|
||||||
|
|
@ -35,7 +34,6 @@ function tryDeconstructArray(key: string, value: any, target: Recordable) {
|
||||||
* @desription deconstruct object-link key. This method will mutate the target.
|
* @desription deconstruct object-link key. This method will mutate the target.
|
||||||
*/
|
*/
|
||||||
function tryDeconstructObject(key: string, value: any, target: Recordable) {
|
function tryDeconstructObject(key: string, value: any, target: Recordable) {
|
||||||
console.log('2222222222');
|
|
||||||
const pattern = /^\{(.+)\}$/;
|
const pattern = /^\{(.+)\}$/;
|
||||||
if (pattern.test(key)) {
|
if (pattern.test(key)) {
|
||||||
const match = key.match(pattern);
|
const match = key.match(pattern);
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,27 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<template v-for="item in btnList">
|
<template v-for="item in btnList">
|
||||||
<a-button :color="item.class ? item.class : 'info'" class="ml-2" type="primary"
|
<a-button
|
||||||
@click="emit('btnEvent',item.domId)"> {{item.name}} </a-button>
|
:color="item.class ? item.class : 'info'"
|
||||||
|
class="ml-2"
|
||||||
|
:type="item.class ? item.class : 'primary'"
|
||||||
|
@click="emit('btnEvent', item.domId)"
|
||||||
|
v-if="item.status"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { router } from '@/router';
|
import { router } from '@/router';
|
||||||
import { defineEmits } from 'vue'
|
import { defineEmits } from 'vue';
|
||||||
const btnList = router.currentRoute.value.meta.elements ?router.currentRoute.value.meta.elements :[]
|
|
||||||
|
const btnList = router.currentRoute.value.meta.elements
|
||||||
|
? router.currentRoute.value.meta.elements
|
||||||
|
: [];
|
||||||
btnList.sort((a, b) => {
|
btnList.sort((a, b) => {
|
||||||
return (a.sort || 0) - (b.sort || 0);
|
return (a.sort || 0) - (b.sort || 0);
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['btnEvent'])
|
const emit = defineEmits(['btnEvent']);
|
||||||
|
</script>
|
||||||
</script>
|
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,13 @@
|
||||||
:pageType="props.pageType"
|
:pageType="props.pageType"
|
||||||
:class="data.currentWfNode.type == 'bpmn:SequenceFlow' ? '' : 'hidden'"
|
:class="data.currentWfNode.type == 'bpmn:SequenceFlow' ? '' : 'hidden'"
|
||||||
/>
|
/>
|
||||||
|
<!-- 脚本节点 -->
|
||||||
|
<script-option
|
||||||
|
ref="scriptRef"
|
||||||
|
:element="data.currentWfNode"
|
||||||
|
:pageType="props.pageType"
|
||||||
|
:class="data.currentWfNode.type == 'bpmn:ScriptTask' ? '' : 'hidden'"
|
||||||
|
/>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane tab="流程属性" key="2">
|
<a-tab-pane tab="流程属性" key="2">
|
||||||
<shcemeinfo-config ref="shcemeinfoRef" :disabled="true" :pageType="props.pageType" />
|
<shcemeinfo-config ref="shcemeinfoRef" :disabled="true" :pageType="props.pageType" />
|
||||||
|
|
@ -97,6 +104,7 @@
|
||||||
inclusiveGatewayOption,
|
inclusiveGatewayOption,
|
||||||
subprocessOption,
|
subprocessOption,
|
||||||
mylineOption,
|
mylineOption,
|
||||||
|
scriptOption,
|
||||||
} from './page';
|
} from './page';
|
||||||
import { flowStore } from '@/store/modules/flow';
|
import { flowStore } from '@/store/modules/flow';
|
||||||
|
|
||||||
|
|
@ -329,7 +337,22 @@
|
||||||
to: element.businessObject.targetRef.id,
|
to: element.businessObject.targetRef.id,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case 'bpmn:ScriptTask':
|
||||||
|
data.wfNodeName = '脚本节点';
|
||||||
|
data.currentWfNode = {
|
||||||
|
id: element.id,
|
||||||
|
type: element.type,
|
||||||
|
isInit: true,
|
||||||
|
executeType: '1',
|
||||||
|
sqlDb: '',
|
||||||
|
sqlStr: '',
|
||||||
|
sqlStrRevoke: '',
|
||||||
|
apiUrl: '',
|
||||||
|
apiUrlRevoke: '',
|
||||||
|
ioc: '',
|
||||||
|
iocRevoke: '',
|
||||||
|
};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,3 +8,4 @@ export { default as exclusiveGatewayOption } from './exclusiveGateway/index.vue'
|
||||||
export { default as inclusiveGatewayOption } from './inclusiveGateway/index.vue';
|
export { default as inclusiveGatewayOption } from './inclusiveGateway/index.vue';
|
||||||
export { default as subprocessOption } from './subprocess/index.vue';
|
export { default as subprocessOption } from './subprocess/index.vue';
|
||||||
export { default as mylineOption } from './myline/index.vue';
|
export { default as mylineOption } from './myline/index.vue';
|
||||||
|
export { default as scriptOption } from './script/index.vue';
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,272 @@
|
||||||
|
<template>
|
||||||
|
<div class="start-event">
|
||||||
|
<a-form
|
||||||
|
ref="formRef"
|
||||||
|
:model="node"
|
||||||
|
labelAlign="left"
|
||||||
|
:label-col="labelCol"
|
||||||
|
:wrapper-col="wrapperCol"
|
||||||
|
:disabled="data.componentDisabled"
|
||||||
|
>
|
||||||
|
<a-form-item label="节点标识">
|
||||||
|
<a-input v-model:value="node.id" placeholder="请输入" readonly />
|
||||||
|
</a-form-item>
|
||||||
|
<a-divider plain="true">执行操作</a-divider>
|
||||||
|
<a-tabs v-model:activeKey="node.executeType" type="card" size="small" centered="true">
|
||||||
|
<a-tab-pane key="1" tab="执行SQL">
|
||||||
|
<a-space direction="vertical" size="middle" class="site-space-compact-wrapper">
|
||||||
|
<a-alert
|
||||||
|
message="sql参数说明"
|
||||||
|
description="参数有 @processId流程进程主键 @code上一步执行码 @userId流程发起人Id @userAccount流程发起人账号 @companyId流程发起人公司 @departmentId流程发起人部门;
|
||||||
|
@userId2上一步审核人Id @userAccount2上一步审核人账号 @companyId2上一步审核人公司 @departmentId2上一步审核人部门;
|
||||||
|
"
|
||||||
|
type="info"
|
||||||
|
show-icon
|
||||||
|
/>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-select
|
||||||
|
v-model:value="node.sqlDb"
|
||||||
|
placeholder="请选择执行SQL数据库"
|
||||||
|
:options="sqlOptions"
|
||||||
|
:field-names="{ label: 'text', value: 'id', options: 'childNodes' }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="node.sqlStr"
|
||||||
|
placeholder="请填写SQL语句"
|
||||||
|
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="node.sqlStrRevoke"
|
||||||
|
placeholder="请填写SQL语句(撤销)"
|
||||||
|
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
</a-space>
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="2" tab=".NET方法">
|
||||||
|
<a-space direction="vertical" size="middle" class="site-space-compact-wrapper">
|
||||||
|
<a-alert
|
||||||
|
message="IOC说明"
|
||||||
|
description="注意:编写一个继承IWorkFlowMethod的类
|
||||||
|
"
|
||||||
|
type="info"
|
||||||
|
show-icon
|
||||||
|
/>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="node.ioc"
|
||||||
|
placeholder="IOC名称"
|
||||||
|
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="node.iocRevoke"
|
||||||
|
placeholder="IOC名称(撤销)"
|
||||||
|
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
</a-space>
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="3" tab="第三方接口">
|
||||||
|
<a-space direction="vertical" size="middle" class="site-space-compact-wrapper">
|
||||||
|
<a-alert
|
||||||
|
message="接口参数说明"
|
||||||
|
description="注意:配置支持Post方法的接口,json数据格式。{
|
||||||
|
processId:'流程发起实例主键',userId:'流程发起人Id',userAccount:'流程发起人账号',companyId:'流程发起人公司',departmentId:'流程发起人部门',code:'上一步执行码',
|
||||||
|
userId2:'上一步审核人Id',userAccount2:'上一步审核人账号',companyId2:'上一步审核人公司',departmentId2:'上一步审核人部门'
|
||||||
|
}
|
||||||
|
"
|
||||||
|
type="info"
|
||||||
|
show-icon
|
||||||
|
/>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="node.apiUrl"
|
||||||
|
placeholder="接口地址"
|
||||||
|
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
<a-space-compact block>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="node.apiUrlRevoke"
|
||||||
|
placeholder="接口地址(撤销)"
|
||||||
|
:auto-size="{ minRows: 5, maxRows: 8 }"
|
||||||
|
/>
|
||||||
|
</a-space-compact>
|
||||||
|
</a-space>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { reactive, defineProps, ref, watch, onMounted } from 'vue';
|
||||||
|
import { flowStore } from '@/store/modules/flow';
|
||||||
|
import { getLoadDataBaseLinkTree } from '@/api/demo/system';
|
||||||
|
|
||||||
|
const flowWfDataStore = flowStore();
|
||||||
|
const labelCol = { span: 7 };
|
||||||
|
const wrapperCol = { span: 17 };
|
||||||
|
// 表单选择声明
|
||||||
|
const props = defineProps({
|
||||||
|
element: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
pageType: String,
|
||||||
|
});
|
||||||
|
console.log(props);
|
||||||
|
interface dataType {
|
||||||
|
columns: any;
|
||||||
|
formRelations: any;
|
||||||
|
elementData: any;
|
||||||
|
componentDisabled: boolean;
|
||||||
|
formOpen: boolean;
|
||||||
|
formVerisons: any;
|
||||||
|
formName: string;
|
||||||
|
}
|
||||||
|
const data: dataType = reactive({
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '名称',
|
||||||
|
dataIndex: 'label',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '字段',
|
||||||
|
dataIndex: 'field',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '必填',
|
||||||
|
dataIndex: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '编辑',
|
||||||
|
dataIndex: 'disabled',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '查看',
|
||||||
|
dataIndex: 'ifShow',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
formRelations: [],
|
||||||
|
elementData: props.element,
|
||||||
|
componentDisabled: props.pageType == 'detail' ? true : false,
|
||||||
|
formOpen: false,
|
||||||
|
formVerisons: [],
|
||||||
|
formName: '',
|
||||||
|
});
|
||||||
|
let node: any = ref({});
|
||||||
|
console.log(props);
|
||||||
|
watch(
|
||||||
|
() => props.element,
|
||||||
|
(newVal) => {
|
||||||
|
if (newVal.type == 'bpmn:ScriptTask') {
|
||||||
|
const currentNode = flowWfDataStore.getWfDataNode(newVal.id);
|
||||||
|
console.log(currentNode);
|
||||||
|
if (currentNode) {
|
||||||
|
node.value = currentNode;
|
||||||
|
} else {
|
||||||
|
node.value = newVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
const sqlOptions = ref([]);
|
||||||
|
async function getSQL() {
|
||||||
|
const data = await getLoadDataBaseLinkTree();
|
||||||
|
let res: any = [];
|
||||||
|
data.forEach((element) => {
|
||||||
|
if (element.childNodes == null) {
|
||||||
|
element.childNodes = [];
|
||||||
|
}
|
||||||
|
let point = {};
|
||||||
|
if (element.id == 'hcsystemdb') {
|
||||||
|
point = {
|
||||||
|
id: '1',
|
||||||
|
text: '常用数据库',
|
||||||
|
childNodes: [
|
||||||
|
{
|
||||||
|
id: element.id,
|
||||||
|
text: element.text,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
res.push(point);
|
||||||
|
} else {
|
||||||
|
res.push(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
sqlOptions.value = res;
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getSQL();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.site-space-compact-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.ant-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-tabs {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .ant-space {
|
||||||
|
width: 90%;
|
||||||
|
margin-left: 5%;
|
||||||
|
|
||||||
|
.ant-space-item {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.ant-btn-dangerous {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.l-rblock {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f0f2f5;
|
||||||
|
}
|
||||||
|
.l-page-pane {
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
max-width: 794px;
|
||||||
|
overflow: hidden auto;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: auto;
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
.addDataBaseTableBox {
|
||||||
|
border: 1px dashed #f0f0f0;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: -20px;
|
||||||
|
&:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.connectTableTitle {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
.formLine {
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -133,7 +133,7 @@ export const usePermissionStore = defineStore({
|
||||||
elements: (data.item && data.item.elements) || '',
|
elements: (data.item && data.item.elements) || '',
|
||||||
},
|
},
|
||||||
name: data.item.name,
|
name: data.item.name,
|
||||||
hideMenu: false,
|
hideMenu: data.item.status == 1 ? false : true,
|
||||||
path:
|
path:
|
||||||
data.item.url ||
|
data.item.url ||
|
||||||
'/formCallPage?id=' +
|
'/formCallPage?id=' +
|
||||||
|
|
@ -155,7 +155,7 @@ export const usePermissionStore = defineStore({
|
||||||
// 注册路由
|
// 注册路由
|
||||||
const registeredRoute = (data) => {
|
const registeredRoute = (data) => {
|
||||||
const modules = import.meta.glob('../../views/demo/**/**/index.vue');
|
const modules = import.meta.glob('../../views/demo/**/**/index.vue');
|
||||||
if (data.children.length == 0 && data.item.parentId == 0) {
|
if (data.children.length == 0 && data.item.parentId == 0 && data.item.status == 1) {
|
||||||
router.addRoute('Root', {
|
router.addRoute('Root', {
|
||||||
path: data.item.url,
|
path: data.item.url,
|
||||||
name: data.item.code,
|
name: data.item.code,
|
||||||
|
|
@ -180,6 +180,9 @@ export const usePermissionStore = defineStore({
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (data.item.status == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
router.addRoute('Root', {
|
router.addRoute('Root', {
|
||||||
path: data.item.url,
|
path: data.item.url,
|
||||||
name: data.item.code,
|
name: data.item.code,
|
||||||
|
|
@ -196,7 +199,7 @@ export const usePermissionStore = defineStore({
|
||||||
});
|
});
|
||||||
if (data.children && data.children.length > 0) {
|
if (data.children && data.children.length > 0) {
|
||||||
data.children.forEach((element) => {
|
data.children.forEach((element) => {
|
||||||
if (element.item.code) {
|
if (element.item.code && element.item.status == 1) {
|
||||||
router.addRoute(element.item.code, {
|
router.addRoute(element.item.code, {
|
||||||
path: element.item.url,
|
path: element.item.url,
|
||||||
name: element.item.url.replaceAll('/', ''),
|
name: element.item.url.replaceAll('/', ''),
|
||||||
|
|
@ -227,6 +230,7 @@ export const usePermissionStore = defineStore({
|
||||||
|
|
||||||
await Promise.all(moduleRoutes);
|
await Promise.all(moduleRoutes);
|
||||||
// 设置菜单列表
|
// 设置菜单列表
|
||||||
|
console.log(moduleRoutes);
|
||||||
_this.setFrontMenuList(moduleRoutes);
|
_this.setFrontMenuList(moduleRoutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,12 +38,16 @@
|
||||||
isUpdate.value = !!data?.isUpdate;
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
|
||||||
if (unref(isUpdate)) {
|
if (unref(isUpdate)) {
|
||||||
|
const { record } = data;
|
||||||
|
if (record.type == '2') {
|
||||||
|
record.status = record.status ? 1 : 0;
|
||||||
|
}
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
...data.record,
|
...record,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const treeData = await getMenuList();
|
const treeData = await getMenuList();
|
||||||
treeData.unshift ({
|
treeData.unshift({
|
||||||
id: '0',
|
id: '0',
|
||||||
key: '0',
|
key: '0',
|
||||||
name: '根节点',
|
name: '根节点',
|
||||||
|
|
@ -90,6 +94,7 @@
|
||||||
} else {
|
} else {
|
||||||
// 新增按钮
|
// 新增按钮
|
||||||
delete values.type;
|
delete values.type;
|
||||||
|
values.status = values.status == 1 ? true : false;
|
||||||
if (!unref(isUpdate)) {
|
if (!unref(isUpdate)) {
|
||||||
const data = await addButton(values);
|
const data = await addButton(values);
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
import { columns, searchFormSchema } from './menu.data';
|
import { columns, searchFormSchema } from './menu.data';
|
||||||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
|
||||||
const { createConfirm, createMessage } = useMessage();
|
const { createConfirm, createMessage } = useMessage();
|
||||||
defineOptions({ name: 'MenuManagement' });
|
defineOptions({ name: 'MenuManagement' });
|
||||||
const searchInfo = reactive<Recordable>({});
|
const searchInfo = reactive<Recordable>({});
|
||||||
|
|
@ -107,9 +108,9 @@
|
||||||
const data = await deleteButton(query);
|
const data = await deleteButton(query);
|
||||||
if (data) {
|
if (data) {
|
||||||
reload();
|
reload();
|
||||||
return createMessage.success('成功');
|
createMessage.success('成功');
|
||||||
} else {
|
} else {
|
||||||
return createMessage.error('失败');
|
createMessage.error('失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,20 @@ export const columns: BasicColumn[] = [
|
||||||
title: '排序',
|
title: '排序',
|
||||||
dataIndex: 'sort',
|
dataIndex: 'sort',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '样式',
|
||||||
|
dataIndex: 'class',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'enabledMark',
|
||||||
|
width: 80,
|
||||||
|
customRender: ({ record }) => {
|
||||||
|
const color = record.status == 1 ? 'blue' : 'red';
|
||||||
|
const text = record.status == 1 ? '启用' : '停用';
|
||||||
|
return h(Tag, { color: color }, () => text);
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const isDir = (type: string) => type === '0';
|
const isDir = (type: string) => type === '0';
|
||||||
|
|
@ -51,7 +64,7 @@ export const formSchema: FormSchema[] = [
|
||||||
field: 'id',
|
field: 'id',
|
||||||
label: '名称',
|
label: '名称',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
ifShow:false
|
ifShow: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'name',
|
||||||
|
|
@ -143,16 +156,15 @@ export const formSchema: FormSchema[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
label: '是否系统',
|
label: '是否启用',
|
||||||
component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
defaultValue: 1,
|
defaultValue: 1,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: [
|
options: [
|
||||||
{ label: '是', value: 0 },
|
{ label: '否', value: 0 },
|
||||||
{ label: '否', value: 1 },
|
{ label: '是', value: 1 },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ifShow: ({ values }) => !isButton(values.type),
|
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// field: 'isExt',
|
// field: 'isExt',
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,8 @@
|
||||||
designerData.task = data.task;
|
designerData.task = data.task;
|
||||||
let content = JSON.parse(data.scheme.content);
|
let content = JSON.parse(data.scheme.content);
|
||||||
let wfData = content.wfData;
|
let wfData = content.wfData;
|
||||||
|
flowWfDataStore.setWfDataAll(wfData);
|
||||||
|
|
||||||
const currentNode = wfData.find((t) => t.type == 'bpmn:StartEvent');
|
const currentNode = wfData.find((t) => t.type == 'bpmn:StartEvent');
|
||||||
if (currentNode.authFields.length > 0) {
|
if (currentNode.authFields.length > 0) {
|
||||||
formVisble.value = true;
|
formVisble.value = true;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
>关闭
|
>关闭
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<process-designer
|
<process-designer-page
|
||||||
:key="designerOpen"
|
:key="designerOpen"
|
||||||
style="border: 1px solid rgba(0, 0, 0, 0.1)"
|
style="border: 1px solid rgba(0, 0, 0, 0.1)"
|
||||||
ref="modelDesigner"
|
ref="modelDesigner"
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
// scheme_preview?code=tset0411
|
// scheme_preview?code=tset0411
|
||||||
import { h, ref, reactive } from 'vue';
|
import { h, ref, reactive } from 'vue';
|
||||||
import { ProcessDesigner } from '@/components/ProcessDesigner/page';
|
import { ProcessDesignerPage } from '@/components/ProcessDesigner/page';
|
||||||
import { SaveOutlined, CloseCircleOutlined } from '@ant-design/icons-vue';
|
import { SaveOutlined, CloseCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { postAdd, update } from '@/api/sys/WFSchemeInfo';
|
import { postAdd, update } from '@/api/sys/WFSchemeInfo';
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue