国家秘密载体制作

pg_adapter
dshclm 9 months ago
parent 4d060476ff
commit 8554de17a9

@ -9,6 +9,28 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-fileprovide-add">
<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">
<select id="City" name="areaCity" required class="form-control m-b">
<option value="">---请选择---</option>
</select>
</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="Area" name="areaDistrict" required class="form-control m-b">
<option value="">---请选择---</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
@ -111,22 +133,74 @@
$("#form-fileprovide-add").validate({
focusCleanup: true
});
$(document).ready(function() {
// 获取市级数据并填充到城市下拉框
$.ajax({
url: ctx + "system/area/getSysAreaList",
method: 'GET',
success: function(res) {
var cities = res.data; // 假设返回的数据中有一个叫做 'cities' 的字段包含市级数据
var $citySelect = $('#City');
// 填充城市下拉框
cities.forEach(function(city) {
$citySelect.append($('<option>', {
value: city.id,
text: city.name
}));
});
// 初始化 select2 插件
$citySelect.select2();
},
error: function(err) {
console.error('Failed to load city data:', err);
}
});
// 监听城市下拉框的变化事件
$('#City').on('change', function() {
var selectedCityId = $(this).val();
// 如果未选择城市,则不执行后续操作
if (!selectedCityId) return;
// 根据选中的城市ID发送请求获取对应的区级数据
$.ajax({
url: ctx + "system/area/getSysAreaList",
data:{parentId:selectedCityId},
method: 'GET',
success: function(res) {
var areas = res.data; // 假设返回的数据中有一个叫做 'areas' 的字段包含区级数据
var $areaSelect = $('#Area');
// 清空区级下拉框并填充数据
$areaSelect.empty().append($('<option>', {
value: '',
text: '请选择区'
}));
areas.forEach(function(area) {
$areaSelect.append($('<option>', {
value: area.id,
text: area.name
}));
});
// 更新 select2 插件
$areaSelect.select2();
},
error: function(err) {
console.error('Failed to load area data:', err);
}
});
});
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-fileprovide-add').serialize());
}
}
$("input[name='provideDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(function() {
$('#targetDepart').select2({
placeholder: "请选择接收单位",
allowClear: true
});
})
</script>
</body>
</html>

@ -29,10 +29,12 @@
</select>
</li>
<li>
<label>紧急程度:</label>
<select name="carrierExtent" th:with="type=${@dict.getType('sys_file_jinjichengdu')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<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>
@ -73,6 +75,15 @@
var carrierExtentDatas = [[${@dict.getType('sys_file_jinjichengdu')}]];
var stateDatas = [[${@dict.getType('sys_carrier_status')}]];
var prefix = ctx + "system/carrier";
let datas = []
$.ajax({
url: ctx + "system/area/getAllList",
type: 'GET',
data:{parentId:''} ,
success:((res)=>{
datas = res.data
}) ,
});
$(function() {
var options = {
url: prefix + "/list",
@ -92,8 +103,11 @@
visible: false
},
{
field: 'carrierCount',
title: '载体数量'
field: 'areaCity',
title: '所属市州',
formatter: function(value, row, index) {
return getCity(datas, value)
}
},
{
field: 'carrierName',
@ -127,10 +141,6 @@
return $.table.selectDictLabel(fileSecretDatas, value);
}
},
{
field: 'carrierNumber',
title: '编号'
},
{
field: 'carrierTerm',
title: '保密期限'
@ -171,6 +181,32 @@
$.modal.msgWarning('取消操作')
});
}
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>

@ -7,9 +7,37 @@
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app">
<form class="form-horizontal m" id="form-fileprovide-add" th:object="${tdCarrier}">
<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 ">所属地市:</label>
<div class="col-sm-8">
<select id="City" name="areaCity" disabled @change="getAreaList()" v-model="City" class="form-control m-b">
<option value="">请选择</option>
<option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }}
</option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label ">所属区县:</label>
<div class="col-sm-8">
<select id="Area" name="areaDistrict" disabled v-model="Area" class="form-control m-b">
<option value="">请选择</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }}
</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
@ -112,22 +140,53 @@
$("#form-fileprovide-add").validate({
focusCleanup: true
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:[[${tdCarrier.areaCity}]],
Area:[[${tdCarrier.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 + "/add", $('#form-fileprovide-add').serialize());
}
}
$("input[name='provideDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(function() {
$('#targetDepart').select2({
placeholder: "请选择接收单位",
allowClear: true
});
})
</script>
</body>
</html>

@ -2,14 +2,42 @@
<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 :: 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">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app">
<form class="form-horizontal m" id="form-fileprovide-add" th:object="${tdCarrier}">
<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">
<select id="City" name="areaCity" required @change="getAreaList()" v-model="City" class="form-control">
<option value="">请选择</option>
<option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }}
</option>
</select>
</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="Area" name="areaDistrict" required v-model="Area" class="form-control">
<option value="">请选择</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }}
</option>
</select>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
@ -23,7 +51,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">载体类型:</label>
<div class="col-sm-8">
<select name="carrierLevel" required class="form-control m-b" th:with="type=${@dict.getType('sys_provide_level')}">
<select name="carrierLevel" required class="form-control" th:with="type=${@dict.getType('sys_provide_level')}">
<option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{carrierLevel}"></option>
</select>
@ -44,7 +72,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">密级:</label>
<div class="col-sm-8">
<select name="carrierSecret" required class="form-control m-b" th:with="type=${@dict.getType('sys_file_miji')}">
<select name="carrierSecret" required class="form-control" th:with="type=${@dict.getType('sys_file_miji')}">
<option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{carrierSecret}"></option>
</select>
@ -57,7 +85,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">紧急程度:</label>
<div class="col-sm-8">
<select name="carrierExtent" required class="form-control m-b" th:with="type=${@dict.getType('sys_file_jinjichengdu')}">
<select name="carrierExtent" required class="form-control" th:with="type=${@dict.getType('sys_file_jinjichengdu')}">
<option value="">---请选择---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{carrierExtent}"></option>
</select>
@ -84,7 +112,7 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label is-required">发放范围:</label>
<label class="col-sm-4 control-label">发放范围:</label>
<div class="col-sm-8">
<input name="carrierContent" placeholder="请输入发放范围" th:field="*{carrierContent}" required class="form-control" type="text">
</div>
@ -94,7 +122,7 @@
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label class="col-sm-2 control-label is-required">定密依据:</label>
<label class="col-sm-2 control-label">定密依据:</label>
<div class="col-sm-10">
<textarea name="carrierAlliance" th:field="*{carrierAlliance}" placeholder="请输入定密依据" required class="form-control" type="text"></textarea>
</div>
@ -104,30 +132,61 @@
</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 :: 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/carrier"
$("#form-fileprovide-add").validate({
focusCleanup: true
});
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:[[${tdCarrier.areaCity}]],
Area:[[${tdCarrier.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 + "/add", $('#form-fileprovide-add').serialize());
}
}
$("input[name='provideDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(function() {
$('#targetDepart').select2({
placeholder: "请选择接收单位",
allowClear: true
});
})
</script>
</body>
</html>

Loading…
Cancel
Save