|
|
|
@ -106,16 +106,32 @@
|
|
|
|
|
<!-- 第二行前两列:所在岗位、培训时间 -->
|
|
|
|
|
<div class="md:col-span-1 space-y-3">
|
|
|
|
|
<!-- 所在岗位 -->
|
|
|
|
|
<!-- <div class="space-y-3">-->
|
|
|
|
|
<!-- <label for="trainPost" class="block text-sm font-medium text-gray-700 is-required control-label">所在岗位</label>-->
|
|
|
|
|
<!-- <div class="relative">-->
|
|
|
|
|
<!-- <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">-->
|
|
|
|
|
<!-- <i class="fa-solid fa-briefcase"></i>-->
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
<!-- <input v-model="formData.trainPost" id="trainPost" placeholder="请输入所在岗位" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg" type="text" maxlength="30" required>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- 已(拟)任涉密岗位 - 修改为下拉框 -->
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<label for="trainPost" class="block text-sm font-medium text-gray-700 is-required control-label">所在岗位</label>
|
|
|
|
|
<label for="trainPost" class="block text-sm font-medium text-gray-700 is-required control-label">已(拟)任涉密岗位</label>
|
|
|
|
|
<div class="relative">
|
|
|
|
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">
|
|
|
|
|
<i class="fa-solid fa-briefcase"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<input v-model="formData.trainPost" id="trainPost" placeholder="请输入所在岗位" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg" type="text" maxlength="30" required>
|
|
|
|
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">
|
|
|
|
|
<i class="fa-solid fa-shield-halved"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<select required id="trainPost" v-model="formData.smPost"
|
|
|
|
|
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-primary transition-colors duration-200 appearance-none">
|
|
|
|
|
<option value="">请选择岗位</option>
|
|
|
|
|
<option v-for="post in postOptions" :value="post">{{ post }}</option>
|
|
|
|
|
</select>
|
|
|
|
|
<div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
|
|
|
|
|
<i class="fa-solid fa-chevron-down text-gray-400"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 培训时间 -->
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<label for="trainTime" class="block text-sm font-medium text-gray-700 is-required control-label">培训时间</label>
|
|
|
|
@ -325,8 +341,27 @@
|
|
|
|
|
uploadSuccessMessage: '',
|
|
|
|
|
prefix: ctx + "system/train",
|
|
|
|
|
pdfUrl:'/file/pdfFiles/保密教育培训登记表.pdf',
|
|
|
|
|
// 新增下拉框数据
|
|
|
|
|
postOptions: [], // 已(拟)任涉密岗位选项
|
|
|
|
|
isLoadingPosts: false,
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 新增获取下拉框数据的方法
|
|
|
|
|
fetchPostOptions: function() {
|
|
|
|
|
this.isLoadingPosts = true;
|
|
|
|
|
var _this = this;
|
|
|
|
|
axios.post('/system/classifiedPost/getPostNames')
|
|
|
|
|
.then(function(response) {
|
|
|
|
|
// 直接使用返回的字符串数组
|
|
|
|
|
_this.postOptions = response.data.data || [];
|
|
|
|
|
_this.isLoadingPosts = false;
|
|
|
|
|
})
|
|
|
|
|
.catch(function(error) {
|
|
|
|
|
console.error('获取涉密岗位数据失败:', error);
|
|
|
|
|
_this.isLoadingPosts = false;
|
|
|
|
|
_this.$message.error('获取涉密岗位数据失败,请刷新页面重试');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 新增文件上传相关方法
|
|
|
|
|
handleFileSelection(event) {
|
|
|
|
|
this.selectedFiles = event.target.files;
|
|
|
|
@ -545,7 +580,8 @@
|
|
|
|
|
|
|
|
|
|
// 获取已上传文件
|
|
|
|
|
this.getUploadedFiles();
|
|
|
|
|
|
|
|
|
|
// 页面加载时获取下拉框数据
|
|
|
|
|
this.fetchPostOptions();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// 初始化日期选择器
|
|
|
|
|