From 2b248b01776008a1a3094de78e8b377d05a9bd59 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 28 Jun 2022 15:28:36 +0800 Subject: [PATCH 1/6] BUG 30381 --- .../processManagement/mattersConfig/components/addConfig.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/xiushan/apps/processManagement/mattersConfig/components/addConfig.vue b/project/xiushan/apps/processManagement/mattersConfig/components/addConfig.vue index a3ad542f..1a6fb72f 100644 --- a/project/xiushan/apps/processManagement/mattersConfig/components/addConfig.vue +++ b/project/xiushan/apps/processManagement/mattersConfig/components/addConfig.vue @@ -122,7 +122,8 @@ export default { tableId: this.applyForm.tableId, tableType: 2, processAnnexDefs: this.annexs?.map(e => ({...e, mustFill: Number(e.mustFill)})), - processNodeList: res.processNodeList + processNodeList: res.processNodeList, + processType: 0 }).then(res => { if (res?.code == 0) { this.$message.success("保存成功") From 361792c48d37281a21d82c861966c349d3119142 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 28 Jun 2022 15:37:13 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=9B=86=E4=B8=AD=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/dvui/components/AiSprite.vue | 48 ++++++++++++ .../dvui/layout/AiDvWrapper/AiDvWrapper.vue | 78 +++++++------------ 2 files changed, 78 insertions(+), 48 deletions(-) create mode 100644 project/dvui/components/AiSprite.vue diff --git a/project/dvui/components/AiSprite.vue b/project/dvui/components/AiSprite.vue new file mode 100644 index 00000000..7aab59a1 --- /dev/null +++ b/project/dvui/components/AiSprite.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/project/dvui/layout/AiDvWrapper/AiDvWrapper.vue b/project/dvui/layout/AiDvWrapper/AiDvWrapper.vue index 6eff97c1..ecba7876 100644 --- a/project/dvui/layout/AiDvWrapper/AiDvWrapper.vue +++ b/project/dvui/layout/AiDvWrapper/AiDvWrapper.vue @@ -23,7 +23,7 @@
-
+ {{ title }}
@@ -57,13 +57,13 @@ import {fullScreenContainer} from '@jiaminghi/data-view' import Vue from "vue"; import RightTopBorder from "./rightTopBorder"; -import {Arc, Scene} from 'spritejs' +import AiSprite from "../../components/AiSprite"; Vue.use(fullScreenContainer) export default { name: "AiDvWrapper", - components: {RightTopBorder}, + components: {AiSprite, RightTopBorder}, model: { prop: 'value', event: 'change' @@ -124,45 +124,35 @@ export default { cfs.call(el) } }, - initFly() { + initFly({layer, lib: {Arc}}) { const rand = (min, max) => min + (max - min) * Math.random() - const initScene = (count = 0) => { - const container = document.querySelector('#fly') - if (container) { - const scene = new Scene({container, width: 600, height: 90}), - layer = scene.layer() - const startFly = (p) => { - let scaleNum = rand(1, 3) - const pos = [rand(0, 600), 90 - rand(8, 50)] - p.attr({ - pos, - scale: [scaleNum, scaleNum], - radius: 1, - fillColor: '#0aa5ff', - filter: 'drop-shadow( 0, 2px, 2px, #0aa5ff)' - }) - p.animate([ - pos, - {y: 0} - ], { - opacity: 0, - duration: rand(1, 1.5) * 1000, - iterations: Infinity, - easing: 'ease-out' - }) - setTimeout(() => layer.append(p), rand(1, 5) * 1000) - } - //初始化标题萤火效果 - let numP = 70; - for (let i = 0; i <= numP; i++) { - const p = new Arc() - startFly(p) - } - } else if (count == 20) { - - } else setTimeout(() => initScene(++count), 500) + const startFly = (p) => { + let scaleNum = rand(1, 3) + const pos = [rand(0, 600), 90 - rand(8, 50)] + p.attr({ + pos, + scale: [scaleNum, scaleNum], + radius: 1, + fillColor: '#0aa5ff', + filter: 'drop-shadow( 0, 2px, 2px, #0aa5ff)' + }) + p.animate([ + pos, + {y: 0} + ], { + opacity: 0, + duration: rand(1, 1.5) * 1000, + iterations: Infinity, + easing: 'ease-out' + }) + setTimeout(() => layer.append(p), rand(1, 5) * 1000) + } + //初始化标题萤火效果 + let numP = 70; + for (let i = 0; i <= numP; i++) { + const p = new Arc() + startFly(p) } - initScene() }, handleSetting() { if (this.setting.timer) clearInterval(this.setting.timer) @@ -184,9 +174,6 @@ export default { this.currentTime = this.$moment().format("YYYY/MM/DD HH:mm:ss") }, 1000) }, - mounted() { - this.initFly() - } } @@ -363,11 +350,6 @@ export default { left: 50%; transform: translateX(-50%); z-index: 3; - - & > div { - width: 0; - box-shadow: 0 0 1px 1px #0aa5ff; - } } } } From 352ae43faa21298e594a4d6e3325eba3650bd212 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 28 Jun 2022 15:48:12 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=B8=B2=E6=9F=933D=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/dvui/components/AiSprite.vue | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/project/dvui/components/AiSprite.vue b/project/dvui/components/AiSprite.vue index 7aab59a1..1c82a319 100644 --- a/project/dvui/components/AiSprite.vue +++ b/project/dvui/components/AiSprite.vue @@ -10,6 +10,7 @@ export default { props: { width: {default: 400}, height: {default: 300}, + is3D: Boolean }, data() { return { @@ -20,14 +21,20 @@ export default { init(count = 0) { const container = this.$refs[this.ref] if (container) { + let loadTasks = [] let {width, height} = this.$props - const scene = new spritejs.Scene({container, width, height, ...this.$attrs}), - layer = scene.layer() - /** - * layer 图层 - * lib spritejs的依赖库 - */ - this.$emit("init", {layer, lib: spritejs}) + if (this.is3D) { + loadTasks.push(this.$injectLib("https://unpkg.com/sprite-extend-3d/dist/sprite-extend-3d.js")) + } + Promise.all(loadTasks).then(() => { + const scene = new spritejs.Scene({container, width, height, ...this.$attrs}), + layer = scene.layer() + /** + * layer 图层 + * lib spritejs的依赖库 + */ + this.$emit("init", {layer, lib: spritejs}) + }) } else if (count == 20) { console.log(this.$refs) } else setTimeout(() => this.init(++count), 500) From 52c62f79556d9bbcf90cb09a287c9ed3e6319d45 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 28 Jun 2022 16:02:37 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=B8=B2=E6=9F=933D=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/dvui/components/AiSprite.vue | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/project/dvui/components/AiSprite.vue b/project/dvui/components/AiSprite.vue index 1c82a319..0a59f247 100644 --- a/project/dvui/components/AiSprite.vue +++ b/project/dvui/components/AiSprite.vue @@ -3,7 +3,7 @@ From 059da71d6d23eb8f9ecb27c4505422f86e537da4 Mon Sep 17 00:00:00 2001 From: aixianling Date: Tue, 28 Jun 2022 16:04:04 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=8C=85=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - project/dvui/components/AiSprite.vue | 2 -- 2 files changed, 3 deletions(-) diff --git a/package.json b/package.json index afc4e53b..809cadbc 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "print-js": "^1.0.63", "serialize-javascript": "^6.0.0", "sortablejs": "^1.12.0", - "spritejs": "^3.8.0", "vue-draggable-resizable": "^2.3.0", "vue-json-editor": "^1.4.3", "vue-okr-tree": "^1.0.10", diff --git a/project/dvui/components/AiSprite.vue b/project/dvui/components/AiSprite.vue index 0a59f247..f44b52e2 100644 --- a/project/dvui/components/AiSprite.vue +++ b/project/dvui/components/AiSprite.vue @@ -3,8 +3,6 @@