pg_adapter
			
			
		
		
							parent
							
								
									39ddc98a11
								
							
						
					
					
						commit
						ad496f468f
					
				| @ -0,0 +1,171 @@ | |||||||
|  | <!DOCTYPE html> | ||||||
|  | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > | ||||||
|  | <head> | ||||||
|  |     <th:block th:include="include :: header('新增载体制作')" /> | ||||||
|  |     <th:block th:include="include :: select2-css" /> | ||||||
|  |     <th:block th:include="include :: bootstrap-select-css" /> | ||||||
|  |     <th:block th:include="include :: datetimepicker-css" /> | ||||||
|  | </head> | ||||||
|  | <body class="white-bg"> | ||||||
|  | <div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> | ||||||
|  |     <form class="form-horizontal m" id="form-carrierlssued-add" th:object="${tdCarrierIssued}"> | ||||||
|  |         <input name="id" th:field="*{id}" type="hidden"> | ||||||
|  |         <div class="row"> | ||||||
|  |             <div class="col-sm-6"> | ||||||
|  |                 <div class="form-group"> | ||||||
|  |                     <label class="col-sm-4 control-label is-required">使用人员:</label> | ||||||
|  |                     <div class="col-sm-8"> | ||||||
|  |                         <input name="usageUser" placeholder="请输入使用人员" required class="form-control" type="text"> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |             <div class="col-sm-6"> | ||||||
|  |                 <div class="form-group"> | ||||||
|  |                     <label class="col-sm-4 control-label is-required">使用期限:</label> | ||||||
|  |                     <div class="col-sm-8"> | ||||||
|  |                         <select id="expirationTime" name="expirationTime" required class="form-control" th:with="type=${@dict.getType('zaiti_use_time')}"> | ||||||
|  |                             <option value="">---请选择---</option> | ||||||
|  |                             <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||||
|  |                         </select> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |         <div class="row"> | ||||||
|  |             <div class="col-sm-12"> | ||||||
|  |                 <div class="form-group"> | ||||||
|  |                     <label class="col-sm-2 control-label is-required">使用时间:</label> | ||||||
|  |                     <div class="col-sm-10"> | ||||||
|  |                         <div id="mentsTime" class="input-daterange input-group "> | ||||||
|  |                             <input type="text" class="input-sm form-control" required name="mentsTime" id="laydate-startTime" placeholder="开始时间"/> | ||||||
|  |                             <span class="input-group-addon">到</span> | ||||||
|  |                             <input type="text" class="input-sm form-control" required name="mentsendTime" id="laydate-endTime" placeholder="结束时间"/> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |         <div class="row"> | ||||||
|  |             <div class="col-sm-12"> | ||||||
|  |                 <div class="form-group"> | ||||||
|  |                     <label class="col-sm-2 control-label is-required">使用要求:</label> | ||||||
|  |                     <div class="col-sm-10"> | ||||||
|  |                         <textarea name="mentsUse" placeholder="请输入使用要求" required class="form-control" type="text"></textarea> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |             </div> | ||||||
|  |         </div> | ||||||
|  |     </form> | ||||||
|  | </div> | ||||||
|  | <th:block th:include="include :: footer" /> | ||||||
|  | <th:block th:include="include :: select2-js" /> | ||||||
|  | <th:block th:include="include :: bootstrap-select-js" /> | ||||||
|  | <th:block th:include="include :: datetimepicker-js" /> | ||||||
|  | <script th:inline="javascript"> | ||||||
|  |     var prefix = ctx + "system/useIssued" | ||||||
|  |     $("#form-carrierlssued-add").validate({ | ||||||
|  |         focusCleanup: true | ||||||
|  |     }); | ||||||
|  |     var app = new Vue({ | ||||||
|  |         el: '#app', | ||||||
|  |         data: { | ||||||
|  |             CityList: [], | ||||||
|  |             AreaList:[], | ||||||
|  |             City:[[${tdCarrierIssued.areaCity}]], | ||||||
|  |             Area:[[${tdCarrierIssued.areaDistrict}]], | ||||||
|  |             params:{ | ||||||
|  |                 parentId:'', | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         mounted(){ | ||||||
|  |             // 初始化地市列表 | ||||||
|  |             this.getCityList(); | ||||||
|  |             if (this.City){ | ||||||
|  |                 this.getAreaList() | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         methods:{ | ||||||
|  |             getCityList(){ | ||||||
|  |                 $.ajax({ | ||||||
|  |                     url: ctx + "system/area/getSysAreaList", | ||||||
|  |                     type: 'GET', | ||||||
|  |                     data:this.params , | ||||||
|  |                     success:((res)=>{ | ||||||
|  |                         this.CityList = res.data | ||||||
|  |                     }) , | ||||||
|  |                 }); | ||||||
|  |             }, | ||||||
|  |             getAreaList(){ | ||||||
|  |                 this.params.parentId = this.City | ||||||
|  |                 $.ajax({ | ||||||
|  |                     url: ctx + "system/area/getSysAreaList", | ||||||
|  |                     type: 'GET', | ||||||
|  |                     data:this.params, | ||||||
|  |                     success:((res)=>{ | ||||||
|  |                         this.AreaList = res.data | ||||||
|  |                     }) , | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     }) | ||||||
|  |     function submitHandler() { | ||||||
|  |         if ($.validate.form()) { | ||||||
|  |             $.operate.save(prefix + "/edit", $('#form-carrierlssued-add').serialize()); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     layui.use('laydate', function(){ | ||||||
|  |         var laydate = layui.laydate; | ||||||
|  | 
 | ||||||
|  |         var startDate = laydate.render({ | ||||||
|  |             elem: '#laydate-startTime', | ||||||
|  |             theme: 'molv', | ||||||
|  |             trigger: 'click', | ||||||
|  |             done: function(value, date) { | ||||||
|  |                 // 结束时间大于开始时间 | ||||||
|  |                 if (value !== '') { | ||||||
|  |                     endDate.config.min.year = date.year; | ||||||
|  |                     endDate.config.min.month = date.month - 1; | ||||||
|  |                     endDate.config.min.date = date.date; | ||||||
|  |                 } else { | ||||||
|  |                     endDate.config.min.year = ''; | ||||||
|  |                     endDate.config.min.month = ''; | ||||||
|  |                     endDate.config.min.date = ''; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  |         var endDate = laydate.render({ | ||||||
|  |             elem: '#laydate-endTime', | ||||||
|  |             theme: 'molv', | ||||||
|  |             trigger: 'click', | ||||||
|  |             done: function(value, date) { | ||||||
|  |                 // Start date cannot be after end date | ||||||
|  |                 if (value !== '') { | ||||||
|  |                     startDate.config.max = { | ||||||
|  |                         year: date.year, | ||||||
|  |                         month: date.month - 1, | ||||||
|  |                         date: date.date | ||||||
|  |                     }; | ||||||
|  |                 } else { | ||||||
|  |                     startDate.config.max = { | ||||||
|  |                         year: '', | ||||||
|  |                         month: '', | ||||||
|  |                         date: '' | ||||||
|  |                     }; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  |     }); | ||||||
|  |     $('#expirationTime').change(function() { | ||||||
|  |         var selectedValue = $(this).val(); | ||||||
|  |         var mentsTimeDiv = $('#mentsTime').parents(".row"); | ||||||
|  | 
 | ||||||
|  |         if (selectedValue === '1') { | ||||||
|  |             mentsTimeDiv.show(); | ||||||
|  |         } | ||||||
|  |         if (selectedValue === '2'){ | ||||||
|  |             mentsTimeDiv.hide(); | ||||||
|  |         } | ||||||
|  |     }); | ||||||
|  | </script> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
| @ -0,0 +1,208 @@ | |||||||
|  | <!DOCTYPE html> | ||||||
|  | <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | ||||||
|  | <head> | ||||||
|  |     <th:block th:include="include :: header('国家秘密载体使用')" /> | ||||||
|  |     <th:block th:include="include :: datetimepicker-css" /> | ||||||
|  | </head> | ||||||
|  | <body class="gray-bg"> | ||||||
|  | <div class="container-div" id="app"> | ||||||
|  |     <div class="row"> | ||||||
|  |         <div class="col-sm-12 search-collapse"> | ||||||
|  |             <form id="formId"> | ||||||
|  |                 <div class="select-list"> | ||||||
|  |                     <ul> | ||||||
|  |                         <li> | ||||||
|  |                             <label>载体名称:</label> | ||||||
|  |                             <input type="text" name="carrierName"/> | ||||||
|  |                         </li> | ||||||
|  |                         <li> | ||||||
|  |                             <label>密级:</label> | ||||||
|  |                             <select name="carrierSecret" th:with="type=${@dict.getType('sys_file_miji')}"> | ||||||
|  |                                 <option value="">所有</option> | ||||||
|  |                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||||
|  |                             </select> | ||||||
|  |                         </li> | ||||||
|  |                         <li> | ||||||
|  |                             <label>载体类型:</label> | ||||||
|  |                             <select name="carrierLevel" th:with="type=${@dict.getType('sys_provide_level')}"> | ||||||
|  |                                 <option value="">所有</option> | ||||||
|  |                                 <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> | ||||||
|  |                             </select> | ||||||
|  |                         </li> | ||||||
|  |                         <li> | ||||||
|  |                             <label>所属市州:</label> | ||||||
|  |                             <select id="City" name="areaCity" v-model="City"> | ||||||
|  |                                 <option value="">请选择</option> | ||||||
|  |                                 <option v-for="option in CityList" :value="option.id" :key="option.id"> | ||||||
|  |                                     {{ option.name }} | ||||||
|  |                                 </option> | ||||||
|  |                             </select> | ||||||
|  |                         </li> | ||||||
|  |                         <li> | ||||||
|  |                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | ||||||
|  |                             <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> | ||||||
|  |                         </li> | ||||||
|  |                     </ul> | ||||||
|  |                 </div> | ||||||
|  |             </form> | ||||||
|  |         </div> | ||||||
|  |         <div class="col-sm-12 select-table table-striped"> | ||||||
|  |             <table id="bootstrap-table"></table> | ||||||
|  |         </div> | ||||||
|  |     </div> | ||||||
|  | </div> | ||||||
|  | <th:block th:include="include :: footer" /> | ||||||
|  | <th:block th:include="include :: datetimepicker-js" /> | ||||||
|  | <script th:inline="javascript"> | ||||||
|  |     var editFlag = [[${@permission.hasPermi('system:useIssued:edit')}]]; | ||||||
|  |     var carrierLevelDatas = [[${@dict.getType('sys_provide_level')}]]; | ||||||
|  |     var fileSecretDatas = [[${@dict.getType('sys_file_miji')}]]; | ||||||
|  |     var carrierExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]]; | ||||||
|  |     var stateDatas = [[${@dict.getType('carrier_issued_status')}]]; | ||||||
|  |     var prefix = ctx + "system/useIssued"; | ||||||
|  |     let datas = [] | ||||||
|  |     $.ajax({ | ||||||
|  |         url: ctx + "system/area/getAllList", | ||||||
|  |         type: 'GET', | ||||||
|  |         data:{parentId:''} , | ||||||
|  |         success:((res)=>{ | ||||||
|  |             datas = res.data | ||||||
|  |         }) , | ||||||
|  |     }); | ||||||
|  |     $(function() { | ||||||
|  |         var options = { | ||||||
|  |             url: prefix + "/list", | ||||||
|  |             createUrl: prefix + "/add", | ||||||
|  |             updateUrl: prefix + "/edit/{id}", | ||||||
|  |             detailUrl: prefix + "/detail/{id}", | ||||||
|  |             removeUrl: prefix + "/remove", | ||||||
|  |             exportUrl: prefix + "/export", | ||||||
|  |             modalName: "国家秘密载体使用", | ||||||
|  |             columns: [ | ||||||
|  |                 { | ||||||
|  |                     checkbox: true | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'id', | ||||||
|  |                     title: 'id', | ||||||
|  |                     visible: false | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'areaCity', | ||||||
|  |                     title: '所属市州', | ||||||
|  |                     formatter: function(value, row, index) { | ||||||
|  |                         return getCity(datas, value) | ||||||
|  |                     } | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'carrierName', | ||||||
|  |                     title: '载体名称' | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'carrierLevel', | ||||||
|  |                     title: '载体类型', | ||||||
|  |                     formatter: function(value, row, index) { | ||||||
|  |                         return $.table.selectDictLabel(carrierLevelDatas, value); | ||||||
|  |                     } | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'carrierExtent', | ||||||
|  |                     title: '紧急程度', | ||||||
|  |                     formatter: function(value, row, index) { | ||||||
|  |                         return $.table.selectDictLabel(carrierExtentDatas, value); | ||||||
|  |                     } | ||||||
|  |                 }, | ||||||
|  | 
 | ||||||
|  |                 { | ||||||
|  |                     field: 'carrierSecret', | ||||||
|  |                     title: '密级', | ||||||
|  |                     formatter: function(value, row, index) { | ||||||
|  |                         return $.table.selectDictLabel(fileSecretDatas, value); | ||||||
|  |                     } | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'carrierTerm', | ||||||
|  |                     title: '保密期限' | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'createTime', | ||||||
|  |                     title: '创建时间', | ||||||
|  |                     sortable: true | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     field: 'status', | ||||||
|  |                     title: '状态', | ||||||
|  |                     formatter: function(value, row, index) { | ||||||
|  |                         return $.table.selectDictLabel(stateDatas, value); | ||||||
|  |                     } | ||||||
|  |                 }, | ||||||
|  |                 { | ||||||
|  |                     title: '操作', | ||||||
|  |                     align: 'center', | ||||||
|  |                     formatter: function(value, row, index) { | ||||||
|  |                         var actions = []; | ||||||
|  |                         actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>使用</a> '); | ||||||
|  |                         if (row.expirationTime == '1' && row.status == '2') { | ||||||
|  |                             actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="reclaim(\'' + row.id + '\')"><i class="fa fa-edit"></i>回收</a> '); | ||||||
|  |                         } | ||||||
|  |                         return actions.join(''); | ||||||
|  |                     } | ||||||
|  |                 }] | ||||||
|  |         }; | ||||||
|  |         $.table.init(options); | ||||||
|  |     }); | ||||||
|  |     function edit(id) { | ||||||
|  |         table.set(); | ||||||
|  |         if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) { | ||||||
|  |             var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0]; | ||||||
|  |             if ($.common.isEmpty(row)) { | ||||||
|  |                 $.modal.alertWarning("请至少选择一条记录"); | ||||||
|  |                 return; | ||||||
|  |             } | ||||||
|  |             var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]); | ||||||
|  |             $.modal.open(table.options.modalName, url, 800, 500); | ||||||
|  |         } else { | ||||||
|  |             $.modal.open(table.options.modalName, $.operate.editUrl(id), 800, 500); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     function reclaim(id){ | ||||||
|  |         $.modal.confirm("确认是否回收?", function() { | ||||||
|  |             $.ajax({ | ||||||
|  |                 url: prefix + "/updateStatus/" + id, | ||||||
|  |                 type: 'GET', | ||||||
|  |                 data:{}, | ||||||
|  |                 success:((res)=>{ | ||||||
|  |                     $.operate.ajaxSuccess(res); | ||||||
|  |                 }) , | ||||||
|  |             }); | ||||||
|  |         }); | ||||||
|  |     } | ||||||
|  |     var app = new Vue({ | ||||||
|  |         el: '#app', | ||||||
|  |         data: { | ||||||
|  |             CityList: [], | ||||||
|  |             City:'', | ||||||
|  |             params:{ | ||||||
|  |                 parentId:'', | ||||||
|  |             } | ||||||
|  |         }, | ||||||
|  |         mounted(){ | ||||||
|  |             // 初始化地市列表 | ||||||
|  |             this.getCityList(); | ||||||
|  |         }, | ||||||
|  |         methods:{ | ||||||
|  |             getCityList(){ | ||||||
|  |                 $.ajax({ | ||||||
|  |                     url: ctx + "system/area/getSysAreaList", | ||||||
|  |                     type: 'GET', | ||||||
|  |                     data:this.params , | ||||||
|  |                     success:((res)=>{ | ||||||
|  |                         this.CityList = res.data | ||||||
|  |                     }) , | ||||||
|  |                 }); | ||||||
|  |             }, | ||||||
|  |         } | ||||||
|  |     }) | ||||||
|  | </script> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
					Loading…
					
					
				
		Reference in new issue