Merge branch 'driver'
This commit is contained in:
commit
6c424871ef
@ -244,6 +244,12 @@ export const DICT_TYPE = {
|
|||||||
INS_EQU_TYPE: 'ins_equ_type',
|
INS_EQU_TYPE: 'ins_equ_type',
|
||||||
INS_NOTICE_SERVER: 'jiance',
|
INS_NOTICE_SERVER: 'jiance',
|
||||||
|
|
||||||
|
|
||||||
|
// 救援设备字典
|
||||||
|
RESCUE_EQU_TYPE: 'rescue_equ_type',
|
||||||
|
// 维修设备字典
|
||||||
|
REPAIR_EQU_TYPE: 'repair_equ_type',
|
||||||
|
|
||||||
// ----------驾校相关------------
|
// ----------驾校相关------------
|
||||||
//人员类型
|
//人员类型
|
||||||
DRIVE_TYPE: 'drive_type',
|
DRIVE_TYPE: 'drive_type',
|
||||||
|
|||||||
64
src/views/base/device/api/device.js
Normal file
64
src/views/base/device/api/device.js
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询equInfo列表
|
||||||
|
export function listEquInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询equInfo详细
|
||||||
|
export function getEquInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增equInfo
|
||||||
|
export function addEquInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改equInfo
|
||||||
|
export function updateEquInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改equInfo
|
||||||
|
export function importTemplate() {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/importTemplate',
|
||||||
|
method: 'post',
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除equInfo
|
||||||
|
export function delEquInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除equInfo
|
||||||
|
export function addFolder(id, servicePackageId, defaultKey) {
|
||||||
|
return request({
|
||||||
|
url: '/system/equInfo/addDeviceFolder',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
id,
|
||||||
|
servicePackageId,
|
||||||
|
defaultKey
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
589
src/views/base/device/device.vue
Normal file
589
src/views/base/device/device.vue
Normal file
@ -0,0 +1,589 @@
|
|||||||
|
<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="equName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.equName"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备型号" prop="equModel">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.equModel"
|
||||||
|
placeholder="请输入设备型号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编号" prop="equNumber">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.equNumber"
|
||||||
|
placeholder="请输入设备编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type">
|
||||||
|
<el-option v-for="item in this.dictDatas" :key="item.value" :value="item.value"
|
||||||
|
:label="item.label"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检定时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="daterangeNextCheckTime"
|
||||||
|
style="width: 240px"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</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">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
|
||||||
|
>新增
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport"
|
||||||
|
v-hasPermi="['system:user:import']">导入
|
||||||
|
</el-button>
|
||||||
|
</el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
>导出
|
||||||
|
</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="equInfoList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center"/>
|
||||||
|
<!-- 1-->
|
||||||
|
<el-table-column label="设备名称" align="center" prop="equName"/>
|
||||||
|
<el-table-column label="设备型号" align="center" prop="equModel"/>
|
||||||
|
<el-table-column label="设备编号" align="center" prop="equNumber"/>
|
||||||
|
<el-table-column label="设备类别" align="center" prop="type">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- <DictTag :type="DICT_TYPE.INS_EQU_TYPE" :value="scope.row.type"/>-->
|
||||||
|
<DictTag :type="currentDictType" :value="scope.row.type"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="校准日期" align="center" prop="equZq"/>
|
||||||
|
<el-table-column label="有效期" align="center" prop="validTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.validTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="校准单位" align="center" prop="lastUnit"/>
|
||||||
|
<el-table-column label="证书编号" align="center" prop="certificateNumber"/>
|
||||||
|
<el-table-column label="制造商" align="center" prop="manufacturer"/>
|
||||||
|
<el-table-column label="电话" align="center" prop="mobile"/>
|
||||||
|
<el-table-column label="邮编" align="center" prop="postcode"/>
|
||||||
|
<el-table-column label="地址" align="center" prop="address"/>
|
||||||
|
<el-table-column label="邮箱" align="center" prop="email"/>
|
||||||
|
<el-table-column label="复校日期" align="center" prop="nextCheckTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.nextCheckTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column label="" align="center" prop="createTime" width="180">-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
|
||||||
|
>修改
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
|
||||||
|
>删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改equInfo对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
|
<el-form-item label="设备名称" prop="equName">
|
||||||
|
<el-input v-model="form.equName" placeholder="请输入设备名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备型号" prop="equModel">
|
||||||
|
<el-input v-model="form.equModel" placeholder="请输入设备型号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备编号" prop="equNumber">
|
||||||
|
<el-input v-model="form.equNumber" placeholder="请输入设备编号"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备类型" prop="type">
|
||||||
|
<el-select v-model="form.type" placeholder="请选择类别">
|
||||||
|
<el-option v-for="item in this.dictDatas" :key="item.value" :value="item.value"
|
||||||
|
:label="item.label"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备检定周期" prop="equZq">
|
||||||
|
<el-input v-model="form.equZq" placeholder="请输入设备检定周期"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="有效期" prop="validTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.validTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择有效期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上次检定单位" prop="lastUnit">
|
||||||
|
<el-input v-model="form.lastUnit" placeholder="请输入上次检定单位"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下次检定时间" prop="nextCheckTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.nextCheckTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择下次检定时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="查看附件" v-if="this.form.id">
|
||||||
|
<div @click="lookFile" style="color: #1b6ef3; cursor: pointer">点击查看附件</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 设备导入对话框 -->
|
||||||
|
<el-dialog :title="upload.title" :visible.sync="upload.open" append-to-body>
|
||||||
|
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
|
||||||
|
:action="upload.url" :disabled="upload.isUploading"
|
||||||
|
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
|
<div class="el-upload__tip" slot="tip">
|
||||||
|
<el-checkbox v-model="upload.updateSupport"/>
|
||||||
|
是否更新已经存在的设备数据
|
||||||
|
</div>
|
||||||
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||||
|
@click="importTemplate">下载模板
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
<el-table
|
||||||
|
v-if="isFail"
|
||||||
|
:data="failList"
|
||||||
|
stripe
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="equName"
|
||||||
|
label="设备名称"
|
||||||
|
width="180">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="reason"
|
||||||
|
label="失败原因">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="type"
|
||||||
|
label="设备类型">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equModel"
|
||||||
|
label="型号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="equNumber"
|
||||||
|
label="出厂编号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="validTime"
|
||||||
|
label="校准日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="nextCheckTime"
|
||||||
|
label="复校日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="certificateNumber"
|
||||||
|
label="证书编号">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="manufacturer"
|
||||||
|
label="制造商">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="lastUnit"
|
||||||
|
label="校准单位">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="mobile"
|
||||||
|
label="电话">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="address"
|
||||||
|
label="地址">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="postcode"
|
||||||
|
label="邮编">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="email"
|
||||||
|
label="邮箱">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listEquInfo, getEquInfo, delEquInfo, addEquInfo, updateEquInfo, importTemplate, addFolder} from "./api/device";
|
||||||
|
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||||
|
import {getBaseHeader} from "@/utils/request";
|
||||||
|
import { getLastPathSegment } from '@/utils/ruoyi'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "EquInfo",
|
||||||
|
computed: {
|
||||||
|
DICT_TYPE() {
|
||||||
|
return DICT_TYPE
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isFail:false,
|
||||||
|
failList: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// equInfo表格数据
|
||||||
|
equInfoList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 下次检定时间时间范围
|
||||||
|
daterangeNextCheckTime: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
equName: null,
|
||||||
|
equModel: null,
|
||||||
|
equNumber: null,
|
||||||
|
nextCheckTime: null,
|
||||||
|
type: null,
|
||||||
|
servicePackageId: null,
|
||||||
|
defaultKey: null,
|
||||||
|
},
|
||||||
|
// 设备导入参数
|
||||||
|
upload: {
|
||||||
|
// 是否显示弹出层(设备导入)
|
||||||
|
open: false,
|
||||||
|
// 弹出层标题(设备导入)
|
||||||
|
title: "",
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 是否更新已经存在的设备数据
|
||||||
|
updateSupport: 0,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: getBaseHeader(),
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + '/admin-api/system/equInfo/importEquipment'
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {},
|
||||||
|
deviceId:null,
|
||||||
|
dictDatas: [],
|
||||||
|
currentDictType: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const servicePackageId = getLastPathSegment(this.$route.path); // 默认为最后一段
|
||||||
|
console.log('服务套餐', servicePackageId)
|
||||||
|
this.queryParams.servicePackageId = servicePackageId;
|
||||||
|
switch (servicePackageId) {
|
||||||
|
case 'jiance':
|
||||||
|
this.queryParams.dictType = 'ins_report_role';
|
||||||
|
break;
|
||||||
|
case 'jiaxiao':
|
||||||
|
this.queryParams.dictType = 'drive_file_role';
|
||||||
|
break;
|
||||||
|
case 'weixiu':
|
||||||
|
this.queryParams.dictType = 'repair_file_role';
|
||||||
|
this.queryParams.defaultKey = 'wx_equipment';
|
||||||
|
this.dictDatas = getDictDatas(DICT_TYPE.REPAIR_EQU_TYPE);
|
||||||
|
this.currentDictType = DICT_TYPE.REPAIR_EQU_TYPE;
|
||||||
|
break;
|
||||||
|
case 'jiuyuan':
|
||||||
|
this.queryParams.dictType = 'repair_report_role';
|
||||||
|
this.queryParams.defaultKey = 'jy_equipment';
|
||||||
|
this.dictDatas = getDictDatas(DICT_TYPE.RESCUE_EQU_TYPE);
|
||||||
|
this.currentDictType = DICT_TYPE.RESCUE_EQU_TYPE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.queryParams.fatherId = this.$route.query.folderId || null // 明确初始状态
|
||||||
|
|
||||||
|
this.fatherId = this.queryParams.fatherId
|
||||||
|
this.getList()
|
||||||
|
// this.queryTreeFolder()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询equInfo列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
if (null != this.daterangeNextCheckTime && '' != this.daterangeNextCheckTime) {
|
||||||
|
this.queryParams.params["beginNextCheckTime"] = this.daterangeNextCheckTime[0];
|
||||||
|
this.queryParams.params["endNextCheckTime"] = this.daterangeNextCheckTime[1];
|
||||||
|
}
|
||||||
|
listEquInfo(this.queryParams).then(response => {
|
||||||
|
this.equInfoList = response.data.records;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/* lookFile(){
|
||||||
|
if (!this.form.folderId) {
|
||||||
|
addFolder(this.form.id, this.queryParams.servicePackageId,this.queryParams.defaultKey).then(response => {
|
||||||
|
this.form.folderId = response.data
|
||||||
|
if(this.queryParams.servicePackageId == 'jiuyuan'){
|
||||||
|
this.$router.push({path: '/rescue/manage/file/jiuyuan', query: {"folderId": this.form.folderId}})
|
||||||
|
}else if(this.queryParams.servicePackageId == 'weixiu'){
|
||||||
|
this.$router.push({path: '/repair/manage/file/weixiu', query: {"folderId": this.form.folderId}})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
if(this.queryParams.servicePackageId == 'jiuyuan'){
|
||||||
|
this.$router.push({path: '/rescue/manage/file/jiuyuan', query: {"folderId": this.form.folderId}})
|
||||||
|
}else if(this.queryParams.servicePackageId == 'weixiu'){
|
||||||
|
this.$router.push({path: '/repair/manage/file/weixiu', query: {"folderId": this.form.folderId}})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, */
|
||||||
|
|
||||||
|
lookFile() {
|
||||||
|
// 路由映射
|
||||||
|
const routeMap = {
|
||||||
|
jiuyuan: '/rescue/manage/file/jiuyuan',
|
||||||
|
weixiu: '/repair/manage/file/weixiu'
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取对应的路由路径
|
||||||
|
const getRoutePath = () => routeMap[this.queryParams.servicePackageId] || routeMap.jiuyuan;
|
||||||
|
|
||||||
|
// 路由跳转
|
||||||
|
const navigate = () => {
|
||||||
|
this.$router.push({
|
||||||
|
path: getRoutePath(),
|
||||||
|
query: { folderId: this.form.folderId }
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 判断是否有folderId,没有则创建,有则直接跳转
|
||||||
|
if (!this.form.folderId) {
|
||||||
|
addFolder(this.form.id, this.queryParams.servicePackageId, this.queryParams.defaultKey)
|
||||||
|
.then(response => {
|
||||||
|
this.form.folderId = response.data;
|
||||||
|
navigate();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
navigate();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 导入按钮操作 */
|
||||||
|
handleImport() {
|
||||||
|
this.upload.title = "设备导入";
|
||||||
|
this.upload.open = true;
|
||||||
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
if (response.code !== 0) {
|
||||||
|
this.$modal.msgError(response.msg)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// this.upload.open = false;
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.$refs.upload.clearFiles();
|
||||||
|
if (response.data.failList.length > 0) {
|
||||||
|
this.isFail = true
|
||||||
|
this.$set(this, 'failList', response.data.failList); // 确保响应式
|
||||||
|
console.log(this.failList)
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 下载模板操作 */
|
||||||
|
importTemplate() {
|
||||||
|
importTemplate().then(response => {
|
||||||
|
this.$download.excel(response, '设备导入模板.xls');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
partnerId: null,
|
||||||
|
equName: null,
|
||||||
|
equModel: null,
|
||||||
|
equNumber: null,
|
||||||
|
equZq: null,
|
||||||
|
validTime: null,
|
||||||
|
lastUnit: null,
|
||||||
|
nextCheckTime: null,
|
||||||
|
createTime: null,
|
||||||
|
createBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
type: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.daterangeNextCheckTime = [];
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
this.deviceId= row.id
|
||||||
|
getEquInfo(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateEquInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.form.servicePackageId = this.queryParams.servicePackageId
|
||||||
|
addEquInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 提交上传文件
|
||||||
|
submitFileForm() {
|
||||||
|
this.$refs.upload.submit();
|
||||||
|
this.failList = []
|
||||||
|
this.isFail = false
|
||||||
|
console.log('执行')
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除equInfo编号为"' + ids + '"的数据项?').then(function () {
|
||||||
|
return delEquInfo(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/equInfo/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `设备信息导出_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -49,6 +49,22 @@ export function listStaff(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function jyListStaff(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/rescueInfo/driverList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function wxListStaff(query) {
|
||||||
|
return request({
|
||||||
|
url: '/repair/worker/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询inspectionFile详细
|
// 查询inspectionFile详细
|
||||||
export function getInspectionFile(id) {
|
export function getInspectionFile(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in staffList"
|
v-for="item in staffList"
|
||||||
:key="item.userId"
|
:key="item.userId"
|
||||||
:label="item.name"
|
:label="item.userName"
|
||||||
:value="item.userId"
|
:value="item.userId"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
@ -202,10 +202,9 @@
|
|||||||
v-model="form.filePath"
|
v-model="form.filePath"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item v-if="form.id">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
:options="folderList"
|
:options="folderList"
|
||||||
|
|
||||||
:props="{
|
:props="{
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
emitPath:false
|
emitPath:false
|
||||||
@ -286,17 +285,17 @@ import {
|
|||||||
getUserIdsByFileId,
|
getUserIdsByFileId,
|
||||||
listByPermission,
|
listByPermission,
|
||||||
getFileRecord,
|
getFileRecord,
|
||||||
addBatchInspectionFile, queryTreeFolder
|
addBatchInspectionFile, queryTreeFolder, jyListStaff, wxListStaff
|
||||||
} from './api/file'
|
} from './api/file'
|
||||||
import driveFileUpload from '@/components/FileUpload/index.vue'
|
import driveFileUpload from '@/components/FileUpload/index.vue'
|
||||||
import {getAccessToken} from '@/utils/auth'
|
import { getAccessToken } from '@/utils/auth'
|
||||||
// import cos from "@/utils/cosUpload"
|
// import cos from "@/utils/cosUpload"
|
||||||
import cos from '@/utils/cos'
|
import cos from '@/utils/cos'
|
||||||
import {getLastPathSegment} from "@/utils/ruoyi";
|
import { getLastPathSegment } from '@/utils/ruoyi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
components: {driveFileUpload},
|
components: { driveFileUpload },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
uploadProgress: 0,
|
uploadProgress: 0,
|
||||||
@ -309,7 +308,7 @@ export default {
|
|||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
fileList: [],
|
fileList: [],
|
||||||
headers: {Authorization: 'Bearer ' + getAccessToken()}, // 设置上传的请求头部
|
headers: { Authorization: 'Bearer ' + getAccessToken() }, // 设置上传的请求头部
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
@ -392,22 +391,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const servicePackageId = getLastPathSegment(this.$route.path); // 默认为最后一段
|
const servicePackageId = getLastPathSegment(this.$route.path) // 默认为最后一段
|
||||||
console.log('服务套餐', servicePackageId)
|
console.log('服务套餐', servicePackageId)
|
||||||
this.queryParams.servicePackageId = servicePackageId;
|
this.queryParams.servicePackageId = servicePackageId
|
||||||
switch (servicePackageId) {
|
switch (servicePackageId) {
|
||||||
case 'jiance':
|
case 'jiance':
|
||||||
this.queryParams.dictType = 'ins_report_role';
|
this.queryParams.dictType = 'ins_report_role'
|
||||||
break;
|
break
|
||||||
case 'jiaxiao':
|
case 'jiaxiao':
|
||||||
this.queryParams.dictType = 'drive_file_role';
|
this.queryParams.dictType = 'drive_file_role'
|
||||||
break;
|
break
|
||||||
case 'weixiu':
|
case 'weixiu':
|
||||||
this.queryParams.dictType = 'repair_file_role';
|
this.queryParams.dictType = 'repair_file_role'
|
||||||
break;
|
break
|
||||||
case 'jiuyuan':
|
case 'jiuyuan':
|
||||||
this.queryParams.dictType = 'repair_report_role';
|
this.queryParams.dictType = 'repair_report_role'
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
this.queryParams.fatherId = this.$route.query.folderId || null // 明确初始状态
|
this.queryParams.fatherId = this.$route.query.folderId || null // 明确初始状态
|
||||||
|
|
||||||
@ -521,7 +520,7 @@ export default {
|
|||||||
this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' +
|
this.fileUrl = 'https://view.officeapps.live.com/op/view.aspx?src=' +
|
||||||
(row.filePath.includes('http')
|
(row.filePath.includes('http')
|
||||||
? this.inspectionFileUrl + row.filePath.replace(/^.*?uploads\//, 'uploads/')
|
? this.inspectionFileUrl + row.filePath.replace(/^.*?uploads\//, 'uploads/')
|
||||||
: this.previewUrl + row.filePath);
|
: this.previewUrl + row.filePath)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.$refs.filePreview.show()
|
// this.$refs.filePreview.show()
|
||||||
this.selectFile = row
|
this.selectFile = row
|
||||||
@ -529,7 +528,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRowClassName({row}) {
|
getRowClassName({ row }) {
|
||||||
console.log('返回的class', row.id === this.selectFile.id ? 'highlight-row' : '')
|
console.log('返回的class', row.id === this.selectFile.id ? 'highlight-row' : '')
|
||||||
// 如果当前行是选中的文件,添加高亮样式
|
// 如果当前行是选中的文件,添加高亮样式
|
||||||
return row.id === this.selectFile.id ? 'highlight-row' : ''
|
return row.id === this.selectFile.id ? 'highlight-row' : ''
|
||||||
@ -620,13 +619,30 @@ export default {
|
|||||||
},
|
},
|
||||||
getStaffList() {
|
getStaffList() {
|
||||||
const data = {
|
const data = {
|
||||||
pageNum: 1,
|
pageNo: 1,
|
||||||
pageSize: 100000
|
pageSize: 100000
|
||||||
}
|
}
|
||||||
listStaff(data).then(res => {
|
console.log('123', 123)
|
||||||
this.staffList = res.data.records
|
if(this.queryParams.servicePackageId == 'weixiu'){
|
||||||
this.getUserIdsByFileId(this.fileId)
|
console.log('234', 234)
|
||||||
})
|
wxListStaff(data).then(res => {
|
||||||
|
this.staffList = res.data.records
|
||||||
|
console.log('staffList1',this.staffList)
|
||||||
|
this.getUserIdsByFileId(this.fileId)
|
||||||
|
})
|
||||||
|
}else if(this.queryParams.servicePackageId == 'jiuyuan'){
|
||||||
|
console.log('345', 345)
|
||||||
|
jyListStaff(data).then(res => {
|
||||||
|
this.staffList = res.data.records.map(item => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
userName: item.nickName
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log('staffList2', this.staffList)
|
||||||
|
this.getUserIdsByFileId(this.fileId)
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**根据文件id获取有权限的用户id*/
|
/**根据文件id获取有权限的用户id*/
|
||||||
getUserIdsByFileId(fileId) {
|
getUserIdsByFileId(fileId) {
|
||||||
@ -742,7 +758,7 @@ export default {
|
|||||||
|
|
||||||
function traverse(nodes, parentDisabled = false) {
|
function traverse(nodes, parentDisabled = false) {
|
||||||
return nodes.map(node => {
|
return nodes.map(node => {
|
||||||
let newNode = {...node}
|
let newNode = { ...node }
|
||||||
|
|
||||||
// 递归处理子节点,同时传递父级的禁用状态
|
// 递归处理子节点,同时传递父级的禁用状态
|
||||||
if (newNode.children && newNode.children.length > 0) {
|
if (newNode.children && newNode.children.length > 0) {
|
||||||
@ -837,7 +853,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//新建删除
|
//新建删除
|
||||||
Deleteanniu(id) {
|
Deleteanniu(id) {
|
||||||
this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除inspectionFile编号为"' + id + '"的数据项?').then(function() {
|
||||||
return delInspectionFile(id)
|
return delInspectionFile(id)
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
@ -852,7 +868,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids
|
const ids = row.id || this.ids
|
||||||
this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除inspectionFile编号为"' + ids + '"的数据项?').then(function() {
|
||||||
return delInspectionFile(ids)
|
return delInspectionFile(ids)
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList()
|
this.getList()
|
||||||
@ -931,14 +947,14 @@ export default {
|
|||||||
return reject()
|
return reject()
|
||||||
}
|
}
|
||||||
this.$message.success('上传成功:' + data.Location)
|
this.$message.success('上传成功:' + data.Location)
|
||||||
this.fileList.push({name: file.name, url: data.Location})
|
this.fileList.push({ name: file.name, url: data.Location })
|
||||||
resolve()
|
resolve()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 直接使用 cos-js-sdk 进行上传
|
// 直接使用 cos-js-sdk 进行上传
|
||||||
async uploadToCOS({file}) {
|
async uploadToCOS({ file }) {
|
||||||
const fileName = `files/${file.name}` // 你的存储路径
|
const fileName = `files/${file.name}` // 你的存储路径
|
||||||
cos.putObject(
|
cos.putObject(
|
||||||
{
|
{
|
||||||
@ -996,7 +1012,7 @@ export default {
|
|||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
name: file.name,
|
name: file.name,
|
||||||
url: `https://${data.Location}`, // 腾讯云返回的 URL
|
url: `https://${data.Location}`, // 腾讯云返回的 URL
|
||||||
servicePackageId: this.queryParams.servicePackageId,
|
servicePackageId: this.queryParams.servicePackageId
|
||||||
})
|
})
|
||||||
|
|
||||||
// return this.fileList
|
// return this.fileList
|
||||||
@ -1126,7 +1142,7 @@ export default {
|
|||||||
/* 时间样式 */
|
/* 时间样式 */
|
||||||
.step-time {
|
.step-time {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
//color: #666;
|
//color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 文件名称高亮 */
|
/* 文件名称高亮 */
|
||||||
|
|||||||
@ -249,6 +249,18 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
const reportTime = this.queryParams.reportTime;
|
||||||
|
this.queryParams = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
reportTopic: null,
|
||||||
|
reportTime: reportTime,
|
||||||
|
createTime: [],
|
||||||
|
userId: null,
|
||||||
|
userName: null,
|
||||||
|
servicePackageId: this.$route.query.servicePackageId,
|
||||||
|
dictType: this.$route.query.dictType,
|
||||||
|
}
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -81,7 +81,7 @@ export function delUser(userId) {
|
|||||||
// 导出用户
|
// 导出用户
|
||||||
export function exportUser(query) {
|
export function exportUser(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/base/dl-drive-school-coach/export',
|
url: '/system/rescueInfo/drviceExport',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
|
|||||||
@ -26,10 +26,10 @@
|
|||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport">导入
|
<el-button type="info" icon="el-icon-upload2" size="mini" @click="handleImport">导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
|
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
|
||||||
:loading="exportLoading">导出
|
:loading="exportLoading">导出
|
||||||
@ -73,7 +73,6 @@
|
|||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
|
||||||
<el-row v-if="form.userId != null">
|
<el-row v-if="form.userId != null">
|
||||||
<el-form-item label="头像" prop="avatar">
|
<el-form-item label="头像" prop="avatar">
|
||||||
<ImageUpload v-model="form.avatar" :limit="1"/>
|
<ImageUpload v-model="form.avatar" :limit="1"/>
|
||||||
@ -152,7 +151,7 @@
|
|||||||
stripe
|
stripe
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="username"
|
prop="realName"
|
||||||
label="员工姓名"
|
label="员工姓名"
|
||||||
width="180">
|
width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -161,45 +160,17 @@
|
|||||||
label="失败原因">
|
label="失败原因">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="roleName"
|
prop="phonenumber"
|
||||||
label="岗位">
|
label="手机号码">
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="idCard"
|
|
||||||
label="身份证号">
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="age"
|
prop="age"
|
||||||
label="年龄">
|
label="年龄">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
prop="mobile"
|
|
||||||
label="电话号码">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="sex"
|
prop="sex"
|
||||||
label="性别">
|
label="性别">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
prop="seniority"
|
|
||||||
label="教龄">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="carId"
|
|
||||||
label="车牌号">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="address"
|
|
||||||
label="居住地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="regAddress"
|
|
||||||
label="户籍地址">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="instructorDesc"
|
|
||||||
label="个人简介">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||||
@ -504,6 +475,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
username: undefined,
|
||||||
|
nickname: undefined,
|
||||||
|
};
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
@ -658,47 +633,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/* submitForm: function () {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
this.form.fileList = this.fileList
|
|
||||||
const requestForm = {
|
|
||||||
realName: this.form.nickName,
|
|
||||||
phonenumber: this.form.mobile,
|
|
||||||
age: this.form.age,
|
|
||||||
sex: this.form.sex,
|
|
||||||
|
|
||||||
}
|
|
||||||
if (this.form.userId !== undefined) {
|
|
||||||
console.log(this.form)
|
|
||||||
|
|
||||||
updateUser(requestForm).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
let data = {
|
|
||||||
userId: this.form.userId,
|
|
||||||
roleIds: this.form.roleIds
|
|
||||||
}
|
|
||||||
permissionAssign(data)
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.form.username = this.form.mobile
|
|
||||||
this.form.password = '123456'
|
|
||||||
addUser(requestForm).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
let data = {
|
|
||||||
userId: response.data,
|
|
||||||
roleIds: this.form.roleIds
|
|
||||||
}
|
|
||||||
permissionAssign(data)
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, */
|
|
||||||
/** 提交按钮(角色权限) */
|
/** 提交按钮(角色权限) */
|
||||||
submitRole: function () {
|
submitRole: function () {
|
||||||
if (this.form.userId !== undefined) {
|
if (this.form.userId !== undefined) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user