Browse Source

组织手机号负责人非必填

newMaster
1747191978@qq.com 4 months ago
parent
commit
e6895fff97
  1. 318
      acupuncture-后台/src/views/member/account.vue
  2. 323
      acupuncture-后台/src/views/member/index.vue

318
acupuncture-后台/src/views/member/account.vue

@ -1,65 +1,168 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="80px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form-item label="组织名称" prop="tenantName">
<el-input v-model="queryParams.param.tenantName" placeholder="请输入" clearable
@keyup.enter.native="handleQuery" />
<el-input
v-model="queryParams.param.tenantName"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</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-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-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
@click="handleDelete">删除</el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="listData" @selection-change="handleSelectionChange" max-height="600">
<el-table
v-loading="loading"
:data="listData"
@selection-change="handleSelectionChange"
max-height="600"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column fixed label="昵称" align="center" prop="nickName" min-width="100" />
<el-table-column fixed label="用户名" align="center" prop="userName" show-overflow-tooltip min-width="100">
<el-table-column
fixed
label="昵称"
align="center"
prop="nickName"
min-width="100"
/>
<el-table-column
fixed
label="用户名"
align="center"
prop="userName"
show-overflow-tooltip
min-width="100"
>
</el-table-column>
<el-table-column fixed label="组织名称" align="center" prop="tenantName" show-overflow-tooltip min-width="80" />
<el-table-column label="状态" align="center" show-overflow-tooltip min-width="100">
<el-table-column
fixed
label="组织名称"
align="center"
prop="tenantName"
show-overflow-tooltip
min-width="80"
/>
<el-table-column
label="状态"
align="center"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope" v-if="scope.row.status != null">
<span v-if="scope.row.status == 0" style="color: #67C23A">启用</span>
<span v-if="scope.row.status == 1" style="color: #F56C6C">禁用</span>
<span v-if="scope.row.status == 0" style="color: #67c23a">启用</span>
<span v-if="scope.row.status == 1" style="color: #f56c6c">禁用</span>
</template>
</el-table-column>
<el-table-column label="创建人/创建时间" align="center" min-width="140">
<template slot-scope="scope">
<div>{{scope.row.createBy}}</div>
<div>{{ scope.row.createBy }}</div>
<span>
{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}
</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
<el-table-column
fixed="right"
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<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>
<el-button size="mini" type="text" icon="el-icon-refresh"
@click="handleResetPwd(scope.row)">重置密码</el-button>
<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
>
<el-button
size="mini"
type="text"
icon="el-icon-refresh"
@click="handleResetPwd(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" />
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 -->
<el-dialog class="popup" :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" class="formStep">
<el-dialog
class="popup"
:title="title"
:visible.sync="open"
width="780px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
class="formStep"
>
<el-form-item label="昵称" prop="nickName">
<el-input v-model="form.nickName" placeholder="请输入" />
</el-form-item>
@ -70,9 +173,13 @@
<el-input v-model="form.password" placeholder="请输入" />
</el-form-item>
<el-form-item label="组织" prop="tenantId">
<el-select v-model="form.tenantId" placeholder="请选择">
<el-option v-for="item in tenantsDataList" :key="item.id" :label="item.name"
:value="item.id">
<el-select v-model="form.tenantId" placeholder="请选择" filterable>
<el-option
v-for="item in tenantsDataList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
@ -83,8 +190,20 @@
</div>
</el-dialog>
<el-dialog class="popup" title="重置密码" :visible.sync="resetOpen" width="780px" append-to-body>
<el-form ref="pasForm" :model="form" :rules="rules" label-width="80px" class="formStep">
<el-dialog
class="popup"
title="重置密码"
:visible.sync="resetOpen"
width="780px"
append-to-body
>
<el-form
ref="pasForm"
:model="form"
:rules="rules"
label-width="80px"
class="formStep"
>
<el-form-item label="新密码" prop="password">
<el-input v-model="form.password" placeholder="请输入" />
</el-form-item>
@ -98,19 +217,17 @@
</template>
<script>
import {
import {
tenantsList,
tenantUsersList,
tenantUsersAdd,
tenantUsersUpd,
tenantUsersDel,
dataSourcesList,
resetPwd
} from "@/api/member";
import {
followupQuery
} from "@/api/followupFile";
export default {
resetPwd,
} from "@/api/member";
import { followupQuery } from "@/api/followupFile";
export default {
name: "Notice",
dicts: ["sys_normal_disable", "sys_user_sex"],
data() {
@ -119,11 +236,11 @@
queryParams: {
param: {
tenantName: "",
}
},
},
listData: [],
title: '',
resetOpen:false,
title: "",
resetOpen: false,
open: false,
total: 0,
form: {},
@ -132,30 +249,39 @@
multiple: false,
//
rules: {
nickName: [{
nickName: [
{
required: true,
message: "昵称不能为空",
trigger: "blur",
}],
userName: [{
},
],
userName: [
{
required: true,
message: "账户不能为空",
trigger: "blur",
}],
tenantId: [{
},
],
tenantId: [
{
required: true,
message: "所属组织不能为空",
trigger: "blur",
}],
password: [{
},
],
password: [
{
required: true,
message: "密码不能为空",
trigger: "blur",
}, {
},
{
pattern: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[^\da-zA-Z\s]).{8,20}$/,
message: "必须包含数字、字母、特殊字符, 长度为8到20位",
trigger: "blur",
}],
},
],
},
};
},
@ -190,11 +316,11 @@
//
reset() {
this.form = {
"tenantId": "",
"userName": "",
"nickName": "",
"userName": '',
"status": "0",
tenantId: "",
userName: "",
nickName: "",
userName: "",
status: "0",
};
this.resetForm("form");
},
@ -226,10 +352,10 @@
handleUpdate(row) {
this.open = true;
this.title = "修改用户";
this.form = JSON.parse(JSON.stringify(row))
this.form = JSON.parse(JSON.stringify(row));
},
/** 诊疗档案 */
submitForm: function() {
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
@ -248,12 +374,12 @@
}
});
},
handleResetPwd(row){
this.resetOpen = true
this.form = JSON.parse(JSON.stringify(row))
this.form.password = ''
handleResetPwd(row) {
this.resetOpen = true;
this.form = JSON.parse(JSON.stringify(row));
this.form.password = "";
},
submitPasForm(row){
submitPasForm(row) {
this.$refs["pasForm"].validate((valid) => {
if (valid) {
resetPwd(this.form).then((response) => {
@ -269,7 +395,7 @@
const idList = row.id ? [row.id] : this.ids;
this.$modal
.confirm("是否确认删除当前选择的数据?")
.then(function() {
.then(function () {
return tenantUsersDel({
idList: idList,
});
@ -283,7 +409,8 @@
/** 导出按钮操作 */
handleExport() {
this.download1(
"/treatment/exportTreatment", {
"/treatment/exportTreatment",
{
...this.queryParams.params,
},
`诊疗档案.xlsx`
@ -305,77 +432,78 @@
this.importOpen = true;
},
},
};
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.div-title1 {
.div-title1 {
font-size: 22px;
font-weight: bold;
margin-bottom: 10px;
}
}
.div-title2 {
.div-title2 {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
}
}
.div-title3 {
.div-title3 {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}
}
.span-but {
.span-but {
display: inline-block;
border-radius: 4px;
border: 1px solid #dcdfe6;
line-height: 32px;
padding: 0 15px;
margin: 5px;
}
}
.span-but-active {
.span-but-active {
border: 1px solid #1890ff;
}
}
.human-body {
.human-body {
display: flex;
flex-wrap: wrap;
}
}
.human-body>>>.el-form-item {
.human-body >>> .el-form-item {
width: 49%;
margin-right: 2%;
}
}
.human-body>>>.el-form-item:nth-of-type(2n) {
.human-body >>> .el-form-item:nth-of-type(2n) {
margin-right: 0;
}
}
.formStep1>>>.el-form-item__label {}
.formStep1 >>> .el-form-item__label {
}
.form-item-zd {
.form-item-zd {
width: 100%;
text-align: left;
}
}
.form-item-age {
.form-item-age {
display: flex;
align-items: center;
}
}
.form-item-age span {
.form-item-age span {
margin: 0 10px;
}
}
.form-item-age>>>.el-input {
.form-item-age >>> .el-input {
width: 100px;
}
}
>>>.el-drawer.rtl {
>>> .el-drawer.rtl {
width: 50% !important;
}
}
</style>

323
acupuncture-后台/src/views/member/index.vue

@ -1,70 +1,173 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="80px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form-item label="组织名称" prop="name">
<el-input v-model="queryParams.param.name" placeholder="请输入" clearable
@keyup.enter.native="handleQuery" />
<el-input
v-model="queryParams.param.name"
placeholder="请输入"
clearable
@keyup.enter.native="handleQuery"
/>
</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-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-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
@click="handleDelete">删除</el-button>
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="listData" @selection-change="handleSelectionChange" max-height="600">
<el-table
v-loading="loading"
:data="listData"
@selection-change="handleSelectionChange"
max-height="600"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column fixed label="组织名称" align="center" prop="name" min-width="100" />
<el-table-column fixed label="联系电话" align="center" prop="contactPhone" show-overflow-tooltip
min-width="100">
<el-table-column
fixed
label="组织名称"
align="center"
prop="name"
min-width="100"
/>
<el-table-column
fixed
label="联系电话"
align="center"
prop="contactPhone"
show-overflow-tooltip
min-width="100"
>
</el-table-column>
<el-table-column fixed label="数据源" align="center" prop="dataSourceKey" show-overflow-tooltip
min-width="80" />
<el-table-column label="状态" align="center" show-overflow-tooltip min-width="100">
<el-table-column
fixed
label="数据源"
align="center"
prop="dataSourceKey"
show-overflow-tooltip
min-width="80"
/>
<el-table-column
label="状态"
align="center"
show-overflow-tooltip
min-width="100"
>
<template slot-scope="scope" v-if="scope.row.status != null">
<span v-if="scope.row.status == 0" style="color: #67C23A">启用</span>
<span v-if="scope.row.status == 1" style="color: #F56C6C">禁用</span>
<span v-if="scope.row.status == 0" style="color: #67c23a">启用</span>
<span v-if="scope.row.status == 1" style="color: #f56c6c">禁用</span>
</template>
</el-table-column>
<el-table-column label="创建人/创建时间" align="center" min-width="140">
<template slot-scope="scope">
<div>{{scope.row.createBy}}</div>
<div>{{ scope.row.createBy }}</div>
<span>
{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}
</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
<el-table-column
fixed="right"
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
:disabled="scope.row.id == 1 || scope.row.id == 2">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
:disabled="scope.row.id == 1 || scope.row.id == 2">删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
:disabled="scope.row.id == 1 || scope.row.id == 2"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
:disabled="scope.row.id == 1 || scope.row.id == 2"
>删除</el-button
>
<!-- 启用 禁用 -->
<el-button size="mini" type="text" icon="el-icon-connection" @click="handleStatusUpd(scope.row)"
:disabled="scope.row.id == 1 || scope.row.id == 2">
{{scope.row.status - 0 ? '启用' : '禁用'}}
<el-button
size="mini"
type="text"
icon="el-icon-connection"
@click="handleStatusUpd(scope.row)"
:disabled="scope.row.id == 1 || scope.row.id == 2"
>
{{ scope.row.status - 0 ? "启用" : "禁用" }}
</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" />
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 -->
<el-dialog class="popup" :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="140px" class="formStep">
<el-dialog
class="popup"
:title="title"
:visible.sync="open"
width="780px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="140px"
class="formStep"
>
<el-form-item label="组织名称" prop="name">
<el-input v-model="form.name" placeholder="请输入" />
</el-form-item>
@ -76,8 +179,12 @@
</el-form-item>
<el-form-item label="数据源" prop="dataSourceId">
<el-select v-model="form.dataSourceId" placeholder="请选择">
<el-option v-for="item in dataSourceList" :key="item.id" :label="item.dataSourceKey"
:value="item.id">
<el-option
v-for="item in dataSourceList"
:key="item.id"
:label="item.dataSourceKey"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
@ -97,17 +204,15 @@
</template>
<script>
import {
import {
tenantsList,
tenantsAdd,
tenantsUpd,
tenantsDel,
dataSourcesList
} from "@/api/member";
import {
followupQuery
} from "@/api/followupFile";
export default {
dataSourcesList,
} from "@/api/member";
import { followupQuery } from "@/api/followupFile";
export default {
name: "Notice",
dicts: ["sys_normal_disable", "sys_user_sex"],
data() {
@ -116,10 +221,10 @@
queryParams: {
param: {
name: "",
}
},
},
listData: [],
title: '',
title: "",
open: false,
total: 0,
form: {},
@ -128,40 +233,53 @@
multiple: false,
//
rules: {
code: [{
code: [
{
required: true,
message: "CODE不能为空",
trigger: "blur",
}],
name: [{
},
],
name: [
{
required: true,
message: "组织名称不能为空",
trigger: "blur",
}],
leader: [{
required: true,
},
],
leader: [
{
required: false,
message: "负责人不能为空",
trigger: "blur",
}],
contactPhone: [{
required: true,
},
],
contactPhone: [
{
required: false,
message: "手机号码不能为空",
trigger: "blur"
}, {
trigger: "blur",
},
{
pattern: /^1[3456789]\d{9}$/,
message: '手机号码格式不正确',
trigger: 'blur'
}],
dataSourceId: [{
required: true,
message: "手机号码格式不正确",
trigger: "blur",
},
],
dataSourceId: [
{
required: false,
message: "数据源不能为空",
trigger: "change",
}],
status: [{
},
],
status: [
{
required: true,
message: "状态不能为空",
trigger: "blur",
}],
},
],
},
};
},
@ -198,11 +316,11 @@
//
reset() {
this.form = {
"name": "",
"leader": "",
"contactPhone": "",
"dataSourceId": '',
"status": "0",
name: "",
leader: "",
contactPhone: "",
dataSourceId: "",
status: "0",
};
this.resetForm("form");
},
@ -234,10 +352,10 @@
handleUpdate(row) {
this.open = true;
this.title = "修改诊疗档案";
this.form = JSON.parse(JSON.stringify(row))
this.form = JSON.parse(JSON.stringify(row));
},
/** 诊疗档案 */
submitForm: function() {
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != undefined) {
@ -262,7 +380,7 @@
const idList = row.id ? [row.id] : this.ids;
this.$modal
.confirm("是否确认删除当前选择的数据?")
.then(function() {
.then(function () {
return tenantsDel({
idList: idList,
});
@ -275,12 +393,12 @@
},
/** 删除按钮操作 */
handleStatusUpd(row) {
let form = JSON.parse(JSON.stringify(row))
form.status = form.status == 1 ? 0 : 1
let title = form.status ? '启用' : '禁用'
let form = JSON.parse(JSON.stringify(row));
form.status = form.status == 1 ? 0 : 1;
let title = form.status ? "启用" : "禁用";
this.$modal
.confirm(`是否确认 "${title}" 组织名称为 "${row.name}" 数据?`)
.then(function() {
.then(function () {
return tenantsUpd(form);
})
.then(() => {
@ -290,77 +408,78 @@
.catch(() => {});
},
},
};
};
</script>
<style scoped src="@/assets/styles/common.css"></style>
<style scoped>
.div-title1 {
.div-title1 {
font-size: 22px;
font-weight: bold;
margin-bottom: 10px;
}
}
.div-title2 {
.div-title2 {
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
}
}
.div-title3 {
.div-title3 {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
}
}
.span-but {
.span-but {
display: inline-block;
border-radius: 4px;
border: 1px solid #dcdfe6;
line-height: 32px;
padding: 0 15px;
margin: 5px;
}
}
.span-but-active {
.span-but-active {
border: 1px solid #1890ff;
}
}
.human-body {
.human-body {
display: flex;
flex-wrap: wrap;
}
}
.human-body>>>.el-form-item {
.human-body >>> .el-form-item {
width: 49%;
margin-right: 2%;
}
}
.human-body>>>.el-form-item:nth-of-type(2n) {
.human-body >>> .el-form-item:nth-of-type(2n) {
margin-right: 0;
}
}
.formStep1>>>.el-form-item__label {}
.formStep1 >>> .el-form-item__label {
}
.form-item-zd {
.form-item-zd {
width: 100%;
text-align: left;
}
}
.form-item-age {
.form-item-age {
display: flex;
align-items: center;
}
}
.form-item-age span {
.form-item-age span {
margin: 0 10px;
}
}
.form-item-age>>>.el-input {
.form-item-age >>> .el-input {
width: 100px;
}
}
>>>.el-drawer.rtl {
>>> .el-drawer.rtl {
width: 50% !important;
}
}
</style>
Loading…
Cancel
Save