transitions
This commit is contained in:
parent
e6edee03ea
commit
e921634fee
|
@ -146,6 +146,14 @@ export function getTickets(query) {
|
||||||
params:query
|
params:query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//新建工单
|
||||||
|
export function createTicket(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wf/ticket/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
//工单详情
|
//工单详情
|
||||||
export function getTicketDetail(id) {
|
export function getTicketDetail(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="600"
|
|
||||||
height="100"
|
height="100"
|
||||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||||
>
|
>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<!--图片展示-->
|
<!--图片展示-->
|
||||||
<video ref="video" id="myVideo" :width="videoWidth" :height="videoHeight" autoplay style="display: block;margin:0 auto;border: 2px solid #333333;"></video>
|
<video ref="video" id="myVideo" :width="videoWidth" :height="videoHeight" autoplay style="display: block;margin:0 auto;border: 2px solid #333333;"></video>
|
||||||
<!--确认-->
|
<!--确认-->
|
||||||
<Button type="primary" @click="setImage">拍照</Button>
|
<Button type="primary" @click="setImage" class="takePhoto">拍照</Button>
|
||||||
<div id="res"></div>
|
<div id="res"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
props:['src'],
|
props:['src'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
videoWidth: 900,
|
videoWidth: 500,
|
||||||
videoHeight: 700,
|
videoHeight: 400,
|
||||||
videoArr:[],//所有的摄像头
|
videoArr:[],//所有的摄像头
|
||||||
modelSel:'',//
|
modelSel:'',//
|
||||||
myInterval: null,
|
myInterval: null,
|
||||||
|
@ -64,17 +64,14 @@
|
||||||
setImage () {
|
setImage () {
|
||||||
let canvas = document.getElementById("myCanvas");
|
let canvas = document.getElementById("myCanvas");
|
||||||
let context = canvas.getContext('2d');
|
let context = canvas.getContext('2d');
|
||||||
var video = document.getElementById("myVideo");
|
let video = document.getElementById("myVideo");
|
||||||
context.drawImage(video,0,0,90,68);
|
context.drawImage(video,0,0,90,68);
|
||||||
var image = new Image();
|
let image = new Image();
|
||||||
image = canvas.toDataURL('image/png');
|
image = canvas.toDataURL('image/png');
|
||||||
document.getElementById('res').innerHTML = '<img style="border: 1px solid #666666;" src="'+image+'">';
|
document.getElementById('res').innerHTML = '<img src="'+image+'">';
|
||||||
console.log(image);
|
|
||||||
debugger;
|
|
||||||
let imgData = {base64:image};
|
let imgData = {base64:image};
|
||||||
faceLogin(imgData).then((res) => {
|
faceLogin(imgData).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
debugger;
|
|
||||||
this.$message.success("成功");
|
this.$message.success("成功");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -183,12 +180,12 @@
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.testTracking {
|
.testTracking {
|
||||||
min-height: 700px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.buttonDiv {
|
.takePhoto{
|
||||||
bottom: 10px;
|
margin: 30px auto;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,11 @@
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
:data="workflowList.results"
|
:data="workflowList.results"
|
||||||
border
|
border fit stripe
|
||||||
fit
|
style="width: 100%"
|
||||||
stripe
|
height="100"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
max-height="600"
|
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="名称">
|
<el-table-column label="名称">
|
||||||
|
|
|
@ -134,6 +134,14 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="分配方式" prop="participant" v-if="wfstate.participant_type==2">
|
||||||
|
<el-select style="width: 100%" v-model="wfstate.distribute_type" placeholder="请选择分配方式">
|
||||||
|
<el-option label="主动接单" value="1"></el-option>
|
||||||
|
<el-option label="直接处理" value="2"></el-option>
|
||||||
|
<el-option label="随机分配" value="3"></el-option>
|
||||||
|
<el-option label="全部处理" value="4"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="部门" prop="participant" v-if="wfstate.participant_type==3">
|
<el-form-item label="部门" prop="participant" v-if="wfstate.participant_type==3">
|
||||||
<el-select style="width: 100%" v-model="participant" placeholder="请选择部门">
|
<el-select style="width: 100%" v-model="participant" placeholder="请选择部门">
|
||||||
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
|
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
|
||||||
|
@ -169,6 +177,7 @@ export default {
|
||||||
enable_retreat:'',
|
enable_retreat:'',
|
||||||
participant_type:'',
|
participant_type:'',
|
||||||
participant:'',
|
participant:'',
|
||||||
|
distribute_type:'',
|
||||||
},
|
},
|
||||||
participant:'',
|
participant:'',
|
||||||
participants:[],
|
participants:[],
|
||||||
|
@ -296,6 +305,7 @@ export default {
|
||||||
this.wfstate = Object.assign({}, scope.row); // copy obj
|
this.wfstate = Object.assign({}, scope.row); // copy obj
|
||||||
this.participants = this.wfstate.participant;
|
this.participants = this.wfstate.participant;
|
||||||
this.participant = this.wfstate.participant;
|
this.participant = this.wfstate.participant;
|
||||||
|
this.wfstate.distribute_type = this.wfstate.distribute_type.toString();
|
||||||
this.dialogType = "edit";
|
this.dialogType = "edit";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -23,17 +23,34 @@
|
||||||
@click="handleFilter"
|
@click="handleFilter"
|
||||||
>搜索</el-button>
|
>搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 10px">
|
||||||
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">新增</el-button>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||||
<el-tab-pane label="待处理" name="first">
|
<el-tab-pane label="待处理" name="first">
|
||||||
<el-table :data="tickets" border fit stripe style="width: 100%" >
|
<el-table :data="tickets"
|
||||||
|
border fit stripe
|
||||||
|
style="width: 100%"
|
||||||
|
height="100"
|
||||||
|
highlight-current-row
|
||||||
|
v-el-height-adaptive-table="{bottomOffset: 60}">
|
||||||
<el-table-column label="工单标题" min-width="100" prop="title">
|
<el-table-column label="工单标题" min-width="100" prop="title">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="当前状态" min-width="100">
|
<el-table-column label="当前状态" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.act_state===1">已提交</span>
|
<el-tag v-if="scope.row.act_state==0" label="草稿中" value="scope.row.act_state">草稿中</el-tag>
|
||||||
<span v-else-if="scope.row.act_state===4">已完成</span>
|
<el-tag v-else-if="scope.row.act_state==1" label="进行中" value="scope.row.act_state">进行中</el-tag>
|
||||||
<span v-else>审批中</span>
|
<el-tag v-else-if="scope.row.act_state==2" label="被退回" value="scope.row.act_state">被退回</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.act_state==3" label="被撤回" value="scope.row.act_state">被撤回</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.act_state==4" label="已完成" value="scope.row.act_state">已完成</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.act_state==5" label="已关闭" value="scope.row.act_state">已关闭</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="进行状态" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.state_.type==0">{{scope.row.state_.name}}中</span>
|
||||||
|
<span v-else>已{{scope.row.state_.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="类型" min-width="100">
|
<el-table-column label="类型" min-width="100">
|
||||||
|
@ -162,8 +179,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="limitedStep"
|
<el-dialog :visible.sync="limitedStep" title="工单处理">
|
||||||
title="工单流程">
|
|
||||||
<el-steps :active="actives" spac="400px" align-center="" style="padding-top: 20px;">
|
<el-steps :active="actives" spac="400px" align-center="" style="padding-top: 20px;">
|
||||||
<el-step :title="item.name" v-for="item in flowSteps "
|
<el-step :title="item.name" v-for="item in flowSteps "
|
||||||
:key="item.id" @click.native=stepclick(item.id)>
|
:key="item.id" @click.native=stepclick(item.id)>
|
||||||
|
@ -173,27 +189,116 @@
|
||||||
<el-col :span="1" style="height: 1px;"></el-col>
|
<el-col :span="1" style="height: 1px;"></el-col>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<div class="listItem"><span>流水号:</span>{{ticketDetail.sn}}</div>
|
<div class="listItem"><span>流水号:</span>{{ticketDetail.sn}}</div>
|
||||||
<div class="listItem"><span>开始时间:</span>{{}}</div>
|
<div class="listItem"><span>创建时间:</span>{{ticketDetail.create_time}}</div>
|
||||||
<div class="listItem" v-if="ticketDetail.workflow_"><span>请假类型:</span>{{ticketDetail.workflow_.name}}</div>
|
|
||||||
<div class="listItem"><span>创建人:</span>{{}}</div>
|
|
||||||
<div class="listItem" v-if="ticketDetail.workflow_"><span>请假原因:</span>{{ticketDetail.workflow_.name}}</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<div class="listItem"><span>标题:</span>{{ticketDetail.title}}</div>
|
<div class="listItem"><span>标题:</span>{{ticketDetail.title}}</div>
|
||||||
<div class="listItem"><span>结束时间:</span>{{}}</div>
|
|
||||||
<div class="listItem"><span>创建时间:</span>{{ticketDetail.create_time}}</div>
|
|
||||||
<div class="listItem" v-if="ticketDetail.ticket_data"><span>请假天数:</span>{{ticketDetail.ticket_data.days}}</div>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" type="primary" @click="operationSubmit">{{item.name}}</el-button>
|
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" type="primary" @click="operationSubmit">{{item.name}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog :visible.sync="limitedAdd" title="新增工单">
|
||||||
|
<el-form ref="Form" :model="addForm" label-width="100px" label-position="right" :rules="rule1">
|
||||||
|
<el-form-item label="名称" prop="title">
|
||||||
|
<el-input v-model="addForm.title" placeholder="工单名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="工作流">
|
||||||
|
<el-select v-model="addForm.workflow" placeholder="工作流" @change="handleWorkflowChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in workflows"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="item.field_name" v-for="item in customfields" :key="item.id">
|
||||||
|
<template v-if="item.field_type=='string'">
|
||||||
|
<el-input v-model="item.default_value" :placeholder="item.description" />
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='int'">
|
||||||
|
<el-input v-model="item.default_value" type="number" :placeholder="item.description" oninput="value=value.replace(/[^\d]/g,'')" />
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='float'">
|
||||||
|
<el-input v-model="item.default_value" type="number" :placeholder="item.description" />
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='date'">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="item.default_value"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='datetime'">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="item.default_value"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='select'">
|
||||||
|
<el-select style="width: 100%" v-model="item.default_value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.field_choice"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='selects'">
|
||||||
|
<el-select style="width: 100%" multiple v-model="item.default_value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.field_choice"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='textarea'">
|
||||||
|
<el-input type="textarea" :rows="3" v-model="item.default_value" placeholder="指导书内容" />
|
||||||
|
</template>
|
||||||
|
<template v-if="item.field_type=='file'">
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:action="upUrl"
|
||||||
|
:on-preview="handlePreview"
|
||||||
|
:on-success="handleUpSuccess"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:headers="upHeaders"
|
||||||
|
:file-list="fileList"
|
||||||
|
:limit="1"
|
||||||
|
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
||||||
|
>
|
||||||
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</template>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: right">
|
||||||
|
<el-button type="danger" @click="limitedAdd = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script src="https://d3js.org/d3.v4.min.js"></script>
|
<script src="https://d3js.org/d3.v4.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
import {getWorkflowList,getWfStateList,getTickets,ticketHandle,getWfFlowSteps,getTicketDetail,getTicketTransitions } from "@/api/workflow";
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
|
import {getWorkflowList,getWfCustomfieldList,createTicket,getWfStateList,getTickets,getWfTransitionList,
|
||||||
|
ticketHandle,getWfFlowSteps,getTicketDetail,getTicketTransitions } from "@/api/workflow";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
import dagreD3 from 'dagre-d3'
|
import dagreD3 from 'dagre-d3'
|
||||||
import * as d3 from 'd3'
|
import * as d3 from 'd3'
|
||||||
|
@ -212,6 +317,14 @@
|
||||||
page_size:20,
|
page_size:20,
|
||||||
workflow:'',
|
workflow:'',
|
||||||
},
|
},
|
||||||
|
addForm:{
|
||||||
|
title:'',
|
||||||
|
workflow:'',
|
||||||
|
ticket_data:{},
|
||||||
|
transition:''
|
||||||
|
},
|
||||||
|
upUrl: upUrl(),
|
||||||
|
upHeaders: upHeaders(),
|
||||||
stateSteps:0,
|
stateSteps:0,
|
||||||
activeName:'first',
|
activeName:'first',
|
||||||
keyword:'',
|
keyword:'',
|
||||||
|
@ -222,30 +335,28 @@
|
||||||
dialogVisible:false,
|
dialogVisible:false,
|
||||||
listLoading:false,
|
listLoading:false,
|
||||||
limitedStep:false,
|
limitedStep:false,
|
||||||
|
limitedAdd:false,
|
||||||
nodes: [],
|
nodes: [],
|
||||||
tooltip:null,
|
tooltip:null,
|
||||||
edges: [],
|
edges: [],
|
||||||
|
fileList:[],
|
||||||
flowSteps:[],
|
flowSteps:[],
|
||||||
operationBtn:[],
|
operationBtn:[],
|
||||||
|
customfields:[],
|
||||||
|
transitions:[],
|
||||||
|
rule1:{
|
||||||
|
title: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
workflow: [{ required: true, message: "选择", trigger: "blur" }]
|
||||||
|
}
|
||||||
|
|
||||||
|
,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
debugger;
|
||||||
this.workflow = this.$route.params.workflow;
|
this.workflow = this.$route.params.workflow;
|
||||||
let workflow = localStorage.getItem('workflow');
|
|
||||||
if(this.workflow){//有传参
|
if(this.workflow){//有传参
|
||||||
this.pageForm.workflow = parseInt(this.workflow);
|
this.pageForm.workflow = parseInt(this.workflow);
|
||||||
if(workflow){
|
|
||||||
localStorage.removeItem('workflow');
|
|
||||||
localStorage.setItem('workflow',this.pageForm.workflow)
|
|
||||||
}else{
|
|
||||||
localStorage.setItem('workflow',this.pageForm.workflow)
|
|
||||||
}
|
|
||||||
}else {//无传参
|
|
||||||
if (workflow) {
|
|
||||||
this.workflow = workflow;
|
|
||||||
this.pageForm.workflow = workflow;
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getStates();
|
this.getStates();
|
||||||
|
@ -253,6 +364,13 @@
|
||||||
},
|
},
|
||||||
activated(){
|
activated(){
|
||||||
this.workflow = this.$route.params.workflow;
|
this.workflow = this.$route.params.workflow;
|
||||||
|
if(this.workflow){//有传参
|
||||||
|
this.pageForm.workflow = parseInt(this.workflow);
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
this.getStates();
|
||||||
|
this.getWorkFlow();
|
||||||
|
/* this.workflow = this.$route.params.workflow;
|
||||||
let workflow = localStorage.getItem('workflow');
|
let workflow = localStorage.getItem('workflow');
|
||||||
if(this.workflow){//有传参
|
if(this.workflow){//有传参
|
||||||
this.pageForm.workflow = parseInt(this.workflow);
|
this.pageForm.workflow = parseInt(this.workflow);
|
||||||
|
@ -270,7 +388,7 @@
|
||||||
}
|
}
|
||||||
debugger;
|
debugger;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getStates();
|
this.getStates();*/
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getList(){
|
getList(){
|
||||||
|
@ -339,6 +457,7 @@
|
||||||
this.edges = edge;
|
this.edges = edge;
|
||||||
},
|
},
|
||||||
handleFilter(){
|
handleFilter(){
|
||||||
|
this.pageForm.page=1;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getStates();
|
this.getStates();
|
||||||
},
|
},
|
||||||
|
@ -346,6 +465,70 @@
|
||||||
this.pageForm.workflow = '',
|
this.pageForm.workflow = '',
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
handleCreate(){
|
||||||
|
this.limitedAdd = true;
|
||||||
|
this.addForm.title = '';
|
||||||
|
this.addForm.workflow = '';
|
||||||
|
this.addForm.ticket_data = {};
|
||||||
|
this.addForm.transition = '';
|
||||||
|
this.customfields = [];
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs["Form"].clearValidate();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleWorkflowChange(){
|
||||||
|
//获取字段
|
||||||
|
getWfCustomfieldList(this.addForm.workflow).then((res)=>{
|
||||||
|
this.customfields = res.data;
|
||||||
|
})
|
||||||
|
//获取流转
|
||||||
|
getWfTransitionList(this.addForm.workflow).then((res)=>{
|
||||||
|
for (let i=0;i<res.data.length;i++){
|
||||||
|
if(res.data[i].source_state_.type ===1){
|
||||||
|
debugger;
|
||||||
|
this.addForm.transition = res.data[i].id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
handlePreview(file) {
|
||||||
|
if ("url" in file) {
|
||||||
|
window.open(file.url);
|
||||||
|
} else {
|
||||||
|
window.open(file.response.data.path);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleUpSuccess(res, file, filelist) {
|
||||||
|
this.process.instruction = res.data.id;
|
||||||
|
},
|
||||||
|
handleRemove(file, filelist){
|
||||||
|
this.process.instruction = null;
|
||||||
|
},
|
||||||
|
confirm(form){
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let fields = this.customfields;
|
||||||
|
let obj = new Object();
|
||||||
|
for(let i=0;i<fields.length;i++){
|
||||||
|
obj[fields[i].field_key] = fields[i].default_value
|
||||||
|
}
|
||||||
|
this.addForm.ticket_data = obj;
|
||||||
|
debugger;
|
||||||
|
console.log(this.addForm)
|
||||||
|
createTicket(this.addForm).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.getList();
|
||||||
|
this.limitedAdd = false;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
handlePicture(scope){
|
handlePicture(scope){
|
||||||
let that = this;
|
let that = this;
|
||||||
getWfFlowSteps( scope.row.id).then((res)=>{
|
getWfFlowSteps( scope.row.id).then((res)=>{
|
||||||
|
@ -355,16 +538,9 @@
|
||||||
if(res.data){
|
if(res.data){
|
||||||
that.ticketDetail = res.data;
|
that.ticketDetail = res.data;
|
||||||
let state = res.data.state;
|
let state = res.data.state;
|
||||||
debugger;
|
|
||||||
console.log(state)
|
|
||||||
console.log(that.flowSteps)
|
|
||||||
debugger;
|
|
||||||
let dat = that.flowSteps.filter((item)=>{
|
let dat = that.flowSteps.filter((item)=>{
|
||||||
return item.id==state;
|
return item.id==state;
|
||||||
})
|
})
|
||||||
console.log(dat)
|
|
||||||
console.log(that.flowSteps.indexOf(dat[0]))
|
|
||||||
debugger;
|
|
||||||
this.actives = that.flowSteps.indexOf(dat[0]);
|
this.actives = that.flowSteps.indexOf(dat[0]);
|
||||||
that.limitedStep = true;
|
that.limitedStep = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
<template slot-scope="scope">{{ scope.row.timer }}</template>
|
<template slot-scope="scope">{{ scope.row.timer }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="180" label="源状态">
|
<el-table-column width="180" label="源状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
<template>
|
<span v-if="scope.row.source_state_">{{scope.row.source_state_.name}}</span>
|
||||||
<span v-for="item in stateoptions"
|
</template>
|
||||||
:key="item.value"
|
</el-table-column>
|
||||||
:label="item.label"
|
<el-table-column width="180" label="目的状态">
|
||||||
:value="item.value" >
|
<template slot-scope="scope">
|
||||||
{{lable}}</span>
|
<span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="180" label="创建时间">
|
<el-table-column width="180" label="创建时间">
|
||||||
|
|
Loading…
Reference in New Issue