| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <html>
- <head>
- <style>
- .iframe-wrap{
- box-sizing: border-box;
- width: 100%;
- height: calc(100% - 50px);
- }
- .iframe-wrap iframe{
- width: 100%;
- height: 100%;
- }
- .plain-btn{
- border: 1px solid #1989fa;
- color: #1989fa;
- background-color: #fff;
- }
- /* 弹出层 */
- .popup-content{
- width: 100%;
- height: 100%;
- }
- .popup-content-top{
- box-sizing: border-box;
- width: 100%;
- height: calc(100% - 54px);
- padding: 12px;
- }
- .popup-content-bottom{
- width: 90%;
- margin: 0 auto;
- padding: 5px;
- }
- .icon-node:before, .icon-flow2:before {
- font-size: 20px;
- }
- .ck.ck-editor {
- margin-top: 30px !important;
- }
- .van-form .van-cell::after{
- border-bottom: none;
- }
- </style>
- </head>
- <body class="body-bg-gray">
- <div id="space-content">
- <div class="content-wrap">
- <div class="iframe-wrap">
- <iframe id="applyInfo" frameborder="0"></iframe>
- </div>
- <!-- 底部 -->
- <van-goods-action style="padding-left:10px">
- <van-goods-action-icon class="spaceicon icon-node" text="流转意见" @click="auditOpinion();"></van-goods-action-icon>
- <van-goods-action-icon class="spaceicon icon-flow2" text="流程图" @click="flowChart()"></van-goods-action-icon>
- <van-goods-action-button type="info" text="退回" class="plain-btn" @click="showAudit('reject')"></van-goods-action-button>
- <van-goods-action-button type="info" text="同意" @click="showAudit('agree')"></van-goods-action-button>
- </van-goods-action>
- <!-- Popup 弹出层 -->
- <van-popup v-model="isShowPopup" position="bottom" :style="{ height: '300px' }" closeable round>
- <div class="popup-content">
- <div class="space-form-infor">
- <van-form id="aform" method="post" :model="obj" ref="obj" style="height: 100%;">
- <div class="popup-content-top">
- <space-editor v-model="obj.body" type="flow" height="150px" placeholder="请输入审批意见" ref="editor"></space-editor>
- </div>
- </van-form>
- </div>
- <div class="bottom-div">
- <van-button round type="info" native-type="button" @click="space.forms.submit();" style="width: 94%;">{{buttonName}}</van-button>
- </div>
- </div>
- </van-popup>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- $('#applyInfo').attr("src", "${applyInfoToken}");
- space.vue = new Vue({
- el: space.appContent,
- data: function() {
- return {
- oldAuditType: '',
- auditType: '',
- buttonName: '',
- isInitUE: false,
- isShowPopup: false,
- obj: {
- cmsId: undefined,
- body: ''
- },
- }
- },
- mounted: function () {
-
- },
- methods: {
- /**
- * 初始化 editor 的 CMS
- */
- initCkCMS: function() {
- space.plugin.ckEditor.CMS.init.applyCMS(this.$refs.editor.editor);
- this.obj.cmsId = this.$refs.editor.editor.CMS.id;
- },
- /**
- * 显示审核层
- */
- showAudit(type) {
-
- this.auditType = type;
- if (this.auditType == 'reject') {
- this.buttonName = '确认退回';
- }
- else if (this.auditType == 'agree') {
- this.buttonName = '确认同意';
- }
- this.isShowPopup = true;
- if (!this.isInitUE) {
- var _this = this;
- setTimeout(function() {
- _this.initCkCMS();
- },100);
- this.isInitUE = true;
- }
- if (this.oldAuditType != '' && this.oldAuditType != type) {
- this.$refs.editor.editor.setData("");// 清空 editor 内容
- }
- this.oldAuditType = type;
- },
- /**
- * 流转意见
- */
- auditOpinion: function() {
- space.plugin.layer.open({
- url: '@service{ name:`sys_flow_audit_info`, page:`flow_course`, params:`{applyid: "${applyid}", auditid: "${auditid}", tabsType: "auditOpinion", childServiceParamsMap: "${childServiceParamsMap}"}`}@'
- });
- },
- /**
- * 流程图
- */
- flowChart: function() {
- space.plugin.layer.open({
- url: '@service{ name:`sys_flow_audit_info`, page:`flow_course`, params:`{applyid: "${applyid}", auditid: "${auditid}", tabsType: "flowChart", childServiceParamsMap: "${childServiceParamsMap}"}`}@'
- });
- }
- }
- })
-
- space.forms.before = function () {
- space.plugin.ckEditor.CMS.submit(space.vue.$refs.editor.editor);
-
- // 审核流程(同意、退回)
- var url = "";
- if (space.vue.$data.auditType == 'reject') {
- url = '${rejectToken}';// 退回
- }
- else if (space.vue.$data.auditType == 'agree') {
- url = '${agreeToken}';// 同意
- }
-
- $("#aform").attr('action', url);
- }
- </script>
-
- </html>
|