修改
This commit is contained in:
parent
e306d09996
commit
3759c67233
@ -197,7 +197,7 @@
|
|||||||
prop="evaluateSatisfaction"
|
prop="evaluateSatisfaction"
|
||||||
v-if="query.orderStatus == 'EVALUATED'"
|
v-if="query.orderStatus == 'EVALUATED'"
|
||||||
>
|
>
|
||||||
<el-input v-model="query.evaluateSatisfaction" disabled style="width: 250px" />
|
<div class="text">{{query.evaluateSatisfaction}}</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-table
|
<el-table
|
||||||
:data="query.appointmentOrderConsumableList"
|
:data="query.appointmentOrderConsumableList"
|
||||||
@ -617,6 +617,10 @@ export default {
|
|||||||
this.query.evaluateSatisfaction = "满意";
|
this.query.evaluateSatisfaction = "满意";
|
||||||
} else if (res.data.evaluateSatisfaction == "DISSATISFIED") {
|
} else if (res.data.evaluateSatisfaction == "DISSATISFIED") {
|
||||||
this.query.evaluateSatisfaction = "不满意";
|
this.query.evaluateSatisfaction = "不满意";
|
||||||
|
} else if (res.data.evaluateSatisfaction == "VERYSATISFIED") {
|
||||||
|
this.query.evaluateSatisfaction = "非常满意";
|
||||||
|
} else if (res.data.evaluateSatisfaction == "VERYDISSATISFIED") {
|
||||||
|
this.query.evaluateSatisfaction = "非常不满意";
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.innerVisible4 = true;
|
this.innerVisible4 = true;
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-col> -->
|
</el-col>-->
|
||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
<el-col :span="24" :xs="24">
|
<el-col :span="24" :xs="24">
|
||||||
<el-form
|
<el-form
|
||||||
@ -81,16 +81,8 @@
|
|||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
type="primary"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -103,8 +95,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:user:add']"
|
v-hasPermi="['system:user:add']"
|
||||||
>新增</el-button
|
>新增</el-button>
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -115,8 +106,7 @@
|
|||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['system:user:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>修改</el-button
|
>修改</el-button>
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -127,8 +117,7 @@
|
|||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['system:user:remove']"
|
v-hasPermi="['system:user:remove']"
|
||||||
>删除</el-button
|
>删除</el-button>
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -149,19 +138,11 @@
|
|||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['system:user:export']"
|
v-hasPermi="['system:user:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col> -->
|
</el-col>-->
|
||||||
<right-toolbar
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||||
:showSearch.sync="showSearch"
|
|
||||||
@queryTable="getList"
|
|
||||||
:columns="columns"
|
|
||||||
></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||||
v-loading="loading"
|
|
||||||
:data="userList"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="用户编号"
|
label="用户编号"
|
||||||
@ -195,12 +176,7 @@
|
|||||||
v-if="columns[4].visible"
|
v-if="columns[4].visible"
|
||||||
width="120"
|
width="120"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||||
label="状态"
|
|
||||||
align="center"
|
|
||||||
key="status"
|
|
||||||
v-if="columns[5].visible"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
@ -234,16 +210,14 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:user:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>修改</el-button
|
>修改</el-button>
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:user:remove']"
|
v-hasPermi="['system:user:remove']"
|
||||||
>删除</el-button
|
>删除</el-button>
|
||||||
>
|
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
size="mini"
|
size="mini"
|
||||||
@command="(command) => handleCommand(command, scope.row)"
|
@command="(command) => handleCommand(command, scope.row)"
|
||||||
@ -257,14 +231,12 @@
|
|||||||
command="handleResetPwd"
|
command="handleResetPwd"
|
||||||
icon="el-icon-key"
|
icon="el-icon-key"
|
||||||
v-hasPermi="['system:user:resetPwd']"
|
v-hasPermi="['system:user:resetPwd']"
|
||||||
>重置密码</el-dropdown-item
|
>重置密码</el-dropdown-item>
|
||||||
>
|
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleAuthRole"
|
command="handleAuthRole"
|
||||||
icon="el-icon-circle-check"
|
icon="el-icon-circle-check"
|
||||||
v-hasPermi="['system:user:edit']"
|
v-hasPermi="['system:user:edit']"
|
||||||
>分配角色</el-dropdown-item
|
>分配角色</el-dropdown-item>
|
||||||
>
|
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@ -287,11 +259,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="用户昵称" prop="nickName">
|
<el-form-item label="用户昵称" prop="nickName">
|
||||||
<el-input
|
<el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" />
|
||||||
v-model="form.nickName"
|
|
||||||
placeholder="请输入用户昵称"
|
|
||||||
maxlength="30"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -310,48 +278,28 @@
|
|||||||
<el-form-item label="归属部门" prop="deptId">
|
<el-form-item label="归属部门" prop="deptId">
|
||||||
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
|
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="手机号码" prop="phonenumber">
|
<el-form-item label="手机号码" prop="phonenumber">
|
||||||
<el-input
|
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
||||||
v-model="form.phonenumber"
|
|
||||||
placeholder="请输入手机号码"
|
|
||||||
maxlength="11"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email">
|
||||||
<el-input
|
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
||||||
v-model="form.email"
|
|
||||||
placeholder="请输入邮箱"
|
|
||||||
maxlength="50"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
|
||||||
v-if="form.userId == undefined"
|
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
|
||||||
label="用户名称"
|
|
||||||
prop="userName"
|
|
||||||
>
|
|
||||||
<el-input
|
|
||||||
v-model="form.userName"
|
|
||||||
placeholder="请输入用户名称"
|
|
||||||
maxlength="30"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
|
||||||
v-if="form.userId == undefined"
|
|
||||||
label="用户密码"
|
|
||||||
prop="password"
|
|
||||||
>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.password"
|
v-model="form.password"
|
||||||
placeholder="请输入用户密码"
|
placeholder="请输入用户密码"
|
||||||
@ -366,18 +314,13 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<!-- multiple -->
|
<!-- multiple -->
|
||||||
<el-form-item label="护理站" prop="nurseStationIds">
|
<el-form-item label="护理站" prop="nurseStationIds">
|
||||||
<el-select
|
<el-select v-model="form.nurseStationIds" placeholder="请选择护理站" v-loadmore="loadMore">
|
||||||
v-model="form.nurseStationIds"
|
|
||||||
placeholder="请选择护理站"
|
|
||||||
v-loadmore="loadMore"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in nurseStationlist"
|
v-for="item in nurseStationlist"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.nurseStationName"
|
:label="item.nurseStationName"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
></el-option>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -388,8 +331,7 @@
|
|||||||
v-for="dict in dict.type.sys_normal_disable"
|
v-for="dict in dict.type.sys_normal_disable"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.value"
|
:label="dict.value"
|
||||||
>{{ dict.label }}</el-radio
|
>{{ dict.label }}</el-radio>
|
||||||
>
|
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -407,14 +349,10 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col>-->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="角色">
|
<el-form-item label="角色">
|
||||||
<el-select
|
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||||
v-model="form.roleIds"
|
|
||||||
multiple
|
|
||||||
placeholder="请选择角色"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in roleOptions"
|
v-for="item in roleOptions"
|
||||||
:key="item.roleId"
|
:key="item.roleId"
|
||||||
@ -429,11 +367,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
v-model="form.remark"
|
|
||||||
type="textarea"
|
|
||||||
placeholder="请输入内容"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -445,12 +379,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 用户导入对话框 -->
|
<!-- 用户导入对话框 -->
|
||||||
<el-dialog
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||||
:title="upload.title"
|
|
||||||
:visible.sync="upload.open"
|
|
||||||
width="400px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
@ -464,11 +393,13 @@
|
|||||||
drag
|
drag
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-upload"></i>
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">
|
||||||
|
将文件拖到此处,或
|
||||||
|
<em>点击上传</em>
|
||||||
|
</div>
|
||||||
<div class="el-upload__tip text-center" slot="tip">
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
<div class="el-upload__tip" slot="tip">
|
<div class="el-upload__tip" slot="tip">
|
||||||
<el-checkbox v-model="upload.updateSupport" />
|
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
|
||||||
是否更新已经存在的用户数据
|
|
||||||
</div>
|
</div>
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
<el-link
|
<el-link
|
||||||
@ -476,8 +407,7 @@
|
|||||||
:underline="false"
|
:underline="false"
|
||||||
style="font-size: 12px; vertical-align: baseline"
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
@click="importTemplate"
|
@click="importTemplate"
|
||||||
>下载模板</el-link
|
>下载模板</el-link>
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -496,7 +426,7 @@ import {
|
|||||||
addUser,
|
addUser,
|
||||||
updateUser,
|
updateUser,
|
||||||
resetUserPwd,
|
resetUserPwd,
|
||||||
changeUserStatus,
|
changeUserStatus
|
||||||
} from "@/api/system/user";
|
} from "@/api/system/user";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { treeselect } from "@/api/system/dept";
|
import { treeselect } from "@/api/system/dept";
|
||||||
@ -545,7 +475,7 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label",
|
label: "label"
|
||||||
},
|
},
|
||||||
// 用户导入参数
|
// 用户导入参数
|
||||||
upload: {
|
upload: {
|
||||||
@ -560,7 +490,7 @@ export default {
|
|||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: { Authorization: "Bearer " + getToken() },
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + "/system/user/importData",
|
url: process.env.VUE_APP_BASE_API + "/system/user/importData"
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -569,7 +499,7 @@ export default {
|
|||||||
userName: undefined,
|
userName: undefined,
|
||||||
phonenumber: undefined,
|
phonenumber: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined
|
||||||
},
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
nurseStationqueryParams: {
|
nurseStationqueryParams: {
|
||||||
@ -589,7 +519,7 @@ export default {
|
|||||||
dutyPerson: null,
|
dutyPerson: null,
|
||||||
dutyPhone: null,
|
dutyPhone: null,
|
||||||
stationPictureUrl: null,
|
stationPictureUrl: null,
|
||||||
sort: null,
|
sort: null
|
||||||
},
|
},
|
||||||
// 列信息
|
// 列信息
|
||||||
columns: [
|
columns: [
|
||||||
@ -599,7 +529,7 @@ export default {
|
|||||||
{ key: 3, label: `部门`, visible: true },
|
{ key: 3, label: `部门`, visible: true },
|
||||||
{ key: 4, label: `手机号码`, visible: true },
|
{ key: 4, label: `手机号码`, visible: true },
|
||||||
{ key: 5, label: `状态`, visible: true },
|
{ key: 5, label: `状态`, visible: true },
|
||||||
{ key: 6, label: `创建时间`, visible: true },
|
{ key: 6, label: `创建时间`, visible: true }
|
||||||
],
|
],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
@ -609,14 +539,14 @@ export default {
|
|||||||
min: 2,
|
min: 2,
|
||||||
max: 20,
|
max: 20,
|
||||||
message: "用户名称长度必须介于 2 和 20 之间",
|
message: "用户名称长度必须介于 2 和 20 之间",
|
||||||
trigger: "blur",
|
trigger: "blur"
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
// nurseStationIds: [
|
// nurseStationIds: [
|
||||||
// { required: true, message: "护理站不能为空", trigger: "blur" },
|
// { required: true, message: "护理站不能为空", trigger: "blur" },
|
||||||
// ],
|
// ],
|
||||||
nickName: [
|
nickName: [
|
||||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
||||||
@ -624,43 +554,43 @@ export default {
|
|||||||
min: 5,
|
min: 5,
|
||||||
max: 20,
|
max: 20,
|
||||||
message: "用户密码长度必须介于 5 和 20 之间",
|
message: "用户密码长度必须介于 5 和 20 之间",
|
||||||
trigger: "blur",
|
trigger: "blur"
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
email: [
|
email: [
|
||||||
{
|
{
|
||||||
type: "email",
|
type: "email",
|
||||||
message: "请输入正确的邮箱地址",
|
message: "请输入正确的邮箱地址",
|
||||||
trigger: ["blur", "change"],
|
trigger: ["blur", "change"]
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
phonenumber: [
|
phonenumber: [
|
||||||
{
|
{
|
||||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
message: "请输入正确的手机号码",
|
message: "请输入正确的手机号码",
|
||||||
trigger: "blur",
|
trigger: "blur"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 根据名称筛选部门树
|
// 根据名称筛选部门树
|
||||||
deptName(val) {
|
deptName(val) {
|
||||||
this.$refs.tree.filter(val);
|
this.$refs.tree.filter(val);
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
this.listinfo();
|
this.listinfo();
|
||||||
this.getConfigKey("sys.user.initPassword").then((response) => {
|
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||||
this.initPassword = response.msg;
|
this.initPassword = response.msg;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
listinfo() {
|
listinfo() {
|
||||||
list(this.nurseStationqueryParams).then((res) => {
|
list(this.nurseStationqueryParams).then(res => {
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.total2 = res.total;
|
this.total2 = res.total;
|
||||||
});
|
});
|
||||||
@ -672,8 +602,8 @@ export default {
|
|||||||
if (this.nurseStationqueryParams.pageNum >= a) {
|
if (this.nurseStationqueryParams.pageNum >= a) {
|
||||||
} else {
|
} else {
|
||||||
this.nurseStationqueryParams.pageNum++;
|
this.nurseStationqueryParams.pageNum++;
|
||||||
list(this.nurseStationqueryParams).then((res) => {
|
list(this.nurseStationqueryParams).then(res => {
|
||||||
res.rows.forEach((e) => {
|
res.rows.forEach(e => {
|
||||||
this.nurseStationlist.push(e);
|
this.nurseStationlist.push(e);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -684,7 +614,7 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||||
(response) => {
|
response => {
|
||||||
this.userList = response.rows;
|
this.userList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -693,7 +623,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询部门下拉树结构 */
|
/** 查询部门下拉树结构 */
|
||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
treeselect().then((response) => {
|
treeselect().then(response => {
|
||||||
this.deptOptions = response.data;
|
this.deptOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -712,13 +642,13 @@ export default {
|
|||||||
let text = row.status === "0" ? "启用" : "停用";
|
let text = row.status === "0" ? "启用" : "停用";
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
|
.confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
|
||||||
.then(function () {
|
.then(function() {
|
||||||
return changeUserStatus(row.userId, row.status);
|
return changeUserStatus(row.userId, row.status);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$modal.msgSuccess(text + "成功");
|
this.$modal.msgSuccess(text + "成功");
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function() {
|
||||||
row.status = row.status === "0" ? "1" : "0";
|
row.status = row.status === "0" ? "1" : "0";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -741,7 +671,7 @@ export default {
|
|||||||
status: "0",
|
status: "0",
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
postIds: [],
|
postIds: [],
|
||||||
roleIds: [],
|
roleIds: []
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -758,7 +688,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map((item) => item.userId);
|
this.ids = selection.map(item => item.userId);
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1;
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
@ -779,7 +709,7 @@ export default {
|
|||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
getUser().then((response) => {
|
getUser().then(response => {
|
||||||
this.postOptions = response.posts;
|
this.postOptions = response.posts;
|
||||||
this.roleOptions = response.roles;
|
this.roleOptions = response.roles;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
@ -792,13 +722,12 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
const userId = row.userId || this.ids;
|
const userId = row.userId || this.ids;
|
||||||
getUser(userId).then((response) => {
|
getUser(userId).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
if (!this.form.nurseStationIds) {
|
if (!this.form.nurseStationIds) {
|
||||||
this.form.nurseStationIds = ''
|
this.form.nurseStationIds = "";
|
||||||
} else {
|
} else {
|
||||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||||
|
|
||||||
}
|
}
|
||||||
// if (
|
// if (
|
||||||
// !this.form.nurseStationIds ||
|
// !this.form.nurseStationIds ||
|
||||||
@ -822,55 +751,52 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置密码按钮操作 */
|
/** 重置密码按钮操作 */
|
||||||
handleResetPwd(row) {
|
handleResetPwd(row) {
|
||||||
|
|
||||||
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
inputPattern: /^.{5,20}$/,
|
inputPattern: /^.{5,20}$/,
|
||||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
|
||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
resetUserPwd(row.userId, value).then((response) => {
|
resetUserPwd(row.userId, value).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 分配角色操作 */
|
/** 分配角色操作 */
|
||||||
handleAuthRole: function (row) {
|
handleAuthRole: function(row) {
|
||||||
const userId = row.userId;
|
const userId = row.userId;
|
||||||
this.$router.push("/system/user-auth/role/" + userId);
|
this.$router.push("/system/user-auth/role/" + userId);
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
// this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||||
// this.form.nurseStationIds = JSON.stringify(this.form.nurseStationIds);
|
// this.form.nurseStationIds = JSON.stringify(this.form.nurseStationIds);
|
||||||
// var obj = [];
|
// var obj = [];
|
||||||
// obj.push(this.form.nurseStationIds);
|
// obj.push(this.form.nurseStationIds);
|
||||||
// this.form.nurseStationIds = obj;
|
// this.form.nurseStationIds = obj;
|
||||||
|
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
if (!this.form.nurseStationIds) {
|
if (!this.form.nurseStationIds) {
|
||||||
this.form.nurseStationIds = null
|
this.form.nurseStationIds = null;
|
||||||
updateUser(this.form).then((response) => {
|
updateUser(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||||
updateUser(this.form).then((response) => {
|
updateUser(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
addUser(this.form).then((response) => {
|
addUser(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -884,7 +810,7 @@ export default {
|
|||||||
const userIds = row.userId || this.ids;
|
const userIds = row.userId || this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除此用户?")
|
.confirm("是否确认删除此用户?")
|
||||||
.then(function () {
|
.then(function() {
|
||||||
return delUser(userIds);
|
return delUser(userIds);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -898,7 +824,7 @@ export default {
|
|||||||
this.download(
|
this.download(
|
||||||
"system/user/export",
|
"system/user/export",
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
...this.queryParams
|
||||||
},
|
},
|
||||||
`user_${new Date().getTime()}.xlsx`
|
`user_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
@ -937,7 +863,7 @@ export default {
|
|||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
submitFileForm() {
|
submitFileForm() {
|
||||||
this.$refs.upload.submit();
|
this.$refs.upload.submit();
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user