Browse Source

用户管理,科室,响应布局

master
mch 2 years ago
parent
commit
b8577d19db
  1. 41
      src/components/doctorCheck/CheckItemList.vue
  2. 20
      src/views/user-list/AuditLog.vue
  3. 73
      src/views/user-list/UserList.vue

41
src/components/doctorCheck/CheckItemList.vue

@ -1,21 +1,42 @@
<template> <template>
<div> <div>
<el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="window.pageHeight < 600
<el-table
:data="doctorCheck.checkItemList"
style="width: 100%"
:height="
window.pageHeight < 600
? Math.floor(((420 - 40) * 3) / 5) ? Math.floor(((420 - 40) * 3) / 5)
: Math.floor(((window.pageHeight - 260 - 40) * 3) / 5) : Math.floor(((window.pageHeight - 260 - 40) * 3) / 5)
" :row-style="{ height: '30px' }" border @row-click="rowClick">
"
:row-style="{ height: '30px' }"
border
@row-click="rowClick"
>
<el-table-column prop="itemName" label="项目" width="180" /> <el-table-column prop="itemName" label="项目" width="180" />
<el-table-column prop="result" label="结果" width="500"> <el-table-column prop="result" label="结果" width="500">
<template slot-scope="scope"> <template slot-scope="scope">
<el-autocomplete style="width: 480px" class="inline-input" type="textarea"
v-model="doctorCheck.checkItemList[scope.$index].result" :fetch-suggestions="querySearch" placeholder="请输入结果值"
@select="handleSelect" :disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' ||
<el-autocomplete
style="width: 480px"
class="inline-input"
type="textarea"
v-model="doctorCheck.checkItemList[scope.$index].result"
:fetch-suggestions="querySearch"
placeholder="请输入结果值"
@select="handleSelect"
:disabled="
doctorCheck.RegisterCheckEdit.completeFlag == '1' ||
doctorCheck.RegisterCheckEdit.completeFlag == '2' doctorCheck.RegisterCheckEdit.completeFlag == '2'
" :autosize="{ minRows: 1, maxRows: 100 }" />
"
:autosize="{ minRows: 1, maxRows: 100 }"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unit" label="单位" width="80" /> <el-table-column prop="unit" label="单位" width="80" />
<el-table-column prop="referenceRangeValue" label="参考范围" width="120" />
<el-table-column
prop="referenceRangeValue"
label="参考范围"
width="120"
/>
</el-table> </el-table>
</div> </div>
</template> </template>
@ -35,10 +56,10 @@ export default {
}; };
}, },
created() { },
created() {},
// //
mounted() { },
mounted() {},
computed: { computed: {
...mapState(["window", "dict", "doctorCheck"]), ...mapState(["window", "dict", "doctorCheck"]),
@ -120,6 +141,4 @@ export default {
.el-table th.el-table__cell.is-leaf { .el-table th.el-table__cell.is-leaf {
padding: 0; padding: 0;
} }
</style> </style>

20
src/views/user-list/AuditLog.vue

@ -5,7 +5,7 @@
<el-table <el-table
:data="tableData" :data="tableData"
style="width: 100%; margin-top: 20px" style="width: 100%; margin-top: 20px"
height="700"
:height="tableHeight"
> >
<el-table-column prop="userName" label="用户名" width="80"> <el-table-column prop="userName" label="用户名" width="80">
</el-table-column> </el-table-column>
@ -103,6 +103,8 @@ import { dailyrecord, querylog } from "@/request/ruquset";
export default { export default {
data() { data() {
return { return {
tableHeight: window.innerHeight - 220, //
screenHeight: window.innerHeight, //
tableData: [], tableData: [],
pages: { pages: {
skipCount: 0, skipCount: 0,
@ -116,6 +118,22 @@ export default {
created() { created() {
this.cratlist(); this.cratlist();
}, },
watch: {
// screenHeighttable
screenHeight(val) {
this.screenHeight = val;
this.tableHeight = this.screenHeight - 220;
},
},
mounted() {
window.onresize = () => {
return (() => {
// window.innerHeight:
window.screenHeight = window.innerHeight;
this.screenHeight = window.screenHeight;
})();
};
},
methods: { methods: {
cratlist() { cratlist() {
dailyrecord(this.pages).then((res) => { dailyrecord(this.pages).then((res) => {

73
src/views/user-list/UserList.vue

@ -2,9 +2,9 @@
<div> <div>
<el-card class="orgindcard"> <el-card class="orgindcard">
<div class="publiccss">用户管理</div> <div class="publiccss">用户管理</div>
<el-button type="primary" @click="newlyincreased" style="margin-top: 20px"
<!-- <el-button type="primary" @click="newlyincreased" style="margin-top: 20px"
>新增</el-button >新增</el-button
>
> -->
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
<el-form ref="form" :model="form"> <el-form ref="form" :model="form">
<el-col :span="4"> <el-col :span="4">
@ -39,7 +39,7 @@
</el-form> </el-form>
</el-row> </el-row>
<div style="display: flex"> <div style="display: flex">
<div style="width: 10%;margin-top:30px">
<div style="width: 10%; margin-top: 30px">
<el-tree <el-tree
:data="treedata" :data="treedata"
:props="defaultProps" :props="defaultProps"
@ -63,6 +63,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="surname" label="姓名" width=""> <el-table-column prop="surname" label="姓名" width="">
</el-table-column> </el-table-column>
<!-- <el-table-column prop="name" label="名称" width=""> </el-table-column> --> <!-- <el-table-column prop="name" label="名称" width=""> </el-table-column> -->
<!-- <el-table-column prop="lastModificationTime" label="开始时间"> <!-- <el-table-column prop="lastModificationTime" label="开始时间">
<template slot-scope="scope"> <template slot-scope="scope">
@ -74,14 +75,21 @@
{{ scope.row.lastModificationTime | dateFormat }} {{ scope.row.lastModificationTime | dateFormat }}
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column label="操作" width="430">
<el-table-column label="操作" width="480">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" @click="deleates(scope.row)"
>删除</el-button
<el-button
type="primary"
@click="newlyincreased"
style="margin-top: 20px"
>新增</el-button
> >
<el-button type="primary" @click="editmony(scope.row)" <el-button type="primary" @click="editmony(scope.row)"
>编辑</el-button >编辑</el-button
> >
<el-button type="primary" @click="deleates(scope.row)"
>删除</el-button
>
<!-- <el-button type="primary" @click="binding(scope.row)" <!-- <el-button type="primary" @click="binding(scope.row)"
>绑定组织</el-button >绑定组织</el-button
> --> > -->
@ -145,6 +153,25 @@
v-model="form.phoneNumber" v-model="form.phoneNumber"
></el-input> </el-form-item ></el-input> </el-form-item
></el-col> ></el-col>
<el-col :span="12">
<el-form-item label="组织架构">
<div style="margin-top: -30px">
当前选中的组织<span> {{ orgIds }}</span>
</div>
<el-cascader
v-model="orgId"
:options="organizationalstructure"
:show-all-levels="false"
@change="cascaderchang"
:props="{
label: 'displayName',
children: 'treeChildren',
checkStrictly: true,
value: 'id',
}"
></el-cascader>
</el-form-item>
</el-col>
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="邮箱" > <el-form-item label="邮箱" >
<el-input v-model="form.email"></el-input> </el-form-item <el-input v-model="form.email"></el-input> </el-form-item
@ -196,7 +223,7 @@
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="组织架构">
<!-- <el-tab-pane label="组织架构"> -->
<!-- :default-checked-keys="defaultKeys" --> <!-- :default-checked-keys="defaultKeys" -->
<!-- <el-tree <!-- <el-tree
:props="{ :props="{
@ -212,22 +239,23 @@
ref="trees" ref="trees"
> >
</el-tree> --> </el-tree> -->
<div>
当前选中的组织<span> {{ orgId }}</span>
<!-- <div>
当前选中的组织<span> {{ orgIds }}</span>
</div> </div>
<el-cascader <el-cascader
v-model="orgId" v-model="orgId"
:options="organizationalstructure" :options="organizationalstructure"
:show-all-levels="false" :show-all-levels="false"
@change="cascaderchang"
:props="{ :props="{
label: 'displayName', label: 'displayName',
children: 'treeChildren', children: 'treeChildren',
checkStrictly: true, checkStrictly: true,
value: 'id', value: 'id',
}" }"
></el-cascader>
</el-tab-pane>
<el-tab-pane label="科室设置1">
></el-cascader> -->
<!-- </el-tab-pane> -->
<el-tab-pane label="科室操作权限">
<el-tree <el-tree
:props="{ :props="{
label: 'displayName', label: 'displayName',
@ -524,7 +552,7 @@ export default {
children: "treeChildren", children: "treeChildren",
label: "displayName", label: "displayName",
}, },
orgIds:[],
orgIds: "",
orgId: [], orgId: [],
confarmPassWord: "", // confarmPassWord: "", //
usersName: "", // usersName: "", //
@ -652,6 +680,9 @@ export default {
}, },
methods: { methods: {
cascaderchang(v) {
console.log(v);
},
gettreedata() { gettreedata() {
getapi("/api/app/organization-units/by-code-all").then((res) => { getapi("/api/app/organization-units/by-code-all").then((res) => {
this.treedata = res.data; this.treedata = res.data;
@ -659,8 +690,12 @@ export default {
}); });
}, },
handleNodeClick(data) { handleNodeClick(data) {
this.department=data.displayName
console.log(data);
this.department = data.displayName;
console.log(this.department);
getapi(`/api/identity/users/getlistinorganizationunit?OrganizationUnitId=${data.id}`).then(res=>{
console.log(res);
this.tableData=res.data
})
}, },
iscrentddepartment() { iscrentddepartment() {
this.department = this.$refs.department.getCheckedKeys(true); this.department = this.$refs.department.getCheckedKeys(true);
@ -829,6 +864,9 @@ export default {
this.title = 1; this.title = 1;
if (this.title == 1) { if (this.title == 1) {
this.form = {}; this.form = {};
this.orgId = this.department;
console.log(this.orgId);
console.log(this.department, "1111111111111");
} }
getbook().then((res) => { getbook().then((res) => {
// res.data.items.forEach((element) => { // res.data.items.forEach((element) => {
@ -1045,9 +1083,8 @@ export default {
}); });
console.log(row); console.log(row);
usersinits(row.id).then((res) => { usersinits(row.id).then((res) => {
this.orgId = res.data[0].displayName;
console.log(this.orgId);
console.log("zzz这里", res);
this.orgId = res.data[res.data.length - 1].displayName;
this.orgIds = res.data[0].displayName;
let list = res.data; let list = res.data;
this.defaultKeys = list.map((item) => { this.defaultKeys = list.map((item) => {
return item.id; return item.id;

Loading…
Cancel
Save