|
|
|
@ -55,6 +55,10 @@
|
|
|
|
|
.space-y-3{
|
|
|
|
|
margin-bottom: 1.5rem;
|
|
|
|
|
}
|
|
|
|
|
.form-horizontal .control-label {
|
|
|
|
|
text-align: left;
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body class="bg-gray-50 font-sans">
|
|
|
|
@ -252,26 +256,38 @@
|
|
|
|
|
placeholder="请输入单位及职务职称">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 已(拟)任涉密岗位 - 修改为下拉框 -->
|
|
|
|
|
<div class="space-y-3">
|
|
|
|
|
<label for="smPost" class="block text-sm font-medium text-gray-700">已(拟)任涉密岗位</label>
|
|
|
|
|
<label for="smPost" 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-shield-halved"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<input disabled type="text" id="smPost" 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"
|
|
|
|
|
placeholder="请输入已(拟)任涉密岗位">
|
|
|
|
|
<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="smPost" 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="smGrade" class="block text-sm font-medium text-gray-700">涉密等级</label>
|
|
|
|
|
<label for="smGrade" 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-lock"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<input disabled type="text" id="smGrade" v-model="formData.smGrade"
|
|
|
|
|
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"
|
|
|
|
|
placeholder="请输入涉密等级">
|
|
|
|
|
<span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">
|
|
|
|
|
<i class="fa-solid fa-lock"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<select required id="smGrade" v-model="formData.smGrade"
|
|
|
|
|
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="level in levelOptions" :value="level">{{ level }}</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>
|
|
|
|
@ -282,8 +298,8 @@
|
|
|
|
|
<!-- </a>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- 按钮 -->
|
|
|
|
|
<div class="row" style="display: ruby;">
|
|
|
|
|
<button type="submit" class="group relative w-full max-w-xs flex justify-center py-3 px-6 border border-transparent text-base font-medium rounded-lg text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-all duration-300">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<button style="float: left;margin-right: 10px;" type="submit" class="group relative w-full max-w-xs flex justify-center py-3 px-6 border border-transparent text-base font-medium rounded-lg text-white bg-primary hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-all duration-300">
|
|
|
|
|
<span class="absolute left-0 inset-y-0 flex items-center pl-3" style="margin-right: 5px;">
|
|
|
|
|
<i class="fa-solid fa-file-pdf text-white transform group-hover:translate-x-0.5 transition-transform duration-200"></i>
|
|
|
|
|
</span>
|
|
|
|
@ -350,12 +366,24 @@
|
|
|
|
|
|
|
|
|
|
<div class="row mt-6">
|
|
|
|
|
<div class="col-sm-offset-5 col-sm-10" style="display: flex;">
|
|
|
|
|
<!-- <button type="button" class="btn btn-sm btn-primary" @click="submitHandler()"><i class="fa fa-check"></i>提 交</button> -->
|
|
|
|
|
<button type="button" class="btn btn-sm btn-primary" @click="submitHandler()"><i class="fa fa-check"></i>保 存</button>
|
|
|
|
|
<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 加载中 -->
|
|
|
|
|
<div v-if="isLoading" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
|
|
|
|
|
<div class="bg-white rounded-xl p-6 shadow-lg max-w-md w-full">
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
|
<div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary mr-4"></div>
|
|
|
|
|
<div>
|
|
|
|
|
<h3 class="text-lg font-medium text-gray-800">正在处理</h3>
|
|
|
|
|
<p class="text-sm text-gray-500 mt-1">请稍候,系统正在生成您的PDF文件...</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 上传成功提示 -->
|
|
|
|
|
<div v-if="uploadSuccess" class="fixed bottom-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg transform transition-all duration-500 translate-y-0 opacity-100">
|
|
|
|
|
<div class="flex items-center">
|
|
|
|
@ -390,7 +418,7 @@
|
|
|
|
|
<th:block th:include="include :: jasny-bootstrap-js"/>
|
|
|
|
|
<th:block th:include="include :: element-js"/>
|
|
|
|
|
<script type="text/javascript" th:inline="javascript">
|
|
|
|
|
var prefix = ctx + "system/applyList";
|
|
|
|
|
var prefix = ctx + "system/onDutyList";
|
|
|
|
|
new Vue({
|
|
|
|
|
el: '#app',
|
|
|
|
|
data: {
|
|
|
|
@ -427,7 +455,12 @@
|
|
|
|
|
previewingFile: {},
|
|
|
|
|
uploadSuccess: false,
|
|
|
|
|
uploadSuccessMessage: '',
|
|
|
|
|
prefix: ctx + "system/applyList",
|
|
|
|
|
prefix: ctx + "system/onDutyList",
|
|
|
|
|
// 新增下拉框数据
|
|
|
|
|
postOptions: [], // 已(拟)任涉密岗位选项
|
|
|
|
|
levelOptions: [], // 涉密等级选项
|
|
|
|
|
isLoadingPosts: false,
|
|
|
|
|
isLoadingLevels: false
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
previewUrl() {
|
|
|
|
@ -613,9 +646,38 @@
|
|
|
|
|
this.$message.error('下载文件时出错');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 新增获取下拉框数据的方法
|
|
|
|
|
fetchPostOptions() {
|
|
|
|
|
this.isLoadingPosts = true;
|
|
|
|
|
axios.post('/system/classifiedPost/getPostNames')
|
|
|
|
|
.then(response => {
|
|
|
|
|
// 直接使用返回的字符串数组
|
|
|
|
|
this.postOptions = response.data.data || [];
|
|
|
|
|
this.isLoadingPosts = false;
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
console.error('获取涉密岗位数据失败:', error);
|
|
|
|
|
this.isLoadingPosts = false;
|
|
|
|
|
this.$message.error('获取涉密岗位数据失败,请刷新页面重试');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
fetchLevelOptions() {
|
|
|
|
|
this.isLoadingLevels = true;
|
|
|
|
|
axios.post('/system/classifiedPost/getClassifiedLevels')
|
|
|
|
|
.then(response => {
|
|
|
|
|
// 直接使用返回的字符串数组
|
|
|
|
|
this.levelOptions = response.data.data || [];
|
|
|
|
|
this.isLoadingLevels = false;
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
console.error('获取涉密等级数据失败:', error);
|
|
|
|
|
this.isLoadingLevels = false;
|
|
|
|
|
this.$message.error('获取涉密等级数据失败,请刷新页面重试');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
submitHandler() {
|
|
|
|
|
if (this.uploadedFiles.length == 0) {
|
|
|
|
|
this.$message.warning('请上传所需材料');
|
|
|
|
|
if (this.formData.smGrade != '' && !this.formData.smPost != '') {
|
|
|
|
|
this.$message.warning('请选择部门或岗位');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -624,7 +686,7 @@
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
$.operate.saveTab(`${this.prefix}/submit?applyId=${this.formData.applyId}`);
|
|
|
|
|
$.operate.saveTab(`${this.prefix}/saveDuty`,this.formData);
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
@ -742,6 +804,9 @@
|
|
|
|
|
|
|
|
|
|
// 获取已上传文件
|
|
|
|
|
this.getUploadedFiles();
|
|
|
|
|
// 页面加载时获取下拉框数据
|
|
|
|
|
this.fetchPostOptions();
|
|
|
|
|
this.fetchLevelOptions();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|