涉密人员培训修改地区选择方式

master
dshclm 10 months ago
parent 61d62ad5b6
commit 8877d5f969

@ -6,19 +6,29 @@
<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-train-edit" th:object="${tdTrain}">
<input name="ID" th:field="*{ID}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属地市:</label>
<div class="col-sm-8">
<input name="AREAID" disabled th:field="*{AREAID}" class="form-control" type="text" required>
<select id="City" name="AREAID" disabled required @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 class="form-group">
<label class="col-sm-3 control-label">所属区县:</label>
<div class="col-sm-8">
<input name="FRAMEWORK" disabled th:field="*{FRAMEWORK}" class="form-control" type="text">
<select id="Area" name="FRAMEWORK" 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 class="form-group">
@ -110,6 +120,49 @@
$("input[name='trainState']").val(item.dictLabel);
}
})
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:[[${tdTrain.AREAID}]],
Area:[[${tdTrain.FRAMEWORK}]],
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
}) ,
});
}
}
})
$("input[name='trainDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",

@ -6,19 +6,29 @@
<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-train-examine" th:object="${tdTrain}">
<input name="ID" th:field="*{ID}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">所属地市:</label>
<div class="col-sm-8">
<input name="AREAID" disabled th:field="*{AREAID}" class="form-control" type="text" required>
<select id="City" name="AREAID" required 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 class="form-group">
<label class="col-sm-3 control-label">所属区县:</label>
<div class="col-sm-8">
<input name="FRAMEWORK" disabled th:field="*{FRAMEWORK}" class="form-control" type="text">
<select id="Area" name="FRAMEWORK" 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 class="form-group">
@ -105,6 +115,48 @@
$("input[name='trainState']").val(item.dictLabel);
}
})
var app = new Vue({
el: '#app',
data: {
CityList: [],
AreaList:[],
City:[[${tdTrain.AREAID}]],
Area:[[${tdTrain.FRAMEWORK}]],
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
}) ,
});
}
}
})
var prefix = ctx + "system/train";
$("#form-train-examine").validate({
focusCleanup: true

@ -4,7 +4,7 @@
<th:block th:include="include :: header('涉密人员培训列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="container-div" id="app">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
@ -15,8 +15,13 @@
<input type="text" name="trainName"/>
</li>
<li>
<label>所属地市:</label>
<input type="text" name="AREAID"/>
<label>所属地区:</label>
<select id="City" name="AREAID" @change="getAreaList()" v-model="City">
<option value="">请选择</option>
<option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }}
</option>
</select>
</li>
<li>
<label>培训日期:</label>
@ -202,6 +207,32 @@
var url = prefix + '/examine/' + id;
$.modal.open("涉密人员培训审核", url);
}
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…
Cancel
Save