外宿申请-申请表调整
This commit is contained in:
@@ -51,3 +51,12 @@ export function delOutsideAccommodationAttachment(id) {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除外宿申请附件
|
||||||
|
export function deleteOutsideAccommodationAttachmentNameAndStuName(query) {
|
||||||
|
return request({
|
||||||
|
url: '/dormitory/outsideAccommodationAttachment/OutsideAccommodationAttachment',
|
||||||
|
method: 'post',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-upload :style="uploadStyle" action="" :class="['cm-affix', { 'is-disabled': inputDisabled }]"
|
<el-upload
|
||||||
:disabled="inputDisabled" :multiple="true" :http-request="handleUpload" :file-list="fileList" :accept="accpet"
|
:style="uploadStyle"
|
||||||
:show-file-list="false" :before-upload="handleBeforeUpload">
|
action=""
|
||||||
<el-button v-if="inputDisabled !== true" id="affix1" :disabled="notupload" size="small" type="primary"><i
|
:class="['cm-affix', {'is-disabled': inputDisabled}]"
|
||||||
class='el-icon-upload2'></i>点击上传</el-button>
|
:disabled="inputDisabled"
|
||||||
<el-button v-if="this.affixId !== null && this.affixId !== '' && this.fileList.length > 0" id="affix2"
|
:multiple="true"
|
||||||
size="small" @click.stop="downloadPack()">
|
:http-request="handleUpload"
|
||||||
<div v-if="downloading" class="el-icon-loading file-upload"
|
:file-list="fileList"
|
||||||
style="margin-left: 0px;margin-right: 3px;font-size: 14px;" />
|
:accept="accpet"
|
||||||
|
:show-file-list="false"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
|
>
|
||||||
|
<el-button v-if="inputDisabled !== true" id="affix1" :disabled="notupload" size="small" type="primary"><i class='el-icon-upload2'></i>点击上传</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="this.affixId !== null && this.affixId !== '' && this.fileList.length > 0"
|
||||||
|
id="affix2"
|
||||||
|
size="small"
|
||||||
|
@click.stop="downloadPack()"
|
||||||
|
>
|
||||||
|
<div v-if="downloading" class="el-icon-loading file-upload" style="margin-left: 0px;margin-right: 3px;font-size: 14px;" />
|
||||||
打包下载
|
打包下载
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -19,14 +30,17 @@
|
|||||||
<div v-if="item.status===1" class="el-icon-loading file-upload" title="上传中..." />
|
<div v-if="item.status===1" class="el-icon-loading file-upload" title="上传中..." />
|
||||||
<div v-if="item.status===2" class="el-icon-download file-download" title="下载" @click="downloadFile(item)" />
|
<div v-if="item.status===2" class="el-icon-download file-download" title="下载" @click="downloadFile(item)" />
|
||||||
<div v-if="item.status===2" class="el-icon-delete file-delete" title="删除" @click="deleteFile(item)" />
|
<div v-if="item.status===2" class="el-icon-delete file-delete" title="删除" @click="deleteFile(item)" />
|
||||||
<div v-if="isImageURL(item.name) && item.status === 2" class="el-icon-picture" title="预览"
|
<div v-if="isImageURL(item.name) && item.status === 2" class="el-icon-picture" title="预览" @click="preview(item)" />
|
||||||
@click="preview(item)" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-image v-show="false" ref="preview" class="preview" :src="hiddenSrc" :preview-src-list="previewList" />
|
<el-image v-show="false" ref="preview"
|
||||||
|
class="preview"
|
||||||
|
:src="hiddenSrc"
|
||||||
|
:preview-src-list="previewList"
|
||||||
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -73,9 +87,6 @@ export default {
|
|||||||
baseurl: process.env.VUE_APP_BASE_API ,
|
baseurl: process.env.VUE_APP_BASE_API ,
|
||||||
hiddenSrc:'',
|
hiddenSrc:'',
|
||||||
previewList:[],
|
previewList:[],
|
||||||
// 解决重复提交的核心变量
|
|
||||||
isQuerying: false, // 请求锁:标记是否正在查询附件
|
|
||||||
retryCount: 0 // 重试次数:捕获重复提交错误时重试
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -86,18 +97,11 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
// 父组件值监听事件
|
// 父组件值监听事件
|
||||||
value: {
|
value: {
|
||||||
immediate: true, // 初始化立即执行
|
handler: function(newVal/*, oldVal*/) {
|
||||||
handler: function (newVal, oldVal) {
|
if (newVal === undefined || newVal == null || newVal === ''
|
||||||
// 新旧值不同时,先清空所有旧数据(核心解决数据残留)
|
|| this.affixId === undefined || this.affixId == null || this.affixId === ''
|
||||||
if (newVal !== oldVal) {
|
|| newVal !== this.affixId) {
|
||||||
this.fileList = [];
|
this.loadData()
|
||||||
this.previewList = [];
|
|
||||||
this.affixId = '';
|
|
||||||
this.retryCount = 0;
|
|
||||||
}
|
|
||||||
// 满足条件才加载数据
|
|
||||||
if (newVal && newVal !== '' && newVal !== this.affixId) {
|
|
||||||
this.loadData();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,14 +109,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
// 新增:组件激活时清空旧数据(适配keep-alive页面)
|
|
||||||
activated() {
|
|
||||||
this.fileList = [];
|
|
||||||
this.previewList = [];
|
|
||||||
if (this.value) {
|
|
||||||
this.loadData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 预览
|
// 预览
|
||||||
preview(item){
|
preview(item){
|
||||||
@@ -266,76 +262,36 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadData() {
|
loadData() {
|
||||||
// 1. 请求锁:防止同一时刻重复请求(解决重复提交)
|
this.fileList = []
|
||||||
if (this.isQuerying) return;
|
|
||||||
// 2. 清空旧数据(双重保障解决数据残留)
|
|
||||||
this.fileList = [];
|
|
||||||
this.previewList = [];
|
|
||||||
|
|
||||||
if (typeof this.value !== 'undefined' && this.value !== null && this.value !== '') {
|
if (typeof this.value !== 'undefined' && this.value !== null && this.value !== '') {
|
||||||
this.isQuerying = true; // 加锁
|
|
||||||
// 带重试机制的查询方法
|
|
||||||
const queryWithRetry = () => {
|
|
||||||
queryAffixs(this.value).then((res) => {
|
queryAffixs(this.value).then((res) => {
|
||||||
this.isQuerying = false; // 解锁
|
|
||||||
if (res.code ==200) {
|
if (res.code ==200) {
|
||||||
if(res.data.length > 0){
|
if(res.data.length > 0){
|
||||||
this.affixId = this.value;
|
this.affixId = this.value
|
||||||
// 重新构建数组,避免引用污染
|
|
||||||
const newFileList = [];
|
|
||||||
const newPreviewList = [];
|
|
||||||
for (var i=0;i<res.data.length;i++) {
|
for (var i=0;i<res.data.length;i++) {
|
||||||
const savePath = this.baseurl + res.data[i].savePath;
|
if(this.isImageURL(res.data[i].savePath)){
|
||||||
if (this.isImageURL(savePath)) {
|
this.previewList.push(this.baseurl+ res.data[i].savePath)
|
||||||
newPreviewList.push(savePath);
|
|
||||||
}
|
}
|
||||||
newFileList.push({
|
this.fileList.push({name: res.data[i].trueName, id: res.data[i].id, status: 2,savePath:this.baseurl+ res.data[i].savePath})
|
||||||
name: res.data[i].trueName,
|
|
||||||
id: res.data[i].id,
|
|
||||||
status: 2,
|
|
||||||
savePath: savePath
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 直接替换数组,彻底解决残留
|
|
||||||
this.fileList = newFileList;
|
|
||||||
this.previewList = newPreviewList;
|
|
||||||
} else {
|
|
||||||
this.affixId = '';
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 捕获"重复提交"错误,重试1次
|
this.affixId = ''
|
||||||
if (res.msg.includes('请勿重复提交') && this.retryCount < 1) {
|
|
||||||
this.retryCount++;
|
|
||||||
this.isQuerying = true;
|
|
||||||
setTimeout(() => queryWithRetry(), 500); // 500ms后重试
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this.$message.error(res.msg);
|
|
||||||
}
|
|
||||||
}).catch((err) => {
|
|
||||||
this.isQuerying = false; // 解锁
|
|
||||||
// 捕获异常中的重复提交错误,重试1次
|
|
||||||
if (err.message?.includes('请勿重复提交') && this.retryCount < 1) {
|
|
||||||
this.retryCount++;
|
|
||||||
setTimeout(() => queryWithRetry(), 500);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$message.error(err.message || '查询附件失败');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
// 执行查询
|
|
||||||
queryWithRetry();
|
|
||||||
} else {
|
} else {
|
||||||
this.affixId = '';
|
this.$message.error(res.msg)
|
||||||
this.isQuerying = false;
|
}
|
||||||
|
}).catch((res) => {
|
||||||
|
this.editLoading = false
|
||||||
|
this.$message.error(res.message)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.affixId = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearData() {
|
clearData() {
|
||||||
this.affixId = '';
|
this.affixId = ''
|
||||||
this.fileList = [];
|
this.fileList = []
|
||||||
this.previewList = [];
|
|
||||||
this.isQuerying = false;
|
|
||||||
this.retryCount = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -350,11 +306,9 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file {
|
.file {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-item {
|
.file-item {
|
||||||
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -363,39 +317,30 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-item div {
|
.file-item div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-upload {
|
.file-upload {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
.file-download, .file-delete{
|
||||||
.file-download,
|
|
||||||
.file-delete {
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.file-download:hover, .file-delete:hover {
|
||||||
.file-download:hover,
|
|
||||||
.file-delete:hover {
|
|
||||||
color: #409EFF;
|
color: #409EFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-item[class~=is-disabled] .file-delete {
|
.file-item[class~=is-disabled] .file-delete {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.download-pack:hover {
|
.download-pack:hover {
|
||||||
background: #409eff;
|
background: #409eff;
|
||||||
border-color: #3999a8;
|
border-color: #3999a8;
|
||||||
color: #fafbfd;
|
color: #fafbfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview .file-preview{
|
.preview .file-preview{
|
||||||
|
|
||||||
font-size: 19px;
|
font-size: 19px;
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
<!-- 佐证附件 -->
|
<!-- 佐证附件 -->
|
||||||
<el-descriptions-item label="佐证附件" required>
|
<el-descriptions-item label="佐证附件" required>
|
||||||
<el-form-item prop="affixId" class="no-label-form-item">
|
<el-form-item prop="affixId" class="no-label-form-item">
|
||||||
<Affix v-model="form.affixId" @input="handleAffix" @fileUploaded="handleAffix"
|
<AffixIndex ref="affixComponent" v-model="form.affixId" @input="handleAffix" @fileUploaded="handleAffix"
|
||||||
@delete-file="handleDeleteFile" />
|
@delete-file="handleDeleteFile" />
|
||||||
<div class="el-upload__tip">
|
<div class="el-upload__tip">
|
||||||
支持上传jpg/png/pdf格式文件,单个文件不超过10MB(如病例、住房证明等)
|
支持上传jpg/png/pdf格式文件,单个文件不超过10MB(如病例、住房证明等)
|
||||||
@@ -330,15 +330,17 @@ import {
|
|||||||
updateOutsideAccommodationApply,
|
updateOutsideAccommodationApply,
|
||||||
addOutsideAccommodationApply
|
addOutsideAccommodationApply
|
||||||
} from '@/api/dormitory/outsideAccommodation/outsideAccommodationApply'
|
} from '@/api/dormitory/outsideAccommodation/outsideAccommodationApply'
|
||||||
import { batchAddOutsideAccommodationAttachment } from "@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment";
|
import { batchAddOutsideAccommodationAttachment, deleteOutsideAccommodationAttachmentNameAndStuName } from "@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment";
|
||||||
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
||||||
import { getOwnLog } from '@/api/dormitory/new/stuDom'
|
import { getOwnLog } from '@/api/dormitory/new/stuDom'
|
||||||
import {
|
import {
|
||||||
pcaTextArr // 省市区联动数据,纯汉字
|
pcaTextArr // 省市区联动数据,纯汉字
|
||||||
} from 'element-china-area-data'
|
} from 'element-china-area-data'
|
||||||
|
import AffixIndex from "@/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/affix/index"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'OutsideAccommodationApply',
|
name: 'OutsideAccommodationApply',
|
||||||
|
components: { AffixIndex },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -804,19 +806,26 @@ export default {
|
|||||||
// 处理子组件传递的删除文件事件
|
// 处理子组件传递的删除文件事件
|
||||||
handleDeleteFile(fileName) {
|
handleDeleteFile(fileName) {
|
||||||
// 接收文件名后,可执行后续逻辑,删除在数据库的数据
|
// 接收文件名后,可执行后续逻辑,删除在数据库的数据
|
||||||
// if (fileName) {
|
if (fileName) {
|
||||||
// deleteRtEnlistmentReserveAttachByFileNameAndStuName({fileName:fileName, studentName: this.formData.studentName}).then(res => {
|
deleteOutsideAccommodationAttachmentNameAndStuName({ attachmentName: fileName, studentName: this.form.studentName }).then(res => {
|
||||||
// this.$message.success(`成功删除文件:${fileName}`);
|
this.$message.success(`成功删除文件:${fileName}`);
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
},
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
// 关闭当前标签页并返回上个页面
|
// 1. 先清空附件组件数据(主动触发清理)
|
||||||
// const obj = { path: 'disciplinaryApplication', query: { t: Date.now() } }
|
this.$nextTick(() => {
|
||||||
// this.$tab.closeOpenPage(obj)
|
// 如果Affix组件有ref(比如ref="affixComponent"),主动调用clearData
|
||||||
this.$router.back()
|
if (this.$refs.affixComponent) {
|
||||||
// 关闭窗体 index 当前层索引
|
this.$refs.affixComponent.clearData();
|
||||||
this.$tab.closePage()
|
}
|
||||||
|
|
||||||
|
// 2. 优化退出逻辑:先关闭tab,再返回(避免重复操作)
|
||||||
|
this.$tab.closePage().then(() => {
|
||||||
|
// 仅当需要返回上一页时执行(根据业务场景选择)
|
||||||
|
// this.$router.back();
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 保存学生签名
|
// 保存学生签名
|
||||||
saveStudentSignature() {
|
saveStudentSignature() {
|
||||||
|
|||||||
@@ -0,0 +1,380 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-upload :style="uploadStyle" action="" :class="['cm-affix', { 'is-disabled': inputDisabled }]"
|
||||||
|
:disabled="inputDisabled" :multiple="true" :http-request="handleUpload" :file-list="fileList" :accept="accpet"
|
||||||
|
:show-file-list="false" :before-upload="handleBeforeUpload">
|
||||||
|
<el-button v-if="inputDisabled !== true" id="affix1" :disabled="notupload" size="small" type="primary"><i
|
||||||
|
class='el-icon-upload2'></i>点击上传</el-button>
|
||||||
|
<el-button v-if="this.affixId !== null && this.affixId !== '' && this.fileList.length > 0" id="affix2"
|
||||||
|
size="small" @click.stop="downloadPack()">
|
||||||
|
<div v-if="downloading" class="el-icon-loading file-upload"
|
||||||
|
style="margin-left: 0px;margin-right: 3px;font-size: 14px;" />
|
||||||
|
打包下载
|
||||||
|
</el-button>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
<div v-for="(item, index) in fileList" :key="`${item.id || item.name}_${index}_${affixId}`" class="file">
|
||||||
|
<div class="file-item" :class="[{ 'is-disabled': inputDisabled }]">
|
||||||
|
<div class="file-name">{{ item.name }}</div>
|
||||||
|
<div v-if="item.status === 1" class="el-icon-loading file-upload" title="上传中..." />
|
||||||
|
<div v-if="item.status === 2" class="el-icon-download file-download" title="下载" @click="downloadFile(item)" />
|
||||||
|
<div v-if="item.status === 2" class="el-icon-delete file-delete" title="删除" @click="deleteFile(item)" />
|
||||||
|
<div v-if="isImageURL(item.name) && item.status === 2" class="el-icon-picture" title="预览"
|
||||||
|
@click="preview(item)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-image v-show="false" ref="preview" class="preview" :src="hiddenSrc" :preview-src-list="previewList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { deleteAffix, download, downloadAll, queryAffixs, upload } from '@/api/affix/affix'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CmAffix',
|
||||||
|
inject: {
|
||||||
|
elForm: {
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
notupload: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
value: String,
|
||||||
|
disabled: Boolean,
|
||||||
|
maxSize: {
|
||||||
|
type: Number,
|
||||||
|
default: 20
|
||||||
|
},
|
||||||
|
accpet: {
|
||||||
|
type: String,
|
||||||
|
default: '*'
|
||||||
|
},
|
||||||
|
uploadStyle: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uploadCnt: 0,
|
||||||
|
affixId: '',
|
||||||
|
fileList: [],
|
||||||
|
downloading: false,
|
||||||
|
baseurl: process.env.VUE_APP_BASE_API,
|
||||||
|
hiddenSrc: '',
|
||||||
|
previewList: [],
|
||||||
|
requestLock: false, // 全局请求锁
|
||||||
|
retryTimes: 0, // 重试次数
|
||||||
|
cacheData: {} // 缓存已查询的附件数据
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
inputDisabled() {
|
||||||
|
return this.disabled || (this.elForm || {}).disabled
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
value: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newVal) {
|
||||||
|
if (!newVal) {
|
||||||
|
this.fileList = []
|
||||||
|
this.affixId = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 优先使用缓存,避免重复请求
|
||||||
|
if (this.cacheData[newVal]) {
|
||||||
|
this.fileList = [...this.cacheData[newVal].fileList]
|
||||||
|
this.previewList = [...this.cacheData[newVal].previewList]
|
||||||
|
this.affixId = newVal
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 无缓存则请求,加锁防重复
|
||||||
|
if (!this.requestLock) {
|
||||||
|
this.loadData(newVal)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeUnmount() {
|
||||||
|
this.requestLock = false
|
||||||
|
this.retryTimes = 0
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
preview(item) {
|
||||||
|
this.hiddenSrc = item.savePath
|
||||||
|
this.$refs.preview.showViewer = true
|
||||||
|
},
|
||||||
|
|
||||||
|
isImageURL(url) {
|
||||||
|
const regex = /(\jpg|\jpeg|\png|\gif|\webp)$/i
|
||||||
|
return regex.test(url)
|
||||||
|
},
|
||||||
|
|
||||||
|
handleUpload(file) {
|
||||||
|
upload({ 'file': file.file, 'affixId': this.affixId }).then(res => {
|
||||||
|
this.uploadCnt--
|
||||||
|
if (res.code == 200) {
|
||||||
|
for (let i = 0; i < this.fileList.length; i++) {
|
||||||
|
let item = this.fileList[i]
|
||||||
|
if (item.name == res.trueName && item.status == 1) {
|
||||||
|
this.fileList[i].id = res.id
|
||||||
|
this.fileList[i].status = 2
|
||||||
|
this.fileList[i].savePath = this.baseurl + res.savePath
|
||||||
|
if (this.isImageURL(res.savePath)) {
|
||||||
|
this.previewList.push(this.fileList[i].savePath)
|
||||||
|
}
|
||||||
|
// 上传成功后,向外传递当前文件的完整信息(包含后端返回的res数据)
|
||||||
|
this.$emit('fileUploaded', {
|
||||||
|
fileId: res.id,
|
||||||
|
fileName: res.trueName,
|
||||||
|
filePath: res.savePath,
|
||||||
|
fullPath: this.fileList[i].savePath,
|
||||||
|
fileType: this.getFileType(res.trueName),
|
||||||
|
originalFile: file.file
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 更新缓存
|
||||||
|
this.cacheData[this.affixId] = {
|
||||||
|
fileList: [...this.fileList],
|
||||||
|
previewList: [...this.previewList]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.uploadCnt--
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getFileType(fileName) {
|
||||||
|
if (!fileName) return '';
|
||||||
|
const lastDotIndex = fileName.lastIndexOf('.');
|
||||||
|
return lastDotIndex > -1 ? fileName.substring(lastDotIndex + 1).toLowerCase() : '';
|
||||||
|
},
|
||||||
|
|
||||||
|
handleBeforeUpload(file) {
|
||||||
|
if (this.affixId == null || this.affixId === '') {
|
||||||
|
this.affixId = this.$tool.uuid()
|
||||||
|
this.$emit('input', this.affixId)
|
||||||
|
}
|
||||||
|
let isLt20M = file.size / 1024 / 1024 < this.maxSize
|
||||||
|
if (!isLt20M) {
|
||||||
|
this.$message.error('上传大小不能超过 ' + this.maxSize + 'MB!')
|
||||||
|
} else {
|
||||||
|
this.fileList.push({ name: file.name, status: 1 })
|
||||||
|
this.uploadCnt++
|
||||||
|
}
|
||||||
|
return isLt20M
|
||||||
|
},
|
||||||
|
|
||||||
|
getFileName(id) {
|
||||||
|
for (let i = 0; i < this.fileList.length; i++) {
|
||||||
|
let item = this.fileList[i]
|
||||||
|
if (item.id == id) {
|
||||||
|
return item.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadFile(file) {
|
||||||
|
download(file.id).then((res) => {
|
||||||
|
let fileName = this.getFileName(file.id).replace(/"/g, '')
|
||||||
|
var blob = new Blob([res], { type: 'application/octet-stream;' })
|
||||||
|
var downloadElement = document.createElement('a')
|
||||||
|
var href = window.URL.createObjectURL(blob)
|
||||||
|
downloadElement.href = href
|
||||||
|
downloadElement.download = decodeURI(fileName)
|
||||||
|
document.body.appendChild(downloadElement)
|
||||||
|
downloadElement.click()
|
||||||
|
document.body.removeChild(downloadElement)
|
||||||
|
window.URL.revokeObjectURL(href)
|
||||||
|
}).catch((res) => {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
downloadPack() {
|
||||||
|
if (this.affixId === null || this.affixId === '') {
|
||||||
|
this.$message.error('暂无附件!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.fileList.length == 1) {
|
||||||
|
this.downloadFile(this.fileList[0])
|
||||||
|
} else {
|
||||||
|
this.downloading = true
|
||||||
|
downloadAll(this.affixId).then((res) => {
|
||||||
|
var blob = new Blob([res], { type: 'application/octet-stream' })
|
||||||
|
var downloadElement = document.createElement('a')
|
||||||
|
var href = window.URL.createObjectURL(blob)
|
||||||
|
downloadElement.href = href
|
||||||
|
downloadElement.download = decodeURI('download.zip')
|
||||||
|
document.body.appendChild(downloadElement)
|
||||||
|
downloadElement.click()
|
||||||
|
document.body.removeChild(downloadElement)
|
||||||
|
window.URL.revokeObjectURL(href)
|
||||||
|
this.downloading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.downloading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
deleteFile(file) {
|
||||||
|
this.$confirm('请确认是否删除此文件?', '提示', { type: 'info' }).then(() => {
|
||||||
|
deleteAffix(file.id).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.fileList = this.fileList.filter(item => item.id !== file.id)
|
||||||
|
this.previewList = this.previewList.filter(item => item !== file.savePath)
|
||||||
|
if (this.fileList.length == 0) {
|
||||||
|
this.affixId = ''
|
||||||
|
delete this.cacheData[this.affixId] // 清空缓存
|
||||||
|
} else {
|
||||||
|
// 更新缓存
|
||||||
|
this.cacheData[this.affixId] = {
|
||||||
|
fileList: [...this.fileList],
|
||||||
|
previewList: [...this.previewList]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 关键:触发自定义事件,传递被删除的文件名
|
||||||
|
// 事件名建议:delete-file,参数:file.name(文件名)
|
||||||
|
this.$emit('delete-file', file.name);
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 核心修改:静默处理"重复提交"错误,最多重试1次,不提示用户
|
||||||
|
async loadData(targetVal) {
|
||||||
|
// 加锁防止重复执行
|
||||||
|
if (this.requestLock || !targetVal) return;
|
||||||
|
this.requestLock = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await queryAffixs(targetVal);
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.affixId = targetVal;
|
||||||
|
const newFileList = [];
|
||||||
|
const newPreviewList = [];
|
||||||
|
for (var i = 0; i < res.data.length; i++) {
|
||||||
|
const savePath = this.baseurl + res.data[i].savePath;
|
||||||
|
if (this.isImageURL(savePath)) {
|
||||||
|
newPreviewList.push(savePath);
|
||||||
|
}
|
||||||
|
newFileList.push({
|
||||||
|
name: res.data[i].trueName,
|
||||||
|
id: res.data[i].id,
|
||||||
|
status: 2,
|
||||||
|
savePath: savePath
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.fileList = newFileList;
|
||||||
|
this.previewList = newPreviewList;
|
||||||
|
// 缓存查询结果,后续直接使用
|
||||||
|
this.cacheData[targetVal] = {
|
||||||
|
fileList: [...newFileList],
|
||||||
|
previewList: [...newPreviewList]
|
||||||
|
};
|
||||||
|
this.retryTimes = 0; // 重置重试次数
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
// 关键:只过滤"数据正在处理,请勿重复提交"错误,不提示用户
|
||||||
|
if (err.message?.includes('数据正在处理,请勿重复提交')) {
|
||||||
|
// 最多重试1次,1秒后重新请求
|
||||||
|
if (this.retryTimes < 1) {
|
||||||
|
this.retryTimes++;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.requestLock = false; // 释放锁
|
||||||
|
this.loadData(targetVal); // 重试
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
// 重试失败后清空锁,避免卡死
|
||||||
|
this.requestLock = false;
|
||||||
|
this.retryTimes = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 其他错误正常提示
|
||||||
|
this.$message.error(err.message || '查询附件失败');
|
||||||
|
this.requestLock = false;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
// 非重试场景,最终释放锁
|
||||||
|
if (this.retryTimes === 0) {
|
||||||
|
this.requestLock = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
clearData() {
|
||||||
|
this.affixId = '';
|
||||||
|
this.fileList = [];
|
||||||
|
this.previewList = [];
|
||||||
|
this.requestLock = false;
|
||||||
|
this.retryTimes = 0;
|
||||||
|
// 清空当前affixId的缓存
|
||||||
|
delete this.cacheData[this.affixId];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.cm-affix>>>.el-upload {
|
||||||
|
padding: 0px 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-item {
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
justify-content: start;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-item div {
|
||||||
|
display: inline-block;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-upload {
|
||||||
|
font-size: 18px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-download,
|
||||||
|
.file-delete {
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-download:hover,
|
||||||
|
.file-delete:hover {
|
||||||
|
color: #409EFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-item[class~=is-disabled] .file-delete {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview>>>.el-image__inner {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -26,11 +26,11 @@
|
|||||||
<span v-if="renderData.gender == 1">男</span>
|
<span v-if="renderData.gender == 1">男</span>
|
||||||
<span v-else>女</span>
|
<span v-else>女</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item class="birthDate">
|
||||||
<template slot="label"> 出生年月 </template>
|
<template slot="label"> 出生年月 </template>
|
||||||
{{ renderData.birthDate }}
|
{{ renderData.birthDate }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item>
|
||||||
<template slot="label"> 专业系 </template>
|
<template slot="label"> 专业系 </template>
|
||||||
{{ renderData.majorName }}
|
{{ renderData.majorName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -38,12 +38,12 @@
|
|||||||
<template slot="label"> 班级 </template>
|
<template slot="label"> 班级 </template>
|
||||||
{{ renderData.className }}
|
{{ renderData.className }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item span="2">
|
||||||
<template slot="label"> 学号 </template>
|
<template slot="label"> 学号 </template>
|
||||||
{{ renderData.studentNo }}
|
{{ renderData.studentNo }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item span="4">
|
||||||
<template slot="label"> 宿费交纳情况(只填写当年度交费情况) </template>
|
<template slot="label"> 宿费交纳情况</template>
|
||||||
{{ renderData.accommodationFee }}
|
{{ renderData.accommodationFee }}
|
||||||
<!-- 已交 绑定当前学年年度住宿费 人民币 -->
|
<!-- 已交 绑定当前学年年度住宿费 人民币 -->
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item span="4">
|
||||||
<template slot="label"> 附件材料 </template>
|
<template slot="label"> 附件材料 </template>
|
||||||
<Affix v-model="renderData.affixId" :disabled="true" />
|
<AffixIndex ref="affixComponent" v-model="renderData.affixId" :disabled="true" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item span="4">
|
||||||
@@ -104,11 +104,11 @@
|
|||||||
</el-descriptions-item> -->
|
</el-descriptions-item> -->
|
||||||
|
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item span="2">
|
||||||
<template slot="label"> 外宿详细地址(具体到门牌号) </template>
|
<template slot="label"> 外宿详细地址</template>
|
||||||
{{ renderData.address + renderData.outsideAddress }}
|
{{ renderData.address + renderData.outsideAddress }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="2">
|
<el-descriptions-item span="2">
|
||||||
<template slot="label"> 外宿居所紧急联系人电话 </template>
|
<template slot="label"> 紧急联系电话 </template>
|
||||||
{{ renderData.emergencyPhone }}
|
{{ renderData.emergencyPhone }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item span="4">
|
<el-descriptions-item span="4">
|
||||||
@@ -203,6 +203,47 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 20px;" v-if="isShwo">
|
||||||
|
<el-timeline>
|
||||||
|
<el-timeline-item v-for="(item, index) in flowRecordList" :key="index" :icon="setIcon(item.finishTime)"
|
||||||
|
:color="setColor(item.finishTime)">
|
||||||
|
<p style="font-weight: 700">{{ item.taskName }}</p>
|
||||||
|
<el-card :body-style="{ padding: '10px' }">
|
||||||
|
<el-descriptions class="margin-top" :column="1" size="small" border>
|
||||||
|
<el-descriptions-item v-if="item.assigneeName" label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-user" />办理人</template>
|
||||||
|
{{ item.assigneeName }}
|
||||||
|
<el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="item.candidate" label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-user" />候选办理</template>
|
||||||
|
{{ item.candidate }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-date" />接收时间</template>
|
||||||
|
{{ item.createTime }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="item.finishTime" label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-date" />处理时间</template>
|
||||||
|
{{ item.finishTime }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="item.duration" label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-time" />耗时</template>
|
||||||
|
{{ item.duration }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="item.comment" label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-tickets" />处理意见</template>
|
||||||
|
{{ item.comment.comment }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<!-- <el-descriptions-item v-if="item.finishTime" label-class-name="my-label">
|
||||||
|
<template slot="label"><i class="el-icon-date" />签名</template>
|
||||||
|
<img :src="baseurl + item.assigneeSign" width="300px" height="200px" class="avatar">
|
||||||
|
</el-descriptions-item> -->
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -211,6 +252,9 @@
|
|||||||
import {
|
import {
|
||||||
getOutsideAccommodationApply,
|
getOutsideAccommodationApply,
|
||||||
} from '@/api/dormitory/outsideAccommodation/outsideAccommodationApply'
|
} from '@/api/dormitory/outsideAccommodation/outsideAccommodationApply'
|
||||||
|
|
||||||
|
import { flowRecord } from '@/api/flowable/finished'
|
||||||
|
import AffixIndex from "@/views/dormitory/outsideAccommodation/outsideAccommodationApply/components/affix/index"
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// props类型定义(Object类型+默认空对象)
|
// props类型定义(Object类型+默认空对象)
|
||||||
@@ -223,6 +267,7 @@ export default {
|
|||||||
default: true
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: { AffixIndex },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -248,6 +293,7 @@ export default {
|
|||||||
standard: '',
|
standard: '',
|
||||||
extraCss: '',
|
extraCss: '',
|
||||||
},
|
},
|
||||||
|
flowRecordList: [], // 流程流转数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 计算属性判断优先级
|
// 计算属性判断优先级
|
||||||
@@ -292,7 +338,8 @@ export default {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
// 修正Promise语法(逗号改分号/换行)
|
// 修正Promise语法(逗号改分号/换行)
|
||||||
this.detailData = { ...res.data }; // 接口数据存入独立变量
|
this.detailData = { ...res.data }; // 接口数据存入独立变量
|
||||||
this.loading = false;
|
this.getFlowRecordList(this.detailData.processInstanceId, this.detailData.deployId)
|
||||||
|
// this.loading = false;
|
||||||
console.log(this.detailData);
|
console.log(this.detailData);
|
||||||
})
|
})
|
||||||
// 添加异常捕获,避免接口报错导致loading一直显示
|
// 添加异常捕获,避免接口报错导致loading一直显示
|
||||||
@@ -311,12 +358,49 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goBack() {
|
goBack() {
|
||||||
// 关闭当前标签页并返回上个页面
|
// 1. 先清空附件组件数据(主动触发清理)
|
||||||
// const obj = { path: 'disciplinaryApplication', query: { t: Date.now() } }
|
this.$nextTick(() => {
|
||||||
// this.$tab.closeOpenPage(obj)
|
// 如果Affix组件有ref(比如ref="affixComponent"),主动调用clearData
|
||||||
this.$router.back()
|
if (this.$refs.affixComponent) {
|
||||||
// 关闭窗体 index 当前层索引
|
this.$refs.affixComponent.clearData();
|
||||||
this.$tab.closePage()
|
}
|
||||||
|
|
||||||
|
// 2. 优化退出逻辑:先关闭tab,再返回(避免重复操作)
|
||||||
|
this.$tab.closePage().then(() => {
|
||||||
|
// 仅当需要返回上一页时执行(根据业务场景选择)
|
||||||
|
// this.$router.back();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 流程流转记录 */
|
||||||
|
getFlowRecordList(processInstanceId, deploy) {
|
||||||
|
let procInsId = processInstanceId
|
||||||
|
let deployId = deploy
|
||||||
|
const that = this
|
||||||
|
const params = { procInsId: procInsId, deployId: deployId }
|
||||||
|
flowRecord(params)
|
||||||
|
.then((res) => {
|
||||||
|
that.flowRecordList = res.data.flowList
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
this.loading = false
|
||||||
|
this.goBack()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setIcon(val) {
|
||||||
|
if (val) {
|
||||||
|
return 'el-icon-check'
|
||||||
|
} else {
|
||||||
|
return 'el-icon-time'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setColor(val) {
|
||||||
|
if (val) {
|
||||||
|
return '#2bc418'
|
||||||
|
} else {
|
||||||
|
return '#b3bdbb'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() { },
|
created() { },
|
||||||
@@ -333,9 +417,13 @@ export default {
|
|||||||
font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
|
font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-descriptions-item__label {
|
.el-container ::v-deep .el-descriptions-item__label {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
width: 100px;
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-container .birthDate ::v-deep .el-descriptions-item__label {
|
||||||
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.parentLabel {
|
.parentLabel {
|
||||||
|
|||||||
@@ -5,21 +5,21 @@
|
|||||||
<el-form-item label="学号" prop="studentNo">
|
<el-form-item label="学号" prop="studentNo">
|
||||||
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.studentNo" placeholder="请输入学号" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学生姓名" prop="studentName">
|
<el-form-item label="学生姓名" prop="studentName" v-if="!roleGroup.includes('学生')">
|
||||||
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="性别" prop="gender">
|
<!-- <el-form-item label="性别" prop="gender">
|
||||||
<el-input v-model="queryParams.gender" placeholder="请输入性别" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.gender" placeholder="请输入性别" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<!-- <el-form-item label="出生年月" prop="birthDate">
|
<!-- <el-form-item label="出生年月" prop="birthDate">
|
||||||
<el-date-picker clearable v-model="queryParams.birthDate" type="date" value-format="yyyy-MM-dd"
|
<el-date-picker clearable v-model="queryParams.birthDate" type="date" value-format="yyyy-MM-dd"
|
||||||
placeholder="请选择出生年月">
|
placeholder="请选择出生年月">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<!-- <el-form-item label="学院名称" prop="deptName">
|
<el-form-item label="学院名称" prop="deptName" v-if="!roleGroup.includes('二级学院')">
|
||||||
<el-input v-model="queryParams.deptName" placeholder="请输入学院名称" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.deptName" placeholder="请输入学院名称" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="专业名称" prop="majorName">
|
<!-- <el-form-item label="专业名称" prop="majorName">
|
||||||
<el-input v-model="queryParams.majorName" placeholder="请输入专业名称" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.majorName" placeholder="请输入专业名称" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="班级名称" prop="className">
|
<el-form-item label="班级名称" prop="className">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<!-- <el-form-item label="是否有效" prop="isValid">
|
<!-- <el-form-item label="是否有效" prop="isValid">
|
||||||
<el-input v-model="queryParams.isValid" placeholder="请输入是否有效" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.isValid" placeholder="请输入是否有效" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="辅导员姓名" prop="teacherName" label-width="88px">
|
<el-form-item label="辅导员姓名" prop="teacherName" label-width="88px" v-if="!roleGroup.includes('辅导员')">
|
||||||
<el-input v-model="queryParams.teacherName" placeholder="请输入辅导员姓名" clearable
|
<el-input v-model="queryParams.teacherName" placeholder="请输入辅导员姓名" clearable
|
||||||
@keyup.enter.native="handleQuery" />
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['dormitory:outsideAccommodationApply:edit']"
|
v-hasPermi="['dormitory:outsideAccommodationApply:edit']"
|
||||||
>修改</el-button>
|
v-if="scope.row.status == 0 || getRejectInfo(scope.row.outsideAccommodationApprovals).isReject">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['dormitory:outsideAccommodationApply:remove']" v-if="scope.row.status == 0">删除</el-button>
|
v-hasPermi="['dormitory:outsideAccommodationApply:remove']" v-if="scope.row.status == 0">删除</el-button>
|
||||||
<el-button v-if="scope.row.applyStatus != 0" size="mini" type="text" icon="el-icon-info"
|
<el-button v-if="scope.row.applyStatus != 0" size="mini" type="text" icon="el-icon-info"
|
||||||
@@ -295,6 +295,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOutsideAccommodationApply, getOutsideAccommodationApply, delOutsideAccommodationApply, addOutsideAccommodationApply, updateOutsideAccommodationApply } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApply";
|
import { listOutsideAccommodationApply, getOutsideAccommodationApply, delOutsideAccommodationApply, addOutsideAccommodationApply, updateOutsideAccommodationApply } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApply";
|
||||||
|
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OutsideAccommodationApply",
|
name: "OutsideAccommodationApply",
|
||||||
@@ -474,7 +475,9 @@ export default {
|
|||||||
teacherName: [
|
teacherName: [
|
||||||
{ required: true, message: "辅导员姓名不能为空", trigger: "blur" }
|
{ required: true, message: "辅导员姓名不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
roleGroup: '',
|
||||||
|
user: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -484,7 +487,7 @@ export default {
|
|||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
next(vm => {
|
next(vm => {
|
||||||
// vm 是组件实例,这里调用数据加载方法
|
// vm 是组件实例,这里调用数据加载方法
|
||||||
vm.getList();
|
vm.getUser();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -497,6 +500,24 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getUser() {
|
||||||
|
getUserProfile().then(response => {
|
||||||
|
this.user = response.data
|
||||||
|
this.roleGroup = response.roleGroup;
|
||||||
|
// this.postGroup = response.postGroup;
|
||||||
|
if (this.roleGroup) {
|
||||||
|
if (this.roleGroup.includes("学生")) {
|
||||||
|
this.queryParams.studentName = this.user.nickName
|
||||||
|
} else if (this.roleGroup.includes("辅导员")) {
|
||||||
|
this.queryParams.teacherName = this.user.nickName
|
||||||
|
} else if (this.roleGroup.includes("二级学院")) {
|
||||||
|
this.queryParams.deptName = this.user.dept.deptName
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<el-input v-model="queryParams.approvalNode" placeholder="请输入审批节点" clearable
|
<el-input v-model="queryParams.approvalNode" placeholder="请输入审批节点" clearable
|
||||||
@keyup.enter.native="handleQuery" />
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="审批人" prop="approverName">
|
<el-form-item label="审批人" prop="approverName" v-if="roleGroup.includes('管理员')">
|
||||||
<el-input v-model="queryParams.approverName" placeholder="请输入审批人姓名" clearable
|
<el-input v-model="queryParams.approverName" placeholder="请输入审批人姓名" clearable
|
||||||
@keyup.enter.native="handleQuery" />
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -75,10 +75,11 @@
|
|||||||
<!-- <el-table-column label="流程实例ID" align="center" prop="processInstanceId" /> -->
|
<!-- <el-table-column label="流程实例ID" align="center" prop="processInstanceId" /> -->
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['dormitory:outsideAccommodationApproval:edit']">修改</el-button>
|
v-hasPermi="['dormitory:outsideAccommodationApproval:edit']">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['dormitory:outsideAccommodationApproval:remove']">删除</el-button>
|
v-hasPermi="['dormitory:outsideAccommodationApproval:remove']">删除</el-button> -->
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-info" @click="detail(scope.row)">详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -138,7 +139,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOutsideAccommodationApproval, getOutsideAccommodationApproval, delOutsideAccommodationApproval, addOutsideAccommodationApproval, updateOutsideAccommodationApproval } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApproval";
|
import { listOutsideAccommodationApproval, getOutsideAccommodationApproval, delOutsideAccommodationApproval, addOutsideAccommodationApproval, updateOutsideAccommodationApproval } from "@/api/dormitory/outsideAccommodation/outsideAccommodationApproval";
|
||||||
|
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
||||||
export default {
|
export default {
|
||||||
name: "OutsideAccommodationApproval",
|
name: "OutsideAccommodationApproval",
|
||||||
data() {
|
data() {
|
||||||
@@ -212,11 +213,13 @@ export default {
|
|||||||
studentNo: [
|
studentNo: [
|
||||||
{ required: true, message: "学生学号不能为空", trigger: "blur" }
|
{ required: true, message: "学生学号不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
roleGroup: '',
|
||||||
|
user: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getUser();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询外宿申请审批记录列表 */
|
/** 查询外宿申请审批记录列表 */
|
||||||
@@ -228,6 +231,20 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getUser() {
|
||||||
|
getUserProfile().then(response => {
|
||||||
|
this.user = response.data
|
||||||
|
this.roleGroup = response.roleGroup;
|
||||||
|
// this.postGroup = response.postGroup;
|
||||||
|
if (this.roleGroup) {
|
||||||
|
if (!this.roleGroup.includes("管理员")) {
|
||||||
|
this.queryParams.approverName = this.user.nickName
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@@ -319,7 +336,13 @@ export default {
|
|||||||
this.download('dormitory/outsideAccommodationApproval/export', {
|
this.download('dormitory/outsideAccommodationApproval/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `outsideAccommodationApproval_${new Date().getTime()}.xlsx`)
|
}, `outsideAccommodationApproval_${new Date().getTime()}.xlsx`)
|
||||||
}
|
},
|
||||||
|
detail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/dormitory/outsideAccommodation/detailApply",
|
||||||
|
query: { id: row.applyId } // 将 row.id 放在 query 中
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-input v-model="queryParams.attachmentName" placeholder="请输入附件名称" clearable
|
<el-input v-model="queryParams.attachmentName" placeholder="请输入附件名称" clearable
|
||||||
@keyup.enter.native="handleQuery" />
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学生姓名" prop="studentName">
|
<el-form-item label="学生姓名" prop="studentName" v-if="!roleGroup.includes('学生')">
|
||||||
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter.native="handleQuery"/>
|
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学生学号" prop="studentNo">
|
<el-form-item label="学生学号" prop="studentNo">
|
||||||
@@ -73,9 +73,11 @@
|
|||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||||
|
v-if="getRejectInfo(scope.row.outsideAccommodationApplies[0].outsideAccommodationApprovals).isReject"
|
||||||
v-hasPermi="['dormitory:outsideAccommodationAttachment:edit']">修改</el-button>
|
v-hasPermi="['dormitory:outsideAccommodationAttachment:edit']">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['dormitory:outsideAccommodationAttachment:remove']">删除</el-button>
|
v-hasPermi="['dormitory:outsideAccommodationAttachment:remove']">删除</el-button> -->
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-info" @click="detail(scope.row)">详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -121,7 +123,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOutsideAccommodationAttachment, getOutsideAccommodationAttachment, delOutsideAccommodationAttachment, addOutsideAccommodationAttachment, updateOutsideAccommodationAttachment } from "@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment";
|
import { listOutsideAccommodationAttachment, getOutsideAccommodationAttachment, delOutsideAccommodationAttachment, addOutsideAccommodationAttachment, updateOutsideAccommodationAttachment } from "@/api/dormitory/outsideAccommodation/outsideAccommodationAttachment";
|
||||||
|
import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
|
||||||
export default {
|
export default {
|
||||||
name: "OutsideAccommodationAttachment",
|
name: "OutsideAccommodationAttachment",
|
||||||
data() {
|
data() {
|
||||||
@@ -181,11 +183,13 @@ export default {
|
|||||||
studentNo: [
|
studentNo: [
|
||||||
{ required: true, message: "学生学号不能为空", trigger: "blur" }
|
{ required: true, message: "学生学号不能为空", trigger: "blur" }
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
roleGroup: '',
|
||||||
|
user: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getUser();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询外宿申请附件列表 */
|
/** 查询外宿申请附件列表 */
|
||||||
@@ -197,6 +201,20 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getUser() {
|
||||||
|
getUserProfile().then(response => {
|
||||||
|
this.user = response.data
|
||||||
|
this.roleGroup = response.roleGroup;
|
||||||
|
// this.postGroup = response.postGroup;
|
||||||
|
if (this.roleGroup) {
|
||||||
|
if (this.roleGroup.includes("学生")) {
|
||||||
|
this.queryParams.studentName = this.user.nickName
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@@ -243,12 +261,16 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
// this.reset();
|
||||||
const id = row.id || this.ids
|
// const id = row.id || this.ids
|
||||||
getOutsideAccommodationAttachment(id).then(response => {
|
// getOutsideAccommodationAttachment(id).then(response => {
|
||||||
this.form = response.data;
|
// this.form = response.data;
|
||||||
this.open = true;
|
// this.open = true;
|
||||||
this.title = "修改外宿申请附件";
|
// this.title = "修改外宿申请附件";
|
||||||
|
// });
|
||||||
|
this.$router.push({
|
||||||
|
path: "/dormitory/outsideAccommodation/applicationForm",
|
||||||
|
query: { id: row.outsideAccommodationApplies[0].id } // 将 row.id 放在 query 中
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@@ -286,14 +308,45 @@ export default {
|
|||||||
this.download('dormitory/outsideAccommodationAttachment/export', {
|
this.download('dormitory/outsideAccommodationAttachment/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `outsideAccommodationAttachment_${new Date().getTime()}.xlsx`)
|
}, `outsideAccommodationAttachment_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 获取驳回信息(是否驳回 + 驳回文字)
|
||||||
|
* @param {Array} approvalList 审批意见列表
|
||||||
|
* @returns {Object} { isReject: 布尔值, rejectText: 驳回文字 }
|
||||||
|
*/
|
||||||
|
getRejectInfo(approvalList) {
|
||||||
|
// 空值保护:列表不存在/非数组/为空时,返回未驳回
|
||||||
|
if (!approvalList || !Array.isArray(approvalList) || approvalList.length === 0) {
|
||||||
|
return { isReject: false, rejectText: '' };
|
||||||
|
}
|
||||||
|
// 找到第一个审批结果为0(驳回)的记录
|
||||||
|
const rejectItem = approvalList.find(item => item.approvalResult === 0);
|
||||||
|
if (rejectItem) {
|
||||||
|
// 提取审批节点名称(如「辅导员审批」→ 截取「辅导员」)
|
||||||
|
const nodeName = rejectItem.approvalNode.replace('审批', '');
|
||||||
|
// 拼接驳回文字(如「辅导员驳回」)
|
||||||
|
return { isReject: true, rejectText: `${nodeName}驳回` };
|
||||||
|
} else {
|
||||||
|
// 无驳回记录
|
||||||
|
return { isReject: false, rejectText: '' };
|
||||||
|
}
|
||||||
|
},
|
||||||
|
detail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/dormitory/outsideAccommodation/detailApply",
|
||||||
|
query: { id: row.outsideAccommodationApplies[0].id } // 将 row.id 放在 query 中
|
||||||
|
});
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.text-ellipsis {
|
.text-ellipsis {
|
||||||
white-space: nowrap; /* 防止文本换行 */
|
white-space: nowrap;
|
||||||
overflow: hidden; /* 隐藏溢出的内容 */
|
/* 防止文本换行 */
|
||||||
text-overflow: ellipsis; /* 显示省略号 */
|
overflow: hidden;
|
||||||
|
/* 隐藏溢出的内容 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 显示省略号 */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
<el-input v-model="queryParams.taskId" placeholder="请输入Flowable任务ID" clearable
|
<el-input v-model="queryParams.taskId" placeholder="请输入Flowable任务ID" clearable
|
||||||
@keyup.enter.native="handleQuery" />
|
@keyup.enter.native="handleQuery" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="审批节点" prop="nodeName">
|
<el-form-item label="学生姓名" prop="studentName">
|
||||||
<el-input v-model="queryParams.nodeName" placeholder="请输入审批节点" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.studentName" placeholder="请输入学生姓名" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="审批人ID" prop="approverId">
|
<!-- <el-form-item label="审批人ID" prop="approverId">
|
||||||
<el-input v-model="queryParams.approverId" placeholder="请输入审批人ID" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.approverId" placeholder="请输入审批人ID" clearable @keyup.enter.native="handleQuery" />
|
||||||
@@ -82,10 +82,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['routine:enlistmentReserveApproval:edit']">修改</el-button>
|
v-hasPermi="['routine:enlistmentReserveApproval:edit']">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['routine:enlistmentReserveApproval:remove']">删除</el-button>
|
v-hasPermi="['routine:enlistmentReserveApproval:remove']">删除</el-button> -->
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-info" @click="detail(scope.row)">详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -171,7 +172,8 @@ export default {
|
|||||||
approverName: null,
|
approverName: null,
|
||||||
approvalOpinion: null,
|
approvalOpinion: null,
|
||||||
approvalResult: null,
|
approvalResult: null,
|
||||||
approvalTime: null
|
approvalTime: null,
|
||||||
|
studentName: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@@ -321,7 +323,13 @@ export default {
|
|||||||
this.download('routine/enlistmentReserveApproval/export', {
|
this.download('routine/enlistmentReserveApproval/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `enlistmentReserveApproval_${new Date().getTime()}.xlsx`)
|
}, `enlistmentReserveApproval_${new Date().getTime()}.xlsx`)
|
||||||
}
|
},
|
||||||
|
detail(row) {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/routine/enlistmentReserve/applicationForm",
|
||||||
|
query: { id: row.applyId, type: 'detail', deployId: row.deployId, processInstanceId: row.processInstanceId } // 将 row.id 放在 query 中
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -344,11 +344,7 @@ export default {
|
|||||||
if (this.roleGroup.includes("学生")) {
|
if (this.roleGroup.includes("学生")) {
|
||||||
this.queryParams.studentName = this.user.nickName
|
this.queryParams.studentName = this.user.nickName
|
||||||
} else if (this.roleGroup.includes("辅导员")) {
|
} else if (this.roleGroup.includes("辅导员")) {
|
||||||
getOwnInfo().then(res => {
|
this.queryParams.teacherName = this.user.nickName
|
||||||
if (res.data) {
|
|
||||||
this.queryParams.teacherName = res.data.teacherName
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user