前端代码优化

This commit is contained in:
zzyuan 2025-12-10 17:17:26 +08:00
parent 25179e7051
commit d02cb070cf
8 changed files with 807 additions and 578 deletions

View File

@ -303,7 +303,7 @@ export function editCertificateApplyApi(data) {
data: data data: data
}) })
} }
// 证件领用申请删除 // 证件领用申请-删除
export function delCertificateApplyApi(data) { export function delCertificateApplyApi(data) {
return request({ return request({
url: '/certificate/certificate_check/certificateApply/del', url: '/certificate/certificate_check/certificateApply/del',
@ -314,7 +314,17 @@ export function delCertificateApplyApi(data) {
data: data data: data
}) })
} }
// 证件领用申请-撤销
export function revokeCertificateApplyApi(data) {
return request({
url: '/certificate/certificate_check/certificateApply/Revoke',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 证件领用审核列表-分页查询 // 证件领用审核列表-分页查询
export function getCertificateExamListPageApi(data) { export function getCertificateExamListPageApi(data) {
@ -327,6 +337,19 @@ export function getCertificateExamListPageApi(data) {
params:data params:data
}) })
} }
//存取证审核列表-分页查询 type 1 待处理 2已处理
export function getCertificateExamListByTypePageApi(data) {
return request({
url: '/certificate/certificate_check/certificateCheck/listByType',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}
// 证件领用审核-审核 // 证件领用审核-审核
export function checkCertificateApplyApi(data) { export function checkCertificateApplyApi(data) {
return request({ return request({
@ -339,6 +362,18 @@ export function checkCertificateApplyApi(data) {
}) })
} }
// 证件领用审核-流程详情
export function applyCheckProcessApi(data) {
return request({
url: '/certificate/certificate_check/certificateCheck/checkProcess',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 核验任务列表-分页查询 // 核验任务列表-分页查询
export function getCertificateVerifyListPageApi(data) { export function getCertificateVerifyListPageApi(data) {
return request({ return request({
@ -385,3 +420,16 @@ export function getCertificateVerifyDetailApi(data) {
params:data params:data
}) })
} }
// 问题反馈-列表
export function getFeedbackListPageApi(data) {
return request({
url: '/certificate/certificate_feedback/list',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params:data
})
}

View File

@ -10,6 +10,12 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="type">
<el-radio-group v-model="queryParams.type" @change="getList" style="width: 300px">
<el-radio label="1">待我处理</el-radio>
<el-radio label="2">我已处理</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="身份证号" prop="idNumber"> <!-- <el-form-item label="身份证号" prop="idNumber">
<el-input <el-input
v-model="queryParams.idNumber" v-model="queryParams.idNumber"
@ -35,25 +41,16 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增申请</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800"> <el-table v-loading="loading" :data="tableListData" height="800">
<!-- <el-table-column type="selection" width="55" align="center"/> --> <!-- <el-table-column type="selection" width="55" align="center"/> -->
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span> <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请人姓名" align="center" prop="name" :show-overflow-tooltip="true" width="120"/> <el-table-column label="申请人姓名" align="center" prop="userName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="申请类型" align="center" prop="applyType" :show-overflow-tooltip="true"> <el-table-column label="申请类型" align="center" prop="applyType" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.applyType==1">存证</span> <span v-if="scope.row.applyType==1">存证</span>
@ -94,7 +91,7 @@
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" v-if="scope.row.applyState==0||scope.row.applyState==1" size="mini" v-if="queryParams.type==1&&(scope.row.applyState==0||scope.row.applyState==1)"
type="text" type="text"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>审核</el-button> >审核</el-button>
@ -114,135 +111,117 @@
@pagination="getList" @pagination="getList"
/> />
<el-dialog title="申请详情" :visible.sync="openView" width="1100px" append-to-body>
<div style="width: 100%;height: 500px;overflow-y: auto;">
<el-descriptions title="存取证申请" :column="2" size="small" border>
<el-descriptions-item>
<template slot="label">申请类型</template>
<span v-if="applyRow.applyType==1">存证</span>
<span v-if="applyRow.applyType==2">取证</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">申请人</template>
{{applyRow.userName}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">证件编号</template>
{{applyRow.certificateNo}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">证件用途</template>
<span v-if="applyRow.applyReason==1">公事</span>
<span v-if="applyRow.applyReason==2">私事</span>
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">事由</template>
<div>
{{applyRow.applyDetail}}
</div>
</el-descriptions-item>
<!-- 添加或修改参数配置对话框 --> <el-descriptions-item v-if="applyRow.applyType==2">
<el-dialog :title="title+''" :visible.sync="open" width="900px" append-to-body> <template slot="label">计划出国地点</template>
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="120px" style="height: 650px;overflow-y: auto;"> {{applyRow.exitAddr}}
<el-row> </el-descriptions-item>
<el-col :span="12"> <el-descriptions-item v-if="applyRow.applyType==2">
<el-form-item label="申请人" prop="name"> <template slot="label">计划出国日期</template>
<el-input v-model="baseForm.name" placeholder="点击选择申请人" maxlength="30" readonly/> {{applyRow.exitTime}}
</el-form-item> </el-descriptions-item>
</el-col> <el-descriptions-item v-if="applyRow.applyType==2">
<el-col :span="12"> <template slot="label">计划回国日期</template>
<el-form-item label="岗位" prop="postId"> {{applyRow.entryTime}}
<el-select </el-descriptions-item>
v-model="baseForm.postId"
style="width: 100%;" <el-descriptions-item>
placeholder="请选择岗位" <template slot="label">允许他人代办</template>
> <span v-if="applyRow.isThrid==1"></span>
<el-option <span v-if="applyRow.isThrid==2"></span>
v-for="item in postOptions" </el-descriptions-item>
:key="item.postId+''" <el-descriptions-item v-if="applyRow.isThrid==1">
:label="item.postName" <template slot="label">代办人</template>
:value="item.postId+''" {{applyRow.thridName}}
></el-option> </el-descriptions-item>
</el-select> <el-descriptions-item v-if="applyRow.isThrid==1">
</el-form-item> <template slot="label">代办人身份证号</template>
</el-col> {{applyRow.thridIdNumber}}
<el-col :span="12"> </el-descriptions-item>
<el-form-item label="联系方式" prop="phone">
<el-input v-model="baseForm.phone" placeholder="请输入" maxlength="30" clearable/> <el-descriptions-item :span="2">
</el-form-item> <template slot="label">备注</template>
</el-col> {{applyRow.remark}}
<el-col :span="12"> </el-descriptions-item>
<el-form-item label="证件类型" prop="certificateType">
<el-select v-model="baseForm.certificateType" placeholder="证件类型" clearable style="width: 100%;"> <el-descriptions-item :span="2">
<el-option <template slot="label">附件</template>
v-for="dict in dict.type.sys_certificate_type" <div v-if="applyRow.fileList&&applyRow.fileList.length>0" style="width: 100%;height: 100px;display: flex;align-items: center;">
:key="dict.value" <img v-for="(item,index) in applyRow.fileList" :key="index" :src="item.url" @click="handlePictureCardPreview(item)" style="width: 60px;height: 60px;margin-right: 8px;"/>
:label="dict.label" </div>
:value="dict.value" <div v-else>无附件</div>
/> </el-descriptions-item>
</el-select> </el-descriptions>
</el-form-item> <div style="width: 100%;height: auto;padding: 20px;">
</el-col> <div style="margin-bottom: 20px;font-weight: 600;font-size: 18px;">流程</div>
<el-col :span="12"> <el-steps :active="checkProcess.length" finish-status="success" :space="300" align-center>
<el-form-item label="领用原因" prop="applyReason"> <el-step v-for="(item,index) in checkProcess" :key="index" :title="item.createBy+'-'+item.processName" >
<el-select v-model="baseForm.applyReason" placeholder="请选择领用原因" clearable style="width: 100%;"> <template slot="description">
<el-option <div>
v-for="dict in dict.type.issue_type" <span v-if="item.checkState==1" style="color: rgb(31, 114, 234);font-size: 18px;">同意</span>
:key="dict.value" <span v-if="item.checkState==2" style="color: rgb(230, 0, 68);font-size: 18px;">拒绝</span>
:label="dict.label" <span v-if="item.checkState==1" style="color: rgb(31, 114, 234);margin-left: 10px;font-size: 14px;">{{item.createTime}}</span>
:value="dict.value" <span v-if="item.checkState==2" style="color: rgb(230, 0, 68);margin-left: 10px;font-size: 14px;">{{item.createTime}}</span>
></el-option> </div>
</el-select> </template>
</el-form-item> </el-step>
</el-col> </el-steps>
<el-col :span="24"> </div>
<el-form-item label="详细说明" prop="applyDetail"> </div>
<el-input v-model="baseForm.applyDetail" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="预计使用时间" prop="dateRange">
<el-date-picker
v-model="baseForm.dateRange"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd" style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="附件上传">
<el-upload
ref="upload"
:limit="3"
accept=".xlsx, .xls, .jpg, .png"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:file-list="fileList"
:on-success="handleFileSuccess"
:on-remove="handleRemove"
:on-preview="handlePreviewDownloadFile"
:auto-upload="true"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
<div style="font-size: 18px;font-weight: 600;margin-bottom: 4px;">注意事项</div>
<div style="font-size: 16px;margin-bottom: 4px;">1.因公出国需提供单位出具的出差证明</div>
<div style="font-size: 16px;margin-bottom: 4px;">2.因私出国需提供相关证明材料如邀请函等</div>
<div style="font-size: 16px;margin-bottom: 4px;">3.证件领取后请妥善保管如有遗失需立即报告</div>
<div style="font-size: 16px;margin-bottom: 4px;">4.使用完毕后请及时归还证件</div>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="success" @click="submitForm(1)" v-if="!isView"> </el-button> <el-button type="success" v-if="!isView" @click="submitForm(1)"> </el-button>
<el-button type="danger" @click="submitForm(2)" v-if="!isView"> </el-button> <el-button type="danger" v-if="!isView" @click="submitForm(2)"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="openView=false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="查看附件" :visible.sync="openFile" width="400px" append-to-body> <el-dialog title="附件列表" :visible.sync="openFile" width="500px" append-to-body>
<div style="width: 100%;padding: 10px;color: #46a6ff;"> <div style="width: 100%;height: 240px;padding: 10px;color: #46a6ff;display: flex;flex-wrap: wrap;">
<div v-for="(item,index) in fileList" :key="index" style="margin: 10px;cursor: pointer;" @click="handlePreviewDownloadFile(item)"> <div v-for="(item,index) in fileList" :key="index" style="margin: 10px;">
{{ item.name }} <div style="margin-bottom: 10px;"><img :src="item.url" @click="handlePictureCardPreview(item)" style="width: 60px;height: 60px;margin-right: 8px;"/></div>
<div style="cursor: pointer;" @click="handlePreviewDownloadFile(item)">{{ item.name }}</div>
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="openFile=false"> </el-button> <el-button @click="openFile=false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogVisible" width="700px">
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getUser } from '@/api/system/user' import { getCertificateExamListByTypePageApi,checkCertificateApplyApi,applyCheckProcessApi } from "@/api/certificateManage/index";
import { getCertificateExamListPageApi,checkCertificateApplyApi,getSysUserListApi,addCertificateCheckApi } from "@/api/certificateManage/index";
import base64 from 'base-64'; import base64 from 'base-64';
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { downloadFileByUrl } from '@/utils/download' import { downloadFileByUrl } from '@/utils/download'
@ -272,98 +251,33 @@
title: "", title: "",
// //
open: false, open: false,
checked: false,
isCreateFlage:true,
userNameFlage:false,
certificateNos:[], certificateNos:[],
userIds:[],
isReadOnly:false,
openSelectUser:false, openSelectUser:false,
selectItme:{},
allUserList:[],
//
deptOptions: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
idNumber:null,// type:'1',//
name:null,// name:null,//
}, },
activeName:"baseSetting",
deviceData:{},
//
postOptions: [],
//
baseForm: {
userId:"",
postId:"",
phone:"",
certificateType:"",
applyReason:"",
applyDetail:"",
startTime:"",
startTime:"",
endTime:"",
dateRange:[]
},
isView:false,
//
baseFormRules: {
name: [
{ required: true, message: "申请人不能为空", trigger: "change" }
],
userId: [
{ required: true, message: "申请人不能为空", trigger: "change" }
],
phone: [
{ required: true, message: "手机号码不能为空", trigger: "change" },
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'change' }
],
postId: [
{ required: true, message: "岗位不能为空", trigger: "change" },
],
certificateType: [
{ required: true, message: "证件类型不能为空", trigger: "change" }
],
applyReason: [
{ required: true, message: "领用原因不能为空", trigger: "change" }
],
applyDetail: [
{ required: true, message: "详细说明不能为空", trigger: "blur" }
],
dateRange: [
{ required: true, message: "预计使用时间不能为空", trigger: "change" }
],
},
//
upload: {
//
isUploading: false,
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/file/upload?type=face',
},
fileList:[], fileList:[],
fileUrls:[], fileUrls:[],
fileNames:[], fileNames:[],
openFile:false openFile:false,
checkProcess:[],
dialogVisible:false,//
dialogImageUrl:"",//
openView:false,//
applyRow:{},
isView:false,
}; };
}, },
mounted(){ mounted(){
this.getPostList();
this.getList(); this.getList();
}, },
methods: { methods: {
getPostList(){
getUser().then((response) => {
this.postOptions = response.posts
})
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -380,138 +294,75 @@
let param = { let param = {
"pageNum":this.queryParams.pageNum, "pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize, "pageSize":this.queryParams.pageSize,
"idNumber":this.queryParams.idNumber, // "idNumber":this.queryParams.idNumber,
"name":this.queryParams.name, "name":this.queryParams.name,
"certificateType":this.queryParams.certificateType, "type":this.queryParams.type,
// "certificateType":this.queryParams.certificateType,
// "certificateNo":this.queryParams.certificateNo // "certificateNo":this.queryParams.certificateNo
} }
getCertificateExamListPageApi(param).then(response => { getCertificateExamListByTypePageApi(param).then(response => {
this.tableListData = response.rows; this.tableListData = response.rows;
this.total = Number(response.total); this.total = Number(response.total);
this.loading = false; this.loading = false;
}); });
}, },
// applyCheckProcess() {
reset() { let param = {
this.fileList=[] "checkId":this.applyRow.checkId,
this.fileUrls=[] }
this.fileNames = [] applyCheckProcessApi(param).then(response => {
this.baseForm = { this.checkProcess = response.data||[];
userId:"", });
postId:"",
phone:"",
certificateType:"",
applyReason:"",
applyDetail:"",
startTime:"",
startTime:"",
endTime:"",
dateRange:[]
};
this.resetForm("baseForm");
}, },
/** 新增按钮操作 */ /** 审批按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.isReadOnly=false;
this.title = "新增";
console.log("this.baseForm",this.baseForm);
},
/** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.applyRow = row;
this.open = true; this.applyCheckProcess()
this.isReadOnly=false;
this.baseForm = Object.assign({}, row)
this.baseForm.dateRange = [row.startTime,row.endTime]
if(row.fileUrl&&row.fileUrl!=''){ if(row.fileUrl&&row.fileUrl!=''){
let arr = row.fileUrl.split(","); let arr = row.fileUrl.split(",");
let arr2 = row.fileName.split(","); let arr2 = row.fileName.split(",");
this.applyRow.fileList=[]
arr.forEach((item,index)=>{ arr.forEach((item,index)=>{
this.fileList.push({url:item,name:arr2[index]}) this.applyRow.fileList.push({url:item,name:arr2[index]})
this.fileUrls.push(item)
this.fileNames.push(arr2[index])
}) })
}else{ }else{
this.fileList=[] this.applyRow.fileList=[]
this.fileUrls=[]
this.fileNames = []
} }
this.upload.isUploading = true console.log(this.applyRow.fileList)
this.isView = false this.isView=false;
this.title = "修改"; this.openView = true;
}, },
handleView(row) { handleView(row) {
this.reset(); this.applyRow = row;
this.open = true; this.applyCheckProcess()
this.isReadOnly=true;
this.baseForm = Object.assign({}, row)
getUser().then((response) => {
this.postOptions = response.posts
})
this.baseForm.dateRange = [row.startTime,row.endTime]
if(row.fileUrl&&row.fileUrl!=''){ if(row.fileUrl&&row.fileUrl!=''){
let arr = row.fileUrl.split(","); let arr = row.fileUrl.split(",");
let arr2 = row.fileName.split(","); let arr2 = row.fileName.split(",");
this.applyRow.fileList=[]
arr.forEach((item,index)=>{ arr.forEach((item,index)=>{
this.fileList.push({url:item,name:arr2[index]}) this.applyRow.fileList.push({url:item,name:arr2[index]})
this.fileUrls.push(item)
this.fileNames.push(arr2[index])
}) })
}else{ }else{
this.fileList=[] this.applyRow.fileList=[]
this.fileUrls=[]
this.fileNames = []
} }
this.upload.isUploading = true console.log(this.applyRow.fileList)
this.isView = true this.isView=true;
this.title = "查看"; this.openView = true;
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function(type) { submitForm: function(type) {
//checkState 1 2 checkId //checkState 1 2 checkId
console.log("this.baseForm",this.baseForm); console.log("this.applyRow",this.applyRow);
let param = { let param = {
checkId:this.baseForm.checkId, checkId:this.applyRow.checkId,
checkState:type checkState:type
} }
checkCertificateApplyApi(param).then(response => { checkCertificateApplyApi(param).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.openView = false;
this.getList(); this.getList();
}); });
}, },
//
cancel() {
this.open = false;
this.reset();
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true
},
//
handleFileSuccess(response, file, fileList) {
this.upload.isUploading = false;
if(response.code==200){
this.fileUrls.push(response.data.url)
this.fileNames.push(response.data.name)
this.$modal.msgSuccess(response.msg);
}else{
this.$modal.msgError(response.msg);
}
},
handleRemove(file, fileList) {
let sum = 0
this.fileNames.forEach((item, index) => {
if (item == file.name) {
sum = index
}
})
this.fileUrls.splice(sum, 1)
this.fileNames.splice(sum, 1)
},
async handlePreviewDownloadFile(file) { async handlePreviewDownloadFile(file) {
if (file.url != null && file.url !== '') { if (file.url != null && file.url !== '') {
let downloadUrl = file.url; let downloadUrl = file.url;
@ -557,17 +408,10 @@
} }
this.openFile = true this.openFile = true
}, },
/** 批量删除 */ //
handleBatchDel(){ handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
}, this.dialogVisible = true
//
handleSelectionChange(selection) {
// this.certificateNos = selection.map(item => item.certificateNo)
// this.userIds=selection.map(item => item.userId)
// //
// this.single = selection.length !== 1
// this.multiple = !selection.length
}, },
formatDate(date) { formatDate(date) {
const year = date.getFullYear(); const year = date.getFullYear();

View File

@ -54,14 +54,14 @@
</el-col> --> </el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800"> <el-table v-loading="loading" :data="tableListData" height="800">
<!-- <el-table-column type="selection" width="55" align="center"/> --> <!-- <el-table-column type="selection" width="55" align="center"/> -->
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span> <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请人姓名" align="center" prop="name" :show-overflow-tooltip="true" width="120"/> <el-table-column label="申请人姓名" align="center" prop="userName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="申请类型" align="center" prop="applyType" :show-overflow-tooltip="true"> <el-table-column label="申请类型" align="center" prop="applyType" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.applyType==1">存证</span> <span v-if="scope.row.applyType==1">存证</span>
@ -86,7 +86,8 @@
</el-table-column> </el-table-column>
<el-table-column label="附件" align="center" prop="" :show-overflow-tooltip="true"> <el-table-column label="附件" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span @click="checkFile(scope.row)" style="cursor: pointer;color: #46a6ff;">查看</span> <span v-if="scope.row.fileUrl!=''" @click="checkFile(scope.row)" style="cursor: pointer;color: #46a6ff;">查看</span>
<span v-else>无附件</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请状态" align="center" prop="applyState" :show-overflow-tooltip="true"> <el-table-column label="申请状态" align="center" prop="applyState" :show-overflow-tooltip="true">
@ -111,6 +112,12 @@
type="text" type="text"
@click="handleView(scope.row)" @click="handleView(scope.row)"
>查看</el-button> >查看</el-button>
<el-button
size="mini" v-if="scope.row.applyState==0"
type="text"
style="color: red;"
@click="handleRevoke(scope.row)"
>撤销</el-button>
<el-button <el-button
size="mini" v-if="scope.row.applyState==-1" size="mini" v-if="scope.row.applyState==-1"
type="text" type="text"
@ -131,32 +138,38 @@
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title+''" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title+''" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="120px" style="height: 650px;overflow-y: auto;"> <el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="120px" style="width: 100%;height: 650px;overflow-y: auto;padding-right: 10px;">
<el-row>
<el-form-item label-width="120px" label="申请类型" prop="applyType">
<el-radio-group v-model="baseForm.applyType" size="small">
<el-radio @change="handleRadioChange('1')" label="1">存证</el-radio>
<el-radio @change="handleRadioChange('2')" label="2">取证</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="申请人" prop="name"> <el-form-item label="申请类型" prop="applyType" required>
<el-input v-model="baseForm.name" placeholder="点击选择申请人" maxlength="30" clearable readonly @focus="handleSelect()"/> <el-radio-group v-model="baseForm.applyType" @change="changeApplyType">
<el-radio label="1">存证</el-radio>
<el-radio label="2">取证</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="申请类型" prop="applyType"> <el-form-item label="申请人" prop="userId">
<el-radio-group v-model="baseForm.applyType" @input="changeApplyType"> <el-select
<el-radio :label="1">存证</el-radio> v-model="baseForm.userId"
<el-radio :label="2">取证</el-radio> placeholder="请选择申请人"
</el-radio-group> filterable
clearable
style="width: 100%"
>
<el-option
v-for="item in allUserList"
:key="item.userId"
:label="item.userName"
:value="item.userId"
@click.native="chosenSysUser(item)"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="证件编号" prop="certificateNos"> <el-form-item label="证件编号" prop="certificateNos">
<el-select v-model="baseForm.certificateNos" multiple placeholder="请选择证件编号" clearable style="width: 100%;"> <el-select v-model="baseForm.certificateNos" multiple placeholder="请先选择申请人再选择证件编号" clearable style="width: 100%;">
<el-option <el-option
v-for="item in certificateList" v-for="item in certificateList"
:key="item.certificateNo" :key="item.certificateNo"
@ -169,23 +182,22 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="证件用途" prop="applyReason"> <el-form-item label="证件用途" prop="applyReason">
<el-radio-group v-model="baseForm.applyReason"> <el-radio-group v-model="baseForm.applyReason">
<el-radio :label="1">公事</el-radio> <el-radio label="1">公事</el-radio>
<el-radio :label="2">私事</el-radio> <el-radio label="2">私事</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="事由" prop="applyDetail"> <el-form-item label="事由" prop="applyDetail">
<el-input v-model="baseForm.applyDetail" type="textarea" placeholder="请输入申请事由"></el-input> <el-input v-model="baseForm.applyDetail" type="textarea" placeholder="请输入申请事由" maxlength="100"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="baseForm.applyType==2">
<el-form-item label="计划出国地点" prop="exitAddr"> <el-form-item label="计划出国地点" prop="exitAddr">
<el-input v-model="baseForm.exitAddr" placeholder="计划出国(境)地点" maxlength="50" clearable/> <el-input v-model="baseForm.exitAddr" placeholder="计划出国(境)地点" maxlength="30" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" v-if="baseForm.applyType==2">
<el-col :span="12">
<el-form-item label="计划出国日期" prop="exitTime"> <el-form-item label="计划出国日期" prop="exitTime">
<el-date-picker <el-date-picker
v-model="baseForm.exitTime" v-model="baseForm.exitTime"
@ -195,7 +207,7 @@
value-format="yyyy-MM-dd"></el-date-picker> value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="baseForm.applyType==2">
<el-form-item label="计划回国日期" prop="entryTime"> <el-form-item label="计划回国日期" prop="entryTime">
<el-date-picker <el-date-picker
v-model="baseForm.entryTime" v-model="baseForm.entryTime"
@ -206,14 +218,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="允许他人代办" prop="isThrid" > <el-form-item label="允许他人代办" prop="isThrid" required>
<el-radio-group v-model="baseForm.isThrid"> <el-radio-group v-model="baseForm.isThrid" @change="changeIsThrid">
<el-radio :label="1"></el-radio> <el-radio label="1"></el-radio>
<el-radio :label="2"></el-radio> <el-radio label="2"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="baseForm.isThrid==1">
<el-form-item label="代办人" prop="thridId" > <el-form-item label="代办人" prop="thridId" >
<el-select v-model="baseForm.thridId" placeholder="请先选择申请人后再选择代办人" clearable style="width: 100%;" @change="changThridId"> <el-select v-model="baseForm.thridId" placeholder="请先选择申请人后再选择代办人" clearable style="width: 100%;" @change="changThridId">
<el-option <el-option
@ -225,14 +237,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12" v-if="baseForm.isThrid==1">
<el-form-item label="代办人身份证号" prop="thridIdNumber"> <el-form-item label="代办人身份证号" prop="thridIdNumber">
<el-input v-model="baseForm.thridIdNumber" placeholder="代办人身份证号" maxlength="30" clearable readonly /> <el-input v-model="baseForm.thridIdNumber" placeholder="代办人身份证号" maxlength="20" clearable readonly />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="baseForm.remark" type="textarea" placeholder="请输入备注"></el-input> <el-input v-model="baseForm.remark" type="textarea" placeholder="请输入备注" maxlength="100"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
@ -240,7 +252,7 @@
<el-upload <el-upload
ref="upload" ref="upload"
:limit="3" :limit="3"
accept=".xlsx, .xls, .jpg, .png" accept=".png, .jpg, .jpeg"
:headers="upload.headers" :headers="upload.headers"
:action="upload.url" :action="upload.url"
:disabled="upload.isUploading" :disabled="upload.isUploading"
@ -267,59 +279,121 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="success" @click="submitForm(-1)" v-if="!isView"> </el-button> <el-button type="success" @click="submitForm(-1)"> </el-button>
<el-button type="primary" @click="submitForm(0)" v-if="!isView"> </el-button> <el-button type="primary" @click="submitForm(0)"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 选择人员 -->
<el-dialog title="选择系统人员" :visible.sync="openSelectUser" width="600px" append-to-body> <el-dialog title="申请详情" :visible.sync="openView" width="1100px" append-to-body>
<el-form ref="baseForm2" :model="baseForm2" :rules="baseFormRules" label-width="100px"> <div style="width: 100%;height: 500px;overflow-y: auto;">
<el-row> <el-descriptions title="存取证申请" :column="2" size="small" border>
<el-col :span="24"> <el-descriptions-item>
<el-form-item label="姓名" prop="userId"> <template slot="label">申请类型</template>
<el-select <span v-if="viewRow.applyType==1">存证</span>
v-model="baseForm2.userId" <span v-if="viewRow.applyType==2">取证</span>
placeholder="请选择" </el-descriptions-item>
filterable <el-descriptions-item>
clearable <template slot="label">申请人</template>
style="width: 100%" {{viewRow.userName}}
> </el-descriptions-item>
<el-option <el-descriptions-item>
v-for="item in allUserList" <template slot="label">证件编号</template>
:key="item.userId" {{viewRow.certificateNo}}
:label="item.userName" </el-descriptions-item>
:value="item.userId" <el-descriptions-item>
@click.native="getCorpAndDept(item)" <template slot="label">证件用途</template>
/> <span v-if="viewRow.applyReason==1">公事</span>
</el-select> <span v-if="viewRow.applyReason==2">私事</span>
</el-form-item> </el-descriptions-item>
</el-col> <el-descriptions-item :span="2">
</el-row> <template slot="label">事由</template>
</el-form> <div>
<div slot="footer" class="dialog-footer"> {{viewRow.applyDetail}}
<el-button type="primary" @click="submitForm2"> </el-button> </div>
<el-button @click="cancel2"> </el-button> </el-descriptions-item>
<el-descriptions-item v-if="viewRow.applyType==2">
<template slot="label">计划出国地点</template>
{{viewRow.exitAddr}}
</el-descriptions-item>
<el-descriptions-item v-if="viewRow.applyType==2">
<template slot="label">计划出国日期</template>
{{viewRow.exitTime}}
</el-descriptions-item>
<el-descriptions-item v-if="viewRow.applyType==2">
<template slot="label">计划回国日期</template>
{{viewRow.entryTime}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">允许他人代办</template>
<span v-if="viewRow.isThrid==1"></span>
<span v-if="viewRow.isThrid==2"></span>
</el-descriptions-item>
<el-descriptions-item v-if="viewRow.isThrid==1">
<template slot="label">代办人</template>
{{viewRow.thridName}}
</el-descriptions-item>
<el-descriptions-item v-if="viewRow.isThrid==1">
<template slot="label">代办人身份证号</template>
{{viewRow.thridIdNumber}}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">备注</template>
{{viewRow.remark}}
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">附件</template>
<div v-if="viewRow.fileList&&viewRow.fileList.length>0" style="width: 100%;height: 100px;display: flex;align-items: center;">
<img v-for="(item,index) in viewRow.fileList" :key="index" :src="item.url" @click="handlePictureCardPreview(item)" style="width: 60px;height: 60px;margin-right: 8px;"/>
</div>
<div v-else>无附件</div>
</el-descriptions-item>
</el-descriptions>
<div style="width: 100%;height: auto;padding: 20px;">
<div style="margin-bottom: 20px;font-weight: 600;font-size: 18px;">流程</div>
<el-steps :active="checkProcess.length" finish-status="success" :space="300" align-center>
<el-step v-for="(item,index) in checkProcess" :key="index" :title="item.createBy+'-'+item.processName" >
<template slot="description">
<div>
<span v-if="item.checkState==1" style="color: rgb(31, 114, 234);font-size: 18px;">同意</span>
<span v-if="item.checkState==2" style="color: rgb(230, 0, 68);font-size: 18px;">拒绝</span>
<span v-if="item.checkState==1" style="color: rgb(31, 114, 234);margin-left: 10px;font-size: 14px;">{{item.createTime}}</span>
<span v-if="item.checkState==2" style="color: rgb(230, 0, 68);margin-left: 10px;font-size: 14px;">{{item.createTime}}</span>
</div>
</template>
</el-step>
</el-steps>
</div>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="附件列表" :visible.sync="openFile" width="400px" append-to-body> <el-dialog title="附件列表" :visible.sync="openFile" width="500px" append-to-body>
<div style="width: 100%;padding: 10px;color: #46a6ff;"> <div style="width: 100%;height: 240px;padding: 10px;color: #46a6ff;display: flex;flex-wrap: wrap;">
<div v-for="(item,index) in fileList" :key="index" style="margin: 10px;cursor: pointer;" @click="handlePreviewDownloadFile(item)"> <div v-for="(item,index) in fileList" :key="index" style="margin: 10px;">
{{ item.name }} <div style="margin-bottom: 10px;"><img :src="item.url" @click="handlePictureCardPreview(item)" style="width: 60px;height: 60px;margin-right: 8px;"/></div>
<div style="cursor: pointer;" @click="handlePreviewDownloadFile(item)">{{ item.name }}</div>
</div> </div>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="openFile=false"> </el-button> <el-button @click="openFile=false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogVisible" width="700px">
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getUser } from '@/api/system/user' import { getUser } from '@/api/system/user'
import { getCertificateApplyListPageApi,addCertificateApplyApi, editCertificateApplyApi, import { getCertificateApplyListPageApi,addCertificateApplyApi, editCertificateApplyApi,
delCertificateApplyApi,getSysUserListApi,addCertificateCheckApi,applyCertificateNoListApi,thridListApi } from "@/api/certificateManage/index"; delCertificateApplyApi,revokeCertificateApplyApi,getSysUserListApi,applyCheckProcessApi,applyCertificateNoListApi,thridListApi } from "@/api/certificateManage/index";
import base64 from 'base-64'; import base64 from 'base-64';
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { downloadFileByUrl } from '@/utils/download' import { downloadFileByUrl } from '@/utils/download'
@ -349,17 +423,6 @@
title: "", title: "",
// //
open: false, open: false,
checked: false,
isCreateFlage:true,
userNameFlage:false,
userIds:[],
isReadOnly:false,
openSelectUser:false,
selectItme:{},
allUserList:[],
//
deptOptions: [],
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -367,51 +430,51 @@
idNumber:null,// idNumber:null,//
name:null,// name:null,//
}, },
activeName:"baseSetting",
deviceData:{},
//
postOptions: [],
// //
baseForm: { baseForm: {
userId:"", userId:"",
applyType:1, applyType:"1",
applyReason:1, applyReason:"1",
isThrid:"2",
certificateNos:[], certificateNos:[],
isThrid:2,
applyDetail:"", applyDetail:"",
startTime:"", exitAddr:"",
startTime:"", exitTime:"",
endTime:"", entryTime:"",
dateRange:[] thridId:"",
thridName:"",
thridIdNumber:"",
remark:"",
}, },
selectItme:{},
allUserList:[],
certificateList:[], certificateList:[],
thridManList:[], thridManList:[],
isView:false,
baseForm2: {
userId:""
},
// //
baseFormRules: { baseFormRules: {
name: [
{ required: true, message: "申请人不能为空", trigger: "change" }
],
userId: [ userId: [
{ required: true, message: "申请人不能为空", trigger: "change" } { required: true, message: "申请人不能为空", trigger: "change" }
], ],
postId: [
{ required: true, message: "岗位不能为空", trigger: "change" },
],
certificateNos: [ certificateNos: [
{ required: true, message: "证件编号不能为空", trigger: "change" } { required: true, message: "证件编号不能为空", trigger: "change" }
], ],
applyReason: [
{ required: true, message: "领用原因不能为空", trigger: "change" }
],
applyDetail: [ applyDetail: [
{ required: true, message: "详细说明不能为空", trigger: "blur" } { required: true, message: "事由不能为空", trigger: "blur" }
], ],
dateRange: [ exitAddr: [
{ required: true, message: "预计使用时间不能为空", trigger: "change" } { required: true, message: "计划出国地点不能为空", trigger: "change" },
],
exitTime: [
{ required: true, message: "计划出国日期不能为空", trigger: "change" },
],
entryTime: [
{ required: true, message: "计划回国日期不能为空", trigger: "change" }
],
thridId: [
{ required: true, message: "代办人不能为空", trigger: "change" }
],
thridIdNumber: [
{ required: true, message: "代办人身份证号不能为空", trigger: "change" }
], ],
}, },
@ -427,13 +490,17 @@
fileList:[], fileList:[],
fileUrls:[], fileUrls:[],
fileNames:[], fileNames:[],
openFile:false openFile:false,//
checkProcess:[],
dialogVisible:false,//
dialogImageUrl:"",//
openView:false,//
viewRow:{}
}; };
}, },
mounted(){ mounted(){
this.getList(); this.getList();
}, },
methods: { methods: {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
@ -468,24 +535,30 @@
this.fileList=[] this.fileList=[]
this.fileUrls=[] this.fileUrls=[]
this.fileNames = [] this.fileNames = []
this.certificateList=[]
this.thridManList=[]
this.baseForm = { this.baseForm = {
userId:"", userId:"",
applyType:1, applyType:"1",
applyReason:1, applyReason:"1",
isThrid:2, isThrid:"2",
certificateNos:[],
applyDetail:"", applyDetail:"",
startTime:"", exitAddr:"",
startTime:"", exitTime:"",
endTime:"", entryTime:"",
dateRange:[] thridId:"",
thridName:"",
thridIdNumber:"",
remark:"",
}; };
this.resetForm("baseForm"); this.resetForm("baseForm");
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.getApplyUserList()
this.open = true; this.open = true;
this.isReadOnly=false;
this.title = "新增"; this.title = "新增";
console.log("this.baseForm",this.baseForm); console.log("this.baseForm",this.baseForm);
}, },
@ -493,9 +566,22 @@
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.open = true; this.open = true;
this.isReadOnly=true;
this.baseForm = Object.assign({}, row) this.baseForm = Object.assign({}, row)
this.baseForm.dateRange = [row.startTime,row.endTime] this.getApplyUserList()
this.getCertificateList() //
setTimeout(()=>{
this.$set(this.baseForm,"name",row.name)
this.$set(this.baseForm,"userId",row.userId)
this.$set(this.baseForm,"certificateNos",row.certificateNos)
},1000)
if(row.isThrid==1){
this.getThridList();//
setTimeout(()=>{
this.$set(this.baseForm,"thridId",row.thridId)
this.$set(this.baseForm,"thridName",row.thridName)
this.$set(this.baseForm,"thridIdNumber",row.thridIdNumber)
},1000)
}
if(row.fileUrl&&row.fileUrl!=''){ if(row.fileUrl&&row.fileUrl!=''){
let arr = row.fileUrl.split(","); let arr = row.fileUrl.split(",");
let arr2 = row.fileName.split(","); let arr2 = row.fileName.split(",");
@ -509,34 +595,71 @@
this.fileUrls=[] this.fileUrls=[]
this.fileNames = [] this.fileNames = []
} }
his.isView = false
this.title = "修改"; this.title = "修改";
}, },
handleView(row) {
this.reset(); //
this.open = true; changeApplyType(){
this.isReadOnly=true; console.log('changeApplyType')
this.baseForm = Object.assign({}, row) this.getApplyUserList()
getUser().then((response) => { this.certificateList=[]
this.postOptions = response.posts this.$set(this.baseForm,"certificateNos",[])
}) this.thridManList=[]
this.baseForm.dateRange = [row.startTime,row.endTime] this.$set(this.baseForm,'thridId',null)
if(row.fileUrl&&row.fileUrl!=''){ this.$set(this.baseForm,'thridName',null)
let arr = row.fileUrl.split(","); this.$set(this.baseForm,'thridIdNumber',null)
let arr2 = row.fileName.split(","); },
arr.forEach((item,index)=>{ getApplyUserList(){
this.fileList.push({url:item,name:arr2[index]}) const param={"applyType":this.baseForm.applyType,pageNum:1,pageSize:100}
this.fileUrls.push(item) this.$set(this.baseForm,"name",null)
this.fileNames.push(arr2[index]) this.$set(this.baseForm,"userId",null)
}) getSysUserListApi(param).then(response => {
}else{ console.log("response",response);
this.fileList=[] this.allUserList=response;
this.fileUrls=[] });
this.fileNames = [] },
//-
chosenSysUser(val){
console.log("chosenSysUser",val)
this.selectItme=val;
this.$set(this.baseForm,"name",this.selectItme.userName)
this.$set(this.baseForm,"userId",this.selectItme.userId)
this.getCertificateList();//
this.getThridList();//
},
//
getCertificateList(){
let param = {
applyType:this.baseForm.applyType,
userId:this.baseForm.userId
} }
this.upload.isUploading = true this.certificateList=[]
this.isView = true this.$set(this.baseForm,"certificateNos",[])
this.title = "查看"; applyCertificateNoListApi(param).then((response) => {
this.certificateList = response
})
},
//
getThridList(){
let param = {
userId:this.baseForm.userId
}
this.thridManList=[]
this.$set(this.baseForm,'thridId',null)
this.$set(this.baseForm,'thridName',null)
this.$set(this.baseForm,'thridIdNumber',null)
thridListApi(param).then((response) => {
this.thridManList = response.data
})
},
changeIsThrid(){
this.getThridList()
},
changThridId(val){
console.log(val)
let index = this.thridManList.findIndex(v=>v.id==val)
this.$set(this.baseForm,'thridName',this.thridManList[index].name)
this.$set(this.baseForm,'thridIdNumber',this.thridManList[index].idNumber)
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function(type) { submitForm: function(type) {
@ -579,72 +702,41 @@
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
// applyCheckProcess() {
getThridList(){
let param = { let param = {
userId:this.baseForm.userId "checkId":this.viewRow.checkId,
} }
this.thridManList=[] applyCheckProcessApi(param).then(response => {
thridListApi(param).then((response) => { this.checkProcess = response.data||[];
this.thridManList = response.data
})
},
changThridId(val){
console.log(val)
let index = this.thridManList.findIndex(v=>v.id==val)
this.$set(this.baseForm,'thridIdName',this.thridManList[index].name)
this.$set(this.baseForm,'thridIdNumber',this.thridManList[index].idNumber)
},
//
handleSelect(){
this.openSelectUser = true;
console.log("this.baseForm",this.baseForm);
const param={"applyType":this.baseForm.applyType}
getApplyUserListApi(param).then(response => {
console.log("response",response);
this.allUserList=response;
this.$set(this.baseForm2,"userId",this.baseForm.userId)
}); });
}, },
//- //
getCorpAndDept(val){ handleView(row) {
console.log("getCorpAndDept",val) this.viewRow = row;
this.selectItme=val; this.applyCheckProcess()
this.$set(this.baseForm2,"userId",this.selectItme.userId) if(row.fileUrl&&row.fileUrl!=''){
}, let arr = row.fileUrl.split(",");
/** 提交选中人员*/ let arr2 = row.fileName.split(",");
submitForm2: function() { this.viewRow.fileList=[]
console.log("this.baseForm2",this.baseForm2); arr.forEach((item,index)=>{
this.$refs["baseForm2"].validate(valid => { this.viewRow.fileList.push({url:item,name:arr2[index]})
if (valid) {
this.$set(this.baseForm,"name",this.selectItme.userName)
this.$set(this.baseForm,"userId",this.selectItme.userId)
this.getCertificateList();//
this.getThridList();//
this.openSelectUser = false;
this.isCreateFlage=false;
}
});
},
//
cancel2() {
this.openSelectUser = false;
},
//
getCertificateList(){
let param = {
applyType:this.baseForm.applyType,
userId:this.baseForm.userId
}
this.certificateList=[]
applyCertificateNoListApi(param).then((response) => {
this.certificateList = response
}) })
}else{
this.viewRow.fileList=[]
}
console.log(this.viewRow.fileList)
this.openView = true;
}, },
// //
changeApplyType(e){ handleRevoke(row) {
console.log(e) this.$modal.confirm('是否确认撤销申请?').then(() => {
this.getCertificateList();// revokeCertificateApplyApi({checkId:row.checkId}).then(response => {
console.log("revokeCertificateApplyApi",response);
this.getList();
this.$modal.msgSuccess("撤销成功");
return;
});
}).catch(() => {});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
@ -727,17 +819,10 @@
} }
this.openFile = true this.openFile = true
}, },
/** 批量删除 */ //
handleBatchDel(){ handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
}, this.dialogVisible = true
//
handleSelectionChange(selection) {
// this.certificateNos = selection.map(item => item.certificateNo)
// this.userIds=selection.map(item => item.userId)
// //
// this.single = selection.length !== 1
// this.multiple = !selection.length
}, },
formatDate(date) { formatDate(date) {
const year = date.getFullYear(); const year = date.getFullYear();
@ -749,6 +834,12 @@
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .el-upload {
width: 100%;
}
::v-deep .el-upload-dragger{
width: 100%;
}
.form-title{ .form-title{
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;

View File

@ -93,8 +93,7 @@
<el-table-column label="设备地址" align="center" prop="deviceAddr" :show-overflow-tooltip="true" width="150"/> <el-table-column label="设备地址" align="center" prop="deviceAddr" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="设备编号" align="center" prop="deviceNo" :show-overflow-tooltip="true"/> <el-table-column label="设备编号" align="center" prop="deviceNo" :show-overflow-tooltip="true"/>
<el-table-column label="槽位编号" align="center" prop="soltNo" :show-overflow-tooltip="true"/> <el-table-column label="槽位编号" align="center" prop="soltNo" :show-overflow-tooltip="true"/>
<el-table-column label="验证码" align="center" prop="verificationCode" :show-overflow-tooltip="true"> <!-- <el-table-column label="验证码" align="center" prop="verificationCode" :show-overflow-tooltip="true"></el-table-column> -->
</el-table-column>
<el-table-column label="二维码" align="center" prop="verificationCode" :show-overflow-tooltip="true"> <el-table-column label="二维码" align="center" prop="verificationCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span @click="checkCode(scope.row)" style="color:blue">查看</span> <span @click="checkCode(scope.row)" style="color:blue">查看</span>

View File

@ -265,6 +265,9 @@
deviceType: [ deviceType: [
{ required: true, message: "设备类型不能为空", trigger: "blur" } { required: true, message: "设备类型不能为空", trigger: "blur" }
], ],
deviceAddr: [
{ required: true, message: "设备地址不能为空", trigger: "blur" }
],
funImp: [ funImp: [
{ required: true, message: "设备编号不能为空", trigger: "blur" } { required: true, message: "设备编号不能为空", trigger: "blur" }
], ],

View File

@ -0,0 +1,211 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable maxlength="20"
style="width: 200px"
/>
</el-form-item>
<!-- <el-form-item label="证件编号" prop="certificateNo">
<el-input
v-model="queryParams.certificateNo"
placeholder="请输入证件编号"
clearable maxlength="20"
style="width: 200px"
/>
</el-form-item>
<el-form-item label="证件类型" prop="certificateType">
<el-select v-model="queryParams.certificateType" placeholder="证件类型" clearable style="width: 200px">
<el-option
v-for="dict in dict.type.sys_certificate_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="核验状态" prop="verifyState">
<el-select v-model="queryParams.verifyState" placeholder="核验状态" clearable style="width: 200px">
<el-option label="待验证" value="0" />
<el-option label="已验证" value="1" />
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData" height="800">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="createBy" :show-overflow-tooltip="true"/>
<el-table-column label="联系方式" align="center" prop="contacts" :show-overflow-tooltip="true"/>
<el-table-column label="类型" align="center" prop="type" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.type==1">后台问题</span>
<span v-if="scope.row.type==2">APP问题</span>
</template>
</el-table-column>
<el-table-column label="问题/建议描述" align="center" prop="detail" :show-overflow-tooltip="true"/>
<el-table-column label="附件" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.fileUrl!=''" @click="checkFile(scope.row)" style="cursor: pointer;color: #46a6ff;">查看</span>
<span v-else>无附件</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog title="附件列表" :visible.sync="openFile" width="500px" append-to-body>
<div style="width: 100%;height: 240px;padding: 10px;color: #46a6ff;display: flex;flex-wrap: wrap;">
<div v-for="(item,index) in fileList" :key="index" style="margin: 10px;">
<div style="margin-bottom: 10px;"><img :src="item.url" @click="handlePictureCardPreview(item)" style="width: 60px;height: 60px;margin-right: 8px;"/></div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="openFile=false"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" width="700px">
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { getFeedbackListPageApi } from "@/api/certificateManage/index";
import base64 from 'base-64';
import { getToken } from '@/utils/auth'
import { downloadFileByUrl } from '@/utils/download'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
name: "",
dicts: ["sys_certificate_type"],
components: { Treeselect },
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
tableListData: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord:null,
},
fileList:[],
openFile:false,//
dialogVisible:false,//
dialogImageUrl:"",//
};
},
mounted(){
this.getList();
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
keyWord:null,//
}
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
let param = {
"pageNum":this.queryParams.pageNum,
"pageSize":this.queryParams.pageSize,
"keyWord":this.queryParams.keyWord,
}
console.log("param",param)
getFeedbackListPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
});
},
checkFile(row){
this.fileList=[]
if(row.fileUrl&&row.fileUrl!=''){
let arr = row.fileUrl.split(",");
arr.forEach((item,index)=>{
this.fileList.push({url:item})
})
}
this.openFile = true
},
//
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
formatDate(date) {
// YYYY-MM-DD
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 0
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
}
};
</script>
<style scoped lang="scss">
.form-title{
display: flex;
align-items: flex-end;
// width: 100%;
// height: 40px;
background: #e7f0fa;
border-left: 3px solid #46a6ff;
margin: 10px 0;
padding: 5px;
}
.form-item{
width: 100%;
font-size: 14px !important;
}
</style>

View File

@ -154,7 +154,7 @@
v-model="baseForm.verifyUsers" v-model="baseForm.verifyUsers"
:options="deptOptions" :options="deptOptions"
:normalizer="normalizer" :multiple="true" :flat="false" value-consists-of="LEAF_PRIORITY" :normalizer="normalizer" :multiple="true" :flat="false" value-consists-of="LEAF_PRIORITY"
placeholder="选择上级部门" placeholder="选择核验人员"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -325,15 +325,32 @@
}, },
// //
baseForm: { baseForm: {
verifyTitle:"",
startTime:"",
endTime:"",
verifyUsers:[],
verifyType:"1",
noticeType:"1",
}, },
// //
baseFormRules: { baseFormRules: {
checkType: [ verifyTitle: [
{ required: true, message: "核验类型不能为空", trigger: "blur" } { required: true, message: "任务标题不能为空", trigger: "change" }
], ],
processDate: [ startTime: [
{ required: true, message: "核验截至日期不能为空", trigger: "blur" } { required: true, message: "开始时间不能为空", trigger: "change" }
],
endTime: [
{ required: true, message: "结束时间不能为空", trigger: "change" }
],
verifyUsers: [
{ required: true, message: "核验人员不能为空", trigger: "change" }
],
verifyType: [
{ required: true, message: "核验类型不能为空", trigger: "change" }
],
noticeType: [
{ required: true, message: "提醒方式不能为空", trigger: "change" }
] ]
}, },
openDetail:false, openDetail:false,
@ -417,7 +434,14 @@
}, },
// //
reset() { reset() {
this.baseForm = {}; this.baseForm = {
verifyTitle:"",
startTime:"",
endTime:"",
verifyUsers:[],
verifyType:"1",
noticeType:"1",
};
this.resetForm("baseForm"); this.resetForm("baseForm");
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */

View File

@ -463,6 +463,15 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="邮箱" prop="email">
<el-input
v-model="form.email"
placeholder="请输入邮箱"
maxlength="50"
/>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
v-if="form.userId == undefined" v-if="form.userId == undefined"