|
@@ -25,11 +25,11 @@
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="major" label-width="90px">
|
|
<el-form-item label="" prop="major" label-width="90px">
|
|
- <el-select v-model="queryParams.userMajorId" filterable placeholder="请选择专业">
|
|
|
|
|
|
+ <el-select v-model="queryParams.userMajorId" filterable placeholder="请选择专业">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in majorList"
|
|
v-for="item in majorList"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
- :label="item.majorName"
|
|
|
|
|
|
+ :label="item.name"
|
|
:value="item.id">
|
|
:value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -41,23 +41,23 @@
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<div class="page-content-box">
|
|
<div class="page-content-box">
|
|
- <el-table class="table-box" v-loading="loading" border :data="approvalList" @selection-change="handleSelectionChange">
|
|
|
|
|
|
+ <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
|
|
|
|
|
|
- <el-table-column label="申请人" align="left" prop="userName" />
|
|
|
|
|
|
+ <el-table-column label="申请人" align="left" prop="userName"/>
|
|
<el-table-column label="申请人身份" align="left" prop="userType">
|
|
<el-table-column label="申请人身份" align="left" prop="userType">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.userType == '11' ? '教职工':(scope.row.userType == '22' ? '学生':'')}}
|
|
|
|
|
|
+ {{scope.row.userType == '1' ? '教职工':(scope.row.userType == '2' ? '学生':'')}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="申请实验室" align="left" prop="subjectName" />
|
|
|
|
- <el-table-column label="申请时间" align="left" prop="creatTime" >
|
|
|
|
|
|
+ <el-table-column label="申请实验室" align="left" prop="subName"/>
|
|
|
|
+ <el-table-column label="申请时间" align="left" prop="creatTime">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.creatTime}} {{scope.row.hi}}
|
|
|
|
|
|
+ <span>{{parseTime(scope.row.creatTime,'{y}-{m}-{d} {h}:{i}')}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="有效期" align="left" prop="validBeginTime">
|
|
<el-table-column label="有效期" align="left" prop="validBeginTime">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{scope.row.validBeginTime}}至{{scope.row.validEndTime}}
|
|
|
|
|
|
+ <span>{{parseTime(scope.row.validBeginTime,'{y}-{m}-{d} {h}:{i}')}} 至 {{parseTime(scope.row.validEndTime,'{y}-{m}-{d} {h}:{i}')}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
|
@@ -65,7 +65,6 @@
|
|
<div class="table-button-box">
|
|
<div class="table-button-box">
|
|
<p class="table-button-null"></p>
|
|
<p class="table-button-null"></p>
|
|
<p class="table-button-p"
|
|
<p class="table-button-p"
|
|
- v-hasPermiRouter="['laboratory:apply:query']"
|
|
|
|
@click="goInfoPage(scope.row)">查看</p>
|
|
@click="goInfoPage(scope.row)">查看</p>
|
|
<p class="table-button-null"></p>
|
|
<p class="table-button-null"></p>
|
|
</div>
|
|
</div>
|
|
@@ -97,22 +96,22 @@
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form-item label="关联用户表id" prop="joinUserId">
|
|
<el-form-item label="关联用户表id" prop="joinUserId">
|
|
- <el-input v-model="form.joinUserId" placeholder="请输入关联用户表id" />
|
|
|
|
|
|
+ <el-input v-model="form.joinUserId" placeholder="请输入关联用户表id"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="审批内容">
|
|
<el-form-item label="审批内容">
|
|
<editor v-model="form.recordContent" :min-height="192"/>
|
|
<editor v-model="form.recordContent" :min-height="192"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="部门id" prop="deptId">
|
|
<el-form-item label="部门id" prop="deptId">
|
|
- <el-input v-model="form.deptId" placeholder="请输入部门id" />
|
|
|
|
|
|
+ <el-input v-model="form.deptId" placeholder="请输入部门id"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="部门名称" prop="deptName">
|
|
<el-form-item label="部门名称" prop="deptName">
|
|
- <el-input v-model="form.deptName" placeholder="请输入部门名称" />
|
|
|
|
|
|
+ <el-input v-model="form.deptName" placeholder="请输入部门名称"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="创建人" prop="userId">
|
|
<el-form-item label="创建人" prop="userId">
|
|
- <el-input v-model="form.userId" placeholder="请输入创建人" />
|
|
|
|
|
|
+ <el-input v-model="form.userId" placeholder="请输入创建人"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="备注" prop="remark">
|
|
<el-form-item label="备注" prop="remark">
|
|
- <el-input v-model="form.remark" placeholder="请输入备注" />
|
|
|
|
|
|
+ <el-input v-model="form.remark" placeholder="请输入备注"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer dialog-footer-box">
|
|
<div slot="footer" class="dialog-footer dialog-footer-box">
|
|
@@ -125,20 +124,23 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- listApproval,
|
|
|
|
- getApproval,
|
|
|
|
- delApproval,
|
|
|
|
- addApproval,
|
|
|
|
- updateApproval,
|
|
|
|
- applyApproval,
|
|
|
|
- applyList,
|
|
|
|
- majorListPower,
|
|
|
|
- listMajorAll
|
|
|
|
-} from "@/api/secureAccess/index";
|
|
|
|
|
|
+ import {
|
|
|
|
+ listApproval,
|
|
|
|
+ getApproval,
|
|
|
|
+ delApproval,
|
|
|
|
+ addApproval,
|
|
|
|
+ updateApproval,
|
|
|
|
+ applyApproval,
|
|
|
|
+ applyList,
|
|
|
|
+ majorListPower,
|
|
|
|
+ listMajorAll
|
|
|
|
+ } from '@/api/secureAccess/index'
|
|
|
|
+ // V3
|
|
|
|
+ import { systemUserMajorSelect } from '@/api/commonality/permission'
|
|
|
|
+ import { laboratoryApplyList } from '@/api/secureAccess/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
- name: "passed",
|
|
|
|
|
|
+ name: 'passed',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -154,105 +156,96 @@ import {
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
// 审批记录表格数据
|
|
// 审批记录表格数据
|
|
- approvalList: [],
|
|
|
|
|
|
+ dataList: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
- title: "",
|
|
|
|
|
|
+ title: '',
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
- dateRange:[],
|
|
|
|
- majorList:[],//专业
|
|
|
|
|
|
+ dateRange: [],
|
|
|
|
+ majorList: [],//专业
|
|
|
|
|
|
recordContents: [
|
|
recordContents: [
|
|
{
|
|
{
|
|
type: 0,
|
|
type: 0,
|
|
- value: "未通过",
|
|
|
|
|
|
+ value: '未通过'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 1,
|
|
type: 1,
|
|
- value: "已办理",
|
|
|
|
|
|
+ value: '已办理'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 2,
|
|
type: 2,
|
|
- value: "待审核",
|
|
|
|
|
|
+ value: '待审核'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 3,
|
|
type: 3,
|
|
- value: "即将过期",
|
|
|
|
|
|
+ value: '即将过期'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 4,
|
|
type: 4,
|
|
- value: "已过期",
|
|
|
|
- },
|
|
|
|
|
|
+ value: '已过期'
|
|
|
|
+ }
|
|
],
|
|
],
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
- subjectName:'',//实验室
|
|
|
|
- userMajorId:'',//专业
|
|
|
|
- beginTime:'',
|
|
|
|
- endTime:'',
|
|
|
|
|
|
+ subjectName: '',//实验室
|
|
|
|
+ userMajorId: '',//专业
|
|
|
|
+ beginTime: '',
|
|
|
|
+ endTime: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
- pageSize:20,
|
|
|
|
|
|
+ pageSize: 20,
|
|
joinUserId: null,
|
|
joinUserId: null,
|
|
recordContent: null,
|
|
recordContent: null,
|
|
deptId: null,
|
|
deptId: null,
|
|
deptName: null,
|
|
deptName: null,
|
|
- userId: null,
|
|
|
|
|
|
+ userId: null
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
- rules: {
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
+ rules: {}
|
|
|
|
+ }
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
},
|
|
},
|
|
- mounted(){
|
|
|
|
- this.getList();
|
|
|
|
- this.getMajorList();
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.getList()
|
|
|
|
+ this.systemUserMajorSelect()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- goInfoPage(row){
|
|
|
|
- this.$parent.pageClick(1,row);
|
|
|
|
|
|
+ goInfoPage(row) {
|
|
|
|
+ this.$parent.pageClick(1, row)
|
|
},
|
|
},
|
|
/**查询专业*/
|
|
/**查询专业*/
|
|
- getMajorList() {
|
|
|
|
- let _this=this;
|
|
|
|
- this.majorList=[];
|
|
|
|
- majorListPower().then(response => {
|
|
|
|
- for(let i=0;i<response.rows.length;i++){
|
|
|
|
- if(response.rows[i].majorName!=null && response.rows[i].majorName!='' ){
|
|
|
|
- _this.majorList.push(response.rows[i])
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- });
|
|
|
|
|
|
+ systemUserMajorSelect() {
|
|
|
|
+ systemUserMajorSelect({ type: 1 }).then(response => {
|
|
|
|
+ this.$set(this, 'majorList', response.data)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 查询审批记录列表 */
|
|
/** 查询审批记录列表 */
|
|
getList() {
|
|
getList() {
|
|
- this.loading = true;
|
|
|
|
- if(this.dateRange&&this.dateRange.length>0)
|
|
|
|
- {
|
|
|
|
- this.queryParams.beginTime=this.dateRange[0]
|
|
|
|
- this.queryParams.endTime=this.dateRange[1]
|
|
|
|
|
|
+ this.loading = true
|
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.queryParams));
|
|
|
|
+ if (this.dateRange && this.dateRange.length > 0) {
|
|
|
|
+ obj.startTime = this.dateRange[0] + 'T00:00:00'
|
|
|
|
+ obj.endTime = this.dateRange[1] + 'T23:59:59'
|
|
}
|
|
}
|
|
- else
|
|
|
|
- {
|
|
|
|
- this.queryParams.beginTime=null;
|
|
|
|
- this.queryParams.endTime=null
|
|
|
|
|
|
+ else {
|
|
|
|
+ obj.startTime = null
|
|
|
|
+ obj.endTime = null
|
|
}
|
|
}
|
|
- this.queryParams.auditStatus = 2
|
|
|
|
- applyList(this.queryParams).then(response => {
|
|
|
|
- this.approvalList = response.rows;
|
|
|
|
- this.total = response.total;
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ obj.auditStatus = 2
|
|
|
|
+ laboratoryApplyList(obj).then(response => {
|
|
|
|
+ this.$set(this, 'dataList', response.data.records)
|
|
|
|
+ this.$set(this, 'total', response.data.total)
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
- this.open = false;
|
|
|
|
- this.reset();
|
|
|
|
|
|
+ this.open = false
|
|
|
|
+ this.reset()
|
|
},
|
|
},
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
@@ -268,113 +261,114 @@ import {
|
|
updateBy: null,
|
|
updateBy: null,
|
|
updateTime: null,
|
|
updateTime: null,
|
|
remark: null
|
|
remark: null
|
|
- };
|
|
|
|
- this.resetForm("form");
|
|
|
|
|
|
+ }
|
|
|
|
+ this.resetForm('form')
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
- this.queryParams.pageNum = 1;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.queryParams.pageNum = 1
|
|
|
|
+ this.getList()
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
- this.$set(this,'queryParams',{
|
|
|
|
- pageNum:1,
|
|
|
|
- searchValue:"",
|
|
|
|
- userMajorId:""
|
|
|
|
|
|
+ this.$set(this, 'queryParams', {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ searchValue: '',
|
|
|
|
+ userMajorId: ''
|
|
})
|
|
})
|
|
- this.dateRange=[];
|
|
|
|
- this.handleQuery();
|
|
|
|
|
|
+ this.dateRange = []
|
|
|
|
+ this.handleQuery()
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|
|
- this.single = selection.length!==1
|
|
|
|
|
|
+ this.single = selection.length !== 1
|
|
this.multiple = !selection.length
|
|
this.multiple = !selection.length
|
|
},
|
|
},
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
- this.reset();
|
|
|
|
- this.open = true;
|
|
|
|
- this.title = "添加审批记录";
|
|
|
|
|
|
+ this.reset()
|
|
|
|
+ this.open = true
|
|
|
|
+ this.title = '添加审批记录'
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
- this.reset();
|
|
|
|
|
|
+ this.reset()
|
|
const id = row.id || this.ids
|
|
const id = row.id || this.ids
|
|
getApproval(id).then(response => {
|
|
getApproval(id).then(response => {
|
|
- this.form = response.data;
|
|
|
|
- this.open = true;
|
|
|
|
- this.title = "修改审批记录";
|
|
|
|
- });
|
|
|
|
|
|
+ this.form = response.data
|
|
|
|
+ this.open = true
|
|
|
|
+ this.title = '修改审批记录'
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
- this.$refs["form"].validate(valid => {
|
|
|
|
|
|
+ this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
updateApproval(this.form).then(response => {
|
|
updateApproval(this.form).then(response => {
|
|
- this.msgSuccess("修改成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
|
|
+ this.msgSuccess('修改成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
addApproval(this.form).then(response => {
|
|
addApproval(this.form).then(response => {
|
|
- this.msgSuccess("新增成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
|
|
+ this.msgSuccess('新增成功')
|
|
|
|
+ this.open = false
|
|
|
|
+ this.getList()
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
- const ids = row.id || this.ids;
|
|
|
|
- this.$confirm('是否确认删除审批记录?', "警告", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
|
|
+ const ids = row.id || this.ids
|
|
|
|
+ this.$confirm('是否确认删除审批记录?', '警告', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
}).then(function() {
|
|
}).then(function() {
|
|
- return delApproval(ids);
|
|
|
|
|
|
+ return delApproval(ids)
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.getList();
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
+ this.getList()
|
|
|
|
+ this.msgSuccess('删除成功')
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ })
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
- let date = new Date();
|
|
|
|
- let monthStr = (date .getMonth()+1);
|
|
|
|
- let dateStr = date.getDate();
|
|
|
|
- let hoursStr = date.getHours();
|
|
|
|
- if(monthStr<10){
|
|
|
|
- monthStr = '0'+monthStr
|
|
|
|
|
|
+ let date = new Date()
|
|
|
|
+ let monthStr = (date.getMonth() + 1)
|
|
|
|
+ let dateStr = date.getDate()
|
|
|
|
+ let hoursStr = date.getHours()
|
|
|
|
+ if (monthStr < 10) {
|
|
|
|
+ monthStr = '0' + monthStr
|
|
}
|
|
}
|
|
- if(dateStr<10){
|
|
|
|
- dateStr = '0'+dateStr
|
|
|
|
|
|
+ if (dateStr < 10) {
|
|
|
|
+ dateStr = '0' + dateStr
|
|
}
|
|
}
|
|
- if(hoursStr<10){
|
|
|
|
- hoursStr = '0'+hoursStr
|
|
|
|
|
|
+ if (hoursStr < 10) {
|
|
|
|
+ hoursStr = '0' + hoursStr
|
|
}
|
|
}
|
|
- let newDateStr = date .getFullYear()+''+monthStr+''+dateStr+''+hoursStr;
|
|
|
|
|
|
+ let newDateStr = date.getFullYear() + '' + monthStr + '' + dateStr + '' + hoursStr
|
|
this.download('laboratory/apply/export', {
|
|
this.download('laboratory/apply/export', {
|
|
...this.queryParams
|
|
...this.queryParams
|
|
- }, '准入资格'+newDateStr+'.xlsx')
|
|
|
|
|
|
+ }, '准入资格' + newDateStr + '.xlsx')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- };
|
|
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.passed {
|
|
.passed {
|
|
- flex:1;
|
|
|
|
- display: flex!important;
|
|
|
|
|
|
+ flex: 1;
|
|
|
|
+ display: flex !important;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- .page-form-title-box{
|
|
|
|
- border:none;
|
|
|
|
|
|
+ .page-form-title-box {
|
|
|
|
+ border: none;
|
|
}
|
|
}
|
|
- .page-content-box{
|
|
|
|
- padding-top:0;
|
|
|
|
|
|
+ .page-content-box {
|
|
|
|
+ padding-top: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|