diff --git a/.env.development b/.env.development index 1edba8c..3becbe6 100644 --- a/.env.development +++ b/.env.development @@ -5,8 +5,8 @@ VUE_APP_TITLE = 金鸡湖现代服务业品牌管理系统 ENV = 'development' # 金鸡湖现代服务业品牌管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.0.110:9040' -# VUE_APP_BASE_API = 'http://39.101.188.84:9040' +# VUE_APP_BASE_API = 'http://192.168.0.108:9040' +VUE_APP_BASE_API = 'http://39.101.188.84:9040' # VUE_APP_BASE_API = 'https://idp.sipac.gov.cn/api' # 路由懒加载 diff --git a/.env.production b/.env.production index b1a6f2b..928897b 100644 --- a/.env.production +++ b/.env.production @@ -6,7 +6,7 @@ ENV = 'production' # 金鸡湖现代服务业品牌管理系统/生产环境 # VUE_APP_BASE_API = '/prod-api' -VUE_APP_BASE_API = 'http://39.101.188.84:9040' +# VUE_APP_BASE_API = 'http://39.101.188.84:9040' # VUE_APP_BASE_API = 'http://192.114.0.197/api' -# VUE_APP_BASE_API = 'https://idp.sipac.gov.cn/api' +VUE_APP_BASE_API = 'https://idp.sipac.gov.cn/api' diff --git a/package.json b/package.json index 0f74c49..8641d9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ruoyi", - "version": "1.0.202407230921", + "version": "1.0.202407290914", "description": "金鸡湖现代服务业品牌管理系统", "author": "若依", "license": "MIT", @@ -37,6 +37,8 @@ }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", + "@wangeditor/editor": "^5.1.23", + "@wangeditor/editor-for-vue": "^1.0.2", "autofit.js": "^3.1.0", "axios": "0.24.0", "clipboard": "2.0.8", @@ -45,12 +47,13 @@ "element-ui": "2.15.14", "file-saver": "2.0.5", "fuse.js": "6.4.3", - "highlight.js": "9.18.5", + "highlight.js": "10.5.0", "html2canvas": "^1.4.1", "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "jspdf": "^2.5.1", + "lodash": "^4.17.21", "nprogress": "0.2.0", "quill": "1.3.7", "screenfull": "5.0.2", @@ -62,7 +65,9 @@ "vue-router": "3.4.9", "vuedraggable": "2.24.3", "vuex": "3.6.0", - "xlsx": "^0.18.5" + "xlsx": "^0.18.5", + "xml-js": "1.6.11", + "bpmn-js-token-simulation": "0.10.0" }, "devDependencies": { "@vue/cli-plugin-babel": "4.4.6", @@ -70,6 +75,8 @@ "@vue/cli-service": "4.4.6", "babel-eslint": "10.1.0", "babel-plugin-dynamic-import-node": "2.3.3", + "bpmn-js": "7.5.0", + "bpmn-js-properties-panel": "0.37.2", "chalk": "4.1.0", "compression-webpack-plugin": "5.0.2", "connect": "3.6.6", diff --git a/public/static/企业库数据模板.xlsx b/public/static/企业库数据模板.xlsx new file mode 100644 index 0000000..3aa6219 Binary files /dev/null and b/public/static/企业库数据模板.xlsx differ diff --git a/src/App.vue b/src/App.vue index b1a9742..ad6f99e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,15 +1,17 @@ - - - + + + + + + + diff --git a/src/components/ProcessViewer/index.vue b/src/components/ProcessViewer/index.vue new file mode 100644 index 0000000..3bc6594 --- /dev/null +++ b/src/components/ProcessViewer/index.vue @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{scope.row.commentList&&scope.row.commentList[0]?scope.row.commentList[0].fullMessage:''}} + + + + + + + + + + {{ Math.floor(this.defaultZoom * 10 * 10) + "%" }} + + + + + + + + + + + + diff --git a/src/components/scaleBox/index.vue b/src/components/scaleBox/index.vue new file mode 100644 index 0000000..01573a2 --- /dev/null +++ b/src/components/scaleBox/index.vue @@ -0,0 +1,63 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index ace9f6f..0d0e678 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -1,5 +1,5 @@ - + @@ -19,10 +19,13 @@ export default { $route: { handler(route) { // console.log(route,"route"); - if(route.path == "/workbench") { - this.breadcrumb = false; - } else { + if((route.path == "/workbench" && this.userType == "01") || route.path == "/dataCloudMap") { this.breadcrumb = true; + } else if(route.path == "/workbench" && this.userType == "02") { + this.breadcrumbTwo = true; + } else { + this.breadcrumb = false; + this.breadcrumbTwo = false; } }, immediate:true @@ -31,6 +34,9 @@ export default { data() { return { breadcrumb: false, + breadcrumbTwo: false, + // 判断登陆用户是何身份⌈ 01 : 企业 02 : 政务 ⌋ + userType: this.$store.state.user.userType, }; }, computed: { @@ -54,10 +60,27 @@ export default { padding: 10px; background: #f6f7f9; overflow: hidden; + // margin-top: 60px; } .app-main-breadcrumb { - height: calc(100% - 1px); - padding: 0 0 10px 0; + // height: calc(100% - 1px); + height: calc(100% - 65px); + // padding: 0 0 10px 0; + width: 100%; + position: relative; + background: #f6f7f9; + padding: 0; + // margin-top: 60px; +} + +.app-main-breadcrumbTwo { + padding: 0 0 20px; + width: 100%; + // height: 100%; + position: relative; + background: #f6f7f9; + overflow-y: scroll; + // margin-top: 60px; } .fixed-header + .app-main { diff --git a/src/layout/components/FixedHeader/components/MenuMain/index.vue b/src/layout/components/FixedHeader/components/MenuMain/index.vue index 424ac1d..5dfcb2a 100644 --- a/src/layout/components/FixedHeader/components/MenuMain/index.vue +++ b/src/layout/components/FixedHeader/components/MenuMain/index.vue @@ -7,7 +7,7 @@ > {{ item.meta.title }} @@ -33,6 +33,8 @@ export default { data() { return { topMenus: [], + // 判断登陆用户是何身份⌈ 01 : 企业 02 : 政务 ⌋ + userType: this.$store.state.user.userType, }; }, @@ -53,6 +55,9 @@ export default { } } }); + if(this.userType == "01") { + this.topMenus[0].meta.title = "首页" + } this.addParentId(this.topMenus, null); this.$store.commit("SET_FIRST_ROUTER", this.topMenus[0].fullPath); }, @@ -75,6 +80,9 @@ export default { //是否当前路由 isCurrentRoute(key) { + if((this.$route.path == '/user/projectInfo' || this.$route.path == '/user/enterpriselibraryInfo') && this.userType == '01' && key.indexOf("/enterpriseService") > -1) { + return true; + } return this.$route.path.indexOf(key) > -1; }, diff --git a/src/layout/components/FixedHeader/index.vue b/src/layout/components/FixedHeader/index.vue index 055bed5..9af9b97 100644 --- a/src/layout/components/FixedHeader/index.vue +++ b/src/layout/components/FixedHeader/index.vue @@ -60,7 +60,7 @@ export default { $route: { handler(route) { // console.log(route,"route"); - if(route.path == "/workbench") { + if(route.path == "/workbench" || route.path == "/dataCloudMap") { this.breadcrumbShow = false; } else { this.breadcrumbShow = true; diff --git a/src/main.js b/src/main.js index 329caac..40fb7d7 100644 --- a/src/main.js +++ b/src/main.js @@ -81,7 +81,22 @@ if (!localVersion || version !== localVersion) { localStorage.clear() // 清除缓存 localStorage.setItem('projectVersion', version) } +// var docEl = document.documentElement; +// function setRemUnit () { +// var rem = docEl.clientWidth / 19.2; // 可根据不同电脑分辨率进行手动修改(如1920*1080 为19.2 +// docEl.style.fontSize = rem + 'px' +// console.log(docEl); +// console.log(rem + 'px'); +// } +// setRemUnit() + +// window.addEventListener('resize', setRemUnit) +// window.addEventListener('pageshow', function (e) { +// if (e.persisted) { +// setRemUnit() +// } +// }) /** * If you don't want to use mock-server * you want to use MockJs for mock api diff --git a/src/permission.js b/src/permission.js index 9f524e6..877aeb7 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,9 +8,10 @@ import { isRelogin } from "@/utils/request"; NProgress.configure({ showSpinner: false }); -const whiteList = ["/login", "/register"]; +const whiteList = ["/login", "/entLogin", "/register"]; router.beforeEach((to, from, next) => { + console.log(window.location.href); NProgress.start(); if (window.location.href.includes("clienttoken=")) { var reg = new RegExp(/[?&]clienttoken=([^]+)/); @@ -22,7 +23,7 @@ router.beforeEach((to, from, next) => { store.dispatch("SingleSignOnGetInfo",{clientToken:clienttoken}).then(res => { isRelogin.show = false; let url = window.location.href; - var modifiedUrl = url.replace(/(\?appid&clienttoken=)[^]+/, ''); + var modifiedUrl = url.replace(/(\&clienttoken=)[^]+/, ''); // console.log(modifiedUrl,'modifiedUrl'); window.location.href = modifiedUrl; // store.dispatch("GenerateRoutes").then((accessRoutes) => { @@ -47,14 +48,29 @@ router.beforeEach((to, from, next) => { store.dispatch("LogOut").then(() => { Message.error(err); next({ path: "/" }); + }); }); } }).catch((err) => { + // if(err.msg == "") { + + // } else { + + // } store.dispatch("LogOut").then(() => { - Message.error(err); - location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login" + // Message.error(err); + // let url = window.location.href; + // var modifiedUrl = url.replace(/(\?appid&clienttoken=)[^]+/, ''); + // // console.log(modifiedUrl,'modifiedUrl'); + // window.location.href = modifiedUrl; + window.location.href = "https://qytt.sipac.gov.cn/ecobrainportal/index.html"; + next({ path: "/" }); }); + // store.dispatch("LogOut").then(() => { + // Message.error(err); + // location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login" + // }); }); } else { next(); @@ -111,18 +127,16 @@ router.beforeEach((to, from, next) => { // }); }); } - } - // else if(window.location.href.includes("clienttoken=")){ - - // } - else if (getToken()) { + } else if (getToken()) { to.meta.title && store.dispatch("settings/setTitle", to.meta.title); /* has token*/ - if (to.path === "/login") { + if (to.path === "/entLogin") { next({ path: "/" }); NProgress.done(); } else if (whiteList.indexOf(to.path) !== -1) { - next(); + next({ path: "/" }); + NProgress.done(); + // next(); } else { if (store.getters.roles.length === 0) { isRelogin.show = true; @@ -153,7 +167,7 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next(); } else { - next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页 + next(`/entLogin?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页 NProgress.done(); } // store.dispatch("LogOut").then(() => { diff --git a/src/plugins/package/designer/ProcessDesigner.vue b/src/plugins/package/designer/ProcessDesigner.vue new file mode 100644 index 0000000..31309bd --- /dev/null +++ b/src/plugins/package/designer/ProcessDesigner.vue @@ -0,0 +1,465 @@ + + + + + + + 保存流程 + 打开文件 + + + 下载为XML文件 + + 下载为SVG文件 + + 下载为BPMN文件 + + 下载文件 + + + + 预览XML + + 预览JSON + + 预览 + + + + 模拟 + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ Math.floor(this.defaultZoom * 10 * 10) + "%" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/package/designer/index.js b/src/plugins/package/designer/index.js new file mode 100644 index 0000000..0566ee9 --- /dev/null +++ b/src/plugins/package/designer/index.js @@ -0,0 +1,7 @@ +import BpmnProcessDesigner from "./ProcessDesigner.vue"; + +BpmnProcessDesigner.install = function(Vue) { + Vue.component(BpmnProcessDesigner.name, BpmnProcessDesigner); +}; + +export default BpmnProcessDesigner; diff --git a/src/plugins/package/designer/plugins/content-pad/contentPadProvider.js b/src/plugins/package/designer/plugins/content-pad/contentPadProvider.js new file mode 100644 index 0000000..447a99b --- /dev/null +++ b/src/plugins/package/designer/plugins/content-pad/contentPadProvider.js @@ -0,0 +1,390 @@ +import { assign, forEach, isArray } from "min-dash"; + +import { is } from "bpmn-js/lib/util/ModelUtil"; + +import { isExpanded, isEventSubProcess } from "bpmn-js/lib/util/DiUtil"; + +import { isAny } from "bpmn-js/lib/features/modeling/util/ModelingUtil"; + +import { getChildLanes } from "bpmn-js/lib/features/modeling/util/LaneUtil"; + +import { hasPrimaryModifier } from "diagram-js/lib/util/Mouse"; + +/** + * A provider for BPMN 2.0 elements context pad + */ +export default function ContextPadProvider( + config, + injector, + eventBus, + contextPad, + modeling, + elementFactory, + connect, + create, + popupMenu, + canvas, + rules, + translate, + elementRegistry +) { + config = config || {}; + + contextPad.registerProvider(this); + + this._contextPad = contextPad; + + this._modeling = modeling; + + this._elementFactory = elementFactory; + this._connect = connect; + this._create = create; + this._popupMenu = popupMenu; + this._canvas = canvas; + this._rules = rules; + this._translate = translate; + + if (config.autoPlace !== false) { + this._autoPlace = injector.get("autoPlace", false); + } + + eventBus.on("create.end", 250, function(event) { + var context = event.context, + shape = context.shape; + + if (!hasPrimaryModifier(event) || !contextPad.isOpen(shape)) { + return; + } + + var entries = contextPad.getEntries(shape); + + if (entries.replace) { + entries.replace.action.click(event, shape); + } + }); +} + +ContextPadProvider.$inject = [ + "config.contextPad", + "injector", + "eventBus", + "contextPad", + "modeling", + "elementFactory", + "connect", + "create", + "popupMenu", + "canvas", + "rules", + "translate", + "elementRegistry" +]; + +ContextPadProvider.prototype.getContextPadEntries = function(element) { + var contextPad = this._contextPad, + modeling = this._modeling, + elementFactory = this._elementFactory, + connect = this._connect, + create = this._create, + popupMenu = this._popupMenu, + canvas = this._canvas, + rules = this._rules, + autoPlace = this._autoPlace, + translate = this._translate; + + var actions = {}; + + if (element.type === "label") { + return actions; + } + + var businessObject = element.businessObject; + + function startConnect(event, element) { + connect.start(event, element); + } + + function removeElement() { + modeling.removeElements([element]); + } + + function getReplaceMenuPosition(element) { + var Y_OFFSET = 5; + + var diagramContainer = canvas.getContainer(), + pad = contextPad.getPad(element).html; + + var diagramRect = diagramContainer.getBoundingClientRect(), + padRect = pad.getBoundingClientRect(); + + var top = padRect.top - diagramRect.top; + var left = padRect.left - diagramRect.left; + + var pos = { + x: left, + y: top + padRect.height + Y_OFFSET + }; + + return pos; + } + + /** + * Create an append action + * + * @param {string} type + * @param {string} className + * @param {string} [title] + * @param {Object} [options] + * + * @return {Object} descriptor + */ + function appendAction(type, className, title, options) { + if (typeof title !== "string") { + options = title; + title = translate("Append {type}", { type: type.replace(/^bpmn:/, "") }); + } + + function appendStart(event, element) { + var shape = elementFactory.createShape(assign({ type: type }, options)); + create.start(event, shape, { + source: element + }); + } + + var append = autoPlace + ? function(event, element) { + var shape = elementFactory.createShape(assign({ type: type }, options)); + + autoPlace.append(element, shape); + } + : appendStart; + + return { + group: "model", + className: className, + title: title, + action: { + dragstart: appendStart, + click: append + } + }; + } + + function splitLaneHandler(count) { + return function(event, element) { + // actual split + modeling.splitLane(element, count); + + // refresh context pad after split to + // get rid of split icons + contextPad.open(element, true); + }; + } + + if (isAny(businessObject, ["bpmn:Lane", "bpmn:Participant"]) && isExpanded(businessObject)) { + var childLanes = getChildLanes(element); + + assign(actions, { + "lane-insert-above": { + group: "lane-insert-above", + className: "bpmn-icon-lane-insert-above", + title: translate("Add Lane above"), + action: { + click: function(event, element) { + modeling.addLane(element, "top"); + } + } + } + }); + + if (childLanes.length < 2) { + if (element.height >= 120) { + assign(actions, { + "lane-divide-two": { + group: "lane-divide", + className: "bpmn-icon-lane-divide-two", + title: translate("Divide into two Lanes"), + action: { + click: splitLaneHandler(2) + } + } + }); + } + + if (element.height >= 180) { + assign(actions, { + "lane-divide-three": { + group: "lane-divide", + className: "bpmn-icon-lane-divide-three", + title: translate("Divide into three Lanes"), + action: { + click: splitLaneHandler(3) + } + } + }); + } + } + + assign(actions, { + "lane-insert-below": { + group: "lane-insert-below", + className: "bpmn-icon-lane-insert-below", + title: translate("Add Lane below"), + action: { + click: function(event, element) { + modeling.addLane(element, "bottom"); + } + } + } + }); + } + + if (is(businessObject, "bpmn:FlowNode")) { + if (is(businessObject, "bpmn:EventBasedGateway")) { + assign(actions, { + "append.receive-task": appendAction("bpmn:ReceiveTask", "bpmn-icon-receive-task", translate("Append ReceiveTask")), + "append.message-intermediate-event": appendAction( + "bpmn:IntermediateCatchEvent", + "bpmn-icon-intermediate-event-catch-message", + translate("Append MessageIntermediateCatchEvent"), + { eventDefinitionType: "bpmn:MessageEventDefinition" } + ), + "append.timer-intermediate-event": appendAction( + "bpmn:IntermediateCatchEvent", + "bpmn-icon-intermediate-event-catch-timer", + translate("Append TimerIntermediateCatchEvent"), + { eventDefinitionType: "bpmn:TimerEventDefinition" } + ), + "append.condition-intermediate-event": appendAction( + "bpmn:IntermediateCatchEvent", + "bpmn-icon-intermediate-event-catch-condition", + translate("Append ConditionIntermediateCatchEvent"), + { eventDefinitionType: "bpmn:ConditionalEventDefinition" } + ), + "append.signal-intermediate-event": appendAction( + "bpmn:IntermediateCatchEvent", + "bpmn-icon-intermediate-event-catch-signal", + translate("Append SignalIntermediateCatchEvent"), + { eventDefinitionType: "bpmn:SignalEventDefinition" } + ) + }); + } else if (isEventType(businessObject, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition")) { + assign(actions, { + "append.compensation-activity": appendAction("bpmn:Task", "bpmn-icon-task", translate("Append compensation activity"), { + isForCompensation: true + }) + }); + } else if ( + !is(businessObject, "bpmn:EndEvent") && + !businessObject.isForCompensation && + !isEventType(businessObject, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && + !isEventSubProcess(businessObject) + ) { + assign(actions, { + "append.end-event": appendAction("bpmn:EndEvent", "bpmn-icon-end-event-none", translate("Append EndEvent")), + "append.gateway": appendAction("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", translate("Append Gateway")), + "append.append-task": appendAction("bpmn:UserTask", "bpmn-icon-user-task", translate("Append Task")), + "append.intermediate-event": appendAction( + "bpmn:IntermediateThrowEvent", + "bpmn-icon-intermediate-event-none", + translate("Append Intermediate/Boundary Event") + ) + }); + } + } + + if (!popupMenu.isEmpty(element, "bpmn-replace")) { + // Replace menu entry + assign(actions, { + replace: { + group: "edit", + className: "bpmn-icon-screw-wrench", + title: translate("Change type"), + action: { + click: function(event, element) { + var position = assign(getReplaceMenuPosition(element), { + cursor: { x: event.x, y: event.y } + }); + + popupMenu.open(element, "bpmn-replace", position); + } + } + } + }); + } + + if (isAny(businessObject, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"])) { + assign(actions, { + "append.text-annotation": appendAction("bpmn:TextAnnotation", "bpmn-icon-text-annotation"), + + connect: { + group: "connect", + className: "bpmn-icon-connection-multi", + title: translate("Connect using " + (businessObject.isForCompensation ? "" : "Sequence/MessageFlow or ") + "Association"), + action: { + click: startConnect, + dragstart: startConnect + } + } + }); + } + + if (isAny(businessObject, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"])) { + assign(actions, { + connect: { + group: "connect", + className: "bpmn-icon-connection-multi", + title: translate("Connect using DataInputAssociation"), + action: { + click: startConnect, + dragstart: startConnect + } + } + }); + } + + if (is(businessObject, "bpmn:Group")) { + assign(actions, { + "append.text-annotation": appendAction("bpmn:TextAnnotation", "bpmn-icon-text-annotation") + }); + } + + // delete element entry, only show if allowed by rules + var deleteAllowed = rules.allowed("elements.delete", { elements: [element] }); + + if (isArray(deleteAllowed)) { + // was the element returned as a deletion candidate? + deleteAllowed = deleteAllowed[0] === element; + } + + if (deleteAllowed) { + assign(actions, { + delete: { + group: "edit", + className: "bpmn-icon-trash", + title: translate("Remove"), + action: { + click: removeElement + } + } + }); + } + + return actions; +}; + +// helpers ///////// + +function isEventType(eventBo, type, definition) { + var isType = eventBo.$instanceOf(type); + var isDefinition = false; + + var definitions = eventBo.eventDefinitions || []; + forEach(definitions, function(def) { + if (def.$type === definition) { + isDefinition = true; + } + }); + + return isType && isDefinition; +} diff --git a/src/plugins/package/designer/plugins/content-pad/index.js b/src/plugins/package/designer/plugins/content-pad/index.js new file mode 100644 index 0000000..a9cf887 --- /dev/null +++ b/src/plugins/package/designer/plugins/content-pad/index.js @@ -0,0 +1,6 @@ +import CustomContextPadProvider from "./contentPadProvider"; + +export default { + __init__: ["contextPadProvider"], + contextPadProvider: ["type", CustomContextPadProvider] +}; diff --git a/src/plugins/package/designer/plugins/defaultEmpty.js b/src/plugins/package/designer/plugins/defaultEmpty.js new file mode 100644 index 0000000..9ec1df1 --- /dev/null +++ b/src/plugins/package/designer/plugins/defaultEmpty.js @@ -0,0 +1,27 @@ +export default (key, name, type) => { + if (!type) type = "camunda"; + const TYPE_TARGET = { + activiti: "http://activiti.org/bpmn", + camunda: "http://bpmn.io/schema/bpmn", + flowable: "http://flowable.org/bpmn" + }; + return ` + + + + + + + + + + `; +}; diff --git a/src/plugins/package/designer/plugins/descriptor/activitiDescriptor.json b/src/plugins/package/designer/plugins/descriptor/activitiDescriptor.json new file mode 100644 index 0000000..b765d3d --- /dev/null +++ b/src/plugins/package/designer/plugins/descriptor/activitiDescriptor.json @@ -0,0 +1,1283 @@ +{ + "name": "Activiti", + "uri": "http://activiti.org/bpmn", + "prefix": "activiti", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "Definitions", + "isAbstract": true, + "extends": [ + "bpmn:Definitions" + ], + "properties": [ + { + "name": "diagramRelationId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "InOutBinding", + "superClass": [ + "Element" + ], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": [ + "InOutBinding" + ], + "meta": { + "allowedIn": [ + "bpmn:CallActivity" + ] + } + }, + { + "name": "Out", + "superClass": [ + "InOutBinding" + ], + "meta": { + "allowedIn": [ + "bpmn:CallActivity" + ] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": [ + "bpmn:Activity", + "bpmn:Gateway", + "bpmn:Event" + ], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": [ + "bpmn:Process", + "activiti:AsyncCapable" + ], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:SignalEventDefinition" + ], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:ErrorEventDefinition" + ], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": [ + "bpmn:Error" + ], + "properties": [ + { + "name": "activiti:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": [ + "Element" + ], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": [ + "bpmn:Process", + "bpmn:FlowElement" + ], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": [ "bpmn:StartEvent" ], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": [ + "bpmn:ScriptTask" + ], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": [ + "bpmn:Process" + ], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "processCategory", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + }, + { + "name":"executionListener", + "isAbstract": true, + "type":"Expression" + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:EscalationEventDefinition" + ], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": [ + "bpmn:FormalExpression" + ], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "multiinstance_type", + "superClass":[ + "Element" + ] + }, + { + "name": "multiinstance_condition", + "superClass":[ + "Element" + ] + }, + { + "name": "Assignable", + "extends": [ "bpmn:UserTask" ], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + }, + { + "name": "multiinstance_condition", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": [ "bpmn:CallActivity" ], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": [ + "bpmn:BusinessRuleTask" + ], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": [ + "activiti:ServiceTaskLike" + ], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": [ + "bpmn:Process", + "activiti:ExternalCapable" + ], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ "*" ] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": [ + "Element" + ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ + "activiti:ServiceTaskLike" + ] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ + "bpmn:FlowNode", + "activiti:Connector" + ] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": [ + "InputOutputParameterDefinition" + ], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "activiti:ServiceTaskLike", + "activiti:ExecutionListener", + "activiti:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": [ "InputOutputParameter" ] + }, + { + "name": "OutputParameter", + "superClass": [ "InputOutputParameter" ] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ], + "superClass": [ "activiti:AsyncCapable" ], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "activiti:AsyncCapable", + "bpmn:MultiInstanceLoopCharacteristics" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": [ "Element" ], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": [ "Element" ], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ExtensionElements", + "properties": [ + { + "name": "operationList", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "OperationList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "operationList", + "type": "FormOperation", + "isMany": true + } + ] + }, + { + "name": "FormOperation", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "showOrder", + "type": "String", + "isAttr": true + }, + { + "name": "multiSignAssignee", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "VariableList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "variableList", + "type": "FormVariable", + "isMany": true + } + ] + }, + { + "name": "FormVariable", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "DeptPostList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "deptPostList", + "type": "DeptPost", + "isMany": true + } + ] + }, + { + "name": "DeptPost", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "postId", + "type": "String", + "isAttr": true + }, + { + "name": "deptPostId", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "UserCandidateGroups", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "CustomCondition", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:SequenceFlow" + ] + }, + "properties": [ + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "operationType", + "type": "String", + "isAttr": true + }, + { + "name": "parallelRefuse", + "type": "Boolean", + "isAttr": true, + "default": false + } + ] + }, + { + "name": "AssigneeList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "assigneeList", + "type": "Assignee", + "isMany": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Assignee", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:ConditionalEventDefinition" + ], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [ ] +} diff --git a/src/plugins/package/designer/plugins/descriptor/camundaDescriptor.json b/src/plugins/package/designer/plugins/descriptor/camundaDescriptor.json new file mode 100644 index 0000000..a738cfd --- /dev/null +++ b/src/plugins/package/designer/plugins/descriptor/camundaDescriptor.json @@ -0,0 +1,1092 @@ +{ + "name": "Camunda", + "uri": "http://camunda.org/schema/1.0/bpmn", + "prefix": "camunda", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "Definitions", + "isAbstract": true, + "extends": [ + "bpmn:Definitions" + ], + "properties": [ + { + "name": "diagramRelationId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "InOutBinding", + "superClass": [ + "Element" + ], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": [ + "InOutBinding" + ], + "meta": { + "allowedIn": [ + "bpmn:CallActivity", + "bpmn:SignalEventDefinition" + ] + } + }, + { + "name": "Out", + "superClass": [ + "InOutBinding" + ], + "meta": { + "allowedIn": [ + "bpmn:CallActivity" + ] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": [ + "bpmn:Activity", + "bpmn:Gateway", + "bpmn:Event" + ], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": [ + "bpmn:Process", + "camunda:AsyncCapable" + ], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:SignalEventDefinition" + ], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:ErrorEventDefinition" + ], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": [ + "bpmn:Error" + ], + "properties": [ + { + "name": "camunda:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": [ + "Element" + ], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": [ + "bpmn:Process", + "bpmn:FlowElement" + ], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + }, + { + "name": "modelerTemplateVersion", + "isAttr": true, + "type": "Integer" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": [ "bpmn:StartEvent" ], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": [ + "bpmn:ScriptTask" + ], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": [ + "bpmn:Process" + ], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "processCategory", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:EscalationEventDefinition" + ], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": [ + "bpmn:FormalExpression" + ], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": [ "bpmn:UserTask" ], + "properties": [ + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": [ "bpmn:CallActivity" ], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": [ + "bpmn:BusinessRuleTask" + ], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": [ + "camunda:ServiceTaskLike" + ], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": [ + "bpmn:Process", + "camunda:ExternalCapable" + ], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ "*" ] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": [ + "Element" + ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ + "camunda:ServiceTaskLike" + ] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ + "bpmn:FlowNode", + "camunda:Connector" + ] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": [ + "InputOutputParameterDefinition" + ], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "camunda:ServiceTaskLike", + "camunda:ExecutionListener", + "camunda:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": [ "InputOutputParameter" ] + }, + { + "name": "OutputParameter", + "superClass": [ "InputOutputParameter" ] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ], + "superClass": [ "camunda:AsyncCapable" ], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "camunda:AsyncCapable", + "bpmn:MultiInstanceLoopCharacteristics" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + }, + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "eventDefinitions", + "type": "bpmn:TimerEventDefinition", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormData", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "fields", + "type": "FormField", + "isMany": true + }, + { + "name": "businessKey", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "FormField", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": [ "Element" ], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": [ "Element" ], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:ConditionalEventDefinition" + ], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvents", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [ ] +} diff --git a/src/plugins/package/designer/plugins/descriptor/flowableDescriptor.json b/src/plugins/package/designer/plugins/descriptor/flowableDescriptor.json new file mode 100644 index 0000000..2db0b31 --- /dev/null +++ b/src/plugins/package/designer/plugins/descriptor/flowableDescriptor.json @@ -0,0 +1,1295 @@ +{ + "name": "Flowable", + "uri": "http://flowable.org/bpmn", + "prefix": "flowable", + "xml": { + "tagAlias": "lowerCase" + }, + "associations": [], + "types": [ + { + "name": "InOutBinding", + "superClass": [ + "Element" + ], + "isAbstract": true, + "properties": [ + { + "name": "source", + "isAttr": true, + "type": "String" + }, + { + "name": "sourceExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "target", + "isAttr": true, + "type": "String" + }, + { + "name": "businessKey", + "isAttr": true, + "type": "String" + }, + { + "name": "local", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "variables", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "In", + "superClass": [ + "InOutBinding" + ], + "meta": { + "allowedIn": [ + "bpmn:CallActivity" + ] + } + }, + { + "name": "Out", + "superClass": [ + "InOutBinding" + ], + "meta": { + "allowedIn": [ + "bpmn:CallActivity" + ] + } + }, + { + "name": "AsyncCapable", + "isAbstract": true, + "extends": [ + "bpmn:Activity", + "bpmn:Gateway", + "bpmn:Event" + ], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncBefore", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "asyncAfter", + "isAttr": true, + "type": "Boolean", + "default": false + }, + { + "name": "exclusive", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "JobPriorized", + "isAbstract": true, + "extends": [ + "bpmn:Process", + "flowable:AsyncCapable" + ], + "properties": [ + { + "name": "jobPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "SignalEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:SignalEventDefinition" + ], + "properties": [ + { + "name": "async", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "ErrorEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:ErrorEventDefinition" + ], + "properties": [ + { + "name": "errorCodeVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "errorMessageVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Error", + "isAbstract": true, + "extends": [ + "bpmn:Error" + ], + "properties": [ + { + "name": "flowable:errorMessage", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "PotentialStarter", + "superClass": [ + "Element" + ], + "properties": [ + { + "name": "resourceAssignmentExpression", + "type": "bpmn:ResourceAssignmentExpression" + } + ] + }, + { + "name": "FormSupported", + "isAbstract": true, + "extends": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ], + "properties": [ + { + "name": "formHandlerClass", + "isAttr": true, + "type": "String" + }, + { + "name": "formKey", + "isAttr": true, + "type": "String" + }, + { + "name": "localScope", + "isAttr": true, + "type": "Boolean", + "default": false + } + ] + }, + { + "name": "TemplateSupported", + "isAbstract": true, + "extends": [ + "bpmn:Process", + "bpmn:FlowElement" + ], + "properties": [ + { + "name": "modelerTemplate", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Initiator", + "isAbstract": true, + "extends": [ "bpmn:StartEvent" ], + "properties": [ + { + "name": "initiator", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ScriptTask", + "isAbstract": true, + "extends": [ + "bpmn:ScriptTask" + ], + "properties": [ + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Process", + "isAbstract": true, + "extends": [ + "bpmn:Process" + ], + "properties": [ + { + "name": "candidateStarterGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateStarterUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "processCategory", + "isAttr": true, + "type": "String" + }, + { + "name": "versionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "historyTimeToLive", + "isAttr": true, + "type": "String" + }, + { + "name": "isStartableInTasklist", + "isAttr": true, + "type": "Boolean", + "default": true + } + ] + }, + { + "name": "EscalationEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:EscalationEventDefinition" + ], + "properties": [ + { + "name": "escalationCodeVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "xcField", + "isAbstract": true, + "properties": [ + { + "name": "xcString", + "isMany": true, + "type": "Element" + } , + { + "name": "name", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "xcString", + "isAbstract": true, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "FormalExpression", + "isAbstract": true, + "extends": [ + "bpmn:FormalExpression" + ], + "properties": [ + { + "name": "resource", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Assignable", + "extends": [ "bpmn:UserTask" ], + "properties": [ + { + "name": "dataType", + "isAttr": true, + "type": "String" + }, + { + "name": "assignee", + "isAttr": true, + "type": "String" + }, + { + "name": "xcformKey", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateUsers", + "isAttr": true, + "type": "String" + }, + { + "name": "candidateGroups", + "isAttr": true, + "type": "String" + }, + { + "name": "text", + "isAttr": true, + "type": "String" + }, + { + "name": "dueDate", + "isAttr": true, + "type": "String" + }, + { + "name": "followUpDate", + "isAttr": true, + "type": "String" + }, + { + "name": "priority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "CallActivity", + "extends": [ "bpmn:CallActivity" ], + "properties": [ + { + "name": "calledElementBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "calledElementVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementVersionTag", + "isAttr": true, + "type": "String" + }, + { + "name": "calledElementTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "caseRef", + "isAttr": true, + "type": "String" + }, + { + "name": "caseBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "caseVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "caseTenantId", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingClass", + "isAttr": true, + "type": "String" + }, + { + "name": "variableMappingDelegateExpression", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ServiceTaskLike", + "extends": [ + "bpmn:ServiceTask", + "bpmn:BusinessRuleTask", + "bpmn:SendTask", + "bpmn:MessageEventDefinition" + ], + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "resultVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "DmnCapable", + "extends": [ + "bpmn:BusinessRuleTask" + ], + "properties": [ + { + "name": "decisionRef", + "isAttr": true, + "type": "String" + }, + { + "name": "decisionRefBinding", + "isAttr": true, + "type": "String", + "default": "latest" + }, + { + "name": "decisionRefVersion", + "isAttr": true, + "type": "String" + }, + { + "name": "mapDecisionResult", + "isAttr": true, + "type": "String", + "default": "resultList" + }, + { + "name": "decisionRefTenantId", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "ExternalCapable", + "extends": [ + "flowable:ServiceTaskLike" + ], + "properties": [ + { + "name": "type", + "isAttr": true, + "type": "String" + }, + { + "name": "topic", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "TaskPriorized", + "extends": [ + "bpmn:Process", + "flowable:ExternalCapable" + ], + "properties": [ + { + "name": "taskPriority", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "Properties", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ "*" ] + }, + "properties": [ + { + "name": "values", + "type": "Property", + "isMany": true + } + ] + }, + { + "name": "Property", + "superClass": [ + "Element" + ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Connector", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike" + ] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + } + ] + }, + { + "name": "InputOutput", + "superClass": [ + "Element" + ], + "meta": { + "allowedIn": [ + "bpmn:FlowNode", + "flowable:Connector" + ] + }, + "properties": [ + { + "name": "inputOutput", + "type": "InputOutput" + }, + { + "name": "connectorId", + "type": "String" + }, + { + "name": "inputParameters", + "isMany": true, + "type": "InputParameter" + }, + { + "name": "outputParameters", + "isMany": true, + "type": "OutputParameter" + } + ] + }, + { + "name": "InputOutputParameter", + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "InputOutputParameterDefinition", + "isAbstract": true + }, + { + "name": "List", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "items", + "isMany": true, + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Map", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "entries", + "isMany": true, + "type": "Entry" + } + ] + }, + { + "name": "Entry", + "properties": [ + { + "name": "key", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + }, + { + "name": "definition", + "type": "InputOutputParameterDefinition" + } + ] + }, + { + "name": "Value", + "superClass": [ + "InputOutputParameterDefinition" + ], + "properties": [ + { + "name": "id", + "isAttr": true, + "type": "String" + }, + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Script", + "superClass": [ "InputOutputParameterDefinition" ], + "properties": [ + { + "name": "scriptFormat", + "isAttr": true, + "type": "String" + }, + { + "name": "resource", + "isAttr": true, + "type": "String" + }, + { + "name": "value", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "Field", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "flowable:ServiceTaskLike", + "flowable:ExecutionListener", + "flowable:TaskListener" + ] + }, + "properties": [ + { + "name": "name", + "isAttr": true, + "type": "String" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "stringValue", + "isAttr": true, + "type": "String" + }, + { + "name": "string", + "type": "String" + } + ] + }, + { + "name": "InputParameter", + "superClass": [ "InputOutputParameter" ] + }, + { + "name": "OutputParameter", + "superClass": [ "InputOutputParameter" ] + }, + { + "name": "Collectable", + "isAbstract": true, + "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ], + "superClass": [ "flowable:AsyncCapable" ], + "properties": [ + { + "name": "collection", + "isAttr": true, + "type": "String" + }, + { + "name": "elementVariable", + "isAttr": true, + "type": "String" + } + ] + }, + { + "name": "FailedJobRetryTimeCycle", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "flowable:AsyncCapable", + "bpmn:MultiInstanceLoopCharacteristics" + ] + }, + "properties": [ + { + "name": "body", + "isBody": true, + "type": "String" + } + ] + }, + { + "name": "ExecutionListener", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:Task", + "bpmn:ServiceTask", + "bpmn:UserTask", + "bpmn:BusinessRuleTask", + "bpmn:ScriptTask", + "bpmn:ReceiveTask", + "bpmn:ManualTask", + "bpmn:ExclusiveGateway", + "bpmn:SequenceFlow", + "bpmn:ParallelGateway", + "bpmn:InclusiveGateway", + "bpmn:EventBasedGateway", + "bpmn:StartEvent", + "bpmn:IntermediateCatchEvent", + "bpmn:IntermediateThrowEvent", + "bpmn:EndEvent", + "bpmn:BoundaryEvent", + "bpmn:CallActivity", + "bpmn:SubProcess", + "bpmn:Process" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "TaskListener", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "expression", + "isAttr": true, + "type": "String" + }, + { + "name": "class", + "isAttr": true, + "type": "String" + }, + { + "name": "delegateExpression", + "isAttr": true, + "type": "String" + }, + { + "name": "event", + "isAttr": true, + "type": "String" + }, + { + "name": "script", + "type": "Script" + }, + { + "name": "fields", + "type": "Field", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "required", + "type": "String", + "isAttr": true + }, + { + "name": "readable", + "type": "String", + "isAttr": true + }, + { + "name": "writable", + "type": "String", + "isAttr": true + }, + { + "name": "variable", + "type": "String", + "isAttr": true + }, + { + "name": "expression", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "default", + "type": "String", + "isAttr": true + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "FormProperty", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "datePattern", + "type": "String", + "isAttr": true + }, + { + "name": "defaultValue", + "type": "String", + "isAttr": true + }, + { + "name": "properties", + "type": "Properties" + }, + { + "name": "validation", + "type": "Validation" + }, + { + "name": "values", + "type": "Value", + "isMany": true + } + ] + }, + { + "name": "Validation", + "superClass": [ "Element" ], + "properties": [ + { + "name": "constraints", + "type": "Constraint", + "isMany": true + } + ] + }, + { + "name": "Constraint", + "superClass": [ "Element" ], + "properties": [ + { + "name": "name", + "type": "String", + "isAttr": true + }, + { + "name": "config", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ExtensionElements", + "properties": [ + { + "name": "operationList", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "OperationList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "operationList", + "type": "FormOperation", + "isMany": true + } + ] + }, + { + "name": "FormOperation", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "label", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "showOrder", + "type": "String", + "isAttr": true + }, + { + "name": "multiSignAssignee", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "VariableList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "variableList", + "type": "FormVariable", + "isMany": true + } + ] + }, + { + "name": "FormVariable", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "DeptPostList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "deptPostList", + "type": "DeptPost", + "isMany": true + } + ] + }, + { + "name": "DeptPost", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "postId", + "type": "String", + "isAttr": true + }, + { + "name": "deptPostId", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "UserCandidateGroups", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "value", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "CustomCondition", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:SequenceFlow" + ] + }, + "properties": [ + { + "name": "type", + "type": "String", + "isAttr": true + }, + { + "name": "operationType", + "type": "String", + "isAttr": true + }, + { + "name": "parallelRefuse", + "type": "Boolean", + "isAttr": true, + "default": false + } + ] + }, + { + "name": "AssigneeList", + "superClass": [ "Element" ], + "meta": { + "allowedIn": [ + "bpmn:StartEvent", + "bpmn:UserTask" + ] + }, + "properties": [ + { + "name": "assigneeList", + "type": "Assignee", + "isMany": true + }, + { + "name": "type", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "Assignee", + "superClass": [ "Element" ], + "properties": [ + { + "name": "id", + "type": "String", + "isAttr": true + } + ] + }, + { + "name": "ConditionalEventDefinition", + "isAbstract": true, + "extends": [ + "bpmn:ConditionalEventDefinition" + ], + "properties": [ + { + "name": "variableName", + "isAttr": true, + "type": "String" + }, + { + "name": "variableEvent", + "isAttr": true, + "type": "String" + } + ] + } + ], + "emumerations": [ ] +} diff --git a/src/plugins/package/designer/plugins/extension-moddle/activiti/activitiExtension.js b/src/plugins/package/designer/plugins/extension-moddle/activiti/activitiExtension.js new file mode 100644 index 0000000..1287e04 --- /dev/null +++ b/src/plugins/package/designer/plugins/extension-moddle/activiti/activitiExtension.js @@ -0,0 +1,74 @@ +"use strict"; + +var some = require("min-dash").some; + +var ALLOWED_TYPES = { + FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"], + Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"], + Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"] +}; + +function is(element, type) { + return element && typeof element.$instanceOf === "function" && element.$instanceOf(type); +} + +function exists(element) { + return element && element.length; +} + +function includesType(collection, type) { + return ( + exists(collection) && + some(collection, function(element) { + return is(element, type); + }) + ); +} + +function anyType(element, types) { + return some(types, function(type) { + return is(element, type); + }); +} + +function isAllowed(propName, propDescriptor, newElement) { + var name = propDescriptor.name, + types = ALLOWED_TYPES[name.replace(/activiti:/, "")]; + + return name === propName && anyType(newElement, types); +} + +function ActivitiModdleExtension(eventBus) { + eventBus.on( + "property.clone", + function(context) { + var newElement = context.newElement, + propDescriptor = context.propertyDescriptor; + + this.canCloneProperty(newElement, propDescriptor); + }, + this + ); +} + +ActivitiModdleExtension.$inject = ["eventBus"]; + +ActivitiModdleExtension.prototype.canCloneProperty = function(newElement, propDescriptor) { + if (isAllowed("activiti:FailedJobRetryTimeCycle", propDescriptor, newElement)) { + return ( + includesType(newElement.eventDefinitions, "bpmn:TimerEventDefinition") || + includesType(newElement.eventDefinitions, "bpmn:SignalEventDefinition") || + is(newElement.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics") + ); + } + + if (isAllowed("activiti:Connector", propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition"); + } + + if (isAllowed("activiti:Field", propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition"); + } +}; + +module.exports = ActivitiModdleExtension; diff --git a/src/plugins/package/designer/plugins/extension-moddle/activiti/index.js b/src/plugins/package/designer/plugins/extension-moddle/activiti/index.js new file mode 100644 index 0000000..6ce014a --- /dev/null +++ b/src/plugins/package/designer/plugins/extension-moddle/activiti/index.js @@ -0,0 +1,9 @@ +/* + * @author igdianov + * address https://github.com/igdianov/activiti-bpmn-moddle + * */ + +module.exports = { + __init__: ["ActivitiModdleExtension"], + ActivitiModdleExtension: ["type", require("./activitiExtension")] +}; diff --git a/src/plugins/package/designer/plugins/extension-moddle/camunda/extension.js b/src/plugins/package/designer/plugins/extension-moddle/camunda/extension.js new file mode 100644 index 0000000..a55236a --- /dev/null +++ b/src/plugins/package/designer/plugins/extension-moddle/camunda/extension.js @@ -0,0 +1,148 @@ +"use strict"; + +var isFunction = require("min-dash").isFunction, + isObject = require("min-dash").isObject, + some = require("min-dash").some; + +var WILDCARD = "*"; + +function CamundaModdleExtension(eventBus) { + var self = this; + + eventBus.on("moddleCopy.canCopyProperty", function(context) { + var property = context.property, + parent = context.parent; + + return self.canCopyProperty(property, parent); + }); +} + +CamundaModdleExtension.$inject = ["eventBus"]; + +/** + * Check wether to disallow copying property. + */ +CamundaModdleExtension.prototype.canCopyProperty = function(property, parent) { + // (1) check wether property is allowed in parent + if (isObject(property) && !isAllowedInParent(property, parent)) { + return false; + } + + // (2) check more complex scenarios + + if (is(property, "camunda:InputOutput") && !this.canHostInputOutput(parent)) { + return false; + } + + if (isAny(property, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(parent)) { + return false; + } + + if (is(property, "camunda:In") && !this.canHostIn(parent)) { + return false; + } +}; + +CamundaModdleExtension.prototype.canHostInputOutput = function(parent) { + // allowed in camunda:Connector + var connector = getParent(parent, "camunda:Connector"); + + if (connector) { + return true; + } + + // special rules inside bpmn:FlowNode + var flowNode = getParent(parent, "bpmn:FlowNode"); + + if (!flowNode) { + return false; + } + + if (isAny(flowNode, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"])) { + return false; + } + + if (is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent")) { + return false; + } + + return true; +}; + +CamundaModdleExtension.prototype.canHostConnector = function(parent) { + var serviceTaskLike = getParent(parent, "camunda:ServiceTaskLike"); + + if (is(serviceTaskLike, "bpmn:MessageEventDefinition")) { + // only allow on throw and end events + return getParent(parent, "bpmn:IntermediateThrowEvent") || getParent(parent, "bpmn:EndEvent"); + } + + return true; +}; + +CamundaModdleExtension.prototype.canHostIn = function(parent) { + var callActivity = getParent(parent, "bpmn:CallActivity"); + + if (callActivity) { + return true; + } + + var signalEventDefinition = getParent(parent, "bpmn:SignalEventDefinition"); + + if (signalEventDefinition) { + // only allow on throw and end events + return getParent(parent, "bpmn:IntermediateThrowEvent") || getParent(parent, "bpmn:EndEvent"); + } + + return true; +}; + +module.exports = CamundaModdleExtension; + +// helpers ////////// + +function is(element, type) { + return element && isFunction(element.$instanceOf) && element.$instanceOf(type); +} + +function isAny(element, types) { + return some(types, function(t) { + return is(element, t); + }); +} + +function getParent(element, type) { + if (!type) { + return element.$parent; + } + + if (is(element, type)) { + return element; + } + + if (!element.$parent) { + return; + } + + return getParent(element.$parent, type); +} + +function isAllowedInParent(property, parent) { + // (1) find property descriptor + var descriptor = property.$type && property.$model.getTypeDescriptor(property.$type); + + var allowedIn = descriptor && descriptor.meta && descriptor.meta.allowedIn; + + if (!allowedIn || isWildcard(allowedIn)) { + return true; + } + + // (2) check wether property has parent of allowed type + return some(allowedIn, function(type) { + return getParent(parent, type); + }); +} + +function isWildcard(allowedIn) { + return allowedIn.indexOf(WILDCARD) !== -1; +} diff --git a/src/plugins/package/designer/plugins/extension-moddle/camunda/index.js b/src/plugins/package/designer/plugins/extension-moddle/camunda/index.js new file mode 100644 index 0000000..0a9e41c --- /dev/null +++ b/src/plugins/package/designer/plugins/extension-moddle/camunda/index.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + __init__: ["camundaModdleExtension"], + camundaModdleExtension: ["type", require("./extension")] +}; diff --git a/src/plugins/package/designer/plugins/extension-moddle/flowable/flowableExtension.js b/src/plugins/package/designer/plugins/extension-moddle/flowable/flowableExtension.js new file mode 100644 index 0000000..4689024 --- /dev/null +++ b/src/plugins/package/designer/plugins/extension-moddle/flowable/flowableExtension.js @@ -0,0 +1,74 @@ +"use strict"; + +var some = require("min-dash").some; + +var ALLOWED_TYPES = { + FailedJobRetryTimeCycle: ["bpmn:StartEvent", "bpmn:BoundaryEvent", "bpmn:IntermediateCatchEvent", "bpmn:Activity"], + Connector: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"], + Field: ["bpmn:EndEvent", "bpmn:IntermediateThrowEvent"] +}; + +function is(element, type) { + return element && typeof element.$instanceOf === "function" && element.$instanceOf(type); +} + +function exists(element) { + return element && element.length; +} + +function includesType(collection, type) { + return ( + exists(collection) && + some(collection, function(element) { + return is(element, type); + }) + ); +} + +function anyType(element, types) { + return some(types, function(type) { + return is(element, type); + }); +} + +function isAllowed(propName, propDescriptor, newElement) { + var name = propDescriptor.name, + types = ALLOWED_TYPES[name.replace(/flowable:/, "")]; + + return name === propName && anyType(newElement, types); +} + +function FlowableModdleExtension(eventBus) { + eventBus.on( + "property.clone", + function(context) { + var newElement = context.newElement, + propDescriptor = context.propertyDescriptor; + + this.canCloneProperty(newElement, propDescriptor); + }, + this + ); +} + +FlowableModdleExtension.$inject = ["eventBus"]; + +FlowableModdleExtension.prototype.canCloneProperty = function(newElement, propDescriptor) { + if (isAllowed("flowable:FailedJobRetryTimeCycle", propDescriptor, newElement)) { + return ( + includesType(newElement.eventDefinitions, "bpmn:TimerEventDefinition") || + includesType(newElement.eventDefinitions, "bpmn:SignalEventDefinition") || + is(newElement.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics") + ); + } + + if (isAllowed("flowable:Connector", propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition"); + } + + if (isAllowed("flowable:Field", propDescriptor, newElement)) { + return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition"); + } +}; + +module.exports = FlowableModdleExtension; diff --git a/src/plugins/package/designer/plugins/extension-moddle/flowable/index.js b/src/plugins/package/designer/plugins/extension-moddle/flowable/index.js new file mode 100644 index 0000000..59837cc --- /dev/null +++ b/src/plugins/package/designer/plugins/extension-moddle/flowable/index.js @@ -0,0 +1,9 @@ +/* + * @author igdianov + * address https://github.com/igdianov/activiti-bpmn-moddle + * */ + +module.exports = { + __init__: ["FlowableModdleExtension"], + FlowableModdleExtension: ["type", require("./flowableExtension")] +}; diff --git a/src/plugins/package/designer/plugins/palette/index.js b/src/plugins/package/designer/plugins/palette/index.js new file mode 100644 index 0000000..c44874f --- /dev/null +++ b/src/plugins/package/designer/plugins/palette/index.js @@ -0,0 +1,15 @@ +import PaletteModule from "diagram-js/lib/features/palette"; +import CreateModule from "diagram-js/lib/features/create"; +import SpaceToolModule from "diagram-js/lib/features/space-tool"; +import LassoToolModule from "diagram-js/lib/features/lasso-tool"; +import HandToolModule from "diagram-js/lib/features/hand-tool"; +import GlobalConnectModule from "diagram-js/lib/features/global-connect"; +import translate from "diagram-js/lib/i18n/translate"; + +import PaletteProvider from "./paletteProvider"; + +export default { + __depends__: [PaletteModule, CreateModule, SpaceToolModule, LassoToolModule, HandToolModule, GlobalConnectModule, translate], + __init__: ["paletteProvider"], + paletteProvider: ["type", PaletteProvider] +}; diff --git a/src/plugins/package/designer/plugins/palette/paletteProvider.js b/src/plugins/package/designer/plugins/palette/paletteProvider.js new file mode 100644 index 0000000..e0c3238 --- /dev/null +++ b/src/plugins/package/designer/plugins/palette/paletteProvider.js @@ -0,0 +1,160 @@ +import { assign } from "min-dash"; + +/** + * A palette provider for BPMN 2.0 elements. + */ +export default function PaletteProvider(palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) { + this._palette = palette; + this._create = create; + this._elementFactory = elementFactory; + this._spaceTool = spaceTool; + this._lassoTool = lassoTool; + this._handTool = handTool; + this._globalConnect = globalConnect; + this._translate = translate; + + palette.registerProvider(this); +} + +PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"]; + +PaletteProvider.prototype.getPaletteEntries = function() { + var actions = {}, + create = this._create, + elementFactory = this._elementFactory, + spaceTool = this._spaceTool, + lassoTool = this._lassoTool, + handTool = this._handTool, + globalConnect = this._globalConnect, + translate = this._translate; + + function createAction(type, group, className, title, options) { + function createListener(event) { + var shape = elementFactory.createShape(assign({ type: type }, options)); + + if (options) { + shape.businessObject.di.isExpanded = options.isExpanded; + } + + create.start(event, shape); + } + + var shortType = type.replace(/^bpmn:/, ""); + + return { + group: group, + className: className, + title: title || translate("Create {type}", { type: shortType }), + action: { + dragstart: createListener, + click: createListener + } + }; + } + + function createSubprocess(event) { + var subProcess = elementFactory.createShape({ + type: "bpmn:SubProcess", + x: 0, + y: 0, + isExpanded: true + }); + + var startEvent = elementFactory.createShape({ + type: "bpmn:StartEvent", + x: 40, + y: 82, + parent: subProcess + }); + + create.start(event, [subProcess, startEvent], { + hints: { + autoSelect: [startEvent] + } + }); + } + + function createParticipant(event) { + create.start(event, elementFactory.createParticipantShape()); + } + + assign(actions, { + "hand-tool": { + group: "tools", + className: "bpmn-icon-hand-tool", + title: translate("Activate the hand tool"), + action: { + click: function(event) { + handTool.activateHand(event); + } + } + }, + "lasso-tool": { + group: "tools", + className: "bpmn-icon-lasso-tool", + title: translate("Activate the lasso tool"), + action: { + click: function(event) { + lassoTool.activateSelection(event); + } + } + }, + "space-tool": { + group: "tools", + className: "bpmn-icon-space-tool", + title: translate("Activate the create/remove space tool"), + action: { + click: function(event) { + spaceTool.activateSelection(event); + } + } + }, + "global-connect-tool": { + group: "tools", + className: "bpmn-icon-connection-multi", + title: translate("Activate the global connect tool"), + action: { + click: function(event) { + globalConnect.toggle(event); + } + } + }, + "tool-separator": { + group: "tools", + separator: true + }, + "create.start-event": createAction("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", translate("Create StartEvent")), + "create.intermediate-event": createAction( + "bpmn:IntermediateThrowEvent", + "event", + "bpmn-icon-intermediate-event-none", + translate("Create Intermediate/Boundary Event") + ), + "create.end-event": createAction("bpmn:EndEvent", "event", "bpmn-icon-end-event-none", translate("Create EndEvent")), + "create.exclusive-gateway": createAction("bpmn:ExclusiveGateway", "gateway", "bpmn-icon-gateway-none", translate("Create Gateway")), + "create.user-task": createAction("bpmn:UserTask", "activity", "bpmn-icon-user-task", translate("Create User Task")), + "create.data-object": createAction("bpmn:DataObjectReference", "data-object", "bpmn-icon-data-object", translate("Create DataObjectReference")), + "create.data-store": createAction("bpmn:DataStoreReference", "data-store", "bpmn-icon-data-store", translate("Create DataStoreReference")), + "create.subprocess-expanded": { + group: "activity", + className: "bpmn-icon-subprocess-expanded", + title: translate("Create expanded SubProcess"), + action: { + dragstart: createSubprocess, + click: createSubprocess + } + }, + "create.participant-expanded": { + group: "collaboration", + className: "bpmn-icon-participant", + title: translate("Create Pool/Participant"), + action: { + dragstart: createParticipant, + click: createParticipant + } + }, + "create.group": createAction("bpmn:Group", "artifact", "bpmn-icon-group", translate("Create Group")) + }); + + return actions; +}; diff --git a/src/plugins/package/designer/plugins/translate/customTranslate.js b/src/plugins/package/designer/plugins/translate/customTranslate.js new file mode 100644 index 0000000..508040d --- /dev/null +++ b/src/plugins/package/designer/plugins/translate/customTranslate.js @@ -0,0 +1,41 @@ +// import translations from "./zh"; +// +// export default function customTranslate(template, replacements) { +// replacements = replacements || {}; +// +// // Translate +// template = translations[template] || template; +// +// // Replace +// return template.replace(/{([^}]+)}/g, function(_, key) { +// let str = replacements[key]; +// if ( +// translations[replacements[key]] !== null && +// translations[replacements[key]] !== "undefined" +// ) { +// // eslint-disable-next-line no-mixed-spaces-and-tabs +// str = translations[replacements[key]]; +// // eslint-disable-next-line no-mixed-spaces-and-tabs +// } +// return str || "{" + key + "}"; +// }); +// } + +export default function customTranslate(translations) { + return function(template, replacements) { + replacements = replacements || {}; + // Translate + template = translations[template] || template; + + // Replace + return template.replace(/{([^}]+)}/g, function(_, key) { + let str = replacements[key]; + if (translations[replacements[key]] !== null && translations[replacements[key]] !== undefined) { + // eslint-disable-next-line no-mixed-spaces-and-tabs + str = translations[replacements[key]]; + // eslint-disable-next-line no-mixed-spaces-and-tabs + } + return str || "{" + key + "}"; + }); + }; +} diff --git a/src/plugins/package/designer/plugins/translate/zh.js b/src/plugins/package/designer/plugins/translate/zh.js new file mode 100644 index 0000000..855b561 --- /dev/null +++ b/src/plugins/package/designer/plugins/translate/zh.js @@ -0,0 +1,238 @@ +/** + * This is a sample file that should be replaced with the actual translation. + * + * Checkout https://github.com/bpmn-io/bpmn-js-i18n for a list of available + * translations and labels to translate. + */ +export default { + // 添加部分 + "Append EndEvent": "追加结束事件", + "Append Gateway": "追加网关", + "Append Task": "追加任务", + "Append Intermediate/Boundary Event": "追加中间抛出事件/边界事件", + + "Activate the global connect tool": "激活全局连接工具", + "Append {type}": "添加 {type}", + "Add Lane above": "在上面添加道", + "Divide into two Lanes": "分割成两个道", + "Divide into three Lanes": "分割成三个道", + "Add Lane below": "在下面添加道", + "Append compensation activity": "追加补偿活动", + "Change type": "修改类型", + "Connect using Association": "使用关联连接", + "Connect using Sequence/MessageFlow or Association": "使用顺序/消息流或者关联连接", + "Connect using DataInputAssociation": "使用数据输入关联连接", + Remove: "移除", + "Activate the hand tool": "激活抓手工具", + "Activate the lasso tool": "激活套索工具", + "Activate the create/remove space tool": "激活创建/删除空间工具", + "Create expanded SubProcess": "创建扩展子过程", + "Create IntermediateThrowEvent/BoundaryEvent": "创建中间抛出事件/边界事件", + "Create Pool/Participant": "创建池/参与者", + "Parallel Multi Instance": "并行多重事件", + "Sequential Multi Instance": "时序多重事件", + DataObjectReference: "数据对象参考", + DataStoreReference: "数据存储参考", + Loop: "循环", + "Ad-hoc": "即席", + "Create {type}": "创建 {type}", + Task: "任务", + "Send Task": "发送任务", + "Receive Task": "接收任务", + "User Task": "用户任务", + "Manual Task": "手工任务", + "Business Rule Task": "业务规则任务", + "Service Task": "服务任务", + "Script Task": "脚本任务", + "Call Activity": "调用活动", + "Sub Process (collapsed)": "子流程(折叠的)", + "Sub Process (expanded)": "子流程(展开的)", + "Start Event": "开始事件", + StartEvent: "开始事件", + "Intermediate Throw Event": "中间事件", + "End Event": "结束事件", + EndEvent: "结束事件", + "Create StartEvent": "创建开始事件", + "Create EndEvent": "创建结束事件", + "Create Task": "创建任务", + "Create User Task": "创建用户任务", + "Create Gateway": "创建网关", + "Create DataObjectReference": "创建数据对象", + "Create DataStoreReference": "创建数据存储", + "Create Group": "创建分组", + "Create Intermediate/Boundary Event": "创建中间/边界事件", + "Message Start Event": "消息开始事件", + "Timer Start Event": "定时开始事件", + "Conditional Start Event": "条件开始事件", + "Signal Start Event": "信号开始事件", + "Error Start Event": "错误开始事件", + "Escalation Start Event": "升级开始事件", + "Compensation Start Event": "补偿开始事件", + "Message Start Event (non-interrupting)": "消息开始事件(非中断)", + "Timer Start Event (non-interrupting)": "定时开始事件(非中断)", + "Conditional Start Event (non-interrupting)": "条件开始事件(非中断)", + "Signal Start Event (non-interrupting)": "信号开始事件(非中断)", + "Escalation Start Event (non-interrupting)": "升级开始事件(非中断)", + "Message Intermediate Catch Event": "消息中间捕获事件", + "Message Intermediate Throw Event": "消息中间抛出事件", + "Timer Intermediate Catch Event": "定时中间捕获事件", + "Escalation Intermediate Throw Event": "升级中间抛出事件", + "Conditional Intermediate Catch Event": "条件中间捕获事件", + "Link Intermediate Catch Event": "链接中间捕获事件", + "Link Intermediate Throw Event": "链接中间抛出事件", + "Compensation Intermediate Throw Event": "补偿中间抛出事件", + "Signal Intermediate Catch Event": "信号中间捕获事件", + "Signal Intermediate Throw Event": "信号中间抛出事件", + "Message End Event": "消息结束事件", + "Escalation End Event": "定时结束事件", + "Error End Event": "错误结束事件", + "Cancel End Event": "取消结束事件", + "Compensation End Event": "补偿结束事件", + "Signal End Event": "信号结束事件", + "Terminate End Event": "终止结束事件", + "Message Boundary Event": "消息边界事件", + "Message Boundary Event (non-interrupting)": "消息边界事件(非中断)", + "Timer Boundary Event": "定时边界事件", + "Timer Boundary Event (non-interrupting)": "定时边界事件(非中断)", + "Escalation Boundary Event": "升级边界事件", + "Escalation Boundary Event (non-interrupting)": "升级边界事件(非中断)", + "Conditional Boundary Event": "条件边界事件", + "Conditional Boundary Event (non-interrupting)": "条件边界事件(非中断)", + "Error Boundary Event": "错误边界事件", + "Cancel Boundary Event": "取消边界事件", + "Signal Boundary Event": "信号边界事件", + "Signal Boundary Event (non-interrupting)": "信号边界事件(非中断)", + "Compensation Boundary Event": "补偿边界事件", + "Exclusive Gateway": "互斥网关", + "Parallel Gateway": "并行网关", + "Inclusive Gateway": "相容网关", + "Complex Gateway": "复杂网关", + "Event based Gateway": "事件网关", + Transaction: "转运", + "Sub Process": "子流程", + "Event Sub Process": "事件子流程", + "Collapsed Pool": "折叠池", + "Expanded Pool": "展开池", + + // Errors + "no parent for {element} in {parent}": "在{parent}里,{element}没有父类", + "no shape type specified": "没有指定的形状类型", + "flow elements must be children of pools/participants": "流元素必须是池/参与者的子类", + "out of bounds release": "out of bounds release", + "more than {count} child lanes": "子道大于{count} ", + "element required": "元素不能为空", + "diagram not part of bpmn:Definitions": "流程图不符合bpmn规范", + "no diagram to display": "没有可展示的流程图", + "no process or collaboration to display": "没有可展示的流程/协作", + "element {element} referenced by {referenced}#{property} not yet drawn": "由{referenced}#{property}引用的{element}元素仍未绘制", + "already rendered {element}": "{element} 已被渲染", + "failed to import {element}": "导入{element}失败", + //属性面板的参数 + Id: "编号", + Name: "名称", + General: "常规", + Details: "详情", + "Message Name": "消息名称", + Message: "消息", + Initiator: "创建者", + "Asynchronous Continuations": "持续异步", + "Asynchronous Before": "异步前", + "Asynchronous After": "异步后", + "Job Configuration": "工作配置", + Exclusive: "排除", + "Job Priority": "工作优先级", + "Retry Time Cycle": "重试时间周期", + Documentation: "文档", + "Element Documentation": "元素文档", + "History Configuration": "历史配置", + "History Time To Live": "历史的生存时间", + Forms: "表单", + "Form Key": "表单key", + "Form Fields": "表单字段", + "Business Key": "业务key", + "Form Field": "表单字段", + ID: "编号", + Type: "类型", + Label: "名称", + "Default Value": "默认值", + "Default Flow": "默认流转路径", + "Conditional Flow": "条件流转路径", + "Sequence Flow": "普通流转路径", + Validation: "校验", + "Add Constraint": "添加约束", + Config: "配置", + Properties: "属性", + "Add Property": "添加属性", + Value: "值", + Listeners: "监听器", + "Execution Listener": "执行监听", + "Event Type": "事件类型", + "Listener Type": "监听器类型", + "Java Class": "Java类", + Expression: "表达式", + "Must provide a value": "必须提供一个值", + "Delegate Expression": "代理表达式", + Script: "脚本", + "Script Format": "脚本格式", + "Script Type": "脚本类型", + "Inline Script": "内联脚本", + "External Script": "外部脚本", + Resource: "资源", + "Field Injection": "字段注入", + Extensions: "扩展", + "Input/Output": "输入/输出", + "Input Parameters": "输入参数", + "Output Parameters": "输出参数", + Parameters: "参数", + "Output Parameter": "输出参数", + "Timer Definition Type": "定时器定义类型", + "Timer Definition": "定时器定义", + Date: "日期", + Duration: "持续", + Cycle: "循环", + Signal: "信号", + "Signal Name": "信号名称", + Escalation: "升级", + Error: "错误", + "Link Name": "链接名称", + Condition: "条件名称", + "Variable Name": "变量名称", + "Variable Event": "变量事件", + "Specify more than one variable change event as a comma separated list.": "多个变量事件以逗号隔开", + "Wait for Completion": "等待完成", + "Activity Ref": "活动参考", + "Version Tag": "版本标签", + Executable: "可执行文件", + "External Task Configuration": "扩展任务配置", + "Task Priority": "任务优先级", + External: "外部", + Connector: "连接器", + "Must configure Connector": "必须配置连接器", + "Connector Id": "连接器编号", + Implementation: "实现方式", + "Field Injections": "字段注入", + Fields: "字段", + "Result Variable": "结果变量", + Topic: "主题", + "Configure Connector": "配置连接器", + "Input Parameter": "输入参数", + Assignee: "代理人", + "Candidate Users": "候选用户", + "Candidate Groups": "候选组", + "Due Date": "到期时间", + "Follow Up Date": "跟踪日期", + Priority: "优先级", + "The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)": + "跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00", + "The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)": + "跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00", + Variables: "变量", + "Candidate Starter Configuration": "候选人起动器配置", + "Candidate Starter Groups": "候选人起动器组", + "This maps to the process definition key.": "这映射到流程定义键。", + "Candidate Starter Users": "候选人起动器的用户", + "Specify more than one user as a comma separated list.": "指定多个用户作为逗号分隔的列表。", + "Tasklist Configuration": "Tasklist配置", + Startable: "启动", + "Specify more than one group as a comma separated list.": "指定多个组作为逗号分隔的列表。" +}; diff --git a/src/plugins/package/highlight/index.js b/src/plugins/package/highlight/index.js new file mode 100644 index 0000000..bff9211 --- /dev/null +++ b/src/plugins/package/highlight/index.js @@ -0,0 +1,5 @@ +const hljs = require("highlight.js/lib/core"); +hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml")); +hljs.registerLanguage("json", require("highlight.js/lib/languages/json")); + +module.exports = hljs; diff --git a/src/plugins/package/index.js b/src/plugins/package/index.js new file mode 100644 index 0000000..d076cdd --- /dev/null +++ b/src/plugins/package/index.js @@ -0,0 +1,7 @@ +import BpmnProcessDesigner from "./designer"; +import BmpnProcessPenal from "./penal"; + +export { + BpmnProcessDesigner, + BmpnProcessPenal +} diff --git a/src/plugins/package/penal/PropertiesPanel.vue b/src/plugins/package/penal/PropertiesPanel.vue new file mode 100644 index 0000000..4d88c83 --- /dev/null +++ b/src/plugins/package/penal/PropertiesPanel.vue @@ -0,0 +1,193 @@ + + + + + 常规 + + + + 消息与信号 + + + + 流转条件 + + + + 表单 + + + + 任务 + + + + 多实例 + + + + 执行监听器 + + + + 任务监听器 + + + + 扩展属性 + + + + 其他 + + + + + + diff --git a/src/plugins/package/penal/base/ElementBaseInfo.vue b/src/plugins/package/penal/base/ElementBaseInfo.vue new file mode 100644 index 0000000..303d59d --- /dev/null +++ b/src/plugins/package/penal/base/ElementBaseInfo.vue @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/package/penal/flow-condition/FlowCondition.vue b/src/plugins/package/penal/flow-condition/FlowCondition.vue new file mode 100644 index 0000000..94cf823 --- /dev/null +++ b/src/plugins/package/penal/flow-condition/FlowCondition.vue @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/package/penal/form/ElementForm.vue b/src/plugins/package/penal/form/ElementForm.vue new file mode 100644 index 0000000..a59d8e3 --- /dev/null +++ b/src/plugins/package/penal/form/ElementForm.vue @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + 节点表单 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + diff --git a/src/plugins/package/penal/index.js b/src/plugins/package/penal/index.js new file mode 100644 index 0000000..9b398b2 --- /dev/null +++ b/src/plugins/package/penal/index.js @@ -0,0 +1,7 @@ +import BpmnPropertiesPanel from "./PropertiesPanel.vue"; + +BpmnPropertiesPanel.install = function(Vue) { + Vue.component(BpmnPropertiesPanel.name, BpmnPropertiesPanel); +}; + +export default BpmnPropertiesPanel; diff --git a/src/plugins/package/penal/listeners/ElementListeners.vue b/src/plugins/package/penal/listeners/ElementListeners.vue new file mode 100644 index 0000000..16f5099 --- /dev/null +++ b/src/plugins/package/penal/listeners/ElementListeners.vue @@ -0,0 +1,296 @@ + + + + + + + + + 编辑 + + 移除 + + + + + 添加监听器 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 注入字段: + 添加字段 + + + + + + + + + 编辑 + + 移除 + + + + + + 取 消 + 保 存 + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + diff --git a/src/plugins/package/penal/listeners/UserTaskListeners.vue b/src/plugins/package/penal/listeners/UserTaskListeners.vue new file mode 100644 index 0000000..c113af9 --- /dev/null +++ b/src/plugins/package/penal/listeners/UserTaskListeners.vue @@ -0,0 +1,319 @@ + + + + + + + + + + 编辑 + + 移除 + + + + + 添加监听器 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 注入字段: + 添加字段 + + + + + + + + + 编辑 + + 移除 + + + + + + 取 消 + 保 存 + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + + diff --git a/src/plugins/package/penal/listeners/template.js b/src/plugins/package/penal/listeners/template.js new file mode 100644 index 0000000..455b70d --- /dev/null +++ b/src/plugins/package/penal/listeners/template.js @@ -0,0 +1,178 @@ +export const template = isTaskListener => { + return ` + + + + + + + + 编辑 + + 移除 + + + + + 添加监听器 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${ + isTaskListener + ? "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + : "" + } + + + + 注入字段: + 添加字段 + + + + + + + + + 编辑 + + 移除 + + + + + + 取 消 + 保 存 + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 + + + + `; +}; diff --git a/src/plugins/package/penal/listeners/utilSelf.js b/src/plugins/package/penal/listeners/utilSelf.js new file mode 100644 index 0000000..efd13ec --- /dev/null +++ b/src/plugins/package/penal/listeners/utilSelf.js @@ -0,0 +1,62 @@ +// 初始化表单数据 +export function initListenerForm(listener) { + let self = { + ...listener + }; + if (listener.script) { + self = { + ...listener, + ...listener.script, + scriptType: listener.script.resource ? "externalScript" : "inlineScript" + }; + } + if (listener.event === "timeout" && listener.eventDefinitions) { + if (listener.eventDefinitions.length) { + let k = ""; + for (let key in listener.eventDefinitions[0]) { + console.log(listener.eventDefinitions, key); + if (key.indexOf("time") !== -1) { + k = key; + self.eventDefinitionType = key.replace("time", "").toLowerCase(); + } + } + console.log(k); + self.eventTimeDefinitions = listener.eventDefinitions[0][k].body; + } + } + return self; +} + +export function initListenerType(listener) { + let listenerType; + if (listener.class) listenerType = "classListener"; + if (listener.expression) listenerType = "expressionListener"; + if (listener.delegateExpression) listenerType = "delegateExpressionListener"; + if (listener.script) listenerType = "scriptListener"; + return { + ...JSON.parse(JSON.stringify(listener)), + ...(listener.script ?? {}), + listenerType: listenerType + }; +} + +export const listenerType = { + classListener: "Java 类", + expressionListener: "表达式", + delegateExpressionListener: "代理表达式", + scriptListener: "脚本" +}; + +export const eventType = { + create: "创建", + assignment: "指派", + complete: "完成", + delete: "删除", + update: "更新", + timeout: "超时" +}; + +export const fieldType = { + string: "字符串", + expression: "表达式" +}; diff --git a/src/plugins/package/penal/multi-instance/ElementMultiInstance.vue b/src/plugins/package/penal/multi-instance/ElementMultiInstance.vue new file mode 100644 index 0000000..7d57f50 --- /dev/null +++ b/src/plugins/package/penal/multi-instance/ElementMultiInstance.vue @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/package/penal/other/ElementOtherConfig.vue b/src/plugins/package/penal/other/ElementOtherConfig.vue new file mode 100644 index 0000000..a4427b2 --- /dev/null +++ b/src/plugins/package/penal/other/ElementOtherConfig.vue @@ -0,0 +1,59 @@ + + + + 元素文档: + + + + + + + + diff --git a/src/plugins/package/penal/properties/ElementProperties.vue b/src/plugins/package/penal/properties/ElementProperties.vue new file mode 100644 index 0000000..edd9a36 --- /dev/null +++ b/src/plugins/package/penal/properties/ElementProperties.vue @@ -0,0 +1,134 @@ + + + + + + + + + 编辑 + + 移除 + + + + + 添加属性 + + + + + + + + + + + + + 取 消 + 确 定 + + + + + + diff --git a/src/plugins/package/penal/signal-message/SignalAndMessage.vue b/src/plugins/package/penal/signal-message/SignalAndMessage.vue new file mode 100644 index 0000000..7ea59f6 --- /dev/null +++ b/src/plugins/package/penal/signal-message/SignalAndMessage.vue @@ -0,0 +1,104 @@ + + + + 消息列表 + 创建新消息 + + + + + + + + 信号列表 + 创建新信号 + + + + + + + + + + + + + + + + + + 取 消 + 保 存 + + + + + diff --git a/src/plugins/package/theme/flow-element-variables.scss b/src/plugins/package/theme/flow-element-variables.scss new file mode 100644 index 0000000..a54b6e0 --- /dev/null +++ b/src/plugins/package/theme/flow-element-variables.scss @@ -0,0 +1,63 @@ +/* 改变主题色变量 */ +// $--color-primary: #1890ff; +// $--color-danger: #ff4d4f; + +/* 改变 icon 字体路径变量,必需 */ + +.process-drawer .el-drawer__header { + padding: 16px 16px 8px 16px; + margin: 0; + line-height: 24px; + font-size: 18px; + color: #303133; + box-sizing: border-box; + border-bottom: 1px solid #e8e8e8; +} + +div[class^="el-drawer"]:focus, +span:focus { + outline: none; +} + +.process-drawer .el-drawer__body { + box-sizing: border-box; + padding: 16px; + width: 100%; + overflow-y: auto; +} + +.process-design { + .el-table td, + .el-table th { + color: #333; + } + + .el-dialog__header { + padding: 16px 16px 8px 16px; + box-sizing: border-box; + border-bottom: 1px solid #e8e8e8; + } + .el-dialog__body { + padding: 16px; + max-height: 80vh; + box-sizing: border-box; + overflow-y: auto; + } + .el-dialog__footer { + padding: 16px; + box-sizing: border-box; + border-top: 1px solid #e8e8e8; + } + .el-dialog__close { + font-weight: 600; + } + .el-select { + width: 100%; + } + .el-divider:not(.el-divider--horizontal) { + margin: 0 8px ; + } + .el-divider.el-divider--horizontal { + margin: 16px 0; + } +} diff --git a/src/plugins/package/theme/index.scss b/src/plugins/package/theme/index.scss new file mode 100644 index 0000000..abbfc91 --- /dev/null +++ b/src/plugins/package/theme/index.scss @@ -0,0 +1,171 @@ +@import "./flow-element-variables.scss"; +@import "~bpmn-js-token-simulation/assets/css/bpmn-js-token-simulation.css"; +@import "~bpmn-js-token-simulation/assets/css/font-awesome.min.css"; +@import "~bpmn-js-token-simulation/assets/css/normalize.css"; +@import "~bpmn-js/dist/assets/diagram-js.css"; +@import "~bpmn-js/dist/assets/bpmn-font/css/bpmn.css"; +@import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css"; +@import "./process-designer.scss"; +@import "./process-panel.scss"; + +$success-color: #4eb819; +$primary-color: #409EFF; +$warning-color: #E6A23C; +$danger-color: #F56C6C; +$cancel-color: #909399; + +.process-viewer { + position: relative; + border: 1px solid #EFEFEF; + background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+') repeat!important; + + .success-arrow { + fill: $success-color; + stroke: $success-color; + } + + .success-conditional { + fill: white; + stroke: $success-color; + } + + .fail-arrow { + fill: $warning-color; + stroke: $warning-color; + } + + .fail-conditional { + fill: white; + stroke: $warning-color; + } + + .success.djs-connection { + .djs-visual path { + stroke: $success-color!important; + marker-end: url(#sequenceflow-end-white-success)!important; + } + } + + .success.djs-connection.condition-expression { + .djs-visual path { + marker-start: url(#conditional-flow-marker-white-success)!important; + } + } + + .success.djs-shape { + .djs-visual rect { + stroke: $success-color!important; + fill: $success-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $success-color!important; + } + + .djs-visual path:nth-child(2) { + stroke: $success-color!important; + fill: $success-color!important; + } + + .djs-visual circle { + stroke: $success-color!important; + fill: $success-color!important; + fill-opacity: 0.15!important; + } + } + + .primary.djs-shape { + .djs-visual rect { + stroke: $primary-color!important; + fill: $primary-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $primary-color!important; + } + + .djs-visual circle { + stroke: $primary-color!important; + fill: $primary-color!important; + fill-opacity: 0.15!important; + } + } + + .warning.djs-connection { + .djs-visual path { + stroke: $warning-color!important; + marker-end: url(#sequenceflow-end-white-fail)!important; + } + } + + .warning.djs-connection.condition-expression { + .djs-visual path { + marker-start: url(#conditional-flow-marker-white-fail)!important; + } + } + + .warning.djs-shape { + .djs-visual rect { + stroke: $warning-color!important; + fill: $warning-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $warning-color!important; + } + + .djs-visual path:nth-child(2) { + stroke: $warning-color!important; + fill: $warning-color!important; + } + + .djs-visual circle { + stroke: $warning-color!important; + fill: $warning-color!important; + fill-opacity: 0.15!important; + } + } + + .danger.djs-shape { + .djs-visual rect { + stroke: $danger-color!important; + fill: $danger-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $danger-color!important; + } + + .djs-visual circle { + stroke: $danger-color!important; + fill: $danger-color!important; + fill-opacity: 0.15!important; + } + } + + .cancel.djs-shape { + .djs-visual rect { + stroke: $cancel-color!important; + fill: $cancel-color!important; + fill-opacity: 0.15!important; + } + + .djs-visual polygon { + stroke: $cancel-color!important; + } + + .djs-visual circle { + stroke: $cancel-color!important; + fill: $cancel-color!important; + fill-opacity: 0.15!important; + } + } +} + +.process-viewer .djs-tooltip-container, .process-viewer .djs-overlay-container, .process-viewer .djs-palette { + display: none; +} diff --git a/src/plugins/package/theme/process-designer.scss b/src/plugins/package/theme/process-designer.scss new file mode 100644 index 0000000..f25e98d --- /dev/null +++ b/src/plugins/package/theme/process-designer.scss @@ -0,0 +1,153 @@ +// 边框被 token-simulation 样式覆盖了 +.djs-palette { + background: var(--palette-background-color); + border: solid 1px var(--palette-border-color) !important; + border-radius: 2px; +} + +.my-process-designer { + padding: 5px 0 10px 10px; + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + box-sizing: border-box; + .my-process-designer__header { + width: 100%; + min-height: 36px; + .el-button { + text-align: center; + } + .el-button-group { + margin: 4px; + } + .el-tooltip__popper { + .el-button { + width: 100%; + text-align: left; + padding-left: 8px; + padding-right: 8px; + } + .el-button:hover { + background: rgba(64, 158, 255, 0.8); + color: #ffffff; + } + } + .align { + position: relative; + i { + &:after { + content: "|"; + position: absolute; + transform: rotate(90deg) translate(200%, 60%); + } + } + } + .align.align-left i { + transform: rotate(90deg); + } + .align.align-right i { + transform: rotate(-90deg); + } + .align.align-top i { + transform: rotate(180deg); + } + .align.align-bottom i { + transform: rotate(0deg); + } + .align.align-center i { + transform: rotate(90deg); + &:after { + transform: rotate(90deg) translate(0, 60%); + } + } + .align.align-middle i { + transform: rotate(0deg); + &:after { + transform: rotate(90deg) translate(0, 60%); + } + } + } + .my-process-designer__container { + display: inline-flex; + width: 100%; + flex: 1; + .my-process-designer__canvas { + flex: 1; + height: 100%; + position: relative; + background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdHRlcm4gaWQ9ImEiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHBhdGggZD0iTTAgMTBoNDBNMTAgMHY0ME0wIDIwaDQwTTIwIDB2NDBNMCAzMGg0ME0zMCAwdjQwIiBmaWxsPSJub25lIiBzdHJva2U9IiNlMGUwZTAiIG9wYWNpdHk9Ii4yIi8+PHBhdGggZD0iTTQwIDBIMHY0MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZTBlMGUwIi8+PC9wYXR0ZXJuPjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2EpIi8+PC9zdmc+") + repeat !important; + div.toggle-mode { + display: none; + } + } + .my-process-designer__property-panel { + height: 100%; + overflow: scroll; + overflow-y: auto; + z-index: 10; + * { + box-sizing: border-box; + } + } + svg { + width: 100%; + height: 100%; + min-height: 100%; + overflow: hidden; + } + } +} + +//侧边栏配置 +.djs-palette.open { + .djs-palette-entries { + div[class^="bpmn-icon-"]:before, + div[class*="bpmn-icon-"]:before { + line-height: unset; + } + div.entry { + position: relative; + } + div.entry:hover { + &::after { + width: max-content; + content: attr(title); + vertical-align: text-bottom; + position: absolute; + right: -10px; + top: 0; + bottom: 0; + overflow: hidden; + transform: translateX(100%); + font-size: 0.5em; + display: inline-block; + text-decoration: inherit; + font-variant: normal; + text-transform: none; + background: #fafafa; + box-shadow: 0 0 6px #eeeeee; + border: 1px solid #cccccc; + box-sizing: border-box; + padding: 0 16px; + border-radius: 4px; + z-index: 100; + } + } + } +} +pre { + margin: 0; + height: 100%; + overflow: hidden; + max-height: calc(80vh - 32px); + overflow-y: auto; +} +.hljs { + word-break: break-word; + white-space: pre-wrap; +} +.hljs * { + font-family: Consolas, Monaco, monospace; +} diff --git a/src/plugins/package/theme/process-panel.scss b/src/plugins/package/theme/process-panel.scss new file mode 100644 index 0000000..5c7c3df --- /dev/null +++ b/src/plugins/package/theme/process-panel.scss @@ -0,0 +1,110 @@ +.process-design { + .process-panel__container { + box-sizing: border-box; + padding: 0 8px; + border-left: 1px solid #eeeeee; + box-shadow: 0 0 8px #cccccc; + max-height: 100%; + overflow-y: scroll; + } + .panel-tab__title { + font-weight: 600; + padding: 0 8px; + font-size: 1.1em; + line-height: 1.2em; + i { + margin-right: 8px; + font-size: 1.2em; + } + } + .panel-tab__content { + width: 100%; + box-sizing: border-box; + border-top: 1px solid #eeeeee; + padding: 8px 16px; + .panel-tab__content--title { + display: flex; + justify-content: space-between; + padding-bottom: 8px; + span { + flex: 1; + text-align: left; + } + } + } + .element-property { + width: 100%; + display: flex; + align-items: flex-start; + margin: 8px 0; + .element-property__label { + display: block; + width: 90px; + text-align: right; + overflow: hidden; + padding-right: 12px; + line-height: 32px; + font-size: 14px; + box-sizing: border-box; + } + .element-property__value { + flex: 1; + line-height: 32px; + } + .el-form-item { + width: 100%; + margin-bottom: 0; + padding-bottom: 18px; + } + } + .list-property { + flex-direction: column; + .element-listener-item { + width: 100%; + display: inline-grid; + grid-template-columns: 16px auto 32px 32px; + grid-column-gap: 8px; + } + .element-listener-item + .element-listener-item { + margin-top: 8px; + } + } + .listener-filed__title { + display: inline-flex; + width: 100%; + justify-content: space-between; + align-items: center; + margin-top: 0; + span { + width: 200px; + text-align: left; + font-size: 14px; + } + i { + margin-right: 8px; + } + } + .element-drawer__button { + margin-top: 8px; + width: 100%; + display: inline-flex; + justify-content: space-around; + } + .element-drawer__button > .el-button { + width: 100%; + } + + .el-collapse-item__content { + padding-bottom: 0; + } + .el-input.is-disabled .el-input__inner { + color: #999999; + } + .el-form-item.el-form-item--mini { + margin-bottom: 0; + & + .el-form-item { + margin-top: 16px; + } + } +} + diff --git a/src/plugins/package/utils.js b/src/plugins/package/utils.js new file mode 100644 index 0000000..1f1926d --- /dev/null +++ b/src/plugins/package/utils.js @@ -0,0 +1,69 @@ +// 创建监听器实例 +export function createListenerObject(options, isTask, prefix) { + const listenerObj = Object.create(null); + listenerObj.event = options.event; + // isTask && (listenerObj.id = options.id); // 任务监听器特有的 id 字段 + switch (options.listenerType) { + case "scriptListener": + listenerObj.script = createScriptObject(options, prefix); + break; + case "expressionListener": + listenerObj.expression = options.expression; + break; + case "delegateExpressionListener": + listenerObj.delegateExpression = options.delegateExpression; + break; + default: + listenerObj.class = options.class; + } + // 注入字段 + if (options.fields) { + listenerObj.fields = options.fields.map(field => { + return createFieldObject(field, prefix); + }); + } + // 任务监听器的 定时器 设置 + if (isTask && options.event === "timeout" && !!options.eventDefinitionType) { + const timeDefinition = window.bpmnInstances.moddle.create("bpmn:FormalExpression", { body: options.eventTimeDefinitions }); + const TimerEventDefinition = window.bpmnInstances.moddle.create("bpmn:TimerEventDefinition", { + id: `TimerEventDefinition_${uuid(8)}`, + [`time${options.eventDefinitionType.replace(/^\S/, s => s.toUpperCase())}`]: timeDefinition + }); + listenerObj.eventDefinitions = [TimerEventDefinition]; + } + return window.bpmnInstances.moddle.create(`${prefix}:${isTask ? "TaskListener" : "ExecutionListener"}`, listenerObj); +} + +// 创建 监听器的注入字段 实例 +export function createFieldObject(option, prefix) { + const { name, fieldType, string, expression } = option; + const fieldConfig = fieldType === "string" ? { name, string } : { name, expression }; + return window.bpmnInstances.moddle.create(`${prefix}:Field`, fieldConfig); +} + +// 创建脚本实例 +export function createScriptObject(options, prefix) { + const { scriptType, scriptFormat, value, resource } = options; + const scriptConfig = scriptType === "inlineScript" ? { scriptFormat, value } : { scriptFormat, resource }; + return window.bpmnInstances.moddle.create(`${prefix}:Script`, scriptConfig); +} + +// 更新元素扩展属性 +export function updateElementExtensions(element, extensionList) { + const extensions = window.bpmnInstances.moddle.create("bpmn:ExtensionElements", { + values: extensionList + }); + window.bpmnInstances.modeling.updateProperties(element, { + extensionElements: extensions + }); +} + +// 创建一个id +export function uuid(length = 8, chars) { + let result = ""; + let charsString = chars || "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + for (let i = length; i > 0; --i) { + result += charsString[Math.floor(Math.random() * charsString.length)]; + } + return result; +} diff --git a/src/router/index.js b/src/router/index.js index b112ea8..a8bb327 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -46,6 +46,11 @@ export const constantRoutes = [ component: () => import("@/views/login"), hidden: true, }, + { + path: "/entLogin", + component: () => import("@/views/entLogin"), + hidden: true, + }, { path: "/register", component: () => import("@/views/register"), @@ -101,27 +106,27 @@ export const constantRoutes = [ meta: { title: '个人中心', icon: 'user' } }, { - path: 'declareAddContent', + path: 'onlineDeclareAdd', component: () => import('@/views/onlineDeclaration/declareAddContent/index'), - name: 'declareAddContent', + name: 'onlineDeclareAdd', meta: { title: '新增申报', icon: 'user' } }, { - path: 'declareDetailContent', + path: 'onlineDeclareInfo', component: () => import('@/views/onlineDeclaration/declareDetailContent/index'), - name: 'declareDetailContent', + name: 'onlineDeclareInfo', meta: { title: '申报详情', icon: 'user' } }, { - path: 'templateDetail', + path: 'onlineDeclareDetail', component: () => import('@/views/onlineDeclaration/templateDetail/index'), - name: 'templateDetail', + name: 'onlineDeclareDetail', meta: { title: '模版详情', icon: 'user' } }, { - path: 'supplementaryNew', + path: 'onlineDeclareTInfo', component: () => import('@/views/onlineDeclaration/supplementary/index'), - name: 'supplementaryNew', + name: 'onlineDeclareTInfo', meta: { title: '模版详情', icon: 'user' } }, { @@ -131,11 +136,17 @@ export const constantRoutes = [ meta: { title: '项目详情', icon: 'user' } }, { - path: 'enterInfo', + path: 'enterpriselibraryInfo', component: () => import('@/views/enterpriselibrary/enterInfo/index'), - name: 'enterInfo', + name: 'enterpriselibraryInfo', meta: { title: '企业详情', icon: 'user' } }, + { + path: 'onlineDeclarebBuild', + component: () => import('@/views/tool/build/index'), + name: 'onlineDeclarebBuild', + meta: { title: '表单构建', icon: 'user' } + }, ] } ]; diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 36a8fb5..023c099 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -170,7 +170,14 @@ const user = { // 退出系统 LogOut({ commit, state }) { - if(state.userType == "01") { + if(!state.token && state.clientToken) { + enterpriseLogout({clienttoken: state.clientToken}).then(()=>{ + commit('SET_CLIENTTOKEN', '') + removeClientToken() + }).catch(error => { + reject(error) + }) + } else if(state.userType == "01") { return new Promise((resolve, reject) => { enterpriseLogout({clienttoken: state.clientToken}).then(()=>{ commit('SET_CLIENTTOKEN', '') diff --git a/src/utils/echart.js b/src/utils/echart.js new file mode 100644 index 0000000..32208f7 --- /dev/null +++ b/src/utils/echart.js @@ -0,0 +1,44 @@ +//echarts专用求最大公约数 不含小数 +export function chartlcm (a, b) { + var result = 1; + for (var i = 1; i <= a && i <= b; i++) { + + if (a % i == 0 && b % i == 0) { + result = i; + } + if (result > 1 && i >= 10)//公约数大于10的时候 直接跳出 避免y轴刻度太多 (如果不介意刻度太多可以把这一段去掉) + break; + } + return result; +} + + +//获取echarts 多Y轴的最大值和间隔值 lcmval 最大公约数 divisor 间隔数量 +export function YmaxvalAndinterval (m, n, lcmval, divisor) { + + var interval1 = Math.ceil(m / lcmval); + var interval2 = Math.ceil(n / lcmval); + + if (lcmval != 1 && lcmval != 0 && lcmval <= 10) + { + return { max1: m, max2: n, interval1: interval1, interval2: interval2 } + } + + if (divisor == undefined || divisor == null) + divisor = 5; + + //var mval = m % divisor; + //if (mval > 0) { + // m = ((m - mval) / divisor + 1) * divisor + //} + m = Math.ceil(m / divisor) * divisor + + n = Math.ceil(n / divisor) * divisor + + interval1 = Math.ceil(m / divisor ); + + interval2 = Math.ceil(n / divisor); + + return { max1: m, max2: n, interval1: interval1, interval2: interval2 } + +} \ No newline at end of file diff --git a/src/utils/index.js b/src/utils/index.js index b582bf1..b5f0669 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -285,6 +285,43 @@ export function deepClone(source) { return targetObj } +// 深拷贝对象 +export function deepCloneTwo(obj) { + const _toString = Object.prototype.toString + + // null, undefined, non-object, function + if (!obj || typeof obj !== 'object') { + return obj + } + + // DOM Node + if (obj.nodeType && 'cloneNode' in obj) { + return obj.cloneNode(true) + } + + // Date + if (_toString.call(obj) === '[object Date]') { + return new Date(obj.getTime()) + } + + // RegExp + if (_toString.call(obj) === '[object RegExp]') { + const flags = [] + if (obj.global) { flags.push('g') } + if (obj.multiline) { flags.push('m') } + if (obj.ignoreCase) { flags.push('i') } + + return new RegExp(obj.source, flags.join('')) + } + + const result = Array.isArray(obj) ? [] : obj.constructor ? new obj.constructor() : {} + + for (const key in obj) { + result[key] = deepCloneTwo(obj[key]) + } + + return result +} /** * @param {Array} arr * @returns {Array} diff --git a/src/views/components/myDialog/index.vue b/src/views/components/myDialog/index.vue index 20a76fd..90736eb 100644 --- a/src/views/components/myDialog/index.vue +++ b/src/views/components/myDialog/index.vue @@ -6,6 +6,7 @@ :close-on-press-escape="false" :custom-class="myclass ? 'custom-my-class':''" @close="resetCancel" + :width="width" append-to-body > @@ -38,7 +39,11 @@ export default { closeText:{ type:String, default:'取消' - } + }, + width: { + type:String, + default:"50%" + }, }, methods:{ open(){ @@ -65,7 +70,7 @@ export default { .el-dialog__header { border-bottom: 1px solid #DDDDDD; span { - font-family: PingFang-SC, PingFang-SC; + // font-family: PingFang-SC, PingFang-SC; font-weight: 800; font-size: 16px; color: #000000; diff --git a/src/views/components/myEditor/index.vue b/src/views/components/myEditor/index.vue new file mode 100644 index 0000000..ffc9677 --- /dev/null +++ b/src/views/components/myEditor/index.vue @@ -0,0 +1,113 @@ + + + + + + + + diff --git a/src/views/dataCloudMap/components/collectDialog.vue b/src/views/dataCloudMap/components/collectDialog.vue new file mode 100644 index 0000000..b3ee4f6 --- /dev/null +++ b/src/views/dataCloudMap/components/collectDialog.vue @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/dataCloudMap/components/echartData.vue b/src/views/dataCloudMap/components/echartData.vue new file mode 100644 index 0000000..76f8ca7 --- /dev/null +++ b/src/views/dataCloudMap/components/echartData.vue @@ -0,0 +1,268 @@ + + + + + + + + {{ serviceData.valueAdded }} + 亿元 + + 【{{ serviceData.developYear }}】服务业增加值 + + + + + + + {{ serviceData.increaseSpeed }} + % + + 【{{ serviceData.developYear }}】服务业增速 + + + + + + + {{ serviceData.gdpProportion }} + % + + 【{{ serviceData.developYear }}】服务业增加值占GDP比重 + + + + + + + + diff --git a/src/views/dataCloudMap/components/headquarterEnterprise.vue b/src/views/dataCloudMap/components/headquarterEnterprise.vue new file mode 100644 index 0000000..b9f260c --- /dev/null +++ b/src/views/dataCloudMap/components/headquarterEnterprise.vue @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + 重置 + 查询 + + + + + + + 全部(343) + 省级总部(67) + 市级总部(149) + 区级总部(127) + + + + + + + + + + + {{ scope.row.type }} + + + + + + + + + 企业详情 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/dataCloudMap/components/honorDialog.vue b/src/views/dataCloudMap/components/honorDialog.vue new file mode 100644 index 0000000..752f798 --- /dev/null +++ b/src/views/dataCloudMap/components/honorDialog.vue @@ -0,0 +1,192 @@ + + + + + + + + + {{ scope.row.count1 }} + + + + + + {{ scope.row.count2 }} + + + + + + {{ scope.row.count3 }} + + + + + {{ scope.row.currentYearAdd }} + + + + + + + + + diff --git a/src/views/dataCloudMap/components/serviceIndustry.vue b/src/views/dataCloudMap/components/serviceIndustry.vue new file mode 100644 index 0000000..803852b --- /dev/null +++ b/src/views/dataCloudMap/components/serviceIndustry.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + 重置 + 查询 + + + + + + + + + + + + 企业详情 + + + + + + + + + + \ No newline at end of file diff --git a/src/views/dataCloudMap/index.vue b/src/views/dataCloudMap/index.vue index b598eb8..1789fa3 100644 --- a/src/views/dataCloudMap/index.vue +++ b/src/views/dataCloudMap/index.vue @@ -1,13 +1,544 @@ - - + + + + + + + + + + 服务业发展总览 + + 【统计数据截至:{{ time }}】 + + + + + + {{ item.name }} + + + + + + + + + + + + + + 行业纵深情况 + + 【统计数据截至:{{ time }}】 + + 查看更多数据>> + + + + + + + 全年营收 + (亿元) + + + {{ scope.row.yearRevenue }} + + + + + 增加值 + (亿元) + + + {{ scope.row.addValue }} + + + + + 增加值增速 + (按不变价) + + + {{ scope.row.growth }} % + + + + + {{ scope.row.gdpProportion }} % + + + + + + + + + + + + + + 企业情况 + + 【统计数据截至:{{ time }}】 + + + + + + + 生产性服务业 + + + + + 规上企业数量: + + + 768 + 家 + + + + + + 规上企业营收: + + + 1913 + 亿 + + + + + + 全口径增加值: + + + 132 + 亿 + + + + + + + 生活性服务业 + + + + + 规上企业数量: + + + 768 + 家 + + + + + + 规上企业营收: + + + 1913 + 亿 + + + + + + 全口径增加值: + + + 132 + 亿 + + + + + + + 新兴服务业 + + + + + 规上企业数量: + + + 768 + 家 + + + + + + 规上企业营收: + + + 1913 + 亿 + + + + + + 全口径增加值: + + + 132 + 亿 + + + + + + + 限上批零住餐 + + + + + 规上企业数量: + + + 768 + 家 + + + + + + 规上企业营收: + + + 1913 + 亿 + + + + + + 全口径增加值: + + + 132 + 亿 + + + + + + + 总部企业 + + + + + 企业数量: + + 365 + + 家 + + + + + + + + 税收贡献: + + 1913 + + 亿 + + 增值税+企业所得税-免抵调库 + + + + + + + + + + 经营数据: + + 132 + + 亿 + + + 制造业总部提供产值 + 服务业总部提供营收 + 建筑业总部提供产值 + 贸易类总部提供销售额 + + + + + + + + + + + + + + + + + + 荣誉情况 + + 【统计数据截至:{{ time }}】 + + 查看更多数据>> + + + + 领军企业 + + {{ honorData.count1 }} + 家 + + + + 两业融合试点 + + {{ honorData.count2 }} + 家 + + + + 工业设计 + + {{ honorData.count3 }} + 家 + + + + 服务型制造示范 + + {{ honorData.count4 }} + 家 + + + + 现代服务业集聚区 + + {{ honorData.count5 }} + 家 + + + + 楼宇经济 + + {{ honorData.count6 }} + 家 + + + + + + + + + + + + 项目追踪情况 + + 【统计数据截至:{{ time }}】 + + 查看更多数据>> + + + + + + + {{ scope.row.startTime }}~{{ scope.row.endTime }} + 长期有效 + + + + + {{ scope.row.count }} + + + + + + + + + + + - - - diff --git a/src/views/entLogin.vue b/src/views/entLogin.vue new file mode 100644 index 0000000..0dd908b --- /dev/null +++ b/src/views/entLogin.vue @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 记住密码 + + + 登 录 + 登 录 中... + + + 政务通统一身份认证登录 + + + + 立即注册 + + + + + + 企业登录 + 登 录 中... + + + + + + + + + + + + + + + + diff --git a/src/views/enterpriselibrary/enterInfo/components/tabFour/index.vue b/src/views/enterpriselibrary/enterInfo/components/tabFour/index.vue index bb79007..d50b990 100644 --- a/src/views/enterpriselibrary/enterInfo/components/tabFour/index.vue +++ b/src/views/enterpriselibrary/enterInfo/components/tabFour/index.vue @@ -40,7 +40,7 @@ - + {{ item.name }} @@ -279,7 +279,7 @@ export default { type: "warning", }) .then(() => { - delJMemorandum({ id: row.id }).then((res) => { + delJMemorandum(row.id).then((res) => { this.getList(); this.$message({ type: "success", diff --git a/src/views/enterpriselibrary/enterInfo/components/tabOne/index.vue b/src/views/enterpriselibrary/enterInfo/components/tabOne/index.vue index 2f6b864..fdbf4d1 100644 --- a/src/views/enterpriselibrary/enterInfo/components/tabOne/index.vue +++ b/src/views/enterpriselibrary/enterInfo/components/tabOne/index.vue @@ -1,7 +1,7 @@ - - 【企业基本信息】 - + + 【企业基本信息】 + + + {{ info.qymc }} + + + {{ info.bszh }} + + + {{ info.tyshxydm }} + + + {{ info.qyzch }} + - {{ info.institutionCode }} + {{ info.zzjgdm }} + + + {{ info.jjlxdm }} - - {{ info.statisticalCategories }} + + {{ info.jjlxmc }} + + + {{ info.qylxdm }} + + + {{ info.qylxmc }} + + + {{ info.zczj }} + + + {{ info.zczbbz }} + + + {{ info.zclx }} + + + {{ info.jyhyyqsrq }} + + + {{ info.jyhyyjzrq }} - {{ info.industryCode }} + {{ info.hydm }} + + + {{ info.hymc }} + + + {{ info.hymc }} - - {{ info.registeredCapital }} + + {{ info.cylx }} - - {{ info.industry }} + + {{ info.qyzs }} + + + {{ info.jycs }} + + + {{ info.jycsxzqh }} + + + {{ info.yzbm }} - {{ info.establishDate }} + {{ info.clrq }} - - {{ info.formerName }} + + {{ info.xydj }} - - - {{ info.enrollAddress }} + + + {{ info.type == 1 ? "规上服务业" : info.type == 2 ? "其他" : ""}} - - {{ info.enrollType }} + + {{ info.fddbrxm }} + + + {{ info.fddbrzjhm }} + + + {{ info.djjg }} + + + {{ info.hzrq }} + + + {{ info.jyzt }} + + + {{ info.ztrq }} + + + {{ info.zxrq }} + + + {{ info.dxrq }} + + + {{ info.lxdh }} + + + {{ info.sfyqn }} + + + {{ info.dwTimestamp }} + + + {{ info.dwLyjg }} - {{ info.business }} + {{ info.jyfw }} - + diff --git a/src/views/index.vue b/src/views/index.vue index 3efe4a8..36ec5cd 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -16,4 +16,4 @@ export default { }; - + \ No newline at end of file diff --git a/src/views/infoMaintain/index.vue b/src/views/infoMaintain/index.vue index 6204893..510e0c0 100644 --- a/src/views/infoMaintain/index.vue +++ b/src/views/infoMaintain/index.vue @@ -23,13 +23,14 @@ --> - 重置 - 查询 + 重置 + 查询 - 新增常用联系人 + + 新增常用联系人 @@ -214,11 +215,11 @@ export default { // 重置 resetQuery(formName){ this.$nextTick(() => { - this.$refs[formName].resetFields(); if(this.userType == "01") { this.pagination.current = 1; this.pagination.size = 10; } else { + this.$refs[formName].resetFields(); this.pagination = { current: 1, size: 10 @@ -319,7 +320,7 @@ export default { type: "warning", }) .then(() => { - jEnterpriseContactDel({ id: row.id }).then((res) => { + jEnterpriseContactDel(row.id).then((res) => { this.getList(); this.$message({ type: "success", diff --git a/src/views/intelligentReminder/index.vue b/src/views/intelligentReminder/index.vue new file mode 100644 index 0000000..8b5004b --- /dev/null +++ b/src/views/intelligentReminder/index.vue @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + 重置 + 查询 + + + + + 新增智能提醒规则 + + + + + + + + + + + + + + {{ scope.row.alertRecipients == 1 ? "企业用户" : scope.row.alertRecipients == 2 ? "政务用户" : "" }} + + + + + {{ scope.row.alertManner == 1 ? "定期提醒" : scope.row.alertManner == 2 ? "不定期提醒" : "" }} + + + + + {{ scope.row.alertManner == 1 ? scope.row.alertTime : scope.row.alertManner == 2 ? scope.row.daysAdvance + '天' : "" }} + + + + + + + 查看详情 + 修改 + 删除 + + + + + + + + + + + + + + + + + + 政务用户 + 企业用户 + + + + + + + 定期提醒 + 不定期提醒 + + + + + + + + + + + + + + + + 申报任务即将结束(企业) + 项目即将建设完成(政府) + + *提前天提醒 + + + + + + + 所属项目: + + {{ addFrom.qymc }}- + + + + + + + + + + + + + + + + + diff --git a/src/views/login.vue b/src/views/login.vue index 69b9706..2b43296 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -109,6 +109,10 @@ + + + + diff --git a/src/views/onlineDeclaration/declarationManagement/index.vue b/src/views/onlineDeclaration/declarationManagement/index.vue index 78897fb..365b437 100644 --- a/src/views/onlineDeclaration/declarationManagement/index.vue +++ b/src/views/onlineDeclaration/declarationManagement/index.vue @@ -65,7 +65,7 @@ > - {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} + {{(queryParams.current - 1) * queryParams.size + scope.$index + 1}} @@ -114,8 +114,8 @@ id="L-pagination" v-show="total>0" :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" + :page.sync="queryParams.current" + :limit.sync="queryParams.size" @pagination="getList" /> @@ -188,8 +188,8 @@ export default { queryParams: { menuName: undefined, visible: undefined, - ageNum: 1, - pageSize: 20, + current: 1, + size: 10, }, enterpriseId: '', templateDataList: [], @@ -234,8 +234,8 @@ export default { getList() { this.loading = true; listInfo(this.queryParams).then(response => { - this.InfoList = response.rows; - this.total = response.total + this.InfoList = response.data.records; + this.total = response.data.total this.loading = false; }); }, @@ -329,7 +329,7 @@ export default { }, /** 查看表单模版 */ handleTemplate (row) { - this.$router.push({name: 'templateDetail',query: { + this.$router.push({name: 'onlineDeclareDetail',query: { templateId: row.id, pageType: "template", }}) diff --git a/src/views/onlineDeclaration/declareAddContent/index.vue b/src/views/onlineDeclaration/declareAddContent/index.vue index 70a0539..5f6d22c 100644 --- a/src/views/onlineDeclaration/declareAddContent/index.vue +++ b/src/views/onlineDeclaration/declareAddContent/index.vue @@ -13,7 +13,7 @@ 申报单位: - {{ baseInfo.enterpriseName }} + {{ baseInfo.qymc }} @@ -25,8 +25,20 @@ - 项目分类: - + 项目大类: + + + + + + 项目中类: + + + + + + 项目小类: + @@ -47,31 +59,31 @@ 申报企业名称 - {{ baseInfo.enterpriseName }} + {{ baseInfo.qymc }} 统一社会信用代码 - {{ baseInfo.creditCode }} + {{ baseInfo.tyshxydm }} 联络人 - {{ baseInfo.contacts }} + {{ baseInfo.fddbrxm }} 联络电话 - {{ baseInfo.contactsNumber }} + {{ baseInfo.fddbrzjhm }} 企业地址 - {{ baseInfo.address }} + {{ baseInfo.jycs }} @@ -1323,7 +1335,7 @@ export default { name: "declareAddContent", // 'sys_show_hide', 'sys_normal_disable', 'bms_product_area', 'bms_declaration_type','bms_template_type', 'bms_declaration_channels', - dicts: ['bms_responsibility_unit', 'bms_level', 'bms_affiliation_type', 'sys_declaration_type', 'jjh_project_type', 'template_industry', 'new_template_type'], + dicts: ['bms_responsibility_unit', 'bms_level', 'bms_affiliation_type', 'sys_declaration_type', 'jjh_project_type', 'template_industry', 'new_template_type',"project_middle_type", "project_small_type", "project_categories"], data() { //验证手机号的规则 var checkMobile = (rule,value,cb) =>{ @@ -1522,10 +1534,11 @@ export default { // console.log('this.templateInfo: ', this.templateInfo); getBasicInfo({enterpriseId: this.$store.state.user.enterpriseId}).then((response) => { this.baseInfo = response.data + console.log(this.baseInfo); + }) + getOpenInterface({templateRecordId: templateRecordId}).then((response) => { + this.openInterfaceInfo = response.data }) - // getOpenInterface({templateRecordId: templateRecordId}).then((response) => { - // this.openInterfaceInfo = response.data - // }) // templateList({ // responsibilityUnit: this.templateInfo.responsibilityUnit, // enterpriseId: this.$store.state.user.enterpriseId, @@ -1554,16 +1567,16 @@ export default { } }, submitForm(type) { - console.log(this.form); + // console.log(this.form); this.$refs["form"].validate(valid => { if (valid) { let params = { declarationId: this.declarationId, - address: this.baseInfo.address, - contacts: this.baseInfo.contacts, - contactsNumber: this.baseInfo.contactsNumber, - creditCode: this.baseInfo.creditCode, - enterpriseName: this.baseInfo.enterpriseName, + // address: this.baseInfo.address, + // contacts: this.baseInfo.contacts, + // contactsNumber: this.baseInfo.contactsNumber, + tyshxydm: this.baseInfo.tyshxydm, + // enterpriseName: this.baseInfo.enterpriseName, // declarationTemplateType: this.openInterfaceInfo.declarationTemplateType, projectName: this.templateInfo.templateName, year: this.templateInfo.createTime, @@ -1636,10 +1649,14 @@ export default { } }) let detailList = [] - detailList.push({amount: this.form.revenueNowYear1,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear1',year: this.openInterfaceInfo.year}) - detailList.push({amount: this.form.taxationNowYear1,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear1',year: this.openInterfaceInfo.year}) - detailList.push({amount: this.form.revenueNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear',year: Number(this.openInterfaceInfo.year)+1}) - detailList.push({amount: this.form.taxationNowYear,detailId: '',illustrate: '预计税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear',year: Number(this.openInterfaceInfo.year)+1}) + // detailList.push({amount: this.form.revenueNowYear1,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear1',year: this.openInterfaceInfo.year}) + // detailList.push({amount: this.form.taxationNowYear1,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear1',year: this.openInterfaceInfo.year}) + // detailList.push({amount: this.form.revenueNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear',year: Number(this.openInterfaceInfo.year)+1}) + // detailList.push({amount: this.form.taxationNowYear,detailId: '',illustrate: '预计税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear',year: Number(this.openInterfaceInfo.year)+1}) + detailList.push({amount: this.form.revenueNowYear1,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear1',year: 2021}) + detailList.push({amount: this.form.taxationNowYear1,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear1',year: 2021}) + detailList.push({amount: this.form.revenueNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear',year: 2022}) + detailList.push({amount: this.form.taxationNowYear,detailId: '',illustrate: '预计税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear',year: 2022}) params.fundingDetailList = detailList // console.log('11', params); addProjectSettlementAward(params).then((response) => { @@ -1663,14 +1680,22 @@ export default { } }) let detailList = [] - detailList.push({amount: this.form.revenueNowYear3,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear3',year: this.openInterfaceInfo.year}) - detailList.push({amount: this.form.taxationNowYear3,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear3',year: this.openInterfaceInfo.year}) - detailList.push({amount: this.form.revenueNowYear2,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear2',year: Number(this.openInterfaceInfo.year)+1}) - detailList.push({amount: this.form.taxationNowYear2,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear2',year: Number(this.openInterfaceInfo.year)+1}) - detailList.push({amount: this.form.revenueNowYear1,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear1',year: Number(this.openInterfaceInfo.year)+2}) - detailList.push({amount: this.form.taxationNowYear1,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear1',year: Number(this.openInterfaceInfo.year)+2}) - detailList.push({amount: this.form.revenueNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear',year: Number(this.openInterfaceInfo.year)+3}) - detailList.push({amount: this.form.taxationNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear',year: Number(this.openInterfaceInfo.year)+3}) + // detailList.push({amount: this.form.revenueNowYear3,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear3',year: this.openInterfaceInfo.year}) + // detailList.push({amount: this.form.taxationNowYear3,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear3',year: this.openInterfaceInfo.year}) + // detailList.push({amount: this.form.revenueNowYear2,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear2',year: Number(this.openInterfaceInfo.year)+1}) + // detailList.push({amount: this.form.taxationNowYear2,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear2',year: Number(this.openInterfaceInfo.year)+1}) + // detailList.push({amount: this.form.revenueNowYear1,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear1',year: Number(this.openInterfaceInfo.year)+2}) + // detailList.push({amount: this.form.taxationNowYear1,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear1',year: Number(this.openInterfaceInfo.year)+2}) + // detailList.push({amount: this.form.revenueNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear',year: Number(this.openInterfaceInfo.year)+3}) + // detailList.push({amount: this.form.taxationNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear',year: Number(this.openInterfaceInfo.year)+3}) + detailList.push({amount: this.form.revenueNowYear3,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear3',year: 2021}) + detailList.push({amount: this.form.taxationNowYear3,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear3',year: 2021}) + detailList.push({amount: this.form.revenueNowYear2,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear2',year: 2022}) + detailList.push({amount: this.form.taxationNowYear2,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear2',year: 2022}) + detailList.push({amount: this.form.revenueNowYear1,detailId: '',illustrate: '营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear1',year: 2023}) + detailList.push({amount: this.form.taxationNowYear1,detailId: '',illustrate: '税收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear1',year: 2023}) + detailList.push({amount: this.form.revenueNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'revenueNowYear',year: 2024}) + detailList.push({amount: this.form.taxationNowYear,detailId: '',illustrate: '预计营收', templateRecordId: this.templateRecordId,type: this.templateId,vmodel: 'taxationNowYear',year: 2024}) params.fundingDetailList = detailList // console.log('11', params); addBigStrongAward(params).then((response) => { @@ -2328,6 +2353,7 @@ list-style: none; /* 清除列表项前的标记 */ } .templateInfo { display: flex; + align-items: center; justify-content: flex-start; font-size: 14px; .templateInfo_left { diff --git a/src/views/onlineDeclaration/declareDetailContent/index.vue b/src/views/onlineDeclaration/declareDetailContent/index.vue index e017b17..bbfa308 100644 --- a/src/views/onlineDeclaration/declareDetailContent/index.vue +++ b/src/views/onlineDeclaration/declareDetailContent/index.vue @@ -20,7 +20,7 @@ 申报单位: - {{ baseInfo.enterpriseName }} + {{ baseInfo.qymc }} @@ -32,10 +32,28 @@ - 项目分类: + 项目大类: + + + + + 项目中类: + + + + + + 项目小类: + @@ -75,23 +93,23 @@ > 申报企业名称 - {{ baseInfo.enterpriseName }} + {{ baseInfo.qymc }} 统一社会信用代码 - {{ baseInfo.creditCode }} + {{ baseInfo.tyshxydm }} 联络人 - {{ baseInfo.contacts }} + {{ baseInfo.fddbrxm }} 联络电话 - {{ baseInfo.contactsNumber }} + {{ baseInfo.fddbrzjhm }} 企业地址 - {{ baseInfo.address }} + {{ baseInfo.jycs }} @@ -3276,10 +3294,13 @@ > - {{ item.approvalByName }} + {{ item.approvalByName }} 审核意见:{{ item.approvalOpinions }} + + 企业名称:{{ item.enterpriseName }} + 附件 @@ -3428,7 +3449,9 @@ export default { "bms_level", "bms_affiliation_type", "sys_declaration_type", - "jjh_project_type", + "project_middle_type", + "project_small_type", + "project_categories", "template_industry", "new_template_type", ], @@ -3978,11 +4001,11 @@ export default { this.$refs["form"].validate((valid) => { if (valid) { let params = { - address: this.baseInfo.address, - contacts: this.baseInfo.contacts, - contactsNumber: this.baseInfo.contactsNumber, - creditCode: this.baseInfo.creditCode, - enterpriseName: this.baseInfo.enterpriseName, + // address: this.baseInfo.address, + // contacts: this.baseInfo.contacts, + // contactsNumber: this.baseInfo.contactsNumber, + tyshxydm: this.baseInfo.tyshxydm, + // enterpriseName: this.baseInfo.enterpriseName, // declarationTemplateType: this.openInterfaceInfo.declarationTemplateType, // projectName: this.openInterfaceInfo.projectName, // year: this.openInterfaceInfo.year, @@ -4749,27 +4772,47 @@ export default { /* 打印 */ printOutpdf() { - let name = `${this.templateInfo.templateName}_${this.baseInfo.enterpriseName}`; - let domName = this.$refs.pdf; - let _this = this; - - let targetDom = domName; //原本需要截图的div - let clonedNode = targetDom.cloneNode(true); //复制一个 - clonedNode.setAttribute( - "style", - `width: ${targetDom.clientHeight};height: ${targetDom.clientWidth};` - ); - document.body.appendChild(clonedNode); //放到body后面 - - html2canvas(clonedNode, { - allowTaint: true, - taintTest: false, - }).then((canvas) => { - let canvasImg = canvas.toDataURL("image/png"); - _this.downLoadFile(name, canvasImg); - document.body.removeChild(clonedNode); - }); - }, + let name = '' + name = `${this.templateInfo.templateName}_${this.baseInfo.enterpriseName}` + let modalDiv = this.$refs.pdf + let newDiv = modalDiv.cloneNode(true) + newDiv.classList.remove('detail_content'); + newDiv.id = 'reportId' + let newTwoDiv = document.createElement('div'); + newTwoDiv.id = 'detail_content_two' + document.body.appendChild(newTwoDiv) + newTwoDiv.appendChild(newDiv) + let obj = document.getElementById('reportId') + setTimeout(()=>{ + html2canvas(obj).then(function(canvas) { + let contentWidth = canvas.width + let contentHeight = canvas.height + let pageHeight = contentWidth / 592.28 * 841.89 + let leftHeight = contentHeight + let position = 0 + let imgWidth = 595.28 + let imgHeight = 592.28 / contentWidth * contentHeight + let pageData = canvas.toDataURL('image/jpeg', 1.0) + let PDF = new JsPDF('p', 'pt', 'a4') // [592.28 * 841.89] + console.log(pageData); + if (leftHeight < pageHeight) { + PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight) + } else { + // 5 为误差值 + while (leftHeight > 5) { + PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight) + leftHeight -= pageHeight + position -= 841.89 + if (leftHeight > 5) { + PDF.addPage() + } + } + } + PDF.save(name + '.pdf') + newTwoDiv.remove() + }) + },200) + } }, }; @@ -4869,6 +4912,7 @@ li { } .templateInfo { display: flex; + align-items: center; justify-content: flex-start; font-size: 14px; .templateInfo_left { @@ -5067,7 +5111,7 @@ li { } .form { - height: calc(100% - 150px); + // height: calc(100% - 150px); background-color: #fff; padding: 15px; .table-content { diff --git a/src/views/onlineDeclaration/enterpriseDirectory/index.vue b/src/views/onlineDeclaration/enterpriseDirectory/index.vue index 3637132..474ef9c 100644 --- a/src/views/onlineDeclaration/enterpriseDirectory/index.vue +++ b/src/views/onlineDeclaration/enterpriseDirectory/index.vue @@ -57,11 +57,16 @@ + + + + + - {{ scope.row.status == 2 ? '有效' : scope.row.status == 1 ? '过期' : scope.row.status == 0 ? '未开始' : '' }} + {{ scope.row.status == 2 ? '有效' : scope.row.status == 1 ? '过期' : scope.row.status == 0 ? '未开始' : scope.row.status == 3 ? '长期有效' : '' }} - {{ scope.row.startTime }}~{{ scope.row.endTime }} + {{ scope.row.startTime }}~{{ scope.row.endTime }} + 长期有效 @@ -98,14 +104,14 @@ size="mini" type="text" style="color: red;" - v-if="scope.row.status == 1" + v-if="scope.row.status == 1 || scope.row.status == 3" @click="handleReplace(scope.row)" >补录 - 编辑 + >编辑 --> - - + + @@ -145,14 +151,23 @@ - + + + - + + + + 限时 + 不限时 + + + + + + + 不需要审批 + 需要审批 + + + + - + import { listTemplate, listBusiness, exportData, addTemplateRecord, putTemplateRecord, listTemplateInfo, getTemplateRecord, uploadFile, allList, supplementation } from "@/api/onlineDeclartion/enterpriseDirectory" import * as XLSX from 'xlsx' - +import { getAllList } from "@/api/system/dict/data"; export default { name: "EnterpriseDirectory", // 'sys_show_hide', 'sys_normal_disable', 'bms_template_type', - dicts: ['bms_responsibility_unit', 'bms_declaration_channels', 'bms_level', 'jjh_project_type'], + dicts: ['bms_responsibility_unit', 'bms_declaration_channels', 'bms_level', 'jjh_project_type', "project_small_type"], data() { let validateTime = (rule, value, callback) => { if (new Date(value[1]) < new Date()) { @@ -329,6 +363,10 @@ export default { open: false, // 是否是补录按钮点击 isReplace: false, + // 申报表单模板是否可用 + isForm: false, + // 是否审批是否禁用 + isApprovalDisabled: false, // 重新渲染表格状态 refreshTable: true, total: 10, @@ -371,8 +409,14 @@ export default { isFrame: [ { required: true, message: "名录维护方式不能为空", trigger: "blur" } ], + isTime: [ + { required: true, message: "是否限时", trigger: "blur" } + ], fileList: [ { required: true, message: "请上传企业名录", trigger: "blur" } + ], + isApproval: [ + { required: true, message: "是否审批", trigger: "blur" } ] }, businessLoading: false, @@ -387,13 +431,36 @@ export default { excelData: [], tabHeader: undefined, unitId: undefined, - projectId: undefined, + projectBigType: undefined, + projectMiddleType: undefined, + projectSmallType: undefined, diaLoading:false, + optionsTwo: [], + propsTwo:{ + lazy:true, + lazyLoad (node, resolve) { + const { level, data, children } = node; + if(children?.length == 0 ) { + getAllList({dictType: data.dict}).then(res=>{ + const nodes = Array.from(res.data).map((item)=>{ + return { + value:item.dictValue, + label:item.dictLabel, + dict:item.remark, + leaf: level >= 2 + } + }) + resolve(nodes) + }) + } + } + }, }; }, mounted() { this.cancalDebounce(); window.addEventListener('resize', this.cancalDebounce); + this.getDataList(); }, destroyed() { window.removeEventListener('resize', this.cancalDebounce); @@ -403,6 +470,17 @@ export default { this.getTemplateList(); }, methods: { + getDataList(){ + getAllList({dictType:"project_categories"}).then(res=>{ + res.data.map(item => { + let obj = {}; + obj.value = item.dictValue; + obj.label = item.dictLabel; + obj.dict = item.remark; + this.optionsTwo.push(obj); + }) + }) + }, // 屏幕尺寸变化 cancalDebounce(){ const element = document.getElementById('app-container'); // 通过元素的 ID 获取元素 @@ -440,6 +518,8 @@ export default { cancel() { this.open = false; this.isReplace = false; + this.isForm = false; + this.isApprovalDisabled = false; this.reset(); }, // 表单重置 @@ -452,6 +532,8 @@ export default { notes: undefined, orderNum: undefined, isFrame: 0, + isTime: 0, + isApproval: 0, }; this.resetForm("form"); }, @@ -469,10 +551,54 @@ export default { this.reset(); this.open = true; this.isReplace = false; + this.isForm = true; + this.isApprovalDisabled = false; this.fileList = []; this.form.isFrame = 0; + this.form.isTime = 0; + this.form.isApproval = 0; this.title = "发布申报任务"; }, + /** 回显Cascader 级联选择器数据 */ + echoCascader(arr){ + getAllList({dictType:"project_categories"}).then(res=>{ + let obj = {}; + let objTwo = {}; + let objThree = {}; + res.data.map(item => { + if(arr[0] == item.dictValue) { + obj.value = item.dictValue; + obj.label = item.dictLabel; + obj.dict = item.remark; + obj.children = []; + getAllList({dictType: item.remark}).then(resTwo=>{ + resTwo.data.map((itemTwo)=>{ + if(arr[1] == itemTwo.dictValue) { + objTwo.value = itemTwo.dictValue; + objTwo.label = itemTwo.dictLabel; + objTwo.dict = itemTwo.remark; + objTwo.children = []; + obj.children.push(objTwo) + getAllList({dictType: itemTwo.remark}).then(resThree => { + resThree.data.map((itemThree)=>{ + if(arr[2] == itemThree.dictValue) { + objThree.value = itemThree.dictValue; + objThree.label = itemThree.dictLabel; + objThree.dict = itemThree.remark; + objThree.leaf = 'leaf'; + objTwo.children.push(objThree) + this.optionsTwo.push(obj); + } + }) + }) + } + }) + }) + + } + }) + }) + }, /** 补录按钮操作 */ handleReplace(row){ this.reset(); @@ -480,9 +606,19 @@ export default { this.form = response.data; this.open = true; this.isReplace = true; + this.isForm = true; + this.isApprovalDisabled = true; this.title = "申报补录"; this.form.responsibilityUnit = this.form.responsibilityUnit + '' - this.form.projectClassify = this.form.projectClassify + '' + let arr = []; + if(response.data.projectBigType && response.data.projectMiddleType && response.data.projectSmallType) { + arr.push(response.data.projectBigType + '') + arr.push(response.data.projectMiddleType + '') + arr.push(response.data.projectSmallType + '') + } + this.echoCascader(arr) + // this.form.projectClassify = this.form.projectClassify + '' + this.form.projectClassify = arr this.form.road = this.form.road + '' if(this.form.fileName) { @@ -494,11 +630,19 @@ export default { } else { this.$set(this.form, 'isFrame', 0) } + if(this.form.startTime && this.form.endTime) { + let arr = [] + arr.push(this.form.startTime, this.form.endTime) + this.$set(this.form, 'reportTime', arr) + this.$set(this.form, 'isTime', 0) + } else { + this.$set(this.form, 'isTime', 1) + } this.form.fileList = this.form.fileName || [] this.fileList = this.form.fileName || [] - let arr = [] - arr.push(this.form.startTime, this.form.endTime) - this.$set(this.form, 'reportTime', arr) + // let arr = [] + // arr.push(this.form.startTime, this.form.endTime) + // this.$set(this.form, 'reportTime', arr) this.templateList = this.templateListLock.filter((item) => { return item.responsibilityUnit == this.form.responsibilityUnit }) @@ -512,6 +656,8 @@ export default { this.form = response.data; this.open = true; this.isReplace = false; + this.isForm = false; + this.isApprovalDisabled = false; this.title = "修改申报任务"; this.form.responsibilityUnit = this.form.responsibilityUnit + '' this.form.projectClassify = this.form.projectClassify + '' @@ -524,11 +670,17 @@ export default { } else { this.$set(this.form, 'isFrame', 0) } + if(this.form.startTime && this.form.endTime) { + let arr = [] + arr.push(this.form.startTime, this.form.endTime) + this.$set(this.form, 'reportTime', arr) + this.$set(this.form, 'isTime', 0) + } else { + this.$set(this.form, 'isTime', 1) + } this.form.fileList = this.form.fileName || [] this.fileList = this.form.fileName || [] - let arr = [] - arr.push(this.form.startTime, this.form.endTime) - this.$set(this.form, 'reportTime', arr) + // console.log(this.form,"form"); this.templateList = this.templateListLock.filter((item) => { @@ -553,6 +705,8 @@ export default { this.$modal.msgSuccess("补录成功"); this.open = false; this.isReplace = false; + this.isForm = false; + this.isApprovalDisabled = false; this.getList(); }) } else if (this.form.id != undefined) { @@ -561,6 +715,8 @@ export default { this.$modal.msgSuccess("修改成功"); this.open = false; this.isReplace = false; + this.isForm = false; + this.isApprovalDisabled = false; this.getList(); }); } else { @@ -569,6 +725,8 @@ export default { this.$modal.msgSuccess("新增成功"); this.open = false; this.isReplace = false; + this.isForm = false; + this.isApprovalDisabled = false; this.getList(); }); } @@ -623,14 +781,14 @@ export default { // 责任单位选择 changeResponsibilityUnit(valid) { this.unitId = valid; - - if(this.projectId) { + if(this.projectBigType && this.projectMiddleType && this.projectSmallType) { + this.isForm = false; // this.templateList = this.templateListLock.filter((item) => { // return item.responsibilityUnit == valid // }) this.templateList = [] this.form.templateId = "" - allList({responsibilityUnit:Number(valid),projectClassify:Number(this.projectId)}).then(res=>{ + allList({responsibilityUnit:Number(valid),projectBigType:this.projectBigType,projectMiddleType:this.projectMiddleType,projectSmallType:this.projectSmallType}).then(res=>{ // console.log(res); this.templateList = res.data || [] }) @@ -640,17 +798,28 @@ export default { }, // 项目分类选择 changeProjectClassify(valId){ - this.projectId = valId - if(this.unitId) { - // this.templateList = this.templateListLock.filter((item) => { - // return item.responsibilityUnit == valId - // }) - this.templateList = [] - this.form.templateId = "" - allList({responsibilityUnit:Number(this.unitId),projectClassify:Number(valId)}).then(res=>{ - // console.log(res); - this.templateList = res.data || [] - }) + if(valId) { + this.projectBigType = valId[0] + this.projectMiddleType = valId[1] + this.projectSmallType = valId[2] + if(this.projectBigType == 11) { + this.isApprovalDisabled = true; + this.form.isApproval = 0; + } else { + this.isApprovalDisabled = false; + } + if(this.unitId) { + this.isForm = false; + // this.templateList = this.templateListLock.filter((item) => { + // return item.responsibilityUnit == valId + // }) + this.templateList = [] + this.form.templateId = "" + allList({responsibilityUnit:Number(this.unitId),projectBigType:this.projectBigType,projectMiddleType:this.projectMiddleType,projectSmallType:this.projectSmallType}).then(res=>{ + // console.log(res); + this.templateList = res.data || [] + }) + } } }, changeTemplate(){ diff --git a/src/views/onlineDeclaration/pendingReview/index.vue b/src/views/onlineDeclaration/pendingReview/index.vue index f1a87a9..544727b 100644 --- a/src/views/onlineDeclaration/pendingReview/index.vue +++ b/src/views/onlineDeclaration/pendingReview/index.vue @@ -164,7 +164,7 @@ 审批通过 - 审批驳回 + 审批不通过 退回修改 @@ -308,7 +308,7 @@ export default { }, /** 新增按钮操作 */ handleView(row) { - this.$router.push({name: 'declareDetailContent',query: { + this.$router.push({name: 'onlineDeclareInfo',query: { templateId: row.templateId, templateRecordId: row.templateRecordId, pageType: "detail", diff --git a/src/views/onlineDeclaration/records/index.vue b/src/views/onlineDeclaration/records/index.vue index bca43e6..0a79021 100644 --- a/src/views/onlineDeclaration/records/index.vue +++ b/src/views/onlineDeclaration/records/index.vue @@ -82,12 +82,16 @@ 全部 - 初审 - 复审 - - 终审 - - 终审通过 + 待填报 + 已填报 + 初审中 + 初审驳回 + 初审不通过 + 复审中 + 复审不通过 + 终审中 + 终审不通过 + 评审通过 @@ -174,6 +178,11 @@ + + + + + @@ -218,6 +227,7 @@ 初审不通过 复审不通过 + 已填报 终审不通过 初审驳回 @@ -366,7 +376,7 @@ import * as XLSX from 'xlsx' import { Message, Loading } from 'element-ui' export default { name: "Records", - dicts: ['sys_show_hide', 'sys_normal_disable', 'bms_declaration_type', 'bms_responsibility_unit', 'bms_level', 'bms_template_type', 'bms_declaration_channels'], + dicts: ['sys_show_hide', 'sys_normal_disable', 'bms_declaration_type', 'bms_responsibility_unit', 'bms_level', 'bms_template_type', 'bms_declaration_channels', "project_small_type"], data() { return { userType: this.$store.state.user.userType, @@ -463,7 +473,7 @@ export default { this.multipleSelection = val; }, routerGo() { - this.$router.push({ name: 'supplementaryNew' }).catch(()=>{}); + this.$router.push({ name: 'onlineDeclareTInfo' }).catch(()=>{}); }, /** 查询菜单列表 */ getList() { @@ -570,7 +580,7 @@ export default { /** 开始填报按钮操作 */ handleAdd(row){ // console.log(row); - this.$router.push({name: 'declareAddContent',query: { + this.$router.push({name: 'onlineDeclareAdd',query: { templateId: row.templateId, templateRecordId: row.templateRecordId, declarationId: row.id, @@ -579,7 +589,7 @@ export default { }, /** 查看审核详情操作 */ handleDetail(row){ - this.$router.push({name: 'declareDetailContent',query: { + this.$router.push({name: 'onlineDeclareInfo',query: { templateId: row.templateId, // templateRecordId: row.templateRecordId, pageType: "detail", @@ -621,7 +631,7 @@ export default { submitForm: function() { this.$refs["form"].validate(valid => { if (valid) { - this.$router.push({name: 'declareAddContent',query: { + this.$router.push({name: 'onlineDeclareAdd',query: { templateId: this.form.templateId, templateRecordId: this.form.templateRecordId, pageType: "add", @@ -631,7 +641,7 @@ export default { }, /** 编辑按钮 */ handleEdit(row) { - this.$router.push({name: 'declareDetailContent',query: { + this.$router.push({name: 'onlineDeclareInfo',query: { templateId: row.templateId, templateRecordId: row.templateRecordId, pageType: "edit", diff --git a/src/views/onlineDeclaration/template/index.vue b/src/views/onlineDeclaration/template/index.vue index 4c9bce1..70ade6e 100644 --- a/src/views/onlineDeclaration/template/index.vue +++ b/src/views/onlineDeclaration/template/index.vue @@ -1,58 +1,42 @@ - - - - - - + + - - - - - - - - - - 重置 - 查询 - + + + + + + + + + + + + 重置 + 查询 + + + + 创建新模板 + - {{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}} + {{(queryParams.current - 1) * queryParams.size + scope.$index + 1}} @@ -73,10 +57,15 @@ - + + + + + @@ -111,7 +100,7 @@ {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} - + 下载表单 + 流程设计 + 表单自定义 @@ -130,19 +132,41 @@ id="L-pagination" v-show="total>0" :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" + :page.sync="queryParams.current" + :limit.sync="queryParams.size" @pagination="getList" /> + + + + + + + + + diff --git a/src/views/onlineDeclaration/templateDetail/index.vue b/src/views/onlineDeclaration/templateDetail/index.vue index ed41a84..abdba6d 100644 --- a/src/views/onlineDeclaration/templateDetail/index.vue +++ b/src/views/onlineDeclaration/templateDetail/index.vue @@ -5,7 +5,16 @@ - 项目分类: + 模板名称:{{ info.templateName }} + + + 项目大类: + + + 项目中类: + + + 项目小类: @@ -72,16 +81,36 @@ 截止目前员工人数 + + + 2023年营收 + + + + + 2023年税收 + + + + + 2024年预计营收 + + + + + 2024年预计税收 + + - + 申报单位成立时间 @@ -93,6 +122,51 @@ 是 + + + 2021年营收 + + + + + 2021年税收 + + + + + 2022年营收 + + + + + 2022年税收 + + + + + 2023年营收 + + + + + 2023年税收 + + + + + 2024年预计营收 + + + + + 2024年预计税收 + + + + + 园区其他经营奖励 + + @@ -242,6 +316,15 @@ + + + + + {{ item.label }} + + + + 【上传材料】 @@ -358,6 +441,9 @@ 其他相关情况说明 + + {{ item.label }} + @@ -143,7 +143,7 @@ - + @@ -163,6 +163,8 @@ 发布人:{{ addFrom.createBy }} 发布时间:{{ addFrom.enterTime }} + 发文单位:{{ addFrom.enterUnit }} + 政策等级: @@ -179,14 +181,17 @@ diff --git a/src/views/project/projectInfo/components/tabFour/index.vue b/src/views/project/projectInfo/components/tabFour/index.vue index 158f214..2e4b381 100644 --- a/src/views/project/projectInfo/components/tabFour/index.vue +++ b/src/views/project/projectInfo/components/tabFour/index.vue @@ -279,7 +279,7 @@ export default { type: "warning", }) .then(() => { - delJMemorandum({ id: row.id }).then((res) => { + delJMemorandum(row.id).then((res) => { this.getList(); this.$message({ type: "success", diff --git a/src/views/project/projectInfo/components/tabOne/index.vue b/src/views/project/projectInfo/components/tabOne/index.vue index 9b987de..4e307f1 100644 --- a/src/views/project/projectInfo/components/tabOne/index.vue +++ b/src/views/project/projectInfo/components/tabOne/index.vue @@ -51,6 +51,12 @@ export default { default:()=>{ return {}; } + }, + enterInfo:{ + type:Object, + default:()=>{ + return {} + } } }, watch: { @@ -65,19 +71,20 @@ export default { let obj = {}; obj["key"] = key; - if(key == "是否获得园区其他经营奖励") { - obj["value"] = newInfo[key] == 0 ? '是' : newInfo[key] == 1 ? '否':''; - } else if(key == "申报类型") { - obj["value"] = newInfo[key] == 1 ? '两业融合示范企业' : newInfo[key] == 2 ? '制造业企业设立财务独立核算的制造服务业职能部门' : newInfo[key] == 3 ? "制造业企业剥离服务业务成立独立的法人制造业企业剥离服务业务成立独立的法人" : ""; - } else if(key == "所属类型"){ - obj["value"] = newInfo[key] == 0 ? '市场服务类' : newInfo[key] == 1 ? '公共服务类' : ""; - } else if(key == "所属行业"){ - obj["value"] = newInfo[key] == 1 ? '轻工' : newInfo[key] == 2 ? '纺织' : newInfo[key] == 3 ? '冶金' : newInfo[key] == 4 ? '化工' : newInfo[key] == 5 ? '建材' : newInfo[key] == 6 ? '机械加工' : ""; - } else if(key == "类别"){ - obj["value"] = newInfo[key] == 1 ? '淘汰落后生产工艺装备' : newInfo[key] == 2 ? '退出低端低效生产工艺装备' : ""; - } else { - obj["value"] = newInfo[key] ? newInfo[key] : '暂无' - } + // if(key == "是否获得园区其他经营奖励") { + // obj["value"] = newInfo[key] == 0 ? '是' : newInfo[key] == 1 ? '否':''; + // } else if(key == "申报类型") { + // obj["value"] = newInfo[key] == 1 ? '两业融合示范企业' : newInfo[key] == 2 ? '制造业企业设立财务独立核算的制造服务业职能部门' : newInfo[key] == 3 ? "制造业企业剥离服务业务成立独立的法人制造业企业剥离服务业务成立独立的法人" : ""; + // } else if(key == "所属类型"){ + // obj["value"] = newInfo[key] == 0 ? '市场服务类' : newInfo[key] == 1 ? '公共服务类' : ""; + // } else if(key == "所属行业"){ + // obj["value"] = newInfo[key] == 1 ? '轻工' : newInfo[key] == 2 ? '纺织' : newInfo[key] == 3 ? '冶金' : newInfo[key] == 4 ? '化工' : newInfo[key] == 5 ? '建材' : newInfo[key] == 6 ? '机械加工' : ""; + // } else if(key == "类别"){ + // obj["value"] = newInfo[key] == 1 ? '淘汰落后生产工艺装备' : newInfo[key] == 2 ? '退出低端低效生产工艺装备' : ""; + // } else { + // obj["value"] = newInfo[key] ? newInfo[key] : '暂无' + // } + obj["value"] = newInfo[key] ? newInfo[key] : '暂无' obj["span"] = 1; arr.push(obj) } @@ -121,7 +128,16 @@ export default { } this.$nextTick(()=>{ - this.info = [...arr] + if(this.enterInfo.projectEndTime) { + let time = { + key:"预计完成时间", + value: this.enterInfo.projectEndTime + } + this.info = [...arr,time] + } else { + this.info = [...arr] + } + }) } diff --git a/src/views/project/projectInfo/components/tabTwo/index.vue b/src/views/project/projectInfo/components/tabTwo/index.vue index cbb59bc..a55f573 100644 --- a/src/views/project/projectInfo/components/tabTwo/index.vue +++ b/src/views/project/projectInfo/components/tabTwo/index.vue @@ -1,9 +1,9 @@ 【申报单位信息】 - + + + + {{ info.qymc }} + + + {{ info.bszh }} + + + {{ info.tyshxydm }} + + + {{ info.qyzch }} + + + {{ info.zzjgdm }} + + + {{ info.jjlxdm }} + + + {{ info.jjlxmc }} + + + {{ info.qylxdm }} + + + {{ info.qylxmc }} + + + {{ info.zczj }} + + + {{ info.zczbbz }} + + + {{ info.zclx }} + + + {{ info.jyhyyqsrq }} + + + {{ info.jyhyyjzrq }} + + + {{ info.hydm }} + + + {{ info.hymc }} + + + {{ info.hymc }} + + + {{ info.cylx }} + + + {{ info.qyzs }} + + + {{ info.jycs }} + + + {{ info.jycsxzqh }} + + + {{ info.yzbm }} + + + {{ info.clrq }} + + + {{ info.xydj }} + + + + {{ info.type == 1 ? "规上服务业" : info.type == 2 ? "其他" : ""}} + + + {{ info.fddbrxm }} + + + {{ info.fddbrzjhm }} + + + {{ info.djjg }} + + + {{ info.hzrq }} + + + {{ info.jyzt }} + + + {{ info.ztrq }} + + + {{ info.zxrq }} + + + {{ info.dxrq }} + + + {{ info.lxdh }} + + + {{ info.sfyqn }} + + + {{ info.dwTimestamp }} + + + {{ info.dwLyjg }} + + + {{ info.jyfw }} + @@ -24,6 +141,8 @@ export default { name:"tabTwo", data() { return { + // 判断登陆用户是何身份⌈ 01 : 企业 02 : 政务 ⌋ + userType: this.$store.state.user.userType, } }, props:{ @@ -35,6 +154,20 @@ export default { } }, methods:{ + goEnterprice(creditCode){ + // console.log(creditCode); + if(this.userType == '01') { + this.$router.push({ + name: 'EenterInfo', + query: { userId: this.info.id, creditCode: creditCode } + }) + } else { + this.$router.push({ + name: 'enterpriselibraryInfo', + query: { userId: this.info.id, creditCode: creditCode } + }) + } + }, }, } diff --git a/src/views/project/projectInfo/index.vue b/src/views/project/projectInfo/index.vue index bbb0713..417f98a 100644 --- a/src/views/project/projectInfo/index.vue +++ b/src/views/project/projectInfo/index.vue @@ -3,23 +3,34 @@ - 【{{ info.projectName }}】 + 【{{ info.declareUnit }}】 - {{ info.projectName }} - - {{ info.declareUnit }}查看详情 - {{ info.projectYear }} + {{ info.declareUnit }}查看详情 + {{ info.creditCode }} + + + + + + {{ info.projectYear }} - {{ item.name }} + {{ item.name }} - - - - + + + + + @@ -34,31 +45,78 @@ diff --git a/vue.config.js b/vue.config.js index a7a80de..405310d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -19,7 +19,7 @@ module.exports = { // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 // demo/JinJiHu - publicPath: process.env.NODE_ENV === "production" ? "/demo/JinJiHu" : "/", + publicPath: process.env.NODE_ENV === "production" ? "./" : "/", // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: "dist", // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
+ 注入字段: + 添加字段 +
【上传材料】