jsk
This commit is contained in:
parent
be8cd0e6e7
commit
ab69ad8ef9
|
|
@ -164,6 +164,18 @@ export function getSysUserListApi(data) {
|
|||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
export function getApplyUserListApi(data) {
|
||||
return request({
|
||||
url: '/certificate/certificate_check/certificateCheck/applyUserlist',
|
||||
method: 'get',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDevicelistApi(data) {
|
||||
return request({
|
||||
url: '/certificate/certificate_returnmanage/certificateSave/devicelist',
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@
|
|||
// 是否显示弹出层
|
||||
open: false,
|
||||
checked: false,
|
||||
isCreateFlage:true,
|
||||
isCreateFlage:false,
|
||||
userNameFlage:false,
|
||||
certificateNos:[],
|
||||
userIds:[],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<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="name">
|
||||
<el-input
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
style="width: 300px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idNumber">
|
||||
<el-input
|
||||
v-model="queryParams.idNumber"
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证件类型" prop="certificateType">
|
||||
<el-select v-model="queryParams.certificateType" placeholder="证件类型" clearable style="width: 100%;">
|
||||
<el-select v-model="queryParams.certificateType" placeholder="证件类型" clearable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_certificate_type"
|
||||
:key="dict.value"
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<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-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" prop="name" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="申请人" align="center" prop="name" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="岗位" align="center" prop="postName" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="联系方式" align="center" prop="phone" :show-overflow-tooltip="true" width="150"/>
|
||||
<!-- <el-table-column label="身份证号" align="center" prop="idNumber" :show-overflow-tooltip="true" width="180"/> -->
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请状态" align="center" prop="applyState" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.applyState==-1" style="color: #FF7322;font-size: 15px;">待提交</span>
|
||||
<span v-if="scope.row.applyState==0" style="color: #FF7322;font-size: 15px;">待审核</span>
|
||||
<span v-if="scope.row.applyState==1" style="color: #FEE838;font-size: 15px;">审核中</span>
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
<span v-if="scope.row.applyState==3" style="color: #FEE838;font-size: 15px;">已退回</span>
|
||||
<span v-if="scope.row.applyState==4" style="color: #FF7322;font-size: 15px;">已执行</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button>
|
||||
|
|
@ -110,19 +110,27 @@
|
|||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
/>
|
||||
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title+''" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="120px" style="height: 650px;overflow-y: auto;">
|
||||
<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-col :span="12">
|
||||
<el-form-item label="申请人" prop="name">
|
||||
|
|
@ -139,7 +147,7 @@
|
|||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="岗位" prop="postId">
|
||||
<el-select
|
||||
v-model="baseForm.postId"
|
||||
|
|
@ -150,7 +158,7 @@
|
|||
v-for="item in postOptions"
|
||||
:key="item.postId+''"
|
||||
:label="item.postName"
|
||||
:value="item.postId+''"
|
||||
:value="item.postId+''"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -169,7 +177,7 @@
|
|||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="证件类型" prop="certificateType">
|
||||
<el-select v-model="baseForm.certificateType" placeholder="证件类型" clearable style="width: 100%;">
|
||||
<el-select v-model="baseForm.certificateType" placeholder="证件类型" clearable style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_certificate_type"
|
||||
:key="dict.value"
|
||||
|
|
@ -188,7 +196,7 @@
|
|||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
|
@ -221,7 +229,7 @@
|
|||
:action="upload.url"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:file-list="fileList"
|
||||
:file-list="fileList"
|
||||
:on-success="handleFileSuccess"
|
||||
:on-remove="handleRemove"
|
||||
:on-preview="handlePreviewDownloadFile"
|
||||
|
|
@ -275,7 +283,7 @@
|
|||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="手机号码" prop="phone">
|
||||
<el-input style="width: 100%;background-color:#DAE1EE;" v-model="baseForm2.phone" readonly="true" maxlength="30" clearable/>
|
||||
<el-input style="width: 100%;background-color:#DAE1EE;" v-model="baseForm2.phone" readonly maxlength="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -284,7 +292,7 @@
|
|||
<el-button type="primary" @click="submitForm2">确 定</el-button>
|
||||
<el-button @click="cancel2">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="查看附件" :visible.sync="openFile" width="400px" append-to-body>
|
||||
<div style="width: 100%;padding: 10px;color: #46a6ff;">
|
||||
|
|
@ -292,17 +300,17 @@
|
|||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="openFile=false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUser } from '@/api/system/user'
|
||||
import { getCertificateApplyListPageApi,addCertificateApplyApi, editCertificateApplyApi,
|
||||
delCertificateApplyApi,getSysUserListApi,addCertificateCheckApi } from "@/api/certificateManage/index";
|
||||
delCertificateApplyApi,getSysUserListApi,getApplyUserListApi,addCertificateCheckApi } from "@/api/certificateManage/index";
|
||||
import base64 from 'base-64';
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { downloadFileByUrl } from '@/utils/download'
|
||||
|
|
@ -348,23 +356,24 @@
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
idNumber:null,//身份证号
|
||||
name:null,//姓名
|
||||
name:null,//姓名
|
||||
},
|
||||
activeName:"baseSetting",
|
||||
deviceData:{},
|
||||
// 岗位选项
|
||||
postOptions: [],
|
||||
// 表单参数
|
||||
postOptions: [],
|
||||
// 表单参数
|
||||
baseForm: {
|
||||
userId:"",
|
||||
postId:"",
|
||||
phone:"",
|
||||
certificateType:"",
|
||||
applyReason:"",
|
||||
applyDetail:"",
|
||||
startTime:"",
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
applyDetail:"",
|
||||
startTime:"",
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
applyType:"1",
|
||||
dateRange:[]
|
||||
},
|
||||
isView:false,
|
||||
|
|
@ -383,10 +392,10 @@
|
|||
phone: [
|
||||
{ required: true, message: "手机号码不能为空", trigger: "change" },
|
||||
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'change' }
|
||||
],
|
||||
],
|
||||
postId: [
|
||||
{ required: true, message: "岗位不能为空", trigger: "change" },
|
||||
],
|
||||
{ required: true, message: "岗位不能为空", trigger: "change" },
|
||||
],
|
||||
certificateType: [
|
||||
{ required: true, message: "证件类型不能为空", trigger: "change" }
|
||||
],
|
||||
|
|
@ -399,8 +408,8 @@
|
|||
dateRange: [
|
||||
{ required: true, message: "预计使用时间不能为空", trigger: "change" }
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
//导入参数
|
||||
upload: {
|
||||
// 是否禁用上传
|
||||
|
|
@ -418,13 +427,13 @@
|
|||
},
|
||||
mounted(){
|
||||
this.getPostList();
|
||||
this.getList();
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
getPostList(){
|
||||
getUser().then((response) => {
|
||||
this.postOptions = response.posts
|
||||
this.postOptions = response.posts
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -450,7 +459,7 @@
|
|||
}
|
||||
getCertificateApplyListPageApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
|
||||
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
@ -466,20 +475,20 @@
|
|||
phone:"",
|
||||
certificateType:"",
|
||||
applyReason:"",
|
||||
applyDetail:"",
|
||||
startTime:"",
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
applyDetail:"",
|
||||
startTime:"",
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
dateRange:[]
|
||||
};
|
||||
};
|
||||
this.resetForm("baseForm");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.isReadOnly=false;
|
||||
this.title = "新增";
|
||||
this.title = "新增";
|
||||
console.log("this.baseForm",this.baseForm);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
|
|
@ -487,7 +496,7 @@
|
|||
this.reset();
|
||||
this.open = true;
|
||||
this.isReadOnly=true;
|
||||
this.baseForm = Object.assign({}, row)
|
||||
this.baseForm = Object.assign({}, row)
|
||||
this.baseForm.dateRange = [row.startTime,row.endTime]
|
||||
if(row.fileUrl&&row.fileUrl!=''){
|
||||
let arr = row.fileUrl.split(",");
|
||||
|
|
@ -504,7 +513,7 @@
|
|||
}
|
||||
his.isView = false
|
||||
this.title = "修改";
|
||||
},
|
||||
},
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
|
|
@ -544,8 +553,8 @@
|
|||
this.baseForm.endTime = ""
|
||||
}
|
||||
//applyState -1 仅保存不提交 0保存提交
|
||||
this.baseForm.applyState = type;
|
||||
//fileUrls 附件 数组
|
||||
this.baseForm.applyState = type;
|
||||
//fileUrls 附件 数组
|
||||
this.baseForm.fileUrls = this.fileUrls
|
||||
this.baseForm.fileNames = this.fileNames
|
||||
console.log("this.baseForm",this.baseForm);
|
||||
|
|
@ -572,10 +581,21 @@
|
|||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
handleRadioChange(val){
|
||||
// const param={"applyType":val}
|
||||
// getApplyUserListApi(param).then(response => {
|
||||
// console.log("response",response);
|
||||
// this.allUserList=response;
|
||||
// this.$set(this.baseForm2,"userId",this.baseForm.userId)
|
||||
// this.$set(this.baseForm2,"phone",this.baseForm.phone)
|
||||
// });
|
||||
},
|
||||
//选择人员
|
||||
handleSelect(){
|
||||
this.openSelectUser = true;
|
||||
getSysUserListApi({}).then(response => {
|
||||
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)
|
||||
|
|
@ -608,7 +628,7 @@
|
|||
this.openSelectUser = false;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除数据项?').then(() => {
|
||||
delCertificateApplyApi({checkId:row.checkId}).then(response => {
|
||||
console.log("delCertificateApplyApi",response);
|
||||
|
|
@ -626,9 +646,9 @@
|
|||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.isUploading = false;
|
||||
if(response.code==200){
|
||||
this.fileUrls.push(response.data.url)
|
||||
this.fileUrls.push(response.data.url)
|
||||
this.fileNames.push(response.data.name)
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
this.$modal.msgSuccess(response.msg);
|
||||
}else{
|
||||
this.$modal.msgError(response.msg);
|
||||
}
|
||||
|
|
@ -643,7 +663,7 @@
|
|||
this.fileUrls.splice(sum, 1)
|
||||
this.fileNames.splice(sum, 1)
|
||||
},
|
||||
async handlePreviewDownloadFile(file) {
|
||||
async handlePreviewDownloadFile(file) {
|
||||
if (file.url != null && file.url !== '') {
|
||||
let downloadUrl = file.url;
|
||||
try {
|
||||
|
|
@ -663,17 +683,17 @@
|
|||
console.error(error);
|
||||
}
|
||||
}
|
||||
if (file.raw != null && file.raw !== '') {
|
||||
if (file.raw != null && file.raw !== '') {
|
||||
const blob = file.raw; // 将文件内容转换为 Blob 对象
|
||||
const link = document.createElement('a');
|
||||
link.href = URL.createObjectURL(blob); // 创建一个 URL 对象
|
||||
link.download = file.name; // 指定下载的文件名
|
||||
document.body.appendChild(link); // 将链接添加到 DOM 中
|
||||
link.click(); // 触发下载
|
||||
document.body.removeChild(link); // 下载后移除 <a> 元素
|
||||
document.body.removeChild(link); // 下载后移除 <a> 元素
|
||||
}
|
||||
},
|
||||
checkFile(row){
|
||||
checkFile(row){
|
||||
this.fileList=[]
|
||||
this.fileUrls=[]
|
||||
this.fileNames = []
|
||||
|
|
@ -700,7 +720,7 @@
|
|||
// this.single = selection.length !== 1
|
||||
// this.multiple = !selection.length
|
||||
},
|
||||
formatDate(date) {
|
||||
formatDate(date) {
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="功能接口" prop="funImp">
|
||||
<el-input v-model="baseForm.funImp" placeholder="请输入功能接口" maxlength="30" clearable/>
|
||||
<el-input v-model="baseForm.funImp" placeholder="http://xxx.xxx.xxx:8088/externaltask/accessfunction" maxlength="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -254,7 +254,8 @@
|
|||
deviceAddr:"",
|
||||
deviceMac:"",
|
||||
deviceGateway:"",
|
||||
devicePwd:""
|
||||
devicePwd:"",
|
||||
funImp:"http://xxx.xxx.xxx:8088/externaltask/accessfunction"
|
||||
},
|
||||
// 表单校验
|
||||
baseFormRules: {
|
||||
|
|
@ -377,7 +378,8 @@
|
|||
deviceAddr:"",
|
||||
deviceMac:"",
|
||||
deviceGateway:"",
|
||||
devicePwd:""
|
||||
devicePwd:"",
|
||||
funImp:"http://xxx.xxx.xxx:8088/externaltask/accessfunction"
|
||||
};
|
||||
this.resetForm("baseForm");
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue