-
+
@@ -14,8 +14,8 @@
-
-
+
+
@@ -25,11 +25,13 @@ import Dialog from "@screen/components/Dialog/index";
import TimeLine1 from "@screen/components/TimeLine/TimeLine1/index";
import TimeLine2 from "@screen/components/TimeLine/TimeLine2/index";
import Form from '@screen/components/FormConfig';
-import { formList, timeLine1List } from "./data"
-import { timeLine2List } from "@screen/pages/control/event/commandDispatch/Cards/DisposalProcess/data.js"
+import { formList } from "./data"
+// import { timeLine2List } from "@screen/pages/control/event/commandDispatch/Cards/DisposalProcess/data.js"
import Video from "@screen/components/Video";
import Carousel from "./Carousel/index.vue"
import Button from '@screen/components/Buttons/Button.vue';
+import request from "@/utils/request";
+var moment = require("moment");
export default {
name: 'EventDetail',
@@ -47,24 +49,94 @@ export default {
event: 'update:value'
},
props: {
- visible: Boolean
+ visible: Boolean,
+ formData: {
+ type: Object,
+ default: () => { }
+ }
},
data() {
return {
formList,
- timeLine1List,
- timeLine2List,
+ timeLine1List: [{
+ time: "",
+ label: "",
+ isActive: false,
+ }],
+ timeLine2List: [
+ {
+ time: "",
+ name: "",
+ desc: '',
+ posts: "",
+ direction: "left",
+ }
+ ],
}
},
computed: {
modelVisible: {
get() {
+ if (this.visible) {
+ this.getProcess();
+ }
return this.visible;
},
set(val) {
this.$emit('update:value', val)
}
}
+ },
+ methods: {
+ getProcess() {
+
+ let directionFlg = true;
+
+ request({
+ url: `/system/process/list`,
+ method: "get",
+ params: { eventId: this.formData.id }
+ }).then(result => {
+ if (result.code != 200) return Message.error(result?.msg);
+ const rows = result.rows;
+ this.timeLine1List = [];
+ this.timeLine2List = [];
+
+ this.formData?.processConfigList.forEach(it => {
+ const process = rows.find(row => it.nodeNode == row.processId);
+
+ if (process) {
+ this.timeLine1List.push(
+ {
+ time: moment(process.operationTime || new Date()).format('HH:mm'),
+ label: it.processNode,
+ isActive: true,
+ }
+ );
+ this.timeLine2List.push({
+ time: moment(process.operationTime || new Date()).format('yyyy-MM-DD HH:mm:ss'),
+ name: process.operator,
+ desc: process.context,
+ posts: "",
+ direction: directionFlg ? 'left' : 'right',
+ })
+ directionFlg = !directionFlg;
+
+ } else {
+ this.timeLine1List.push(
+ {
+ time: "",
+ label: it.processNode,
+ isActive: false,
+ }
+ )
+ }
+ })
+
+
+ })
+
+ }
}
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
index ea66b9c7..bec2cf71 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/FormEvent/PresetFormItems.js
@@ -179,6 +179,7 @@ export const startTime = {
isAlone: true,
type: "datePicker",
options:{
+ type: "datetime",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss'
}
@@ -190,6 +191,7 @@ export const expectedEndTime = {
isAlone: true,
type: "datePicker",
options:{
+ type: "datetime",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss'
}
@@ -716,6 +718,7 @@ export const eventHappenTime = {
required: true,
type: "datePicker",
options:{
+ type: "datetime",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss'
}
@@ -726,6 +729,7 @@ export const aEstimatedReleaseTime = {
key: "estimatedEndTime",
type: "datePicker",
options:{
+ type: "datetime",
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss'
}
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
index 815ad466..8f3f7d5a 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
@@ -11,7 +11,7 @@
新增
-
+
@@ -43,7 +43,7 @@
-