|
@@ -152,6 +152,7 @@
|
|
:processInstanceId="processInstanceId"
|
|
:processInstanceId="processInstanceId"
|
|
:processDefinitionId="processDefinitionId"
|
|
:processDefinitionId="processDefinitionId"
|
|
v-if="isReady"
|
|
v-if="isReady"
|
|
|
|
+ ref="FormTaskProcessViewer"
|
|
></form-task-process-viewer>
|
|
></form-task-process-viewer>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -310,9 +311,9 @@
|
|
</v-scale-screen>
|
|
</v-scale-screen>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import * as echarts from 'echarts';
|
|
|
|
|
|
+
|
|
import myFlylineChartEnhanced from '../components/my-flyline-chart-enhanced/index'
|
|
import myFlylineChartEnhanced from '../components/my-flyline-chart-enhanced/index'
|
|
-import formTaskProcessViewer from '@/components/workflow/formTaskProcessViewer'
|
|
|
|
|
|
+
|
|
import myscrollBoard from '../components/myscroll-board/src/main'
|
|
import myscrollBoard from '../components/myscroll-board/src/main'
|
|
import sacleBox from '../components/sacle-box/index'
|
|
import sacleBox from '../components/sacle-box/index'
|
|
import { request } from '../utils/request';
|
|
import { request } from '../utils/request';
|
|
@@ -344,6 +345,7 @@ export default {
|
|
taskList:[],
|
|
taskList:[],
|
|
websocket: null, //建立的连接
|
|
websocket: null, //建立的连接
|
|
websocketOrder: null, //建立的连接
|
|
websocketOrder: null, //建立的连接
|
|
|
|
+ websocketBpmn: null, //建立的连接
|
|
updatekey:'1',
|
|
updatekey:'1',
|
|
scrollTableConfig:{
|
|
scrollTableConfig:{
|
|
header: ['指令名称', '指令内容', '指令时间'],
|
|
header: ['指令名称', '指令内容', '指令时间'],
|
|
@@ -461,7 +463,7 @@ export default {
|
|
let param = {taskId: this.processInstanceId};
|
|
let param = {taskId: this.processInstanceId};
|
|
const res1 = await request("/dt_screen/rest/v2/task/getDefId/", "post", param, false);
|
|
const res1 = await request("/dt_screen/rest/v2/task/getDefId/", "post", param, false);
|
|
this.processDefinitionId = res1.data;
|
|
this.processDefinitionId = res1.data;
|
|
-
|
|
|
|
|
|
+ this.initWebsoketBpmn();
|
|
this.isReady = true;
|
|
this.isReady = true;
|
|
this.currentTaskName = data[0].taskName;
|
|
this.currentTaskName = data[0].taskName;
|
|
this.currentTaskGrade = data[0].syntheticTaskScore;
|
|
this.currentTaskGrade = data[0].syntheticTaskScore;
|
|
@@ -498,6 +500,7 @@ export default {
|
|
this.getinstructList(this.wholeOutTaskId);
|
|
this.getinstructList(this.wholeOutTaskId);
|
|
// 建立指令websocket 链接
|
|
// 建立指令websocket 链接
|
|
this.initInstructWebsoket();
|
|
this.initInstructWebsoket();
|
|
|
|
+ this.initWebsoketBpmn();
|
|
},
|
|
},
|
|
changeTaskAndUnit() {
|
|
changeTaskAndUnit() {
|
|
this.systemSubjectId=''
|
|
this.systemSubjectId=''
|
|
@@ -603,6 +606,40 @@ export default {
|
|
websocketclose(){
|
|
websocketclose(){
|
|
console.log('ws 连接关闭');
|
|
console.log('ws 连接关闭');
|
|
this.initWebsoket();//重新建立连接
|
|
this.initWebsoket();//重新建立连接
|
|
|
|
+ },
|
|
|
|
+ // 建立websocket 链接 任务
|
|
|
|
+ initWebsoketBpmn(){
|
|
|
|
+ this.websocketBpmn = new WebSocket(`ws://${this.$store.state.webSocketIp}:${this.$store.state.webSocketPort}/websocket/bpmn`);//这里将http替换成ws
|
|
|
|
+ switch (this.websocketBpmn.readyState) {
|
|
|
|
+ case 0:
|
|
|
|
+ console.log("正在连接");
|
|
|
|
+ break;
|
|
|
|
+ case 1:
|
|
|
|
+ console.log("已经链接并且可以通讯");
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ console.log("连接正在关闭");
|
|
|
|
+ break;
|
|
|
|
+ case 3:
|
|
|
|
+ console.log("连接已关闭或者没有链接成功");
|
|
|
|
+ break;
|
|
|
|
+ };
|
|
|
|
+ this.websocketBpmn.onopen = this.bpmnWebsocketsend;//websoket连接成功
|
|
|
|
+ this.websocketBpmn.onmessage =this.bpmnWebsocketonmessage;//websoket收到信息
|
|
|
|
+ this.websocketBpmn.onclose = this.bpmnWebsocketclose;//websoket连接关闭
|
|
|
|
+ },
|
|
|
|
+ bpmnWebsocketsend(){
|
|
|
|
+ console.log('ws 连接成功');
|
|
|
|
+ },
|
|
|
|
+ bpmnWebsocketonmessage(msg){
|
|
|
|
+ // 更新流程图
|
|
|
|
+ this.$refs.FormTaskProcessViewer.getTaskHighlightData();
|
|
|
|
+ this.$refs.FormTaskProcessViewer.getTaskProcessXml();
|
|
|
|
+ console.log('收到指令信息',msg);
|
|
|
|
+ },
|
|
|
|
+ bpmnWebsocketclose(){
|
|
|
|
+ console.log('ws 连接关闭');
|
|
|
|
+ this.initWebsoketBpmn();//重新建立连接
|
|
},
|
|
},
|
|
initInstructWebsoket(){
|
|
initInstructWebsoket(){
|
|
// 指令的ws
|
|
// 指令的ws
|
|
@@ -762,6 +799,7 @@ export default {
|
|
this.videoPlayerName[index++] = res.data[item].name;
|
|
this.videoPlayerName[index++] = res.data[item].name;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
changeVideo(subjectName) {
|
|
changeVideo(subjectName) {
|
|
// if(this.playerList.length){
|
|
// if(this.playerList.length){
|
|
// this.playerList.forEach((item)=>{
|
|
// this.playerList.forEach((item)=>{
|