Bläddra i källkod

审核页面开发完成待测试

wuxw 6 år sedan
förälder
incheckning
1c5605390a

+ 41 - 0
WebService/src/main/resources/components/auditPackage/audit/audit.html

@@ -0,0 +1,41 @@
+<div id="auditModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
+     aria-hidden="true">
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-body">
+                <h3 class="m-t-none m-b ">审核信息</h3>
+                <div class="ibox-content">
+                    <div>
+                        <div>
+
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">审核状态</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="auditInfo.state">
+                                        <option selected disabled value="">请审核</option>
+                                        <option value="1200">同意</option>
+                                        <option value="1300">拒绝</option>
+                                    </select></div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">原因</label>
+                                <div class="col-sm-10">
+                                    <textarea placeholder="选填,请填写原因" class="form-control"
+                                              v-model="auditInfo.remark"></textarea></div>
+                            </div>
+
+                            <div class="ibox-content">
+                                <button class="btn btn-primary float-right" type="button"
+                                        v-on:click="_auditSubmit()"><i class="fa fa-check"></i>&nbsp;提交
+                                </button>
+                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
+                                        data-dismiss="modal">取消
+                                </button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 73 - 0
WebService/src/main/resources/components/auditPackage/audit/audit.js

@@ -0,0 +1,73 @@
+(function(vc){
+
+    vc.extends({
+        propTypes: {
+               callBackListener:vc.propTypes.string, //父组件名称
+               callBackFunction:vc.propTypes.string //父组件监听方法
+        },
+        data:{
+            auditInfo:{
+                state:'',
+                remark:''
+            }
+        },
+         _initMethod:function(){
+
+         },
+         _initEvent:function(){
+            vc.on('audit','openAuditModal',function(){
+                $('#auditModel').modal('show');
+            });
+        },
+        methods:{
+            auditValidate(){
+                return vc.validate.validate({
+                    auditInfo:vc.component.auditInfo
+                },{
+                    'auditInfo.state':[
+                        {
+                            limit:"required",
+                            param:"",
+                            errInfo:"审核状态不能为空"
+                        },
+                        {
+                            limit:"num",
+                            param:"",
+                            errInfo:"审核状态错误"
+                        },
+                    ],
+                    'auditInfo.remark':[
+                        {
+                            limit:"maxLength",
+                            param:"200",
+                            errInfo:"原因内容不能超过200"
+                        },
+                    ]
+                });
+            },
+            _auditSubmit:function(){
+                if(!vc.component.auditValidate()){
+                    vc.message(vc.validate.errInfo);
+                    return ;
+                }
+
+                vc.component.addBasePrivilegeInfo.communityId = vc.getCurrentCommunity().communityId;
+                //不提交数据将数据 回调给侦听处理
+                if(vc.notNull($props.callBackListener)){
+                    vc.emit($props.callBackListener,$props.callBackFunction,vc.component.addBasePrivilegeInfo);
+                    $('#addBasePrivilegeModel').modal('hide');
+                    return ;
+                }
+
+
+            },
+            clearAddBasePrivilegeInfo:function(){
+                vc.component.auditInfo={
+                             state:'',
+                             remark:''
+                }
+            }
+        }
+    });
+
+})(window.vc);

+ 1 - 0
WebService/src/main/resources/components/communityPackage/audit-community-manage/auditCommunityManage.html

@@ -58,5 +58,6 @@
             </div>
         </div>
     </div>
+    <vc:create name="audit"></vc:create>
 
 </div>

+ 1 - 1
WebService/src/main/resources/components/communityPackage/audit-community-manage/auditCommunityManage.js

@@ -51,7 +51,7 @@
                            );
             },
             _openAuditCommunityModal:function(){
-                vc.emit('auditCommunity','openAuditCommunityModal',{});
+                vc.emit('audit','openAuditModal',{});
             }
 
         }