流程跟踪页面
Showing
3 changed files
with
126 additions
and
8 deletions
| ... | @@ -17,15 +17,20 @@ import './assets/iconfont/iconfont.css' | ... | @@ -17,15 +17,20 @@ import './assets/iconfont/iconfont.css' |
| 17 | import ElTreeSelect from 'el-select-tree' | 17 | import ElTreeSelect from 'el-select-tree' |
| 18 | //树型选择器 | 18 | //树型选择器 |
| 19 | Vue.use(ElTreeSelect); | 19 | Vue.use(ElTreeSelect); |
| 20 | //引入富文本编辑器 | 20 | // //引入富文本编辑器 |
| 21 | import VueQuillEditor from 'vue-quill-editor' | 21 | // import VueQuillEditor from 'vue-quill-editor' |
| 22 | // 导入富文本编辑器的样式 | 22 | // // 导入富文本编辑器的样式 |
| 23 | import 'quill/dist/quill.core.css' | 23 | // import 'quill/dist/quill.core.css' |
| 24 | import 'quill/dist/quill.snow.css' | 24 | // import 'quill/dist/quill.snow.css' |
| 25 | import 'quill/dist/quill.bubble.css' | 25 | // import 'quill/dist/quill.bubble.css' |
| 26 | // 将富文本编译器 注册为全局组件 | 26 | // // 将富文本编译器 注册为全局组件 |
| 27 | Vue.use(VueQuillEditor) | 27 | // Vue.use(VueQuillEditor) |
| 28 | import "./libs/fliter"; //引入全局过滤器 | 28 | import "./libs/fliter"; //引入全局过滤器 |
| 29 | //引入xml转json | ||
| 30 | import x2js from 'x2js' | ||
| 31 | Vue.prototype.$x2js = new x2js({ | ||
| 32 | attributePrefix:'' //转换完的数据格式 (默认的是带 _ 的) | ||
| 33 | }) | ||
| 29 | // 让IE11支持Vue-router跳转功能 | 34 | // 让IE11支持Vue-router跳转功能 |
| 30 | if ( | 35 | if ( |
| 31 | '-ms-scroll-limit' in document.documentElement.style && | 36 | '-ms-scroll-limit' in document.documentElement.style && | ... | ... |
src/views/zd/lcgz/flownode.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div class="flowBox"> | ||
| 3 | <div class="node" v-for="node in flowData.Process.Nodes.ManualNode" :key="node.id">{{node.name}}</div> | ||
| 4 | </div> | ||
| 5 | </template> | ||
| 6 | |||
| 7 | <script> | ||
| 8 | export default { | ||
| 9 | name:"", | ||
| 10 | components:{}, | ||
| 11 | props:{ | ||
| 12 | flowData:{ | ||
| 13 | type:Object, | ||
| 14 | default:null | ||
| 15 | } | ||
| 16 | }, | ||
| 17 | data(){ | ||
| 18 | return { | ||
| 19 | } | ||
| 20 | }, | ||
| 21 | created(){}, | ||
| 22 | mounted(){ | ||
| 23 | this.$nextTick(()=>{ | ||
| 24 | console.log(this.flowData,'flowData.Nodes'); | ||
| 25 | }) | ||
| 26 | |||
| 27 | }, | ||
| 28 | methods:{}, | ||
| 29 | computed: {}, | ||
| 30 | watch: {}, | ||
| 31 | } | ||
| 32 | </script> | ||
| 33 | <style scoped lang="less"> | ||
| 34 | .flowBox{ | ||
| 35 | width: 150%; | ||
| 36 | height: 100%; | ||
| 37 | // 网格背景 | ||
| 38 | background-image: -webkit-gradient( | ||
| 39 | linear, | ||
| 40 | left top, | ||
| 41 | right top, | ||
| 42 | color-stop(10%, rgba(0, 0, 0, 0.15)), | ||
| 43 | color-stop(10%, rgba(0, 0, 0, 0)) | ||
| 44 | ), | ||
| 45 | -webkit-gradient(linear, left top, left bottom, color-stop(10%, rgba(0, 0, 0, 0.15)), color-stop(10%, rgba(0, 0, 0, 0))); | ||
| 46 | background-image: linear-gradient( | ||
| 47 | 90deg, | ||
| 48 | rgba(0, 0, 0, 0.15) 10%, | ||
| 49 | rgba(0, 0, 0, 0) 10% | ||
| 50 | ), | ||
| 51 | linear-gradient(rgba(0, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0) 10%); | ||
| 52 | background-size: 10px 10px; | ||
| 53 | } | ||
| 54 | </style> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/zd/lcgz/index.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div class="main"> | ||
| 3 | <div | ||
| 4 | class="flowContent" | ||
| 5 | > | ||
| 6 | <flowNode :flowData="flowData"></flowNode> | ||
| 7 | </div> | ||
| 8 | </div> | ||
| 9 | </template> | ||
| 10 | |||
| 11 | <script> | ||
| 12 | import { getActivityDetail,templateLoad } from "@api/user"; | ||
| 13 | import flowNode from "./flownode" | ||
| 14 | export default { | ||
| 15 | name: "", | ||
| 16 | components: {flowNode}, | ||
| 17 | props: {}, | ||
| 18 | data() { | ||
| 19 | return { | ||
| 20 | flowData:{}, | ||
| 21 | flowShow:false, | ||
| 22 | } | ||
| 23 | }, | ||
| 24 | created() {}, | ||
| 25 | mounted() { | ||
| 26 | this.getTemplate(); | ||
| 27 | }, | ||
| 28 | methods: { | ||
| 29 | getTemplate(){ | ||
| 30 | let params = { | ||
| 31 | "params": {}, | ||
| 32 | "workflowPeriod": "current", | ||
| 33 | "workitemInstanceId": this.$route.query.workitemInstanceId | ||
| 34 | } | ||
| 35 | getActivityDetail(params).then((res) => { | ||
| 36 | console.log(res.processInstance.templetId); | ||
| 37 | templateLoad(res.processInstance.templetId).then((res) => { | ||
| 38 | console.log(this.$x2js.xml2js(res)); | ||
| 39 | this.flowData = this.$x2js.xml2js(res); | ||
| 40 | }) | ||
| 41 | .catch((error) => {}); | ||
| 42 | }) | ||
| 43 | .catch((error) => {}); | ||
| 44 | }, | ||
| 45 | }, | ||
| 46 | computed: {}, | ||
| 47 | watch: {}, | ||
| 48 | }; | ||
| 49 | </script> | ||
| 50 | <style scoped lang="less"> | ||
| 51 | .main { | ||
| 52 | .flowContent { | ||
| 53 | width: calc(100% + 6px); | ||
| 54 | height: 100%; | ||
| 55 | position: relative; | ||
| 56 | overflow-x: scroll; | ||
| 57 | } | ||
| 58 | } | ||
| 59 | </style> |
-
Please register or sign in to post a comment