Commit 7da05067 authored by 冷冷's avatar 冷冷

添加新特性。 工作流

parent 219890c2
...@@ -39,13 +39,6 @@ export function fetchComment(id) { ...@@ -39,13 +39,6 @@ export function fetchComment(id) {
}) })
} }
export function fetchTask(id) {
return request({
url: '/act/task/view/'+id,
method: 'get'
})
}
export function doTask(obj) { export function doTask(obj) {
return request({ return request({
url: '/act/task', url: '/act/task',
......
...@@ -63,21 +63,19 @@ ...@@ -63,21 +63,19 @@
</el-dialog> </el-dialog>
<el-dialog title="流程图" <el-dialog title="流程图"
:visible.sync="showPicDialog"> :visible.sync="showPicDialog">
<img :src="actPicUrl"> <img :src="actPicUrl" v-if="showPicDialog" width="100%">
<div :style="picStype" v-if="showPicDialog"/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { fetchList,fetchDetail,doTask,fetchTask,fetchComment} from '@/api/task' import { fetchList,fetchDetail,doTask,fetchComment} from '@/api/task'
import { tableOption,formOption,taskOption } from '@/const/crud/task' import { tableOption,formOption,taskOption } from '@/const/crud/task'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'task', name: 'task',
data() { data() {
return { return {
picStype:'',
actPicUrl:'', actPicUrl:'',
obj: {}, obj: {},
showTask: false, showTask: false,
...@@ -147,19 +145,18 @@ ...@@ -147,19 +145,18 @@
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() {
return submit(row.leaveId)
}) })
.then(function() { .then(data => {
return submit(row.leaveId) _this.tableData.splice(index, 1)
_this.$message({
showClose: true,
message: '提交成功',
type: 'success'
}) })
.then(data => { })
_this.tableData.splice(index, 1) .catch(function(err) { })
_this.$message({
showClose: true,
message: '提交成功',
type: 'success'
})
})
.catch(function(err) { })
}, },
handleTask: function(row, result) { handleTask: function(row, result) {
this.obj.result = result this.obj.result = result
...@@ -169,17 +166,12 @@ ...@@ -169,17 +166,12 @@
message: '提交成功', message: '提交成功',
type: 'success' type: 'success'
}) })
done() this.showTask = false
this.getList() this.getList()
}) })
}, },
viewPic: function(row, index) { viewPic: function(row, index) {
fetchTask(row.taskId).then(response => { this.actPicUrl = `/act/task/view/` + row.taskId
let res = response.data.data
this.actPicUrl = `/act/process/resource/` + res.deploymentId + '/' + res.processonDefinitionId + "/image"
// 动态画框
this.picStype = 'position: absolute;border:2px solid red;top:'+(res.yaxis + 80) +'px;left:'+(res.xaxis + 20)+'px;width:'+res.width+'px;height:'+res.height+'px;'
})
this.showPicDialog = true this.showPicDialog = true
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment