修改涉密人员培训--涉密人名称选择方式

kingbase
dshclm 10 months ago
parent dad5200005
commit 0c36b00798

@ -38,9 +38,14 @@
<div class="row">
<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 is-required">涉密人员名称:</label>
<div class="col-sm-8">
<input name="USERNAME" required class="form-control" type="text">
<select id="User" name="USERNAME" required class="form-control m-b">
<option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }}
</option>
</select>
</div>
</div>
</div>
@ -48,7 +53,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required ">单位名称:</label>
<div class="col-sm-8">
<input name="deptName" required class="form-control" type="text">
<input name="deptName" placeholder="请输入单位名称" required class="form-control m-b" type="text">
</div>
</div>
</div>
@ -58,7 +63,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">部门:</label>
<div class="col-sm-8">
<input name="PART" required class="form-control" type="text">
<input name="PART" required placeholder="请输入部门" class="form-control" type="text">
</div>
</div>
</div>
@ -89,9 +94,9 @@
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">培训人员</label>
<label class="col-sm-4 control-label is-required">培训地点</label>
<div class="col-sm-8">
<input name="trainName" class="form-control" type="text">
<textarea name="trainAddress" placeholder="请输入培训地点" required class="form-control"></textarea>
</div>
</div>
</div>
@ -110,24 +115,45 @@
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-2 control-label is-required">培训地点:</label>
<div class="col-sm-10">
<textarea name="trainAddress" required class="form-control"></textarea>
<label class="col-sm-4 control-label">填报人:</label>
<div class="col-sm-8">
<input name="createStaffid" placeholder="请输入填报人" class="form-control" type="text" >
</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">
<div class="input-group date">
<input name="createDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</div>
</div>
<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">
<input name="trainName" placeholder="请输入培训人员" class="form-control" type="text">
</div>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "system/train"
$("#form-train-add").validate({
$("#form-train-add").validate({
focusCleanup: true
});
var app = new Vue({
@ -135,11 +161,13 @@
data: {
CityList: [],
AreaList:[],
userList:[],
City:'',
Area:'',
params:{
parentId:'',
}
},
userPost:"system/user/list"
},
mounted(){
// 初始化地市列表
@ -147,8 +175,18 @@
if (this.City){
this.getAreaList()
}
this.getUserList()
},
methods:{
getUserList(){
$.ajax({
url: ctx + this.userPost,
type: 'POST',
success:((res)=>{
this.userList = res.rows
}) ,
});
},
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",

@ -41,9 +41,14 @@
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">名称:</label>
<label class="col-sm-4 control-label">涉密人名称:</label>
<div class="col-sm-8">
<input name="USERNAME" disabled th:field="*{USERNAME}" class="form-control" type="text">
<select id="User" name="USERNAME" disabled required v-model="userName" class="form-control m-b">
<option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }}
</option>
</select>
</div>
</div>
</div>
@ -51,7 +56,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">单位名称:</label>
<div class="col-sm-8">
<input name="deptName" disabled th:field="*{deptName}" class="form-control" type="text">
<input name="deptName" disabled th:field="*{deptName}" class="form-control m-b" type="text">
</div>
</div>
</div>
@ -160,9 +165,12 @@
AreaList:[],
City:[[${tdTrain.AREAID}]],
Area:[[${tdTrain.FRAMEWORK}]],
userName:[[${tdTrain.USERNAME}]],
userList:[],
params:{
parentId:'',
}
},
userPost:"system/user/list"
},
mounted(){
// 初始化地市列表
@ -170,8 +178,18 @@
if (this.City){
this.getAreaList()
}
this.getUserList()
},
methods:{
getUserList(){
$.ajax({
url: ctx + this.userPost,
type: 'POST',
success:((res)=>{
this.userList = res.rows
}) ,
});
},
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",

@ -39,9 +39,14 @@
<div class="row">
<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 is-required">涉密人名称:</label>
<div class="col-sm-8">
<input name="USERNAME" required th:field="*{USERNAME}" class="form-control" type="text">
<select id="User" name="USERNAME" required v-model="userName" class="form-control m-b">
<option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }}
</option>
</select>
</div>
</div>
</div>
@ -49,7 +54,7 @@
<div class="form-group">
<label class="col-sm-4 control-label is-required">单位名称:</label>
<div class="col-sm-8">
<input name="deptName" required th:field="*{deptName}" class="form-control" type="text">
<input name="deptName" required th:field="*{deptName}" class="form-control m-b" type="text">
</div>
</div>
</div>
@ -132,9 +137,12 @@
AreaList:[],
City:[[${tdTrain.AREAID}]],
Area:[[${tdTrain.FRAMEWORK}]],
userName:[[${tdTrain.USERNAME}]],
userList:[],
params:{
parentId:'',
}
},
userPost:"system/user/list"
},
mounted(){
// 初始化地市列表
@ -142,8 +150,18 @@
if (this.City){
this.getAreaList()
}
this.getUserList()
},
methods:{
getUserList(){
$.ajax({
url: ctx + this.userPost,
type: 'POST',
success:((res)=>{
this.userList = res.rows
}) ,
});
},
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",

@ -42,7 +42,12 @@
<div class="form-group">
<label class="col-sm-4 control-label">人员名称:</label>
<div class="col-sm-8">
<input name="USERNAME" disabled th:field="*{USERNAME}" class="form-control" type="text">
<select id="User" name="USERNAME" disabled required v-model="userName" class="form-control m-b">
<option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }}
</option>
</select>
</div>
</div>
</div>
@ -50,7 +55,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">单位名称:</label>
<div class="col-sm-8">
<input name="deptName" disabled th:field="*{deptName}" class="form-control" type="text">
<input name="deptName" disabled th:field="*{deptName}" class="form-control m-b" type="text">
</div>
</div>
</div>
@ -161,9 +166,12 @@
AreaList:[],
City:[[${tdTrain.AREAID}]],
Area:[[${tdTrain.FRAMEWORK}]],
userName:[[${tdTrain.USERNAME}]],
userList:[],
params:{
parentId:'',
}
},
userPost:"system/user/list"
},
mounted(){
// 初始化地市列表
@ -171,8 +179,18 @@
if (this.City){
this.getAreaList()
}
this.getUserList()
},
methods:{
getUserList(){
$.ajax({
url: ctx + this.userPost,
type: 'POST',
success:((res)=>{
this.userList = res.rows
}) ,
});
},
getCityList(){
$.ajax({
url: ctx + "system/area/getSysAreaList",

@ -82,6 +82,14 @@
datas = res.data
}) ,
});
let userList = []
$.ajax({
url: ctx + "system/user/list",
type: 'POST',
success:((res)=>{
userList = res.rows
}) ,
});
$(function() {
var options = {
url: prefix + "/list",
@ -122,8 +130,10 @@
},
{
field: 'username',
title: '人员名称',
visible: false
title: '涉密人名称',
formatter:function (value, row, index) {
return getUser(userList,value)
}
},
{
field: 'deptName',
@ -228,6 +238,23 @@
var url = prefix + '/examine/' + id;
$.modal.open("涉密人员培训审核", url);
}
function getUser(datas,value){
if ($.common.isEmpty(datas) || $.common.isEmpty(value)) {
return '';
}
var actions = []
$.each(datas, function(index, user) {
if (user.userId == value) {
actions.push($.common.sprintf("<span>%s</span>", user.userName));
return false;
}
});
if (actions.length === 0) {
actions.push($.common.sprintf("<span>%s</span>", value))
}
return actions.join('');
}
var app = new Vue({
el: '#app',
data: {

Loading…
Cancel
Save