| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- <html>
- <head>
- <style>
- html,
- body,
- #space-content,
- .content-wrap{
- height: 100%;
- width: 100%;
- }
- .transactor-list{
- box-sizing: border-box;
- width: 100%;
- height: -moz-calc(100% - 50px);
- height: -webkit-calc(100% - 50px);
- height: calc(100% - 50px);
- padding: 20px 0;
- overflow-y: auto;
- }
- .transactor-list dt{
- width: 40px;
- height: 40px;
- border-radius: 6px;
- float: left;
- position: relative;
- }
- .transactor-list dt .van-image{
- width: 100%;
- height: 100%;
- line-height: 40px;
- text-align: center;
- border-radius: 6px;
- overflow: hidden;
- }
- .transactor-list .van-image .van-icon{
- color: #648ef7;
- font-size: 26px;
- }
- .transactor-list dt>i{
- position: absolute;
- bottom: -3px;
- right: -10px;
- color: #ea9b56;
- font-size: 18px;
- background-color: #fff;
- border-radius: 50%;
- }
- .transactor-list dd{
- margin-left: 57px;
- color: #666;
- font-size: 12px;
- line-height: 20px;
- }
- .transactor-list .transactor-list-username{
- color: #333;
- font-size: 14px;
- }
- .space-tabbar-list a{
- color: #646566;
- }
- .space-tabbar-img-wrap i{
- font-size: 22px;
- }
- [class*=van-hairline]::after{
- border: 0;
- }
- /* 弹出层 */
- .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;
- }
- .ck.ck-editor {
- margin-top: 30px !important;
- }
-
- .van-form .van-cell::after{
- border-bottom: none;
- }
- #ueditor_textarea_editorValue{
- background-color: red;
- }
- .icon-success-hollow,.icon-error-hollow {
- color:#000;
- }
- </style>
- </head>
- <body>
- <div id="space-content">
- <div class="content-wrap">
- <div class="transactor-list">
- <van-checkbox-group v-model="result" ref="checkboxGroup">
- <van-cell-group>
- <van-cell v-for="(item, index) in list" clickable :key="index" @click="toggle(index)" auto-fill="false">
- <template #title>
- <dl>
- <dt>
- <van-image :src="item.iconPath">
- <template v-slot:error><van-icon name="user-o" ></van-icon></template>
- </van-image>
- </dt>
- <dd class="transactor-list-username">
- {{item.personName}}
- </dd>
- <dd>
- {{item.deptName}}
- </dd>
- </dl>
- </template>
- <template #right-icon>
- <van-checkbox :name="item" ref="checkboxes"></van-checkbox>
- </template>
- </van-cell>
- </van-cell-group>
- </van-checkbox-group>
- </div>
- <div class="space-tabbar">
- <ul class="space-tabbar-list">
- <li @click="toggleAll">
- <a href="javascript:;">
- <div class="space-tabbar-img-wrap">
- <i class="spaceicon" :class="result.length == 0 ? 'icon-success-hollow' : 'icon-error-hollow'"></i>
- </div>
- <p>
- {{result.length == 0 ? '全选' : "反选"}}
- </p>
- </a>
- </li>
- <li @click="showUrged">
- <div class="space-tabbar-img-wrap">
- <i class="spaceicon icon-jiaji"></i>
- </div>
- <p>
- 催促
- </p>
- </li>
- <c:if test="${apply.reclaimFlow == '11'}">
- <li @click="withdraw">
- <div class="space-tabbar-img-wrap">
- <i class="spaceicon icon-chehui"></i>
- </div>
- <p>
- 收回
- </p>
- </li>
- </c:if>
- <li @click="viewInfo">
- <div class="space-tabbar-img-wrap">
- <i class="spaceicon icon-file"></i>
- </div>
- <p>
- 内容
- </p>
- </li>
- </ul>
- </div>
-
- <!-- Popup 弹出层 -->
- <van-popup v-model="isShowPopup" position="bottom" :style="{ height: '300px' }" closeable round>
- <div class="space-form-infor">
- <van-form action="@service{name:`sys_urged_audit`}@" method="post" :model="obj" ref="obj" style="height: 100%;">
- <div class="popup-content-top">
- <space-editor v-model="obj.content" type="flow" height="150px" placeholder="请输入内容" ref="editor"></space-editor>
- </div>
- </van-form>
- </div>
- <div class="bottom-div">
- <van-button type="info" native-type="button" @click="space.forms.submit();" style="width: 94%;" round>催促</van-button>
- </div>
- </van-popup>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- var auditPersonList = '${auditPersonList}';
- space.vue = new Vue({
- el: space.appContent,
- data: function() {
- return {
- isShowPopup: false,
- isInitUE: false,
- obj: {
- auditIds: undefined,
- cmsId: undefined,
- content: '',
- },
- list: space.utils.isNull(auditPersonList) ? [] : JSON.parse(auditPersonList),
- result: [],
- service: {
- // 撤回(收回)服务
- withdrawApplyUri: '@service{ name: `sys_withdraw_apply`, params:`{applyid: "${applyid}"}`}@'
- },
- }
- },
- methods: {
- /**
- * 初始化 editor 的 CMS
- */
- initCkCMS: function() {
- var _this = this;
- this.winInterval = setInterval(function() {
- if (!_this.$refs.editor.editor) {
- return;
- }
-
- window.clearInterval(_this.winInterval);
- space.plugin.ckEditor.CMS.init.applyCMS(_this.$refs.editor.editor);
- _this.obj.cmsId = _this.$refs.editor.editor.CMS.id;
- }, 100);
- this.isInitUE = true;
- },
- showUrged() {
- if (this.result.length <= 0){
- top.space.message.warning('未选择办理人');
- return false;
- }
-
- this.isShowPopup = true;
- if (!this.isInitUE) {
- this.initCkCMS();
- }
- },
- toggle(index) {
- this.$refs.checkboxes[index].toggle();
- },
- // 全选
- toggleAll() {
-
- // 选中
- for (let index = 0; index < this.list.length; index++) {
- const element = this.list[index];
- this.toggle(index);
- }
- },
- /**
- * 查看发起内容
- */
- viewInfo: function() {
- space.plugin.layer.open({
- url: '${applyInfo}'
- });
- },
- /**
- * 撤回(收回)
- */
- withdraw: function() {
- var _this = this;
- this.$dialog.confirm({
- title: '提示',
- message: '此操作将收回该流程, 是否继续?',
- }).then(() => {
- space.plugin.loading.show();
- space.utils.ajax({
- url: _this.service.withdrawApplyUri,
- dataType: 'json',
- callback: function(data) {
- space.plugin.loading.close();
-
- if (data.code == "success") {
- top.space.message.success('收回成功');
- try {
- // 在 AppWindow 里面
- if(space.plugin.appWindow.isInThe()) {
- space.plugin.appWindow.close();
- }
- else {
- space.utils.window.close();
- }
- } catch(e) {
- top.space.message.warning("发生错误,请稍后再试");
- }
- }
- else {
- top.space.message.error('系统繁忙,请稍后再试');
- }
- }
- });
-
- }).catch(() => {
- _this.$toast('已取消收回流程');
- });
-
- }
- },
- })
- space.forms.before = function () {
- if (!space.vue.$data.obj.content) {
- top.space.message.warning('请输入催促内容');
- return false;
- }
- space.plugin.ckEditor.CMS.submit(space.vue.$refs.editor.editor);
-
- var tmpAuditIds = [];
- space.vue.$data.result.forEach(element => {
- tmpAuditIds.push(element.auditId);
- });
- space.vue.$data.obj.auditIds = tmpAuditIds.join(',');
- return true;
- }
- </script>
- </html>
|